openapi: 3.0.3
info:
  title: Upvest Investment API
  version: 1.76.0
  description: Upvest Investment API.
  contact:
    name: Upvest API Support
    email: api@upvest.co
    url: https://docs.upvest.co
  license:
    name: Apache 2.0
    url: https://www.apache.org/licenses/LICENSE-2.0
tags:
  - name: Access Tokens
    description: All authentication related paths.
  - name: Files
    description: All files API related paths.
  - name: Webhooks
    description: All webhook related paths.
  - name: Webhook Subscriptions
    description: All webhook subscriptions related paths.
  - name: Users
    description: All user related paths.
  - name: User Identifiers
    description: All user identifiers related paths.
  - name: User Checks
    description: All user checks related paths.
  - name: Accounts
    description: All accounts related paths
  - name: Tax Exemptions
    description: All tax exemptions related paths
  - name: Tax Wrappers
    description: All tax wrappers related paths
  - name: Tax Collections
    description: All tax collections related paths
  - name: Account Groups
    description: All account groups related paths
  - name: Reference Accounts
    description: All reference account related paths
  - name: Mandates
    description: All direct debit mandates related paths
  - name: Direct Debits
    description: All direct debits related paths
  - name: Credit Fundings
    description: All credit fundings related paths
  - name: Top-ups
    description: All top-ups related paths
  - name: Withdrawals
    description: All withdrawals related paths
  - name: Virtual Bank Accounts
    description: All virtual bank accounts related paths
  - name: Cash Balances
    description: All cash balance related paths
  - name: Instruments
    description: All instrument related paths.
  - name: Price Data
    description: All price data related paths.
  - name: Orders
    description: All order related paths.
  - name: Executions
    description: All execution related paths.
  - name: Positions
    description: All positions related paths.
  - name: Treasury Reports
    description: All treasury reports related paths.
  - name: Reports
    description: All reports related paths.
  - name: Tax Residencies
    description: All tax residencies related paths.
  - name: Transactions
    description: All transactions related paths.
  - name: Fees
    description: All fees related paths.
  - name: Fees Configurations
    description: All fees configurations related paths.
  - name: Portfolios
    description: All portfolios related paths.
  - name: Portfolios Rebalancing
    description: All portfolios rebalancing related paths.
  - name: Valuations
    description: All valuations related paths.
  - name: Liquidations
    description: All accounts liquidations related paths.
  - name: Returns
    description: All accounts returns related paths.
  - name: Virtual Cash Balances
    description: All virtual cash balances related paths
  - name: Savings Plans
    description: All savings plans related paths.
  - name: Tests
    description: All test related paths.
  - name: Corporate Actions
    description: All Corporate Action related paths.
  - name: Securities Transfers
    description: All Securities Transfers related paths.
x-tagGroups:
  - name: Authentication
    tags:
      - Access Tokens
  - name: Users and Account Management
    tags:
      - Users
      - User Identifiers
      - User Checks
      - Accounts
      - Account Groups
      - Tax Residencies
  - name: Corporate Actions
    tags:
      - Corporate Actions
  - name: Taxes
    tags:
      - Tax Exemptions
      - Tax Collections
      - Tax Wrappers
  - name: Instruments & Price Data
    tags:
      - Instruments
      - Price Data
  - name: Orders
    tags:
      - Orders
  - name: Investment Solutions
    tags:
      - Portfolios
      - Portfolios Rebalancing
      - Savings Plans
      - Liquidations
  - name: Payments
    tags:
      - Direct Debits
      - Top-ups
      - Withdrawals
      - Reference Accounts
      - Mandates
      - Virtual Bank Accounts
      - Credit Fundings
  - name: Balances
    tags:
      - Cash Balances
      - Positions
      - Valuations
      - Returns
      - Virtual Cash Balances
  - name: Fees
    tags:
      - Fees
      - Fees Configurations
  - name: Reporting
    tags:
      - Reports
      - Treasury Reports
      - Transactions
      - Files
  - name: Webhooks
    tags:
      - Webhook Subscriptions
  - name: Tests
    tags:
      - Tests
servers:
  - url: https://sandbox.upvest.co
    description: Sandbox environment
  - url: https://api.upvest.co
    description: Live environment
paths:
  /auth/token:
    parameters:
      - name: upvest-client-id
        in: header
        description: Tenant Client ID
        required: true
        schema:
          type: string
          format: uuid
          example: ebabcf4d-61c3-4942-875c-e265a7c2d062
      - name: signature
        in: header
        required: true
        schema:
          type: string
        description: >-
          https://tools.ietf.org/id/draft-ietf-httpbis-message-signatures-01.html#name-the-signature-http-header
      - name: signature-input
        in: header
        required: true
        schema:
          type: string
        description: >-
          https://tools.ietf.org/id/draft-ietf-httpbis-message-signatures-01.html#name-the-signature-input-http-he
      - name: upvest-api-version
        in: header
        required: false
        schema:
          type: string
          enum:
            - '1'
          default: '1'
          example: '1'
        description: 'Upvest API version (Note: Do not include quotation marks)'
    post:
      operationId: issue_token
      summary: Get an access token for requested scopes
      description: >-
        Get an access token to use with the API with specified scopes.


        You should _always_ scope your access tokens. You get one for
        read-access and separate ones for updating, creating or deleting
        resources.
      tags:
        - Access Tokens
      requestBody:
        content:
          application/x-www-form-urlencoded:
            schema:
              title: Request - Auth - Request Access Token
              type: object
              description: Schema for access token request.
              properties:
                client_id:
                  type: string
                  format: uuid
                  description: Client ID given during onboarding.
                client_secret:
                  type: string
                  maxLength: 1000
                  description: Client Secret given during onboarding.
                grant_type:
                  type: string
                  default: client_credentials
                  description: This must always be `client_credentials`.
                scope:
                  type: string
                  maxLength: 1000
                  description: >-
                    List of space delimited scopes to request for this access
                    token.
              required:
                - client_id
                - client_secret
                - grant_type
                - scope
              additionalProperties: false
            example:
              client_id: 363f3305-7ab0-4e82-a158-f9d382ad08b6
              client_secret: WHIW1yic-ouct3sceh
              grant_type: client_credentials
              scope: users:read
      responses:
        '200':
          description: Access token successfully generated.
          headers:
            upvest-request-id:
              required: true
              schema:
                type: string
                format: uuid
                example: 169ae4c7-ebd7-4041-94da-25369653eba7
          content:
            application/json:
              schema:
                title: Auth - Access Token
                type: object
                description: Schema for an access token response.
                properties:
                  access_token:
                    type: string
                    maxLength: 1000
                    description: The generated access token.
                  expires_in:
                    type: integer
                    description: How many seconds the access token is valid for.
                  token_type:
                    type: string
                    default: bearer
                    description: This is always 'bearer'.
                  scope:
                    type: string
                    maxLength: 1000
                    description: >-
                      List of space delimited scopes requested for this access
                      token.
                required:
                  - access_token
                  - expires_in
                  - token_type
                  - scope
                additionalProperties: false
              example:
                access_token: token.signature
                expires_in: 86400
                token_type: bearer
                scope: users:read
        '400':
          description: Bad Request. The incoming request had a malformed parameter/object.
          headers:
            upvest-request-id:
              required: true
              schema:
                type: string
                format: uuid
                example: 169ae4c7-ebd7-4041-94da-25369653eba7
          content:
            application/problem+json:
              schema:
                title: Error
                type: object
                description: ''
                properties:
                  type:
                    type: string
                    description: URL to a document describing the error condition.
                  status:
                    type: integer
                    description: >-
                      Transmission of the HTTP status code so that all
                      information can be found in one place, but also to correct
                      changes in the status code due to the use of proxy
                      servers.
                  title:
                    type: string
                    description: >-
                      A short, human-readable title for the general error type;
                      the title should not change for given types.
                  detail:
                    type: string
                    description: A human-readable description of the specific error.
                  instance:
                    type: string
                    description: >-
                      This optional key may be present, with a unique URI for
                      the specific error; this will often point to an error log
                      for that specific response.
                  request_id:
                    type: string
                    description: Correlation ID for the original request.
                required:
                  - type
                  - status
                additionalProperties: false
              example:
                status: 400
                type: bad_request
        '401':
          description: Unauthorized. The caller has not been authenticated.
          headers:
            upvest-request-id:
              required: true
              schema:
                type: string
                format: uuid
                example: 169ae4c7-ebd7-4041-94da-25369653eba7
          content:
            application/problem+json:
              schema:
                title: Error
                type: object
                description: ''
                properties:
                  type:
                    type: string
                    description: URL to a document describing the error condition.
                  status:
                    type: integer
                    description: >-
                      Transmission of the HTTP status code so that all
                      information can be found in one place, but also to correct
                      changes in the status code due to the use of proxy
                      servers.
                  title:
                    type: string
                    description: >-
                      A short, human-readable title for the general error type;
                      the title should not change for given types.
                  detail:
                    type: string
                    description: A human-readable description of the specific error.
                  instance:
                    type: string
                    description: >-
                      This optional key may be present, with a unique URI for
                      the specific error; this will often point to an error log
                      for that specific response.
                  request_id:
                    type: string
                    description: Correlation ID for the original request.
                required:
                  - type
                  - status
                additionalProperties: false
              example:
                status: 401
                type: unauthorized
        '403':
          description: >-
            Forbidden. The caller has been authenticated but is not allowed to
            take the requested action.
          headers:
            upvest-request-id:
              required: true
              schema:
                type: string
                format: uuid
                example: 169ae4c7-ebd7-4041-94da-25369653eba7
          content:
            application/problem+json:
              schema:
                title: Error
                type: object
                description: ''
                properties:
                  type:
                    type: string
                    description: URL to a document describing the error condition.
                  status:
                    type: integer
                    description: >-
                      Transmission of the HTTP status code so that all
                      information can be found in one place, but also to correct
                      changes in the status code due to the use of proxy
                      servers.
                  title:
                    type: string
                    description: >-
                      A short, human-readable title for the general error type;
                      the title should not change for given types.
                  detail:
                    type: string
                    description: A human-readable description of the specific error.
                  instance:
                    type: string
                    description: >-
                      This optional key may be present, with a unique URI for
                      the specific error; this will often point to an error log
                      for that specific response.
                  request_id:
                    type: string
                    description: Correlation ID for the original request.
                required:
                  - type
                  - status
                additionalProperties: false
              example:
                status: 403
                type: forbidden
        '406':
          description: >-
            Not Acceptable. The resource does not have a current representation
            that would be acceptable to the user agent. "Accept" header defined
            unsupported value.
          headers:
            upvest-request-id:
              required: true
              schema:
                type: string
                format: uuid
                example: 169ae4c7-ebd7-4041-94da-25369653eba7
          content:
            application/problem+json:
              schema:
                title: Error
                type: object
                description: ''
                properties:
                  type:
                    type: string
                    description: URL to a document describing the error condition.
                  status:
                    type: integer
                    description: >-
                      Transmission of the HTTP status code so that all
                      information can be found in one place, but also to correct
                      changes in the status code due to the use of proxy
                      servers.
                  title:
                    type: string
                    description: >-
                      A short, human-readable title for the general error type;
                      the title should not change for given types.
                  detail:
                    type: string
                    description: A human-readable description of the specific error.
                  instance:
                    type: string
                    description: >-
                      This optional key may be present, with a unique URI for
                      the specific error; this will often point to an error log
                      for that specific response.
                  request_id:
                    type: string
                    description: Correlation ID for the original request.
                required:
                  - type
                  - status
                additionalProperties: false
              example:
                status: 406
                type: not_acceptable
        '429':
          description: >-
            Too Many Requests. The caller has exceeded their quota for the time
            period and has been throttled.
          headers:
            upvest-request-id:
              required: true
              schema:
                type: string
                format: uuid
                example: 169ae4c7-ebd7-4041-94da-25369653eba7
          content:
            application/problem+json:
              schema:
                title: Error
                type: object
                description: ''
                properties:
                  type:
                    type: string
                    description: URL to a document describing the error condition.
                  status:
                    type: integer
                    description: >-
                      Transmission of the HTTP status code so that all
                      information can be found in one place, but also to correct
                      changes in the status code due to the use of proxy
                      servers.
                  title:
                    type: string
                    description: >-
                      A short, human-readable title for the general error type;
                      the title should not change for given types.
                  detail:
                    type: string
                    description: A human-readable description of the specific error.
                  instance:
                    type: string
                    description: >-
                      This optional key may be present, with a unique URI for
                      the specific error; this will often point to an error log
                      for that specific response.
                  request_id:
                    type: string
                    description: Correlation ID for the original request.
                required:
                  - type
                  - status
                additionalProperties: false
              example:
                status: 429
                type: too_many_requests
        '500':
          description: Internal Server Error. The service encountered an unexpected error.
          headers:
            upvest-request-id:
              required: true
              schema:
                type: string
                format: uuid
                example: 169ae4c7-ebd7-4041-94da-25369653eba7
          content:
            application/problem+json:
              schema:
                title: Error
                type: object
                description: ''
                properties:
                  type:
                    type: string
                    description: URL to a document describing the error condition.
                  status:
                    type: integer
                    description: >-
                      Transmission of the HTTP status code so that all
                      information can be found in one place, but also to correct
                      changes in the status code due to the use of proxy
                      servers.
                  title:
                    type: string
                    description: >-
                      A short, human-readable title for the general error type;
                      the title should not change for given types.
                  detail:
                    type: string
                    description: A human-readable description of the specific error.
                  instance:
                    type: string
                    description: >-
                      This optional key may be present, with a unique URI for
                      the specific error; this will often point to an error log
                      for that specific response.
                  request_id:
                    type: string
                    description: Correlation ID for the original request.
                required:
                  - type
                  - status
                additionalProperties: false
              example:
                status: 500
                type: internal_server_error
        '503':
          description: >-
            Service Unavailable. The service handling for this request cannot be
            reached at this time.
          headers:
            upvest-request-id:
              required: true
              schema:
                type: string
                format: uuid
                example: 169ae4c7-ebd7-4041-94da-25369653eba7
          content:
            application/problem+json:
              schema:
                title: Error
                type: object
                description: ''
                properties:
                  type:
                    type: string
                    description: URL to a document describing the error condition.
                  status:
                    type: integer
                    description: >-
                      Transmission of the HTTP status code so that all
                      information can be found in one place, but also to correct
                      changes in the status code due to the use of proxy
                      servers.
                  title:
                    type: string
                    description: >-
                      A short, human-readable title for the general error type;
                      the title should not change for given types.
                  detail:
                    type: string
                    description: A human-readable description of the specific error.
                  instance:
                    type: string
                    description: >-
                      This optional key may be present, with a unique URI for
                      the specific error; this will often point to an error log
                      for that specific response.
                  request_id:
                    type: string
                    description: Correlation ID for the original request.
                required:
                  - type
                  - status
                additionalProperties: false
              example:
                status: 503
                type: method_not_allowed
        '504':
          description: >-
            Gateway Timeout. The service gateway has reached its internal
            timeout.
          headers:
            upvest-request-id:
              required: true
              schema:
                type: string
                format: uuid
                example: 169ae4c7-ebd7-4041-94da-25369653eba7
          content:
            application/problem+json:
              schema:
                title: Error
                type: object
                description: ''
                properties:
                  type:
                    type: string
                    description: URL to a document describing the error condition.
                  status:
                    type: integer
                    description: >-
                      Transmission of the HTTP status code so that all
                      information can be found in one place, but also to correct
                      changes in the status code due to the use of proxy
                      servers.
                  title:
                    type: string
                    description: >-
                      A short, human-readable title for the general error type;
                      the title should not change for given types.
                  detail:
                    type: string
                    description: A human-readable description of the specific error.
                  instance:
                    type: string
                    description: >-
                      This optional key may be present, with a unique URI for
                      the specific error; this will often point to an error log
                      for that specific response.
                  request_id:
                    type: string
                    description: Correlation ID for the original request.
                required:
                  - type
                  - status
                additionalProperties: false
              example:
                status: 504
                type: gateway_timeout
  /auth/verify_keys:
    parameters:
      - name: upvest-client-id
        in: header
        description: Tenant Client ID
        required: true
        schema:
          type: string
          format: uuid
          example: ebabcf4d-61c3-4942-875c-e265a7c2d062
      - name: authorization
        in: header
        description: |
          Bearer (access) token from the OAuth flow with correct scopes.
          https://datatracker.ietf.org/doc/html/rfc6750
        required: true
        schema:
          type: string
          pattern: ^Bearer [a-zA-Z0-9\-\._~+/]*=*
          example: Bearer c2VjcmV0Cg==
      - name: signature
        in: header
        required: true
        schema:
          type: string
        description: >-
          https://tools.ietf.org/id/draft-ietf-httpbis-message-signatures-01.html#name-the-signature-http-header
      - name: signature-input
        in: header
        required: true
        schema:
          type: string
        description: >-
          https://tools.ietf.org/id/draft-ietf-httpbis-message-signatures-01.html#name-the-signature-input-http-he
      - name: upvest-api-version
        in: header
        required: false
        schema:
          type: string
          enum:
            - '1'
          default: '1'
          example: '1'
        description: 'Upvest API version (Note: Do not include quotation marks)'
    get:
      operationId: get_jwks
      summary: Get signing keys
      description: Returns a list of signing keys used to verify webhooks.
      tags:
        - Webhook Subscriptions
      security:
        - oauth-client-credentials:
            - webhooks:read
            - webhooks:admin
      responses:
        '200':
          description: JWKS signing public keys
          headers:
            upvest-request-id:
              required: true
              schema:
                type: string
                format: uuid
                example: 169ae4c7-ebd7-4041-94da-25369653eba7
          content:
            application/json:
              schema:
                title: Auth - Verification keys
                type: object
                description: Webhooks verification keys.
                properties:
                  keys:
                    type: array
                    description: List of verification keys
                    items:
                      type: object
                      properties:
                        kid:
                          type: string
                          format: uuid
                          description: Key ID
                        kty:
                          type: string
                          enum:
                            - EC
                          default: EC
                          description: |-
                            Cryptographic algorithm family used with the key.
                            * EC - 
                        crv:
                          type: string
                          description: |-
                            Elliptic curve family.
                            * P-521 - 
                          enum:
                            - P-521
                          default: P-521
                        x:
                          type: string
                          description: Curve parameter
                        'y':
                          type: string
                          description: Curve parameter
                required:
                  - keys
                additionalProperties: false
              example:
                keys:
                  - kid: 9ed77463-c18e-4794-ab5c-17423f9b801a
                    kty: EC
                    crv: P-521
                    x: >-
                      AcYAf5Ou0UvtehpeRvyhnvvrUQvjI4B3VCxfSmxK4gqKJGxO_jTB-nTdrHbBfmZpwmwYR86DppMg43E579K5MQ54
                    'y': >-
                      ALkrId77iD0Ye2vBS5bTkLqPH-bo8urTpTXiNc6Ub-VOFbXfJrR0tQ8COvVXXu58BTu8jWV-1mtbjfJpDl3ISbcK
        '401':
          description: Unauthorized. The caller has not been authenticated.
          headers:
            upvest-request-id:
              required: true
              schema:
                type: string
                format: uuid
                example: 169ae4c7-ebd7-4041-94da-25369653eba7
          content:
            application/problem+json:
              schema:
                title: Error
                type: object
                description: ''
                properties:
                  type:
                    type: string
                    description: URL to a document describing the error condition.
                  status:
                    type: integer
                    description: >-
                      Transmission of the HTTP status code so that all
                      information can be found in one place, but also to correct
                      changes in the status code due to the use of proxy
                      servers.
                  title:
                    type: string
                    description: >-
                      A short, human-readable title for the general error type;
                      the title should not change for given types.
                  detail:
                    type: string
                    description: A human-readable description of the specific error.
                  instance:
                    type: string
                    description: >-
                      This optional key may be present, with a unique URI for
                      the specific error; this will often point to an error log
                      for that specific response.
                  request_id:
                    type: string
                    description: Correlation ID for the original request.
                required:
                  - type
                  - status
                additionalProperties: false
              example:
                status: 401
                type: unauthorized
        '403':
          description: >-
            Forbidden. The caller has been authenticated but is not allowed to
            take the requested action.
          headers:
            upvest-request-id:
              required: true
              schema:
                type: string
                format: uuid
                example: 169ae4c7-ebd7-4041-94da-25369653eba7
          content:
            application/problem+json:
              schema:
                title: Error
                type: object
                description: ''
                properties:
                  type:
                    type: string
                    description: URL to a document describing the error condition.
                  status:
                    type: integer
                    description: >-
                      Transmission of the HTTP status code so that all
                      information can be found in one place, but also to correct
                      changes in the status code due to the use of proxy
                      servers.
                  title:
                    type: string
                    description: >-
                      A short, human-readable title for the general error type;
                      the title should not change for given types.
                  detail:
                    type: string
                    description: A human-readable description of the specific error.
                  instance:
                    type: string
                    description: >-
                      This optional key may be present, with a unique URI for
                      the specific error; this will often point to an error log
                      for that specific response.
                  request_id:
                    type: string
                    description: Correlation ID for the original request.
                required:
                  - type
                  - status
                additionalProperties: false
              example:
                status: 403
                type: forbidden
        '406':
          description: >-
            Not Acceptable. The resource does not have a current representation
            that would be acceptable to the user agent. "Accept" header defined
            unsupported value.
          headers:
            upvest-request-id:
              required: true
              schema:
                type: string
                format: uuid
                example: 169ae4c7-ebd7-4041-94da-25369653eba7
          content:
            application/problem+json:
              schema:
                title: Error
                type: object
                description: ''
                properties:
                  type:
                    type: string
                    description: URL to a document describing the error condition.
                  status:
                    type: integer
                    description: >-
                      Transmission of the HTTP status code so that all
                      information can be found in one place, but also to correct
                      changes in the status code due to the use of proxy
                      servers.
                  title:
                    type: string
                    description: >-
                      A short, human-readable title for the general error type;
                      the title should not change for given types.
                  detail:
                    type: string
                    description: A human-readable description of the specific error.
                  instance:
                    type: string
                    description: >-
                      This optional key may be present, with a unique URI for
                      the specific error; this will often point to an error log
                      for that specific response.
                  request_id:
                    type: string
                    description: Correlation ID for the original request.
                required:
                  - type
                  - status
                additionalProperties: false
              example:
                status: 406
                type: not_acceptable
        '429':
          description: >-
            Too Many Requests. The caller has exceeded their quota for the time
            period and has been throttled.
          headers:
            upvest-request-id:
              required: true
              schema:
                type: string
                format: uuid
                example: 169ae4c7-ebd7-4041-94da-25369653eba7
          content:
            application/problem+json:
              schema:
                title: Error
                type: object
                description: ''
                properties:
                  type:
                    type: string
                    description: URL to a document describing the error condition.
                  status:
                    type: integer
                    description: >-
                      Transmission of the HTTP status code so that all
                      information can be found in one place, but also to correct
                      changes in the status code due to the use of proxy
                      servers.
                  title:
                    type: string
                    description: >-
                      A short, human-readable title for the general error type;
                      the title should not change for given types.
                  detail:
                    type: string
                    description: A human-readable description of the specific error.
                  instance:
                    type: string
                    description: >-
                      This optional key may be present, with a unique URI for
                      the specific error; this will often point to an error log
                      for that specific response.
                  request_id:
                    type: string
                    description: Correlation ID for the original request.
                required:
                  - type
                  - status
                additionalProperties: false
              example:
                status: 429
                type: too_many_requests
        '500':
          description: Internal Server Error. The service encountered an unexpected error.
          headers:
            upvest-request-id:
              required: true
              schema:
                type: string
                format: uuid
                example: 169ae4c7-ebd7-4041-94da-25369653eba7
          content:
            application/problem+json:
              schema:
                title: Error
                type: object
                description: ''
                properties:
                  type:
                    type: string
                    description: URL to a document describing the error condition.
                  status:
                    type: integer
                    description: >-
                      Transmission of the HTTP status code so that all
                      information can be found in one place, but also to correct
                      changes in the status code due to the use of proxy
                      servers.
                  title:
                    type: string
                    description: >-
                      A short, human-readable title for the general error type;
                      the title should not change for given types.
                  detail:
                    type: string
                    description: A human-readable description of the specific error.
                  instance:
                    type: string
                    description: >-
                      This optional key may be present, with a unique URI for
                      the specific error; this will often point to an error log
                      for that specific response.
                  request_id:
                    type: string
                    description: Correlation ID for the original request.
                required:
                  - type
                  - status
                additionalProperties: false
              example:
                status: 500
                type: internal_server_error
        '503':
          description: >-
            Service Unavailable. The service handling for this request cannot be
            reached at this time.
          headers:
            upvest-request-id:
              required: true
              schema:
                type: string
                format: uuid
                example: 169ae4c7-ebd7-4041-94da-25369653eba7
          content:
            application/problem+json:
              schema:
                title: Error
                type: object
                description: ''
                properties:
                  type:
                    type: string
                    description: URL to a document describing the error condition.
                  status:
                    type: integer
                    description: >-
                      Transmission of the HTTP status code so that all
                      information can be found in one place, but also to correct
                      changes in the status code due to the use of proxy
                      servers.
                  title:
                    type: string
                    description: >-
                      A short, human-readable title for the general error type;
                      the title should not change for given types.
                  detail:
                    type: string
                    description: A human-readable description of the specific error.
                  instance:
                    type: string
                    description: >-
                      This optional key may be present, with a unique URI for
                      the specific error; this will often point to an error log
                      for that specific response.
                  request_id:
                    type: string
                    description: Correlation ID for the original request.
                required:
                  - type
                  - status
                additionalProperties: false
              example:
                status: 503
                type: method_not_allowed
        '504':
          description: >-
            Gateway Timeout. The service gateway has reached its internal
            timeout.
          headers:
            upvest-request-id:
              required: true
              schema:
                type: string
                format: uuid
                example: 169ae4c7-ebd7-4041-94da-25369653eba7
          content:
            application/problem+json:
              schema:
                title: Error
                type: object
                description: ''
                properties:
                  type:
                    type: string
                    description: URL to a document describing the error condition.
                  status:
                    type: integer
                    description: >-
                      Transmission of the HTTP status code so that all
                      information can be found in one place, but also to correct
                      changes in the status code due to the use of proxy
                      servers.
                  title:
                    type: string
                    description: >-
                      A short, human-readable title for the general error type;
                      the title should not change for given types.
                  detail:
                    type: string
                    description: A human-readable description of the specific error.
                  instance:
                    type: string
                    description: >-
                      This optional key may be present, with a unique URI for
                      the specific error; this will often point to an error log
                      for that specific response.
                  request_id:
                    type: string
                    description: Correlation ID for the original request.
                required:
                  - type
                  - status
                additionalProperties: false
              example:
                status: 504
                type: gateway_timeout
  /files/{folder}/{file_name}:
    parameters:
      - name: folder
        in: path
        description: Files folder name
        required: true
        schema:
          type: string
          pattern: ^[a-z0-9-_\.]{1,32}$
          example: booking_references
      - name: file_name
        in: path
        description: Filename
        required: true
        schema:
          type: string
          pattern: ^[a-z0-9-_\.]{1,255}$
          example: list.txt
      - name: upvest-client-id
        in: header
        description: Tenant Client ID
        required: true
        schema:
          type: string
          format: uuid
          example: ebabcf4d-61c3-4942-875c-e265a7c2d062
      - name: authorization
        in: header
        description: |
          Bearer (access) token from the OAuth flow with correct scopes.
          https://datatracker.ietf.org/doc/html/rfc6750
        required: true
        schema:
          type: string
          pattern: ^Bearer [a-zA-Z0-9\-\._~+/]*=*
          example: Bearer c2VjcmV0Cg==
      - name: signature
        in: header
        required: true
        schema:
          type: string
        description: >-
          https://tools.ietf.org/id/draft-ietf-httpbis-message-signatures-01.html#name-the-signature-http-header
      - name: signature-input
        in: header
        required: true
        schema:
          type: string
        description: >-
          https://tools.ietf.org/id/draft-ietf-httpbis-message-signatures-01.html#name-the-signature-input-http-he
      - name: upvest-api-version
        in: header
        required: false
        schema:
          type: string
          enum:
            - '1'
          default: '1'
          example: '1'
        description: 'Upvest API version (Note: Do not include quotation marks)'
    get:
      operationId: fetching_file_metadata
      summary: Retrieve a file metadata
      description: Retrieve a file metadata
      tags:
        - Files
      security:
        - oauth-client-credentials:
            - files:read
      parameters:
        - name: redirect
          in: query
          required: false
          schema:
            type: string
            default: 0
          description: To enable HTTP redirect.
      responses:
        '200':
          description: >-
            Returns a files metadata object if a valid name and folder are
            provided.
          headers:
            upvest-request-id:
              required: true
              schema:
                type: string
                format: uuid
                example: 169ae4c7-ebd7-4041-94da-25369653eba7
          content:
            application/json:
              schema:
                title: Files metadata
                type: object
                additionalProperties: false
                properties:
                  id:
                    title: Metadata ID
                    type: string
                    description: Files metadata identifier.
                    format: uuid
                  created_at:
                    type: string
                    format: date-time
                    description: >-
                      Date and time when the resource was created. [RFC
                      3339-5](https://datatracker.ietf.org/doc/html/rfc3339#section-5.6),
                      [ISO8601
                      UTC](https://www.iso.org/iso-8601-date-and-time-format.html)
                  updated_at:
                    type: string
                    format: date-time
                    description: >-
                      Date and time when the resource was last updated. [RFC
                      3339-5](https://datatracker.ietf.org/doc/html/rfc3339#section-5.6),
                      [ISO8601
                      UTC](https://www.iso.org/iso-8601-date-and-time-format.html)
                  signed_url:
                    type: string
                    format: url
                    maxLength: 1000
                    description: Files download URL.
                  file_name:
                    type: string
                    pattern: ^[a-z0-9-_\.]{1,32}$
                    description: Name of he file.
                  content_length:
                    type: integer
                    description: Length of the file
                  checksum:
                    type: string
                    pattern: ^[a-f0-9]{64}$
                    description: CRC32 of the files content
                required:
                  - id
                  - created_at
                  - updated_at
                  - file_name
                  - signed_url
                  - content_length
                  - checksum
              example:
                id: d588e071-6e02-4ae6-a2b6-a5f08499633b
                created_at: '2024-03-04T08:24:18Z'
                updated_at: '2024-03-14T11:18:39Z'
                signed_url: >-
                  https://storage.googleapis.com/upvest-tooling-datasharing-service-ia-unstable-7263/477ed9c4943c47f235712a1e80c1ef8491768f0a31ed2d81f244dfebe418e909/tats-tests-encrypted-text.txt?Expires=1710415438&GoogleAccessId=tooling-datasharing-service%40ia-unstable-7263.iam.gserviceaccount.com&Signature=cxb7JQXJVfO6ltBK%2FCWJkzoQcONakNiVsitn0nwtLDJmBj4cznBbMnT0yKtIO4v7BjhR92JmUd9wm7MurZYcuxdBPTMk%2BLTl0KN3QMEJ7%2FVjM1zSerIOxQ8OLFWCswt16Fj9%2BpwD7ZMplIrSEBGijPD48gLlZF%2FTW4yPqkLbE6sYn5Kn3K9A%2B3iF7%2BUaljQ2jLTxG9vCapp8WKjGjDyDXRtDDYY7OXJ6aDrjxDEUxO6kkOGzxMEBCALoHjD2lMpkEy5Gp1BkUbPka7hYVrbQrDM1xpBRsq%2F%2FCT%2F%2Bt196e8JP9YGr%2FxeA%2Bqt6ZTTryzGZhHlvHJFjqIqj2Ip7HioFjw%3D%3D
                file_name: tats-tests-encrypted-text.txt
                content_length: 919
                checksum: >-
                  709b190a108791217f62d839f85a7a997c2039cc29a737d59fd50454b85b2956
        '400':
          description: Bad Request. The incoming request had a malformed parameter/object.
          headers:
            upvest-request-id:
              required: true
              schema:
                type: string
                format: uuid
                example: 169ae4c7-ebd7-4041-94da-25369653eba7
          content:
            application/problem+json:
              schema:
                title: Error
                type: object
                description: ''
                properties:
                  type:
                    type: string
                    description: URL to a document describing the error condition.
                  status:
                    type: integer
                    description: >-
                      Transmission of the HTTP status code so that all
                      information can be found in one place, but also to correct
                      changes in the status code due to the use of proxy
                      servers.
                  title:
                    type: string
                    description: >-
                      A short, human-readable title for the general error type;
                      the title should not change for given types.
                  detail:
                    type: string
                    description: A human-readable description of the specific error.
                  instance:
                    type: string
                    description: >-
                      This optional key may be present, with a unique URI for
                      the specific error; this will often point to an error log
                      for that specific response.
                  request_id:
                    type: string
                    description: Correlation ID for the original request.
                required:
                  - type
                  - status
                additionalProperties: false
              example:
                status: 400
                type: bad_request
        '401':
          description: Unauthorized. The caller has not been authenticated.
          headers:
            upvest-request-id:
              required: true
              schema:
                type: string
                format: uuid
                example: 169ae4c7-ebd7-4041-94da-25369653eba7
          content:
            application/problem+json:
              schema:
                title: Error
                type: object
                description: ''
                properties:
                  type:
                    type: string
                    description: URL to a document describing the error condition.
                  status:
                    type: integer
                    description: >-
                      Transmission of the HTTP status code so that all
                      information can be found in one place, but also to correct
                      changes in the status code due to the use of proxy
                      servers.
                  title:
                    type: string
                    description: >-
                      A short, human-readable title for the general error type;
                      the title should not change for given types.
                  detail:
                    type: string
                    description: A human-readable description of the specific error.
                  instance:
                    type: string
                    description: >-
                      This optional key may be present, with a unique URI for
                      the specific error; this will often point to an error log
                      for that specific response.
                  request_id:
                    type: string
                    description: Correlation ID for the original request.
                required:
                  - type
                  - status
                additionalProperties: false
              example:
                status: 401
                type: unauthorized
        '403':
          description: >-
            Forbidden. The caller has been authenticated but is not allowed to
            take the requested action.
          headers:
            upvest-request-id:
              required: true
              schema:
                type: string
                format: uuid
                example: 169ae4c7-ebd7-4041-94da-25369653eba7
          content:
            application/problem+json:
              schema:
                title: Error
                type: object
                description: ''
                properties:
                  type:
                    type: string
                    description: URL to a document describing the error condition.
                  status:
                    type: integer
                    description: >-
                      Transmission of the HTTP status code so that all
                      information can be found in one place, but also to correct
                      changes in the status code due to the use of proxy
                      servers.
                  title:
                    type: string
                    description: >-
                      A short, human-readable title for the general error type;
                      the title should not change for given types.
                  detail:
                    type: string
                    description: A human-readable description of the specific error.
                  instance:
                    type: string
                    description: >-
                      This optional key may be present, with a unique URI for
                      the specific error; this will often point to an error log
                      for that specific response.
                  request_id:
                    type: string
                    description: Correlation ID for the original request.
                required:
                  - type
                  - status
                additionalProperties: false
              example:
                status: 403
                type: forbidden
        '404':
          description: Not Found. The requested resource could not be found.
          headers:
            upvest-request-id:
              required: true
              schema:
                type: string
                format: uuid
                example: 169ae4c7-ebd7-4041-94da-25369653eba7
          content:
            application/problem+json:
              schema:
                title: Error
                type: object
                description: ''
                properties:
                  type:
                    type: string
                    description: URL to a document describing the error condition.
                  status:
                    type: integer
                    description: >-
                      Transmission of the HTTP status code so that all
                      information can be found in one place, but also to correct
                      changes in the status code due to the use of proxy
                      servers.
                  title:
                    type: string
                    description: >-
                      A short, human-readable title for the general error type;
                      the title should not change for given types.
                  detail:
                    type: string
                    description: A human-readable description of the specific error.
                  instance:
                    type: string
                    description: >-
                      This optional key may be present, with a unique URI for
                      the specific error; this will often point to an error log
                      for that specific response.
                  request_id:
                    type: string
                    description: Correlation ID for the original request.
                required:
                  - type
                  - status
                additionalProperties: false
              example:
                status: 404
                type: not_found
        '406':
          description: >-
            Not Acceptable. The resource does not have a current representation
            that would be acceptable to the user agent. "Accept" header defined
            unsupported value.
          headers:
            upvest-request-id:
              required: true
              schema:
                type: string
                format: uuid
                example: 169ae4c7-ebd7-4041-94da-25369653eba7
          content:
            application/problem+json:
              schema:
                title: Error
                type: object
                description: ''
                properties:
                  type:
                    type: string
                    description: URL to a document describing the error condition.
                  status:
                    type: integer
                    description: >-
                      Transmission of the HTTP status code so that all
                      information can be found in one place, but also to correct
                      changes in the status code due to the use of proxy
                      servers.
                  title:
                    type: string
                    description: >-
                      A short, human-readable title for the general error type;
                      the title should not change for given types.
                  detail:
                    type: string
                    description: A human-readable description of the specific error.
                  instance:
                    type: string
                    description: >-
                      This optional key may be present, with a unique URI for
                      the specific error; this will often point to an error log
                      for that specific response.
                  request_id:
                    type: string
                    description: Correlation ID for the original request.
                required:
                  - type
                  - status
                additionalProperties: false
              example:
                status: 406
                type: not_acceptable
        '429':
          description: >-
            Too Many Requests. The caller has exceeded their quota for the time
            period and has been throttled.
          headers:
            upvest-request-id:
              required: true
              schema:
                type: string
                format: uuid
                example: 169ae4c7-ebd7-4041-94da-25369653eba7
          content:
            application/problem+json:
              schema:
                title: Error
                type: object
                description: ''
                properties:
                  type:
                    type: string
                    description: URL to a document describing the error condition.
                  status:
                    type: integer
                    description: >-
                      Transmission of the HTTP status code so that all
                      information can be found in one place, but also to correct
                      changes in the status code due to the use of proxy
                      servers.
                  title:
                    type: string
                    description: >-
                      A short, human-readable title for the general error type;
                      the title should not change for given types.
                  detail:
                    type: string
                    description: A human-readable description of the specific error.
                  instance:
                    type: string
                    description: >-
                      This optional key may be present, with a unique URI for
                      the specific error; this will often point to an error log
                      for that specific response.
                  request_id:
                    type: string
                    description: Correlation ID for the original request.
                required:
                  - type
                  - status
                additionalProperties: false
              example:
                status: 429
                type: too_many_requests
        '500':
          description: Internal Server Error. The service encountered an unexpected error.
          headers:
            upvest-request-id:
              required: true
              schema:
                type: string
                format: uuid
                example: 169ae4c7-ebd7-4041-94da-25369653eba7
          content:
            application/problem+json:
              schema:
                title: Error
                type: object
                description: ''
                properties:
                  type:
                    type: string
                    description: URL to a document describing the error condition.
                  status:
                    type: integer
                    description: >-
                      Transmission of the HTTP status code so that all
                      information can be found in one place, but also to correct
                      changes in the status code due to the use of proxy
                      servers.
                  title:
                    type: string
                    description: >-
                      A short, human-readable title for the general error type;
                      the title should not change for given types.
                  detail:
                    type: string
                    description: A human-readable description of the specific error.
                  instance:
                    type: string
                    description: >-
                      This optional key may be present, with a unique URI for
                      the specific error; this will often point to an error log
                      for that specific response.
                  request_id:
                    type: string
                    description: Correlation ID for the original request.
                required:
                  - type
                  - status
                additionalProperties: false
              example:
                status: 500
                type: internal_server_error
        '503':
          description: >-
            Service Unavailable. The service handling for this request cannot be
            reached at this time.
          headers:
            upvest-request-id:
              required: true
              schema:
                type: string
                format: uuid
                example: 169ae4c7-ebd7-4041-94da-25369653eba7
          content:
            application/problem+json:
              schema:
                title: Error
                type: object
                description: ''
                properties:
                  type:
                    type: string
                    description: URL to a document describing the error condition.
                  status:
                    type: integer
                    description: >-
                      Transmission of the HTTP status code so that all
                      information can be found in one place, but also to correct
                      changes in the status code due to the use of proxy
                      servers.
                  title:
                    type: string
                    description: >-
                      A short, human-readable title for the general error type;
                      the title should not change for given types.
                  detail:
                    type: string
                    description: A human-readable description of the specific error.
                  instance:
                    type: string
                    description: >-
                      This optional key may be present, with a unique URI for
                      the specific error; this will often point to an error log
                      for that specific response.
                  request_id:
                    type: string
                    description: Correlation ID for the original request.
                required:
                  - type
                  - status
                additionalProperties: false
              example:
                status: 503
                type: method_not_allowed
        '504':
          description: >-
            Gateway Timeout. The service gateway has reached its internal
            timeout.
          headers:
            upvest-request-id:
              required: true
              schema:
                type: string
                format: uuid
                example: 169ae4c7-ebd7-4041-94da-25369653eba7
          content:
            application/problem+json:
              schema:
                title: Error
                type: object
                description: ''
                properties:
                  type:
                    type: string
                    description: URL to a document describing the error condition.
                  status:
                    type: integer
                    description: >-
                      Transmission of the HTTP status code so that all
                      information can be found in one place, but also to correct
                      changes in the status code due to the use of proxy
                      servers.
                  title:
                    type: string
                    description: >-
                      A short, human-readable title for the general error type;
                      the title should not change for given types.
                  detail:
                    type: string
                    description: A human-readable description of the specific error.
                  instance:
                    type: string
                    description: >-
                      This optional key may be present, with a unique URI for
                      the specific error; this will often point to an error log
                      for that specific response.
                  request_id:
                    type: string
                    description: Correlation ID for the original request.
                required:
                  - type
                  - status
                additionalProperties: false
              example:
                status: 504
                type: gateway_timeout
  /webhooks:
    parameters:
      - name: upvest-client-id
        in: header
        description: Tenant Client ID
        required: true
        schema:
          type: string
          format: uuid
          example: ebabcf4d-61c3-4942-875c-e265a7c2d062
      - name: authorization
        in: header
        description: |
          Bearer (access) token from the OAuth flow with correct scopes.
          https://datatracker.ietf.org/doc/html/rfc6750
        required: true
        schema:
          type: string
          pattern: ^Bearer [a-zA-Z0-9\-\._~+/]*=*
          example: Bearer c2VjcmV0Cg==
      - name: signature
        in: header
        required: true
        schema:
          type: string
        description: >-
          https://tools.ietf.org/id/draft-ietf-httpbis-message-signatures-01.html#name-the-signature-http-header
      - name: signature-input
        in: header
        required: true
        schema:
          type: string
        description: >-
          https://tools.ietf.org/id/draft-ietf-httpbis-message-signatures-01.html#name-the-signature-input-http-he
      - name: upvest-api-version
        in: header
        required: false
        schema:
          type: string
          enum:
            - '1'
          default: '1'
          example: '1'
        description: 'Upvest API version (Note: Do not include quotation marks)'
    get:
      operationId: list_webhooks
      summary: List all webhook subscriptions
      description: Returns a list of all webhook subscriptions.
      tags:
        - Webhook Subscriptions
      security:
        - oauth-client-credentials:
            - webhooks:read
            - webhooks:admin
      parameters:
        - name: sort
          in: query
          required: false
          schema:
            type: string
            enum:
              - created_at
              - updated_at
              - title
              - url
              - enabled
            default: created_at
          description: >-
            Sort the result by `created_at`, `updated_at`, `title`, `url`, or
            `enabled`.
        - name: order
          in: query
          required: false
          schema:
            type: string
            enum:
              - ASC
              - DESC
            default: ASC
          description: >-
            Sort order of the result list if the `sort` parameter is specified.
            Use `ASC` for ascending or `DESC` for descending sort order.
        - name: offset
          in: query
          schema:
            type: integer
            minimum: 0
            format: int32
          allowEmptyValue: true
          description: >-
            Use the `offset` argument to specify where in the list of results to
            start when returning items for a particular query.
        - name: limit
          in: query
          schema:
            type: integer
            format: int32
            default: 100
            minimum: 0
            maximum: 1000
          allowEmptyValue: true
          description: >-
            Use the `limit` argument to specify the maximum number of items
            returned.
      responses:
        '200':
          description: >-
            An object with a data property that contains an array of webhook
            subscription objects.
          headers:
            upvest-request-id:
              required: true
              schema:
                type: string
                format: uuid
                example: 169ae4c7-ebd7-4041-94da-25369653eba7
          content:
            application/json:
              schema:
                title: Webhooks - List - Response
                type: object
                properties:
                  meta:
                    type: object
                    properties:
                      offset:
                        type: integer
                        description: Amount of resource to offset in the response.
                      limit:
                        type: integer
                        description: Total limit of the response.
                      count:
                        type: integer
                        description: Count of the resources returned in the response.
                      total_count:
                        type: integer
                        description: Total count of all the resources.
                      sort:
                        type: string
                        description: The field that the list is sorted by.
                      order:
                        type: string
                        description: |-
                          The ordering of the response.
                          * ASC - Ascending order
                          * DESC - Descending order
                        enum:
                          - ASC
                          - DESC
                    required:
                      - offset
                      - limit
                      - count
                      - total_count
                  data:
                    type: array
                    items:
                      title: Webhook
                      type: object
                      additionalProperties: false
                      properties:
                        id:
                          title: Webhook ID
                          type: string
                          description: Webhook unique identifier.
                          format: uuid
                        created_at:
                          type: string
                          format: date-time
                          description: >-
                            Date and time when the resource was created. [RFC
                            3339-5](https://datatracker.ietf.org/doc/html/rfc3339#section-5.6),
                            [ISO8601
                            UTC](https://www.iso.org/iso-8601-date-and-time-format.html)
                        updated_at:
                          type: string
                          format: date-time
                          description: >-
                            Date and time when the resource was last updated.
                            [RFC
                            3339-5](https://datatracker.ietf.org/doc/html/rfc3339#section-5.6),
                            [ISO8601
                            UTC](https://www.iso.org/iso-8601-date-and-time-format.html)
                        title:
                          type: string
                          pattern: ^[a-zA-Z0-9 ()\[\]{}.-]{1,32}$
                          description: Title of the webhook for use on tenant side.
                        url:
                          type: string
                          format: url
                          maxLength: 1000
                          description: The callback URL to be called by the webhook.
                        enabled:
                          type: boolean
                          description: Enable/disable webhook.
                        type:
                          type: array
                          description: What kind of events to be sent by the webhook.
                          default:
                            - ALL
                          items:
                            type: string
                            enum:
                              - ALL
                              - USER
                              - USER_CHECK
                              - ORDER
                              - ORDER_CANCELLATION
                              - EXECUTION
                              - POSITION
                              - CASH_BALANCE
                              - ACCOUNT
                              - ACCOUNT_GROUP
                              - INSTRUMENT
                              - REPORT
                              - TREASURY_REPORT
                              - DIRECT_DEBIT
                              - WITHDRAWAL
                              - PORTFOLIO
                              - PORTFOLIO_ALLOCATION
                              - PORTFOLIO_ORDER
                              - CORPORATE_ACTION
                              - ACCOUNT_VALUATION
                              - INTRADAY_ACCOUNT_VALUATION
                              - CASH_TRANSACTION
                              - SECURITY_TRANSACTION
                              - ACCOUNT_LIQUIDATION
                              - ACCOUNT_RETURNS
                              - VIRTUAL_CASH_INCREASE
                              - VIRTUAL_CASH_DECREASE
                              - FEE_COLLECTION
                              - SAVINGS_PLAN
                              - SAVINGS_PLAN_EXECUTION
                              - REBALANCING_EXECUTION_ORDER
                              - TAX_EXEMPTION
                              - TAX_COLLECTION
                              - TAX_WRAPPER_ISA
                              - TAX_WRAPPER_ALLOWANCE_ISA
                              - TOPUP
                        config:
                          type: object
                          description: Configuration of webhook packages collection.
                          properties:
                            delay:
                              type: string
                              pattern: ^([1-9]|[12][0-9]|30)s$
                              description: Maximum time of package collection (1s-30s).
                            max_package_size:
                              type: integer
                              minimum: 100
                              maximum: 1048576
                              description: Maximum package size (bytes)
                      required:
                        - id
                        - created_at
                        - updated_at
                        - title
                        - url
                        - enabled
                        - type
                        - config
                required:
                  - meta
                  - data
                additionalProperties: false
              example:
                meta:
                  offset: 0
                  limit: 100
                  count: 1
                  total_count: 1
                  sort: id
                  order: ASC
                data:
                  - id: a8eb3540-5a84-40f9-b2bb-7f99f282fc5a
                    created_at: '2021-07-21T14:10:00.00Z'
                    updated_at: '2021-07-21T14:10:00.00Z'
                    title: User webhook
                    url: https://tenant.tld/webhooks/users
                    type:
                      - USER
                    enabled: false
                    config:
                      delay: 5s
                      max_package_size: 10240
        '400':
          description: Bad Request. The incoming request had a malformed parameter/object.
          headers:
            upvest-request-id:
              required: true
              schema:
                type: string
                format: uuid
                example: 169ae4c7-ebd7-4041-94da-25369653eba7
          content:
            application/problem+json:
              schema:
                title: Error
                type: object
                description: ''
                properties:
                  type:
                    type: string
                    description: URL to a document describing the error condition.
                  status:
                    type: integer
                    description: >-
                      Transmission of the HTTP status code so that all
                      information can be found in one place, but also to correct
                      changes in the status code due to the use of proxy
                      servers.
                  title:
                    type: string
                    description: >-
                      A short, human-readable title for the general error type;
                      the title should not change for given types.
                  detail:
                    type: string
                    description: A human-readable description of the specific error.
                  instance:
                    type: string
                    description: >-
                      This optional key may be present, with a unique URI for
                      the specific error; this will often point to an error log
                      for that specific response.
                  request_id:
                    type: string
                    description: Correlation ID for the original request.
                required:
                  - type
                  - status
                additionalProperties: false
              example:
                status: 400
                type: bad_request
        '401':
          description: Unauthorized. The caller has not been authenticated.
          headers:
            upvest-request-id:
              required: true
              schema:
                type: string
                format: uuid
                example: 169ae4c7-ebd7-4041-94da-25369653eba7
          content:
            application/problem+json:
              schema:
                title: Error
                type: object
                description: ''
                properties:
                  type:
                    type: string
                    description: URL to a document describing the error condition.
                  status:
                    type: integer
                    description: >-
                      Transmission of the HTTP status code so that all
                      information can be found in one place, but also to correct
                      changes in the status code due to the use of proxy
                      servers.
                  title:
                    type: string
                    description: >-
                      A short, human-readable title for the general error type;
                      the title should not change for given types.
                  detail:
                    type: string
                    description: A human-readable description of the specific error.
                  instance:
                    type: string
                    description: >-
                      This optional key may be present, with a unique URI for
                      the specific error; this will often point to an error log
                      for that specific response.
                  request_id:
                    type: string
                    description: Correlation ID for the original request.
                required:
                  - type
                  - status
                additionalProperties: false
              example:
                status: 401
                type: unauthorized
        '403':
          description: >-
            Forbidden. The caller has been authenticated but is not allowed to
            take the requested action.
          headers:
            upvest-request-id:
              required: true
              schema:
                type: string
                format: uuid
                example: 169ae4c7-ebd7-4041-94da-25369653eba7
          content:
            application/problem+json:
              schema:
                title: Error
                type: object
                description: ''
                properties:
                  type:
                    type: string
                    description: URL to a document describing the error condition.
                  status:
                    type: integer
                    description: >-
                      Transmission of the HTTP status code so that all
                      information can be found in one place, but also to correct
                      changes in the status code due to the use of proxy
                      servers.
                  title:
                    type: string
                    description: >-
                      A short, human-readable title for the general error type;
                      the title should not change for given types.
                  detail:
                    type: string
                    description: A human-readable description of the specific error.
                  instance:
                    type: string
                    description: >-
                      This optional key may be present, with a unique URI for
                      the specific error; this will often point to an error log
                      for that specific response.
                  request_id:
                    type: string
                    description: Correlation ID for the original request.
                required:
                  - type
                  - status
                additionalProperties: false
              example:
                status: 403
                type: forbidden
        '406':
          description: >-
            Not Acceptable. The resource does not have a current representation
            that would be acceptable to the user agent. "Accept" header defined
            unsupported value.
          headers:
            upvest-request-id:
              required: true
              schema:
                type: string
                format: uuid
                example: 169ae4c7-ebd7-4041-94da-25369653eba7
          content:
            application/problem+json:
              schema:
                title: Error
                type: object
                description: ''
                properties:
                  type:
                    type: string
                    description: URL to a document describing the error condition.
                  status:
                    type: integer
                    description: >-
                      Transmission of the HTTP status code so that all
                      information can be found in one place, but also to correct
                      changes in the status code due to the use of proxy
                      servers.
                  title:
                    type: string
                    description: >-
                      A short, human-readable title for the general error type;
                      the title should not change for given types.
                  detail:
                    type: string
                    description: A human-readable description of the specific error.
                  instance:
                    type: string
                    description: >-
                      This optional key may be present, with a unique URI for
                      the specific error; this will often point to an error log
                      for that specific response.
                  request_id:
                    type: string
                    description: Correlation ID for the original request.
                required:
                  - type
                  - status
                additionalProperties: false
              example:
                status: 406
                type: not_acceptable
        '429':
          description: >-
            Too Many Requests. The caller has exceeded their quota for the time
            period and has been throttled.
          headers:
            upvest-request-id:
              required: true
              schema:
                type: string
                format: uuid
                example: 169ae4c7-ebd7-4041-94da-25369653eba7
          content:
            application/problem+json:
              schema:
                title: Error
                type: object
                description: ''
                properties:
                  type:
                    type: string
                    description: URL to a document describing the error condition.
                  status:
                    type: integer
                    description: >-
                      Transmission of the HTTP status code so that all
                      information can be found in one place, but also to correct
                      changes in the status code due to the use of proxy
                      servers.
                  title:
                    type: string
                    description: >-
                      A short, human-readable title for the general error type;
                      the title should not change for given types.
                  detail:
                    type: string
                    description: A human-readable description of the specific error.
                  instance:
                    type: string
                    description: >-
                      This optional key may be present, with a unique URI for
                      the specific error; this will often point to an error log
                      for that specific response.
                  request_id:
                    type: string
                    description: Correlation ID for the original request.
                required:
                  - type
                  - status
                additionalProperties: false
              example:
                status: 429
                type: too_many_requests
        '500':
          description: Internal Server Error. The service encountered an unexpected error.
          headers:
            upvest-request-id:
              required: true
              schema:
                type: string
                format: uuid
                example: 169ae4c7-ebd7-4041-94da-25369653eba7
          content:
            application/problem+json:
              schema:
                title: Error
                type: object
                description: ''
                properties:
                  type:
                    type: string
                    description: URL to a document describing the error condition.
                  status:
                    type: integer
                    description: >-
                      Transmission of the HTTP status code so that all
                      information can be found in one place, but also to correct
                      changes in the status code due to the use of proxy
                      servers.
                  title:
                    type: string
                    description: >-
                      A short, human-readable title for the general error type;
                      the title should not change for given types.
                  detail:
                    type: string
                    description: A human-readable description of the specific error.
                  instance:
                    type: string
                    description: >-
                      This optional key may be present, with a unique URI for
                      the specific error; this will often point to an error log
                      for that specific response.
                  request_id:
                    type: string
                    description: Correlation ID for the original request.
                required:
                  - type
                  - status
                additionalProperties: false
              example:
                status: 500
                type: internal_server_error
        '503':
          description: >-
            Service Unavailable. The service handling for this request cannot be
            reached at this time.
          headers:
            upvest-request-id:
              required: true
              schema:
                type: string
                format: uuid
                example: 169ae4c7-ebd7-4041-94da-25369653eba7
          content:
            application/problem+json:
              schema:
                title: Error
                type: object
                description: ''
                properties:
                  type:
                    type: string
                    description: URL to a document describing the error condition.
                  status:
                    type: integer
                    description: >-
                      Transmission of the HTTP status code so that all
                      information can be found in one place, but also to correct
                      changes in the status code due to the use of proxy
                      servers.
                  title:
                    type: string
                    description: >-
                      A short, human-readable title for the general error type;
                      the title should not change for given types.
                  detail:
                    type: string
                    description: A human-readable description of the specific error.
                  instance:
                    type: string
                    description: >-
                      This optional key may be present, with a unique URI for
                      the specific error; this will often point to an error log
                      for that specific response.
                  request_id:
                    type: string
                    description: Correlation ID for the original request.
                required:
                  - type
                  - status
                additionalProperties: false
              example:
                status: 503
                type: method_not_allowed
        '504':
          description: >-
            Gateway Timeout. The service gateway has reached its internal
            timeout.
          headers:
            upvest-request-id:
              required: true
              schema:
                type: string
                format: uuid
                example: 169ae4c7-ebd7-4041-94da-25369653eba7
          content:
            application/problem+json:
              schema:
                title: Error
                type: object
                description: ''
                properties:
                  type:
                    type: string
                    description: URL to a document describing the error condition.
                  status:
                    type: integer
                    description: >-
                      Transmission of the HTTP status code so that all
                      information can be found in one place, but also to correct
                      changes in the status code due to the use of proxy
                      servers.
                  title:
                    type: string
                    description: >-
                      A short, human-readable title for the general error type;
                      the title should not change for given types.
                  detail:
                    type: string
                    description: A human-readable description of the specific error.
                  instance:
                    type: string
                    description: >-
                      This optional key may be present, with a unique URI for
                      the specific error; this will often point to an error log
                      for that specific response.
                  request_id:
                    type: string
                    description: Correlation ID for the original request.
                required:
                  - type
                  - status
                additionalProperties: false
              example:
                status: 504
                type: gateway_timeout
    post:
      operationId: create_webhook
      summary: Create a webhook subscription
      description: Creates a webhook subscription.
      tags:
        - Webhook Subscriptions
      security:
        - oauth-client-credentials:
            - webhooks:admin
      requestBody:
        content:
          application/json:
            schema:
              title: Webhook - Create - Request
              type: object
              properties:
                title:
                  type: string
                  pattern: ^[a-zA-Z0-9 ()\[\]{}.-]{1,32}$
                  description: Title of the webhook for use on tenant side.
                url:
                  type: string
                  format: url
                  maxLength: 1000
                  description: The callback URL to be called by the webhook.
                type:
                  type: array
                  description: What kind of events to be sent by the webhook.
                  default:
                    - ALL
                  items:
                    type: string
                    enum:
                      - ALL
                      - USER
                      - USER_CHECK
                      - ORDER
                      - ORDER_CANCELLATION
                      - EXECUTION
                      - POSITION
                      - CASH_BALANCE
                      - ACCOUNT
                      - ACCOUNT_GROUP
                      - INSTRUMENT
                      - REPORT
                      - TREASURY_REPORT
                      - DIRECT_DEBIT
                      - WITHDRAWAL
                      - PORTFOLIO
                      - PORTFOLIO_ALLOCATION
                      - PORTFOLIO_ORDER
                      - CORPORATE_ACTION
                      - ACCOUNT_VALUATION
                      - INTRADAY_ACCOUNT_VALUATION
                      - CASH_TRANSACTION
                      - SECURITY_TRANSACTION
                      - ACCOUNT_LIQUIDATION
                      - ACCOUNT_RETURNS
                      - VIRTUAL_CASH_INCREASE
                      - VIRTUAL_CASH_DECREASE
                      - FEE_COLLECTION
                      - SAVINGS_PLAN
                      - SAVINGS_PLAN_EXECUTION
                      - REBALANCING_EXECUTION_ORDER
                      - TAX_EXEMPTION
                      - TAX_COLLECTION
                      - TAX_WRAPPER_ISA
                      - TAX_WRAPPER_ALLOWANCE_ISA
                      - TOPUP
                config:
                  type: object
                  description: Configuration of webhook packages collection.
                  properties:
                    delay:
                      type: string
                      pattern: ^([1-9]|[12][0-9]|30)s$
                      description: Maximum time of package collection (1s-30s).
                    max_package_size:
                      type: integer
                      minimum: 100
                      maximum: 1048576
                      description: Maximum package size (bytes)
              required:
                - title
                - url
              additionalProperties: false
            example:
              title: User webhook
              url: https://tenant.tld/webhooks/users
              type:
                - USER
              config:
                delay: 1s
                max_package_size: 51200
      responses:
        '201':
          description: >-
            Returns a webhook subscription object if a valid webhook
            subscription object ID was provided.
          headers:
            upvest-request-id:
              required: true
              schema:
                type: string
                format: uuid
                example: 169ae4c7-ebd7-4041-94da-25369653eba7
          content:
            application/json:
              schema:
                title: Webhook
                type: object
                additionalProperties: false
                properties:
                  id:
                    title: Webhook ID
                    type: string
                    description: Webhook unique identifier.
                    format: uuid
                  created_at:
                    type: string
                    format: date-time
                    description: >-
                      Date and time when the resource was created. [RFC
                      3339-5](https://datatracker.ietf.org/doc/html/rfc3339#section-5.6),
                      [ISO8601
                      UTC](https://www.iso.org/iso-8601-date-and-time-format.html)
                  updated_at:
                    type: string
                    format: date-time
                    description: >-
                      Date and time when the resource was last updated. [RFC
                      3339-5](https://datatracker.ietf.org/doc/html/rfc3339#section-5.6),
                      [ISO8601
                      UTC](https://www.iso.org/iso-8601-date-and-time-format.html)
                  title:
                    type: string
                    pattern: ^[a-zA-Z0-9 ()\[\]{}.-]{1,32}$
                    description: Title of the webhook for use on tenant side.
                  url:
                    type: string
                    format: url
                    maxLength: 1000
                    description: The callback URL to be called by the webhook.
                  enabled:
                    type: boolean
                    description: Enable/disable webhook.
                  type:
                    type: array
                    description: What kind of events to be sent by the webhook.
                    default:
                      - ALL
                    items:
                      type: string
                      enum:
                        - ALL
                        - USER
                        - USER_CHECK
                        - ORDER
                        - ORDER_CANCELLATION
                        - EXECUTION
                        - POSITION
                        - CASH_BALANCE
                        - ACCOUNT
                        - ACCOUNT_GROUP
                        - INSTRUMENT
                        - REPORT
                        - TREASURY_REPORT
                        - DIRECT_DEBIT
                        - WITHDRAWAL
                        - PORTFOLIO
                        - PORTFOLIO_ALLOCATION
                        - PORTFOLIO_ORDER
                        - CORPORATE_ACTION
                        - ACCOUNT_VALUATION
                        - INTRADAY_ACCOUNT_VALUATION
                        - CASH_TRANSACTION
                        - SECURITY_TRANSACTION
                        - ACCOUNT_LIQUIDATION
                        - ACCOUNT_RETURNS
                        - VIRTUAL_CASH_INCREASE
                        - VIRTUAL_CASH_DECREASE
                        - FEE_COLLECTION
                        - SAVINGS_PLAN
                        - SAVINGS_PLAN_EXECUTION
                        - REBALANCING_EXECUTION_ORDER
                        - TAX_EXEMPTION
                        - TAX_COLLECTION
                        - TAX_WRAPPER_ISA
                        - TAX_WRAPPER_ALLOWANCE_ISA
                        - TOPUP
                  config:
                    type: object
                    description: Configuration of webhook packages collection.
                    properties:
                      delay:
                        type: string
                        pattern: ^([1-9]|[12][0-9]|30)s$
                        description: Maximum time of package collection (1s-30s).
                      max_package_size:
                        type: integer
                        minimum: 100
                        maximum: 1048576
                        description: Maximum package size (bytes)
                required:
                  - id
                  - created_at
                  - updated_at
                  - title
                  - url
                  - enabled
                  - type
                  - config
              example:
                id: a8eb3540-5a84-40f9-b2bb-7f99f282fc5a
                created_at: '2021-07-21T14:10:00.00Z'
                updated_at: '2021-07-21T14:10:00.00Z'
                title: User webhook
                url: https://tenant.tld/webhooks/users
                type:
                  - USER
                enabled: false
                config:
                  delay: 5s
                  max_package_size: 10240
        '400':
          description: Bad Request. The incoming request had a malformed parameter/object.
          headers:
            upvest-request-id:
              required: true
              schema:
                type: string
                format: uuid
                example: 169ae4c7-ebd7-4041-94da-25369653eba7
          content:
            application/problem+json:
              schema:
                title: Error
                type: object
                description: ''
                properties:
                  type:
                    type: string
                    description: URL to a document describing the error condition.
                  status:
                    type: integer
                    description: >-
                      Transmission of the HTTP status code so that all
                      information can be found in one place, but also to correct
                      changes in the status code due to the use of proxy
                      servers.
                  title:
                    type: string
                    description: >-
                      A short, human-readable title for the general error type;
                      the title should not change for given types.
                  detail:
                    type: string
                    description: A human-readable description of the specific error.
                  instance:
                    type: string
                    description: >-
                      This optional key may be present, with a unique URI for
                      the specific error; this will often point to an error log
                      for that specific response.
                  request_id:
                    type: string
                    description: Correlation ID for the original request.
                required:
                  - type
                  - status
                additionalProperties: false
              example:
                status: 400
                type: bad_request
        '401':
          description: Unauthorized. The caller has not been authenticated.
          headers:
            upvest-request-id:
              required: true
              schema:
                type: string
                format: uuid
                example: 169ae4c7-ebd7-4041-94da-25369653eba7
          content:
            application/problem+json:
              schema:
                title: Error
                type: object
                description: ''
                properties:
                  type:
                    type: string
                    description: URL to a document describing the error condition.
                  status:
                    type: integer
                    description: >-
                      Transmission of the HTTP status code so that all
                      information can be found in one place, but also to correct
                      changes in the status code due to the use of proxy
                      servers.
                  title:
                    type: string
                    description: >-
                      A short, human-readable title for the general error type;
                      the title should not change for given types.
                  detail:
                    type: string
                    description: A human-readable description of the specific error.
                  instance:
                    type: string
                    description: >-
                      This optional key may be present, with a unique URI for
                      the specific error; this will often point to an error log
                      for that specific response.
                  request_id:
                    type: string
                    description: Correlation ID for the original request.
                required:
                  - type
                  - status
                additionalProperties: false
              example:
                status: 401
                type: unauthorized
        '403':
          description: >-
            Forbidden. The caller has been authenticated but is not allowed to
            take the requested action.
          headers:
            upvest-request-id:
              required: true
              schema:
                type: string
                format: uuid
                example: 169ae4c7-ebd7-4041-94da-25369653eba7
          content:
            application/problem+json:
              schema:
                title: Error
                type: object
                description: ''
                properties:
                  type:
                    type: string
                    description: URL to a document describing the error condition.
                  status:
                    type: integer
                    description: >-
                      Transmission of the HTTP status code so that all
                      information can be found in one place, but also to correct
                      changes in the status code due to the use of proxy
                      servers.
                  title:
                    type: string
                    description: >-
                      A short, human-readable title for the general error type;
                      the title should not change for given types.
                  detail:
                    type: string
                    description: A human-readable description of the specific error.
                  instance:
                    type: string
                    description: >-
                      This optional key may be present, with a unique URI for
                      the specific error; this will often point to an error log
                      for that specific response.
                  request_id:
                    type: string
                    description: Correlation ID for the original request.
                required:
                  - type
                  - status
                additionalProperties: false
              example:
                status: 403
                type: forbidden
        '406':
          description: >-
            Not Acceptable. The resource does not have a current representation
            that would be acceptable to the user agent. "Accept" header defined
            unsupported value.
          headers:
            upvest-request-id:
              required: true
              schema:
                type: string
                format: uuid
                example: 169ae4c7-ebd7-4041-94da-25369653eba7
          content:
            application/problem+json:
              schema:
                title: Error
                type: object
                description: ''
                properties:
                  type:
                    type: string
                    description: URL to a document describing the error condition.
                  status:
                    type: integer
                    description: >-
                      Transmission of the HTTP status code so that all
                      information can be found in one place, but also to correct
                      changes in the status code due to the use of proxy
                      servers.
                  title:
                    type: string
                    description: >-
                      A short, human-readable title for the general error type;
                      the title should not change for given types.
                  detail:
                    type: string
                    description: A human-readable description of the specific error.
                  instance:
                    type: string
                    description: >-
                      This optional key may be present, with a unique URI for
                      the specific error; this will often point to an error log
                      for that specific response.
                  request_id:
                    type: string
                    description: Correlation ID for the original request.
                required:
                  - type
                  - status
                additionalProperties: false
              example:
                status: 406
                type: not_acceptable
        '429':
          description: >-
            Too Many Requests. The caller has exceeded their quota for the time
            period and has been throttled.
          headers:
            upvest-request-id:
              required: true
              schema:
                type: string
                format: uuid
                example: 169ae4c7-ebd7-4041-94da-25369653eba7
          content:
            application/problem+json:
              schema:
                title: Error
                type: object
                description: ''
                properties:
                  type:
                    type: string
                    description: URL to a document describing the error condition.
                  status:
                    type: integer
                    description: >-
                      Transmission of the HTTP status code so that all
                      information can be found in one place, but also to correct
                      changes in the status code due to the use of proxy
                      servers.
                  title:
                    type: string
                    description: >-
                      A short, human-readable title for the general error type;
                      the title should not change for given types.
                  detail:
                    type: string
                    description: A human-readable description of the specific error.
                  instance:
                    type: string
                    description: >-
                      This optional key may be present, with a unique URI for
                      the specific error; this will often point to an error log
                      for that specific response.
                  request_id:
                    type: string
                    description: Correlation ID for the original request.
                required:
                  - type
                  - status
                additionalProperties: false
              example:
                status: 429
                type: too_many_requests
        '500':
          description: Internal Server Error. The service encountered an unexpected error.
          headers:
            upvest-request-id:
              required: true
              schema:
                type: string
                format: uuid
                example: 169ae4c7-ebd7-4041-94da-25369653eba7
          content:
            application/problem+json:
              schema:
                title: Error
                type: object
                description: ''
                properties:
                  type:
                    type: string
                    description: URL to a document describing the error condition.
                  status:
                    type: integer
                    description: >-
                      Transmission of the HTTP status code so that all
                      information can be found in one place, but also to correct
                      changes in the status code due to the use of proxy
                      servers.
                  title:
                    type: string
                    description: >-
                      A short, human-readable title for the general error type;
                      the title should not change for given types.
                  detail:
                    type: string
                    description: A human-readable description of the specific error.
                  instance:
                    type: string
                    description: >-
                      This optional key may be present, with a unique URI for
                      the specific error; this will often point to an error log
                      for that specific response.
                  request_id:
                    type: string
                    description: Correlation ID for the original request.
                required:
                  - type
                  - status
                additionalProperties: false
              example:
                status: 500
                type: internal_server_error
        '503':
          description: >-
            Service Unavailable. The service handling for this request cannot be
            reached at this time.
          headers:
            upvest-request-id:
              required: true
              schema:
                type: string
                format: uuid
                example: 169ae4c7-ebd7-4041-94da-25369653eba7
          content:
            application/problem+json:
              schema:
                title: Error
                type: object
                description: ''
                properties:
                  type:
                    type: string
                    description: URL to a document describing the error condition.
                  status:
                    type: integer
                    description: >-
                      Transmission of the HTTP status code so that all
                      information can be found in one place, but also to correct
                      changes in the status code due to the use of proxy
                      servers.
                  title:
                    type: string
                    description: >-
                      A short, human-readable title for the general error type;
                      the title should not change for given types.
                  detail:
                    type: string
                    description: A human-readable description of the specific error.
                  instance:
                    type: string
                    description: >-
                      This optional key may be present, with a unique URI for
                      the specific error; this will often point to an error log
                      for that specific response.
                  request_id:
                    type: string
                    description: Correlation ID for the original request.
                required:
                  - type
                  - status
                additionalProperties: false
              example:
                status: 503
                type: method_not_allowed
        '504':
          description: >-
            Gateway Timeout. The service gateway has reached its internal
            timeout.
          headers:
            upvest-request-id:
              required: true
              schema:
                type: string
                format: uuid
                example: 169ae4c7-ebd7-4041-94da-25369653eba7
          content:
            application/problem+json:
              schema:
                title: Error
                type: object
                description: ''
                properties:
                  type:
                    type: string
                    description: URL to a document describing the error condition.
                  status:
                    type: integer
                    description: >-
                      Transmission of the HTTP status code so that all
                      information can be found in one place, but also to correct
                      changes in the status code due to the use of proxy
                      servers.
                  title:
                    type: string
                    description: >-
                      A short, human-readable title for the general error type;
                      the title should not change for given types.
                  detail:
                    type: string
                    description: A human-readable description of the specific error.
                  instance:
                    type: string
                    description: >-
                      This optional key may be present, with a unique URI for
                      the specific error; this will often point to an error log
                      for that specific response.
                  request_id:
                    type: string
                    description: Correlation ID for the original request.
                required:
                  - type
                  - status
                additionalProperties: false
              example:
                status: 504
                type: gateway_timeout
  /webhooks/{webhook_id}:
    parameters:
      - name: webhook_id
        in: path
        description: Webhook identifier
        required: true
        schema:
          title: Webhook ID
          type: string
          description: Webhook unique identifier.
          format: uuid
      - name: upvest-client-id
        in: header
        description: Tenant Client ID
        required: true
        schema:
          type: string
          format: uuid
          example: ebabcf4d-61c3-4942-875c-e265a7c2d062
      - name: authorization
        in: header
        description: |
          Bearer (access) token from the OAuth flow with correct scopes.
          https://datatracker.ietf.org/doc/html/rfc6750
        required: true
        schema:
          type: string
          pattern: ^Bearer [a-zA-Z0-9\-\._~+/]*=*
          example: Bearer c2VjcmV0Cg==
      - name: signature
        in: header
        required: true
        schema:
          type: string
        description: >-
          https://tools.ietf.org/id/draft-ietf-httpbis-message-signatures-01.html#name-the-signature-http-header
      - name: signature-input
        in: header
        required: true
        schema:
          type: string
        description: >-
          https://tools.ietf.org/id/draft-ietf-httpbis-message-signatures-01.html#name-the-signature-input-http-he
      - name: upvest-api-version
        in: header
        required: false
        schema:
          type: string
          enum:
            - '1'
          default: '1'
          example: '1'
        description: 'Upvest API version (Note: Do not include quotation marks)'
    get:
      operationId: retrieve_webhook
      summary: Retrieve a webhook subscription
      description: Returns a webhook subscription specified by its ID.
      tags:
        - Webhook Subscriptions
      security:
        - oauth-client-credentials:
            - webhooks:read
            - webhooks:admin
      responses:
        '200':
          description: >-
            Returns a webhook subscription object if a valid webhook
            subscription object ID was provided.
          headers:
            upvest-request-id:
              required: true
              schema:
                type: string
                format: uuid
                example: 169ae4c7-ebd7-4041-94da-25369653eba7
          content:
            application/json:
              schema:
                title: Webhook
                type: object
                additionalProperties: false
                properties:
                  id:
                    title: Webhook ID
                    type: string
                    description: Webhook unique identifier.
                    format: uuid
                  created_at:
                    type: string
                    format: date-time
                    description: >-
                      Date and time when the resource was created. [RFC
                      3339-5](https://datatracker.ietf.org/doc/html/rfc3339#section-5.6),
                      [ISO8601
                      UTC](https://www.iso.org/iso-8601-date-and-time-format.html)
                  updated_at:
                    type: string
                    format: date-time
                    description: >-
                      Date and time when the resource was last updated. [RFC
                      3339-5](https://datatracker.ietf.org/doc/html/rfc3339#section-5.6),
                      [ISO8601
                      UTC](https://www.iso.org/iso-8601-date-and-time-format.html)
                  title:
                    type: string
                    pattern: ^[a-zA-Z0-9 ()\[\]{}.-]{1,32}$
                    description: Title of the webhook for use on tenant side.
                  url:
                    type: string
                    format: url
                    maxLength: 1000
                    description: The callback URL to be called by the webhook.
                  enabled:
                    type: boolean
                    description: Enable/disable webhook.
                  type:
                    type: array
                    description: What kind of events to be sent by the webhook.
                    default:
                      - ALL
                    items:
                      type: string
                      enum:
                        - ALL
                        - USER
                        - USER_CHECK
                        - ORDER
                        - ORDER_CANCELLATION
                        - EXECUTION
                        - POSITION
                        - CASH_BALANCE
                        - ACCOUNT
                        - ACCOUNT_GROUP
                        - INSTRUMENT
                        - REPORT
                        - TREASURY_REPORT
                        - DIRECT_DEBIT
                        - WITHDRAWAL
                        - PORTFOLIO
                        - PORTFOLIO_ALLOCATION
                        - PORTFOLIO_ORDER
                        - CORPORATE_ACTION
                        - ACCOUNT_VALUATION
                        - INTRADAY_ACCOUNT_VALUATION
                        - CASH_TRANSACTION
                        - SECURITY_TRANSACTION
                        - ACCOUNT_LIQUIDATION
                        - ACCOUNT_RETURNS
                        - VIRTUAL_CASH_INCREASE
                        - VIRTUAL_CASH_DECREASE
                        - FEE_COLLECTION
                        - SAVINGS_PLAN
                        - SAVINGS_PLAN_EXECUTION
                        - REBALANCING_EXECUTION_ORDER
                        - TAX_EXEMPTION
                        - TAX_COLLECTION
                        - TAX_WRAPPER_ISA
                        - TAX_WRAPPER_ALLOWANCE_ISA
                        - TOPUP
                  config:
                    type: object
                    description: Configuration of webhook packages collection.
                    properties:
                      delay:
                        type: string
                        pattern: ^([1-9]|[12][0-9]|30)s$
                        description: Maximum time of package collection (1s-30s).
                      max_package_size:
                        type: integer
                        minimum: 100
                        maximum: 1048576
                        description: Maximum package size (bytes)
                required:
                  - id
                  - created_at
                  - updated_at
                  - title
                  - url
                  - enabled
                  - type
                  - config
              example:
                id: a8eb3540-5a84-40f9-b2bb-7f99f282fc5a
                created_at: '2021-07-21T14:10:00.00Z'
                updated_at: '2021-07-21T14:10:00.00Z'
                title: User webhook
                url: https://tenant.tld/webhooks/users
                type:
                  - USER
                enabled: true
                config:
                  delay: 5s
                  max_package_size: 1024
        '401':
          description: Unauthorized. The caller has not been authenticated.
          headers:
            upvest-request-id:
              required: true
              schema:
                type: string
                format: uuid
                example: 169ae4c7-ebd7-4041-94da-25369653eba7
          content:
            application/problem+json:
              schema:
                title: Error
                type: object
                description: ''
                properties:
                  type:
                    type: string
                    description: URL to a document describing the error condition.
                  status:
                    type: integer
                    description: >-
                      Transmission of the HTTP status code so that all
                      information can be found in one place, but also to correct
                      changes in the status code due to the use of proxy
                      servers.
                  title:
                    type: string
                    description: >-
                      A short, human-readable title for the general error type;
                      the title should not change for given types.
                  detail:
                    type: string
                    description: A human-readable description of the specific error.
                  instance:
                    type: string
                    description: >-
                      This optional key may be present, with a unique URI for
                      the specific error; this will often point to an error log
                      for that specific response.
                  request_id:
                    type: string
                    description: Correlation ID for the original request.
                required:
                  - type
                  - status
                additionalProperties: false
              example:
                status: 401
                type: unauthorized
        '403':
          description: >-
            Forbidden. The caller has been authenticated but is not allowed to
            take the requested action.
          headers:
            upvest-request-id:
              required: true
              schema:
                type: string
                format: uuid
                example: 169ae4c7-ebd7-4041-94da-25369653eba7
          content:
            application/problem+json:
              schema:
                title: Error
                type: object
                description: ''
                properties:
                  type:
                    type: string
                    description: URL to a document describing the error condition.
                  status:
                    type: integer
                    description: >-
                      Transmission of the HTTP status code so that all
                      information can be found in one place, but also to correct
                      changes in the status code due to the use of proxy
                      servers.
                  title:
                    type: string
                    description: >-
                      A short, human-readable title for the general error type;
                      the title should not change for given types.
                  detail:
                    type: string
                    description: A human-readable description of the specific error.
                  instance:
                    type: string
                    description: >-
                      This optional key may be present, with a unique URI for
                      the specific error; this will often point to an error log
                      for that specific response.
                  request_id:
                    type: string
                    description: Correlation ID for the original request.
                required:
                  - type
                  - status
                additionalProperties: false
              example:
                status: 403
                type: forbidden
        '404':
          description: Not Found. The requested resource could not be found.
          headers:
            upvest-request-id:
              required: true
              schema:
                type: string
                format: uuid
                example: 169ae4c7-ebd7-4041-94da-25369653eba7
          content:
            application/problem+json:
              schema:
                title: Error
                type: object
                description: ''
                properties:
                  type:
                    type: string
                    description: URL to a document describing the error condition.
                  status:
                    type: integer
                    description: >-
                      Transmission of the HTTP status code so that all
                      information can be found in one place, but also to correct
                      changes in the status code due to the use of proxy
                      servers.
                  title:
                    type: string
                    description: >-
                      A short, human-readable title for the general error type;
                      the title should not change for given types.
                  detail:
                    type: string
                    description: A human-readable description of the specific error.
                  instance:
                    type: string
                    description: >-
                      This optional key may be present, with a unique URI for
                      the specific error; this will often point to an error log
                      for that specific response.
                  request_id:
                    type: string
                    description: Correlation ID for the original request.
                required:
                  - type
                  - status
                additionalProperties: false
              example:
                status: 404
                type: not_found
        '406':
          description: >-
            Not Acceptable. The resource does not have a current representation
            that would be acceptable to the user agent. "Accept" header defined
            unsupported value.
          headers:
            upvest-request-id:
              required: true
              schema:
                type: string
                format: uuid
                example: 169ae4c7-ebd7-4041-94da-25369653eba7
          content:
            application/problem+json:
              schema:
                title: Error
                type: object
                description: ''
                properties:
                  type:
                    type: string
                    description: URL to a document describing the error condition.
                  status:
                    type: integer
                    description: >-
                      Transmission of the HTTP status code so that all
                      information can be found in one place, but also to correct
                      changes in the status code due to the use of proxy
                      servers.
                  title:
                    type: string
                    description: >-
                      A short, human-readable title for the general error type;
                      the title should not change for given types.
                  detail:
                    type: string
                    description: A human-readable description of the specific error.
                  instance:
                    type: string
                    description: >-
                      This optional key may be present, with a unique URI for
                      the specific error; this will often point to an error log
                      for that specific response.
                  request_id:
                    type: string
                    description: Correlation ID for the original request.
                required:
                  - type
                  - status
                additionalProperties: false
              example:
                status: 406
                type: not_acceptable
        '429':
          description: >-
            Too Many Requests. The caller has exceeded their quota for the time
            period and has been throttled.
          headers:
            upvest-request-id:
              required: true
              schema:
                type: string
                format: uuid
                example: 169ae4c7-ebd7-4041-94da-25369653eba7
          content:
            application/problem+json:
              schema:
                title: Error
                type: object
                description: ''
                properties:
                  type:
                    type: string
                    description: URL to a document describing the error condition.
                  status:
                    type: integer
                    description: >-
                      Transmission of the HTTP status code so that all
                      information can be found in one place, but also to correct
                      changes in the status code due to the use of proxy
                      servers.
                  title:
                    type: string
                    description: >-
                      A short, human-readable title for the general error type;
                      the title should not change for given types.
                  detail:
                    type: string
                    description: A human-readable description of the specific error.
                  instance:
                    type: string
                    description: >-
                      This optional key may be present, with a unique URI for
                      the specific error; this will often point to an error log
                      for that specific response.
                  request_id:
                    type: string
                    description: Correlation ID for the original request.
                required:
                  - type
                  - status
                additionalProperties: false
              example:
                status: 429
                type: too_many_requests
        '500':
          description: Internal Server Error. The service encountered an unexpected error.
          headers:
            upvest-request-id:
              required: true
              schema:
                type: string
                format: uuid
                example: 169ae4c7-ebd7-4041-94da-25369653eba7
          content:
            application/problem+json:
              schema:
                title: Error
                type: object
                description: ''
                properties:
                  type:
                    type: string
                    description: URL to a document describing the error condition.
                  status:
                    type: integer
                    description: >-
                      Transmission of the HTTP status code so that all
                      information can be found in one place, but also to correct
                      changes in the status code due to the use of proxy
                      servers.
                  title:
                    type: string
                    description: >-
                      A short, human-readable title for the general error type;
                      the title should not change for given types.
                  detail:
                    type: string
                    description: A human-readable description of the specific error.
                  instance:
                    type: string
                    description: >-
                      This optional key may be present, with a unique URI for
                      the specific error; this will often point to an error log
                      for that specific response.
                  request_id:
                    type: string
                    description: Correlation ID for the original request.
                required:
                  - type
                  - status
                additionalProperties: false
              example:
                status: 500
                type: internal_server_error
        '503':
          description: >-
            Service Unavailable. The service handling for this request cannot be
            reached at this time.
          headers:
            upvest-request-id:
              required: true
              schema:
                type: string
                format: uuid
                example: 169ae4c7-ebd7-4041-94da-25369653eba7
          content:
            application/problem+json:
              schema:
                title: Error
                type: object
                description: ''
                properties:
                  type:
                    type: string
                    description: URL to a document describing the error condition.
                  status:
                    type: integer
                    description: >-
                      Transmission of the HTTP status code so that all
                      information can be found in one place, but also to correct
                      changes in the status code due to the use of proxy
                      servers.
                  title:
                    type: string
                    description: >-
                      A short, human-readable title for the general error type;
                      the title should not change for given types.
                  detail:
                    type: string
                    description: A human-readable description of the specific error.
                  instance:
                    type: string
                    description: >-
                      This optional key may be present, with a unique URI for
                      the specific error; this will often point to an error log
                      for that specific response.
                  request_id:
                    type: string
                    description: Correlation ID for the original request.
                required:
                  - type
                  - status
                additionalProperties: false
              example:
                status: 503
                type: method_not_allowed
        '504':
          description: >-
            Gateway Timeout. The service gateway has reached its internal
            timeout.
          headers:
            upvest-request-id:
              required: true
              schema:
                type: string
                format: uuid
                example: 169ae4c7-ebd7-4041-94da-25369653eba7
          content:
            application/problem+json:
              schema:
                title: Error
                type: object
                description: ''
                properties:
                  type:
                    type: string
                    description: URL to a document describing the error condition.
                  status:
                    type: integer
                    description: >-
                      Transmission of the HTTP status code so that all
                      information can be found in one place, but also to correct
                      changes in the status code due to the use of proxy
                      servers.
                  title:
                    type: string
                    description: >-
                      A short, human-readable title for the general error type;
                      the title should not change for given types.
                  detail:
                    type: string
                    description: A human-readable description of the specific error.
                  instance:
                    type: string
                    description: >-
                      This optional key may be present, with a unique URI for
                      the specific error; this will often point to an error log
                      for that specific response.
                  request_id:
                    type: string
                    description: Correlation ID for the original request.
                required:
                  - type
                  - status
                additionalProperties: false
              example:
                status: 504
                type: gateway_timeout
    delete:
      operationId: delete_webhook
      summary: Delete a webhook subscription
      description: Deletes a webhook subscription specified by its ID.
      tags:
        - Webhook Subscriptions
      security:
        - oauth-client-credentials:
            - webhooks:admin
      responses:
        '204':
          description: Request has been processed successfully.
          headers:
            upvest-request-id:
              required: true
              schema:
                type: string
                format: uuid
                example: 169ae4c7-ebd7-4041-94da-25369653eba7
        '401':
          description: Unauthorized. The caller has not been authenticated.
          headers:
            upvest-request-id:
              required: true
              schema:
                type: string
                format: uuid
                example: 169ae4c7-ebd7-4041-94da-25369653eba7
          content:
            application/problem+json:
              schema:
                title: Error
                type: object
                description: ''
                properties:
                  type:
                    type: string
                    description: URL to a document describing the error condition.
                  status:
                    type: integer
                    description: >-
                      Transmission of the HTTP status code so that all
                      information can be found in one place, but also to correct
                      changes in the status code due to the use of proxy
                      servers.
                  title:
                    type: string
                    description: >-
                      A short, human-readable title for the general error type;
                      the title should not change for given types.
                  detail:
                    type: string
                    description: A human-readable description of the specific error.
                  instance:
                    type: string
                    description: >-
                      This optional key may be present, with a unique URI for
                      the specific error; this will often point to an error log
                      for that specific response.
                  request_id:
                    type: string
                    description: Correlation ID for the original request.
                required:
                  - type
                  - status
                additionalProperties: false
              example:
                status: 401
                type: unauthorized
        '403':
          description: >-
            Forbidden. The caller has been authenticated but is not allowed to
            take the requested action.
          headers:
            upvest-request-id:
              required: true
              schema:
                type: string
                format: uuid
                example: 169ae4c7-ebd7-4041-94da-25369653eba7
          content:
            application/problem+json:
              schema:
                title: Error
                type: object
                description: ''
                properties:
                  type:
                    type: string
                    description: URL to a document describing the error condition.
                  status:
                    type: integer
                    description: >-
                      Transmission of the HTTP status code so that all
                      information can be found in one place, but also to correct
                      changes in the status code due to the use of proxy
                      servers.
                  title:
                    type: string
                    description: >-
                      A short, human-readable title for the general error type;
                      the title should not change for given types.
                  detail:
                    type: string
                    description: A human-readable description of the specific error.
                  instance:
                    type: string
                    description: >-
                      This optional key may be present, with a unique URI for
                      the specific error; this will often point to an error log
                      for that specific response.
                  request_id:
                    type: string
                    description: Correlation ID for the original request.
                required:
                  - type
                  - status
                additionalProperties: false
              example:
                status: 403
                type: forbidden
        '404':
          description: Not Found. The requested resource could not be found.
          headers:
            upvest-request-id:
              required: true
              schema:
                type: string
                format: uuid
                example: 169ae4c7-ebd7-4041-94da-25369653eba7
          content:
            application/problem+json:
              schema:
                title: Error
                type: object
                description: ''
                properties:
                  type:
                    type: string
                    description: URL to a document describing the error condition.
                  status:
                    type: integer
                    description: >-
                      Transmission of the HTTP status code so that all
                      information can be found in one place, but also to correct
                      changes in the status code due to the use of proxy
                      servers.
                  title:
                    type: string
                    description: >-
                      A short, human-readable title for the general error type;
                      the title should not change for given types.
                  detail:
                    type: string
                    description: A human-readable description of the specific error.
                  instance:
                    type: string
                    description: >-
                      This optional key may be present, with a unique URI for
                      the specific error; this will often point to an error log
                      for that specific response.
                  request_id:
                    type: string
                    description: Correlation ID for the original request.
                required:
                  - type
                  - status
                additionalProperties: false
              example:
                status: 404
                type: not_found
        '429':
          description: >-
            Too Many Requests. The caller has exceeded their quota for the time
            period and has been throttled.
          headers:
            upvest-request-id:
              required: true
              schema:
                type: string
                format: uuid
                example: 169ae4c7-ebd7-4041-94da-25369653eba7
          content:
            application/problem+json:
              schema:
                title: Error
                type: object
                description: ''
                properties:
                  type:
                    type: string
                    description: URL to a document describing the error condition.
                  status:
                    type: integer
                    description: >-
                      Transmission of the HTTP status code so that all
                      information can be found in one place, but also to correct
                      changes in the status code due to the use of proxy
                      servers.
                  title:
                    type: string
                    description: >-
                      A short, human-readable title for the general error type;
                      the title should not change for given types.
                  detail:
                    type: string
                    description: A human-readable description of the specific error.
                  instance:
                    type: string
                    description: >-
                      This optional key may be present, with a unique URI for
                      the specific error; this will often point to an error log
                      for that specific response.
                  request_id:
                    type: string
                    description: Correlation ID for the original request.
                required:
                  - type
                  - status
                additionalProperties: false
              example:
                status: 429
                type: too_many_requests
        '500':
          description: Internal Server Error. The service encountered an unexpected error.
          headers:
            upvest-request-id:
              required: true
              schema:
                type: string
                format: uuid
                example: 169ae4c7-ebd7-4041-94da-25369653eba7
          content:
            application/problem+json:
              schema:
                title: Error
                type: object
                description: ''
                properties:
                  type:
                    type: string
                    description: URL to a document describing the error condition.
                  status:
                    type: integer
                    description: >-
                      Transmission of the HTTP status code so that all
                      information can be found in one place, but also to correct
                      changes in the status code due to the use of proxy
                      servers.
                  title:
                    type: string
                    description: >-
                      A short, human-readable title for the general error type;
                      the title should not change for given types.
                  detail:
                    type: string
                    description: A human-readable description of the specific error.
                  instance:
                    type: string
                    description: >-
                      This optional key may be present, with a unique URI for
                      the specific error; this will often point to an error log
                      for that specific response.
                  request_id:
                    type: string
                    description: Correlation ID for the original request.
                required:
                  - type
                  - status
                additionalProperties: false
              example:
                status: 500
                type: internal_server_error
        '503':
          description: >-
            Service Unavailable. The service handling for this request cannot be
            reached at this time.
          headers:
            upvest-request-id:
              required: true
              schema:
                type: string
                format: uuid
                example: 169ae4c7-ebd7-4041-94da-25369653eba7
          content:
            application/problem+json:
              schema:
                title: Error
                type: object
                description: ''
                properties:
                  type:
                    type: string
                    description: URL to a document describing the error condition.
                  status:
                    type: integer
                    description: >-
                      Transmission of the HTTP status code so that all
                      information can be found in one place, but also to correct
                      changes in the status code due to the use of proxy
                      servers.
                  title:
                    type: string
                    description: >-
                      A short, human-readable title for the general error type;
                      the title should not change for given types.
                  detail:
                    type: string
                    description: A human-readable description of the specific error.
                  instance:
                    type: string
                    description: >-
                      This optional key may be present, with a unique URI for
                      the specific error; this will often point to an error log
                      for that specific response.
                  request_id:
                    type: string
                    description: Correlation ID for the original request.
                required:
                  - type
                  - status
                additionalProperties: false
              example:
                status: 503
                type: method_not_allowed
        '504':
          description: >-
            Gateway Timeout. The service gateway has reached its internal
            timeout.
          headers:
            upvest-request-id:
              required: true
              schema:
                type: string
                format: uuid
                example: 169ae4c7-ebd7-4041-94da-25369653eba7
          content:
            application/problem+json:
              schema:
                title: Error
                type: object
                description: ''
                properties:
                  type:
                    type: string
                    description: URL to a document describing the error condition.
                  status:
                    type: integer
                    description: >-
                      Transmission of the HTTP status code so that all
                      information can be found in one place, but also to correct
                      changes in the status code due to the use of proxy
                      servers.
                  title:
                    type: string
                    description: >-
                      A short, human-readable title for the general error type;
                      the title should not change for given types.
                  detail:
                    type: string
                    description: A human-readable description of the specific error.
                  instance:
                    type: string
                    description: >-
                      This optional key may be present, with a unique URI for
                      the specific error; this will often point to an error log
                      for that specific response.
                  request_id:
                    type: string
                    description: Correlation ID for the original request.
                required:
                  - type
                  - status
                additionalProperties: false
              example:
                status: 504
                type: gateway_timeout
    patch:
      operationId: update_webhook
      summary: Update a webhook subscription
      description: Updates a webhook subscription specified by its ID.
      tags:
        - Webhook Subscriptions
      security:
        - oauth-client-credentials:
            - webhooks:admin
      requestBody:
        content:
          application/json:
            schema:
              title: Webhook - Update - Request
              type: object
              properties:
                title:
                  type: string
                  pattern: ^[a-zA-Z0-9 ()\[\]{}.-]{1,32}$
                  description: Title of the webhook for use on tenant side.
                url:
                  type: string
                  format: url
                  maxLength: 1000
                  description: The callback URL to be called by the webhook.
                enabled:
                  type: boolean
                  description: Enable/disable webhook.
                type:
                  type: array
                  description: What kind of events to be sent by the webhook.
                  default:
                    - ALL
                  items:
                    type: string
                    enum:
                      - ALL
                      - USER
                      - USER_CHECK
                      - ORDER
                      - ORDER_CANCELLATION
                      - EXECUTION
                      - POSITION
                      - CASH_BALANCE
                      - ACCOUNT
                      - ACCOUNT_GROUP
                      - INSTRUMENT
                      - REPORT
                      - TREASURY_REPORT
                      - DIRECT_DEBIT
                      - WITHDRAWAL
                      - PORTFOLIO
                      - PORTFOLIO_ALLOCATION
                      - PORTFOLIO_ORDER
                      - CORPORATE_ACTION
                      - ACCOUNT_VALUATION
                      - INTRADAY_ACCOUNT_VALUATION
                      - CASH_TRANSACTION
                      - SECURITY_TRANSACTION
                      - ACCOUNT_LIQUIDATION
                      - ACCOUNT_RETURNS
                      - VIRTUAL_CASH_INCREASE
                      - VIRTUAL_CASH_DECREASE
                      - FEE_COLLECTION
                      - SAVINGS_PLAN
                      - SAVINGS_PLAN_EXECUTION
                      - REBALANCING_EXECUTION_ORDER
                      - TAX_EXEMPTION
                      - TAX_COLLECTION
                      - TAX_WRAPPER_ISA
                      - TAX_WRAPPER_ALLOWANCE_ISA
                      - TOPUP
                config:
                  type: object
                  description: Configuration of webhook packages collection.
                  properties:
                    delay:
                      type: string
                      pattern: ^([1-9]|[12][0-9]|30)s$
                      description: Maximum time of package collection (1s-30s).
                    max_package_size:
                      type: integer
                      minimum: 100
                      maximum: 1048576
                      description: Maximum package size (bytes)
              additionalProperties: false
            example:
              url: https://tenant.tld/webhooks/users
              type:
                - USER
      responses:
        '200':
          description: >-
            Returns a webhook subscription object if a valid webhook
            subscription object ID was provided.
          headers:
            upvest-request-id:
              required: true
              schema:
                type: string
                format: uuid
                example: 169ae4c7-ebd7-4041-94da-25369653eba7
          content:
            application/json:
              schema:
                title: Webhook
                type: object
                additionalProperties: false
                properties:
                  id:
                    title: Webhook ID
                    type: string
                    description: Webhook unique identifier.
                    format: uuid
                  created_at:
                    type: string
                    format: date-time
                    description: >-
                      Date and time when the resource was created. [RFC
                      3339-5](https://datatracker.ietf.org/doc/html/rfc3339#section-5.6),
                      [ISO8601
                      UTC](https://www.iso.org/iso-8601-date-and-time-format.html)
                  updated_at:
                    type: string
                    format: date-time
                    description: >-
                      Date and time when the resource was last updated. [RFC
                      3339-5](https://datatracker.ietf.org/doc/html/rfc3339#section-5.6),
                      [ISO8601
                      UTC](https://www.iso.org/iso-8601-date-and-time-format.html)
                  title:
                    type: string
                    pattern: ^[a-zA-Z0-9 ()\[\]{}.-]{1,32}$
                    description: Title of the webhook for use on tenant side.
                  url:
                    type: string
                    format: url
                    maxLength: 1000
                    description: The callback URL to be called by the webhook.
                  enabled:
                    type: boolean
                    description: Enable/disable webhook.
                  type:
                    type: array
                    description: What kind of events to be sent by the webhook.
                    default:
                      - ALL
                    items:
                      type: string
                      enum:
                        - ALL
                        - USER
                        - USER_CHECK
                        - ORDER
                        - ORDER_CANCELLATION
                        - EXECUTION
                        - POSITION
                        - CASH_BALANCE
                        - ACCOUNT
                        - ACCOUNT_GROUP
                        - INSTRUMENT
                        - REPORT
                        - TREASURY_REPORT
                        - DIRECT_DEBIT
                        - WITHDRAWAL
                        - PORTFOLIO
                        - PORTFOLIO_ALLOCATION
                        - PORTFOLIO_ORDER
                        - CORPORATE_ACTION
                        - ACCOUNT_VALUATION
                        - INTRADAY_ACCOUNT_VALUATION
                        - CASH_TRANSACTION
                        - SECURITY_TRANSACTION
                        - ACCOUNT_LIQUIDATION
                        - ACCOUNT_RETURNS
                        - VIRTUAL_CASH_INCREASE
                        - VIRTUAL_CASH_DECREASE
                        - FEE_COLLECTION
                        - SAVINGS_PLAN
                        - SAVINGS_PLAN_EXECUTION
                        - REBALANCING_EXECUTION_ORDER
                        - TAX_EXEMPTION
                        - TAX_COLLECTION
                        - TAX_WRAPPER_ISA
                        - TAX_WRAPPER_ALLOWANCE_ISA
                        - TOPUP
                  config:
                    type: object
                    description: Configuration of webhook packages collection.
                    properties:
                      delay:
                        type: string
                        pattern: ^([1-9]|[12][0-9]|30)s$
                        description: Maximum time of package collection (1s-30s).
                      max_package_size:
                        type: integer
                        minimum: 100
                        maximum: 1048576
                        description: Maximum package size (bytes)
                required:
                  - id
                  - created_at
                  - updated_at
                  - title
                  - url
                  - enabled
                  - type
                  - config
              example:
                id: a8eb3540-5a84-40f9-b2bb-7f99f282fc5a
                created_at: '2021-07-21T14:10:00.00Z'
                updated_at: '2021-07-21T14:10:00.00Z'
                title: User webhook
                url: https://tenant.tld/webhooks/users
                type:
                  - USER
                enabled: true
                config:
                  delay: 1s
                  max_package_size: 51200
        '400':
          description: Bad Request. The incoming request had a malformed parameter/object.
          headers:
            upvest-request-id:
              required: true
              schema:
                type: string
                format: uuid
                example: 169ae4c7-ebd7-4041-94da-25369653eba7
          content:
            application/problem+json:
              schema:
                title: Error
                type: object
                description: ''
                properties:
                  type:
                    type: string
                    description: URL to a document describing the error condition.
                  status:
                    type: integer
                    description: >-
                      Transmission of the HTTP status code so that all
                      information can be found in one place, but also to correct
                      changes in the status code due to the use of proxy
                      servers.
                  title:
                    type: string
                    description: >-
                      A short, human-readable title for the general error type;
                      the title should not change for given types.
                  detail:
                    type: string
                    description: A human-readable description of the specific error.
                  instance:
                    type: string
                    description: >-
                      This optional key may be present, with a unique URI for
                      the specific error; this will often point to an error log
                      for that specific response.
                  request_id:
                    type: string
                    description: Correlation ID for the original request.
                required:
                  - type
                  - status
                additionalProperties: false
              example:
                status: 400
                type: bad_request
        '401':
          description: Unauthorized. The caller has not been authenticated.
          headers:
            upvest-request-id:
              required: true
              schema:
                type: string
                format: uuid
                example: 169ae4c7-ebd7-4041-94da-25369653eba7
          content:
            application/problem+json:
              schema:
                title: Error
                type: object
                description: ''
                properties:
                  type:
                    type: string
                    description: URL to a document describing the error condition.
                  status:
                    type: integer
                    description: >-
                      Transmission of the HTTP status code so that all
                      information can be found in one place, but also to correct
                      changes in the status code due to the use of proxy
                      servers.
                  title:
                    type: string
                    description: >-
                      A short, human-readable title for the general error type;
                      the title should not change for given types.
                  detail:
                    type: string
                    description: A human-readable description of the specific error.
                  instance:
                    type: string
                    description: >-
                      This optional key may be present, with a unique URI for
                      the specific error; this will often point to an error log
                      for that specific response.
                  request_id:
                    type: string
                    description: Correlation ID for the original request.
                required:
                  - type
                  - status
                additionalProperties: false
              example:
                status: 401
                type: unauthorized
        '403':
          description: >-
            Forbidden. The caller has been authenticated but is not allowed to
            take the requested action.
          headers:
            upvest-request-id:
              required: true
              schema:
                type: string
                format: uuid
                example: 169ae4c7-ebd7-4041-94da-25369653eba7
          content:
            application/problem+json:
              schema:
                title: Error
                type: object
                description: ''
                properties:
                  type:
                    type: string
                    description: URL to a document describing the error condition.
                  status:
                    type: integer
                    description: >-
                      Transmission of the HTTP status code so that all
                      information can be found in one place, but also to correct
                      changes in the status code due to the use of proxy
                      servers.
                  title:
                    type: string
                    description: >-
                      A short, human-readable title for the general error type;
                      the title should not change for given types.
                  detail:
                    type: string
                    description: A human-readable description of the specific error.
                  instance:
                    type: string
                    description: >-
                      This optional key may be present, with a unique URI for
                      the specific error; this will often point to an error log
                      for that specific response.
                  request_id:
                    type: string
                    description: Correlation ID for the original request.
                required:
                  - type
                  - status
                additionalProperties: false
              example:
                status: 403
                type: forbidden
        '404':
          description: Not Found. The requested resource could not be found.
          headers:
            upvest-request-id:
              required: true
              schema:
                type: string
                format: uuid
                example: 169ae4c7-ebd7-4041-94da-25369653eba7
          content:
            application/problem+json:
              schema:
                title: Error
                type: object
                description: ''
                properties:
                  type:
                    type: string
                    description: URL to a document describing the error condition.
                  status:
                    type: integer
                    description: >-
                      Transmission of the HTTP status code so that all
                      information can be found in one place, but also to correct
                      changes in the status code due to the use of proxy
                      servers.
                  title:
                    type: string
                    description: >-
                      A short, human-readable title for the general error type;
                      the title should not change for given types.
                  detail:
                    type: string
                    description: A human-readable description of the specific error.
                  instance:
                    type: string
                    description: >-
                      This optional key may be present, with a unique URI for
                      the specific error; this will often point to an error log
                      for that specific response.
                  request_id:
                    type: string
                    description: Correlation ID for the original request.
                required:
                  - type
                  - status
                additionalProperties: false
              example:
                status: 404
                type: not_found
        '406':
          description: >-
            Not Acceptable. The resource does not have a current representation
            that would be acceptable to the user agent. "Accept" header defined
            unsupported value.
          headers:
            upvest-request-id:
              required: true
              schema:
                type: string
                format: uuid
                example: 169ae4c7-ebd7-4041-94da-25369653eba7
          content:
            application/problem+json:
              schema:
                title: Error
                type: object
                description: ''
                properties:
                  type:
                    type: string
                    description: URL to a document describing the error condition.
                  status:
                    type: integer
                    description: >-
                      Transmission of the HTTP status code so that all
                      information can be found in one place, but also to correct
                      changes in the status code due to the use of proxy
                      servers.
                  title:
                    type: string
                    description: >-
                      A short, human-readable title for the general error type;
                      the title should not change for given types.
                  detail:
                    type: string
                    description: A human-readable description of the specific error.
                  instance:
                    type: string
                    description: >-
                      This optional key may be present, with a unique URI for
                      the specific error; this will often point to an error log
                      for that specific response.
                  request_id:
                    type: string
                    description: Correlation ID for the original request.
                required:
                  - type
                  - status
                additionalProperties: false
              example:
                status: 406
                type: not_acceptable
        '429':
          description: >-
            Too Many Requests. The caller has exceeded their quota for the time
            period and has been throttled.
          headers:
            upvest-request-id:
              required: true
              schema:
                type: string
                format: uuid
                example: 169ae4c7-ebd7-4041-94da-25369653eba7
          content:
            application/problem+json:
              schema:
                title: Error
                type: object
                description: ''
                properties:
                  type:
                    type: string
                    description: URL to a document describing the error condition.
                  status:
                    type: integer
                    description: >-
                      Transmission of the HTTP status code so that all
                      information can be found in one place, but also to correct
                      changes in the status code due to the use of proxy
                      servers.
                  title:
                    type: string
                    description: >-
                      A short, human-readable title for the general error type;
                      the title should not change for given types.
                  detail:
                    type: string
                    description: A human-readable description of the specific error.
                  instance:
                    type: string
                    description: >-
                      This optional key may be present, with a unique URI for
                      the specific error; this will often point to an error log
                      for that specific response.
                  request_id:
                    type: string
                    description: Correlation ID for the original request.
                required:
                  - type
                  - status
                additionalProperties: false
              example:
                status: 429
                type: too_many_requests
        '500':
          description: Internal Server Error. The service encountered an unexpected error.
          headers:
            upvest-request-id:
              required: true
              schema:
                type: string
                format: uuid
                example: 169ae4c7-ebd7-4041-94da-25369653eba7
          content:
            application/problem+json:
              schema:
                title: Error
                type: object
                description: ''
                properties:
                  type:
                    type: string
                    description: URL to a document describing the error condition.
                  status:
                    type: integer
                    description: >-
                      Transmission of the HTTP status code so that all
                      information can be found in one place, but also to correct
                      changes in the status code due to the use of proxy
                      servers.
                  title:
                    type: string
                    description: >-
                      A short, human-readable title for the general error type;
                      the title should not change for given types.
                  detail:
                    type: string
                    description: A human-readable description of the specific error.
                  instance:
                    type: string
                    description: >-
                      This optional key may be present, with a unique URI for
                      the specific error; this will often point to an error log
                      for that specific response.
                  request_id:
                    type: string
                    description: Correlation ID for the original request.
                required:
                  - type
                  - status
                additionalProperties: false
              example:
                status: 500
                type: internal_server_error
        '503':
          description: >-
            Service Unavailable. The service handling for this request cannot be
            reached at this time.
          headers:
            upvest-request-id:
              required: true
              schema:
                type: string
                format: uuid
                example: 169ae4c7-ebd7-4041-94da-25369653eba7
          content:
            application/problem+json:
              schema:
                title: Error
                type: object
                description: ''
                properties:
                  type:
                    type: string
                    description: URL to a document describing the error condition.
                  status:
                    type: integer
                    description: >-
                      Transmission of the HTTP status code so that all
                      information can be found in one place, but also to correct
                      changes in the status code due to the use of proxy
                      servers.
                  title:
                    type: string
                    description: >-
                      A short, human-readable title for the general error type;
                      the title should not change for given types.
                  detail:
                    type: string
                    description: A human-readable description of the specific error.
                  instance:
                    type: string
                    description: >-
                      This optional key may be present, with a unique URI for
                      the specific error; this will often point to an error log
                      for that specific response.
                  request_id:
                    type: string
                    description: Correlation ID for the original request.
                required:
                  - type
                  - status
                additionalProperties: false
              example:
                status: 503
                type: method_not_allowed
        '504':
          description: >-
            Gateway Timeout. The service gateway has reached its internal
            timeout.
          headers:
            upvest-request-id:
              required: true
              schema:
                type: string
                format: uuid
                example: 169ae4c7-ebd7-4041-94da-25369653eba7
          content:
            application/problem+json:
              schema:
                title: Error
                type: object
                description: ''
                properties:
                  type:
                    type: string
                    description: URL to a document describing the error condition.
                  status:
                    type: integer
                    description: >-
                      Transmission of the HTTP status code so that all
                      information can be found in one place, but also to correct
                      changes in the status code due to the use of proxy
                      servers.
                  title:
                    type: string
                    description: >-
                      A short, human-readable title for the general error type;
                      the title should not change for given types.
                  detail:
                    type: string
                    description: A human-readable description of the specific error.
                  instance:
                    type: string
                    description: >-
                      This optional key may be present, with a unique URI for
                      the specific error; this will often point to an error log
                      for that specific response.
                  request_id:
                    type: string
                    description: Correlation ID for the original request.
                required:
                  - type
                  - status
                additionalProperties: false
              example:
                status: 504
                type: gateway_timeout
  /webhooks/{webhook_id}/test:
    parameters:
      - name: webhook_id
        in: path
        description: Webhook identifier
        required: true
        schema:
          title: Webhook ID
          type: string
          description: Webhook unique identifier.
          format: uuid
      - name: upvest-client-id
        in: header
        description: Tenant Client ID
        required: true
        schema:
          type: string
          format: uuid
          example: ebabcf4d-61c3-4942-875c-e265a7c2d062
      - name: authorization
        in: header
        description: |
          Bearer (access) token from the OAuth flow with correct scopes.
          https://datatracker.ietf.org/doc/html/rfc6750
        required: true
        schema:
          type: string
          pattern: ^Bearer [a-zA-Z0-9\-\._~+/]*=*
          example: Bearer c2VjcmV0Cg==
      - name: signature
        in: header
        required: true
        schema:
          type: string
        description: >-
          https://tools.ietf.org/id/draft-ietf-httpbis-message-signatures-01.html#name-the-signature-http-header
      - name: signature-input
        in: header
        required: true
        schema:
          type: string
        description: >-
          https://tools.ietf.org/id/draft-ietf-httpbis-message-signatures-01.html#name-the-signature-input-http-he
      - name: upvest-api-version
        in: header
        required: false
        schema:
          type: string
          enum:
            - '1'
          default: '1'
          example: '1'
        description: 'Upvest API version (Note: Do not include quotation marks)'
    post:
      operationId: test_webhook
      summary: Test a webhook subscription
      description: Tests a webhook subscription specified by its ID.
      tags:
        - Webhook Subscriptions
      security:
        - oauth-client-credentials:
            - webhooks:admin
      responses:
        '200':
          description: OK
          headers:
            upvest-request-id:
              required: true
              schema:
                type: string
                format: uuid
                example: 169ae4c7-ebd7-4041-94da-25369653eba7
          content:
            application/json:
              schema:
                type: object
                properties:
                  url:
                    type: string
                  response:
                    type: object
                    properties:
                      status:
                        type: integer
                      headers:
                        type: object
                        additionalProperties:
                          type: string
                      body:
                        type: string
                      error:
                        type: string
                    required:
                      - status
                      - headers
                      - body
                required:
                  - url
                  - response
              example:
                url: https://api.example.com/test
                response:
                  status: 200
                  headers:
                    Content-Type: application/json
                    X-Request-ID: abc123
                  body: ''
        '401':
          description: Unauthorized. The caller has not been authenticated.
          headers:
            upvest-request-id:
              required: true
              schema:
                type: string
                format: uuid
                example: 169ae4c7-ebd7-4041-94da-25369653eba7
          content:
            application/problem+json:
              schema:
                title: Error
                type: object
                description: ''
                properties:
                  type:
                    type: string
                    description: URL to a document describing the error condition.
                  status:
                    type: integer
                    description: >-
                      Transmission of the HTTP status code so that all
                      information can be found in one place, but also to correct
                      changes in the status code due to the use of proxy
                      servers.
                  title:
                    type: string
                    description: >-
                      A short, human-readable title for the general error type;
                      the title should not change for given types.
                  detail:
                    type: string
                    description: A human-readable description of the specific error.
                  instance:
                    type: string
                    description: >-
                      This optional key may be present, with a unique URI for
                      the specific error; this will often point to an error log
                      for that specific response.
                  request_id:
                    type: string
                    description: Correlation ID for the original request.
                required:
                  - type
                  - status
                additionalProperties: false
              example:
                status: 401
                type: unauthorized
        '403':
          description: >-
            Forbidden. The caller has been authenticated but is not allowed to
            take the requested action.
          headers:
            upvest-request-id:
              required: true
              schema:
                type: string
                format: uuid
                example: 169ae4c7-ebd7-4041-94da-25369653eba7
          content:
            application/problem+json:
              schema:
                title: Error
                type: object
                description: ''
                properties:
                  type:
                    type: string
                    description: URL to a document describing the error condition.
                  status:
                    type: integer
                    description: >-
                      Transmission of the HTTP status code so that all
                      information can be found in one place, but also to correct
                      changes in the status code due to the use of proxy
                      servers.
                  title:
                    type: string
                    description: >-
                      A short, human-readable title for the general error type;
                      the title should not change for given types.
                  detail:
                    type: string
                    description: A human-readable description of the specific error.
                  instance:
                    type: string
                    description: >-
                      This optional key may be present, with a unique URI for
                      the specific error; this will often point to an error log
                      for that specific response.
                  request_id:
                    type: string
                    description: Correlation ID for the original request.
                required:
                  - type
                  - status
                additionalProperties: false
              example:
                status: 403
                type: forbidden
        '404':
          description: Not Found. The requested resource could not be found.
          headers:
            upvest-request-id:
              required: true
              schema:
                type: string
                format: uuid
                example: 169ae4c7-ebd7-4041-94da-25369653eba7
          content:
            application/problem+json:
              schema:
                title: Error
                type: object
                description: ''
                properties:
                  type:
                    type: string
                    description: URL to a document describing the error condition.
                  status:
                    type: integer
                    description: >-
                      Transmission of the HTTP status code so that all
                      information can be found in one place, but also to correct
                      changes in the status code due to the use of proxy
                      servers.
                  title:
                    type: string
                    description: >-
                      A short, human-readable title for the general error type;
                      the title should not change for given types.
                  detail:
                    type: string
                    description: A human-readable description of the specific error.
                  instance:
                    type: string
                    description: >-
                      This optional key may be present, with a unique URI for
                      the specific error; this will often point to an error log
                      for that specific response.
                  request_id:
                    type: string
                    description: Correlation ID for the original request.
                required:
                  - type
                  - status
                additionalProperties: false
              example:
                status: 404
                type: not_found
        '406':
          description: >-
            Not Acceptable. The resource does not have a current representation
            that would be acceptable to the user agent. "Accept" header defined
            unsupported value.
          headers:
            upvest-request-id:
              required: true
              schema:
                type: string
                format: uuid
                example: 169ae4c7-ebd7-4041-94da-25369653eba7
          content:
            application/problem+json:
              schema:
                title: Error
                type: object
                description: ''
                properties:
                  type:
                    type: string
                    description: URL to a document describing the error condition.
                  status:
                    type: integer
                    description: >-
                      Transmission of the HTTP status code so that all
                      information can be found in one place, but also to correct
                      changes in the status code due to the use of proxy
                      servers.
                  title:
                    type: string
                    description: >-
                      A short, human-readable title for the general error type;
                      the title should not change for given types.
                  detail:
                    type: string
                    description: A human-readable description of the specific error.
                  instance:
                    type: string
                    description: >-
                      This optional key may be present, with a unique URI for
                      the specific error; this will often point to an error log
                      for that specific response.
                  request_id:
                    type: string
                    description: Correlation ID for the original request.
                required:
                  - type
                  - status
                additionalProperties: false
              example:
                status: 406
                type: not_acceptable
        '429':
          description: >-
            Too Many Requests. The caller has exceeded their quota for the time
            period and has been throttled.
          headers:
            upvest-request-id:
              required: true
              schema:
                type: string
                format: uuid
                example: 169ae4c7-ebd7-4041-94da-25369653eba7
          content:
            application/problem+json:
              schema:
                title: Error
                type: object
                description: ''
                properties:
                  type:
                    type: string
                    description: URL to a document describing the error condition.
                  status:
                    type: integer
                    description: >-
                      Transmission of the HTTP status code so that all
                      information can be found in one place, but also to correct
                      changes in the status code due to the use of proxy
                      servers.
                  title:
                    type: string
                    description: >-
                      A short, human-readable title for the general error type;
                      the title should not change for given types.
                  detail:
                    type: string
                    description: A human-readable description of the specific error.
                  instance:
                    type: string
                    description: >-
                      This optional key may be present, with a unique URI for
                      the specific error; this will often point to an error log
                      for that specific response.
                  request_id:
                    type: string
                    description: Correlation ID for the original request.
                required:
                  - type
                  - status
                additionalProperties: false
              example:
                status: 429
                type: too_many_requests
        '500':
          description: Internal Server Error. The service encountered an unexpected error.
          headers:
            upvest-request-id:
              required: true
              schema:
                type: string
                format: uuid
                example: 169ae4c7-ebd7-4041-94da-25369653eba7
          content:
            application/problem+json:
              schema:
                title: Error
                type: object
                description: ''
                properties:
                  type:
                    type: string
                    description: URL to a document describing the error condition.
                  status:
                    type: integer
                    description: >-
                      Transmission of the HTTP status code so that all
                      information can be found in one place, but also to correct
                      changes in the status code due to the use of proxy
                      servers.
                  title:
                    type: string
                    description: >-
                      A short, human-readable title for the general error type;
                      the title should not change for given types.
                  detail:
                    type: string
                    description: A human-readable description of the specific error.
                  instance:
                    type: string
                    description: >-
                      This optional key may be present, with a unique URI for
                      the specific error; this will often point to an error log
                      for that specific response.
                  request_id:
                    type: string
                    description: Correlation ID for the original request.
                required:
                  - type
                  - status
                additionalProperties: false
              example:
                status: 500
                type: internal_server_error
        '503':
          description: >-
            Service Unavailable. The service handling for this request cannot be
            reached at this time.
          headers:
            upvest-request-id:
              required: true
              schema:
                type: string
                format: uuid
                example: 169ae4c7-ebd7-4041-94da-25369653eba7
          content:
            application/problem+json:
              schema:
                title: Error
                type: object
                description: ''
                properties:
                  type:
                    type: string
                    description: URL to a document describing the error condition.
                  status:
                    type: integer
                    description: >-
                      Transmission of the HTTP status code so that all
                      information can be found in one place, but also to correct
                      changes in the status code due to the use of proxy
                      servers.
                  title:
                    type: string
                    description: >-
                      A short, human-readable title for the general error type;
                      the title should not change for given types.
                  detail:
                    type: string
                    description: A human-readable description of the specific error.
                  instance:
                    type: string
                    description: >-
                      This optional key may be present, with a unique URI for
                      the specific error; this will often point to an error log
                      for that specific response.
                  request_id:
                    type: string
                    description: Correlation ID for the original request.
                required:
                  - type
                  - status
                additionalProperties: false
              example:
                status: 503
                type: method_not_allowed
        '504':
          description: >-
            Gateway Timeout. The service gateway has reached its internal
            timeout.
          headers:
            upvest-request-id:
              required: true
              schema:
                type: string
                format: uuid
                example: 169ae4c7-ebd7-4041-94da-25369653eba7
          content:
            application/problem+json:
              schema:
                title: Error
                type: object
                description: ''
                properties:
                  type:
                    type: string
                    description: URL to a document describing the error condition.
                  status:
                    type: integer
                    description: >-
                      Transmission of the HTTP status code so that all
                      information can be found in one place, but also to correct
                      changes in the status code due to the use of proxy
                      servers.
                  title:
                    type: string
                    description: >-
                      A short, human-readable title for the general error type;
                      the title should not change for given types.
                  detail:
                    type: string
                    description: A human-readable description of the specific error.
                  instance:
                    type: string
                    description: >-
                      This optional key may be present, with a unique URI for
                      the specific error; this will often point to an error log
                      for that specific response.
                  request_id:
                    type: string
                    description: Correlation ID for the original request.
                required:
                  - type
                  - status
                additionalProperties: false
              example:
                status: 504
                type: gateway_timeout
  /users:
    parameters:
      - name: upvest-client-id
        in: header
        description: Tenant Client ID
        required: true
        schema:
          type: string
          format: uuid
          example: ebabcf4d-61c3-4942-875c-e265a7c2d062
      - name: authorization
        in: header
        description: |
          Bearer (access) token from the OAuth flow with correct scopes.
          https://datatracker.ietf.org/doc/html/rfc6750
        required: true
        schema:
          type: string
          pattern: ^Bearer [a-zA-Z0-9\-\._~+/]*=*
          example: Bearer c2VjcmV0Cg==
      - name: signature
        in: header
        required: true
        schema:
          type: string
        description: >-
          https://tools.ietf.org/id/draft-ietf-httpbis-message-signatures-01.html#name-the-signature-http-header
      - name: signature-input
        in: header
        required: true
        schema:
          type: string
        description: >-
          https://tools.ietf.org/id/draft-ietf-httpbis-message-signatures-01.html#name-the-signature-input-http-he
      - name: upvest-api-version
        in: header
        required: false
        schema:
          type: string
          enum:
            - '1'
          default: '1'
          example: '1'
        description: 'Upvest API version (Note: Do not include quotation marks)'
    get:
      operationId: list_users
      summary: Get all users
      description: Returns the list of all users.
      tags:
        - Users
      security:
        - oauth-client-credentials:
            - users:read
            - users:admin
      parameters:
        - name: sort
          in: query
          required: false
          schema:
            type: string
            enum:
              - created_at
              - updated_at
            default: created_at
          description: Sort the result by `created_at`, `updated_at`.
        - name: order
          in: query
          required: false
          schema:
            type: string
            enum:
              - ASC
              - DESC
            default: ASC
          description: >-
            Sort order of the result list if the `sort` parameter is specified.
            Use `ASC` for ascending or `DESC` for descending sort order.
        - name: offset
          in: query
          schema:
            type: integer
            minimum: 0
            format: int32
          allowEmptyValue: true
          description: >-
            Use the `offset` argument to specify where in the list of results to
            start when returning items for a particular query.
        - name: limit
          in: query
          schema:
            type: integer
            format: int32
            default: 100
            minimum: 0
            maximum: 1000
          allowEmptyValue: true
          description: >-
            Use the `limit` argument to specify the maximum number of items
            returned.
      responses:
        '200':
          description: OK
          headers:
            upvest-request-id:
              required: true
              schema:
                type: string
                format: uuid
                example: 169ae4c7-ebd7-4041-94da-25369653eba7
          content:
            application/json:
              schema:
                title: Users - List - Response
                type: object
                description: ''
                properties:
                  meta:
                    type: object
                    properties:
                      offset:
                        type: integer
                        description: Amount of resource to offset in the response.
                      limit:
                        type: integer
                        description: Total limit of the response.
                      count:
                        type: integer
                        description: Count of the resources returned in the response.
                      total_count:
                        type: integer
                        description: Total count of all the resources.
                      sort:
                        type: string
                        description: The field that the list is sorted by.
                      order:
                        type: string
                        description: |-
                          The ordering of the response.
                          * ASC - Ascending order
                          * DESC - Descending order
                        enum:
                          - ASC
                          - DESC
                    required:
                      - offset
                      - limit
                      - count
                      - total_count
                  data:
                    oneOf:
                      - anyOf:
                          - title: Users (BYOL) - List
                            type: array
                            minItems: 1
                            items:
                              title: User (BYOL)
                              type: object
                              properties:
                                id:
                                  title: User unique identifier.
                                  type: string
                                  description: User unique identifier.
                                  format: uuid
                                created_at:
                                  type: string
                                  format: date-time
                                  description: >-
                                    Date and time when the resource was created.
                                    [RFC
                                    3339-5](https://datatracker.ietf.org/doc/html/rfc3339#section-5.6),
                                    [ISO8601
                                    UTC](https://www.iso.org/iso-8601-date-and-time-format.html)
                                updated_at:
                                  type: string
                                  format: date-time
                                  description: >-
                                    Date and time when the resource was last
                                    updated. [RFC
                                    3339-5](https://datatracker.ietf.org/doc/html/rfc3339#section-5.6),
                                    [ISO8601
                                    UTC](https://www.iso.org/iso-8601-date-and-time-format.html)
                                first_name:
                                  type: string
                                  maxLength: 100
                                  minLength: 2
                                  description: >-
                                    First name(s) of the user. Please include
                                    all first and middle names of the user.
                                last_name:
                                  type: string
                                  maxLength: 100
                                  minLength: 1
                                  description: Last name of the user.
                                salutation:
                                  type: string
                                  description: >-
                                    Salutation of the user used in reports and
                                    statements.

                                    * (empty string) - 

                                    * SALUTATION_MALE - 

                                    * SALUTATION_FEMALE - 

                                    * SALUTATION_FEMALE_MARRIED - 

                                    * SALUTATION_DIVERSE - 
                                  enum:
                                    - ''
                                    - SALUTATION_MALE
                                    - SALUTATION_FEMALE
                                    - SALUTATION_FEMALE_MARRIED
                                    - SALUTATION_DIVERSE
                                  default: ''
                                title:
                                  type: string
                                  description: >-
                                    Title of the user used in reports and
                                    statements.

                                    * (empty string) - 

                                    * DR - Doctor

                                    * PROF - Professor

                                    * PROF_DR - 

                                    * DIPL_ING - Graduate engineer
                                    (Diplom-Ingenieur)

                                    * MAGISTER - 
                                  enum:
                                    - ''
                                    - DR
                                    - PROF
                                    - PROF_DR
                                    - DIPL_ING
                                    - MAGISTER
                                  default: ''
                                birth_date:
                                  type: string
                                  format: date
                                  description: >-
                                    Birth date of the user in YYYY-MM-DD format.
                                    [RFC 3339, section
                                    5.6](https://json-schema.org/draft/2020-12/json-schema-validation.html#RFC3339)
                                birth_city:
                                  title: City name
                                  type: string
                                  minLength: 1
                                  maxLength: 85
                                birth_country:
                                  description: >-
                                    Accepted country code. [ISO 3166-1 alpha-2
                                    codes](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2).
                                  type: string
                                  enum:
                                    - AD
                                    - AE
                                    - AF
                                    - AG
                                    - AI
                                    - AL
                                    - AM
                                    - AO
                                    - AQ
                                    - AR
                                    - AS
                                    - AT
                                    - AU
                                    - AW
                                    - AX
                                    - AZ
                                    - BA
                                    - BB
                                    - BD
                                    - BE
                                    - BF
                                    - BG
                                    - BH
                                    - BI
                                    - BJ
                                    - BL
                                    - BM
                                    - BN
                                    - BO
                                    - BQ
                                    - BR
                                    - BS
                                    - BT
                                    - BV
                                    - BW
                                    - BY
                                    - BZ
                                    - CA
                                    - CC
                                    - CD
                                    - CF
                                    - CG
                                    - CH
                                    - CI
                                    - CK
                                    - CL
                                    - CM
                                    - CN
                                    - CO
                                    - CR
                                    - CU
                                    - CV
                                    - CW
                                    - CX
                                    - CY
                                    - CZ
                                    - DE
                                    - DJ
                                    - DK
                                    - DM
                                    - DO
                                    - DZ
                                    - EC
                                    - EE
                                    - EG
                                    - EH
                                    - ER
                                    - ES
                                    - ET
                                    - FI
                                    - FJ
                                    - FK
                                    - FM
                                    - FO
                                    - FR
                                    - GA
                                    - GB
                                    - GD
                                    - GE
                                    - GF
                                    - GG
                                    - GH
                                    - GI
                                    - GL
                                    - GM
                                    - GN
                                    - GP
                                    - GQ
                                    - GR
                                    - GS
                                    - GT
                                    - GU
                                    - GW
                                    - GY
                                    - HK
                                    - HM
                                    - HN
                                    - HR
                                    - HT
                                    - HU
                                    - ID
                                    - IE
                                    - IL
                                    - IM
                                    - IN
                                    - IO
                                    - IQ
                                    - IR
                                    - IS
                                    - IT
                                    - JE
                                    - JM
                                    - JO
                                    - JP
                                    - KE
                                    - KG
                                    - KH
                                    - KI
                                    - KM
                                    - KN
                                    - KP
                                    - KR
                                    - KW
                                    - KY
                                    - KZ
                                    - LA
                                    - LB
                                    - LC
                                    - LI
                                    - LK
                                    - LR
                                    - LS
                                    - LT
                                    - LU
                                    - LV
                                    - LY
                                    - MA
                                    - MC
                                    - MD
                                    - ME
                                    - MF
                                    - MG
                                    - MH
                                    - MK
                                    - ML
                                    - MM
                                    - MN
                                    - MO
                                    - MP
                                    - MQ
                                    - MR
                                    - MS
                                    - MT
                                    - MU
                                    - MV
                                    - MW
                                    - MX
                                    - MY
                                    - MZ
                                    - NA
                                    - NC
                                    - NE
                                    - NF
                                    - NG
                                    - NI
                                    - NL
                                    - 'NO'
                                    - NP
                                    - NR
                                    - NU
                                    - NZ
                                    - OM
                                    - PA
                                    - PE
                                    - PF
                                    - PG
                                    - PH
                                    - PK
                                    - PL
                                    - PM
                                    - PN
                                    - PR
                                    - PS
                                    - PT
                                    - PW
                                    - PY
                                    - QA
                                    - RE
                                    - RO
                                    - RS
                                    - RU
                                    - RW
                                    - SA
                                    - SB
                                    - SC
                                    - SD
                                    - SE
                                    - SG
                                    - SH
                                    - SI
                                    - SJ
                                    - SK
                                    - SL
                                    - SM
                                    - SN
                                    - SO
                                    - SR
                                    - SS
                                    - ST
                                    - SV
                                    - SX
                                    - SY
                                    - SZ
                                    - TC
                                    - TD
                                    - TF
                                    - TG
                                    - TH
                                    - TJ
                                    - TK
                                    - TL
                                    - TM
                                    - TN
                                    - TO
                                    - TR
                                    - TT
                                    - TV
                                    - TW
                                    - TZ
                                    - UA
                                    - UG
                                    - UM
                                    - US
                                    - UY
                                    - UZ
                                    - VA
                                    - VC
                                    - VE
                                    - VG
                                    - VI
                                    - VN
                                    - VU
                                    - WF
                                    - WS
                                    - XK
                                    - YE
                                    - YT
                                    - ZA
                                    - ZM
                                    - ZW
                                birth_name:
                                  type: string
                                  maxLength: 100
                                  description: If applicable, birth name of the user.
                                nationalities:
                                  type: array
                                  items:
                                    description: >-
                                      Accepted country code. [ISO 3166-1 alpha-2
                                      codes](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2).
                                    type: string
                                    enum:
                                      - AD
                                      - AE
                                      - AF
                                      - AG
                                      - AI
                                      - AL
                                      - AM
                                      - AO
                                      - AQ
                                      - AR
                                      - AS
                                      - AT
                                      - AU
                                      - AW
                                      - AX
                                      - AZ
                                      - BA
                                      - BB
                                      - BD
                                      - BE
                                      - BF
                                      - BG
                                      - BH
                                      - BI
                                      - BJ
                                      - BL
                                      - BM
                                      - BN
                                      - BO
                                      - BQ
                                      - BR
                                      - BS
                                      - BT
                                      - BV
                                      - BW
                                      - BY
                                      - BZ
                                      - CA
                                      - CC
                                      - CD
                                      - CF
                                      - CG
                                      - CH
                                      - CI
                                      - CK
                                      - CL
                                      - CM
                                      - CN
                                      - CO
                                      - CR
                                      - CU
                                      - CV
                                      - CW
                                      - CX
                                      - CY
                                      - CZ
                                      - DE
                                      - DJ
                                      - DK
                                      - DM
                                      - DO
                                      - DZ
                                      - EC
                                      - EE
                                      - EG
                                      - EH
                                      - ER
                                      - ES
                                      - ET
                                      - FI
                                      - FJ
                                      - FK
                                      - FM
                                      - FO
                                      - FR
                                      - GA
                                      - GB
                                      - GD
                                      - GE
                                      - GF
                                      - GG
                                      - GH
                                      - GI
                                      - GL
                                      - GM
                                      - GN
                                      - GP
                                      - GQ
                                      - GR
                                      - GS
                                      - GT
                                      - GU
                                      - GW
                                      - GY
                                      - HK
                                      - HM
                                      - HN
                                      - HR
                                      - HT
                                      - HU
                                      - ID
                                      - IE
                                      - IL
                                      - IM
                                      - IN
                                      - IO
                                      - IQ
                                      - IR
                                      - IS
                                      - IT
                                      - JE
                                      - JM
                                      - JO
                                      - JP
                                      - KE
                                      - KG
                                      - KH
                                      - KI
                                      - KM
                                      - KN
                                      - KP
                                      - KR
                                      - KW
                                      - KY
                                      - KZ
                                      - LA
                                      - LB
                                      - LC
                                      - LI
                                      - LK
                                      - LR
                                      - LS
                                      - LT
                                      - LU
                                      - LV
                                      - LY
                                      - MA
                                      - MC
                                      - MD
                                      - ME
                                      - MF
                                      - MG
                                      - MH
                                      - MK
                                      - ML
                                      - MM
                                      - MN
                                      - MO
                                      - MP
                                      - MQ
                                      - MR
                                      - MS
                                      - MT
                                      - MU
                                      - MV
                                      - MW
                                      - MX
                                      - MY
                                      - MZ
                                      - NA
                                      - NC
                                      - NE
                                      - NF
                                      - NG
                                      - NI
                                      - NL
                                      - 'NO'
                                      - NP
                                      - NR
                                      - NU
                                      - NZ
                                      - OM
                                      - PA
                                      - PE
                                      - PF
                                      - PG
                                      - PH
                                      - PK
                                      - PL
                                      - PM
                                      - PN
                                      - PR
                                      - PS
                                      - PT
                                      - PW
                                      - PY
                                      - QA
                                      - RE
                                      - RO
                                      - RS
                                      - RU
                                      - RW
                                      - SA
                                      - SB
                                      - SC
                                      - SD
                                      - SE
                                      - SG
                                      - SH
                                      - SI
                                      - SJ
                                      - SK
                                      - SL
                                      - SM
                                      - SN
                                      - SO
                                      - SR
                                      - SS
                                      - ST
                                      - SV
                                      - SX
                                      - SY
                                      - SZ
                                      - TC
                                      - TD
                                      - TF
                                      - TG
                                      - TH
                                      - TJ
                                      - TK
                                      - TL
                                      - TM
                                      - TN
                                      - TO
                                      - TR
                                      - TT
                                      - TV
                                      - TW
                                      - TZ
                                      - UA
                                      - UG
                                      - UM
                                      - US
                                      - UY
                                      - UZ
                                      - VA
                                      - VC
                                      - VE
                                      - VG
                                      - VI
                                      - VN
                                      - VU
                                      - WF
                                      - WS
                                      - XK
                                      - YE
                                      - YT
                                      - ZA
                                      - ZM
                                      - ZW
                                  minItems: 1
                                  description: >-
                                    Nationalities of the user. [ISO 3166 alpha-2
                                    Codes](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2).
                                address:
                                  title: Address
                                  type: object
                                  description: >-
                                    Address. Must not be a P.O. box or c/o
                                    address.
                                  properties:
                                    address_line1:
                                      type: string
                                      description: First address line of the address.
                                      maxLength: 100
                                    address_line2:
                                      type: string
                                      description: Second address line of the address.
                                      maxLength: 100
                                    postcode:
                                      title: Postal code
                                      type: string
                                      description: Postal code (postcode, PIN or ZIP code)
                                      pattern: >-
                                        ^[a-zA-Z0-9][a-zA-Z0-9\s\-]{0,8}[a-zA-Z0-9]?$
                                    country:
                                      description: >-
                                        Accepted country code. [ISO 3166-1
                                        alpha-2
                                        codes](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2).
                                      type: string
                                      enum:
                                        - AD
                                        - AE
                                        - AF
                                        - AG
                                        - AI
                                        - AL
                                        - AM
                                        - AO
                                        - AQ
                                        - AR
                                        - AS
                                        - AT
                                        - AU
                                        - AW
                                        - AX
                                        - AZ
                                        - BA
                                        - BB
                                        - BD
                                        - BE
                                        - BF
                                        - BG
                                        - BH
                                        - BI
                                        - BJ
                                        - BL
                                        - BM
                                        - BN
                                        - BO
                                        - BQ
                                        - BR
                                        - BS
                                        - BT
                                        - BV
                                        - BW
                                        - BY
                                        - BZ
                                        - CA
                                        - CC
                                        - CD
                                        - CF
                                        - CG
                                        - CH
                                        - CI
                                        - CK
                                        - CL
                                        - CM
                                        - CN
                                        - CO
                                        - CR
                                        - CU
                                        - CV
                                        - CW
                                        - CX
                                        - CY
                                        - CZ
                                        - DE
                                        - DJ
                                        - DK
                                        - DM
                                        - DO
                                        - DZ
                                        - EC
                                        - EE
                                        - EG
                                        - EH
                                        - ER
                                        - ES
                                        - ET
                                        - FI
                                        - FJ
                                        - FK
                                        - FM
                                        - FO
                                        - FR
                                        - GA
                                        - GB
                                        - GD
                                        - GE
                                        - GF
                                        - GG
                                        - GH
                                        - GI
                                        - GL
                                        - GM
                                        - GN
                                        - GP
                                        - GQ
                                        - GR
                                        - GS
                                        - GT
                                        - GU
                                        - GW
                                        - GY
                                        - HK
                                        - HM
                                        - HN
                                        - HR
                                        - HT
                                        - HU
                                        - ID
                                        - IE
                                        - IL
                                        - IM
                                        - IN
                                        - IO
                                        - IQ
                                        - IR
                                        - IS
                                        - IT
                                        - JE
                                        - JM
                                        - JO
                                        - JP
                                        - KE
                                        - KG
                                        - KH
                                        - KI
                                        - KM
                                        - KN
                                        - KP
                                        - KR
                                        - KW
                                        - KY
                                        - KZ
                                        - LA
                                        - LB
                                        - LC
                                        - LI
                                        - LK
                                        - LR
                                        - LS
                                        - LT
                                        - LU
                                        - LV
                                        - LY
                                        - MA
                                        - MC
                                        - MD
                                        - ME
                                        - MF
                                        - MG
                                        - MH
                                        - MK
                                        - ML
                                        - MM
                                        - MN
                                        - MO
                                        - MP
                                        - MQ
                                        - MR
                                        - MS
                                        - MT
                                        - MU
                                        - MV
                                        - MW
                                        - MX
                                        - MY
                                        - MZ
                                        - NA
                                        - NC
                                        - NE
                                        - NF
                                        - NG
                                        - NI
                                        - NL
                                        - 'NO'
                                        - NP
                                        - NR
                                        - NU
                                        - NZ
                                        - OM
                                        - PA
                                        - PE
                                        - PF
                                        - PG
                                        - PH
                                        - PK
                                        - PL
                                        - PM
                                        - PN
                                        - PR
                                        - PS
                                        - PT
                                        - PW
                                        - PY
                                        - QA
                                        - RE
                                        - RO
                                        - RS
                                        - RU
                                        - RW
                                        - SA
                                        - SB
                                        - SC
                                        - SD
                                        - SE
                                        - SG
                                        - SH
                                        - SI
                                        - SJ
                                        - SK
                                        - SL
                                        - SM
                                        - SN
                                        - SO
                                        - SR
                                        - SS
                                        - ST
                                        - SV
                                        - SX
                                        - SY
                                        - SZ
                                        - TC
                                        - TD
                                        - TF
                                        - TG
                                        - TH
                                        - TJ
                                        - TK
                                        - TL
                                        - TM
                                        - TN
                                        - TO
                                        - TR
                                        - TT
                                        - TV
                                        - TW
                                        - TZ
                                        - UA
                                        - UG
                                        - UM
                                        - US
                                        - UY
                                        - UZ
                                        - VA
                                        - VC
                                        - VE
                                        - VG
                                        - VI
                                        - VN
                                        - VU
                                        - WF
                                        - WS
                                        - XK
                                        - YE
                                        - YT
                                        - ZA
                                        - ZM
                                        - ZW
                                    state:
                                      description: >-
                                        State, province, county. [ISO 3166
                                        alpha-2
                                        Codes](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2).
                                      type: string
                                      maxLength: 50
                                    city:
                                      title: City name
                                      type: string
                                      minLength: 1
                                      maxLength: 85
                                  required:
                                    - address_line1
                                    - postcode
                                    - country
                                    - city
                                postal_address:
                                  description: >-
                                    User postal address. Needs to be specified
                                    if different to the residential address,
                                    otherwise it is automatically populated.
                                  oneOf:
                                    - title: Address
                                      type: object
                                      description: >-
                                        Address. Must not be a P.O. box or c/o
                                        address.
                                      properties:
                                        address_line1:
                                          type: string
                                          description: First address line of the address.
                                          maxLength: 100
                                        address_line2:
                                          type: string
                                          description: Second address line of the address.
                                          maxLength: 100
                                        postcode:
                                          title: Postal code
                                          type: string
                                          description: Postal code (postcode, PIN or ZIP code)
                                          pattern: >-
                                            ^[a-zA-Z0-9][a-zA-Z0-9\s\-]{0,8}[a-zA-Z0-9]?$
                                        country:
                                          description: >-
                                            Accepted country code. [ISO 3166-1
                                            alpha-2
                                            codes](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2).
                                          type: string
                                          enum:
                                            - AD
                                            - AE
                                            - AF
                                            - AG
                                            - AI
                                            - AL
                                            - AM
                                            - AO
                                            - AQ
                                            - AR
                                            - AS
                                            - AT
                                            - AU
                                            - AW
                                            - AX
                                            - AZ
                                            - BA
                                            - BB
                                            - BD
                                            - BE
                                            - BF
                                            - BG
                                            - BH
                                            - BI
                                            - BJ
                                            - BL
                                            - BM
                                            - BN
                                            - BO
                                            - BQ
                                            - BR
                                            - BS
                                            - BT
                                            - BV
                                            - BW
                                            - BY
                                            - BZ
                                            - CA
                                            - CC
                                            - CD
                                            - CF
                                            - CG
                                            - CH
                                            - CI
                                            - CK
                                            - CL
                                            - CM
                                            - CN
                                            - CO
                                            - CR
                                            - CU
                                            - CV
                                            - CW
                                            - CX
                                            - CY
                                            - CZ
                                            - DE
                                            - DJ
                                            - DK
                                            - DM
                                            - DO
                                            - DZ
                                            - EC
                                            - EE
                                            - EG
                                            - EH
                                            - ER
                                            - ES
                                            - ET
                                            - FI
                                            - FJ
                                            - FK
                                            - FM
                                            - FO
                                            - FR
                                            - GA
                                            - GB
                                            - GD
                                            - GE
                                            - GF
                                            - GG
                                            - GH
                                            - GI
                                            - GL
                                            - GM
                                            - GN
                                            - GP
                                            - GQ
                                            - GR
                                            - GS
                                            - GT
                                            - GU
                                            - GW
                                            - GY
                                            - HK
                                            - HM
                                            - HN
                                            - HR
                                            - HT
                                            - HU
                                            - ID
                                            - IE
                                            - IL
                                            - IM
                                            - IN
                                            - IO
                                            - IQ
                                            - IR
                                            - IS
                                            - IT
                                            - JE
                                            - JM
                                            - JO
                                            - JP
                                            - KE
                                            - KG
                                            - KH
                                            - KI
                                            - KM
                                            - KN
                                            - KP
                                            - KR
                                            - KW
                                            - KY
                                            - KZ
                                            - LA
                                            - LB
                                            - LC
                                            - LI
                                            - LK
                                            - LR
                                            - LS
                                            - LT
                                            - LU
                                            - LV
                                            - LY
                                            - MA
                                            - MC
                                            - MD
                                            - ME
                                            - MF
                                            - MG
                                            - MH
                                            - MK
                                            - ML
                                            - MM
                                            - MN
                                            - MO
                                            - MP
                                            - MQ
                                            - MR
                                            - MS
                                            - MT
                                            - MU
                                            - MV
                                            - MW
                                            - MX
                                            - MY
                                            - MZ
                                            - NA
                                            - NC
                                            - NE
                                            - NF
                                            - NG
                                            - NI
                                            - NL
                                            - 'NO'
                                            - NP
                                            - NR
                                            - NU
                                            - NZ
                                            - OM
                                            - PA
                                            - PE
                                            - PF
                                            - PG
                                            - PH
                                            - PK
                                            - PL
                                            - PM
                                            - PN
                                            - PR
                                            - PS
                                            - PT
                                            - PW
                                            - PY
                                            - QA
                                            - RE
                                            - RO
                                            - RS
                                            - RU
                                            - RW
                                            - SA
                                            - SB
                                            - SC
                                            - SD
                                            - SE
                                            - SG
                                            - SH
                                            - SI
                                            - SJ
                                            - SK
                                            - SL
                                            - SM
                                            - SN
                                            - SO
                                            - SR
                                            - SS
                                            - ST
                                            - SV
                                            - SX
                                            - SY
                                            - SZ
                                            - TC
                                            - TD
                                            - TF
                                            - TG
                                            - TH
                                            - TJ
                                            - TK
                                            - TL
                                            - TM
                                            - TN
                                            - TO
                                            - TR
                                            - TT
                                            - TV
                                            - TW
                                            - TZ
                                            - UA
                                            - UG
                                            - UM
                                            - US
                                            - UY
                                            - UZ
                                            - VA
                                            - VC
                                            - VE
                                            - VG
                                            - VI
                                            - VN
                                            - VU
                                            - WF
                                            - WS
                                            - XK
                                            - YE
                                            - YT
                                            - ZA
                                            - ZM
                                            - ZW
                                        state:
                                          description: >-
                                            State, province, county. [ISO 3166
                                            alpha-2
                                            Codes](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2).
                                          type: string
                                          maxLength: 50
                                        city:
                                          title: City name
                                          type: string
                                          minLength: 1
                                          maxLength: 85
                                      required:
                                        - address_line1
                                        - postcode
                                        - country
                                        - city
                                    - type: 'null'
                                status:
                                  type: string
                                  description: |-
                                    Status of the user.
                                    * ACTIVE - 
                                    * INACTIVE - 
                                    * OFFBOARDING - 
                                    * OFFBOARDED - 
                                  enum:
                                    - ACTIVE
                                    - INACTIVE
                                    - OFFBOARDING
                                    - OFFBOARDED
                                branch_id:
                                  title: Branch unique identifier.
                                  type: string
                                  description: >-
                                    Unique identifier of the market the user is
                                    onboarded on. Only relevant if the client is
                                    operating in different markets and the
                                    client is configured accordingly
                                  format: uuid
                              required:
                                - id
                                - created_at
                                - updated_at
                                - first_name
                                - last_name
                                - birth_date
                                - nationalities
                                - address
                                - status
                              additionalProperties: false
                          - title: Users (TOL) - List
                            type: array
                            minItems: 1
                            items:
                              title: User (TOL)
                              type: object
                              properties:
                                id:
                                  title: User unique identifier.
                                  type: string
                                  description: User unique identifier.
                                  format: uuid
                                created_at:
                                  type: string
                                  format: date-time
                                  description: >-
                                    Date and time when the resource was created.
                                    [RFC
                                    3339-5](https://datatracker.ietf.org/doc/html/rfc3339#section-5.6),
                                    [ISO8601
                                    UTC](https://www.iso.org/iso-8601-date-and-time-format.html)
                                updated_at:
                                  type: string
                                  format: date-time
                                  description: >-
                                    Date and time when the resource was last
                                    updated. [RFC
                                    3339-5](https://datatracker.ietf.org/doc/html/rfc3339#section-5.6),
                                    [ISO8601
                                    UTC](https://www.iso.org/iso-8601-date-and-time-format.html)
                                first_name:
                                  type: string
                                  maxLength: 100
                                  minLength: 2
                                  description: >-
                                    First name(s) of the user. Please include
                                    all first and middle names of the user.
                                last_name:
                                  type: string
                                  maxLength: 100
                                  minLength: 1
                                  description: Last name of the user.
                                salutation:
                                  type: string
                                  description: >-
                                    Salutation of the user used in reports and
                                    statements.

                                    * (empty string) - 

                                    * SALUTATION_MALE - 

                                    * SALUTATION_FEMALE - 

                                    * SALUTATION_FEMALE_MARRIED - 

                                    * SALUTATION_DIVERSE - 
                                  enum:
                                    - ''
                                    - SALUTATION_MALE
                                    - SALUTATION_FEMALE
                                    - SALUTATION_FEMALE_MARRIED
                                    - SALUTATION_DIVERSE
                                  default: ''
                                title:
                                  type: string
                                  description: >-
                                    Title of the user used in reports and
                                    statements.

                                    * (empty string) - 

                                    * DR - Doctor

                                    * PROF - Professor

                                    * PROF_DR - 

                                    * DIPL_ING - Graduate engineer
                                    (Diplom-Ingenieur)

                                    * MAGISTER - 
                                  enum:
                                    - ''
                                    - DR
                                    - PROF
                                    - PROF_DR
                                    - DIPL_ING
                                    - MAGISTER
                                  default: ''
                                birth_date:
                                  type: string
                                  format: date
                                  description: >-
                                    Birth date of the user in YYYY-MM-DD format.
                                    [RFC 3339, section
                                    5.6](https://json-schema.org/draft/2020-12/json-schema-validation.html#RFC3339)
                                birth_city:
                                  title: City name
                                  type: string
                                  minLength: 1
                                  maxLength: 85
                                birth_country:
                                  description: >-
                                    Accepted country code. [ISO 3166-1 alpha-2
                                    codes](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2).
                                  type: string
                                  enum:
                                    - AD
                                    - AE
                                    - AF
                                    - AG
                                    - AI
                                    - AL
                                    - AM
                                    - AO
                                    - AQ
                                    - AR
                                    - AS
                                    - AT
                                    - AU
                                    - AW
                                    - AX
                                    - AZ
                                    - BA
                                    - BB
                                    - BD
                                    - BE
                                    - BF
                                    - BG
                                    - BH
                                    - BI
                                    - BJ
                                    - BL
                                    - BM
                                    - BN
                                    - BO
                                    - BQ
                                    - BR
                                    - BS
                                    - BT
                                    - BV
                                    - BW
                                    - BY
                                    - BZ
                                    - CA
                                    - CC
                                    - CD
                                    - CF
                                    - CG
                                    - CH
                                    - CI
                                    - CK
                                    - CL
                                    - CM
                                    - CN
                                    - CO
                                    - CR
                                    - CU
                                    - CV
                                    - CW
                                    - CX
                                    - CY
                                    - CZ
                                    - DE
                                    - DJ
                                    - DK
                                    - DM
                                    - DO
                                    - DZ
                                    - EC
                                    - EE
                                    - EG
                                    - EH
                                    - ER
                                    - ES
                                    - ET
                                    - FI
                                    - FJ
                                    - FK
                                    - FM
                                    - FO
                                    - FR
                                    - GA
                                    - GB
                                    - GD
                                    - GE
                                    - GF
                                    - GG
                                    - GH
                                    - GI
                                    - GL
                                    - GM
                                    - GN
                                    - GP
                                    - GQ
                                    - GR
                                    - GS
                                    - GT
                                    - GU
                                    - GW
                                    - GY
                                    - HK
                                    - HM
                                    - HN
                                    - HR
                                    - HT
                                    - HU
                                    - ID
                                    - IE
                                    - IL
                                    - IM
                                    - IN
                                    - IO
                                    - IQ
                                    - IR
                                    - IS
                                    - IT
                                    - JE
                                    - JM
                                    - JO
                                    - JP
                                    - KE
                                    - KG
                                    - KH
                                    - KI
                                    - KM
                                    - KN
                                    - KP
                                    - KR
                                    - KW
                                    - KY
                                    - KZ
                                    - LA
                                    - LB
                                    - LC
                                    - LI
                                    - LK
                                    - LR
                                    - LS
                                    - LT
                                    - LU
                                    - LV
                                    - LY
                                    - MA
                                    - MC
                                    - MD
                                    - ME
                                    - MF
                                    - MG
                                    - MH
                                    - MK
                                    - ML
                                    - MM
                                    - MN
                                    - MO
                                    - MP
                                    - MQ
                                    - MR
                                    - MS
                                    - MT
                                    - MU
                                    - MV
                                    - MW
                                    - MX
                                    - MY
                                    - MZ
                                    - NA
                                    - NC
                                    - NE
                                    - NF
                                    - NG
                                    - NI
                                    - NL
                                    - 'NO'
                                    - NP
                                    - NR
                                    - NU
                                    - NZ
                                    - OM
                                    - PA
                                    - PE
                                    - PF
                                    - PG
                                    - PH
                                    - PK
                                    - PL
                                    - PM
                                    - PN
                                    - PR
                                    - PS
                                    - PT
                                    - PW
                                    - PY
                                    - QA
                                    - RE
                                    - RO
                                    - RS
                                    - RU
                                    - RW
                                    - SA
                                    - SB
                                    - SC
                                    - SD
                                    - SE
                                    - SG
                                    - SH
                                    - SI
                                    - SJ
                                    - SK
                                    - SL
                                    - SM
                                    - SN
                                    - SO
                                    - SR
                                    - SS
                                    - ST
                                    - SV
                                    - SX
                                    - SY
                                    - SZ
                                    - TC
                                    - TD
                                    - TF
                                    - TG
                                    - TH
                                    - TJ
                                    - TK
                                    - TL
                                    - TM
                                    - TN
                                    - TO
                                    - TR
                                    - TT
                                    - TV
                                    - TW
                                    - TZ
                                    - UA
                                    - UG
                                    - UM
                                    - US
                                    - UY
                                    - UZ
                                    - VA
                                    - VC
                                    - VE
                                    - VG
                                    - VI
                                    - VN
                                    - VU
                                    - WF
                                    - WS
                                    - XK
                                    - YE
                                    - YT
                                    - ZA
                                    - ZM
                                    - ZW
                                birth_name:
                                  type: string
                                  maxLength: 100
                                  description: If applicable, birth name of the user.
                                nationalities:
                                  type: array
                                  items:
                                    description: >-
                                      Accepted country code. [ISO 3166-1 alpha-2
                                      codes](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2).
                                    type: string
                                    enum:
                                      - AD
                                      - AE
                                      - AF
                                      - AG
                                      - AI
                                      - AL
                                      - AM
                                      - AO
                                      - AQ
                                      - AR
                                      - AS
                                      - AT
                                      - AU
                                      - AW
                                      - AX
                                      - AZ
                                      - BA
                                      - BB
                                      - BD
                                      - BE
                                      - BF
                                      - BG
                                      - BH
                                      - BI
                                      - BJ
                                      - BL
                                      - BM
                                      - BN
                                      - BO
                                      - BQ
                                      - BR
                                      - BS
                                      - BT
                                      - BV
                                      - BW
                                      - BY
                                      - BZ
                                      - CA
                                      - CC
                                      - CD
                                      - CF
                                      - CG
                                      - CH
                                      - CI
                                      - CK
                                      - CL
                                      - CM
                                      - CN
                                      - CO
                                      - CR
                                      - CU
                                      - CV
                                      - CW
                                      - CX
                                      - CY
                                      - CZ
                                      - DE
                                      - DJ
                                      - DK
                                      - DM
                                      - DO
                                      - DZ
                                      - EC
                                      - EE
                                      - EG
                                      - EH
                                      - ER
                                      - ES
                                      - ET
                                      - FI
                                      - FJ
                                      - FK
                                      - FM
                                      - FO
                                      - FR
                                      - GA
                                      - GB
                                      - GD
                                      - GE
                                      - GF
                                      - GG
                                      - GH
                                      - GI
                                      - GL
                                      - GM
                                      - GN
                                      - GP
                                      - GQ
                                      - GR
                                      - GS
                                      - GT
                                      - GU
                                      - GW
                                      - GY
                                      - HK
                                      - HM
                                      - HN
                                      - HR
                                      - HT
                                      - HU
                                      - ID
                                      - IE
                                      - IL
                                      - IM
                                      - IN
                                      - IO
                                      - IQ
                                      - IR
                                      - IS
                                      - IT
                                      - JE
                                      - JM
                                      - JO
                                      - JP
                                      - KE
                                      - KG
                                      - KH
                                      - KI
                                      - KM
                                      - KN
                                      - KP
                                      - KR
                                      - KW
                                      - KY
                                      - KZ
                                      - LA
                                      - LB
                                      - LC
                                      - LI
                                      - LK
                                      - LR
                                      - LS
                                      - LT
                                      - LU
                                      - LV
                                      - LY
                                      - MA
                                      - MC
                                      - MD
                                      - ME
                                      - MF
                                      - MG
                                      - MH
                                      - MK
                                      - ML
                                      - MM
                                      - MN
                                      - MO
                                      - MP
                                      - MQ
                                      - MR
                                      - MS
                                      - MT
                                      - MU
                                      - MV
                                      - MW
                                      - MX
                                      - MY
                                      - MZ
                                      - NA
                                      - NC
                                      - NE
                                      - NF
                                      - NG
                                      - NI
                                      - NL
                                      - 'NO'
                                      - NP
                                      - NR
                                      - NU
                                      - NZ
                                      - OM
                                      - PA
                                      - PE
                                      - PF
                                      - PG
                                      - PH
                                      - PK
                                      - PL
                                      - PM
                                      - PN
                                      - PR
                                      - PS
                                      - PT
                                      - PW
                                      - PY
                                      - QA
                                      - RE
                                      - RO
                                      - RS
                                      - RU
                                      - RW
                                      - SA
                                      - SB
                                      - SC
                                      - SD
                                      - SE
                                      - SG
                                      - SH
                                      - SI
                                      - SJ
                                      - SK
                                      - SL
                                      - SM
                                      - SN
                                      - SO
                                      - SR
                                      - SS
                                      - ST
                                      - SV
                                      - SX
                                      - SY
                                      - SZ
                                      - TC
                                      - TD
                                      - TF
                                      - TG
                                      - TH
                                      - TJ
                                      - TK
                                      - TL
                                      - TM
                                      - TN
                                      - TO
                                      - TR
                                      - TT
                                      - TV
                                      - TW
                                      - TZ
                                      - UA
                                      - UG
                                      - UM
                                      - US
                                      - UY
                                      - UZ
                                      - VA
                                      - VC
                                      - VE
                                      - VG
                                      - VI
                                      - VN
                                      - VU
                                      - WF
                                      - WS
                                      - XK
                                      - YE
                                      - YT
                                      - ZA
                                      - ZM
                                      - ZW
                                  minItems: 1
                                  description: >-
                                    Nationalities of the user. [ISO 3166 alpha-2
                                    Codes](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2).
                                address:
                                  title: Address
                                  type: object
                                  description: >-
                                    Address. Must not be a P.O. box or c/o
                                    address.
                                  properties:
                                    address_line1:
                                      type: string
                                      description: First address line of the address.
                                      maxLength: 100
                                    address_line2:
                                      type: string
                                      description: Second address line of the address.
                                      maxLength: 100
                                    postcode:
                                      title: Postal code
                                      type: string
                                      description: Postal code (postcode, PIN or ZIP code)
                                      pattern: >-
                                        ^[a-zA-Z0-9][a-zA-Z0-9\s\-]{0,8}[a-zA-Z0-9]?$
                                    country:
                                      description: >-
                                        Accepted country code. [ISO 3166-1
                                        alpha-2
                                        codes](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2).
                                      type: string
                                      enum:
                                        - AD
                                        - AE
                                        - AF
                                        - AG
                                        - AI
                                        - AL
                                        - AM
                                        - AO
                                        - AQ
                                        - AR
                                        - AS
                                        - AT
                                        - AU
                                        - AW
                                        - AX
                                        - AZ
                                        - BA
                                        - BB
                                        - BD
                                        - BE
                                        - BF
                                        - BG
                                        - BH
                                        - BI
                                        - BJ
                                        - BL
                                        - BM
                                        - BN
                                        - BO
                                        - BQ
                                        - BR
                                        - BS
                                        - BT
                                        - BV
                                        - BW
                                        - BY
                                        - BZ
                                        - CA
                                        - CC
                                        - CD
                                        - CF
                                        - CG
                                        - CH
                                        - CI
                                        - CK
                                        - CL
                                        - CM
                                        - CN
                                        - CO
                                        - CR
                                        - CU
                                        - CV
                                        - CW
                                        - CX
                                        - CY
                                        - CZ
                                        - DE
                                        - DJ
                                        - DK
                                        - DM
                                        - DO
                                        - DZ
                                        - EC
                                        - EE
                                        - EG
                                        - EH
                                        - ER
                                        - ES
                                        - ET
                                        - FI
                                        - FJ
                                        - FK
                                        - FM
                                        - FO
                                        - FR
                                        - GA
                                        - GB
                                        - GD
                                        - GE
                                        - GF
                                        - GG
                                        - GH
                                        - GI
                                        - GL
                                        - GM
                                        - GN
                                        - GP
                                        - GQ
                                        - GR
                                        - GS
                                        - GT
                                        - GU
                                        - GW
                                        - GY
                                        - HK
                                        - HM
                                        - HN
                                        - HR
                                        - HT
                                        - HU
                                        - ID
                                        - IE
                                        - IL
                                        - IM
                                        - IN
                                        - IO
                                        - IQ
                                        - IR
                                        - IS
                                        - IT
                                        - JE
                                        - JM
                                        - JO
                                        - JP
                                        - KE
                                        - KG
                                        - KH
                                        - KI
                                        - KM
                                        - KN
                                        - KP
                                        - KR
                                        - KW
                                        - KY
                                        - KZ
                                        - LA
                                        - LB
                                        - LC
                                        - LI
                                        - LK
                                        - LR
                                        - LS
                                        - LT
                                        - LU
                                        - LV
                                        - LY
                                        - MA
                                        - MC
                                        - MD
                                        - ME
                                        - MF
                                        - MG
                                        - MH
                                        - MK
                                        - ML
                                        - MM
                                        - MN
                                        - MO
                                        - MP
                                        - MQ
                                        - MR
                                        - MS
                                        - MT
                                        - MU
                                        - MV
                                        - MW
                                        - MX
                                        - MY
                                        - MZ
                                        - NA
                                        - NC
                                        - NE
                                        - NF
                                        - NG
                                        - NI
                                        - NL
                                        - 'NO'
                                        - NP
                                        - NR
                                        - NU
                                        - NZ
                                        - OM
                                        - PA
                                        - PE
                                        - PF
                                        - PG
                                        - PH
                                        - PK
                                        - PL
                                        - PM
                                        - PN
                                        - PR
                                        - PS
                                        - PT
                                        - PW
                                        - PY
                                        - QA
                                        - RE
                                        - RO
                                        - RS
                                        - RU
                                        - RW
                                        - SA
                                        - SB
                                        - SC
                                        - SD
                                        - SE
                                        - SG
                                        - SH
                                        - SI
                                        - SJ
                                        - SK
                                        - SL
                                        - SM
                                        - SN
                                        - SO
                                        - SR
                                        - SS
                                        - ST
                                        - SV
                                        - SX
                                        - SY
                                        - SZ
                                        - TC
                                        - TD
                                        - TF
                                        - TG
                                        - TH
                                        - TJ
                                        - TK
                                        - TL
                                        - TM
                                        - TN
                                        - TO
                                        - TR
                                        - TT
                                        - TV
                                        - TW
                                        - TZ
                                        - UA
                                        - UG
                                        - UM
                                        - US
                                        - UY
                                        - UZ
                                        - VA
                                        - VC
                                        - VE
                                        - VG
                                        - VI
                                        - VN
                                        - VU
                                        - WF
                                        - WS
                                        - XK
                                        - YE
                                        - YT
                                        - ZA
                                        - ZM
                                        - ZW
                                    state:
                                      description: >-
                                        State, province, county. [ISO 3166
                                        alpha-2
                                        Codes](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2).
                                      type: string
                                      maxLength: 50
                                    city:
                                      title: City name
                                      type: string
                                      minLength: 1
                                      maxLength: 85
                                  required:
                                    - address_line1
                                    - postcode
                                    - country
                                    - city
                                postal_address:
                                  description: >-
                                    User postal address. Needs to be specified
                                    if different to the residential address,
                                    otherwise it is automatically populated.
                                  oneOf:
                                    - title: Address
                                      type: object
                                      description: >-
                                        Address. Must not be a P.O. box or c/o
                                        address.
                                      properties:
                                        address_line1:
                                          type: string
                                          description: First address line of the address.
                                          maxLength: 100
                                        address_line2:
                                          type: string
                                          description: Second address line of the address.
                                          maxLength: 100
                                        postcode:
                                          title: Postal code
                                          type: string
                                          description: Postal code (postcode, PIN or ZIP code)
                                          pattern: >-
                                            ^[a-zA-Z0-9][a-zA-Z0-9\s\-]{0,8}[a-zA-Z0-9]?$
                                        country:
                                          description: >-
                                            Accepted country code. [ISO 3166-1
                                            alpha-2
                                            codes](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2).
                                          type: string
                                          enum:
                                            - AD
                                            - AE
                                            - AF
                                            - AG
                                            - AI
                                            - AL
                                            - AM
                                            - AO
                                            - AQ
                                            - AR
                                            - AS
                                            - AT
                                            - AU
                                            - AW
                                            - AX
                                            - AZ
                                            - BA
                                            - BB
                                            - BD
                                            - BE
                                            - BF
                                            - BG
                                            - BH
                                            - BI
                                            - BJ
                                            - BL
                                            - BM
                                            - BN
                                            - BO
                                            - BQ
                                            - BR
                                            - BS
                                            - BT
                                            - BV
                                            - BW
                                            - BY
                                            - BZ
                                            - CA
                                            - CC
                                            - CD
                                            - CF
                                            - CG
                                            - CH
                                            - CI
                                            - CK
                                            - CL
                                            - CM
                                            - CN
                                            - CO
                                            - CR
                                            - CU
                                            - CV
                                            - CW
                                            - CX
                                            - CY
                                            - CZ
                                            - DE
                                            - DJ
                                            - DK
                                            - DM
                                            - DO
                                            - DZ
                                            - EC
                                            - EE
                                            - EG
                                            - EH
                                            - ER
                                            - ES
                                            - ET
                                            - FI
                                            - FJ
                                            - FK
                                            - FM
                                            - FO
                                            - FR
                                            - GA
                                            - GB
                                            - GD
                                            - GE
                                            - GF
                                            - GG
                                            - GH
                                            - GI
                                            - GL
                                            - GM
                                            - GN
                                            - GP
                                            - GQ
                                            - GR
                                            - GS
                                            - GT
                                            - GU
                                            - GW
                                            - GY
                                            - HK
                                            - HM
                                            - HN
                                            - HR
                                            - HT
                                            - HU
                                            - ID
                                            - IE
                                            - IL
                                            - IM
                                            - IN
                                            - IO
                                            - IQ
                                            - IR
                                            - IS
                                            - IT
                                            - JE
                                            - JM
                                            - JO
                                            - JP
                                            - KE
                                            - KG
                                            - KH
                                            - KI
                                            - KM
                                            - KN
                                            - KP
                                            - KR
                                            - KW
                                            - KY
                                            - KZ
                                            - LA
                                            - LB
                                            - LC
                                            - LI
                                            - LK
                                            - LR
                                            - LS
                                            - LT
                                            - LU
                                            - LV
                                            - LY
                                            - MA
                                            - MC
                                            - MD
                                            - ME
                                            - MF
                                            - MG
                                            - MH
                                            - MK
                                            - ML
                                            - MM
                                            - MN
                                            - MO
                                            - MP
                                            - MQ
                                            - MR
                                            - MS
                                            - MT
                                            - MU
                                            - MV
                                            - MW
                                            - MX
                                            - MY
                                            - MZ
                                            - NA
                                            - NC
                                            - NE
                                            - NF
                                            - NG
                                            - NI
                                            - NL
                                            - 'NO'
                                            - NP
                                            - NR
                                            - NU
                                            - NZ
                                            - OM
                                            - PA
                                            - PE
                                            - PF
                                            - PG
                                            - PH
                                            - PK
                                            - PL
                                            - PM
                                            - PN
                                            - PR
                                            - PS
                                            - PT
                                            - PW
                                            - PY
                                            - QA
                                            - RE
                                            - RO
                                            - RS
                                            - RU
                                            - RW
                                            - SA
                                            - SB
                                            - SC
                                            - SD
                                            - SE
                                            - SG
                                            - SH
                                            - SI
                                            - SJ
                                            - SK
                                            - SL
                                            - SM
                                            - SN
                                            - SO
                                            - SR
                                            - SS
                                            - ST
                                            - SV
                                            - SX
                                            - SY
                                            - SZ
                                            - TC
                                            - TD
                                            - TF
                                            - TG
                                            - TH
                                            - TJ
                                            - TK
                                            - TL
                                            - TM
                                            - TN
                                            - TO
                                            - TR
                                            - TT
                                            - TV
                                            - TW
                                            - TZ
                                            - UA
                                            - UG
                                            - UM
                                            - US
                                            - UY
                                            - UZ
                                            - VA
                                            - VC
                                            - VE
                                            - VG
                                            - VI
                                            - VN
                                            - VU
                                            - WF
                                            - WS
                                            - XK
                                            - YE
                                            - YT
                                            - ZA
                                            - ZM
                                            - ZW
                                        state:
                                          description: >-
                                            State, province, county. [ISO 3166
                                            alpha-2
                                            Codes](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2).
                                          type: string
                                          maxLength: 50
                                        city:
                                          title: City name
                                          type: string
                                          minLength: 1
                                          maxLength: 85
                                      required:
                                        - address_line1
                                        - postcode
                                        - country
                                        - city
                                    - type: 'null'
                                status:
                                  type: string
                                  description: |-
                                    Status of the user.
                                    * ACTIVE - 
                                    * INACTIVE - 
                                    * OFFBOARDING - 
                                    * OFFBOARDED - 
                                  enum:
                                    - ACTIVE
                                    - INACTIVE
                                    - OFFBOARDING
                                    - OFFBOARDED
                                email:
                                  type: string
                                  format: email
                                  maxLength: 100
                                  description: >-
                                    Email of the user. Must be a valid email
                                    address.
                                phone_number:
                                  type: string
                                  pattern: ^([0-9]{8,15})?$
                                  description: >-
                                    Phone number of the user. [Phone number
                                    E.164
                                    format](https://en.wikipedia.org/wiki/E.164).
                                fatca:
                                  type: object
                                  properties:
                                    status:
                                      type: boolean
                                      description: >-
                                        The user’s FATCA status is true if the
                                        user is subject to paying taxes in the
                                        US, otherwise it can be set to false.
                                    confirmed_at:
                                      type: string
                                      format: date-time
                                      description: >-
                                        Timestamp at which the user confirmed
                                        their FATCA status. [RFC
                                        3339-5](https://datatracker.ietf.org/doc/html/rfc3339#section-5.6),
                                        [ISO8601
                                        UTC](https://www.iso.org/iso-8601-date-and-time-format.html)
                                  required:
                                    - status
                                    - confirmed_at
                                terms_and_conditions:
                                  type: object
                                  properties:
                                    consent_document_id:
                                      title: Consent unique identifier.
                                      type: string
                                      description: Consent unique identifier.
                                      format: uuid
                                    confirmed_at:
                                      type: string
                                      format: date-time
                                      description: >-
                                        Timestamp at which the user consented to
                                        the terms & conditions. [RFC
                                        3339-5](https://datatracker.ietf.org/doc/html/rfc3339#section-5.6),
                                        [ISO8601
                                        UTC](https://www.iso.org/iso-8601-date-and-time-format.html)
                                  required:
                                    - consent_document_id
                                    - confirmed_at
                                data_privacy_and_sharing_agreement:
                                  type: object
                                  properties:
                                    consent_document_id:
                                      title: Consent unique identifier.
                                      type: string
                                      description: Consent unique identifier.
                                      format: uuid
                                    confirmed_at:
                                      type: string
                                      format: date-time
                                      description: >-
                                        Timestamp at which the user consented to
                                        the data sharing agreement. [RFC
                                        3339-5](https://datatracker.ietf.org/doc/html/rfc3339#section-5.6),
                                        [ISO8601
                                        UTC](https://www.iso.org/iso-8601-date-and-time-format.html)
                                  required:
                                    - consent_document_id
                                    - confirmed_at
                                branch_id:
                                  title: Branch unique identifier.
                                  type: string
                                  description: >-
                                    Unique identifier of the market the user is
                                    onboarded on. Only relevant if the client is
                                    operating in different markets and the
                                    client is configured accordingly
                                  format: uuid
                              required:
                                - id
                                - created_at
                                - updated_at
                                - first_name
                                - last_name
                                - birth_date
                                - nationalities
                                - address
                                - status
                              additionalProperties: false
                      - title: empty Users - List
                        description: >-
                          For empty lists, JSON schema's 'oneOf' matches both
                          'Users (BYOL) - List' *and* 'Users (TOL) - List' and
                          hence fails. So we need this extra 'oneOf' branch
                          specifically for empty lists, distinguished by
                          'minItems' and 'maxItems'.
                        type: array
                        maxItems: 0
                        items:
                          description: All items on list responses must be objects.
                          type: object
                          properties: {}
                required:
                  - meta
                  - data
                additionalProperties: false
              examples:
                BYOL:
                  summary: BYOL users
                  value:
                    meta:
                      offset: 0
                      limit: 100
                      count: 1
                      total_count: 1
                      sort: created_at
                      order: ASC
                    data:
                      - id: 83d83ec2-d2ca-49ff-bbea-b92b5c3be202
                        created_at: '2021-07-21T14:10:00.00Z'
                        updated_at: '2021-07-21T14:10:00.00Z'
                        first_name: Karl
                        last_name: Schmidt
                        salutation: SALUTATION_MALE
                        title: DR
                        birth_date: '1972-09-30'
                        birth_city: Berlin
                        birth_country: DE
                        birth_name: Schmidt
                        nationalities:
                          - DE
                          - AU
                        postal_address:
                          address_line1: Rosenweg 221
                          address_line2: apt. 33
                          postcode: '45678'
                          city: Berlin
                          state: BE
                          country: DE
                        address:
                          address_line1: Rosenweg 221
                          address_line2: apt. 33
                          postcode: '45678'
                          city: Berlin
                          state: BE
                          country: DE
                        status: ACTIVE
                      - id: 287673ef-1bae-4d8a-9e78-8ddaae249d72
                        created_at: '2021-07-21T14:10:00.00Z'
                        updated_at: '2021-07-21T14:10:00.00Z'
                        first_name: John
                        last_name: Doe
                        salutation: SALUTATION_MALE
                        title: PROF_DR
                        birth_date: '1970-10-01'
                        birth_city: Berlin
                        birth_country: DE
                        birth_name: Schmidt
                        nationalities:
                          - DE
                          - AU
                        postal_address: null
                        address:
                          address_line1: Rosenweg 221
                          address_line2: apt. 33
                          postcode: '45678'
                          city: Berlin
                          state: BE
                          country: DE
                        status: ACTIVE
                BYOL With Branch ID:
                  summary: BYOL users with branch ID
                  value:
                    meta:
                      offset: 0
                      limit: 100
                      count: 1
                      total_count: 1
                      sort: created_at
                      order: ASC
                    data:
                      - id: 83d83ec2-d2ca-49ff-bbea-b92b5c3be202
                        created_at: '2021-07-21T14:10:00.00Z'
                        updated_at: '2021-07-21T14:10:00.00Z'
                        first_name: Karl
                        last_name: Schmidt
                        salutation: SALUTATION_MALE
                        title: DR
                        birth_date: '1972-09-30'
                        birth_city: Berlin
                        birth_country: DE
                        birth_name: Schmidt
                        nationalities:
                          - DE
                          - AU
                        postal_address:
                          address_line1: Rosenweg 221
                          address_line2: apt. 33
                          postcode: '45678'
                          city: Berlin
                          state: BE
                          country: DE
                        address:
                          address_line1: Rosenweg 221
                          address_line2: apt. 33
                          postcode: '45678'
                          city: Berlin
                          state: BE
                          country: DE
                        status: ACTIVE
                        branch_id: e6373bfa-ff12-4004-8de9-747ac96764da
                      - id: 287673ef-1bae-4d8a-9e78-8ddaae249d72
                        created_at: '2021-07-21T14:10:00.00Z'
                        updated_at: '2021-07-21T14:10:00.00Z'
                        first_name: John
                        last_name: Doe
                        salutation: SALUTATION_MALE
                        title: PROF_DR
                        birth_date: '1970-10-01'
                        birth_city: Berlin
                        birth_country: DE
                        birth_name: Schmidt
                        nationalities:
                          - DE
                          - AU
                        postal_address: null
                        address:
                          address_line1: Rosenweg 221
                          address_line2: apt. 33
                          postcode: '45678'
                          city: Berlin
                          state: BE
                          country: DE
                        status: ACTIVE
                        branch_id: e6373bfa-ff12-4004-8de9-747ac96764da
                TOL:
                  summary: TOL users
                  value:
                    meta:
                      offset: 0
                      limit: 100
                      count: 1
                      total_count: 1
                      sort: created_at
                      order: ASC
                    data:
                      - id: 83d83ec2-d2ca-49ff-bbea-b92b5c3be202
                        created_at: '2021-07-21T14:10:00.00Z'
                        updated_at: '2021-07-21T14:10:00.00Z'
                        first_name: Karl
                        last_name: Schmidt
                        email: karl.schmidt@example.com
                        salutation: SALUTATION_MALE
                        title: DR
                        birth_date: '1972-09-30'
                        birth_city: Berlin
                        birth_country: DE
                        birth_name: Schmidt
                        nationalities:
                          - DE
                          - AU
                        phone_number: '4930901820'
                        postal_address:
                          address_line1: Rosenweg 221
                          address_line2: apt. 33
                          postcode: '45678'
                          city: Berlin
                          state: BE
                          country: DE
                        address:
                          address_line1: Rosenweg 221
                          address_line2: apt. 33
                          postcode: '45678'
                          city: Berlin
                          state: BE
                          country: DE
                        fatca:
                          status: false
                          confirmed_at: '2020-08-24T14:15:22Z'
                        terms_and_conditions:
                          consent_document_id: d0b83880-3809-4eee-b0df-ca50db84c15a
                          confirmed_at: '2020-08-24T14:14:22Z'
                        data_privacy_and_sharing_agreement:
                          consent_document_id: 7ab0fc5c-8157-4acd-b02d-6ccda0e81dec
                          confirmed_at: '2020-08-24T14:16:22Z'
                        status: ACTIVE
                      - id: 83d83ec2-d2ca-49ff-bbea-b92b5c3be202
                        created_at: '2021-07-21T14:10:00.00Z'
                        updated_at: '2021-07-21T14:10:00.00Z'
                        first_name: Karl
                        last_name: Schmidt
                        email: karl.schmidt@example.com
                        salutation: SALUTATION_MALE
                        title: DR
                        birth_date: '1972-09-30'
                        birth_city: Berlin
                        birth_country: DE
                        birth_name: Schmidt
                        nationalities:
                          - DE
                          - AU
                        phone_number: '4930901820'
                        postal_address: null
                        address:
                          address_line1: Rosenweg 221
                          address_line2: apt. 33
                          postcode: '45678'
                          city: Berlin
                          state: BE
                          country: DE
                        fatca:
                          status: false
                          confirmed_at: '2020-08-24T14:15:22Z'
                        terms_and_conditions:
                          consent_document_id: a8a87268-4f3c-4de2-abb9-a553a3bb7608
                          confirmed_at: '2020-08-24T14:14:22Z'
                        data_privacy_and_sharing_agreement:
                          consent_document_id: fb1827c3-2b29-47e1-84da-996d09517edc
                          confirmed_at: '2020-08-24T14:16:22Z'
                        status: ACTIVE
                TOL With Branch ID:
                  summary: TOL users with branch ID
                  value:
                    meta:
                      offset: 0
                      limit: 100
                      count: 2
                      total_count: 2
                      sort: created_at
                      order: ASC
                    data:
                      - id: 83d83ec2-d2ca-49ff-bbea-b92b5c3be202
                        created_at: '2021-07-21T14:10:00.00Z'
                        updated_at: '2021-07-21T14:10:00.00Z'
                        first_name: Karl
                        last_name: Schmidt
                        email: karl.schmidt@example.com
                        salutation: SALUTATION_MALE
                        title: DR
                        birth_date: '1972-09-30'
                        birth_city: Berlin
                        birth_country: DE
                        birth_name: Schmidt
                        nationalities:
                          - DE
                          - AU
                        phone_number: '4930901820'
                        postal_address:
                          address_line1: Rosenweg 221
                          address_line2: apt. 33
                          postcode: '45678'
                          city: Berlin
                          state: BE
                          country: DE
                        address:
                          address_line1: Rosenweg 221
                          address_line2: apt. 33
                          postcode: '45678'
                          city: Berlin
                          state: BE
                          country: DE
                        fatca:
                          status: false
                          confirmed_at: '2020-08-24T14:15:22Z'
                        terms_and_conditions:
                          consent_document_id: d0b83880-3809-4eee-b0df-ca50db84c15a
                          confirmed_at: '2020-08-24T14:14:22Z'
                        data_privacy_and_sharing_agreement:
                          consent_document_id: 7ab0fc5c-8157-4acd-b02d-6ccda0e81dec
                          confirmed_at: '2020-08-24T14:16:22Z'
                        status: ACTIVE
                        branch_id: e6373bfa-ff12-4004-8de9-747ac96764da
                      - id: 83d83ec2-d2ca-49ff-bbea-b92b5c3be202
                        created_at: '2021-07-21T14:10:00.00Z'
                        updated_at: '2021-07-21T14:10:00.00Z'
                        first_name: Karl
                        last_name: Schmidt
                        email: karl.schmidt@example.com
                        salutation: SALUTATION_MALE
                        title: DR
                        birth_date: '1972-09-30'
                        birth_city: Berlin
                        birth_country: DE
                        birth_name: Schmidt
                        nationalities:
                          - DE
                          - AU
                        phone_number: '4930901820'
                        postal_address: null
                        address:
                          address_line1: Rosenweg 221
                          address_line2: apt. 33
                          postcode: '45678'
                          city: Berlin
                          state: BE
                          country: DE
                        fatca:
                          status: false
                          confirmed_at: '2020-08-24T14:15:22Z'
                        terms_and_conditions:
                          consent_document_id: a8a87268-4f3c-4de2-abb9-a553a3bb7608
                          confirmed_at: '2020-08-24T14:14:22Z'
                        data_privacy_and_sharing_agreement:
                          consent_document_id: fb1827c3-2b29-47e1-84da-996d09517edc
                          confirmed_at: '2020-08-24T14:16:22Z'
                        status: ACTIVE
                        branch_id: e6373bfa-ff12-4004-8de9-747ac96764da
                empty:
                  summary: Empty users list
                  value:
                    meta:
                      offset: 0
                      limit: 100
                      count: 0
                      total_count: 0
                      sort: created_at
                      order: ASC
                    data: []
        '400':
          description: Bad Request. The incoming request had a malformed parameter/object.
          headers:
            upvest-request-id:
              required: true
              schema:
                type: string
                format: uuid
                example: 169ae4c7-ebd7-4041-94da-25369653eba7
          content:
            application/problem+json:
              schema:
                title: Error
                type: object
                description: ''
                properties:
                  type:
                    type: string
                    description: URL to a document describing the error condition.
                  status:
                    type: integer
                    description: >-
                      Transmission of the HTTP status code so that all
                      information can be found in one place, but also to correct
                      changes in the status code due to the use of proxy
                      servers.
                  title:
                    type: string
                    description: >-
                      A short, human-readable title for the general error type;
                      the title should not change for given types.
                  detail:
                    type: string
                    description: A human-readable description of the specific error.
                  instance:
                    type: string
                    description: >-
                      This optional key may be present, with a unique URI for
                      the specific error; this will often point to an error log
                      for that specific response.
                  request_id:
                    type: string
                    description: Correlation ID for the original request.
                required:
                  - type
                  - status
                additionalProperties: false
              example:
                status: 400
                type: bad_request
        '401':
          description: Unauthorized. The caller has not been authenticated.
          headers:
            upvest-request-id:
              required: true
              schema:
                type: string
                format: uuid
                example: 169ae4c7-ebd7-4041-94da-25369653eba7
          content:
            application/problem+json:
              schema:
                title: Error
                type: object
                description: ''
                properties:
                  type:
                    type: string
                    description: URL to a document describing the error condition.
                  status:
                    type: integer
                    description: >-
                      Transmission of the HTTP status code so that all
                      information can be found in one place, but also to correct
                      changes in the status code due to the use of proxy
                      servers.
                  title:
                    type: string
                    description: >-
                      A short, human-readable title for the general error type;
                      the title should not change for given types.
                  detail:
                    type: string
                    description: A human-readable description of the specific error.
                  instance:
                    type: string
                    description: >-
                      This optional key may be present, with a unique URI for
                      the specific error; this will often point to an error log
                      for that specific response.
                  request_id:
                    type: string
                    description: Correlation ID for the original request.
                required:
                  - type
                  - status
                additionalProperties: false
              example:
                status: 401
                type: unauthorized
        '403':
          description: >-
            Forbidden. The caller has been authenticated but is not allowed to
            take the requested action.
          headers:
            upvest-request-id:
              required: true
              schema:
                type: string
                format: uuid
                example: 169ae4c7-ebd7-4041-94da-25369653eba7
          content:
            application/problem+json:
              schema:
                title: Error
                type: object
                description: ''
                properties:
                  type:
                    type: string
                    description: URL to a document describing the error condition.
                  status:
                    type: integer
                    description: >-
                      Transmission of the HTTP status code so that all
                      information can be found in one place, but also to correct
                      changes in the status code due to the use of proxy
                      servers.
                  title:
                    type: string
                    description: >-
                      A short, human-readable title for the general error type;
                      the title should not change for given types.
                  detail:
                    type: string
                    description: A human-readable description of the specific error.
                  instance:
                    type: string
                    description: >-
                      This optional key may be present, with a unique URI for
                      the specific error; this will often point to an error log
                      for that specific response.
                  request_id:
                    type: string
                    description: Correlation ID for the original request.
                required:
                  - type
                  - status
                additionalProperties: false
              example:
                status: 403
                type: forbidden
        '406':
          description: >-
            Not Acceptable. The resource does not have a current representation
            that would be acceptable to the user agent. "Accept" header defined
            unsupported value.
          headers:
            upvest-request-id:
              required: true
              schema:
                type: string
                format: uuid
                example: 169ae4c7-ebd7-4041-94da-25369653eba7
          content:
            application/problem+json:
              schema:
                title: Error
                type: object
                description: ''
                properties:
                  type:
                    type: string
                    description: URL to a document describing the error condition.
                  status:
                    type: integer
                    description: >-
                      Transmission of the HTTP status code so that all
                      information can be found in one place, but also to correct
                      changes in the status code due to the use of proxy
                      servers.
                  title:
                    type: string
                    description: >-
                      A short, human-readable title for the general error type;
                      the title should not change for given types.
                  detail:
                    type: string
                    description: A human-readable description of the specific error.
                  instance:
                    type: string
                    description: >-
                      This optional key may be present, with a unique URI for
                      the specific error; this will often point to an error log
                      for that specific response.
                  request_id:
                    type: string
                    description: Correlation ID for the original request.
                required:
                  - type
                  - status
                additionalProperties: false
              example:
                status: 406
                type: not_acceptable
        '429':
          description: >-
            Too Many Requests. The caller has exceeded their quota for the time
            period and has been throttled.
          headers:
            upvest-request-id:
              required: true
              schema:
                type: string
                format: uuid
                example: 169ae4c7-ebd7-4041-94da-25369653eba7
          content:
            application/problem+json:
              schema:
                title: Error
                type: object
                description: ''
                properties:
                  type:
                    type: string
                    description: URL to a document describing the error condition.
                  status:
                    type: integer
                    description: >-
                      Transmission of the HTTP status code so that all
                      information can be found in one place, but also to correct
                      changes in the status code due to the use of proxy
                      servers.
                  title:
                    type: string
                    description: >-
                      A short, human-readable title for the general error type;
                      the title should not change for given types.
                  detail:
                    type: string
                    description: A human-readable description of the specific error.
                  instance:
                    type: string
                    description: >-
                      This optional key may be present, with a unique URI for
                      the specific error; this will often point to an error log
                      for that specific response.
                  request_id:
                    type: string
                    description: Correlation ID for the original request.
                required:
                  - type
                  - status
                additionalProperties: false
              example:
                status: 429
                type: too_many_requests
        '500':
          description: Internal Server Error. The service encountered an unexpected error.
          headers:
            upvest-request-id:
              required: true
              schema:
                type: string
                format: uuid
                example: 169ae4c7-ebd7-4041-94da-25369653eba7
          content:
            application/problem+json:
              schema:
                title: Error
                type: object
                description: ''
                properties:
                  type:
                    type: string
                    description: URL to a document describing the error condition.
                  status:
                    type: integer
                    description: >-
                      Transmission of the HTTP status code so that all
                      information can be found in one place, but also to correct
                      changes in the status code due to the use of proxy
                      servers.
                  title:
                    type: string
                    description: >-
                      A short, human-readable title for the general error type;
                      the title should not change for given types.
                  detail:
                    type: string
                    description: A human-readable description of the specific error.
                  instance:
                    type: string
                    description: >-
                      This optional key may be present, with a unique URI for
                      the specific error; this will often point to an error log
                      for that specific response.
                  request_id:
                    type: string
                    description: Correlation ID for the original request.
                required:
                  - type
                  - status
                additionalProperties: false
              example:
                status: 500
                type: internal_server_error
        '503':
          description: >-
            Service Unavailable. The service handling for this request cannot be
            reached at this time.
          headers:
            upvest-request-id:
              required: true
              schema:
                type: string
                format: uuid
                example: 169ae4c7-ebd7-4041-94da-25369653eba7
          content:
            application/problem+json:
              schema:
                title: Error
                type: object
                description: ''
                properties:
                  type:
                    type: string
                    description: URL to a document describing the error condition.
                  status:
                    type: integer
                    description: >-
                      Transmission of the HTTP status code so that all
                      information can be found in one place, but also to correct
                      changes in the status code due to the use of proxy
                      servers.
                  title:
                    type: string
                    description: >-
                      A short, human-readable title for the general error type;
                      the title should not change for given types.
                  detail:
                    type: string
                    description: A human-readable description of the specific error.
                  instance:
                    type: string
                    description: >-
                      This optional key may be present, with a unique URI for
                      the specific error; this will often point to an error log
                      for that specific response.
                  request_id:
                    type: string
                    description: Correlation ID for the original request.
                required:
                  - type
                  - status
                additionalProperties: false
              example:
                status: 503
                type: method_not_allowed
        '504':
          description: >-
            Gateway Timeout. The service gateway has reached its internal
            timeout.
          headers:
            upvest-request-id:
              required: true
              schema:
                type: string
                format: uuid
                example: 169ae4c7-ebd7-4041-94da-25369653eba7
          content:
            application/problem+json:
              schema:
                title: Error
                type: object
                description: ''
                properties:
                  type:
                    type: string
                    description: URL to a document describing the error condition.
                  status:
                    type: integer
                    description: >-
                      Transmission of the HTTP status code so that all
                      information can be found in one place, but also to correct
                      changes in the status code due to the use of proxy
                      servers.
                  title:
                    type: string
                    description: >-
                      A short, human-readable title for the general error type;
                      the title should not change for given types.
                  detail:
                    type: string
                    description: A human-readable description of the specific error.
                  instance:
                    type: string
                    description: >-
                      This optional key may be present, with a unique URI for
                      the specific error; this will often point to an error log
                      for that specific response.
                  request_id:
                    type: string
                    description: Correlation ID for the original request.
                required:
                  - type
                  - status
                additionalProperties: false
              example:
                status: 504
                type: gateway_timeout
    post:
      operationId: create_user
      summary: Create a user
      description: Creates a user.
      tags:
        - Users
      security:
        - oauth-client-credentials:
            - users:admin
      parameters:
        - name: idempotency-key
          in: header
          required: true
          schema:
            type: string
            format: uuid
            pattern: >-
              ^[0-9a-fA-F]{8}-?[0-9a-fA-F]{4}-?[0-5][0-9a-fA-F]{3}-?[089abAB][0-9a-fA-F]{3}-?[0-9a-fA-F]{12}$
            example: ccb07f42-4104-44ad-8e1f-c660bb7b269c
          description: >
            A UUID to be used as an idempotency key.  This prevents a duplicate
            request from being replayed.

            https://docs.upvest.co/documentation/concepts/api_concepts/idempotency
      requestBody:
        content:
          application/json:
            schema:
              title: User - Create - Request
              anyOf:
                - title: User (BYOL) - Create - Request
                  type: object
                  properties:
                    first_name:
                      type: string
                      maxLength: 100
                      minLength: 2
                      description: >-
                        First name(s) of the user. Please include all first and
                        middle names of the user.
                    last_name:
                      type: string
                      maxLength: 100
                      minLength: 1
                      description: Last name of the user.
                    salutation:
                      type: string
                      description: |-
                        Salutation of the user used in reports and statements.
                        * (empty string) - 
                        * SALUTATION_MALE - 
                        * SALUTATION_FEMALE - 
                        * SALUTATION_FEMALE_MARRIED - 
                        * SALUTATION_DIVERSE - 
                      enum:
                        - ''
                        - SALUTATION_MALE
                        - SALUTATION_FEMALE
                        - SALUTATION_FEMALE_MARRIED
                        - SALUTATION_DIVERSE
                      default: ''
                    title:
                      type: string
                      description: |-
                        Title of the user used in reports and statements.
                        * (empty string) - 
                        * DR - Doctor
                        * PROF - Professor
                        * PROF_DR - 
                        * DIPL_ING - Graduate engineer (Diplom-Ingenieur)
                        * MAGISTER - 
                      enum:
                        - ''
                        - DR
                        - PROF
                        - PROF_DR
                        - DIPL_ING
                        - MAGISTER
                      default: ''
                    birth_date:
                      type: string
                      format: date
                      description: >-
                        Birth date of the user in YYYY-MM-DD format. [RFC 3339,
                        section
                        5.6](https://json-schema.org/draft/2020-12/json-schema-validation.html#RFC3339)
                    birth_city:
                      title: City name
                      type: string
                      minLength: 1
                      maxLength: 85
                    birth_country:
                      description: >-
                        Accepted country code. [ISO 3166-1 alpha-2
                        codes](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2).
                      type: string
                      enum:
                        - AD
                        - AE
                        - AF
                        - AG
                        - AI
                        - AL
                        - AM
                        - AO
                        - AQ
                        - AR
                        - AS
                        - AT
                        - AU
                        - AW
                        - AX
                        - AZ
                        - BA
                        - BB
                        - BD
                        - BE
                        - BF
                        - BG
                        - BH
                        - BI
                        - BJ
                        - BL
                        - BM
                        - BN
                        - BO
                        - BQ
                        - BR
                        - BS
                        - BT
                        - BV
                        - BW
                        - BY
                        - BZ
                        - CA
                        - CC
                        - CD
                        - CF
                        - CG
                        - CH
                        - CI
                        - CK
                        - CL
                        - CM
                        - CN
                        - CO
                        - CR
                        - CU
                        - CV
                        - CW
                        - CX
                        - CY
                        - CZ
                        - DE
                        - DJ
                        - DK
                        - DM
                        - DO
                        - DZ
                        - EC
                        - EE
                        - EG
                        - EH
                        - ER
                        - ES
                        - ET
                        - FI
                        - FJ
                        - FK
                        - FM
                        - FO
                        - FR
                        - GA
                        - GB
                        - GD
                        - GE
                        - GF
                        - GG
                        - GH
                        - GI
                        - GL
                        - GM
                        - GN
                        - GP
                        - GQ
                        - GR
                        - GS
                        - GT
                        - GU
                        - GW
                        - GY
                        - HK
                        - HM
                        - HN
                        - HR
                        - HT
                        - HU
                        - ID
                        - IE
                        - IL
                        - IM
                        - IN
                        - IO
                        - IQ
                        - IR
                        - IS
                        - IT
                        - JE
                        - JM
                        - JO
                        - JP
                        - KE
                        - KG
                        - KH
                        - KI
                        - KM
                        - KN
                        - KP
                        - KR
                        - KW
                        - KY
                        - KZ
                        - LA
                        - LB
                        - LC
                        - LI
                        - LK
                        - LR
                        - LS
                        - LT
                        - LU
                        - LV
                        - LY
                        - MA
                        - MC
                        - MD
                        - ME
                        - MF
                        - MG
                        - MH
                        - MK
                        - ML
                        - MM
                        - MN
                        - MO
                        - MP
                        - MQ
                        - MR
                        - MS
                        - MT
                        - MU
                        - MV
                        - MW
                        - MX
                        - MY
                        - MZ
                        - NA
                        - NC
                        - NE
                        - NF
                        - NG
                        - NI
                        - NL
                        - 'NO'
                        - NP
                        - NR
                        - NU
                        - NZ
                        - OM
                        - PA
                        - PE
                        - PF
                        - PG
                        - PH
                        - PK
                        - PL
                        - PM
                        - PN
                        - PR
                        - PS
                        - PT
                        - PW
                        - PY
                        - QA
                        - RE
                        - RO
                        - RS
                        - RU
                        - RW
                        - SA
                        - SB
                        - SC
                        - SD
                        - SE
                        - SG
                        - SH
                        - SI
                        - SJ
                        - SK
                        - SL
                        - SM
                        - SN
                        - SO
                        - SR
                        - SS
                        - ST
                        - SV
                        - SX
                        - SY
                        - SZ
                        - TC
                        - TD
                        - TF
                        - TG
                        - TH
                        - TJ
                        - TK
                        - TL
                        - TM
                        - TN
                        - TO
                        - TR
                        - TT
                        - TV
                        - TW
                        - TZ
                        - UA
                        - UG
                        - UM
                        - US
                        - UY
                        - UZ
                        - VA
                        - VC
                        - VE
                        - VG
                        - VI
                        - VN
                        - VU
                        - WF
                        - WS
                        - XK
                        - YE
                        - YT
                        - ZA
                        - ZM
                        - ZW
                    birth_name:
                      type: string
                      maxLength: 100
                      description: If applicable, birth name of the user.
                    nationalities:
                      type: array
                      items:
                        description: >-
                          Accepted country code. [ISO 3166-1 alpha-2
                          codes](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2).
                        type: string
                        enum:
                          - AD
                          - AE
                          - AF
                          - AG
                          - AI
                          - AL
                          - AM
                          - AO
                          - AQ
                          - AR
                          - AS
                          - AT
                          - AU
                          - AW
                          - AX
                          - AZ
                          - BA
                          - BB
                          - BD
                          - BE
                          - BF
                          - BG
                          - BH
                          - BI
                          - BJ
                          - BL
                          - BM
                          - BN
                          - BO
                          - BQ
                          - BR
                          - BS
                          - BT
                          - BV
                          - BW
                          - BY
                          - BZ
                          - CA
                          - CC
                          - CD
                          - CF
                          - CG
                          - CH
                          - CI
                          - CK
                          - CL
                          - CM
                          - CN
                          - CO
                          - CR
                          - CU
                          - CV
                          - CW
                          - CX
                          - CY
                          - CZ
                          - DE
                          - DJ
                          - DK
                          - DM
                          - DO
                          - DZ
                          - EC
                          - EE
                          - EG
                          - EH
                          - ER
                          - ES
                          - ET
                          - FI
                          - FJ
                          - FK
                          - FM
                          - FO
                          - FR
                          - GA
                          - GB
                          - GD
                          - GE
                          - GF
                          - GG
                          - GH
                          - GI
                          - GL
                          - GM
                          - GN
                          - GP
                          - GQ
                          - GR
                          - GS
                          - GT
                          - GU
                          - GW
                          - GY
                          - HK
                          - HM
                          - HN
                          - HR
                          - HT
                          - HU
                          - ID
                          - IE
                          - IL
                          - IM
                          - IN
                          - IO
                          - IQ
                          - IR
                          - IS
                          - IT
                          - JE
                          - JM
                          - JO
                          - JP
                          - KE
                          - KG
                          - KH
                          - KI
                          - KM
                          - KN
                          - KP
                          - KR
                          - KW
                          - KY
                          - KZ
                          - LA
                          - LB
                          - LC
                          - LI
                          - LK
                          - LR
                          - LS
                          - LT
                          - LU
                          - LV
                          - LY
                          - MA
                          - MC
                          - MD
                          - ME
                          - MF
                          - MG
                          - MH
                          - MK
                          - ML
                          - MM
                          - MN
                          - MO
                          - MP
                          - MQ
                          - MR
                          - MS
                          - MT
                          - MU
                          - MV
                          - MW
                          - MX
                          - MY
                          - MZ
                          - NA
                          - NC
                          - NE
                          - NF
                          - NG
                          - NI
                          - NL
                          - 'NO'
                          - NP
                          - NR
                          - NU
                          - NZ
                          - OM
                          - PA
                          - PE
                          - PF
                          - PG
                          - PH
                          - PK
                          - PL
                          - PM
                          - PN
                          - PR
                          - PS
                          - PT
                          - PW
                          - PY
                          - QA
                          - RE
                          - RO
                          - RS
                          - RU
                          - RW
                          - SA
                          - SB
                          - SC
                          - SD
                          - SE
                          - SG
                          - SH
                          - SI
                          - SJ
                          - SK
                          - SL
                          - SM
                          - SN
                          - SO
                          - SR
                          - SS
                          - ST
                          - SV
                          - SX
                          - SY
                          - SZ
                          - TC
                          - TD
                          - TF
                          - TG
                          - TH
                          - TJ
                          - TK
                          - TL
                          - TM
                          - TN
                          - TO
                          - TR
                          - TT
                          - TV
                          - TW
                          - TZ
                          - UA
                          - UG
                          - UM
                          - US
                          - UY
                          - UZ
                          - VA
                          - VC
                          - VE
                          - VG
                          - VI
                          - VN
                          - VU
                          - WF
                          - WS
                          - XK
                          - YE
                          - YT
                          - ZA
                          - ZM
                          - ZW
                      minItems: 1
                      description: >-
                        Nationalities of the user. [ISO 3166 alpha-2
                        Codes](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2).
                    address:
                      title: Address
                      type: object
                      description: Address. Must not be a P.O. box or c/o address.
                      properties:
                        address_line1:
                          type: string
                          description: First address line of the address.
                          maxLength: 100
                        address_line2:
                          type: string
                          description: Second address line of the address.
                          maxLength: 100
                        postcode:
                          title: Postal code
                          type: string
                          description: Postal code (postcode, PIN or ZIP code)
                          pattern: ^[a-zA-Z0-9][a-zA-Z0-9\s\-]{0,8}[a-zA-Z0-9]?$
                        country:
                          description: >-
                            Accepted country code. [ISO 3166-1 alpha-2
                            codes](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2).
                          type: string
                          enum:
                            - AD
                            - AE
                            - AF
                            - AG
                            - AI
                            - AL
                            - AM
                            - AO
                            - AQ
                            - AR
                            - AS
                            - AT
                            - AU
                            - AW
                            - AX
                            - AZ
                            - BA
                            - BB
                            - BD
                            - BE
                            - BF
                            - BG
                            - BH
                            - BI
                            - BJ
                            - BL
                            - BM
                            - BN
                            - BO
                            - BQ
                            - BR
                            - BS
                            - BT
                            - BV
                            - BW
                            - BY
                            - BZ
                            - CA
                            - CC
                            - CD
                            - CF
                            - CG
                            - CH
                            - CI
                            - CK
                            - CL
                            - CM
                            - CN
                            - CO
                            - CR
                            - CU
                            - CV
                            - CW
                            - CX
                            - CY
                            - CZ
                            - DE
                            - DJ
                            - DK
                            - DM
                            - DO
                            - DZ
                            - EC
                            - EE
                            - EG
                            - EH
                            - ER
                            - ES
                            - ET
                            - FI
                            - FJ
                            - FK
                            - FM
                            - FO
                            - FR
                            - GA
                            - GB
                            - GD
                            - GE
                            - GF
                            - GG
                            - GH
                            - GI
                            - GL
                            - GM
                            - GN
                            - GP
                            - GQ
                            - GR
                            - GS
                            - GT
                            - GU
                            - GW
                            - GY
                            - HK
                            - HM
                            - HN
                            - HR
                            - HT
                            - HU
                            - ID
                            - IE
                            - IL
                            - IM
                            - IN
                            - IO
                            - IQ
                            - IR
                            - IS
                            - IT
                            - JE
                            - JM
                            - JO
                            - JP
                            - KE
                            - KG
                            - KH
                            - KI
                            - KM
                            - KN
                            - KP
                            - KR
                            - KW
                            - KY
                            - KZ
                            - LA
                            - LB
                            - LC
                            - LI
                            - LK
                            - LR
                            - LS
                            - LT
                            - LU
                            - LV
                            - LY
                            - MA
                            - MC
                            - MD
                            - ME
                            - MF
                            - MG
                            - MH
                            - MK
                            - ML
                            - MM
                            - MN
                            - MO
                            - MP
                            - MQ
                            - MR
                            - MS
                            - MT
                            - MU
                            - MV
                            - MW
                            - MX
                            - MY
                            - MZ
                            - NA
                            - NC
                            - NE
                            - NF
                            - NG
                            - NI
                            - NL
                            - 'NO'
                            - NP
                            - NR
                            - NU
                            - NZ
                            - OM
                            - PA
                            - PE
                            - PF
                            - PG
                            - PH
                            - PK
                            - PL
                            - PM
                            - PN
                            - PR
                            - PS
                            - PT
                            - PW
                            - PY
                            - QA
                            - RE
                            - RO
                            - RS
                            - RU
                            - RW
                            - SA
                            - SB
                            - SC
                            - SD
                            - SE
                            - SG
                            - SH
                            - SI
                            - SJ
                            - SK
                            - SL
                            - SM
                            - SN
                            - SO
                            - SR
                            - SS
                            - ST
                            - SV
                            - SX
                            - SY
                            - SZ
                            - TC
                            - TD
                            - TF
                            - TG
                            - TH
                            - TJ
                            - TK
                            - TL
                            - TM
                            - TN
                            - TO
                            - TR
                            - TT
                            - TV
                            - TW
                            - TZ
                            - UA
                            - UG
                            - UM
                            - US
                            - UY
                            - UZ
                            - VA
                            - VC
                            - VE
                            - VG
                            - VI
                            - VN
                            - VU
                            - WF
                            - WS
                            - XK
                            - YE
                            - YT
                            - ZA
                            - ZM
                            - ZW
                        state:
                          description: >-
                            State, province, county. [ISO 3166 alpha-2
                            Codes](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2).
                          type: string
                          maxLength: 50
                        city:
                          title: City name
                          type: string
                          minLength: 1
                          maxLength: 85
                      required:
                        - address_line1
                        - postcode
                        - country
                        - city
                    postal_address:
                      description: >-
                        User postal address. Needs to be specified if different
                        to the residential address, otherwise it is
                        automatically populated.
                      oneOf:
                        - title: Address
                          type: object
                          description: Address. Must not be a P.O. box or c/o address.
                          properties:
                            address_line1:
                              type: string
                              description: First address line of the address.
                              maxLength: 100
                            address_line2:
                              type: string
                              description: Second address line of the address.
                              maxLength: 100
                            postcode:
                              title: Postal code
                              type: string
                              description: Postal code (postcode, PIN or ZIP code)
                              pattern: ^[a-zA-Z0-9][a-zA-Z0-9\s\-]{0,8}[a-zA-Z0-9]?$
                            country:
                              description: >-
                                Accepted country code. [ISO 3166-1 alpha-2
                                codes](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2).
                              type: string
                              enum:
                                - AD
                                - AE
                                - AF
                                - AG
                                - AI
                                - AL
                                - AM
                                - AO
                                - AQ
                                - AR
                                - AS
                                - AT
                                - AU
                                - AW
                                - AX
                                - AZ
                                - BA
                                - BB
                                - BD
                                - BE
                                - BF
                                - BG
                                - BH
                                - BI
                                - BJ
                                - BL
                                - BM
                                - BN
                                - BO
                                - BQ
                                - BR
                                - BS
                                - BT
                                - BV
                                - BW
                                - BY
                                - BZ
                                - CA
                                - CC
                                - CD
                                - CF
                                - CG
                                - CH
                                - CI
                                - CK
                                - CL
                                - CM
                                - CN
                                - CO
                                - CR
                                - CU
                                - CV
                                - CW
                                - CX
                                - CY
                                - CZ
                                - DE
                                - DJ
                                - DK
                                - DM
                                - DO
                                - DZ
                                - EC
                                - EE
                                - EG
                                - EH
                                - ER
                                - ES
                                - ET
                                - FI
                                - FJ
                                - FK
                                - FM
                                - FO
                                - FR
                                - GA
                                - GB
                                - GD
                                - GE
                                - GF
                                - GG
                                - GH
                                - GI
                                - GL
                                - GM
                                - GN
                                - GP
                                - GQ
                                - GR
                                - GS
                                - GT
                                - GU
                                - GW
                                - GY
                                - HK
                                - HM
                                - HN
                                - HR
                                - HT
                                - HU
                                - ID
                                - IE
                                - IL
                                - IM
                                - IN
                                - IO
                                - IQ
                                - IR
                                - IS
                                - IT
                                - JE
                                - JM
                                - JO
                                - JP
                                - KE
                                - KG
                                - KH
                                - KI
                                - KM
                                - KN
                                - KP
                                - KR
                                - KW
                                - KY
                                - KZ
                                - LA
                                - LB
                                - LC
                                - LI
                                - LK
                                - LR
                                - LS
                                - LT
                                - LU
                                - LV
                                - LY
                                - MA
                                - MC
                                - MD
                                - ME
                                - MF
                                - MG
                                - MH
                                - MK
                                - ML
                                - MM
                                - MN
                                - MO
                                - MP
                                - MQ
                                - MR
                                - MS
                                - MT
                                - MU
                                - MV
                                - MW
                                - MX
                                - MY
                                - MZ
                                - NA
                                - NC
                                - NE
                                - NF
                                - NG
                                - NI
                                - NL
                                - 'NO'
                                - NP
                                - NR
                                - NU
                                - NZ
                                - OM
                                - PA
                                - PE
                                - PF
                                - PG
                                - PH
                                - PK
                                - PL
                                - PM
                                - PN
                                - PR
                                - PS
                                - PT
                                - PW
                                - PY
                                - QA
                                - RE
                                - RO
                                - RS
                                - RU
                                - RW
                                - SA
                                - SB
                                - SC
                                - SD
                                - SE
                                - SG
                                - SH
                                - SI
                                - SJ
                                - SK
                                - SL
                                - SM
                                - SN
                                - SO
                                - SR
                                - SS
                                - ST
                                - SV
                                - SX
                                - SY
                                - SZ
                                - TC
                                - TD
                                - TF
                                - TG
                                - TH
                                - TJ
                                - TK
                                - TL
                                - TM
                                - TN
                                - TO
                                - TR
                                - TT
                                - TV
                                - TW
                                - TZ
                                - UA
                                - UG
                                - UM
                                - US
                                - UY
                                - UZ
                                - VA
                                - VC
                                - VE
                                - VG
                                - VI
                                - VN
                                - VU
                                - WF
                                - WS
                                - XK
                                - YE
                                - YT
                                - ZA
                                - ZM
                                - ZW
                            state:
                              description: >-
                                State, province, county. [ISO 3166 alpha-2
                                Codes](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2).
                              type: string
                              maxLength: 50
                            city:
                              title: City name
                              type: string
                              minLength: 1
                              maxLength: 85
                          required:
                            - address_line1
                            - postcode
                            - country
                            - city
                        - type: 'null'
                    branch_id:
                      title: Branch unique identifier.
                      type: string
                      description: >-
                        Unique identifier of the market the user is onboarded
                        on. Only relevant if the client is operating in
                        different markets and the client is configured
                        accordingly
                      format: uuid
                  required:
                    - first_name
                    - last_name
                    - birth_date
                    - nationalities
                    - address
                  additionalProperties: false
                - title: User (TOL) - Create - Request
                  type: object
                  properties:
                    first_name:
                      type: string
                      maxLength: 100
                      minLength: 2
                      description: >-
                        First name(s) of the user. Please include all first and
                        middle names of the user.
                    last_name:
                      type: string
                      maxLength: 100
                      minLength: 1
                      description: Last name of the user.
                    email:
                      type: string
                      format: email
                      maxLength: 100
                      description: Email of the user. Must be a valid email address.
                    salutation:
                      type: string
                      description: |-
                        Salutation of the user used in reports and statements.
                        * (empty string) - 
                        * SALUTATION_MALE - 
                        * SALUTATION_FEMALE - 
                        * SALUTATION_FEMALE_MARRIED - 
                        * SALUTATION_DIVERSE - 
                      enum:
                        - ''
                        - SALUTATION_MALE
                        - SALUTATION_FEMALE
                        - SALUTATION_FEMALE_MARRIED
                        - SALUTATION_DIVERSE
                      default: ''
                    title:
                      type: string
                      description: |-
                        Title of the user used in reports and statements.
                        * (empty string) - 
                        * DR - Doctor
                        * PROF - Professor
                        * PROF_DR - 
                        * DIPL_ING - Graduate engineer (Diplom-Ingenieur)
                        * MAGISTER - 
                      enum:
                        - ''
                        - DR
                        - PROF
                        - PROF_DR
                        - DIPL_ING
                        - MAGISTER
                      default: ''
                    birth_date:
                      type: string
                      format: date
                      description: >-
                        Birth date of the user in YYYY-MM-DD format. [RFC 3339,
                        section
                        5.6](https://json-schema.org/draft/2020-12/json-schema-validation.html#RFC3339)
                    birth_city:
                      allOf:
                        - title: City name
                          type: string
                          minLength: 1
                          maxLength: 85
                        - description: This field is required except for users of UK TOL
                    birth_country:
                      allOf:
                        - description: >-
                            Accepted country code. [ISO 3166-1 alpha-2
                            codes](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2).
                          type: string
                          enum:
                            - AD
                            - AE
                            - AF
                            - AG
                            - AI
                            - AL
                            - AM
                            - AO
                            - AQ
                            - AR
                            - AS
                            - AT
                            - AU
                            - AW
                            - AX
                            - AZ
                            - BA
                            - BB
                            - BD
                            - BE
                            - BF
                            - BG
                            - BH
                            - BI
                            - BJ
                            - BL
                            - BM
                            - BN
                            - BO
                            - BQ
                            - BR
                            - BS
                            - BT
                            - BV
                            - BW
                            - BY
                            - BZ
                            - CA
                            - CC
                            - CD
                            - CF
                            - CG
                            - CH
                            - CI
                            - CK
                            - CL
                            - CM
                            - CN
                            - CO
                            - CR
                            - CU
                            - CV
                            - CW
                            - CX
                            - CY
                            - CZ
                            - DE
                            - DJ
                            - DK
                            - DM
                            - DO
                            - DZ
                            - EC
                            - EE
                            - EG
                            - EH
                            - ER
                            - ES
                            - ET
                            - FI
                            - FJ
                            - FK
                            - FM
                            - FO
                            - FR
                            - GA
                            - GB
                            - GD
                            - GE
                            - GF
                            - GG
                            - GH
                            - GI
                            - GL
                            - GM
                            - GN
                            - GP
                            - GQ
                            - GR
                            - GS
                            - GT
                            - GU
                            - GW
                            - GY
                            - HK
                            - HM
                            - HN
                            - HR
                            - HT
                            - HU
                            - ID
                            - IE
                            - IL
                            - IM
                            - IN
                            - IO
                            - IQ
                            - IR
                            - IS
                            - IT
                            - JE
                            - JM
                            - JO
                            - JP
                            - KE
                            - KG
                            - KH
                            - KI
                            - KM
                            - KN
                            - KP
                            - KR
                            - KW
                            - KY
                            - KZ
                            - LA
                            - LB
                            - LC
                            - LI
                            - LK
                            - LR
                            - LS
                            - LT
                            - LU
                            - LV
                            - LY
                            - MA
                            - MC
                            - MD
                            - ME
                            - MF
                            - MG
                            - MH
                            - MK
                            - ML
                            - MM
                            - MN
                            - MO
                            - MP
                            - MQ
                            - MR
                            - MS
                            - MT
                            - MU
                            - MV
                            - MW
                            - MX
                            - MY
                            - MZ
                            - NA
                            - NC
                            - NE
                            - NF
                            - NG
                            - NI
                            - NL
                            - 'NO'
                            - NP
                            - NR
                            - NU
                            - NZ
                            - OM
                            - PA
                            - PE
                            - PF
                            - PG
                            - PH
                            - PK
                            - PL
                            - PM
                            - PN
                            - PR
                            - PS
                            - PT
                            - PW
                            - PY
                            - QA
                            - RE
                            - RO
                            - RS
                            - RU
                            - RW
                            - SA
                            - SB
                            - SC
                            - SD
                            - SE
                            - SG
                            - SH
                            - SI
                            - SJ
                            - SK
                            - SL
                            - SM
                            - SN
                            - SO
                            - SR
                            - SS
                            - ST
                            - SV
                            - SX
                            - SY
                            - SZ
                            - TC
                            - TD
                            - TF
                            - TG
                            - TH
                            - TJ
                            - TK
                            - TL
                            - TM
                            - TN
                            - TO
                            - TR
                            - TT
                            - TV
                            - TW
                            - TZ
                            - UA
                            - UG
                            - UM
                            - US
                            - UY
                            - UZ
                            - VA
                            - VC
                            - VE
                            - VG
                            - VI
                            - VN
                            - VU
                            - WF
                            - WS
                            - XK
                            - YE
                            - YT
                            - ZA
                            - ZM
                            - ZW
                        - description: This field is required except for users of UK TOL
                    birth_name:
                      type: string
                      maxLength: 100
                      description: If applicable, birth name of the user.
                    nationalities:
                      type: array
                      items:
                        description: >-
                          Accepted country code. [ISO 3166-1 alpha-2
                          codes](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2).
                        type: string
                        enum:
                          - AD
                          - AE
                          - AF
                          - AG
                          - AI
                          - AL
                          - AM
                          - AO
                          - AQ
                          - AR
                          - AS
                          - AT
                          - AU
                          - AW
                          - AX
                          - AZ
                          - BA
                          - BB
                          - BD
                          - BE
                          - BF
                          - BG
                          - BH
                          - BI
                          - BJ
                          - BL
                          - BM
                          - BN
                          - BO
                          - BQ
                          - BR
                          - BS
                          - BT
                          - BV
                          - BW
                          - BY
                          - BZ
                          - CA
                          - CC
                          - CD
                          - CF
                          - CG
                          - CH
                          - CI
                          - CK
                          - CL
                          - CM
                          - CN
                          - CO
                          - CR
                          - CU
                          - CV
                          - CW
                          - CX
                          - CY
                          - CZ
                          - DE
                          - DJ
                          - DK
                          - DM
                          - DO
                          - DZ
                          - EC
                          - EE
                          - EG
                          - EH
                          - ER
                          - ES
                          - ET
                          - FI
                          - FJ
                          - FK
                          - FM
                          - FO
                          - FR
                          - GA
                          - GB
                          - GD
                          - GE
                          - GF
                          - GG
                          - GH
                          - GI
                          - GL
                          - GM
                          - GN
                          - GP
                          - GQ
                          - GR
                          - GS
                          - GT
                          - GU
                          - GW
                          - GY
                          - HK
                          - HM
                          - HN
                          - HR
                          - HT
                          - HU
                          - ID
                          - IE
                          - IL
                          - IM
                          - IN
                          - IO
                          - IQ
                          - IR
                          - IS
                          - IT
                          - JE
                          - JM
                          - JO
                          - JP
                          - KE
                          - KG
                          - KH
                          - KI
                          - KM
                          - KN
                          - KP
                          - KR
                          - KW
                          - KY
                          - KZ
                          - LA
                          - LB
                          - LC
                          - LI
                          - LK
                          - LR
                          - LS
                          - LT
                          - LU
                          - LV
                          - LY
                          - MA
                          - MC
                          - MD
                          - ME
                          - MF
                          - MG
                          - MH
                          - MK
                          - ML
                          - MM
                          - MN
                          - MO
                          - MP
                          - MQ
                          - MR
                          - MS
                          - MT
                          - MU
                          - MV
                          - MW
                          - MX
                          - MY
                          - MZ
                          - NA
                          - NC
                          - NE
                          - NF
                          - NG
                          - NI
                          - NL
                          - 'NO'
                          - NP
                          - NR
                          - NU
                          - NZ
                          - OM
                          - PA
                          - PE
                          - PF
                          - PG
                          - PH
                          - PK
                          - PL
                          - PM
                          - PN
                          - PR
                          - PS
                          - PT
                          - PW
                          - PY
                          - QA
                          - RE
                          - RO
                          - RS
                          - RU
                          - RW
                          - SA
                          - SB
                          - SC
                          - SD
                          - SE
                          - SG
                          - SH
                          - SI
                          - SJ
                          - SK
                          - SL
                          - SM
                          - SN
                          - SO
                          - SR
                          - SS
                          - ST
                          - SV
                          - SX
                          - SY
                          - SZ
                          - TC
                          - TD
                          - TF
                          - TG
                          - TH
                          - TJ
                          - TK
                          - TL
                          - TM
                          - TN
                          - TO
                          - TR
                          - TT
                          - TV
                          - TW
                          - TZ
                          - UA
                          - UG
                          - UM
                          - US
                          - UY
                          - UZ
                          - VA
                          - VC
                          - VE
                          - VG
                          - VI
                          - VN
                          - VU
                          - WF
                          - WS
                          - XK
                          - YE
                          - YT
                          - ZA
                          - ZM
                          - ZW
                      minItems: 1
                      description: >-
                        Nationalities of the user. [ISO 3166 alpha-2
                        Codes](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2).
                    phone_number:
                      type: string
                      pattern: ^([0-9]{8,15})?$
                      description: >-
                        Phone number of the user. [Phone number E.164
                        format](https://en.wikipedia.org/wiki/E.164).
                    address:
                      title: Address
                      type: object
                      description: Address. Must not be a P.O. box or c/o address.
                      properties:
                        address_line1:
                          type: string
                          description: First address line of the address.
                          maxLength: 100
                        address_line2:
                          type: string
                          description: Second address line of the address.
                          maxLength: 100
                        postcode:
                          title: Postal code
                          type: string
                          description: Postal code (postcode, PIN or ZIP code)
                          pattern: ^[a-zA-Z0-9][a-zA-Z0-9\s\-]{0,8}[a-zA-Z0-9]?$
                        country:
                          description: >-
                            Accepted country code. [ISO 3166-1 alpha-2
                            codes](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2).
                          type: string
                          enum:
                            - AD
                            - AE
                            - AF
                            - AG
                            - AI
                            - AL
                            - AM
                            - AO
                            - AQ
                            - AR
                            - AS
                            - AT
                            - AU
                            - AW
                            - AX
                            - AZ
                            - BA
                            - BB
                            - BD
                            - BE
                            - BF
                            - BG
                            - BH
                            - BI
                            - BJ
                            - BL
                            - BM
                            - BN
                            - BO
                            - BQ
                            - BR
                            - BS
                            - BT
                            - BV
                            - BW
                            - BY
                            - BZ
                            - CA
                            - CC
                            - CD
                            - CF
                            - CG
                            - CH
                            - CI
                            - CK
                            - CL
                            - CM
                            - CN
                            - CO
                            - CR
                            - CU
                            - CV
                            - CW
                            - CX
                            - CY
                            - CZ
                            - DE
                            - DJ
                            - DK
                            - DM
                            - DO
                            - DZ
                            - EC
                            - EE
                            - EG
                            - EH
                            - ER
                            - ES
                            - ET
                            - FI
                            - FJ
                            - FK
                            - FM
                            - FO
                            - FR
                            - GA
                            - GB
                            - GD
                            - GE
                            - GF
                            - GG
                            - GH
                            - GI
                            - GL
                            - GM
                            - GN
                            - GP
                            - GQ
                            - GR
                            - GS
                            - GT
                            - GU
                            - GW
                            - GY
                            - HK
                            - HM
                            - HN
                            - HR
                            - HT
                            - HU
                            - ID
                            - IE
                            - IL
                            - IM
                            - IN
                            - IO
                            - IQ
                            - IR
                            - IS
                            - IT
                            - JE
                            - JM
                            - JO
                            - JP
                            - KE
                            - KG
                            - KH
                            - KI
                            - KM
                            - KN
                            - KP
                            - KR
                            - KW
                            - KY
                            - KZ
                            - LA
                            - LB
                            - LC
                            - LI
                            - LK
                            - LR
                            - LS
                            - LT
                            - LU
                            - LV
                            - LY
                            - MA
                            - MC
                            - MD
                            - ME
                            - MF
                            - MG
                            - MH
                            - MK
                            - ML
                            - MM
                            - MN
                            - MO
                            - MP
                            - MQ
                            - MR
                            - MS
                            - MT
                            - MU
                            - MV
                            - MW
                            - MX
                            - MY
                            - MZ
                            - NA
                            - NC
                            - NE
                            - NF
                            - NG
                            - NI
                            - NL
                            - 'NO'
                            - NP
                            - NR
                            - NU
                            - NZ
                            - OM
                            - PA
                            - PE
                            - PF
                            - PG
                            - PH
                            - PK
                            - PL
                            - PM
                            - PN
                            - PR
                            - PS
                            - PT
                            - PW
                            - PY
                            - QA
                            - RE
                            - RO
                            - RS
                            - RU
                            - RW
                            - SA
                            - SB
                            - SC
                            - SD
                            - SE
                            - SG
                            - SH
                            - SI
                            - SJ
                            - SK
                            - SL
                            - SM
                            - SN
                            - SO
                            - SR
                            - SS
                            - ST
                            - SV
                            - SX
                            - SY
                            - SZ
                            - TC
                            - TD
                            - TF
                            - TG
                            - TH
                            - TJ
                            - TK
                            - TL
                            - TM
                            - TN
                            - TO
                            - TR
                            - TT
                            - TV
                            - TW
                            - TZ
                            - UA
                            - UG
                            - UM
                            - US
                            - UY
                            - UZ
                            - VA
                            - VC
                            - VE
                            - VG
                            - VI
                            - VN
                            - VU
                            - WF
                            - WS
                            - XK
                            - YE
                            - YT
                            - ZA
                            - ZM
                            - ZW
                        state:
                          description: >-
                            State, province, county. [ISO 3166 alpha-2
                            Codes](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2).
                          type: string
                          maxLength: 50
                        city:
                          title: City name
                          type: string
                          minLength: 1
                          maxLength: 85
                      required:
                        - address_line1
                        - postcode
                        - country
                        - city
                    postal_address:
                      description: >-
                        User postal address. Needs to be specified if different
                        to the residential address, otherwise it is
                        automatically populated.
                      oneOf:
                        - title: Address
                          type: object
                          description: Address. Must not be a P.O. box or c/o address.
                          properties:
                            address_line1:
                              type: string
                              description: First address line of the address.
                              maxLength: 100
                            address_line2:
                              type: string
                              description: Second address line of the address.
                              maxLength: 100
                            postcode:
                              title: Postal code
                              type: string
                              description: Postal code (postcode, PIN or ZIP code)
                              pattern: ^[a-zA-Z0-9][a-zA-Z0-9\s\-]{0,8}[a-zA-Z0-9]?$
                            country:
                              description: >-
                                Accepted country code. [ISO 3166-1 alpha-2
                                codes](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2).
                              type: string
                              enum:
                                - AD
                                - AE
                                - AF
                                - AG
                                - AI
                                - AL
                                - AM
                                - AO
                                - AQ
                                - AR
                                - AS
                                - AT
                                - AU
                                - AW
                                - AX
                                - AZ
                                - BA
                                - BB
                                - BD
                                - BE
                                - BF
                                - BG
                                - BH
                                - BI
                                - BJ
                                - BL
                                - BM
                                - BN
                                - BO
                                - BQ
                                - BR
                                - BS
                                - BT
                                - BV
                                - BW
                                - BY
                                - BZ
                                - CA
                                - CC
                                - CD
                                - CF
                                - CG
                                - CH
                                - CI
                                - CK
                                - CL
                                - CM
                                - CN
                                - CO
                                - CR
                                - CU
                                - CV
                                - CW
                                - CX
                                - CY
                                - CZ
                                - DE
                                - DJ
                                - DK
                                - DM
                                - DO
                                - DZ
                                - EC
                                - EE
                                - EG
                                - EH
                                - ER
                                - ES
                                - ET
                                - FI
                                - FJ
                                - FK
                                - FM
                                - FO
                                - FR
                                - GA
                                - GB
                                - GD
                                - GE
                                - GF
                                - GG
                                - GH
                                - GI
                                - GL
                                - GM
                                - GN
                                - GP
                                - GQ
                                - GR
                                - GS
                                - GT
                                - GU
                                - GW
                                - GY
                                - HK
                                - HM
                                - HN
                                - HR
                                - HT
                                - HU
                                - ID
                                - IE
                                - IL
                                - IM
                                - IN
                                - IO
                                - IQ
                                - IR
                                - IS
                                - IT
                                - JE
                                - JM
                                - JO
                                - JP
                                - KE
                                - KG
                                - KH
                                - KI
                                - KM
                                - KN
                                - KP
                                - KR
                                - KW
                                - KY
                                - KZ
                                - LA
                                - LB
                                - LC
                                - LI
                                - LK
                                - LR
                                - LS
                                - LT
                                - LU
                                - LV
                                - LY
                                - MA
                                - MC
                                - MD
                                - ME
                                - MF
                                - MG
                                - MH
                                - MK
                                - ML
                                - MM
                                - MN
                                - MO
                                - MP
                                - MQ
                                - MR
                                - MS
                                - MT
                                - MU
                                - MV
                                - MW
                                - MX
                                - MY
                                - MZ
                                - NA
                                - NC
                                - NE
                                - NF
                                - NG
                                - NI
                                - NL
                                - 'NO'
                                - NP
                                - NR
                                - NU
                                - NZ
                                - OM
                                - PA
                                - PE
                                - PF
                                - PG
                                - PH
                                - PK
                                - PL
                                - PM
                                - PN
                                - PR
                                - PS
                                - PT
                                - PW
                                - PY
                                - QA
                                - RE
                                - RO
                                - RS
                                - RU
                                - RW
                                - SA
                                - SB
                                - SC
                                - SD
                                - SE
                                - SG
                                - SH
                                - SI
                                - SJ
                                - SK
                                - SL
                                - SM
                                - SN
                                - SO
                                - SR
                                - SS
                                - ST
                                - SV
                                - SX
                                - SY
                                - SZ
                                - TC
                                - TD
                                - TF
                                - TG
                                - TH
                                - TJ
                                - TK
                                - TL
                                - TM
                                - TN
                                - TO
                                - TR
                                - TT
                                - TV
                                - TW
                                - TZ
                                - UA
                                - UG
                                - UM
                                - US
                                - UY
                                - UZ
                                - VA
                                - VC
                                - VE
                                - VG
                                - VI
                                - VN
                                - VU
                                - WF
                                - WS
                                - XK
                                - YE
                                - YT
                                - ZA
                                - ZM
                                - ZW
                            state:
                              description: >-
                                State, province, county. [ISO 3166 alpha-2
                                Codes](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2).
                              type: string
                              maxLength: 50
                            city:
                              title: City name
                              type: string
                              minLength: 1
                              maxLength: 85
                          required:
                            - address_line1
                            - postcode
                            - country
                            - city
                        - type: 'null'
                    fatca:
                      type: object
                      properties:
                        status:
                          type: boolean
                          description: >-
                            The user’s FATCA status is true if the user is
                            subject to paying taxes in the US, otherwise it can
                            be set to false.
                        confirmed_at:
                          type: string
                          format: date-time
                          description: >-
                            Timestamp at which the user confirmed their FATCA
                            status. [RFC
                            3339-5](https://datatracker.ietf.org/doc/html/rfc3339#section-5.6),
                            [ISO8601
                            UTC](https://www.iso.org/iso-8601-date-and-time-format.html)
                      required:
                        - status
                        - confirmed_at
                    terms_and_conditions:
                      type: object
                      properties:
                        consent_document_id:
                          title: Consent unique identifier.
                          type: string
                          description: Consent unique identifier.
                          format: uuid
                        confirmed_at:
                          type: string
                          format: date-time
                          description: >-
                            Timestamp at which the user consented to the terms &
                            conditions. [RFC
                            3339-5](https://datatracker.ietf.org/doc/html/rfc3339#section-5.6),
                            [ISO8601
                            UTC](https://www.iso.org/iso-8601-date-and-time-format.html)
                      required:
                        - consent_document_id
                        - confirmed_at
                    data_privacy_and_sharing_agreement:
                      type: object
                      properties:
                        consent_document_id:
                          title: Consent unique identifier.
                          type: string
                          description: Consent unique identifier.
                          format: uuid
                        confirmed_at:
                          type: string
                          format: date-time
                          description: >-
                            Timestamp at which the user consented to the data
                            sharing agreement. [RFC
                            3339-5](https://datatracker.ietf.org/doc/html/rfc3339#section-5.6),
                            [ISO8601
                            UTC](https://www.iso.org/iso-8601-date-and-time-format.html)
                      required:
                        - consent_document_id
                        - confirmed_at
                    branch_id:
                      title: Branch unique identifier.
                      type: string
                      description: >-
                        Unique identifier of the market the user is onboarded
                        on. Only relevant if the client is operating in
                        different markets and the client is configured
                        accordingly
                      format: uuid
                  required:
                    - first_name
                    - last_name
                    - email
                    - birth_date
                    - nationalities
                    - address
                    - fatca
                    - terms_and_conditions
                    - data_privacy_and_sharing_agreement
                  additionalProperties: false
            examples:
              BYOL:
                summary: BYOL user
                value:
                  first_name: Karl
                  last_name: Schmidt
                  salutation: SALUTATION_MALE
                  title: DR
                  birth_date: '1972-09-30'
                  birth_city: Berlin
                  birth_country: DE
                  birth_name: Schmidt
                  nationalities:
                    - DE
                    - AU
                  postal_address:
                    address_line1: Rosenweg 221
                    address_line2: apt. 33
                    postcode: '45678'
                    city: Berlin
                    state: BE
                    country: DE
                  address:
                    address_line1: Rosenweg 221
                    address_line2: apt. 33
                    postcode: '45678'
                    city: Berlin
                    state: BE
                    country: DE
              BYOL User with Branch ID:
                summary: BYOL User with branch ID
                value:
                  first_name: Karl
                  last_name: Schmidt
                  salutation: SALUTATION_MALE
                  title: DR
                  birth_date: '1972-09-30'
                  birth_city: Berlin
                  birth_country: DE
                  birth_name: Schmidt
                  nationalities:
                    - DE
                    - AU
                  postal_address:
                    address_line1: Rosenweg 221
                    address_line2: apt. 33
                    postcode: '45678'
                    city: Berlin
                    state: BE
                    country: DE
                  address:
                    address_line1: Rosenweg 221
                    address_line2: apt. 33
                    postcode: '45678'
                    city: Berlin
                    state: BE
                    country: DE
                  branch_id: e6373bfa-ff12-4004-8de9-747ac96764da
              TOL:
                summary: TOL user
                value:
                  first_name: Karl
                  last_name: Schmidt
                  email: karl.schmidt@example.com
                  salutation: SALUTATION_MALE
                  title: DR
                  birth_date: '1972-09-30'
                  birth_city: Berlin
                  birth_country: DE
                  birth_name: Schmidt
                  nationalities:
                    - DE
                    - AU
                  phone_number: '4930901820'
                  postal_address:
                    address_line1: Rosenweg 221
                    address_line2: apt. 33
                    postcode: '45678'
                    city: Berlin
                    state: BE
                    country: DE
                  address:
                    address_line1: Rosenweg 221
                    address_line2: apt. 33
                    postcode: '45678'
                    city: Berlin
                    state: BE
                    country: DE
                  fatca:
                    status: false
                    confirmed_at: '2020-08-24T14:15:22Z'
                  terms_and_conditions:
                    consent_document_id: d0b83880-3809-4eee-b0df-ca50db84c15a
                    confirmed_at: '2020-08-24T14:14:22Z'
                  data_privacy_and_sharing_agreement:
                    consent_document_id: 7ab0fc5c-8157-4acd-b02d-6ccda0e81dec
                    confirmed_at: '2020-08-24T14:16:22Z'
              TOL User with Branch ID:
                summary: TOL User with Branch ID
                value:
                  first_name: Karl
                  last_name: Schmidt
                  email: karl.schmidt@example.com
                  salutation: SALUTATION_MALE
                  title: DR
                  birth_date: '1972-09-30'
                  birth_city: Berlin
                  birth_country: DE
                  birth_name: Schmidt
                  nationalities:
                    - DE
                    - AU
                  phone_number: '4930901820'
                  postal_address:
                    address_line1: Rosenweg 221
                    address_line2: apt. 33
                    postcode: '45678'
                    city: Berlin
                    state: BE
                    country: DE
                  address:
                    address_line1: Rosenweg 221
                    address_line2: apt. 33
                    postcode: '45678'
                    city: Berlin
                    state: BE
                    country: DE
                  fatca:
                    status: false
                    confirmed_at: '2020-08-24T14:15:22Z'
                  terms_and_conditions:
                    consent_document_id: d0b83880-3809-4eee-b0df-ca50db84c15a
                    confirmed_at: '2020-08-24T14:14:22Z'
                  data_privacy_and_sharing_agreement:
                    consent_document_id: 7ab0fc5c-8157-4acd-b02d-6ccda0e81dec
                    confirmed_at: '2020-08-24T14:16:22Z'
                  branch_id: e6373bfa-ff12-4004-8de9-747ac96764da
      responses:
        '200':
          description: User created.
          headers:
            upvest-request-id:
              required: true
              schema:
                type: string
                format: uuid
                example: 169ae4c7-ebd7-4041-94da-25369653eba7
          content:
            application/json:
              schema:
                title: User - Create - Request
                anyOf:
                  - title: User (BYOL)
                    type: object
                    properties:
                      id:
                        title: User unique identifier.
                        type: string
                        description: User unique identifier.
                        format: uuid
                      created_at:
                        type: string
                        format: date-time
                        description: >-
                          Date and time when the resource was created. [RFC
                          3339-5](https://datatracker.ietf.org/doc/html/rfc3339#section-5.6),
                          [ISO8601
                          UTC](https://www.iso.org/iso-8601-date-and-time-format.html)
                      updated_at:
                        type: string
                        format: date-time
                        description: >-
                          Date and time when the resource was last updated. [RFC
                          3339-5](https://datatracker.ietf.org/doc/html/rfc3339#section-5.6),
                          [ISO8601
                          UTC](https://www.iso.org/iso-8601-date-and-time-format.html)
                      first_name:
                        type: string
                        maxLength: 100
                        minLength: 2
                        description: >-
                          First name(s) of the user. Please include all first
                          and middle names of the user.
                      last_name:
                        type: string
                        maxLength: 100
                        minLength: 1
                        description: Last name of the user.
                      salutation:
                        type: string
                        description: |-
                          Salutation of the user used in reports and statements.
                          * (empty string) - 
                          * SALUTATION_MALE - 
                          * SALUTATION_FEMALE - 
                          * SALUTATION_FEMALE_MARRIED - 
                          * SALUTATION_DIVERSE - 
                        enum:
                          - ''
                          - SALUTATION_MALE
                          - SALUTATION_FEMALE
                          - SALUTATION_FEMALE_MARRIED
                          - SALUTATION_DIVERSE
                        default: ''
                      title:
                        type: string
                        description: |-
                          Title of the user used in reports and statements.
                          * (empty string) - 
                          * DR - Doctor
                          * PROF - Professor
                          * PROF_DR - 
                          * DIPL_ING - Graduate engineer (Diplom-Ingenieur)
                          * MAGISTER - 
                        enum:
                          - ''
                          - DR
                          - PROF
                          - PROF_DR
                          - DIPL_ING
                          - MAGISTER
                        default: ''
                      birth_date:
                        type: string
                        format: date
                        description: >-
                          Birth date of the user in YYYY-MM-DD format. [RFC
                          3339, section
                          5.6](https://json-schema.org/draft/2020-12/json-schema-validation.html#RFC3339)
                      birth_city:
                        title: City name
                        type: string
                        minLength: 1
                        maxLength: 85
                      birth_country:
                        description: >-
                          Accepted country code. [ISO 3166-1 alpha-2
                          codes](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2).
                        type: string
                        enum:
                          - AD
                          - AE
                          - AF
                          - AG
                          - AI
                          - AL
                          - AM
                          - AO
                          - AQ
                          - AR
                          - AS
                          - AT
                          - AU
                          - AW
                          - AX
                          - AZ
                          - BA
                          - BB
                          - BD
                          - BE
                          - BF
                          - BG
                          - BH
                          - BI
                          - BJ
                          - BL
                          - BM
                          - BN
                          - BO
                          - BQ
                          - BR
                          - BS
                          - BT
                          - BV
                          - BW
                          - BY
                          - BZ
                          - CA
                          - CC
                          - CD
                          - CF
                          - CG
                          - CH
                          - CI
                          - CK
                          - CL
                          - CM
                          - CN
                          - CO
                          - CR
                          - CU
                          - CV
                          - CW
                          - CX
                          - CY
                          - CZ
                          - DE
                          - DJ
                          - DK
                          - DM
                          - DO
                          - DZ
                          - EC
                          - EE
                          - EG
                          - EH
                          - ER
                          - ES
                          - ET
                          - FI
                          - FJ
                          - FK
                          - FM
                          - FO
                          - FR
                          - GA
                          - GB
                          - GD
                          - GE
                          - GF
                          - GG
                          - GH
                          - GI
                          - GL
                          - GM
                          - GN
                          - GP
                          - GQ
                          - GR
                          - GS
                          - GT
                          - GU
                          - GW
                          - GY
                          - HK
                          - HM
                          - HN
                          - HR
                          - HT
                          - HU
                          - ID
                          - IE
                          - IL
                          - IM
                          - IN
                          - IO
                          - IQ
                          - IR
                          - IS
                          - IT
                          - JE
                          - JM
                          - JO
                          - JP
                          - KE
                          - KG
                          - KH
                          - KI
                          - KM
                          - KN
                          - KP
                          - KR
                          - KW
                          - KY
                          - KZ
                          - LA
                          - LB
                          - LC
                          - LI
                          - LK
                          - LR
                          - LS
                          - LT
                          - LU
                          - LV
                          - LY
                          - MA
                          - MC
                          - MD
                          - ME
                          - MF
                          - MG
                          - MH
                          - MK
                          - ML
                          - MM
                          - MN
                          - MO
                          - MP
                          - MQ
                          - MR
                          - MS
                          - MT
                          - MU
                          - MV
                          - MW
                          - MX
                          - MY
                          - MZ
                          - NA
                          - NC
                          - NE
                          - NF
                          - NG
                          - NI
                          - NL
                          - 'NO'
                          - NP
                          - NR
                          - NU
                          - NZ
                          - OM
                          - PA
                          - PE
                          - PF
                          - PG
                          - PH
                          - PK
                          - PL
                          - PM
                          - PN
                          - PR
                          - PS
                          - PT
                          - PW
                          - PY
                          - QA
                          - RE
                          - RO
                          - RS
                          - RU
                          - RW
                          - SA
                          - SB
                          - SC
                          - SD
                          - SE
                          - SG
                          - SH
                          - SI
                          - SJ
                          - SK
                          - SL
                          - SM
                          - SN
                          - SO
                          - SR
                          - SS
                          - ST
                          - SV
                          - SX
                          - SY
                          - SZ
                          - TC
                          - TD
                          - TF
                          - TG
                          - TH
                          - TJ
                          - TK
                          - TL
                          - TM
                          - TN
                          - TO
                          - TR
                          - TT
                          - TV
                          - TW
                          - TZ
                          - UA
                          - UG
                          - UM
                          - US
                          - UY
                          - UZ
                          - VA
                          - VC
                          - VE
                          - VG
                          - VI
                          - VN
                          - VU
                          - WF
                          - WS
                          - XK
                          - YE
                          - YT
                          - ZA
                          - ZM
                          - ZW
                      birth_name:
                        type: string
                        maxLength: 100
                        description: If applicable, birth name of the user.
                      nationalities:
                        type: array
                        items:
                          description: >-
                            Accepted country code. [ISO 3166-1 alpha-2
                            codes](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2).
                          type: string
                          enum:
                            - AD
                            - AE
                            - AF
                            - AG
                            - AI
                            - AL
                            - AM
                            - AO
                            - AQ
                            - AR
                            - AS
                            - AT
                            - AU
                            - AW
                            - AX
                            - AZ
                            - BA
                            - BB
                            - BD
                            - BE
                            - BF
                            - BG
                            - BH
                            - BI
                            - BJ
                            - BL
                            - BM
                            - BN
                            - BO
                            - BQ
                            - BR
                            - BS
                            - BT
                            - BV
                            - BW
                            - BY
                            - BZ
                            - CA
                            - CC
                            - CD
                            - CF
                            - CG
                            - CH
                            - CI
                            - CK
                            - CL
                            - CM
                            - CN
                            - CO
                            - CR
                            - CU
                            - CV
                            - CW
                            - CX
                            - CY
                            - CZ
                            - DE
                            - DJ
                            - DK
                            - DM
                            - DO
                            - DZ
                            - EC
                            - EE
                            - EG
                            - EH
                            - ER
                            - ES
                            - ET
                            - FI
                            - FJ
                            - FK
                            - FM
                            - FO
                            - FR
                            - GA
                            - GB
                            - GD
                            - GE
                            - GF
                            - GG
                            - GH
                            - GI
                            - GL
                            - GM
                            - GN
                            - GP
                            - GQ
                            - GR
                            - GS
                            - GT
                            - GU
                            - GW
                            - GY
                            - HK
                            - HM
                            - HN
                            - HR
                            - HT
                            - HU
                            - ID
                            - IE
                            - IL
                            - IM
                            - IN
                            - IO
                            - IQ
                            - IR
                            - IS
                            - IT
                            - JE
                            - JM
                            - JO
                            - JP
                            - KE
                            - KG
                            - KH
                            - KI
                            - KM
                            - KN
                            - KP
                            - KR
                            - KW
                            - KY
                            - KZ
                            - LA
                            - LB
                            - LC
                            - LI
                            - LK
                            - LR
                            - LS
                            - LT
                            - LU
                            - LV
                            - LY
                            - MA
                            - MC
                            - MD
                            - ME
                            - MF
                            - MG
                            - MH
                            - MK
                            - ML
                            - MM
                            - MN
                            - MO
                            - MP
                            - MQ
                            - MR
                            - MS
                            - MT
                            - MU
                            - MV
                            - MW
                            - MX
                            - MY
                            - MZ
                            - NA
                            - NC
                            - NE
                            - NF
                            - NG
                            - NI
                            - NL
                            - 'NO'
                            - NP
                            - NR
                            - NU
                            - NZ
                            - OM
                            - PA
                            - PE
                            - PF
                            - PG
                            - PH
                            - PK
                            - PL
                            - PM
                            - PN
                            - PR
                            - PS
                            - PT
                            - PW
                            - PY
                            - QA
                            - RE
                            - RO
                            - RS
                            - RU
                            - RW
                            - SA
                            - SB
                            - SC
                            - SD
                            - SE
                            - SG
                            - SH
                            - SI
                            - SJ
                            - SK
                            - SL
                            - SM
                            - SN
                            - SO
                            - SR
                            - SS
                            - ST
                            - SV
                            - SX
                            - SY
                            - SZ
                            - TC
                            - TD
                            - TF
                            - TG
                            - TH
                            - TJ
                            - TK
                            - TL
                            - TM
                            - TN
                            - TO
                            - TR
                            - TT
                            - TV
                            - TW
                            - TZ
                            - UA
                            - UG
                            - UM
                            - US
                            - UY
                            - UZ
                            - VA
                            - VC
                            - VE
                            - VG
                            - VI
                            - VN
                            - VU
                            - WF
                            - WS
                            - XK
                            - YE
                            - YT
                            - ZA
                            - ZM
                            - ZW
                        minItems: 1
                        description: >-
                          Nationalities of the user. [ISO 3166 alpha-2
                          Codes](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2).
                      address:
                        title: Address
                        type: object
                        description: Address. Must not be a P.O. box or c/o address.
                        properties:
                          address_line1:
                            type: string
                            description: First address line of the address.
                            maxLength: 100
                          address_line2:
                            type: string
                            description: Second address line of the address.
                            maxLength: 100
                          postcode:
                            title: Postal code
                            type: string
                            description: Postal code (postcode, PIN or ZIP code)
                            pattern: ^[a-zA-Z0-9][a-zA-Z0-9\s\-]{0,8}[a-zA-Z0-9]?$
                          country:
                            description: >-
                              Accepted country code. [ISO 3166-1 alpha-2
                              codes](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2).
                            type: string
                            enum:
                              - AD
                              - AE
                              - AF
                              - AG
                              - AI
                              - AL
                              - AM
                              - AO
                              - AQ
                              - AR
                              - AS
                              - AT
                              - AU
                              - AW
                              - AX
                              - AZ
                              - BA
                              - BB
                              - BD
                              - BE
                              - BF
                              - BG
                              - BH
                              - BI
                              - BJ
                              - BL
                              - BM
                              - BN
                              - BO
                              - BQ
                              - BR
                              - BS
                              - BT
                              - BV
                              - BW
                              - BY
                              - BZ
                              - CA
                              - CC
                              - CD
                              - CF
                              - CG
                              - CH
                              - CI
                              - CK
                              - CL
                              - CM
                              - CN
                              - CO
                              - CR
                              - CU
                              - CV
                              - CW
                              - CX
                              - CY
                              - CZ
                              - DE
                              - DJ
                              - DK
                              - DM
                              - DO
                              - DZ
                              - EC
                              - EE
                              - EG
                              - EH
                              - ER
                              - ES
                              - ET
                              - FI
                              - FJ
                              - FK
                              - FM
                              - FO
                              - FR
                              - GA
                              - GB
                              - GD
                              - GE
                              - GF
                              - GG
                              - GH
                              - GI
                              - GL
                              - GM
                              - GN
                              - GP
                              - GQ
                              - GR
                              - GS
                              - GT
                              - GU
                              - GW
                              - GY
                              - HK
                              - HM
                              - HN
                              - HR
                              - HT
                              - HU
                              - ID
                              - IE
                              - IL
                              - IM
                              - IN
                              - IO
                              - IQ
                              - IR
                              - IS
                              - IT
                              - JE
                              - JM
                              - JO
                              - JP
                              - KE
                              - KG
                              - KH
                              - KI
                              - KM
                              - KN
                              - KP
                              - KR
                              - KW
                              - KY
                              - KZ
                              - LA
                              - LB
                              - LC
                              - LI
                              - LK
                              - LR
                              - LS
                              - LT
                              - LU
                              - LV
                              - LY
                              - MA
                              - MC
                              - MD
                              - ME
                              - MF
                              - MG
                              - MH
                              - MK
                              - ML
                              - MM
                              - MN
                              - MO
                              - MP
                              - MQ
                              - MR
                              - MS
                              - MT
                              - MU
                              - MV
                              - MW
                              - MX
                              - MY
                              - MZ
                              - NA
                              - NC
                              - NE
                              - NF
                              - NG
                              - NI
                              - NL
                              - 'NO'
                              - NP
                              - NR
                              - NU
                              - NZ
                              - OM
                              - PA
                              - PE
                              - PF
                              - PG
                              - PH
                              - PK
                              - PL
                              - PM
                              - PN
                              - PR
                              - PS
                              - PT
                              - PW
                              - PY
                              - QA
                              - RE
                              - RO
                              - RS
                              - RU
                              - RW
                              - SA
                              - SB
                              - SC
                              - SD
                              - SE
                              - SG
                              - SH
                              - SI
                              - SJ
                              - SK
                              - SL
                              - SM
                              - SN
                              - SO
                              - SR
                              - SS
                              - ST
                              - SV
                              - SX
                              - SY
                              - SZ
                              - TC
                              - TD
                              - TF
                              - TG
                              - TH
                              - TJ
                              - TK
                              - TL
                              - TM
                              - TN
                              - TO
                              - TR
                              - TT
                              - TV
                              - TW
                              - TZ
                              - UA
                              - UG
                              - UM
                              - US
                              - UY
                              - UZ
                              - VA
                              - VC
                              - VE
                              - VG
                              - VI
                              - VN
                              - VU
                              - WF
                              - WS
                              - XK
                              - YE
                              - YT
                              - ZA
                              - ZM
                              - ZW
                          state:
                            description: >-
                              State, province, county. [ISO 3166 alpha-2
                              Codes](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2).
                            type: string
                            maxLength: 50
                          city:
                            title: City name
                            type: string
                            minLength: 1
                            maxLength: 85
                        required:
                          - address_line1
                          - postcode
                          - country
                          - city
                      postal_address:
                        description: >-
                          User postal address. Needs to be specified if
                          different to the residential address, otherwise it is
                          automatically populated.
                        oneOf:
                          - title: Address
                            type: object
                            description: Address. Must not be a P.O. box or c/o address.
                            properties:
                              address_line1:
                                type: string
                                description: First address line of the address.
                                maxLength: 100
                              address_line2:
                                type: string
                                description: Second address line of the address.
                                maxLength: 100
                              postcode:
                                title: Postal code
                                type: string
                                description: Postal code (postcode, PIN or ZIP code)
                                pattern: ^[a-zA-Z0-9][a-zA-Z0-9\s\-]{0,8}[a-zA-Z0-9]?$
                              country:
                                description: >-
                                  Accepted country code. [ISO 3166-1 alpha-2
                                  codes](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2).
                                type: string
                                enum:
                                  - AD
                                  - AE
                                  - AF
                                  - AG
                                  - AI
                                  - AL
                                  - AM
                                  - AO
                                  - AQ
                                  - AR
                                  - AS
                                  - AT
                                  - AU
                                  - AW
                                  - AX
                                  - AZ
                                  - BA
                                  - BB
                                  - BD
                                  - BE
                                  - BF
                                  - BG
                                  - BH
                                  - BI
                                  - BJ
                                  - BL
                                  - BM
                                  - BN
                                  - BO
                                  - BQ
                                  - BR
                                  - BS
                                  - BT
                                  - BV
                                  - BW
                                  - BY
                                  - BZ
                                  - CA
                                  - CC
                                  - CD
                                  - CF
                                  - CG
                                  - CH
                                  - CI
                                  - CK
                                  - CL
                                  - CM
                                  - CN
                                  - CO
                                  - CR
                                  - CU
                                  - CV
                                  - CW
                                  - CX
                                  - CY
                                  - CZ
                                  - DE
                                  - DJ
                                  - DK
                                  - DM
                                  - DO
                                  - DZ
                                  - EC
                                  - EE
                                  - EG
                                  - EH
                                  - ER
                                  - ES
                                  - ET
                                  - FI
                                  - FJ
                                  - FK
                                  - FM
                                  - FO
                                  - FR
                                  - GA
                                  - GB
                                  - GD
                                  - GE
                                  - GF
                                  - GG
                                  - GH
                                  - GI
                                  - GL
                                  - GM
                                  - GN
                                  - GP
                                  - GQ
                                  - GR
                                  - GS
                                  - GT
                                  - GU
                                  - GW
                                  - GY
                                  - HK
                                  - HM
                                  - HN
                                  - HR
                                  - HT
                                  - HU
                                  - ID
                                  - IE
                                  - IL
                                  - IM
                                  - IN
                                  - IO
                                  - IQ
                                  - IR
                                  - IS
                                  - IT
                                  - JE
                                  - JM
                                  - JO
                                  - JP
                                  - KE
                                  - KG
                                  - KH
                                  - KI
                                  - KM
                                  - KN
                                  - KP
                                  - KR
                                  - KW
                                  - KY
                                  - KZ
                                  - LA
                                  - LB
                                  - LC
                                  - LI
                                  - LK
                                  - LR
                                  - LS
                                  - LT
                                  - LU
                                  - LV
                                  - LY
                                  - MA
                                  - MC
                                  - MD
                                  - ME
                                  - MF
                                  - MG
                                  - MH
                                  - MK
                                  - ML
                                  - MM
                                  - MN
                                  - MO
                                  - MP
                                  - MQ
                                  - MR
                                  - MS
                                  - MT
                                  - MU
                                  - MV
                                  - MW
                                  - MX
                                  - MY
                                  - MZ
                                  - NA
                                  - NC
                                  - NE
                                  - NF
                                  - NG
                                  - NI
                                  - NL
                                  - 'NO'
                                  - NP
                                  - NR
                                  - NU
                                  - NZ
                                  - OM
                                  - PA
                                  - PE
                                  - PF
                                  - PG
                                  - PH
                                  - PK
                                  - PL
                                  - PM
                                  - PN
                                  - PR
                                  - PS
                                  - PT
                                  - PW
                                  - PY
                                  - QA
                                  - RE
                                  - RO
                                  - RS
                                  - RU
                                  - RW
                                  - SA
                                  - SB
                                  - SC
                                  - SD
                                  - SE
                                  - SG
                                  - SH
                                  - SI
                                  - SJ
                                  - SK
                                  - SL
                                  - SM
                                  - SN
                                  - SO
                                  - SR
                                  - SS
                                  - ST
                                  - SV
                                  - SX
                                  - SY
                                  - SZ
                                  - TC
                                  - TD
                                  - TF
                                  - TG
                                  - TH
                                  - TJ
                                  - TK
                                  - TL
                                  - TM
                                  - TN
                                  - TO
                                  - TR
                                  - TT
                                  - TV
                                  - TW
                                  - TZ
                                  - UA
                                  - UG
                                  - UM
                                  - US
                                  - UY
                                  - UZ
                                  - VA
                                  - VC
                                  - VE
                                  - VG
                                  - VI
                                  - VN
                                  - VU
                                  - WF
                                  - WS
                                  - XK
                                  - YE
                                  - YT
                                  - ZA
                                  - ZM
                                  - ZW
                              state:
                                description: >-
                                  State, province, county. [ISO 3166 alpha-2
                                  Codes](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2).
                                type: string
                                maxLength: 50
                              city:
                                title: City name
                                type: string
                                minLength: 1
                                maxLength: 85
                            required:
                              - address_line1
                              - postcode
                              - country
                              - city
                          - type: 'null'
                      status:
                        type: string
                        description: |-
                          Status of the user.
                          * ACTIVE - 
                          * INACTIVE - 
                          * OFFBOARDING - 
                          * OFFBOARDED - 
                        enum:
                          - ACTIVE
                          - INACTIVE
                          - OFFBOARDING
                          - OFFBOARDED
                      branch_id:
                        title: Branch unique identifier.
                        type: string
                        description: >-
                          Unique identifier of the market the user is onboarded
                          on. Only relevant if the client is operating in
                          different markets and the client is configured
                          accordingly
                        format: uuid
                    required:
                      - id
                      - created_at
                      - updated_at
                      - first_name
                      - last_name
                      - birth_date
                      - nationalities
                      - address
                      - status
                    additionalProperties: false
                  - title: User (TOL)
                    type: object
                    properties:
                      id:
                        title: User unique identifier.
                        type: string
                        description: User unique identifier.
                        format: uuid
                      created_at:
                        type: string
                        format: date-time
                        description: >-
                          Date and time when the resource was created. [RFC
                          3339-5](https://datatracker.ietf.org/doc/html/rfc3339#section-5.6),
                          [ISO8601
                          UTC](https://www.iso.org/iso-8601-date-and-time-format.html)
                      updated_at:
                        type: string
                        format: date-time
                        description: >-
                          Date and time when the resource was last updated. [RFC
                          3339-5](https://datatracker.ietf.org/doc/html/rfc3339#section-5.6),
                          [ISO8601
                          UTC](https://www.iso.org/iso-8601-date-and-time-format.html)
                      first_name:
                        type: string
                        maxLength: 100
                        minLength: 2
                        description: >-
                          First name(s) of the user. Please include all first
                          and middle names of the user.
                      last_name:
                        type: string
                        maxLength: 100
                        minLength: 1
                        description: Last name of the user.
                      salutation:
                        type: string
                        description: |-
                          Salutation of the user used in reports and statements.
                          * (empty string) - 
                          * SALUTATION_MALE - 
                          * SALUTATION_FEMALE - 
                          * SALUTATION_FEMALE_MARRIED - 
                          * SALUTATION_DIVERSE - 
                        enum:
                          - ''
                          - SALUTATION_MALE
                          - SALUTATION_FEMALE
                          - SALUTATION_FEMALE_MARRIED
                          - SALUTATION_DIVERSE
                        default: ''
                      title:
                        type: string
                        description: |-
                          Title of the user used in reports and statements.
                          * (empty string) - 
                          * DR - Doctor
                          * PROF - Professor
                          * PROF_DR - 
                          * DIPL_ING - Graduate engineer (Diplom-Ingenieur)
                          * MAGISTER - 
                        enum:
                          - ''
                          - DR
                          - PROF
                          - PROF_DR
                          - DIPL_ING
                          - MAGISTER
                        default: ''
                      birth_date:
                        type: string
                        format: date
                        description: >-
                          Birth date of the user in YYYY-MM-DD format. [RFC
                          3339, section
                          5.6](https://json-schema.org/draft/2020-12/json-schema-validation.html#RFC3339)
                      birth_city:
                        title: City name
                        type: string
                        minLength: 1
                        maxLength: 85
                      birth_country:
                        description: >-
                          Accepted country code. [ISO 3166-1 alpha-2
                          codes](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2).
                        type: string
                        enum:
                          - AD
                          - AE
                          - AF
                          - AG
                          - AI
                          - AL
                          - AM
                          - AO
                          - AQ
                          - AR
                          - AS
                          - AT
                          - AU
                          - AW
                          - AX
                          - AZ
                          - BA
                          - BB
                          - BD
                          - BE
                          - BF
                          - BG
                          - BH
                          - BI
                          - BJ
                          - BL
                          - BM
                          - BN
                          - BO
                          - BQ
                          - BR
                          - BS
                          - BT
                          - BV
                          - BW
                          - BY
                          - BZ
                          - CA
                          - CC
                          - CD
                          - CF
                          - CG
                          - CH
                          - CI
                          - CK
                          - CL
                          - CM
                          - CN
                          - CO
                          - CR
                          - CU
                          - CV
                          - CW
                          - CX
                          - CY
                          - CZ
                          - DE
                          - DJ
                          - DK
                          - DM
                          - DO
                          - DZ
                          - EC
                          - EE
                          - EG
                          - EH
                          - ER
                          - ES
                          - ET
                          - FI
                          - FJ
                          - FK
                          - FM
                          - FO
                          - FR
                          - GA
                          - GB
                          - GD
                          - GE
                          - GF
                          - GG
                          - GH
                          - GI
                          - GL
                          - GM
                          - GN
                          - GP
                          - GQ
                          - GR
                          - GS
                          - GT
                          - GU
                          - GW
                          - GY
                          - HK
                          - HM
                          - HN
                          - HR
                          - HT
                          - HU
                          - ID
                          - IE
                          - IL
                          - IM
                          - IN
                          - IO
                          - IQ
                          - IR
                          - IS
                          - IT
                          - JE
                          - JM
                          - JO
                          - JP
                          - KE
                          - KG
                          - KH
                          - KI
                          - KM
                          - KN
                          - KP
                          - KR
                          - KW
                          - KY
                          - KZ
                          - LA
                          - LB
                          - LC
                          - LI
                          - LK
                          - LR
                          - LS
                          - LT
                          - LU
                          - LV
                          - LY
                          - MA
                          - MC
                          - MD
                          - ME
                          - MF
                          - MG
                          - MH
                          - MK
                          - ML
                          - MM
                          - MN
                          - MO
                          - MP
                          - MQ
                          - MR
                          - MS
                          - MT
                          - MU
                          - MV
                          - MW
                          - MX
                          - MY
                          - MZ
                          - NA
                          - NC
                          - NE
                          - NF
                          - NG
                          - NI
                          - NL
                          - 'NO'
                          - NP
                          - NR
                          - NU
                          - NZ
                          - OM
                          - PA
                          - PE
                          - PF
                          - PG
                          - PH
                          - PK
                          - PL
                          - PM
                          - PN
                          - PR
                          - PS
                          - PT
                          - PW
                          - PY
                          - QA
                          - RE
                          - RO
                          - RS
                          - RU
                          - RW
                          - SA
                          - SB
                          - SC
                          - SD
                          - SE
                          - SG
                          - SH
                          - SI
                          - SJ
                          - SK
                          - SL
                          - SM
                          - SN
                          - SO
                          - SR
                          - SS
                          - ST
                          - SV
                          - SX
                          - SY
                          - SZ
                          - TC
                          - TD
                          - TF
                          - TG
                          - TH
                          - TJ
                          - TK
                          - TL
                          - TM
                          - TN
                          - TO
                          - TR
                          - TT
                          - TV
                          - TW
                          - TZ
                          - UA
                          - UG
                          - UM
                          - US
                          - UY
                          - UZ
                          - VA
                          - VC
                          - VE
                          - VG
                          - VI
                          - VN
                          - VU
                          - WF
                          - WS
                          - XK
                          - YE
                          - YT
                          - ZA
                          - ZM
                          - ZW
                      birth_name:
                        type: string
                        maxLength: 100
                        description: If applicable, birth name of the user.
                      nationalities:
                        type: array
                        items:
                          description: >-
                            Accepted country code. [ISO 3166-1 alpha-2
                            codes](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2).
                          type: string
                          enum:
                            - AD
                            - AE
                            - AF
                            - AG
                            - AI
                            - AL
                            - AM
                            - AO
                            - AQ
                            - AR
                            - AS
                            - AT
                            - AU
                            - AW
                            - AX
                            - AZ
                            - BA
                            - BB
                            - BD
                            - BE
                            - BF
                            - BG
                            - BH
                            - BI
                            - BJ
                            - BL
                            - BM
                            - BN
                            - BO
                            - BQ
                            - BR
                            - BS
                            - BT
                            - BV
                            - BW
                            - BY
                            - BZ
                            - CA
                            - CC
                            - CD
                            - CF
                            - CG
                            - CH
                            - CI
                            - CK
                            - CL
                            - CM
                            - CN
                            - CO
                            - CR
                            - CU
                            - CV
                            - CW
                            - CX
                            - CY
                            - CZ
                            - DE
                            - DJ
                            - DK
                            - DM
                            - DO
                            - DZ
                            - EC
                            - EE
                            - EG
                            - EH
                            - ER
                            - ES
                            - ET
                            - FI
                            - FJ
                            - FK
                            - FM
                            - FO
                            - FR
                            - GA
                            - GB
                            - GD
                            - GE
                            - GF
                            - GG
                            - GH
                            - GI
                            - GL
                            - GM
                            - GN
                            - GP
                            - GQ
                            - GR
                            - GS
                            - GT
                            - GU
                            - GW
                            - GY
                            - HK
                            - HM
                            - HN
                            - HR
                            - HT
                            - HU
                            - ID
                            - IE
                            - IL
                            - IM
                            - IN
                            - IO
                            - IQ
                            - IR
                            - IS
                            - IT
                            - JE
                            - JM
                            - JO
                            - JP
                            - KE
                            - KG
                            - KH
                            - KI
                            - KM
                            - KN
                            - KP
                            - KR
                            - KW
                            - KY
                            - KZ
                            - LA
                            - LB
                            - LC
                            - LI
                            - LK
                            - LR
                            - LS
                            - LT
                            - LU
                            - LV
                            - LY
                            - MA
                            - MC
                            - MD
                            - ME
                            - MF
                            - MG
                            - MH
                            - MK
                            - ML
                            - MM
                            - MN
                            - MO
                            - MP
                            - MQ
                            - MR
                            - MS
                            - MT
                            - MU
                            - MV
                            - MW
                            - MX
                            - MY
                            - MZ
                            - NA
                            - NC
                            - NE
                            - NF
                            - NG
                            - NI
                            - NL
                            - 'NO'
                            - NP
                            - NR
                            - NU
                            - NZ
                            - OM
                            - PA
                            - PE
                            - PF
                            - PG
                            - PH
                            - PK
                            - PL
                            - PM
                            - PN
                            - PR
                            - PS
                            - PT
                            - PW
                            - PY
                            - QA
                            - RE
                            - RO
                            - RS
                            - RU
                            - RW
                            - SA
                            - SB
                            - SC
                            - SD
                            - SE
                            - SG
                            - SH
                            - SI
                            - SJ
                            - SK
                            - SL
                            - SM
                            - SN
                            - SO
                            - SR
                            - SS
                            - ST
                            - SV
                            - SX
                            - SY
                            - SZ
                            - TC
                            - TD
                            - TF
                            - TG
                            - TH
                            - TJ
                            - TK
                            - TL
                            - TM
                            - TN
                            - TO
                            - TR
                            - TT
                            - TV
                            - TW
                            - TZ
                            - UA
                            - UG
                            - UM
                            - US
                            - UY
                            - UZ
                            - VA
                            - VC
                            - VE
                            - VG
                            - VI
                            - VN
                            - VU
                            - WF
                            - WS
                            - XK
                            - YE
                            - YT
                            - ZA
                            - ZM
                            - ZW
                        minItems: 1
                        description: >-
                          Nationalities of the user. [ISO 3166 alpha-2
                          Codes](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2).
                      address:
                        title: Address
                        type: object
                        description: Address. Must not be a P.O. box or c/o address.
                        properties:
                          address_line1:
                            type: string
                            description: First address line of the address.
                            maxLength: 100
                          address_line2:
                            type: string
                            description: Second address line of the address.
                            maxLength: 100
                          postcode:
                            title: Postal code
                            type: string
                            description: Postal code (postcode, PIN or ZIP code)
                            pattern: ^[a-zA-Z0-9][a-zA-Z0-9\s\-]{0,8}[a-zA-Z0-9]?$
                          country:
                            description: >-
                              Accepted country code. [ISO 3166-1 alpha-2
                              codes](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2).
                            type: string
                            enum:
                              - AD
                              - AE
                              - AF
                              - AG
                              - AI
                              - AL
                              - AM
                              - AO
                              - AQ
                              - AR
                              - AS
                              - AT
                              - AU
                              - AW
                              - AX
                              - AZ
                              - BA
                              - BB
                              - BD
                              - BE
                              - BF
                              - BG
                              - BH
                              - BI
                              - BJ
                              - BL
                              - BM
                              - BN
                              - BO
                              - BQ
                              - BR
                              - BS
                              - BT
                              - BV
                              - BW
                              - BY
                              - BZ
                              - CA
                              - CC
                              - CD
                              - CF
                              - CG
                              - CH
                              - CI
                              - CK
                              - CL
                              - CM
                              - CN
                              - CO
                              - CR
                              - CU
                              - CV
                              - CW
                              - CX
                              - CY
                              - CZ
                              - DE
                              - DJ
                              - DK
                              - DM
                              - DO
                              - DZ
                              - EC
                              - EE
                              - EG
                              - EH
                              - ER
                              - ES
                              - ET
                              - FI
                              - FJ
                              - FK
                              - FM
                              - FO
                              - FR
                              - GA
                              - GB
                              - GD
                              - GE
                              - GF
                              - GG
                              - GH
                              - GI
                              - GL
                              - GM
                              - GN
                              - GP
                              - GQ
                              - GR
                              - GS
                              - GT
                              - GU
                              - GW
                              - GY
                              - HK
                              - HM
                              - HN
                              - HR
                              - HT
                              - HU
                              - ID
                              - IE
                              - IL
                              - IM
                              - IN
                              - IO
                              - IQ
                              - IR
                              - IS
                              - IT
                              - JE
                              - JM
                              - JO
                              - JP
                              - KE
                              - KG
                              - KH
                              - KI
                              - KM
                              - KN
                              - KP
                              - KR
                              - KW
                              - KY
                              - KZ
                              - LA
                              - LB
                              - LC
                              - LI
                              - LK
                              - LR
                              - LS
                              - LT
                              - LU
                              - LV
                              - LY
                              - MA
                              - MC
                              - MD
                              - ME
                              - MF
                              - MG
                              - MH
                              - MK
                              - ML
                              - MM
                              - MN
                              - MO
                              - MP
                              - MQ
                              - MR
                              - MS
                              - MT
                              - MU
                              - MV
                              - MW
                              - MX
                              - MY
                              - MZ
                              - NA
                              - NC
                              - NE
                              - NF
                              - NG
                              - NI
                              - NL
                              - 'NO'
                              - NP
                              - NR
                              - NU
                              - NZ
                              - OM
                              - PA
                              - PE
                              - PF
                              - PG
                              - PH
                              - PK
                              - PL
                              - PM
                              - PN
                              - PR
                              - PS
                              - PT
                              - PW
                              - PY
                              - QA
                              - RE
                              - RO
                              - RS
                              - RU
                              - RW
                              - SA
                              - SB
                              - SC
                              - SD
                              - SE
                              - SG
                              - SH
                              - SI
                              - SJ
                              - SK
                              - SL
                              - SM
                              - SN
                              - SO
                              - SR
                              - SS
                              - ST
                              - SV
                              - SX
                              - SY
                              - SZ
                              - TC
                              - TD
                              - TF
                              - TG
                              - TH
                              - TJ
                              - TK
                              - TL
                              - TM
                              - TN
                              - TO
                              - TR
                              - TT
                              - TV
                              - TW
                              - TZ
                              - UA
                              - UG
                              - UM
                              - US
                              - UY
                              - UZ
                              - VA
                              - VC
                              - VE
                              - VG
                              - VI
                              - VN
                              - VU
                              - WF
                              - WS
                              - XK
                              - YE
                              - YT
                              - ZA
                              - ZM
                              - ZW
                          state:
                            description: >-
                              State, province, county. [ISO 3166 alpha-2
                              Codes](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2).
                            type: string
                            maxLength: 50
                          city:
                            title: City name
                            type: string
                            minLength: 1
                            maxLength: 85
                        required:
                          - address_line1
                          - postcode
                          - country
                          - city
                      postal_address:
                        description: >-
                          User postal address. Needs to be specified if
                          different to the residential address, otherwise it is
                          automatically populated.
                        oneOf:
                          - title: Address
                            type: object
                            description: Address. Must not be a P.O. box or c/o address.
                            properties:
                              address_line1:
                                type: string
                                description: First address line of the address.
                                maxLength: 100
                              address_line2:
                                type: string
                                description: Second address line of the address.
                                maxLength: 100
                              postcode:
                                title: Postal code
                                type: string
                                description: Postal code (postcode, PIN or ZIP code)
                                pattern: ^[a-zA-Z0-9][a-zA-Z0-9\s\-]{0,8}[a-zA-Z0-9]?$
                              country:
                                description: >-
                                  Accepted country code. [ISO 3166-1 alpha-2
                                  codes](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2).
                                type: string
                                enum:
                                  - AD
                                  - AE
                                  - AF
                                  - AG
                                  - AI
                                  - AL
                                  - AM
                                  - AO
                                  - AQ
                                  - AR
                                  - AS
                                  - AT
                                  - AU
                                  - AW
                                  - AX
                                  - AZ
                                  - BA
                                  - BB
                                  - BD
                                  - BE
                                  - BF
                                  - BG
                                  - BH
                                  - BI
                                  - BJ
                                  - BL
                                  - BM
                                  - BN
                                  - BO
                                  - BQ
                                  - BR
                                  - BS
                                  - BT
                                  - BV
                                  - BW
                                  - BY
                                  - BZ
                                  - CA
                                  - CC
                                  - CD
                                  - CF
                                  - CG
                                  - CH
                                  - CI
                                  - CK
                                  - CL
                                  - CM
                                  - CN
                                  - CO
                                  - CR
                                  - CU
                                  - CV
                                  - CW
                                  - CX
                                  - CY
                                  - CZ
                                  - DE
                                  - DJ
                                  - DK
                                  - DM
                                  - DO
                                  - DZ
                                  - EC
                                  - EE
                                  - EG
                                  - EH
                                  - ER
                                  - ES
                                  - ET
                                  - FI
                                  - FJ
                                  - FK
                                  - FM
                                  - FO
                                  - FR
                                  - GA
                                  - GB
                                  - GD
                                  - GE
                                  - GF
                                  - GG
                                  - GH
                                  - GI
                                  - GL
                                  - GM
                                  - GN
                                  - GP
                                  - GQ
                                  - GR
                                  - GS
                                  - GT
                                  - GU
                                  - GW
                                  - GY
                                  - HK
                                  - HM
                                  - HN
                                  - HR
                                  - HT
                                  - HU
                                  - ID
                                  - IE
                                  - IL
                                  - IM
                                  - IN
                                  - IO
                                  - IQ
                                  - IR
                                  - IS
                                  - IT
                                  - JE
                                  - JM
                                  - JO
                                  - JP
                                  - KE
                                  - KG
                                  - KH
                                  - KI
                                  - KM
                                  - KN
                                  - KP
                                  - KR
                                  - KW
                                  - KY
                                  - KZ
                                  - LA
                                  - LB
                                  - LC
                                  - LI
                                  - LK
                                  - LR
                                  - LS
                                  - LT
                                  - LU
                                  - LV
                                  - LY
                                  - MA
                                  - MC
                                  - MD
                                  - ME
                                  - MF
                                  - MG
                                  - MH
                                  - MK
                                  - ML
                                  - MM
                                  - MN
                                  - MO
                                  - MP
                                  - MQ
                                  - MR
                                  - MS
                                  - MT
                                  - MU
                                  - MV
                                  - MW
                                  - MX
                                  - MY
                                  - MZ
                                  - NA
                                  - NC
                                  - NE
                                  - NF
                                  - NG
                                  - NI
                                  - NL
                                  - 'NO'
                                  - NP
                                  - NR
                                  - NU
                                  - NZ
                                  - OM
                                  - PA
                                  - PE
                                  - PF
                                  - PG
                                  - PH
                                  - PK
                                  - PL
                                  - PM
                                  - PN
                                  - PR
                                  - PS
                                  - PT
                                  - PW
                                  - PY
                                  - QA
                                  - RE
                                  - RO
                                  - RS
                                  - RU
                                  - RW
                                  - SA
                                  - SB
                                  - SC
                                  - SD
                                  - SE
                                  - SG
                                  - SH
                                  - SI
                                  - SJ
                                  - SK
                                  - SL
                                  - SM
                                  - SN
                                  - SO
                                  - SR
                                  - SS
                                  - ST
                                  - SV
                                  - SX
                                  - SY
                                  - SZ
                                  - TC
                                  - TD
                                  - TF
                                  - TG
                                  - TH
                                  - TJ
                                  - TK
                                  - TL
                                  - TM
                                  - TN
                                  - TO
                                  - TR
                                  - TT
                                  - TV
                                  - TW
                                  - TZ
                                  - UA
                                  - UG
                                  - UM
                                  - US
                                  - UY
                                  - UZ
                                  - VA
                                  - VC
                                  - VE
                                  - VG
                                  - VI
                                  - VN
                                  - VU
                                  - WF
                                  - WS
                                  - XK
                                  - YE
                                  - YT
                                  - ZA
                                  - ZM
                                  - ZW
                              state:
                                description: >-
                                  State, province, county. [ISO 3166 alpha-2
                                  Codes](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2).
                                type: string
                                maxLength: 50
                              city:
                                title: City name
                                type: string
                                minLength: 1
                                maxLength: 85
                            required:
                              - address_line1
                              - postcode
                              - country
                              - city
                          - type: 'null'
                      status:
                        type: string
                        description: |-
                          Status of the user.
                          * ACTIVE - 
                          * INACTIVE - 
                          * OFFBOARDING - 
                          * OFFBOARDED - 
                        enum:
                          - ACTIVE
                          - INACTIVE
                          - OFFBOARDING
                          - OFFBOARDED
                      email:
                        type: string
                        format: email
                        maxLength: 100
                        description: Email of the user. Must be a valid email address.
                      phone_number:
                        type: string
                        pattern: ^([0-9]{8,15})?$
                        description: >-
                          Phone number of the user. [Phone number E.164
                          format](https://en.wikipedia.org/wiki/E.164).
                      fatca:
                        type: object
                        properties:
                          status:
                            type: boolean
                            description: >-
                              The user’s FATCA status is true if the user is
                              subject to paying taxes in the US, otherwise it
                              can be set to false.
                          confirmed_at:
                            type: string
                            format: date-time
                            description: >-
                              Timestamp at which the user confirmed their FATCA
                              status. [RFC
                              3339-5](https://datatracker.ietf.org/doc/html/rfc3339#section-5.6),
                              [ISO8601
                              UTC](https://www.iso.org/iso-8601-date-and-time-format.html)
                        required:
                          - status
                          - confirmed_at
                      terms_and_conditions:
                        type: object
                        properties:
                          consent_document_id:
                            title: Consent unique identifier.
                            type: string
                            description: Consent unique identifier.
                            format: uuid
                          confirmed_at:
                            type: string
                            format: date-time
                            description: >-
                              Timestamp at which the user consented to the terms
                              & conditions. [RFC
                              3339-5](https://datatracker.ietf.org/doc/html/rfc3339#section-5.6),
                              [ISO8601
                              UTC](https://www.iso.org/iso-8601-date-and-time-format.html)
                        required:
                          - consent_document_id
                          - confirmed_at
                      data_privacy_and_sharing_agreement:
                        type: object
                        properties:
                          consent_document_id:
                            title: Consent unique identifier.
                            type: string
                            description: Consent unique identifier.
                            format: uuid
                          confirmed_at:
                            type: string
                            format: date-time
                            description: >-
                              Timestamp at which the user consented to the data
                              sharing agreement. [RFC
                              3339-5](https://datatracker.ietf.org/doc/html/rfc3339#section-5.6),
                              [ISO8601
                              UTC](https://www.iso.org/iso-8601-date-and-time-format.html)
                        required:
                          - consent_document_id
                          - confirmed_at
                      branch_id:
                        title: Branch unique identifier.
                        type: string
                        description: >-
                          Unique identifier of the market the user is onboarded
                          on. Only relevant if the client is operating in
                          different markets and the client is configured
                          accordingly
                        format: uuid
                    required:
                      - id
                      - created_at
                      - updated_at
                      - first_name
                      - last_name
                      - birth_date
                      - nationalities
                      - address
                      - status
                    additionalProperties: false
              examples:
                BYOL:
                  summary: BYOL User
                  value:
                    id: 83d83ec2-d2ca-49ff-bbea-b92b5c3be202
                    created_at: '2021-07-21T14:10:00.00Z'
                    updated_at: '2021-07-21T14:10:00.00Z'
                    first_name: Karl
                    last_name: Schmidt
                    salutation: SALUTATION_MALE
                    title: DR
                    birth_date: '1972-09-30'
                    birth_city: Berlin
                    birth_country: DE
                    birth_name: Schmidt
                    nationalities:
                      - DE
                      - AU
                    postal_address:
                      address_line1: Rosenweg 221
                      address_line2: apt. 33
                      postcode: '45678'
                      city: Berlin
                      state: BE
                      country: DE
                    address:
                      address_line1: Rosenweg 221
                      address_line2: apt. 33
                      postcode: '45678'
                      city: Berlin
                      state: BE
                      country: DE
                    status: ACTIVE
                BYOL with Branch ID:
                  summary: BYOL User with Branch ID
                  value:
                    id: 83d83ec2-d2ca-49ff-bbea-b92b5c3be202
                    created_at: '2021-07-21T14:10:00.00Z'
                    updated_at: '2021-07-21T14:10:00.00Z'
                    first_name: Karl
                    last_name: Schmidt
                    salutation: SALUTATION_MALE
                    title: DR
                    birth_date: '1972-09-30'
                    birth_city: Berlin
                    birth_country: DE
                    birth_name: Schmidt
                    nationalities:
                      - DE
                      - AU
                    postal_address:
                      address_line1: Rosenweg 221
                      address_line2: apt. 33
                      postcode: '45678'
                      city: Berlin
                      state: BE
                      country: DE
                    address:
                      address_line1: Rosenweg 221
                      address_line2: apt. 33
                      postcode: '45678'
                      city: Berlin
                      state: BE
                      country: DE
                    status: ACTIVE
                    branch_id: e6373bfa-ff12-4004-8de9-747ac96764da
                TOL:
                  summary: TOL User
                  value:
                    id: 83d83ec2-d2ca-49ff-bbea-b92b5c3be202
                    created_at: '2021-07-21T14:10:00.00Z'
                    updated_at: '2021-07-21T14:10:00.00Z'
                    first_name: Karl
                    last_name: Schmidt
                    email: karl.schmidt@example.com
                    salutation: SALUTATION_MALE
                    title: DR
                    birth_date: '1972-09-30'
                    birth_city: Berlin
                    birth_country: DE
                    birth_name: Schmidt
                    nationalities:
                      - DE
                      - AU
                    phone_number: '4930901820'
                    postal_address:
                      address_line1: Rosenweg 221
                      address_line2: apt. 33
                      postcode: '45678'
                      city: Berlin
                      state: BE
                      country: DE
                    address:
                      address_line1: Rosenweg 221
                      address_line2: apt. 33
                      postcode: '45678'
                      city: Berlin
                      state: BE
                      country: DE
                    fatca:
                      status: false
                      confirmed_at: '2020-08-24T14:15:22Z'
                    terms_and_conditions:
                      consent_document_id: d0b83880-3809-4eee-b0df-ca50db84c15a
                      confirmed_at: '2020-08-24T14:14:22Z'
                    data_privacy_and_sharing_agreement:
                      consent_document_id: 7ab0fc5c-8157-4acd-b02d-6ccda0e81dec
                      confirmed_at: '2020-08-24T14:16:22Z'
                    status: ACTIVE
                TOL With Branch ID:
                  summary: TOL User with Branch ID
                  value:
                    id: 83d83ec2-d2ca-49ff-bbea-b92b5c3be202
                    created_at: '2021-07-21T14:10:00.00Z'
                    updated_at: '2021-07-21T14:10:00.00Z'
                    first_name: Karl
                    last_name: Schmidt
                    email: karl.schmidt@example.com
                    salutation: SALUTATION_MALE
                    title: DR
                    birth_date: '1972-09-30'
                    birth_city: Berlin
                    birth_country: DE
                    birth_name: Schmidt
                    nationalities:
                      - DE
                      - AU
                    phone_number: '4930901820'
                    postal_address:
                      address_line1: Rosenweg 221
                      address_line2: apt. 33
                      postcode: '45678'
                      city: Berlin
                      state: BE
                      country: DE
                    address:
                      address_line1: Rosenweg 221
                      address_line2: apt. 33
                      postcode: '45678'
                      city: Berlin
                      state: BE
                      country: DE
                    fatca:
                      status: false
                      confirmed_at: '2020-08-24T14:15:22Z'
                    terms_and_conditions:
                      consent_document_id: d0b83880-3809-4eee-b0df-ca50db84c15a
                      confirmed_at: '2020-08-24T14:14:22Z'
                    data_privacy_and_sharing_agreement:
                      consent_document_id: 7ab0fc5c-8157-4acd-b02d-6ccda0e81dec
                      confirmed_at: '2020-08-24T14:16:22Z'
                    status: ACTIVE
                    branch_id: e6373bfa-ff12-4004-8de9-747ac96764da
        '400':
          description: Bad Request. The incoming request had a malformed parameter/object.
          headers:
            upvest-request-id:
              required: true
              schema:
                type: string
                format: uuid
                example: 169ae4c7-ebd7-4041-94da-25369653eba7
          content:
            application/problem+json:
              schema:
                title: Error
                type: object
                description: ''
                properties:
                  type:
                    type: string
                    description: URL to a document describing the error condition.
                  status:
                    type: integer
                    description: >-
                      Transmission of the HTTP status code so that all
                      information can be found in one place, but also to correct
                      changes in the status code due to the use of proxy
                      servers.
                  title:
                    type: string
                    description: >-
                      A short, human-readable title for the general error type;
                      the title should not change for given types.
                  detail:
                    type: string
                    description: A human-readable description of the specific error.
                  instance:
                    type: string
                    description: >-
                      This optional key may be present, with a unique URI for
                      the specific error; this will often point to an error log
                      for that specific response.
                  request_id:
                    type: string
                    description: Correlation ID for the original request.
                required:
                  - type
                  - status
                additionalProperties: false
              example:
                status: 400
                type: bad_request
        '401':
          description: Unauthorized. The caller has not been authenticated.
          headers:
            upvest-request-id:
              required: true
              schema:
                type: string
                format: uuid
                example: 169ae4c7-ebd7-4041-94da-25369653eba7
          content:
            application/problem+json:
              schema:
                title: Error
                type: object
                description: ''
                properties:
                  type:
                    type: string
                    description: URL to a document describing the error condition.
                  status:
                    type: integer
                    description: >-
                      Transmission of the HTTP status code so that all
                      information can be found in one place, but also to correct
                      changes in the status code due to the use of proxy
                      servers.
                  title:
                    type: string
                    description: >-
                      A short, human-readable title for the general error type;
                      the title should not change for given types.
                  detail:
                    type: string
                    description: A human-readable description of the specific error.
                  instance:
                    type: string
                    description: >-
                      This optional key may be present, with a unique URI for
                      the specific error; this will often point to an error log
                      for that specific response.
                  request_id:
                    type: string
                    description: Correlation ID for the original request.
                required:
                  - type
                  - status
                additionalProperties: false
              example:
                status: 401
                type: unauthorized
        '403':
          description: >-
            Forbidden. The caller has been authenticated but is not allowed to
            take the requested action.
          headers:
            upvest-request-id:
              required: true
              schema:
                type: string
                format: uuid
                example: 169ae4c7-ebd7-4041-94da-25369653eba7
          content:
            application/problem+json:
              schema:
                title: Error
                type: object
                description: ''
                properties:
                  type:
                    type: string
                    description: URL to a document describing the error condition.
                  status:
                    type: integer
                    description: >-
                      Transmission of the HTTP status code so that all
                      information can be found in one place, but also to correct
                      changes in the status code due to the use of proxy
                      servers.
                  title:
                    type: string
                    description: >-
                      A short, human-readable title for the general error type;
                      the title should not change for given types.
                  detail:
                    type: string
                    description: A human-readable description of the specific error.
                  instance:
                    type: string
                    description: >-
                      This optional key may be present, with a unique URI for
                      the specific error; this will often point to an error log
                      for that specific response.
                  request_id:
                    type: string
                    description: Correlation ID for the original request.
                required:
                  - type
                  - status
                additionalProperties: false
              example:
                status: 403
                type: forbidden
        '406':
          description: >-
            Not Acceptable. The resource does not have a current representation
            that would be acceptable to the user agent. "Accept" header defined
            unsupported value.
          headers:
            upvest-request-id:
              required: true
              schema:
                type: string
                format: uuid
                example: 169ae4c7-ebd7-4041-94da-25369653eba7
          content:
            application/problem+json:
              schema:
                title: Error
                type: object
                description: ''
                properties:
                  type:
                    type: string
                    description: URL to a document describing the error condition.
                  status:
                    type: integer
                    description: >-
                      Transmission of the HTTP status code so that all
                      information can be found in one place, but also to correct
                      changes in the status code due to the use of proxy
                      servers.
                  title:
                    type: string
                    description: >-
                      A short, human-readable title for the general error type;
                      the title should not change for given types.
                  detail:
                    type: string
                    description: A human-readable description of the specific error.
                  instance:
                    type: string
                    description: >-
                      This optional key may be present, with a unique URI for
                      the specific error; this will often point to an error log
                      for that specific response.
                  request_id:
                    type: string
                    description: Correlation ID for the original request.
                required:
                  - type
                  - status
                additionalProperties: false
              example:
                status: 406
                type: not_acceptable
        '429':
          description: >-
            Too Many Requests. The caller has exceeded their quota for the time
            period and has been throttled.
          headers:
            upvest-request-id:
              required: true
              schema:
                type: string
                format: uuid
                example: 169ae4c7-ebd7-4041-94da-25369653eba7
          content:
            application/problem+json:
              schema:
                title: Error
                type: object
                description: ''
                properties:
                  type:
                    type: string
                    description: URL to a document describing the error condition.
                  status:
                    type: integer
                    description: >-
                      Transmission of the HTTP status code so that all
                      information can be found in one place, but also to correct
                      changes in the status code due to the use of proxy
                      servers.
                  title:
                    type: string
                    description: >-
                      A short, human-readable title for the general error type;
                      the title should not change for given types.
                  detail:
                    type: string
                    description: A human-readable description of the specific error.
                  instance:
                    type: string
                    description: >-
                      This optional key may be present, with a unique URI for
                      the specific error; this will often point to an error log
                      for that specific response.
                  request_id:
                    type: string
                    description: Correlation ID for the original request.
                required:
                  - type
                  - status
                additionalProperties: false
              example:
                status: 429
                type: too_many_requests
        '500':
          description: Internal Server Error. The service encountered an unexpected error.
          headers:
            upvest-request-id:
              required: true
              schema:
                type: string
                format: uuid
                example: 169ae4c7-ebd7-4041-94da-25369653eba7
          content:
            application/problem+json:
              schema:
                title: Error
                type: object
                description: ''
                properties:
                  type:
                    type: string
                    description: URL to a document describing the error condition.
                  status:
                    type: integer
                    description: >-
                      Transmission of the HTTP status code so that all
                      information can be found in one place, but also to correct
                      changes in the status code due to the use of proxy
                      servers.
                  title:
                    type: string
                    description: >-
                      A short, human-readable title for the general error type;
                      the title should not change for given types.
                  detail:
                    type: string
                    description: A human-readable description of the specific error.
                  instance:
                    type: string
                    description: >-
                      This optional key may be present, with a unique URI for
                      the specific error; this will often point to an error log
                      for that specific response.
                  request_id:
                    type: string
                    description: Correlation ID for the original request.
                required:
                  - type
                  - status
                additionalProperties: false
              example:
                status: 500
                type: internal_server_error
        '503':
          description: >-
            Service Unavailable. The service handling for this request cannot be
            reached at this time.
          headers:
            upvest-request-id:
              required: true
              schema:
                type: string
                format: uuid
                example: 169ae4c7-ebd7-4041-94da-25369653eba7
          content:
            application/problem+json:
              schema:
                title: Error
                type: object
                description: ''
                properties:
                  type:
                    type: string
                    description: URL to a document describing the error condition.
                  status:
                    type: integer
                    description: >-
                      Transmission of the HTTP status code so that all
                      information can be found in one place, but also to correct
                      changes in the status code due to the use of proxy
                      servers.
                  title:
                    type: string
                    description: >-
                      A short, human-readable title for the general error type;
                      the title should not change for given types.
                  detail:
                    type: string
                    description: A human-readable description of the specific error.
                  instance:
                    type: string
                    description: >-
                      This optional key may be present, with a unique URI for
                      the specific error; this will often point to an error log
                      for that specific response.
                  request_id:
                    type: string
                    description: Correlation ID for the original request.
                required:
                  - type
                  - status
                additionalProperties: false
              example:
                status: 503
                type: method_not_allowed
        '504':
          description: >-
            Gateway Timeout. The service gateway has reached its internal
            timeout.
          headers:
            upvest-request-id:
              required: true
              schema:
                type: string
                format: uuid
                example: 169ae4c7-ebd7-4041-94da-25369653eba7
          content:
            application/problem+json:
              schema:
                title: Error
                type: object
                description: ''
                properties:
                  type:
                    type: string
                    description: URL to a document describing the error condition.
                  status:
                    type: integer
                    description: >-
                      Transmission of the HTTP status code so that all
                      information can be found in one place, but also to correct
                      changes in the status code due to the use of proxy
                      servers.
                  title:
                    type: string
                    description: >-
                      A short, human-readable title for the general error type;
                      the title should not change for given types.
                  detail:
                    type: string
                    description: A human-readable description of the specific error.
                  instance:
                    type: string
                    description: >-
                      This optional key may be present, with a unique URI for
                      the specific error; this will often point to an error log
                      for that specific response.
                  request_id:
                    type: string
                    description: Correlation ID for the original request.
                required:
                  - type
                  - status
                additionalProperties: false
              example:
                status: 504
                type: gateway_timeout
  /users/{user_id}:
    parameters:
      - name: user_id
        in: path
        required: true
        schema:
          title: User unique identifier.
          type: string
          description: User unique identifier.
          format: uuid
      - name: upvest-client-id
        in: header
        description: Tenant Client ID
        required: true
        schema:
          type: string
          format: uuid
          example: ebabcf4d-61c3-4942-875c-e265a7c2d062
      - name: authorization
        in: header
        description: |
          Bearer (access) token from the OAuth flow with correct scopes.
          https://datatracker.ietf.org/doc/html/rfc6750
        required: true
        schema:
          type: string
          pattern: ^Bearer [a-zA-Z0-9\-\._~+/]*=*
          example: Bearer c2VjcmV0Cg==
      - name: signature
        in: header
        required: true
        schema:
          type: string
        description: >-
          https://tools.ietf.org/id/draft-ietf-httpbis-message-signatures-01.html#name-the-signature-http-header
      - name: signature-input
        in: header
        required: true
        schema:
          type: string
        description: >-
          https://tools.ietf.org/id/draft-ietf-httpbis-message-signatures-01.html#name-the-signature-input-http-he
      - name: upvest-api-version
        in: header
        required: false
        schema:
          type: string
          enum:
            - '1'
          default: '1'
          example: '1'
        description: 'Upvest API version (Note: Do not include quotation marks)'
    get:
      operationId: retrieve_user
      summary: Get a user by ID
      description: Returns the user specified by ID.
      tags:
        - Users
      security:
        - oauth-client-credentials:
            - users:read
            - users:admin
      responses:
        '200':
          description: OK
          headers:
            upvest-request-id:
              required: true
              schema:
                type: string
                format: uuid
                example: 169ae4c7-ebd7-4041-94da-25369653eba7
          content:
            application/json:
              schema:
                title: User - Get - Response
                anyOf:
                  - title: User (BYOL)
                    type: object
                    properties:
                      id:
                        title: User unique identifier.
                        type: string
                        description: User unique identifier.
                        format: uuid
                      created_at:
                        type: string
                        format: date-time
                        description: >-
                          Date and time when the resource was created. [RFC
                          3339-5](https://datatracker.ietf.org/doc/html/rfc3339#section-5.6),
                          [ISO8601
                          UTC](https://www.iso.org/iso-8601-date-and-time-format.html)
                      updated_at:
                        type: string
                        format: date-time
                        description: >-
                          Date and time when the resource was last updated. [RFC
                          3339-5](https://datatracker.ietf.org/doc/html/rfc3339#section-5.6),
                          [ISO8601
                          UTC](https://www.iso.org/iso-8601-date-and-time-format.html)
                      first_name:
                        type: string
                        maxLength: 100
                        minLength: 2
                        description: >-
                          First name(s) of the user. Please include all first
                          and middle names of the user.
                      last_name:
                        type: string
                        maxLength: 100
                        minLength: 1
                        description: Last name of the user.
                      salutation:
                        type: string
                        description: |-
                          Salutation of the user used in reports and statements.
                          * (empty string) - 
                          * SALUTATION_MALE - 
                          * SALUTATION_FEMALE - 
                          * SALUTATION_FEMALE_MARRIED - 
                          * SALUTATION_DIVERSE - 
                        enum:
                          - ''
                          - SALUTATION_MALE
                          - SALUTATION_FEMALE
                          - SALUTATION_FEMALE_MARRIED
                          - SALUTATION_DIVERSE
                        default: ''
                      title:
                        type: string
                        description: |-
                          Title of the user used in reports and statements.
                          * (empty string) - 
                          * DR - Doctor
                          * PROF - Professor
                          * PROF_DR - 
                          * DIPL_ING - Graduate engineer (Diplom-Ingenieur)
                          * MAGISTER - 
                        enum:
                          - ''
                          - DR
                          - PROF
                          - PROF_DR
                          - DIPL_ING
                          - MAGISTER
                        default: ''
                      birth_date:
                        type: string
                        format: date
                        description: >-
                          Birth date of the user in YYYY-MM-DD format. [RFC
                          3339, section
                          5.6](https://json-schema.org/draft/2020-12/json-schema-validation.html#RFC3339)
                      birth_city:
                        title: City name
                        type: string
                        minLength: 1
                        maxLength: 85
                      birth_country:
                        description: >-
                          Accepted country code. [ISO 3166-1 alpha-2
                          codes](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2).
                        type: string
                        enum:
                          - AD
                          - AE
                          - AF
                          - AG
                          - AI
                          - AL
                          - AM
                          - AO
                          - AQ
                          - AR
                          - AS
                          - AT
                          - AU
                          - AW
                          - AX
                          - AZ
                          - BA
                          - BB
                          - BD
                          - BE
                          - BF
                          - BG
                          - BH
                          - BI
                          - BJ
                          - BL
                          - BM
                          - BN
                          - BO
                          - BQ
                          - BR
                          - BS
                          - BT
                          - BV
                          - BW
                          - BY
                          - BZ
                          - CA
                          - CC
                          - CD
                          - CF
                          - CG
                          - CH
                          - CI
                          - CK
                          - CL
                          - CM
                          - CN
                          - CO
                          - CR
                          - CU
                          - CV
                          - CW
                          - CX
                          - CY
                          - CZ
                          - DE
                          - DJ
                          - DK
                          - DM
                          - DO
                          - DZ
                          - EC
                          - EE
                          - EG
                          - EH
                          - ER
                          - ES
                          - ET
                          - FI
                          - FJ
                          - FK
                          - FM
                          - FO
                          - FR
                          - GA
                          - GB
                          - GD
                          - GE
                          - GF
                          - GG
                          - GH
                          - GI
                          - GL
                          - GM
                          - GN
                          - GP
                          - GQ
                          - GR
                          - GS
                          - GT
                          - GU
                          - GW
                          - GY
                          - HK
                          - HM
                          - HN
                          - HR
                          - HT
                          - HU
                          - ID
                          - IE
                          - IL
                          - IM
                          - IN
                          - IO
                          - IQ
                          - IR
                          - IS
                          - IT
                          - JE
                          - JM
                          - JO
                          - JP
                          - KE
                          - KG
                          - KH
                          - KI
                          - KM
                          - KN
                          - KP
                          - KR
                          - KW
                          - KY
                          - KZ
                          - LA
                          - LB
                          - LC
                          - LI
                          - LK
                          - LR
                          - LS
                          - LT
                          - LU
                          - LV
                          - LY
                          - MA
                          - MC
                          - MD
                          - ME
                          - MF
                          - MG
                          - MH
                          - MK
                          - ML
                          - MM
                          - MN
                          - MO
                          - MP
                          - MQ
                          - MR
                          - MS
                          - MT
                          - MU
                          - MV
                          - MW
                          - MX
                          - MY
                          - MZ
                          - NA
                          - NC
                          - NE
                          - NF
                          - NG
                          - NI
                          - NL
                          - 'NO'
                          - NP
                          - NR
                          - NU
                          - NZ
                          - OM
                          - PA
                          - PE
                          - PF
                          - PG
                          - PH
                          - PK
                          - PL
                          - PM
                          - PN
                          - PR
                          - PS
                          - PT
                          - PW
                          - PY
                          - QA
                          - RE
                          - RO
                          - RS
                          - RU
                          - RW
                          - SA
                          - SB
                          - SC
                          - SD
                          - SE
                          - SG
                          - SH
                          - SI
                          - SJ
                          - SK
                          - SL
                          - SM
                          - SN
                          - SO
                          - SR
                          - SS
                          - ST
                          - SV
                          - SX
                          - SY
                          - SZ
                          - TC
                          - TD
                          - TF
                          - TG
                          - TH
                          - TJ
                          - TK
                          - TL
                          - TM
                          - TN
                          - TO
                          - TR
                          - TT
                          - TV
                          - TW
                          - TZ
                          - UA
                          - UG
                          - UM
                          - US
                          - UY
                          - UZ
                          - VA
                          - VC
                          - VE
                          - VG
                          - VI
                          - VN
                          - VU
                          - WF
                          - WS
                          - XK
                          - YE
                          - YT
                          - ZA
                          - ZM
                          - ZW
                      birth_name:
                        type: string
                        maxLength: 100
                        description: If applicable, birth name of the user.
                      nationalities:
                        type: array
                        items:
                          description: >-
                            Accepted country code. [ISO 3166-1 alpha-2
                            codes](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2).
                          type: string
                          enum:
                            - AD
                            - AE
                            - AF
                            - AG
                            - AI
                            - AL
                            - AM
                            - AO
                            - AQ
                            - AR
                            - AS
                            - AT
                            - AU
                            - AW
                            - AX
                            - AZ
                            - BA
                            - BB
                            - BD
                            - BE
                            - BF
                            - BG
                            - BH
                            - BI
                            - BJ
                            - BL
                            - BM
                            - BN
                            - BO
                            - BQ
                            - BR
                            - BS
                            - BT
                            - BV
                            - BW
                            - BY
                            - BZ
                            - CA
                            - CC
                            - CD
                            - CF
                            - CG
                            - CH
                            - CI
                            - CK
                            - CL
                            - CM
                            - CN
                            - CO
                            - CR
                            - CU
                            - CV
                            - CW
                            - CX
                            - CY
                            - CZ
                            - DE
                            - DJ
                            - DK
                            - DM
                            - DO
                            - DZ
                            - EC
                            - EE
                            - EG
                            - EH
                            - ER
                            - ES
                            - ET
                            - FI
                            - FJ
                            - FK
                            - FM
                            - FO
                            - FR
                            - GA
                            - GB
                            - GD
                            - GE
                            - GF
                            - GG
                            - GH
                            - GI
                            - GL
                            - GM
                            - GN
                            - GP
                            - GQ
                            - GR
                            - GS
                            - GT
                            - GU
                            - GW
                            - GY
                            - HK
                            - HM
                            - HN
                            - HR
                            - HT
                            - HU
                            - ID
                            - IE
                            - IL
                            - IM
                            - IN
                            - IO
                            - IQ
                            - IR
                            - IS
                            - IT
                            - JE
                            - JM
                            - JO
                            - JP
                            - KE
                            - KG
                            - KH
                            - KI
                            - KM
                            - KN
                            - KP
                            - KR
                            - KW
                            - KY
                            - KZ
                            - LA
                            - LB
                            - LC
                            - LI
                            - LK
                            - LR
                            - LS
                            - LT
                            - LU
                            - LV
                            - LY
                            - MA
                            - MC
                            - MD
                            - ME
                            - MF
                            - MG
                            - MH
                            - MK
                            - ML
                            - MM
                            - MN
                            - MO
                            - MP
                            - MQ
                            - MR
                            - MS
                            - MT
                            - MU
                            - MV
                            - MW
                            - MX
                            - MY
                            - MZ
                            - NA
                            - NC
                            - NE
                            - NF
                            - NG
                            - NI
                            - NL
                            - 'NO'
                            - NP
                            - NR
                            - NU
                            - NZ
                            - OM
                            - PA
                            - PE
                            - PF
                            - PG
                            - PH
                            - PK
                            - PL
                            - PM
                            - PN
                            - PR
                            - PS
                            - PT
                            - PW
                            - PY
                            - QA
                            - RE
                            - RO
                            - RS
                            - RU
                            - RW
                            - SA
                            - SB
                            - SC
                            - SD
                            - SE
                            - SG
                            - SH
                            - SI
                            - SJ
                            - SK
                            - SL
                            - SM
                            - SN
                            - SO
                            - SR
                            - SS
                            - ST
                            - SV
                            - SX
                            - SY
                            - SZ
                            - TC
                            - TD
                            - TF
                            - TG
                            - TH
                            - TJ
                            - TK
                            - TL
                            - TM
                            - TN
                            - TO
                            - TR
                            - TT
                            - TV
                            - TW
                            - TZ
                            - UA
                            - UG
                            - UM
                            - US
                            - UY
                            - UZ
                            - VA
                            - VC
                            - VE
                            - VG
                            - VI
                            - VN
                            - VU
                            - WF
                            - WS
                            - XK
                            - YE
                            - YT
                            - ZA
                            - ZM
                            - ZW
                        minItems: 1
                        description: >-
                          Nationalities of the user. [ISO 3166 alpha-2
                          Codes](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2).
                      address:
                        title: Address
                        type: object
                        description: Address. Must not be a P.O. box or c/o address.
                        properties:
                          address_line1:
                            type: string
                            description: First address line of the address.
                            maxLength: 100
                          address_line2:
                            type: string
                            description: Second address line of the address.
                            maxLength: 100
                          postcode:
                            title: Postal code
                            type: string
                            description: Postal code (postcode, PIN or ZIP code)
                            pattern: ^[a-zA-Z0-9][a-zA-Z0-9\s\-]{0,8}[a-zA-Z0-9]?$
                          country:
                            description: >-
                              Accepted country code. [ISO 3166-1 alpha-2
                              codes](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2).
                            type: string
                            enum:
                              - AD
                              - AE
                              - AF
                              - AG
                              - AI
                              - AL
                              - AM
                              - AO
                              - AQ
                              - AR
                              - AS
                              - AT
                              - AU
                              - AW
                              - AX
                              - AZ
                              - BA
                              - BB
                              - BD
                              - BE
                              - BF
                              - BG
                              - BH
                              - BI
                              - BJ
                              - BL
                              - BM
                              - BN
                              - BO
                              - BQ
                              - BR
                              - BS
                              - BT
                              - BV
                              - BW
                              - BY
                              - BZ
                              - CA
                              - CC
                              - CD
                              - CF
                              - CG
                              - CH
                              - CI
                              - CK
                              - CL
                              - CM
                              - CN
                              - CO
                              - CR
                              - CU
                              - CV
                              - CW
                              - CX
                              - CY
                              - CZ
                              - DE
                              - DJ
                              - DK
                              - DM
                              - DO
                              - DZ
                              - EC
                              - EE
                              - EG
                              - EH
                              - ER
                              - ES
                              - ET
                              - FI
                              - FJ
                              - FK
                              - FM
                              - FO
                              - FR
                              - GA
                              - GB
                              - GD
                              - GE
                              - GF
                              - GG
                              - GH
                              - GI
                              - GL
                              - GM
                              - GN
                              - GP
                              - GQ
                              - GR
                              - GS
                              - GT
                              - GU
                              - GW
                              - GY
                              - HK
                              - HM
                              - HN
                              - HR
                              - HT
                              - HU
                              - ID
                              - IE
                              - IL
                              - IM
                              - IN
                              - IO
                              - IQ
                              - IR
                              - IS
                              - IT
                              - JE
                              - JM
                              - JO
                              - JP
                              - KE
                              - KG
                              - KH
                              - KI
                              - KM
                              - KN
                              - KP
                              - KR
                              - KW
                              - KY
                              - KZ
                              - LA
                              - LB
                              - LC
                              - LI
                              - LK
                              - LR
                              - LS
                              - LT
                              - LU
                              - LV
                              - LY
                              - MA
                              - MC
                              - MD
                              - ME
                              - MF
                              - MG
                              - MH
                              - MK
                              - ML
                              - MM
                              - MN
                              - MO
                              - MP
                              - MQ
                              - MR
                              - MS
                              - MT
                              - MU
                              - MV
                              - MW
                              - MX
                              - MY
                              - MZ
                              - NA
                              - NC
                              - NE
                              - NF
                              - NG
                              - NI
                              - NL
                              - 'NO'
                              - NP
                              - NR
                              - NU
                              - NZ
                              - OM
                              - PA
                              - PE
                              - PF
                              - PG
                              - PH
                              - PK
                              - PL
                              - PM
                              - PN
                              - PR
                              - PS
                              - PT
                              - PW
                              - PY
                              - QA
                              - RE
                              - RO
                              - RS
                              - RU
                              - RW
                              - SA
                              - SB
                              - SC
                              - SD
                              - SE
                              - SG
                              - SH
                              - SI
                              - SJ
                              - SK
                              - SL
                              - SM
                              - SN
                              - SO
                              - SR
                              - SS
                              - ST
                              - SV
                              - SX
                              - SY
                              - SZ
                              - TC
                              - TD
                              - TF
                              - TG
                              - TH
                              - TJ
                              - TK
                              - TL
                              - TM
                              - TN
                              - TO
                              - TR
                              - TT
                              - TV
                              - TW
                              - TZ
                              - UA
                              - UG
                              - UM
                              - US
                              - UY
                              - UZ
                              - VA
                              - VC
                              - VE
                              - VG
                              - VI
                              - VN
                              - VU
                              - WF
                              - WS
                              - XK
                              - YE
                              - YT
                              - ZA
                              - ZM
                              - ZW
                          state:
                            description: >-
                              State, province, county. [ISO 3166 alpha-2
                              Codes](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2).
                            type: string
                            maxLength: 50
                          city:
                            title: City name
                            type: string
                            minLength: 1
                            maxLength: 85
                        required:
                          - address_line1
                          - postcode
                          - country
                          - city
                      postal_address:
                        description: >-
                          User postal address. Needs to be specified if
                          different to the residential address, otherwise it is
                          automatically populated.
                        oneOf:
                          - title: Address
                            type: object
                            description: Address. Must not be a P.O. box or c/o address.
                            properties:
                              address_line1:
                                type: string
                                description: First address line of the address.
                                maxLength: 100
                              address_line2:
                                type: string
                                description: Second address line of the address.
                                maxLength: 100
                              postcode:
                                title: Postal code
                                type: string
                                description: Postal code (postcode, PIN or ZIP code)
                                pattern: ^[a-zA-Z0-9][a-zA-Z0-9\s\-]{0,8}[a-zA-Z0-9]?$
                              country:
                                description: >-
                                  Accepted country code. [ISO 3166-1 alpha-2
                                  codes](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2).
                                type: string
                                enum:
                                  - AD
                                  - AE
                                  - AF
                                  - AG
                                  - AI
                                  - AL
                                  - AM
                                  - AO
                                  - AQ
                                  - AR
                                  - AS
                                  - AT
                                  - AU
                                  - AW
                                  - AX
                                  - AZ
                                  - BA
                                  - BB
                                  - BD
                                  - BE
                                  - BF
                                  - BG
                                  - BH
                                  - BI
                                  - BJ
                                  - BL
                                  - BM
                                  - BN
                                  - BO
                                  - BQ
                                  - BR
                                  - BS
                                  - BT
                                  - BV
                                  - BW
                                  - BY
                                  - BZ
                                  - CA
                                  - CC
                                  - CD
                                  - CF
                                  - CG
                                  - CH
                                  - CI
                                  - CK
                                  - CL
                                  - CM
                                  - CN
                                  - CO
                                  - CR
                                  - CU
                                  - CV
                                  - CW
                                  - CX
                                  - CY
                                  - CZ
                                  - DE
                                  - DJ
                                  - DK
                                  - DM
                                  - DO
                                  - DZ
                                  - EC
                                  - EE
                                  - EG
                                  - EH
                                  - ER
                                  - ES
                                  - ET
                                  - FI
                                  - FJ
                                  - FK
                                  - FM
                                  - FO
                                  - FR
                                  - GA
                                  - GB
                                  - GD
                                  - GE
                                  - GF
                                  - GG
                                  - GH
                                  - GI
                                  - GL
                                  - GM
                                  - GN
                                  - GP
                                  - GQ
                                  - GR
                                  - GS
                                  - GT
                                  - GU
                                  - GW
                                  - GY
                                  - HK
                                  - HM
                                  - HN
                                  - HR
                                  - HT
                                  - HU
                                  - ID
                                  - IE
                                  - IL
                                  - IM
                                  - IN
                                  - IO
                                  - IQ
                                  - IR
                                  - IS
                                  - IT
                                  - JE
                                  - JM
                                  - JO
                                  - JP
                                  - KE
                                  - KG
                                  - KH
                                  - KI
                                  - KM
                                  - KN
                                  - KP
                                  - KR
                                  - KW
                                  - KY
                                  - KZ
                                  - LA
                                  - LB
                                  - LC
                                  - LI
                                  - LK
                                  - LR
                                  - LS
                                  - LT
                                  - LU
                                  - LV
                                  - LY
                                  - MA
                                  - MC
                                  - MD
                                  - ME
                                  - MF
                                  - MG
                                  - MH
                                  - MK
                                  - ML
                                  - MM
                                  - MN
                                  - MO
                                  - MP
                                  - MQ
                                  - MR
                                  - MS
                                  - MT
                                  - MU
                                  - MV
                                  - MW
                                  - MX
                                  - MY
                                  - MZ
                                  - NA
                                  - NC
                                  - NE
                                  - NF
                                  - NG
                                  - NI
                                  - NL
                                  - 'NO'
                                  - NP
                                  - NR
                                  - NU
                                  - NZ
                                  - OM
                                  - PA
                                  - PE
                                  - PF
                                  - PG
                                  - PH
                                  - PK
                                  - PL
                                  - PM
                                  - PN
                                  - PR
                                  - PS
                                  - PT
                                  - PW
                                  - PY
                                  - QA
                                  - RE
                                  - RO
                                  - RS
                                  - RU
                                  - RW
                                  - SA
                                  - SB
                                  - SC
                                  - SD
                                  - SE
                                  - SG
                                  - SH
                                  - SI
                                  - SJ
                                  - SK
                                  - SL
                                  - SM
                                  - SN
                                  - SO
                                  - SR
                                  - SS
                                  - ST
                                  - SV
                                  - SX
                                  - SY
                                  - SZ
                                  - TC
                                  - TD
                                  - TF
                                  - TG
                                  - TH
                                  - TJ
                                  - TK
                                  - TL
                                  - TM
                                  - TN
                                  - TO
                                  - TR
                                  - TT
                                  - TV
                                  - TW
                                  - TZ
                                  - UA
                                  - UG
                                  - UM
                                  - US
                                  - UY
                                  - UZ
                                  - VA
                                  - VC
                                  - VE
                                  - VG
                                  - VI
                                  - VN
                                  - VU
                                  - WF
                                  - WS
                                  - XK
                                  - YE
                                  - YT
                                  - ZA
                                  - ZM
                                  - ZW
                              state:
                                description: >-
                                  State, province, county. [ISO 3166 alpha-2
                                  Codes](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2).
                                type: string
                                maxLength: 50
                              city:
                                title: City name
                                type: string
                                minLength: 1
                                maxLength: 85
                            required:
                              - address_line1
                              - postcode
                              - country
                              - city
                          - type: 'null'
                      status:
                        type: string
                        description: |-
                          Status of the user.
                          * ACTIVE - 
                          * INACTIVE - 
                          * OFFBOARDING - 
                          * OFFBOARDED - 
                        enum:
                          - ACTIVE
                          - INACTIVE
                          - OFFBOARDING
                          - OFFBOARDED
                      branch_id:
                        title: Branch unique identifier.
                        type: string
                        description: >-
                          Unique identifier of the market the user is onboarded
                          on. Only relevant if the client is operating in
                          different markets and the client is configured
                          accordingly
                        format: uuid
                    required:
                      - id
                      - created_at
                      - updated_at
                      - first_name
                      - last_name
                      - birth_date
                      - nationalities
                      - address
                      - status
                    additionalProperties: false
                  - title: User (TOL)
                    type: object
                    properties:
                      id:
                        title: User unique identifier.
                        type: string
                        description: User unique identifier.
                        format: uuid
                      created_at:
                        type: string
                        format: date-time
                        description: >-
                          Date and time when the resource was created. [RFC
                          3339-5](https://datatracker.ietf.org/doc/html/rfc3339#section-5.6),
                          [ISO8601
                          UTC](https://www.iso.org/iso-8601-date-and-time-format.html)
                      updated_at:
                        type: string
                        format: date-time
                        description: >-
                          Date and time when the resource was last updated. [RFC
                          3339-5](https://datatracker.ietf.org/doc/html/rfc3339#section-5.6),
                          [ISO8601
                          UTC](https://www.iso.org/iso-8601-date-and-time-format.html)
                      first_name:
                        type: string
                        maxLength: 100
                        minLength: 2
                        description: >-
                          First name(s) of the user. Please include all first
                          and middle names of the user.
                      last_name:
                        type: string
                        maxLength: 100
                        minLength: 1
                        description: Last name of the user.
                      salutation:
                        type: string
                        description: |-
                          Salutation of the user used in reports and statements.
                          * (empty string) - 
                          * SALUTATION_MALE - 
                          * SALUTATION_FEMALE - 
                          * SALUTATION_FEMALE_MARRIED - 
                          * SALUTATION_DIVERSE - 
                        enum:
                          - ''
                          - SALUTATION_MALE
                          - SALUTATION_FEMALE
                          - SALUTATION_FEMALE_MARRIED
                          - SALUTATION_DIVERSE
                        default: ''
                      title:
                        type: string
                        description: |-
                          Title of the user used in reports and statements.
                          * (empty string) - 
                          * DR - Doctor
                          * PROF - Professor
                          * PROF_DR - 
                          * DIPL_ING - Graduate engineer (Diplom-Ingenieur)
                          * MAGISTER - 
                        enum:
                          - ''
                          - DR
                          - PROF
                          - PROF_DR
                          - DIPL_ING
                          - MAGISTER
                        default: ''
                      birth_date:
                        type: string
                        format: date
                        description: >-
                          Birth date of the user in YYYY-MM-DD format. [RFC
                          3339, section
                          5.6](https://json-schema.org/draft/2020-12/json-schema-validation.html#RFC3339)
                      birth_city:
                        title: City name
                        type: string
                        minLength: 1
                        maxLength: 85
                      birth_country:
                        description: >-
                          Accepted country code. [ISO 3166-1 alpha-2
                          codes](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2).
                        type: string
                        enum:
                          - AD
                          - AE
                          - AF
                          - AG
                          - AI
                          - AL
                          - AM
                          - AO
                          - AQ
                          - AR
                          - AS
                          - AT
                          - AU
                          - AW
                          - AX
                          - AZ
                          - BA
                          - BB
                          - BD
                          - BE
                          - BF
                          - BG
                          - BH
                          - BI
                          - BJ
                          - BL
                          - BM
                          - BN
                          - BO
                          - BQ
                          - BR
                          - BS
                          - BT
                          - BV
                          - BW
                          - BY
                          - BZ
                          - CA
                          - CC
                          - CD
                          - CF
                          - CG
                          - CH
                          - CI
                          - CK
                          - CL
                          - CM
                          - CN
                          - CO
                          - CR
                          - CU
                          - CV
                          - CW
                          - CX
                          - CY
                          - CZ
                          - DE
                          - DJ
                          - DK
                          - DM
                          - DO
                          - DZ
                          - EC
                          - EE
                          - EG
                          - EH
                          - ER
                          - ES
                          - ET
                          - FI
                          - FJ
                          - FK
                          - FM
                          - FO
                          - FR
                          - GA
                          - GB
                          - GD
                          - GE
                          - GF
                          - GG
                          - GH
                          - GI
                          - GL
                          - GM
                          - GN
                          - GP
                          - GQ
                          - GR
                          - GS
                          - GT
                          - GU
                          - GW
                          - GY
                          - HK
                          - HM
                          - HN
                          - HR
                          - HT
                          - HU
                          - ID
                          - IE
                          - IL
                          - IM
                          - IN
                          - IO
                          - IQ
                          - IR
                          - IS
                          - IT
                          - JE
                          - JM
                          - JO
                          - JP
                          - KE
                          - KG
                          - KH
                          - KI
                          - KM
                          - KN
                          - KP
                          - KR
                          - KW
                          - KY
                          - KZ
                          - LA
                          - LB
                          - LC
                          - LI
                          - LK
                          - LR
                          - LS
                          - LT
                          - LU
                          - LV
                          - LY
                          - MA
                          - MC
                          - MD
                          - ME
                          - MF
                          - MG
                          - MH
                          - MK
                          - ML
                          - MM
                          - MN
                          - MO
                          - MP
                          - MQ
                          - MR
                          - MS
                          - MT
                          - MU
                          - MV
                          - MW
                          - MX
                          - MY
                          - MZ
                          - NA
                          - NC
                          - NE
                          - NF
                          - NG
                          - NI
                          - NL
                          - 'NO'
                          - NP
                          - NR
                          - NU
                          - NZ
                          - OM
                          - PA
                          - PE
                          - PF
                          - PG
                          - PH
                          - PK
                          - PL
                          - PM
                          - PN
                          - PR
                          - PS
                          - PT
                          - PW
                          - PY
                          - QA
                          - RE
                          - RO
                          - RS
                          - RU
                          - RW
                          - SA
                          - SB
                          - SC
                          - SD
                          - SE
                          - SG
                          - SH
                          - SI
                          - SJ
                          - SK
                          - SL
                          - SM
                          - SN
                          - SO
                          - SR
                          - SS
                          - ST
                          - SV
                          - SX
                          - SY
                          - SZ
                          - TC
                          - TD
                          - TF
                          - TG
                          - TH
                          - TJ
                          - TK
                          - TL
                          - TM
                          - TN
                          - TO
                          - TR
                          - TT
                          - TV
                          - TW
                          - TZ
                          - UA
                          - UG
                          - UM
                          - US
                          - UY
                          - UZ
                          - VA
                          - VC
                          - VE
                          - VG
                          - VI
                          - VN
                          - VU
                          - WF
                          - WS
                          - XK
                          - YE
                          - YT
                          - ZA
                          - ZM
                          - ZW
                      birth_name:
                        type: string
                        maxLength: 100
                        description: If applicable, birth name of the user.
                      nationalities:
                        type: array
                        items:
                          description: >-
                            Accepted country code. [ISO 3166-1 alpha-2
                            codes](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2).
                          type: string
                          enum:
                            - AD
                            - AE
                            - AF
                            - AG
                            - AI
                            - AL
                            - AM
                            - AO
                            - AQ
                            - AR
                            - AS
                            - AT
                            - AU
                            - AW
                            - AX
                            - AZ
                            - BA
                            - BB
                            - BD
                            - BE
                            - BF
                            - BG
                            - BH
                            - BI
                            - BJ
                            - BL
                            - BM
                            - BN
                            - BO
                            - BQ
                            - BR
                            - BS
                            - BT
                            - BV
                            - BW
                            - BY
                            - BZ
                            - CA
                            - CC
                            - CD
                            - CF
                            - CG
                            - CH
                            - CI
                            - CK
                            - CL
                            - CM
                            - CN
                            - CO
                            - CR
                            - CU
                            - CV
                            - CW
                            - CX
                            - CY
                            - CZ
                            - DE
                            - DJ
                            - DK
                            - DM
                            - DO
                            - DZ
                            - EC
                            - EE
                            - EG
                            - EH
                            - ER
                            - ES
                            - ET
                            - FI
                            - FJ
                            - FK
                            - FM
                            - FO
                            - FR
                            - GA
                            - GB
                            - GD
                            - GE
                            - GF
                            - GG
                            - GH
                            - GI
                            - GL
                            - GM
                            - GN
                            - GP
                            - GQ
                            - GR
                            - GS
                            - GT
                            - GU
                            - GW
                            - GY
                            - HK
                            - HM
                            - HN
                            - HR
                            - HT
                            - HU
                            - ID
                            - IE
                            - IL
                            - IM
                            - IN
                            - IO
                            - IQ
                            - IR
                            - IS
                            - IT
                            - JE
                            - JM
                            - JO
                            - JP
                            - KE
                            - KG
                            - KH
                            - KI
                            - KM
                            - KN
                            - KP
                            - KR
                            - KW
                            - KY
                            - KZ
                            - LA
                            - LB
                            - LC
                            - LI
                            - LK
                            - LR
                            - LS
                            - LT
                            - LU
                            - LV
                            - LY
                            - MA
                            - MC
                            - MD
                            - ME
                            - MF
                            - MG
                            - MH
                            - MK
                            - ML
                            - MM
                            - MN
                            - MO
                            - MP
                            - MQ
                            - MR
                            - MS
                            - MT
                            - MU
                            - MV
                            - MW
                            - MX
                            - MY
                            - MZ
                            - NA
                            - NC
                            - NE
                            - NF
                            - NG
                            - NI
                            - NL
                            - 'NO'
                            - NP
                            - NR
                            - NU
                            - NZ
                            - OM
                            - PA
                            - PE
                            - PF
                            - PG
                            - PH
                            - PK
                            - PL
                            - PM
                            - PN
                            - PR
                            - PS
                            - PT
                            - PW
                            - PY
                            - QA
                            - RE
                            - RO
                            - RS
                            - RU
                            - RW
                            - SA
                            - SB
                            - SC
                            - SD
                            - SE
                            - SG
                            - SH
                            - SI
                            - SJ
                            - SK
                            - SL
                            - SM
                            - SN
                            - SO
                            - SR
                            - SS
                            - ST
                            - SV
                            - SX
                            - SY
                            - SZ
                            - TC
                            - TD
                            - TF
                            - TG
                            - TH
                            - TJ
                            - TK
                            - TL
                            - TM
                            - TN
                            - TO
                            - TR
                            - TT
                            - TV
                            - TW
                            - TZ
                            - UA
                            - UG
                            - UM
                            - US
                            - UY
                            - UZ
                            - VA
                            - VC
                            - VE
                            - VG
                            - VI
                            - VN
                            - VU
                            - WF
                            - WS
                            - XK
                            - YE
                            - YT
                            - ZA
                            - ZM
                            - ZW
                        minItems: 1
                        description: >-
                          Nationalities of the user. [ISO 3166 alpha-2
                          Codes](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2).
                      address:
                        title: Address
                        type: object
                        description: Address. Must not be a P.O. box or c/o address.
                        properties:
                          address_line1:
                            type: string
                            description: First address line of the address.
                            maxLength: 100
                          address_line2:
                            type: string
                            description: Second address line of the address.
                            maxLength: 100
                          postcode:
                            title: Postal code
                            type: string
                            description: Postal code (postcode, PIN or ZIP code)
                            pattern: ^[a-zA-Z0-9][a-zA-Z0-9\s\-]{0,8}[a-zA-Z0-9]?$
                          country:
                            description: >-
                              Accepted country code. [ISO 3166-1 alpha-2
                              codes](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2).
                            type: string
                            enum:
                              - AD
                              - AE
                              - AF
                              - AG
                              - AI
                              - AL
                              - AM
                              - AO
                              - AQ
                              - AR
                              - AS
                              - AT
                              - AU
                              - AW
                              - AX
                              - AZ
                              - BA
                              - BB
                              - BD
                              - BE
                              - BF
                              - BG
                              - BH
                              - BI
                              - BJ
                              - BL
                              - BM
                              - BN
                              - BO
                              - BQ
                              - BR
                              - BS
                              - BT
                              - BV
                              - BW
                              - BY
                              - BZ
                              - CA
                              - CC
                              - CD
                              - CF
                              - CG
                              - CH
                              - CI
                              - CK
                              - CL
                              - CM
                              - CN
                              - CO
                              - CR
                              - CU
                              - CV
                              - CW
                              - CX
                              - CY
                              - CZ
                              - DE
                              - DJ
                              - DK
                              - DM
                              - DO
                              - DZ
                              - EC
                              - EE
                              - EG
                              - EH
                              - ER
                              - ES
                              - ET
                              - FI
                              - FJ
                              - FK
                              - FM
                              - FO
                              - FR
                              - GA
                              - GB
                              - GD
                              - GE
                              - GF
                              - GG
                              - GH
                              - GI
                              - GL
                              - GM
                              - GN
                              - GP
                              - GQ
                              - GR
                              - GS
                              - GT
                              - GU
                              - GW
                              - GY
                              - HK
                              - HM
                              - HN
                              - HR
                              - HT
                              - HU
                              - ID
                              - IE
                              - IL
                              - IM
                              - IN
                              - IO
                              - IQ
                              - IR
                              - IS
                              - IT
                              - JE
                              - JM
                              - JO
                              - JP
                              - KE
                              - KG
                              - KH
                              - KI
                              - KM
                              - KN
                              - KP
                              - KR
                              - KW
                              - KY
                              - KZ
                              - LA
                              - LB
                              - LC
                              - LI
                              - LK
                              - LR
                              - LS
                              - LT
                              - LU
                              - LV
                              - LY
                              - MA
                              - MC
                              - MD
                              - ME
                              - MF
                              - MG
                              - MH
                              - MK
                              - ML
                              - MM
                              - MN
                              - MO
                              - MP
                              - MQ
                              - MR
                              - MS
                              - MT
                              - MU
                              - MV
                              - MW
                              - MX
                              - MY
                              - MZ
                              - NA
                              - NC
                              - NE
                              - NF
                              - NG
                              - NI
                              - NL
                              - 'NO'
                              - NP
                              - NR
                              - NU
                              - NZ
                              - OM
                              - PA
                              - PE
                              - PF
                              - PG
                              - PH
                              - PK
                              - PL
                              - PM
                              - PN
                              - PR
                              - PS
                              - PT
                              - PW
                              - PY
                              - QA
                              - RE
                              - RO
                              - RS
                              - RU
                              - RW
                              - SA
                              - SB
                              - SC
                              - SD
                              - SE
                              - SG
                              - SH
                              - SI
                              - SJ
                              - SK
                              - SL
                              - SM
                              - SN
                              - SO
                              - SR
                              - SS
                              - ST
                              - SV
                              - SX
                              - SY
                              - SZ
                              - TC
                              - TD
                              - TF
                              - TG
                              - TH
                              - TJ
                              - TK
                              - TL
                              - TM
                              - TN
                              - TO
                              - TR
                              - TT
                              - TV
                              - TW
                              - TZ
                              - UA
                              - UG
                              - UM
                              - US
                              - UY
                              - UZ
                              - VA
                              - VC
                              - VE
                              - VG
                              - VI
                              - VN
                              - VU
                              - WF
                              - WS
                              - XK
                              - YE
                              - YT
                              - ZA
                              - ZM
                              - ZW
                          state:
                            description: >-
                              State, province, county. [ISO 3166 alpha-2
                              Codes](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2).
                            type: string
                            maxLength: 50
                          city:
                            title: City name
                            type: string
                            minLength: 1
                            maxLength: 85
                        required:
                          - address_line1
                          - postcode
                          - country
                          - city
                      postal_address:
                        description: >-
                          User postal address. Needs to be specified if
                          different to the residential address, otherwise it is
                          automatically populated.
                        oneOf:
                          - title: Address
                            type: object
                            description: Address. Must not be a P.O. box or c/o address.
                            properties:
                              address_line1:
                                type: string
                                description: First address line of the address.
                                maxLength: 100
                              address_line2:
                                type: string
                                description: Second address line of the address.
                                maxLength: 100
                              postcode:
                                title: Postal code
                                type: string
                                description: Postal code (postcode, PIN or ZIP code)
                                pattern: ^[a-zA-Z0-9][a-zA-Z0-9\s\-]{0,8}[a-zA-Z0-9]?$
                              country:
                                description: >-
                                  Accepted country code. [ISO 3166-1 alpha-2
                                  codes](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2).
                                type: string
                                enum:
                                  - AD
                                  - AE
                                  - AF
                                  - AG
                                  - AI
                                  - AL
                                  - AM
                                  - AO
                                  - AQ
                                  - AR
                                  - AS
                                  - AT
                                  - AU
                                  - AW
                                  - AX
                                  - AZ
                                  - BA
                                  - BB
                                  - BD
                                  - BE
                                  - BF
                                  - BG
                                  - BH
                                  - BI
                                  - BJ
                                  - BL
                                  - BM
                                  - BN
                                  - BO
                                  - BQ
                                  - BR
                                  - BS
                                  - BT
                                  - BV
                                  - BW
                                  - BY
                                  - BZ
                                  - CA
                                  - CC
                                  - CD
                                  - CF
                                  - CG
                                  - CH
                                  - CI
                                  - CK
                                  - CL
                                  - CM
                                  - CN
                                  - CO
                                  - CR
                                  - CU
                                  - CV
                                  - CW
                                  - CX
                                  - CY
                                  - CZ
                                  - DE
                                  - DJ
                                  - DK
                                  - DM
                                  - DO
                                  - DZ
                                  - EC
                                  - EE
                                  - EG
                                  - EH
                                  - ER
                                  - ES
                                  - ET
                                  - FI
                                  - FJ
                                  - FK
                                  - FM
                                  - FO
                                  - FR
                                  - GA
                                  - GB
                                  - GD
                                  - GE
                                  - GF
                                  - GG
                                  - GH
                                  - GI
                                  - GL
                                  - GM
                                  - GN
                                  - GP
                                  - GQ
                                  - GR
                                  - GS
                                  - GT
                                  - GU
                                  - GW
                                  - GY
                                  - HK
                                  - HM
                                  - HN
                                  - HR
                                  - HT
                                  - HU
                                  - ID
                                  - IE
                                  - IL
                                  - IM
                                  - IN
                                  - IO
                                  - IQ
                                  - IR
                                  - IS
                                  - IT
                                  - JE
                                  - JM
                                  - JO
                                  - JP
                                  - KE
                                  - KG
                                  - KH
                                  - KI
                                  - KM
                                  - KN
                                  - KP
                                  - KR
                                  - KW
                                  - KY
                                  - KZ
                                  - LA
                                  - LB
                                  - LC
                                  - LI
                                  - LK
                                  - LR
                                  - LS
                                  - LT
                                  - LU
                                  - LV
                                  - LY
                                  - MA
                                  - MC
                                  - MD
                                  - ME
                                  - MF
                                  - MG
                                  - MH
                                  - MK
                                  - ML
                                  - MM
                                  - MN
                                  - MO
                                  - MP
                                  - MQ
                                  - MR
                                  - MS
                                  - MT
                                  - MU
                                  - MV
                                  - MW
                                  - MX
                                  - MY
                                  - MZ
                                  - NA
                                  - NC
                                  - NE
                                  - NF
                                  - NG
                                  - NI
                                  - NL
                                  - 'NO'
                                  - NP
                                  - NR
                                  - NU
                                  - NZ
                                  - OM
                                  - PA
                                  - PE
                                  - PF
                                  - PG
                                  - PH
                                  - PK
                                  - PL
                                  - PM
                                  - PN
                                  - PR
                                  - PS
                                  - PT
                                  - PW
                                  - PY
                                  - QA
                                  - RE
                                  - RO
                                  - RS
                                  - RU
                                  - RW
                                  - SA
                                  - SB
                                  - SC
                                  - SD
                                  - SE
                                  - SG
                                  - SH
                                  - SI
                                  - SJ
                                  - SK
                                  - SL
                                  - SM
                                  - SN
                                  - SO
                                  - SR
                                  - SS
                                  - ST
                                  - SV
                                  - SX
                                  - SY
                                  - SZ
                                  - TC
                                  - TD
                                  - TF
                                  - TG
                                  - TH
                                  - TJ
                                  - TK
                                  - TL
                                  - TM
                                  - TN
                                  - TO
                                  - TR
                                  - TT
                                  - TV
                                  - TW
                                  - TZ
                                  - UA
                                  - UG
                                  - UM
                                  - US
                                  - UY
                                  - UZ
                                  - VA
                                  - VC
                                  - VE
                                  - VG
                                  - VI
                                  - VN
                                  - VU
                                  - WF
                                  - WS
                                  - XK
                                  - YE
                                  - YT
                                  - ZA
                                  - ZM
                                  - ZW
                              state:
                                description: >-
                                  State, province, county. [ISO 3166 alpha-2
                                  Codes](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2).
                                type: string
                                maxLength: 50
                              city:
                                title: City name
                                type: string
                                minLength: 1
                                maxLength: 85
                            required:
                              - address_line1
                              - postcode
                              - country
                              - city
                          - type: 'null'
                      status:
                        type: string
                        description: |-
                          Status of the user.
                          * ACTIVE - 
                          * INACTIVE - 
                          * OFFBOARDING - 
                          * OFFBOARDED - 
                        enum:
                          - ACTIVE
                          - INACTIVE
                          - OFFBOARDING
                          - OFFBOARDED
                      email:
                        type: string
                        format: email
                        maxLength: 100
                        description: Email of the user. Must be a valid email address.
                      phone_number:
                        type: string
                        pattern: ^([0-9]{8,15})?$
                        description: >-
                          Phone number of the user. [Phone number E.164
                          format](https://en.wikipedia.org/wiki/E.164).
                      fatca:
                        type: object
                        properties:
                          status:
                            type: boolean
                            description: >-
                              The user’s FATCA status is true if the user is
                              subject to paying taxes in the US, otherwise it
                              can be set to false.
                          confirmed_at:
                            type: string
                            format: date-time
                            description: >-
                              Timestamp at which the user confirmed their FATCA
                              status. [RFC
                              3339-5](https://datatracker.ietf.org/doc/html/rfc3339#section-5.6),
                              [ISO8601
                              UTC](https://www.iso.org/iso-8601-date-and-time-format.html)
                        required:
                          - status
                          - confirmed_at
                      terms_and_conditions:
                        type: object
                        properties:
                          consent_document_id:
                            title: Consent unique identifier.
                            type: string
                            description: Consent unique identifier.
                            format: uuid
                          confirmed_at:
                            type: string
                            format: date-time
                            description: >-
                              Timestamp at which the user consented to the terms
                              & conditions. [RFC
                              3339-5](https://datatracker.ietf.org/doc/html/rfc3339#section-5.6),
                              [ISO8601
                              UTC](https://www.iso.org/iso-8601-date-and-time-format.html)
                        required:
                          - consent_document_id
                          - confirmed_at
                      data_privacy_and_sharing_agreement:
                        type: object
                        properties:
                          consent_document_id:
                            title: Consent unique identifier.
                            type: string
                            description: Consent unique identifier.
                            format: uuid
                          confirmed_at:
                            type: string
                            format: date-time
                            description: >-
                              Timestamp at which the user consented to the data
                              sharing agreement. [RFC
                              3339-5](https://datatracker.ietf.org/doc/html/rfc3339#section-5.6),
                              [ISO8601
                              UTC](https://www.iso.org/iso-8601-date-and-time-format.html)
                        required:
                          - consent_document_id
                          - confirmed_at
                      branch_id:
                        title: Branch unique identifier.
                        type: string
                        description: >-
                          Unique identifier of the market the user is onboarded
                          on. Only relevant if the client is operating in
                          different markets and the client is configured
                          accordingly
                        format: uuid
                    required:
                      - id
                      - created_at
                      - updated_at
                      - first_name
                      - last_name
                      - birth_date
                      - nationalities
                      - address
                      - status
                    additionalProperties: false
              examples:
                BYOL:
                  summary: BYOL user
                  value:
                    id: 83d83ec2-d2ca-49ff-bbea-b92b5c3be202
                    created_at: '2021-07-21T14:10:00.00Z'
                    updated_at: '2021-07-21T14:10:00.00Z'
                    first_name: Karl
                    last_name: Schmidt
                    salutation: SALUTATION_MALE
                    title: DR
                    birth_date: '1972-09-30'
                    birth_city: Berlin
                    birth_country: DE
                    birth_name: Schmidt
                    nationalities:
                      - DE
                      - AU
                    postal_address:
                      address_line1: Rosenweg 221
                      address_line2: apt. 33
                      postcode: '45678'
                      city: Berlin
                      state: BE
                      country: DE
                    address:
                      address_line1: Rosenweg 221
                      address_line2: apt. 33
                      postcode: '45678'
                      city: Berlin
                      state: BE
                      country: DE
                    status: ACTIVE
                BYOL User with Branch ID:
                  summary: BYOL User with Branch ID
                  value:
                    id: 83d83ec2-d2ca-49ff-bbea-b92b5c3be202
                    created_at: '2021-07-21T14:10:00.00Z'
                    updated_at: '2021-07-21T14:10:00.00Z'
                    first_name: Karl
                    last_name: Schmidt
                    salutation: SALUTATION_MALE
                    title: DR
                    birth_date: '1972-09-30'
                    birth_city: Berlin
                    birth_country: DE
                    birth_name: Schmidt
                    nationalities:
                      - DE
                      - AU
                    postal_address:
                      address_line1: Rosenweg 221
                      address_line2: apt. 33
                      postcode: '45678'
                      city: Berlin
                      state: BE
                      country: DE
                    address:
                      address_line1: Rosenweg 221
                      address_line2: apt. 33
                      postcode: '45678'
                      city: Berlin
                      state: BE
                      country: DE
                    status: ACTIVE
                    branch_id: e6373bfa-ff12-4004-8de9-747ac96764da
                TOL:
                  summary: TOL user
                  value:
                    id: 83d83ec2-d2ca-49ff-bbea-b92b5c3be202
                    created_at: '2021-07-21T14:10:00.00Z'
                    updated_at: '2021-07-21T14:10:00.00Z'
                    first_name: Karl
                    last_name: Schmidt
                    email: karl.schmidt@example.com
                    salutation: SALUTATION_MALE
                    title: DR
                    birth_date: '1972-09-30'
                    birth_city: Berlin
                    birth_country: DE
                    birth_name: Schmidt
                    nationalities:
                      - DE
                      - AU
                    phone_number: '4930901820'
                    postal_address:
                      address_line1: Rosenweg 221
                      address_line2: apt. 33
                      postcode: '45678'
                      city: Berlin
                      state: BE
                      country: DE
                    address:
                      address_line1: Rosenweg 221
                      address_line2: apt. 33
                      postcode: '45678'
                      city: Berlin
                      state: BE
                      country: DE
                    fatca:
                      status: false
                      confirmed_at: '2020-08-24T14:15:22Z'
                    terms_and_conditions:
                      consent_document_id: d0b83880-3809-4eee-b0df-ca50db84c15a
                      confirmed_at: '2020-08-24T14:14:22Z'
                    data_privacy_and_sharing_agreement:
                      consent_document_id: 7ab0fc5c-8157-4acd-b02d-6ccda0e81dec
                      confirmed_at: '2020-08-24T14:16:22Z'
                    status: ACTIVE
                TOL User with Branch ID:
                  summary: TOL User with Branch ID
                  value:
                    id: 83d83ec2-d2ca-49ff-bbea-b92b5c3be202
                    created_at: '2021-07-21T14:10:00.00Z'
                    updated_at: '2021-07-21T14:10:00.00Z'
                    first_name: Karl
                    last_name: Schmidt
                    email: karl.schmidt@example.com
                    salutation: SALUTATION_MALE
                    title: DR
                    birth_date: '1972-09-30'
                    birth_city: Berlin
                    birth_country: DE
                    birth_name: Schmidt
                    nationalities:
                      - DE
                      - AU
                    phone_number: '4930901820'
                    postal_address:
                      address_line1: Rosenweg 221
                      address_line2: apt. 33
                      postcode: '45678'
                      city: Berlin
                      state: BE
                      country: DE
                    address:
                      address_line1: Rosenweg 221
                      address_line2: apt. 33
                      postcode: '45678'
                      city: Berlin
                      state: BE
                      country: DE
                    fatca:
                      status: false
                      confirmed_at: '2020-08-24T14:15:22Z'
                    terms_and_conditions:
                      consent_document_id: d0b83880-3809-4eee-b0df-ca50db84c15a
                      confirmed_at: '2020-08-24T14:14:22Z'
                    data_privacy_and_sharing_agreement:
                      consent_document_id: 7ab0fc5c-8157-4acd-b02d-6ccda0e81dec
                      confirmed_at: '2020-08-24T14:16:22Z'
                    status: ACTIVE
                    branch_id: e6373bfa-ff12-4004-8de9-747ac96764da
        '401':
          description: Unauthorized. The caller has not been authenticated.
          headers:
            upvest-request-id:
              required: true
              schema:
                type: string
                format: uuid
                example: 169ae4c7-ebd7-4041-94da-25369653eba7
          content:
            application/problem+json:
              schema:
                title: Error
                type: object
                description: ''
                properties:
                  type:
                    type: string
                    description: URL to a document describing the error condition.
                  status:
                    type: integer
                    description: >-
                      Transmission of the HTTP status code so that all
                      information can be found in one place, but also to correct
                      changes in the status code due to the use of proxy
                      servers.
                  title:
                    type: string
                    description: >-
                      A short, human-readable title for the general error type;
                      the title should not change for given types.
                  detail:
                    type: string
                    description: A human-readable description of the specific error.
                  instance:
                    type: string
                    description: >-
                      This optional key may be present, with a unique URI for
                      the specific error; this will often point to an error log
                      for that specific response.
                  request_id:
                    type: string
                    description: Correlation ID for the original request.
                required:
                  - type
                  - status
                additionalProperties: false
              example:
                status: 401
                type: unauthorized
        '403':
          description: >-
            Forbidden. The caller has been authenticated but is not allowed to
            take the requested action.
          headers:
            upvest-request-id:
              required: true
              schema:
                type: string
                format: uuid
                example: 169ae4c7-ebd7-4041-94da-25369653eba7
          content:
            application/problem+json:
              schema:
                title: Error
                type: object
                description: ''
                properties:
                  type:
                    type: string
                    description: URL to a document describing the error condition.
                  status:
                    type: integer
                    description: >-
                      Transmission of the HTTP status code so that all
                      information can be found in one place, but also to correct
                      changes in the status code due to the use of proxy
                      servers.
                  title:
                    type: string
                    description: >-
                      A short, human-readable title for the general error type;
                      the title should not change for given types.
                  detail:
                    type: string
                    description: A human-readable description of the specific error.
                  instance:
                    type: string
                    description: >-
                      This optional key may be present, with a unique URI for
                      the specific error; this will often point to an error log
                      for that specific response.
                  request_id:
                    type: string
                    description: Correlation ID for the original request.
                required:
                  - type
                  - status
                additionalProperties: false
              example:
                status: 403
                type: forbidden
        '404':
          description: Not Found. The requested resource could not be found.
          headers:
            upvest-request-id:
              required: true
              schema:
                type: string
                format: uuid
                example: 169ae4c7-ebd7-4041-94da-25369653eba7
          content:
            application/problem+json:
              schema:
                title: Error
                type: object
                description: ''
                properties:
                  type:
                    type: string
                    description: URL to a document describing the error condition.
                  status:
                    type: integer
                    description: >-
                      Transmission of the HTTP status code so that all
                      information can be found in one place, but also to correct
                      changes in the status code due to the use of proxy
                      servers.
                  title:
                    type: string
                    description: >-
                      A short, human-readable title for the general error type;
                      the title should not change for given types.
                  detail:
                    type: string
                    description: A human-readable description of the specific error.
                  instance:
                    type: string
                    description: >-
                      This optional key may be present, with a unique URI for
                      the specific error; this will often point to an error log
                      for that specific response.
                  request_id:
                    type: string
                    description: Correlation ID for the original request.
                required:
                  - type
                  - status
                additionalProperties: false
              example:
                status: 404
                type: not_found
        '406':
          description: >-
            Not Acceptable. The resource does not have a current representation
            that would be acceptable to the user agent. "Accept" header defined
            unsupported value.
          headers:
            upvest-request-id:
              required: true
              schema:
                type: string
                format: uuid
                example: 169ae4c7-ebd7-4041-94da-25369653eba7
          content:
            application/problem+json:
              schema:
                title: Error
                type: object
                description: ''
                properties:
                  type:
                    type: string
                    description: URL to a document describing the error condition.
                  status:
                    type: integer
                    description: >-
                      Transmission of the HTTP status code so that all
                      information can be found in one place, but also to correct
                      changes in the status code due to the use of proxy
                      servers.
                  title:
                    type: string
                    description: >-
                      A short, human-readable title for the general error type;
                      the title should not change for given types.
                  detail:
                    type: string
                    description: A human-readable description of the specific error.
                  instance:
                    type: string
                    description: >-
                      This optional key may be present, with a unique URI for
                      the specific error; this will often point to an error log
                      for that specific response.
                  request_id:
                    type: string
                    description: Correlation ID for the original request.
                required:
                  - type
                  - status
                additionalProperties: false
              example:
                status: 406
                type: not_acceptable
        '429':
          description: >-
            Too Many Requests. The caller has exceeded their quota for the time
            period and has been throttled.
          headers:
            upvest-request-id:
              required: true
              schema:
                type: string
                format: uuid
                example: 169ae4c7-ebd7-4041-94da-25369653eba7
          content:
            application/problem+json:
              schema:
                title: Error
                type: object
                description: ''
                properties:
                  type:
                    type: string
                    description: URL to a document describing the error condition.
                  status:
                    type: integer
                    description: >-
                      Transmission of the HTTP status code so that all
                      information can be found in one place, but also to correct
                      changes in the status code due to the use of proxy
                      servers.
                  title:
                    type: string
                    description: >-
                      A short, human-readable title for the general error type;
                      the title should not change for given types.
                  detail:
                    type: string
                    description: A human-readable description of the specific error.
                  instance:
                    type: string
                    description: >-
                      This optional key may be present, with a unique URI for
                      the specific error; this will often point to an error log
                      for that specific response.
                  request_id:
                    type: string
                    description: Correlation ID for the original request.
                required:
                  - type
                  - status
                additionalProperties: false
              example:
                status: 429
                type: too_many_requests
        '500':
          description: Internal Server Error. The service encountered an unexpected error.
          headers:
            upvest-request-id:
              required: true
              schema:
                type: string
                format: uuid
                example: 169ae4c7-ebd7-4041-94da-25369653eba7
          content:
            application/problem+json:
              schema:
                title: Error
                type: object
                description: ''
                properties:
                  type:
                    type: string
                    description: URL to a document describing the error condition.
                  status:
                    type: integer
                    description: >-
                      Transmission of the HTTP status code so that all
                      information can be found in one place, but also to correct
                      changes in the status code due to the use of proxy
                      servers.
                  title:
                    type: string
                    description: >-
                      A short, human-readable title for the general error type;
                      the title should not change for given types.
                  detail:
                    type: string
                    description: A human-readable description of the specific error.
                  instance:
                    type: string
                    description: >-
                      This optional key may be present, with a unique URI for
                      the specific error; this will often point to an error log
                      for that specific response.
                  request_id:
                    type: string
                    description: Correlation ID for the original request.
                required:
                  - type
                  - status
                additionalProperties: false
              example:
                status: 500
                type: internal_server_error
        '503':
          description: >-
            Service Unavailable. The service handling for this request cannot be
            reached at this time.
          headers:
            upvest-request-id:
              required: true
              schema:
                type: string
                format: uuid
                example: 169ae4c7-ebd7-4041-94da-25369653eba7
          content:
            application/problem+json:
              schema:
                title: Error
                type: object
                description: ''
                properties:
                  type:
                    type: string
                    description: URL to a document describing the error condition.
                  status:
                    type: integer
                    description: >-
                      Transmission of the HTTP status code so that all
                      information can be found in one place, but also to correct
                      changes in the status code due to the use of proxy
                      servers.
                  title:
                    type: string
                    description: >-
                      A short, human-readable title for the general error type;
                      the title should not change for given types.
                  detail:
                    type: string
                    description: A human-readable description of the specific error.
                  instance:
                    type: string
                    description: >-
                      This optional key may be present, with a unique URI for
                      the specific error; this will often point to an error log
                      for that specific response.
                  request_id:
                    type: string
                    description: Correlation ID for the original request.
                required:
                  - type
                  - status
                additionalProperties: false
              example:
                status: 503
                type: method_not_allowed
        '504':
          description: >-
            Gateway Timeout. The service gateway has reached its internal
            timeout.
          headers:
            upvest-request-id:
              required: true
              schema:
                type: string
                format: uuid
                example: 169ae4c7-ebd7-4041-94da-25369653eba7
          content:
            application/problem+json:
              schema:
                title: Error
                type: object
                description: ''
                properties:
                  type:
                    type: string
                    description: URL to a document describing the error condition.
                  status:
                    type: integer
                    description: >-
                      Transmission of the HTTP status code so that all
                      information can be found in one place, but also to correct
                      changes in the status code due to the use of proxy
                      servers.
                  title:
                    type: string
                    description: >-
                      A short, human-readable title for the general error type;
                      the title should not change for given types.
                  detail:
                    type: string
                    description: A human-readable description of the specific error.
                  instance:
                    type: string
                    description: >-
                      This optional key may be present, with a unique URI for
                      the specific error; this will often point to an error log
                      for that specific response.
                  request_id:
                    type: string
                    description: Correlation ID for the original request.
                required:
                  - type
                  - status
                additionalProperties: false
              example:
                status: 504
                type: gateway_timeout
    delete:
      operationId: offboard_user
      summary: Offboard a user
      description: Starts the user offboarding process in the background.
      tags:
        - Users
      security:
        - oauth-client-credentials:
            - users:admin
      responses:
        '202':
          description: >-
            The request has been successfully accepted and will be processed
            asynchronously.
          headers:
            upvest-request-id:
              required: true
              schema:
                type: string
                format: uuid
                example: 169ae4c7-ebd7-4041-94da-25369653eba7
        '401':
          description: Unauthorized. The caller has not been authenticated.
          headers:
            upvest-request-id:
              required: true
              schema:
                type: string
                format: uuid
                example: 169ae4c7-ebd7-4041-94da-25369653eba7
          content:
            application/problem+json:
              schema:
                title: Error
                type: object
                description: ''
                properties:
                  type:
                    type: string
                    description: URL to a document describing the error condition.
                  status:
                    type: integer
                    description: >-
                      Transmission of the HTTP status code so that all
                      information can be found in one place, but also to correct
                      changes in the status code due to the use of proxy
                      servers.
                  title:
                    type: string
                    description: >-
                      A short, human-readable title for the general error type;
                      the title should not change for given types.
                  detail:
                    type: string
                    description: A human-readable description of the specific error.
                  instance:
                    type: string
                    description: >-
                      This optional key may be present, with a unique URI for
                      the specific error; this will often point to an error log
                      for that specific response.
                  request_id:
                    type: string
                    description: Correlation ID for the original request.
                required:
                  - type
                  - status
                additionalProperties: false
              example:
                status: 401
                type: unauthorized
        '403':
          description: >-
            Forbidden. The caller has been authenticated but is not allowed to
            take the requested action.
          headers:
            upvest-request-id:
              required: true
              schema:
                type: string
                format: uuid
                example: 169ae4c7-ebd7-4041-94da-25369653eba7
          content:
            application/problem+json:
              schema:
                title: Error
                type: object
                description: ''
                properties:
                  type:
                    type: string
                    description: URL to a document describing the error condition.
                  status:
                    type: integer
                    description: >-
                      Transmission of the HTTP status code so that all
                      information can be found in one place, but also to correct
                      changes in the status code due to the use of proxy
                      servers.
                  title:
                    type: string
                    description: >-
                      A short, human-readable title for the general error type;
                      the title should not change for given types.
                  detail:
                    type: string
                    description: A human-readable description of the specific error.
                  instance:
                    type: string
                    description: >-
                      This optional key may be present, with a unique URI for
                      the specific error; this will often point to an error log
                      for that specific response.
                  request_id:
                    type: string
                    description: Correlation ID for the original request.
                required:
                  - type
                  - status
                additionalProperties: false
              example:
                status: 403
                type: forbidden
        '404':
          description: Not Found. The requested resource could not be found.
          headers:
            upvest-request-id:
              required: true
              schema:
                type: string
                format: uuid
                example: 169ae4c7-ebd7-4041-94da-25369653eba7
          content:
            application/problem+json:
              schema:
                title: Error
                type: object
                description: ''
                properties:
                  type:
                    type: string
                    description: URL to a document describing the error condition.
                  status:
                    type: integer
                    description: >-
                      Transmission of the HTTP status code so that all
                      information can be found in one place, but also to correct
                      changes in the status code due to the use of proxy
                      servers.
                  title:
                    type: string
                    description: >-
                      A short, human-readable title for the general error type;
                      the title should not change for given types.
                  detail:
                    type: string
                    description: A human-readable description of the specific error.
                  instance:
                    type: string
                    description: >-
                      This optional key may be present, with a unique URI for
                      the specific error; this will often point to an error log
                      for that specific response.
                  request_id:
                    type: string
                    description: Correlation ID for the original request.
                required:
                  - type
                  - status
                additionalProperties: false
              example:
                status: 404
                type: not_found
        '406':
          description: >-
            Not Acceptable. The resource does not have a current representation
            that would be acceptable to the user agent. "Accept" header defined
            unsupported value.
          headers:
            upvest-request-id:
              required: true
              schema:
                type: string
                format: uuid
                example: 169ae4c7-ebd7-4041-94da-25369653eba7
          content:
            application/problem+json:
              schema:
                title: Error
                type: object
                description: ''
                properties:
                  type:
                    type: string
                    description: URL to a document describing the error condition.
                  status:
                    type: integer
                    description: >-
                      Transmission of the HTTP status code so that all
                      information can be found in one place, but also to correct
                      changes in the status code due to the use of proxy
                      servers.
                  title:
                    type: string
                    description: >-
                      A short, human-readable title for the general error type;
                      the title should not change for given types.
                  detail:
                    type: string
                    description: A human-readable description of the specific error.
                  instance:
                    type: string
                    description: >-
                      This optional key may be present, with a unique URI for
                      the specific error; this will often point to an error log
                      for that specific response.
                  request_id:
                    type: string
                    description: Correlation ID for the original request.
                required:
                  - type
                  - status
                additionalProperties: false
              example:
                status: 406
                type: not_acceptable
        '429':
          description: >-
            Too Many Requests. The caller has exceeded their quota for the time
            period and has been throttled.
          headers:
            upvest-request-id:
              required: true
              schema:
                type: string
                format: uuid
                example: 169ae4c7-ebd7-4041-94da-25369653eba7
          content:
            application/problem+json:
              schema:
                title: Error
                type: object
                description: ''
                properties:
                  type:
                    type: string
                    description: URL to a document describing the error condition.
                  status:
                    type: integer
                    description: >-
                      Transmission of the HTTP status code so that all
                      information can be found in one place, but also to correct
                      changes in the status code due to the use of proxy
                      servers.
                  title:
                    type: string
                    description: >-
                      A short, human-readable title for the general error type;
                      the title should not change for given types.
                  detail:
                    type: string
                    description: A human-readable description of the specific error.
                  instance:
                    type: string
                    description: >-
                      This optional key may be present, with a unique URI for
                      the specific error; this will often point to an error log
                      for that specific response.
                  request_id:
                    type: string
                    description: Correlation ID for the original request.
                required:
                  - type
                  - status
                additionalProperties: false
              example:
                status: 429
                type: too_many_requests
        '500':
          description: Internal Server Error. The service encountered an unexpected error.
          headers:
            upvest-request-id:
              required: true
              schema:
                type: string
                format: uuid
                example: 169ae4c7-ebd7-4041-94da-25369653eba7
          content:
            application/problem+json:
              schema:
                title: Error
                type: object
                description: ''
                properties:
                  type:
                    type: string
                    description: URL to a document describing the error condition.
                  status:
                    type: integer
                    description: >-
                      Transmission of the HTTP status code so that all
                      information can be found in one place, but also to correct
                      changes in the status code due to the use of proxy
                      servers.
                  title:
                    type: string
                    description: >-
                      A short, human-readable title for the general error type;
                      the title should not change for given types.
                  detail:
                    type: string
                    description: A human-readable description of the specific error.
                  instance:
                    type: string
                    description: >-
                      This optional key may be present, with a unique URI for
                      the specific error; this will often point to an error log
                      for that specific response.
                  request_id:
                    type: string
                    description: Correlation ID for the original request.
                required:
                  - type
                  - status
                additionalProperties: false
              example:
                status: 500
                type: internal_server_error
        '503':
          description: >-
            Service Unavailable. The service handling for this request cannot be
            reached at this time.
          headers:
            upvest-request-id:
              required: true
              schema:
                type: string
                format: uuid
                example: 169ae4c7-ebd7-4041-94da-25369653eba7
          content:
            application/problem+json:
              schema:
                title: Error
                type: object
                description: ''
                properties:
                  type:
                    type: string
                    description: URL to a document describing the error condition.
                  status:
                    type: integer
                    description: >-
                      Transmission of the HTTP status code so that all
                      information can be found in one place, but also to correct
                      changes in the status code due to the use of proxy
                      servers.
                  title:
                    type: string
                    description: >-
                      A short, human-readable title for the general error type;
                      the title should not change for given types.
                  detail:
                    type: string
                    description: A human-readable description of the specific error.
                  instance:
                    type: string
                    description: >-
                      This optional key may be present, with a unique URI for
                      the specific error; this will often point to an error log
                      for that specific response.
                  request_id:
                    type: string
                    description: Correlation ID for the original request.
                required:
                  - type
                  - status
                additionalProperties: false
              example:
                status: 503
                type: method_not_allowed
        '504':
          description: >-
            Gateway Timeout. The service gateway has reached its internal
            timeout.
          headers:
            upvest-request-id:
              required: true
              schema:
                type: string
                format: uuid
                example: 169ae4c7-ebd7-4041-94da-25369653eba7
          content:
            application/problem+json:
              schema:
                title: Error
                type: object
                description: ''
                properties:
                  type:
                    type: string
                    description: URL to a document describing the error condition.
                  status:
                    type: integer
                    description: >-
                      Transmission of the HTTP status code so that all
                      information can be found in one place, but also to correct
                      changes in the status code due to the use of proxy
                      servers.
                  title:
                    type: string
                    description: >-
                      A short, human-readable title for the general error type;
                      the title should not change for given types.
                  detail:
                    type: string
                    description: A human-readable description of the specific error.
                  instance:
                    type: string
                    description: >-
                      This optional key may be present, with a unique URI for
                      the specific error; this will often point to an error log
                      for that specific response.
                  request_id:
                    type: string
                    description: Correlation ID for the original request.
                required:
                  - type
                  - status
                additionalProperties: false
              example:
                status: 504
                type: gateway_timeout
  /users/{user_id}/data_change_requests:
    parameters:
      - name: user_id
        in: path
        required: true
        schema:
          title: User unique identifier.
          type: string
          description: User unique identifier.
          format: uuid
      - name: upvest-client-id
        in: header
        description: Tenant Client ID
        required: true
        schema:
          type: string
          format: uuid
          example: ebabcf4d-61c3-4942-875c-e265a7c2d062
      - name: authorization
        in: header
        description: |
          Bearer (access) token from the OAuth flow with correct scopes.
          https://datatracker.ietf.org/doc/html/rfc6750
        required: true
        schema:
          type: string
          pattern: ^Bearer [a-zA-Z0-9\-\._~+/]*=*
          example: Bearer c2VjcmV0Cg==
      - name: signature
        in: header
        required: true
        schema:
          type: string
        description: >-
          https://tools.ietf.org/id/draft-ietf-httpbis-message-signatures-01.html#name-the-signature-http-header
      - name: signature-input
        in: header
        required: true
        schema:
          type: string
        description: >-
          https://tools.ietf.org/id/draft-ietf-httpbis-message-signatures-01.html#name-the-signature-input-http-he
      - name: upvest-api-version
        in: header
        required: false
        schema:
          type: string
          enum:
            - '1'
          default: '1'
          example: '1'
        description: 'Upvest API version (Note: Do not include quotation marks)'
    post:
      operationId: user_data_change
      summary: Change user data
      description: Requests a data change for a user specified by ID.
      tags:
        - Users
      security:
        - oauth-client-credentials:
            - users:admin
      requestBody:
        content:
          application/json:
            schema:
              title: User - Data Change - Request
              anyOf:
                - title: User (BYOL) - Data Change Request
                  type: object
                  properties:
                    first_name:
                      type: string
                      maxLength: 100
                      minLength: 2
                      description: First name of the user.
                    last_name:
                      type: string
                      maxLength: 100
                      minLength: 2
                      description: Last name of the user.
                    salutation:
                      type: string
                      description: |-
                        Salutation of the user used in reports and statements.
                        * (empty string) - 
                        * SALUTATION_MALE - 
                        * SALUTATION_FEMALE - 
                        * SALUTATION_FEMALE_MARRIED - 
                        * SALUTATION_DIVERSE - 
                      enum:
                        - ''
                        - SALUTATION_MALE
                        - SALUTATION_FEMALE
                        - SALUTATION_FEMALE_MARRIED
                        - SALUTATION_DIVERSE
                      default: ''
                    title:
                      type: string
                      description: |-
                        Title of the user used in reports and statements.
                        * (empty string) - 
                        * DR - Doctor
                        * PROF - Professor
                        * PROF_DR - 
                        * DIPL_ING - Graduate engineer (Diplom-Ingenieur)
                        * MAGISTER - 
                      enum:
                        - ''
                        - DR
                        - PROF
                        - PROF_DR
                        - DIPL_ING
                        - MAGISTER
                      default: ''
                    birth_date:
                      type: string
                      format: date
                      description: >-
                        Birth date of the user in YYYY-MM-DD format. [RFC 3339,
                        section
                        5.6](https://json-schema.org/draft/2020-12/json-schema-validation.html#RFC3339)
                    birth_city:
                      title: City name
                      type: string
                      minLength: 1
                      maxLength: 85
                    birth_country:
                      description: >-
                        Accepted country code. [ISO 3166-1 alpha-2
                        codes](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2).
                      type: string
                      enum:
                        - AD
                        - AE
                        - AF
                        - AG
                        - AI
                        - AL
                        - AM
                        - AO
                        - AQ
                        - AR
                        - AS
                        - AT
                        - AU
                        - AW
                        - AX
                        - AZ
                        - BA
                        - BB
                        - BD
                        - BE
                        - BF
                        - BG
                        - BH
                        - BI
                        - BJ
                        - BL
                        - BM
                        - BN
                        - BO
                        - BQ
                        - BR
                        - BS
                        - BT
                        - BV
                        - BW
                        - BY
                        - BZ
                        - CA
                        - CC
                        - CD
                        - CF
                        - CG
                        - CH
                        - CI
                        - CK
                        - CL
                        - CM
                        - CN
                        - CO
                        - CR
                        - CU
                        - CV
                        - CW
                        - CX
                        - CY
                        - CZ
                        - DE
                        - DJ
                        - DK
                        - DM
                        - DO
                        - DZ
                        - EC
                        - EE
                        - EG
                        - EH
                        - ER
                        - ES
                        - ET
                        - FI
                        - FJ
                        - FK
                        - FM
                        - FO
                        - FR
                        - GA
                        - GB
                        - GD
                        - GE
                        - GF
                        - GG
                        - GH
                        - GI
                        - GL
                        - GM
                        - GN
                        - GP
                        - GQ
                        - GR
                        - GS
                        - GT
                        - GU
                        - GW
                        - GY
                        - HK
                        - HM
                        - HN
                        - HR
                        - HT
                        - HU
                        - ID
                        - IE
                        - IL
                        - IM
                        - IN
                        - IO
                        - IQ
                        - IR
                        - IS
                        - IT
                        - JE
                        - JM
                        - JO
                        - JP
                        - KE
                        - KG
                        - KH
                        - KI
                        - KM
                        - KN
                        - KP
                        - KR
                        - KW
                        - KY
                        - KZ
                        - LA
                        - LB
                        - LC
                        - LI
                        - LK
                        - LR
                        - LS
                        - LT
                        - LU
                        - LV
                        - LY
                        - MA
                        - MC
                        - MD
                        - ME
                        - MF
                        - MG
                        - MH
                        - MK
                        - ML
                        - MM
                        - MN
                        - MO
                        - MP
                        - MQ
                        - MR
                        - MS
                        - MT
                        - MU
                        - MV
                        - MW
                        - MX
                        - MY
                        - MZ
                        - NA
                        - NC
                        - NE
                        - NF
                        - NG
                        - NI
                        - NL
                        - 'NO'
                        - NP
                        - NR
                        - NU
                        - NZ
                        - OM
                        - PA
                        - PE
                        - PF
                        - PG
                        - PH
                        - PK
                        - PL
                        - PM
                        - PN
                        - PR
                        - PS
                        - PT
                        - PW
                        - PY
                        - QA
                        - RE
                        - RO
                        - RS
                        - RU
                        - RW
                        - SA
                        - SB
                        - SC
                        - SD
                        - SE
                        - SG
                        - SH
                        - SI
                        - SJ
                        - SK
                        - SL
                        - SM
                        - SN
                        - SO
                        - SR
                        - SS
                        - ST
                        - SV
                        - SX
                        - SY
                        - SZ
                        - TC
                        - TD
                        - TF
                        - TG
                        - TH
                        - TJ
                        - TK
                        - TL
                        - TM
                        - TN
                        - TO
                        - TR
                        - TT
                        - TV
                        - TW
                        - TZ
                        - UA
                        - UG
                        - UM
                        - US
                        - UY
                        - UZ
                        - VA
                        - VC
                        - VE
                        - VG
                        - VI
                        - VN
                        - VU
                        - WF
                        - WS
                        - XK
                        - YE
                        - YT
                        - ZA
                        - ZM
                        - ZW
                    birth_name:
                      type: string
                      maxLength: 100
                      description: If applicable, birth name of the user.
                    nationalities:
                      type: array
                      items:
                        description: >-
                          Accepted country code. [ISO 3166-1 alpha-2
                          codes](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2).
                        type: string
                        enum:
                          - AD
                          - AE
                          - AF
                          - AG
                          - AI
                          - AL
                          - AM
                          - AO
                          - AQ
                          - AR
                          - AS
                          - AT
                          - AU
                          - AW
                          - AX
                          - AZ
                          - BA
                          - BB
                          - BD
                          - BE
                          - BF
                          - BG
                          - BH
                          - BI
                          - BJ
                          - BL
                          - BM
                          - BN
                          - BO
                          - BQ
                          - BR
                          - BS
                          - BT
                          - BV
                          - BW
                          - BY
                          - BZ
                          - CA
                          - CC
                          - CD
                          - CF
                          - CG
                          - CH
                          - CI
                          - CK
                          - CL
                          - CM
                          - CN
                          - CO
                          - CR
                          - CU
                          - CV
                          - CW
                          - CX
                          - CY
                          - CZ
                          - DE
                          - DJ
                          - DK
                          - DM
                          - DO
                          - DZ
                          - EC
                          - EE
                          - EG
                          - EH
                          - ER
                          - ES
                          - ET
                          - FI
                          - FJ
                          - FK
                          - FM
                          - FO
                          - FR
                          - GA
                          - GB
                          - GD
                          - GE
                          - GF
                          - GG
                          - GH
                          - GI
                          - GL
                          - GM
                          - GN
                          - GP
                          - GQ
                          - GR
                          - GS
                          - GT
                          - GU
                          - GW
                          - GY
                          - HK
                          - HM
                          - HN
                          - HR
                          - HT
                          - HU
                          - ID
                          - IE
                          - IL
                          - IM
                          - IN
                          - IO
                          - IQ
                          - IR
                          - IS
                          - IT
                          - JE
                          - JM
                          - JO
                          - JP
                          - KE
                          - KG
                          - KH
                          - KI
                          - KM
                          - KN
                          - KP
                          - KR
                          - KW
                          - KY
                          - KZ
                          - LA
                          - LB
                          - LC
                          - LI
                          - LK
                          - LR
                          - LS
                          - LT
                          - LU
                          - LV
                          - LY
                          - MA
                          - MC
                          - MD
                          - ME
                          - MF
                          - MG
                          - MH
                          - MK
                          - ML
                          - MM
                          - MN
                          - MO
                          - MP
                          - MQ
                          - MR
                          - MS
                          - MT
                          - MU
                          - MV
                          - MW
                          - MX
                          - MY
                          - MZ
                          - NA
                          - NC
                          - NE
                          - NF
                          - NG
                          - NI
                          - NL
                          - 'NO'
                          - NP
                          - NR
                          - NU
                          - NZ
                          - OM
                          - PA
                          - PE
                          - PF
                          - PG
                          - PH
                          - PK
                          - PL
                          - PM
                          - PN
                          - PR
                          - PS
                          - PT
                          - PW
                          - PY
                          - QA
                          - RE
                          - RO
                          - RS
                          - RU
                          - RW
                          - SA
                          - SB
                          - SC
                          - SD
                          - SE
                          - SG
                          - SH
                          - SI
                          - SJ
                          - SK
                          - SL
                          - SM
                          - SN
                          - SO
                          - SR
                          - SS
                          - ST
                          - SV
                          - SX
                          - SY
                          - SZ
                          - TC
                          - TD
                          - TF
                          - TG
                          - TH
                          - TJ
                          - TK
                          - TL
                          - TM
                          - TN
                          - TO
                          - TR
                          - TT
                          - TV
                          - TW
                          - TZ
                          - UA
                          - UG
                          - UM
                          - US
                          - UY
                          - UZ
                          - VA
                          - VC
                          - VE
                          - VG
                          - VI
                          - VN
                          - VU
                          - WF
                          - WS
                          - XK
                          - YE
                          - YT
                          - ZA
                          - ZM
                          - ZW
                      minItems: 1
                      description: >-
                        Nationalities of the user. [ISO 3166 alpha-2
                        Codes](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2).
                    address:
                      title: Address
                      type: object
                      description: Address. Must not be a P.O. box or c/o address.
                      properties:
                        address_line1:
                          type: string
                          description: First address line of the address.
                          maxLength: 100
                        address_line2:
                          type: string
                          description: Second address line of the address.
                          maxLength: 100
                        postcode:
                          title: Postal code
                          type: string
                          description: Postal code (postcode, PIN or ZIP code)
                          pattern: ^[a-zA-Z0-9][a-zA-Z0-9\s\-]{0,8}[a-zA-Z0-9]?$
                        country:
                          description: >-
                            Accepted country code. [ISO 3166-1 alpha-2
                            codes](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2).
                          type: string
                          enum:
                            - AD
                            - AE
                            - AF
                            - AG
                            - AI
                            - AL
                            - AM
                            - AO
                            - AQ
                            - AR
                            - AS
                            - AT
                            - AU
                            - AW
                            - AX
                            - AZ
                            - BA
                            - BB
                            - BD
                            - BE
                            - BF
                            - BG
                            - BH
                            - BI
                            - BJ
                            - BL
                            - BM
                            - BN
                            - BO
                            - BQ
                            - BR
                            - BS
                            - BT
                            - BV
                            - BW
                            - BY
                            - BZ
                            - CA
                            - CC
                            - CD
                            - CF
                            - CG
                            - CH
                            - CI
                            - CK
                            - CL
                            - CM
                            - CN
                            - CO
                            - CR
                            - CU
                            - CV
                            - CW
                            - CX
                            - CY
                            - CZ
                            - DE
                            - DJ
                            - DK
                            - DM
                            - DO
                            - DZ
                            - EC
                            - EE
                            - EG
                            - EH
                            - ER
                            - ES
                            - ET
                            - FI
                            - FJ
                            - FK
                            - FM
                            - FO
                            - FR
                            - GA
                            - GB
                            - GD
                            - GE
                            - GF
                            - GG
                            - GH
                            - GI
                            - GL
                            - GM
                            - GN
                            - GP
                            - GQ
                            - GR
                            - GS
                            - GT
                            - GU
                            - GW
                            - GY
                            - HK
                            - HM
                            - HN
                            - HR
                            - HT
                            - HU
                            - ID
                            - IE
                            - IL
                            - IM
                            - IN
                            - IO
                            - IQ
                            - IR
                            - IS
                            - IT
                            - JE
                            - JM
                            - JO
                            - JP
                            - KE
                            - KG
                            - KH
                            - KI
                            - KM
                            - KN
                            - KP
                            - KR
                            - KW
                            - KY
                            - KZ
                            - LA
                            - LB
                            - LC
                            - LI
                            - LK
                            - LR
                            - LS
                            - LT
                            - LU
                            - LV
                            - LY
                            - MA
                            - MC
                            - MD
                            - ME
                            - MF
                            - MG
                            - MH
                            - MK
                            - ML
                            - MM
                            - MN
                            - MO
                            - MP
                            - MQ
                            - MR
                            - MS
                            - MT
                            - MU
                            - MV
                            - MW
                            - MX
                            - MY
                            - MZ
                            - NA
                            - NC
                            - NE
                            - NF
                            - NG
                            - NI
                            - NL
                            - 'NO'
                            - NP
                            - NR
                            - NU
                            - NZ
                            - OM
                            - PA
                            - PE
                            - PF
                            - PG
                            - PH
                            - PK
                            - PL
                            - PM
                            - PN
                            - PR
                            - PS
                            - PT
                            - PW
                            - PY
                            - QA
                            - RE
                            - RO
                            - RS
                            - RU
                            - RW
                            - SA
                            - SB
                            - SC
                            - SD
                            - SE
                            - SG
                            - SH
                            - SI
                            - SJ
                            - SK
                            - SL
                            - SM
                            - SN
                            - SO
                            - SR
                            - SS
                            - ST
                            - SV
                            - SX
                            - SY
                            - SZ
                            - TC
                            - TD
                            - TF
                            - TG
                            - TH
                            - TJ
                            - TK
                            - TL
                            - TM
                            - TN
                            - TO
                            - TR
                            - TT
                            - TV
                            - TW
                            - TZ
                            - UA
                            - UG
                            - UM
                            - US
                            - UY
                            - UZ
                            - VA
                            - VC
                            - VE
                            - VG
                            - VI
                            - VN
                            - VU
                            - WF
                            - WS
                            - XK
                            - YE
                            - YT
                            - ZA
                            - ZM
                            - ZW
                        state:
                          description: >-
                            State, province, county. [ISO 3166 alpha-2
                            Codes](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2).
                          type: string
                          maxLength: 50
                        city:
                          title: City name
                          type: string
                          minLength: 1
                          maxLength: 85
                      required:
                        - address_line1
                        - postcode
                        - country
                        - city
                    postal_address:
                      description: >-
                        User postal address. Needs to be specified if different
                        to the residential address, otherwise it is
                        automatically populated.
                      oneOf:
                        - title: Address
                          type: object
                          description: Address. Must not be a P.O. box or c/o address.
                          properties:
                            address_line1:
                              type: string
                              description: First address line of the address.
                              maxLength: 100
                            address_line2:
                              type: string
                              description: Second address line of the address.
                              maxLength: 100
                            postcode:
                              title: Postal code
                              type: string
                              description: Postal code (postcode, PIN or ZIP code)
                              pattern: ^[a-zA-Z0-9][a-zA-Z0-9\s\-]{0,8}[a-zA-Z0-9]?$
                            country:
                              description: >-
                                Accepted country code. [ISO 3166-1 alpha-2
                                codes](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2).
                              type: string
                              enum:
                                - AD
                                - AE
                                - AF
                                - AG
                                - AI
                                - AL
                                - AM
                                - AO
                                - AQ
                                - AR
                                - AS
                                - AT
                                - AU
                                - AW
                                - AX
                                - AZ
                                - BA
                                - BB
                                - BD
                                - BE
                                - BF
                                - BG
                                - BH
                                - BI
                                - BJ
                                - BL
                                - BM
                                - BN
                                - BO
                                - BQ
                                - BR
                                - BS
                                - BT
                                - BV
                                - BW
                                - BY
                                - BZ
                                - CA
                                - CC
                                - CD
                                - CF
                                - CG
                                - CH
                                - CI
                                - CK
                                - CL
                                - CM
                                - CN
                                - CO
                                - CR
                                - CU
                                - CV
                                - CW
                                - CX
                                - CY
                                - CZ
                                - DE
                                - DJ
                                - DK
                                - DM
                                - DO
                                - DZ
                                - EC
                                - EE
                                - EG
                                - EH
                                - ER
                                - ES
                                - ET
                                - FI
                                - FJ
                                - FK
                                - FM
                                - FO
                                - FR
                                - GA
                                - GB
                                - GD
                                - GE
                                - GF
                                - GG
                                - GH
                                - GI
                                - GL
                                - GM
                                - GN
                                - GP
                                - GQ
                                - GR
                                - GS
                                - GT
                                - GU
                                - GW
                                - GY
                                - HK
                                - HM
                                - HN
                                - HR
                                - HT
                                - HU
                                - ID
                                - IE
                                - IL
                                - IM
                                - IN
                                - IO
                                - IQ
                                - IR
                                - IS
                                - IT
                                - JE
                                - JM
                                - JO
                                - JP
                                - KE
                                - KG
                                - KH
                                - KI
                                - KM
                                - KN
                                - KP
                                - KR
                                - KW
                                - KY
                                - KZ
                                - LA
                                - LB
                                - LC
                                - LI
                                - LK
                                - LR
                                - LS
                                - LT
                                - LU
                                - LV
                                - LY
                                - MA
                                - MC
                                - MD
                                - ME
                                - MF
                                - MG
                                - MH
                                - MK
                                - ML
                                - MM
                                - MN
                                - MO
                                - MP
                                - MQ
                                - MR
                                - MS
                                - MT
                                - MU
                                - MV
                                - MW
                                - MX
                                - MY
                                - MZ
                                - NA
                                - NC
                                - NE
                                - NF
                                - NG
                                - NI
                                - NL
                                - 'NO'
                                - NP
                                - NR
                                - NU
                                - NZ
                                - OM
                                - PA
                                - PE
                                - PF
                                - PG
                                - PH
                                - PK
                                - PL
                                - PM
                                - PN
                                - PR
                                - PS
                                - PT
                                - PW
                                - PY
                                - QA
                                - RE
                                - RO
                                - RS
                                - RU
                                - RW
                                - SA
                                - SB
                                - SC
                                - SD
                                - SE
                                - SG
                                - SH
                                - SI
                                - SJ
                                - SK
                                - SL
                                - SM
                                - SN
                                - SO
                                - SR
                                - SS
                                - ST
                                - SV
                                - SX
                                - SY
                                - SZ
                                - TC
                                - TD
                                - TF
                                - TG
                                - TH
                                - TJ
                                - TK
                                - TL
                                - TM
                                - TN
                                - TO
                                - TR
                                - TT
                                - TV
                                - TW
                                - TZ
                                - UA
                                - UG
                                - UM
                                - US
                                - UY
                                - UZ
                                - VA
                                - VC
                                - VE
                                - VG
                                - VI
                                - VN
                                - VU
                                - WF
                                - WS
                                - XK
                                - YE
                                - YT
                                - ZA
                                - ZM
                                - ZW
                            state:
                              description: >-
                                State, province, county. [ISO 3166 alpha-2
                                Codes](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2).
                              type: string
                              maxLength: 50
                            city:
                              title: City name
                              type: string
                              minLength: 1
                              maxLength: 85
                          required:
                            - address_line1
                            - postcode
                            - country
                            - city
                        - type: 'null'
                    branch_id:
                      title: Branch unique identifier.
                      type: string
                      description: >-
                        Unique identifier of the market the user is onboarded
                        on. Only relevant if the client is operating in
                        different markets and the client is configured
                        accordingly
                      format: uuid
                  minProperties: 1
                  additionalProperties: false
                - title: User (TOL) - Data Change Request
                  oneOf:
                    - type: object
                      title: 'User (TOL) - Data Change Request: Name change'
                      properties:
                        first_name:
                          type: string
                          maxLength: 100
                          minLength: 2
                          description: >-
                            First name(s) of the user. Please include all first
                            and middle names of the user.
                        last_name:
                          type: string
                          maxLength: 100
                          minLength: 1
                          description: Last name of the user.
                        issuance_date:
                          type: string
                          format: date
                          description: >-
                            Issuance date in YYYY-MM-DD format. [RFC 3339,
                            section
                            5.6](https://json-schema.org/draft/2020-12/json-schema-validation.html#RFC3339)
                        data_download_link:
                          type: string
                          format: url
                          maxLength: 1000
                          description: >-
                            Download URL for the document proving the data
                            change. The file size must not exceed 250 MB.
                        document_type:
                          type: string
                          description: |-
                            The type of document used to prove the data change
                            * PASSPORT - Passport
                            * ID_CARD - National Identification document
                          enum:
                            - PASSPORT
                            - ID_CARD
                      required:
                        - first_name
                        - last_name
                        - issuance_date
                        - data_download_link
                        - document_type
                      additionalProperties: false
                    - type: object
                      title: 'User (TOL) - Data Change Request: Other'
                      properties:
                        email:
                          type: string
                          format: email
                          maxLength: 100
                          description: Email of the user. Must be a valid email address.
                        salutation:
                          type: string
                          description: >-
                            Salutation of the user used in reports and
                            statements.

                            * (empty string) - 

                            * SALUTATION_MALE - 

                            * SALUTATION_FEMALE - 

                            * SALUTATION_FEMALE_MARRIED - 

                            * SALUTATION_DIVERSE - 
                          enum:
                            - ''
                            - SALUTATION_MALE
                            - SALUTATION_FEMALE
                            - SALUTATION_FEMALE_MARRIED
                            - SALUTATION_DIVERSE
                          default: ''
                        title:
                          type: string
                          description: |-
                            Title of the user used in reports and statements.
                            * (empty string) - 
                            * DR - Doctor
                            * PROF - Professor
                            * PROF_DR - 
                            * DIPL_ING - Graduate engineer (Diplom-Ingenieur)
                            * MAGISTER - 
                          enum:
                            - ''
                            - DR
                            - PROF
                            - PROF_DR
                            - DIPL_ING
                            - MAGISTER
                          default: ''
                        phone_number:
                          type: string
                          pattern: ^([0-9]{8,15})?$
                          description: >-
                            Phone number of the user. [Phone number E.164
                            format](https://en.wikipedia.org/wiki/E.164).
                        birth_name:
                          type: string
                          maxLength: 100
                          description: If applicable, birth name of the user.
                        postal_address:
                          description: >-
                            User postal address. Needs to be specified if
                            different to the residential address, otherwise it
                            is automatically populated.
                          oneOf:
                            - title: Address
                              type: object
                              description: Address. Must not be a P.O. box or c/o address.
                              properties:
                                address_line1:
                                  type: string
                                  description: First address line of the address.
                                  maxLength: 100
                                address_line2:
                                  type: string
                                  description: Second address line of the address.
                                  maxLength: 100
                                postcode:
                                  title: Postal code
                                  type: string
                                  description: Postal code (postcode, PIN or ZIP code)
                                  pattern: >-
                                    ^[a-zA-Z0-9][a-zA-Z0-9\s\-]{0,8}[a-zA-Z0-9]?$
                                country:
                                  description: >-
                                    Accepted country code. [ISO 3166-1 alpha-2
                                    codes](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2).
                                  type: string
                                  enum:
                                    - AD
                                    - AE
                                    - AF
                                    - AG
                                    - AI
                                    - AL
                                    - AM
                                    - AO
                                    - AQ
                                    - AR
                                    - AS
                                    - AT
                                    - AU
                                    - AW
                                    - AX
                                    - AZ
                                    - BA
                                    - BB
                                    - BD
                                    - BE
                                    - BF
                                    - BG
                                    - BH
                                    - BI
                                    - BJ
                                    - BL
                                    - BM
                                    - BN
                                    - BO
                                    - BQ
                                    - BR
                                    - BS
                                    - BT
                                    - BV
                                    - BW
                                    - BY
                                    - BZ
                                    - CA
                                    - CC
                                    - CD
                                    - CF
                                    - CG
                                    - CH
                                    - CI
                                    - CK
                                    - CL
                                    - CM
                                    - CN
                                    - CO
                                    - CR
                                    - CU
                                    - CV
                                    - CW
                                    - CX
                                    - CY
                                    - CZ
                                    - DE
                                    - DJ
                                    - DK
                                    - DM
                                    - DO
                                    - DZ
                                    - EC
                                    - EE
                                    - EG
                                    - EH
                                    - ER
                                    - ES
                                    - ET
                                    - FI
                                    - FJ
                                    - FK
                                    - FM
                                    - FO
                                    - FR
                                    - GA
                                    - GB
                                    - GD
                                    - GE
                                    - GF
                                    - GG
                                    - GH
                                    - GI
                                    - GL
                                    - GM
                                    - GN
                                    - GP
                                    - GQ
                                    - GR
                                    - GS
                                    - GT
                                    - GU
                                    - GW
                                    - GY
                                    - HK
                                    - HM
                                    - HN
                                    - HR
                                    - HT
                                    - HU
                                    - ID
                                    - IE
                                    - IL
                                    - IM
                                    - IN
                                    - IO
                                    - IQ
                                    - IR
                                    - IS
                                    - IT
                                    - JE
                                    - JM
                                    - JO
                                    - JP
                                    - KE
                                    - KG
                                    - KH
                                    - KI
                                    - KM
                                    - KN
                                    - KP
                                    - KR
                                    - KW
                                    - KY
                                    - KZ
                                    - LA
                                    - LB
                                    - LC
                                    - LI
                                    - LK
                                    - LR
                                    - LS
                                    - LT
                                    - LU
                                    - LV
                                    - LY
                                    - MA
                                    - MC
                                    - MD
                                    - ME
                                    - MF
                                    - MG
                                    - MH
                                    - MK
                                    - ML
                                    - MM
                                    - MN
                                    - MO
                                    - MP
                                    - MQ
                                    - MR
                                    - MS
                                    - MT
                                    - MU
                                    - MV
                                    - MW
                                    - MX
                                    - MY
                                    - MZ
                                    - NA
                                    - NC
                                    - NE
                                    - NF
                                    - NG
                                    - NI
                                    - NL
                                    - 'NO'
                                    - NP
                                    - NR
                                    - NU
                                    - NZ
                                    - OM
                                    - PA
                                    - PE
                                    - PF
                                    - PG
                                    - PH
                                    - PK
                                    - PL
                                    - PM
                                    - PN
                                    - PR
                                    - PS
                                    - PT
                                    - PW
                                    - PY
                                    - QA
                                    - RE
                                    - RO
                                    - RS
                                    - RU
                                    - RW
                                    - SA
                                    - SB
                                    - SC
                                    - SD
                                    - SE
                                    - SG
                                    - SH
                                    - SI
                                    - SJ
                                    - SK
                                    - SL
                                    - SM
                                    - SN
                                    - SO
                                    - SR
                                    - SS
                                    - ST
                                    - SV
                                    - SX
                                    - SY
                                    - SZ
                                    - TC
                                    - TD
                                    - TF
                                    - TG
                                    - TH
                                    - TJ
                                    - TK
                                    - TL
                                    - TM
                                    - TN
                                    - TO
                                    - TR
                                    - TT
                                    - TV
                                    - TW
                                    - TZ
                                    - UA
                                    - UG
                                    - UM
                                    - US
                                    - UY
                                    - UZ
                                    - VA
                                    - VC
                                    - VE
                                    - VG
                                    - VI
                                    - VN
                                    - VU
                                    - WF
                                    - WS
                                    - XK
                                    - YE
                                    - YT
                                    - ZA
                                    - ZM
                                    - ZW
                                state:
                                  description: >-
                                    State, province, county. [ISO 3166 alpha-2
                                    Codes](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2).
                                  type: string
                                  maxLength: 50
                                city:
                                  title: City name
                                  type: string
                                  minLength: 1
                                  maxLength: 85
                              required:
                                - address_line1
                                - postcode
                                - country
                                - city
                            - type: 'null'
                        branch_id:
                          title: Branch unique identifier.
                          type: string
                          description: >-
                            Unique identifier of the market the user is
                            onboarded on. Only relevant if the client is
                            operating in different markets and the client is
                            configured accordingly
                          format: uuid
                      minProperties: 1
                      additionalProperties: false
                    - type: object
                      title: 'User (TOL) - Data Change Request: Nationality'
                      properties:
                        nationalities:
                          type: array
                          items:
                            description: >-
                              Accepted country code. [ISO 3166-1 alpha-2
                              codes](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2).
                            type: string
                            enum:
                              - AD
                              - AE
                              - AF
                              - AG
                              - AI
                              - AL
                              - AM
                              - AO
                              - AQ
                              - AR
                              - AS
                              - AT
                              - AU
                              - AW
                              - AX
                              - AZ
                              - BA
                              - BB
                              - BD
                              - BE
                              - BF
                              - BG
                              - BH
                              - BI
                              - BJ
                              - BL
                              - BM
                              - BN
                              - BO
                              - BQ
                              - BR
                              - BS
                              - BT
                              - BV
                              - BW
                              - BY
                              - BZ
                              - CA
                              - CC
                              - CD
                              - CF
                              - CG
                              - CH
                              - CI
                              - CK
                              - CL
                              - CM
                              - CN
                              - CO
                              - CR
                              - CU
                              - CV
                              - CW
                              - CX
                              - CY
                              - CZ
                              - DE
                              - DJ
                              - DK
                              - DM
                              - DO
                              - DZ
                              - EC
                              - EE
                              - EG
                              - EH
                              - ER
                              - ES
                              - ET
                              - FI
                              - FJ
                              - FK
                              - FM
                              - FO
                              - FR
                              - GA
                              - GB
                              - GD
                              - GE
                              - GF
                              - GG
                              - GH
                              - GI
                              - GL
                              - GM
                              - GN
                              - GP
                              - GQ
                              - GR
                              - GS
                              - GT
                              - GU
                              - GW
                              - GY
                              - HK
                              - HM
                              - HN
                              - HR
                              - HT
                              - HU
                              - ID
                              - IE
                              - IL
                              - IM
                              - IN
                              - IO
                              - IQ
                              - IR
                              - IS
                              - IT
                              - JE
                              - JM
                              - JO
                              - JP
                              - KE
                              - KG
                              - KH
                              - KI
                              - KM
                              - KN
                              - KP
                              - KR
                              - KW
                              - KY
                              - KZ
                              - LA
                              - LB
                              - LC
                              - LI
                              - LK
                              - LR
                              - LS
                              - LT
                              - LU
                              - LV
                              - LY
                              - MA
                              - MC
                              - MD
                              - ME
                              - MF
                              - MG
                              - MH
                              - MK
                              - ML
                              - MM
                              - MN
                              - MO
                              - MP
                              - MQ
                              - MR
                              - MS
                              - MT
                              - MU
                              - MV
                              - MW
                              - MX
                              - MY
                              - MZ
                              - NA
                              - NC
                              - NE
                              - NF
                              - NG
                              - NI
                              - NL
                              - 'NO'
                              - NP
                              - NR
                              - NU
                              - NZ
                              - OM
                              - PA
                              - PE
                              - PF
                              - PG
                              - PH
                              - PK
                              - PL
                              - PM
                              - PN
                              - PR
                              - PS
                              - PT
                              - PW
                              - PY
                              - QA
                              - RE
                              - RO
                              - RS
                              - RU
                              - RW
                              - SA
                              - SB
                              - SC
                              - SD
                              - SE
                              - SG
                              - SH
                              - SI
                              - SJ
                              - SK
                              - SL
                              - SM
                              - SN
                              - SO
                              - SR
                              - SS
                              - ST
                              - SV
                              - SX
                              - SY
                              - SZ
                              - TC
                              - TD
                              - TF
                              - TG
                              - TH
                              - TJ
                              - TK
                              - TL
                              - TM
                              - TN
                              - TO
                              - TR
                              - TT
                              - TV
                              - TW
                              - TZ
                              - UA
                              - UG
                              - UM
                              - US
                              - UY
                              - UZ
                              - VA
                              - VC
                              - VE
                              - VG
                              - VI
                              - VN
                              - VU
                              - WF
                              - WS
                              - XK
                              - YE
                              - YT
                              - ZA
                              - ZM
                              - ZW
                          minItems: 1
                          description: >-
                            Nationalities of the user. [ISO 3166 alpha-2
                            Codes](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2).
                        issuance_date:
                          type: string
                          format: date
                          description: >-
                            Issuance date in YYYY-MM-DD format. [RFC 3339,
                            section
                            5.6](https://json-schema.org/draft/2020-12/json-schema-validation.html#RFC3339)
                        data_download_link:
                          type: string
                          format: url
                          maxLength: 1000
                          description: >-
                            Download URL for the document proving the data
                            change. The file size must not exceed 250 MB.
                        document_type:
                          type: string
                          description: |-
                            The type of document used to prove the data change
                            * PASSPORT - Passport
                            * ID_CARD - National Identification document
                          enum:
                            - PASSPORT
                            - ID_CARD
                      required:
                        - nationalities
                        - issuance_date
                        - data_download_link
                        - document_type
                      additionalProperties: false
                    - type: object
                      title: 'User (TOL) - Data Change Request: Address'
                      properties:
                        address:
                          title: Address
                          type: object
                          description: Address. Must not be a P.O. box or c/o address.
                          properties:
                            address_line1:
                              type: string
                              description: First address line of the address.
                              maxLength: 100
                            address_line2:
                              type: string
                              description: Second address line of the address.
                              maxLength: 100
                            postcode:
                              title: Postal code
                              type: string
                              description: Postal code (postcode, PIN or ZIP code)
                              pattern: ^[a-zA-Z0-9][a-zA-Z0-9\s\-]{0,8}[a-zA-Z0-9]?$
                            country:
                              description: >-
                                Accepted country code. [ISO 3166-1 alpha-2
                                codes](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2).
                              type: string
                              enum:
                                - AD
                                - AE
                                - AF
                                - AG
                                - AI
                                - AL
                                - AM
                                - AO
                                - AQ
                                - AR
                                - AS
                                - AT
                                - AU
                                - AW
                                - AX
                                - AZ
                                - BA
                                - BB
                                - BD
                                - BE
                                - BF
                                - BG
                                - BH
                                - BI
                                - BJ
                                - BL
                                - BM
                                - BN
                                - BO
                                - BQ
                                - BR
                                - BS
                                - BT
                                - BV
                                - BW
                                - BY
                                - BZ
                                - CA
                                - CC
                                - CD
                                - CF
                                - CG
                                - CH
                                - CI
                                - CK
                                - CL
                                - CM
                                - CN
                                - CO
                                - CR
                                - CU
                                - CV
                                - CW
                                - CX
                                - CY
                                - CZ
                                - DE
                                - DJ
                                - DK
                                - DM
                                - DO
                                - DZ
                                - EC
                                - EE
                                - EG
                                - EH
                                - ER
                                - ES
                                - ET
                                - FI
                                - FJ
                                - FK
                                - FM
                                - FO
                                - FR
                                - GA
                                - GB
                                - GD
                                - GE
                                - GF
                                - GG
                                - GH
                                - GI
                                - GL
                                - GM
                                - GN
                                - GP
                                - GQ
                                - GR
                                - GS
                                - GT
                                - GU
                                - GW
                                - GY
                                - HK
                                - HM
                                - HN
                                - HR
                                - HT
                                - HU
                                - ID
                                - IE
                                - IL
                                - IM
                                - IN
                                - IO
                                - IQ
                                - IR
                                - IS
                                - IT
                                - JE
                                - JM
                                - JO
                                - JP
                                - KE
                                - KG
                                - KH
                                - KI
                                - KM
                                - KN
                                - KP
                                - KR
                                - KW
                                - KY
                                - KZ
                                - LA
                                - LB
                                - LC
                                - LI
                                - LK
                                - LR
                                - LS
                                - LT
                                - LU
                                - LV
                                - LY
                                - MA
                                - MC
                                - MD
                                - ME
                                - MF
                                - MG
                                - MH
                                - MK
                                - ML
                                - MM
                                - MN
                                - MO
                                - MP
                                - MQ
                                - MR
                                - MS
                                - MT
                                - MU
                                - MV
                                - MW
                                - MX
                                - MY
                                - MZ
                                - NA
                                - NC
                                - NE
                                - NF
                                - NG
                                - NI
                                - NL
                                - 'NO'
                                - NP
                                - NR
                                - NU
                                - NZ
                                - OM
                                - PA
                                - PE
                                - PF
                                - PG
                                - PH
                                - PK
                                - PL
                                - PM
                                - PN
                                - PR
                                - PS
                                - PT
                                - PW
                                - PY
                                - QA
                                - RE
                                - RO
                                - RS
                                - RU
                                - RW
                                - SA
                                - SB
                                - SC
                                - SD
                                - SE
                                - SG
                                - SH
                                - SI
                                - SJ
                                - SK
                                - SL
                                - SM
                                - SN
                                - SO
                                - SR
                                - SS
                                - ST
                                - SV
                                - SX
                                - SY
                                - SZ
                                - TC
                                - TD
                                - TF
                                - TG
                                - TH
                                - TJ
                                - TK
                                - TL
                                - TM
                                - TN
                                - TO
                                - TR
                                - TT
                                - TV
                                - TW
                                - TZ
                                - UA
                                - UG
                                - UM
                                - US
                                - UY
                                - UZ
                                - VA
                                - VC
                                - VE
                                - VG
                                - VI
                                - VN
                                - VU
                                - WF
                                - WS
                                - XK
                                - YE
                                - YT
                                - ZA
                                - ZM
                                - ZW
                            state:
                              description: >-
                                State, province, county. [ISO 3166 alpha-2
                                Codes](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2).
                              type: string
                              maxLength: 50
                            city:
                              title: City name
                              type: string
                              minLength: 1
                              maxLength: 85
                          required:
                            - address_line1
                            - postcode
                            - country
                            - city
                        issuance_date:
                          type: string
                          format: date
                          description: >-
                            Issuance date in YYYY-MM-DD format. [RFC 3339,
                            section
                            5.6](https://json-schema.org/draft/2020-12/json-schema-validation.html#RFC3339)
                        data_download_link:
                          type: string
                          format: url
                          maxLength: 1000
                          description: >-
                            Download URL for the document proving the data
                            change. The file size must not exceed 250 MB.
                        document_type:
                          type: string
                          description: |-
                            The type of document used to proof data change
                            * UTILITY_BILL - Utility bill
                            * TELEPHONE_BILL - Telephone bill
                            * INTERNET_BILL - Internet bill
                            * BANK_STATEMENT - Bank statement
                            * REGISTRATION_CERT - Registration certificate
                            * RESIDENCE_PERMIT - Residence permit
                            * ID_CARD - National Identification document
                          enum:
                            - UTILITY_BILL
                            - TELEPHONE_BILL
                            - INTERNET_BILL
                            - BANK_STATEMENT
                            - REGISTRATION_CERT
                            - RESIDENCE_PERMIT
                            - ID_CARD
                      required:
                        - address
                        - issuance_date
                        - data_download_link
                        - document_type
                      additionalProperties: false
            examples:
              Name:
                summary: Name
                value:
                  first_name: Karl
                  last_name: Schmidt
                  issuance_date: '2030-01-01'
                  data_download_link: https://bucket.customer.com/ident/user3.zip
                  document_type: ID_CARD
              TOL User Email:
                summary: Email
                value:
                  email: max@example.com
              Nationality:
                summary: Nationality
                value:
                  nationalities:
                    - DE
                  issuance_date: '2030-01-01'
                  data_download_link: https://bucket.customer.com/ident/user3.zip
                  document_type: ID_CARD
              Address:
                summary: Address
                value:
                  address:
                    address_line1: Rosenweg 221
                    address_line2: apt. 33
                    postcode: '45678'
                    city: Berlin
                    state: BE
                    country: DE
                  issuance_date: '2020-01-01'
                  data_download_link: https://bucket.customer.com/por/user3.zip
                  document_type: UTILITY_BILL
              BYOL User Data Change:
                summary: BYOL User Data Change
                value:
                  first_name: Karl
                  last_name: Schmidt
                  salutation: SALUTATION_MALE
                  title: PROF_DR
                  birth_date: '1972-01-30'
                  birth_city: Berlin
                  birth_country: DE
                  birth_name: Schmidt
                  nationalities:
                    - DE
                    - AU
                  address:
                    address_line1: Rosenweg 221
                    address_line2: apt. 33
                    postcode: '45678'
                    city: Berlin
                    state: BE
                    country: DE
                  postal_address:
                    address_line1: Rosenweg 221
                    address_line2: apt. 33
                    postcode: '45678'
                    city: Berlin
                    state: BE
                    country: DE
                  branch_id: e6373bfa-ff12-4004-8de9-747ac96764da
              TOL User Data Change With Branch ID:
                summary: Branch ID
                value:
                  branch_id: e6373bfa-ff12-4004-8de9-747ac96764da
      responses:
        '202':
          description: >-
            The request has been successfully accepted and will be processed
            asynchronously.
          headers:
            upvest-request-id:
              required: true
              schema:
                type: string
                format: uuid
                example: 169ae4c7-ebd7-4041-94da-25369653eba7
        '400':
          description: Bad Request. The incoming request had a malformed parameter/object.
          headers:
            upvest-request-id:
              required: true
              schema:
                type: string
                format: uuid
                example: 169ae4c7-ebd7-4041-94da-25369653eba7
          content:
            application/problem+json:
              schema:
                title: Error
                type: object
                description: ''
                properties:
                  type:
                    type: string
                    description: URL to a document describing the error condition.
                  status:
                    type: integer
                    description: >-
                      Transmission of the HTTP status code so that all
                      information can be found in one place, but also to correct
                      changes in the status code due to the use of proxy
                      servers.
                  title:
                    type: string
                    description: >-
                      A short, human-readable title for the general error type;
                      the title should not change for given types.
                  detail:
                    type: string
                    description: A human-readable description of the specific error.
                  instance:
                    type: string
                    description: >-
                      This optional key may be present, with a unique URI for
                      the specific error; this will often point to an error log
                      for that specific response.
                  request_id:
                    type: string
                    description: Correlation ID for the original request.
                required:
                  - type
                  - status
                additionalProperties: false
              example:
                status: 400
                type: bad_request
        '401':
          description: Unauthorized. The caller has not been authenticated.
          headers:
            upvest-request-id:
              required: true
              schema:
                type: string
                format: uuid
                example: 169ae4c7-ebd7-4041-94da-25369653eba7
          content:
            application/problem+json:
              schema:
                title: Error
                type: object
                description: ''
                properties:
                  type:
                    type: string
                    description: URL to a document describing the error condition.
                  status:
                    type: integer
                    description: >-
                      Transmission of the HTTP status code so that all
                      information can be found in one place, but also to correct
                      changes in the status code due to the use of proxy
                      servers.
                  title:
                    type: string
                    description: >-
                      A short, human-readable title for the general error type;
                      the title should not change for given types.
                  detail:
                    type: string
                    description: A human-readable description of the specific error.
                  instance:
                    type: string
                    description: >-
                      This optional key may be present, with a unique URI for
                      the specific error; this will often point to an error log
                      for that specific response.
                  request_id:
                    type: string
                    description: Correlation ID for the original request.
                required:
                  - type
                  - status
                additionalProperties: false
              example:
                status: 401
                type: unauthorized
        '403':
          description: >-
            Forbidden. The caller has been authenticated but is not allowed to
            take the requested action.
          headers:
            upvest-request-id:
              required: true
              schema:
                type: string
                format: uuid
                example: 169ae4c7-ebd7-4041-94da-25369653eba7
          content:
            application/problem+json:
              schema:
                title: Error
                type: object
                description: ''
                properties:
                  type:
                    type: string
                    description: URL to a document describing the error condition.
                  status:
                    type: integer
                    description: >-
                      Transmission of the HTTP status code so that all
                      information can be found in one place, but also to correct
                      changes in the status code due to the use of proxy
                      servers.
                  title:
                    type: string
                    description: >-
                      A short, human-readable title for the general error type;
                      the title should not change for given types.
                  detail:
                    type: string
                    description: A human-readable description of the specific error.
                  instance:
                    type: string
                    description: >-
                      This optional key may be present, with a unique URI for
                      the specific error; this will often point to an error log
                      for that specific response.
                  request_id:
                    type: string
                    description: Correlation ID for the original request.
                required:
                  - type
                  - status
                additionalProperties: false
              example:
                status: 403
                type: forbidden
        '404':
          description: Not Found. The requested resource could not be found.
          headers:
            upvest-request-id:
              required: true
              schema:
                type: string
                format: uuid
                example: 169ae4c7-ebd7-4041-94da-25369653eba7
          content:
            application/problem+json:
              schema:
                title: Error
                type: object
                description: ''
                properties:
                  type:
                    type: string
                    description: URL to a document describing the error condition.
                  status:
                    type: integer
                    description: >-
                      Transmission of the HTTP status code so that all
                      information can be found in one place, but also to correct
                      changes in the status code due to the use of proxy
                      servers.
                  title:
                    type: string
                    description: >-
                      A short, human-readable title for the general error type;
                      the title should not change for given types.
                  detail:
                    type: string
                    description: A human-readable description of the specific error.
                  instance:
                    type: string
                    description: >-
                      This optional key may be present, with a unique URI for
                      the specific error; this will often point to an error log
                      for that specific response.
                  request_id:
                    type: string
                    description: Correlation ID for the original request.
                required:
                  - type
                  - status
                additionalProperties: false
              example:
                status: 404
                type: not_found
        '406':
          description: >-
            Not Acceptable. The resource does not have a current representation
            that would be acceptable to the user agent. "Accept" header defined
            unsupported value.
          headers:
            upvest-request-id:
              required: true
              schema:
                type: string
                format: uuid
                example: 169ae4c7-ebd7-4041-94da-25369653eba7
          content:
            application/problem+json:
              schema:
                title: Error
                type: object
                description: ''
                properties:
                  type:
                    type: string
                    description: URL to a document describing the error condition.
                  status:
                    type: integer
                    description: >-
                      Transmission of the HTTP status code so that all
                      information can be found in one place, but also to correct
                      changes in the status code due to the use of proxy
                      servers.
                  title:
                    type: string
                    description: >-
                      A short, human-readable title for the general error type;
                      the title should not change for given types.
                  detail:
                    type: string
                    description: A human-readable description of the specific error.
                  instance:
                    type: string
                    description: >-
                      This optional key may be present, with a unique URI for
                      the specific error; this will often point to an error log
                      for that specific response.
                  request_id:
                    type: string
                    description: Correlation ID for the original request.
                required:
                  - type
                  - status
                additionalProperties: false
              example:
                status: 406
                type: not_acceptable
        '429':
          description: >-
            Too Many Requests. The caller has exceeded their quota for the time
            period and has been throttled.
          headers:
            upvest-request-id:
              required: true
              schema:
                type: string
                format: uuid
                example: 169ae4c7-ebd7-4041-94da-25369653eba7
          content:
            application/problem+json:
              schema:
                title: Error
                type: object
                description: ''
                properties:
                  type:
                    type: string
                    description: URL to a document describing the error condition.
                  status:
                    type: integer
                    description: >-
                      Transmission of the HTTP status code so that all
                      information can be found in one place, but also to correct
                      changes in the status code due to the use of proxy
                      servers.
                  title:
                    type: string
                    description: >-
                      A short, human-readable title for the general error type;
                      the title should not change for given types.
                  detail:
                    type: string
                    description: A human-readable description of the specific error.
                  instance:
                    type: string
                    description: >-
                      This optional key may be present, with a unique URI for
                      the specific error; this will often point to an error log
                      for that specific response.
                  request_id:
                    type: string
                    description: Correlation ID for the original request.
                required:
                  - type
                  - status
                additionalProperties: false
              example:
                status: 429
                type: too_many_requests
        '500':
          description: Internal Server Error. The service encountered an unexpected error.
          headers:
            upvest-request-id:
              required: true
              schema:
                type: string
                format: uuid
                example: 169ae4c7-ebd7-4041-94da-25369653eba7
          content:
            application/problem+json:
              schema:
                title: Error
                type: object
                description: ''
                properties:
                  type:
                    type: string
                    description: URL to a document describing the error condition.
                  status:
                    type: integer
                    description: >-
                      Transmission of the HTTP status code so that all
                      information can be found in one place, but also to correct
                      changes in the status code due to the use of proxy
                      servers.
                  title:
                    type: string
                    description: >-
                      A short, human-readable title for the general error type;
                      the title should not change for given types.
                  detail:
                    type: string
                    description: A human-readable description of the specific error.
                  instance:
                    type: string
                    description: >-
                      This optional key may be present, with a unique URI for
                      the specific error; this will often point to an error log
                      for that specific response.
                  request_id:
                    type: string
                    description: Correlation ID for the original request.
                required:
                  - type
                  - status
                additionalProperties: false
              example:
                status: 500
                type: internal_server_error
        '503':
          description: >-
            Service Unavailable. The service handling for this request cannot be
            reached at this time.
          headers:
            upvest-request-id:
              required: true
              schema:
                type: string
                format: uuid
                example: 169ae4c7-ebd7-4041-94da-25369653eba7
          content:
            application/problem+json:
              schema:
                title: Error
                type: object
                description: ''
                properties:
                  type:
                    type: string
                    description: URL to a document describing the error condition.
                  status:
                    type: integer
                    description: >-
                      Transmission of the HTTP status code so that all
                      information can be found in one place, but also to correct
                      changes in the status code due to the use of proxy
                      servers.
                  title:
                    type: string
                    description: >-
                      A short, human-readable title for the general error type;
                      the title should not change for given types.
                  detail:
                    type: string
                    description: A human-readable description of the specific error.
                  instance:
                    type: string
                    description: >-
                      This optional key may be present, with a unique URI for
                      the specific error; this will often point to an error log
                      for that specific response.
                  request_id:
                    type: string
                    description: Correlation ID for the original request.
                required:
                  - type
                  - status
                additionalProperties: false
              example:
                status: 503
                type: method_not_allowed
        '504':
          description: >-
            Gateway Timeout. The service gateway has reached its internal
            timeout.
          headers:
            upvest-request-id:
              required: true
              schema:
                type: string
                format: uuid
                example: 169ae4c7-ebd7-4041-94da-25369653eba7
          content:
            application/problem+json:
              schema:
                title: Error
                type: object
                description: ''
                properties:
                  type:
                    type: string
                    description: URL to a document describing the error condition.
                  status:
                    type: integer
                    description: >-
                      Transmission of the HTTP status code so that all
                      information can be found in one place, but also to correct
                      changes in the status code due to the use of proxy
                      servers.
                  title:
                    type: string
                    description: >-
                      A short, human-readable title for the general error type;
                      the title should not change for given types.
                  detail:
                    type: string
                    description: A human-readable description of the specific error.
                  instance:
                    type: string
                    description: >-
                      This optional key may be present, with a unique URI for
                      the specific error; this will often point to an error log
                      for that specific response.
                  request_id:
                    type: string
                    description: Correlation ID for the original request.
                required:
                  - type
                  - status
                additionalProperties: false
              example:
                status: 504
                type: gateway_timeout
  /users/{user_id}/checks:
    parameters:
      - name: user_id
        in: path
        required: true
        schema:
          title: User unique identifier.
          type: string
          description: User unique identifier.
          format: uuid
      - name: upvest-client-id
        in: header
        description: Tenant Client ID
        required: true
        schema:
          type: string
          format: uuid
          example: ebabcf4d-61c3-4942-875c-e265a7c2d062
      - name: authorization
        in: header
        description: |
          Bearer (access) token from the OAuth flow with correct scopes.
          https://datatracker.ietf.org/doc/html/rfc6750
        required: true
        schema:
          type: string
          pattern: ^Bearer [a-zA-Z0-9\-\._~+/]*=*
          example: Bearer c2VjcmV0Cg==
      - name: signature
        in: header
        required: true
        schema:
          type: string
        description: >-
          https://tools.ietf.org/id/draft-ietf-httpbis-message-signatures-01.html#name-the-signature-http-header
      - name: signature-input
        in: header
        required: true
        schema:
          type: string
        description: >-
          https://tools.ietf.org/id/draft-ietf-httpbis-message-signatures-01.html#name-the-signature-input-http-he
      - name: upvest-api-version
        in: header
        required: false
        schema:
          type: string
          enum:
            - '1'
          default: '1'
          example: '1'
        description: 'Upvest API version (Note: Do not include quotation marks)'
    get:
      operationId: list_user_checks
      summary: Get checks for a user
      description: Lists all checks for a user specified by ID.
      tags:
        - User Checks
      security:
        - oauth-client-credentials:
            - checks:read
            - checks:admin
      responses:
        '200':
          description: OK
          headers:
            upvest-request-id:
              required: true
              schema:
                type: string
                format: uuid
                example: 169ae4c7-ebd7-4041-94da-25369653eba7
          content:
            application/json:
              schema:
                title: User Check - List - Response
                type: object
                description: ''
                properties:
                  data:
                    type: array
                    items:
                      title: User Check
                      oneOf:
                        - title: User Check - Know your customer
                          type: object
                          description: >-
                            The KYC (Know your customer) check is completed by
                            the client sharing the valid and relevant KYC data
                            for the user.
                          properties:
                            id:
                              title: User Check unique identifier
                              type: string
                              description: User Check unique identifier.
                              format: uuid
                            user_id:
                              title: User unique identifier.
                              type: string
                              description: User unique identifier.
                              format: uuid
                            type:
                              type: string
                              default: KYC
                              description: The type of check must be “KYC”.
                            check_confirmed_at:
                              type: string
                              format: date-time
                              description: >-
                                Completion date and time of the KYC check. Must
                                not be older than 24 months.
                            data_download_link:
                              type: string
                              format: url
                              maxLength: 1000
                              description: >-
                                Download URL for the KYC evidence file. The file
                                size must not exceed 250 MB.
                            document_type:
                              type: string
                              description: >
                                The type of document used in the KYC process.

                                * PASSPORT - Passport

                                * ID_CARD - National Identification document

                                * RESIDENCE_PERMIT - Residence Permit

                                * DRIVING_LICENSE - Driving License

                                * TWO_PLUS_TWO_VERIFICATION_PROOF - Two plus two
                                verification proof (for GB residence users only)
                              enum:
                                - PASSPORT
                                - ID_CARD
                                - RESIDENCE_PERMIT
                                - DRIVING_LICENSE
                                - TWO_PLUS_TWO_VERIFICATION_PROOF
                            document_expiration_date:
                              type: string
                              format: date
                              description: >
                                Expiration date of the document used in KYC
                                process in YYYY-MM-DD format.


                                **The field is required for the following
                                document types:**

                                * PASSPORT

                                * ID_CARD

                                * RESIDENCE_PERMIT

                                * DRIVING_LICENSE
                            nationality:
                              type: string
                              pattern: ^[A-Z]{2}$
                              description: >
                                Issuing country of the document used in the KYC
                                process. [ISO 3166 alpha-2
                                codes](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2).


                                **The field is required for the following
                                document types:**

                                * PASSPORT

                                * ID_CARD

                                * RESIDENCE_PERMIT

                                * DRIVING_LICENSE
                            status:
                              type: string
                              description: |-
                                Final status of the KYC check.
                                * IN_PROGRESS - KYC check is in progress
                                * PASSED - KYC check passed
                                * FAILED - KYC check failed
                              enum:
                                - IN_PROGRESS
                                - PASSED
                                - FAILED
                            provider:
                              type: string
                              maxLength: 100
                              description: Provider that was used to perform the KYC check.
                            method:
                              type: string
                              description: >-
                                Method used for AML-compliant KYC process

                                * VIDEO_ID - Video identification

                                * IN_PERSON_ID - In-person identification at the
                                post office or the client's outlet

                                * ELECTRONIC_ID - Advanced electronic
                                identification methods (namely German eID)

                                * LIVENESS_PHOTO_ID - Photos and security
                                features of the identification document in
                                combination with a video-based liveness check
                                (residence country must not be Germany in this
                                case)

                                * QUALIFIED_ELECTRONIC_SIGNATURE_WITH_TX -
                                Qualified electronic signature accompanied by a
                                bank transaction for verification

                                * TWO_PLUS_TWO_VERIFICATION - A method of
                                verifying identity by matching at least two
                                personal details from two separate sources (for
                                GB residence users only)
                              enum:
                                - VIDEO_ID
                                - IN_PERSON_ID
                                - ELECTRONIC_ID
                                - LIVENESS_PHOTO_ID
                                - QUALIFIED_ELECTRONIC_SIGNATURE_WITH_TX
                                - TWO_PLUS_TWO_VERIFICATION
                            confirmed_address:
                              title: Address
                              type: object
                              description: Address. Must not be a P.O. box or c/o address.
                              properties:
                                address_line1:
                                  type: string
                                  description: First address line of the address.
                                  maxLength: 100
                                address_line2:
                                  type: string
                                  description: Second address line of the address.
                                  maxLength: 100
                                postcode:
                                  title: Postal code
                                  type: string
                                  description: Postal code (postcode, PIN or ZIP code)
                                  pattern: >-
                                    ^[a-zA-Z0-9][a-zA-Z0-9\s\-]{0,8}[a-zA-Z0-9]?$
                                country:
                                  description: >-
                                    Accepted country code. [ISO 3166-1 alpha-2
                                    codes](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2).
                                  type: string
                                  enum:
                                    - AD
                                    - AE
                                    - AF
                                    - AG
                                    - AI
                                    - AL
                                    - AM
                                    - AO
                                    - AQ
                                    - AR
                                    - AS
                                    - AT
                                    - AU
                                    - AW
                                    - AX
                                    - AZ
                                    - BA
                                    - BB
                                    - BD
                                    - BE
                                    - BF
                                    - BG
                                    - BH
                                    - BI
                                    - BJ
                                    - BL
                                    - BM
                                    - BN
                                    - BO
                                    - BQ
                                    - BR
                                    - BS
                                    - BT
                                    - BV
                                    - BW
                                    - BY
                                    - BZ
                                    - CA
                                    - CC
                                    - CD
                                    - CF
                                    - CG
                                    - CH
                                    - CI
                                    - CK
                                    - CL
                                    - CM
                                    - CN
                                    - CO
                                    - CR
                                    - CU
                                    - CV
                                    - CW
                                    - CX
                                    - CY
                                    - CZ
                                    - DE
                                    - DJ
                                    - DK
                                    - DM
                                    - DO
                                    - DZ
                                    - EC
                                    - EE
                                    - EG
                                    - EH
                                    - ER
                                    - ES
                                    - ET
                                    - FI
                                    - FJ
                                    - FK
                                    - FM
                                    - FO
                                    - FR
                                    - GA
                                    - GB
                                    - GD
                                    - GE
                                    - GF
                                    - GG
                                    - GH
                                    - GI
                                    - GL
                                    - GM
                                    - GN
                                    - GP
                                    - GQ
                                    - GR
                                    - GS
                                    - GT
                                    - GU
                                    - GW
                                    - GY
                                    - HK
                                    - HM
                                    - HN
                                    - HR
                                    - HT
                                    - HU
                                    - ID
                                    - IE
                                    - IL
                                    - IM
                                    - IN
                                    - IO
                                    - IQ
                                    - IR
                                    - IS
                                    - IT
                                    - JE
                                    - JM
                                    - JO
                                    - JP
                                    - KE
                                    - KG
                                    - KH
                                    - KI
                                    - KM
                                    - KN
                                    - KP
                                    - KR
                                    - KW
                                    - KY
                                    - KZ
                                    - LA
                                    - LB
                                    - LC
                                    - LI
                                    - LK
                                    - LR
                                    - LS
                                    - LT
                                    - LU
                                    - LV
                                    - LY
                                    - MA
                                    - MC
                                    - MD
                                    - ME
                                    - MF
                                    - MG
                                    - MH
                                    - MK
                                    - ML
                                    - MM
                                    - MN
                                    - MO
                                    - MP
                                    - MQ
                                    - MR
                                    - MS
                                    - MT
                                    - MU
                                    - MV
                                    - MW
                                    - MX
                                    - MY
                                    - MZ
                                    - NA
                                    - NC
                                    - NE
                                    - NF
                                    - NG
                                    - NI
                                    - NL
                                    - 'NO'
                                    - NP
                                    - NR
                                    - NU
                                    - NZ
                                    - OM
                                    - PA
                                    - PE
                                    - PF
                                    - PG
                                    - PH
                                    - PK
                                    - PL
                                    - PM
                                    - PN
                                    - PR
                                    - PS
                                    - PT
                                    - PW
                                    - PY
                                    - QA
                                    - RE
                                    - RO
                                    - RS
                                    - RU
                                    - RW
                                    - SA
                                    - SB
                                    - SC
                                    - SD
                                    - SE
                                    - SG
                                    - SH
                                    - SI
                                    - SJ
                                    - SK
                                    - SL
                                    - SM
                                    - SN
                                    - SO
                                    - SR
                                    - SS
                                    - ST
                                    - SV
                                    - SX
                                    - SY
                                    - SZ
                                    - TC
                                    - TD
                                    - TF
                                    - TG
                                    - TH
                                    - TJ
                                    - TK
                                    - TL
                                    - TM
                                    - TN
                                    - TO
                                    - TR
                                    - TT
                                    - TV
                                    - TW
                                    - TZ
                                    - UA
                                    - UG
                                    - UM
                                    - US
                                    - UY
                                    - UZ
                                    - VA
                                    - VC
                                    - VE
                                    - VG
                                    - VI
                                    - VN
                                    - VU
                                    - WF
                                    - WS
                                    - XK
                                    - YE
                                    - YT
                                    - ZA
                                    - ZM
                                    - ZW
                                state:
                                  description: >-
                                    State, province, county. [ISO 3166 alpha-2
                                    Codes](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2).
                                  type: string
                                  maxLength: 50
                                city:
                                  title: City name
                                  type: string
                                  minLength: 1
                                  maxLength: 85
                              required:
                                - address_line1
                                - postcode
                                - country
                                - city
                            kyc_update:
                              type: boolean
                              description: >-
                                Marks this check as a KYC refresh/update as
                                opposed to an initial record.
                          required:
                            - id
                            - user_id
                            - type
                            - check_confirmed_at
                            - data_download_link
                            - document_type
                            - status
                            - provider
                            - method
                          additionalProperties: false
                        - title: User Check - Proof of Residency
                          type: object
                          description: >-
                            The PoR (Proof of residency) check is completed by
                            the client sharing a valid PoR document, if not
                            fulfilled by the KYC check.
                          properties:
                            id:
                              title: User Check unique identifier
                              type: string
                              description: User Check unique identifier.
                              format: uuid
                            user_id:
                              title: User unique identifier.
                              type: string
                              description: User unique identifier.
                              format: uuid
                            type:
                              type: string
                              default: POR
                              description: The type of check must be POR.
                            check_confirmed_at:
                              type: string
                              format: date-time
                              description: Completion date and time of the PoR check.
                            issuance_date:
                              type: string
                              format: date
                              description: Issuance date in YYYY-MM-DD format.
                            data_download_link:
                              type: string
                              format: url
                              maxLength: 1000
                              description: >-
                                Download URL for the PoR evidence file. The file
                                size must not exceed 250 MB.
                            document_type:
                              type: string
                              description: >-
                                The type of document used in the PoR process.
                                Maximum age of the document is 12 months (stated
                                on the document) applicable for: Utility bills
                                (water, gas, electricity), Telephone bills (only
                                landline), Internet bills, Bank account
                                statements. Documents that need to be still
                                valid - Registration certificate (issued within
                                the past 5 years), Residence permit e.g. Blue
                                Card (as long as valid), ID Card that contains
                                the registration address.

                                * UTILITY_BILL - 

                                * TELEPHONE_BILL - 

                                * INTERNET_BILL - 

                                * BANK_STATEMENT - 

                                * REGISTRATION_CERT - 

                                * RESIDENCE_PERMIT - 

                                * ID_CARD - 

                                * PASSPORT - 
                              enum:
                                - UTILITY_BILL
                                - TELEPHONE_BILL
                                - INTERNET_BILL
                                - BANK_STATEMENT
                                - REGISTRATION_CERT
                                - RESIDENCE_PERMIT
                                - ID_CARD
                                - PASSPORT
                            status:
                              type: string
                              description: |-
                                Final status of the PoR check.
                                * IN_PROGRESS - 
                                * PASSED - 
                                * FAILED - 
                              enum:
                                - IN_PROGRESS
                                - PASSED
                                - FAILED
                            confirmed_address:
                              title: Address
                              type: object
                              description: Address. Must not be a P.O. box or c/o address.
                              properties:
                                address_line1:
                                  type: string
                                  description: First address line of the address.
                                  maxLength: 100
                                address_line2:
                                  type: string
                                  description: Second address line of the address.
                                  maxLength: 100
                                postcode:
                                  title: Postal code
                                  type: string
                                  description: Postal code (postcode, PIN or ZIP code)
                                  pattern: >-
                                    ^[a-zA-Z0-9][a-zA-Z0-9\s\-]{0,8}[a-zA-Z0-9]?$
                                country:
                                  description: >-
                                    Accepted country code. [ISO 3166-1 alpha-2
                                    codes](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2).
                                  type: string
                                  enum:
                                    - AD
                                    - AE
                                    - AF
                                    - AG
                                    - AI
                                    - AL
                                    - AM
                                    - AO
                                    - AQ
                                    - AR
                                    - AS
                                    - AT
                                    - AU
                                    - AW
                                    - AX
                                    - AZ
                                    - BA
                                    - BB
                                    - BD
                                    - BE
                                    - BF
                                    - BG
                                    - BH
                                    - BI
                                    - BJ
                                    - BL
                                    - BM
                                    - BN
                                    - BO
                                    - BQ
                                    - BR
                                    - BS
                                    - BT
                                    - BV
                                    - BW
                                    - BY
                                    - BZ
                                    - CA
                                    - CC
                                    - CD
                                    - CF
                                    - CG
                                    - CH
                                    - CI
                                    - CK
                                    - CL
                                    - CM
                                    - CN
                                    - CO
                                    - CR
                                    - CU
                                    - CV
                                    - CW
                                    - CX
                                    - CY
                                    - CZ
                                    - DE
                                    - DJ
                                    - DK
                                    - DM
                                    - DO
                                    - DZ
                                    - EC
                                    - EE
                                    - EG
                                    - EH
                                    - ER
                                    - ES
                                    - ET
                                    - FI
                                    - FJ
                                    - FK
                                    - FM
                                    - FO
                                    - FR
                                    - GA
                                    - GB
                                    - GD
                                    - GE
                                    - GF
                                    - GG
                                    - GH
                                    - GI
                                    - GL
                                    - GM
                                    - GN
                                    - GP
                                    - GQ
                                    - GR
                                    - GS
                                    - GT
                                    - GU
                                    - GW
                                    - GY
                                    - HK
                                    - HM
                                    - HN
                                    - HR
                                    - HT
                                    - HU
                                    - ID
                                    - IE
                                    - IL
                                    - IM
                                    - IN
                                    - IO
                                    - IQ
                                    - IR
                                    - IS
                                    - IT
                                    - JE
                                    - JM
                                    - JO
                                    - JP
                                    - KE
                                    - KG
                                    - KH
                                    - KI
                                    - KM
                                    - KN
                                    - KP
                                    - KR
                                    - KW
                                    - KY
                                    - KZ
                                    - LA
                                    - LB
                                    - LC
                                    - LI
                                    - LK
                                    - LR
                                    - LS
                                    - LT
                                    - LU
                                    - LV
                                    - LY
                                    - MA
                                    - MC
                                    - MD
                                    - ME
                                    - MF
                                    - MG
                                    - MH
                                    - MK
                                    - ML
                                    - MM
                                    - MN
                                    - MO
                                    - MP
                                    - MQ
                                    - MR
                                    - MS
                                    - MT
                                    - MU
                                    - MV
                                    - MW
                                    - MX
                                    - MY
                                    - MZ
                                    - NA
                                    - NC
                                    - NE
                                    - NF
                                    - NG
                                    - NI
                                    - NL
                                    - 'NO'
                                    - NP
                                    - NR
                                    - NU
                                    - NZ
                                    - OM
                                    - PA
                                    - PE
                                    - PF
                                    - PG
                                    - PH
                                    - PK
                                    - PL
                                    - PM
                                    - PN
                                    - PR
                                    - PS
                                    - PT
                                    - PW
                                    - PY
                                    - QA
                                    - RE
                                    - RO
                                    - RS
                                    - RU
                                    - RW
                                    - SA
                                    - SB
                                    - SC
                                    - SD
                                    - SE
                                    - SG
                                    - SH
                                    - SI
                                    - SJ
                                    - SK
                                    - SL
                                    - SM
                                    - SN
                                    - SO
                                    - SR
                                    - SS
                                    - ST
                                    - SV
                                    - SX
                                    - SY
                                    - SZ
                                    - TC
                                    - TD
                                    - TF
                                    - TG
                                    - TH
                                    - TJ
                                    - TK
                                    - TL
                                    - TM
                                    - TN
                                    - TO
                                    - TR
                                    - TT
                                    - TV
                                    - TW
                                    - TZ
                                    - UA
                                    - UG
                                    - UM
                                    - US
                                    - UY
                                    - UZ
                                    - VA
                                    - VC
                                    - VE
                                    - VG
                                    - VI
                                    - VN
                                    - VU
                                    - WF
                                    - WS
                                    - XK
                                    - YE
                                    - YT
                                    - ZA
                                    - ZM
                                    - ZW
                                state:
                                  description: >-
                                    State, province, county. [ISO 3166 alpha-2
                                    Codes](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2).
                                  type: string
                                  maxLength: 50
                                city:
                                  title: City name
                                  type: string
                                  minLength: 1
                                  maxLength: 85
                              required:
                                - address_line1
                                - postcode
                                - country
                                - city
                          required:
                            - id
                            - user_id
                            - type
                            - check_confirmed_at
                            - issuance_date
                            - data_download_link
                            - document_type
                            - status
                            - confirmed_address
                          additionalProperties: false
                        - title: User Check - Instrument fit
                          type: object
                          description: >-
                            Instrument fit check is completed by the client
                            providing the user's answers to the instrument
                            appropriateness or suitability questionnaire.
                          properties:
                            id:
                              title: User Check unique identifier
                              type: string
                              description: User Check unique identifier.
                              format: uuid
                            user_id:
                              title: User unique identifier.
                              type: string
                              description: User unique identifier.
                              format: uuid
                            type:
                              type: string
                              default: INSTRUMENT_FIT
                              description: The type of check must be INSTRUMENT_FIT.
                            check_confirmed_at:
                              type: string
                              format: date-time
                              description: >-
                                Completion date and time of the instrument fit
                                check.
                            status:
                              type: string
                              description: >-
                                Final status of the instrument fit check.

                                * IN_PROGRESS - Instrument fit check is in
                                progress

                                * PASSED - Instrument fit check passed

                                * FAILED - Instrument fit check failed
                              enum:
                                - IN_PROGRESS
                                - PASSED
                                - FAILED
                            instrument_suitability:
                              type: object
                              properties:
                                suitability:
                                  type: boolean
                                  description: >-
                                    Did the user go through a suitability
                                    assessment and the outcome indicated
                                    suitability.
                              required:
                                - suitability
                          required:
                            - id
                            - user_id
                            - type
                            - check_confirmed_at
                            - status
                            - instrument_suitability
                          additionalProperties: false
                        - title: User Check - Compliance
                          type: object
                          description: Compliance check
                          properties:
                            id:
                              title: User Check unique identifier
                              type: string
                              description: User Check unique identifier.
                              format: uuid
                            user_id:
                              title: User unique identifier.
                              type: string
                              description: User unique identifier.
                              format: uuid
                            type:
                              type: string
                              default: COMPLIANCE
                              description: The type of check must be COMPLIANCE.
                            status:
                              type: string
                              description: |-
                                Final status of the COMPLIANCE check.
                                * IN_PROGRESS - Compliance check is in progress
                                * PASSED - Compliance check passed
                                * FAILED - Compliance check failed
                              enum:
                                - IN_PROGRESS
                                - PASSED
                                - FAILED
                            check_confirmed_at:
                              type: string
                              format: date-time
                              description: >-
                                Completion date and time of the COMPLIANCE
                                check.
                          required:
                            - id
                            - user_id
                            - type
                            - check_confirmed_at
                          additionalProperties: false
                required:
                  - data
                additionalProperties: false
              example:
                data:
                  - id: 008a82d0-c5a4-4410-9318-d34786429c5a
                    user_id: 7b39529a-e68c-4688-8242-7549d10d6084
                    type: KYC
                    check_confirmed_at: '2019-08-24T14:15:22Z'
                    data_download_link: https://bucket.customer.com/ident/user3.zip
                    document_type: ID_CARD
                    document_expiration_date: '2030-01-01'
                    nationality: DE
                    status: PASSED
                    provider: KYC provider
                    method: VIDEO_ID
                    confirmed_address:
                      address_line1: Rosenweg 221
                      address_line2: apt. 33
                      postcode: '45678'
                      city: Berlin
                      state: BE
                      country: DE
                  - id: a680ff52-3a96-4e82-a2ab-12563bbd1a2e
                    user_id: 7b39529a-e68c-4688-8242-7549d10d6084
                    type: INSTRUMENT_FIT
                    check_confirmed_at: '2020-08-24T14:15:22Z'
                    status: PASSED
                    instrument_suitability:
                      suitability: true
                  - id: b633a915-ed3c-43d7-afb5-a550f26ccb0d
                    user_id: 7b39529a-e68c-4688-8242-7549d10d6084
                    type: POR
                    check_confirmed_at: '2020-08-24T14:15:22Z'
                    issuance_date: '2020-01-01'
                    data_download_link: 'https: //bucket.customer.com/por/user3.zip'
                    document_type: UTILITY_BILL
                    status: PASSED
                    confirmed_address:
                      address_line1: Rosenweg 221
                      address_line2: apt. 33
                      postcode: '45678'
                      city: Berlin
                      state: BE
                      country: DE
                  - id: 76aa72aa-3738-4640-bad5-68c1196dc758
                    user_id: 7b39529a-e68c-4688-8242-7549d10d6084
                    type: COMPLIANCE
                    check_confirmed_at: '2020-08-24T14:15:22Z'
                    status: PASSED
        '401':
          description: Unauthorized. The caller has not been authenticated.
          headers:
            upvest-request-id:
              required: true
              schema:
                type: string
                format: uuid
                example: 169ae4c7-ebd7-4041-94da-25369653eba7
          content:
            application/problem+json:
              schema:
                title: Error
                type: object
                description: ''
                properties:
                  type:
                    type: string
                    description: URL to a document describing the error condition.
                  status:
                    type: integer
                    description: >-
                      Transmission of the HTTP status code so that all
                      information can be found in one place, but also to correct
                      changes in the status code due to the use of proxy
                      servers.
                  title:
                    type: string
                    description: >-
                      A short, human-readable title for the general error type;
                      the title should not change for given types.
                  detail:
                    type: string
                    description: A human-readable description of the specific error.
                  instance:
                    type: string
                    description: >-
                      This optional key may be present, with a unique URI for
                      the specific error; this will often point to an error log
                      for that specific response.
                  request_id:
                    type: string
                    description: Correlation ID for the original request.
                required:
                  - type
                  - status
                additionalProperties: false
              example:
                status: 401
                type: unauthorized
        '403':
          description: >-
            Forbidden. The caller has been authenticated but is not allowed to
            take the requested action.
          headers:
            upvest-request-id:
              required: true
              schema:
                type: string
                format: uuid
                example: 169ae4c7-ebd7-4041-94da-25369653eba7
          content:
            application/problem+json:
              schema:
                title: Error
                type: object
                description: ''
                properties:
                  type:
                    type: string
                    description: URL to a document describing the error condition.
                  status:
                    type: integer
                    description: >-
                      Transmission of the HTTP status code so that all
                      information can be found in one place, but also to correct
                      changes in the status code due to the use of proxy
                      servers.
                  title:
                    type: string
                    description: >-
                      A short, human-readable title for the general error type;
                      the title should not change for given types.
                  detail:
                    type: string
                    description: A human-readable description of the specific error.
                  instance:
                    type: string
                    description: >-
                      This optional key may be present, with a unique URI for
                      the specific error; this will often point to an error log
                      for that specific response.
                  request_id:
                    type: string
                    description: Correlation ID for the original request.
                required:
                  - type
                  - status
                additionalProperties: false
              example:
                status: 403
                type: forbidden
        '404':
          description: Not Found. The requested resource could not be found.
          headers:
            upvest-request-id:
              required: true
              schema:
                type: string
                format: uuid
                example: 169ae4c7-ebd7-4041-94da-25369653eba7
          content:
            application/problem+json:
              schema:
                title: Error
                type: object
                description: ''
                properties:
                  type:
                    type: string
                    description: URL to a document describing the error condition.
                  status:
                    type: integer
                    description: >-
                      Transmission of the HTTP status code so that all
                      information can be found in one place, but also to correct
                      changes in the status code due to the use of proxy
                      servers.
                  title:
                    type: string
                    description: >-
                      A short, human-readable title for the general error type;
                      the title should not change for given types.
                  detail:
                    type: string
                    description: A human-readable description of the specific error.
                  instance:
                    type: string
                    description: >-
                      This optional key may be present, with a unique URI for
                      the specific error; this will often point to an error log
                      for that specific response.
                  request_id:
                    type: string
                    description: Correlation ID for the original request.
                required:
                  - type
                  - status
                additionalProperties: false
              example:
                status: 404
                type: not_found
        '406':
          description: >-
            Not Acceptable. The resource does not have a current representation
            that would be acceptable to the user agent. "Accept" header defined
            unsupported value.
          headers:
            upvest-request-id:
              required: true
              schema:
                type: string
                format: uuid
                example: 169ae4c7-ebd7-4041-94da-25369653eba7
          content:
            application/problem+json:
              schema:
                title: Error
                type: object
                description: ''
                properties:
                  type:
                    type: string
                    description: URL to a document describing the error condition.
                  status:
                    type: integer
                    description: >-
                      Transmission of the HTTP status code so that all
                      information can be found in one place, but also to correct
                      changes in the status code due to the use of proxy
                      servers.
                  title:
                    type: string
                    description: >-
                      A short, human-readable title for the general error type;
                      the title should not change for given types.
                  detail:
                    type: string
                    description: A human-readable description of the specific error.
                  instance:
                    type: string
                    description: >-
                      This optional key may be present, with a unique URI for
                      the specific error; this will often point to an error log
                      for that specific response.
                  request_id:
                    type: string
                    description: Correlation ID for the original request.
                required:
                  - type
                  - status
                additionalProperties: false
              example:
                status: 406
                type: not_acceptable
        '429':
          description: >-
            Too Many Requests. The caller has exceeded their quota for the time
            period and has been throttled.
          headers:
            upvest-request-id:
              required: true
              schema:
                type: string
                format: uuid
                example: 169ae4c7-ebd7-4041-94da-25369653eba7
          content:
            application/problem+json:
              schema:
                title: Error
                type: object
                description: ''
                properties:
                  type:
                    type: string
                    description: URL to a document describing the error condition.
                  status:
                    type: integer
                    description: >-
                      Transmission of the HTTP status code so that all
                      information can be found in one place, but also to correct
                      changes in the status code due to the use of proxy
                      servers.
                  title:
                    type: string
                    description: >-
                      A short, human-readable title for the general error type;
                      the title should not change for given types.
                  detail:
                    type: string
                    description: A human-readable description of the specific error.
                  instance:
                    type: string
                    description: >-
                      This optional key may be present, with a unique URI for
                      the specific error; this will often point to an error log
                      for that specific response.
                  request_id:
                    type: string
                    description: Correlation ID for the original request.
                required:
                  - type
                  - status
                additionalProperties: false
              example:
                status: 429
                type: too_many_requests
        '500':
          description: Internal Server Error. The service encountered an unexpected error.
          headers:
            upvest-request-id:
              required: true
              schema:
                type: string
                format: uuid
                example: 169ae4c7-ebd7-4041-94da-25369653eba7
          content:
            application/problem+json:
              schema:
                title: Error
                type: object
                description: ''
                properties:
                  type:
                    type: string
                    description: URL to a document describing the error condition.
                  status:
                    type: integer
                    description: >-
                      Transmission of the HTTP status code so that all
                      information can be found in one place, but also to correct
                      changes in the status code due to the use of proxy
                      servers.
                  title:
                    type: string
                    description: >-
                      A short, human-readable title for the general error type;
                      the title should not change for given types.
                  detail:
                    type: string
                    description: A human-readable description of the specific error.
                  instance:
                    type: string
                    description: >-
                      This optional key may be present, with a unique URI for
                      the specific error; this will often point to an error log
                      for that specific response.
                  request_id:
                    type: string
                    description: Correlation ID for the original request.
                required:
                  - type
                  - status
                additionalProperties: false
              example:
                status: 500
                type: internal_server_error
        '503':
          description: >-
            Service Unavailable. The service handling for this request cannot be
            reached at this time.
          headers:
            upvest-request-id:
              required: true
              schema:
                type: string
                format: uuid
                example: 169ae4c7-ebd7-4041-94da-25369653eba7
          content:
            application/problem+json:
              schema:
                title: Error
                type: object
                description: ''
                properties:
                  type:
                    type: string
                    description: URL to a document describing the error condition.
                  status:
                    type: integer
                    description: >-
                      Transmission of the HTTP status code so that all
                      information can be found in one place, but also to correct
                      changes in the status code due to the use of proxy
                      servers.
                  title:
                    type: string
                    description: >-
                      A short, human-readable title for the general error type;
                      the title should not change for given types.
                  detail:
                    type: string
                    description: A human-readable description of the specific error.
                  instance:
                    type: string
                    description: >-
                      This optional key may be present, with a unique URI for
                      the specific error; this will often point to an error log
                      for that specific response.
                  request_id:
                    type: string
                    description: Correlation ID for the original request.
                required:
                  - type
                  - status
                additionalProperties: false
              example:
                status: 503
                type: method_not_allowed
        '504':
          description: >-
            Gateway Timeout. The service gateway has reached its internal
            timeout.
          headers:
            upvest-request-id:
              required: true
              schema:
                type: string
                format: uuid
                example: 169ae4c7-ebd7-4041-94da-25369653eba7
          content:
            application/problem+json:
              schema:
                title: Error
                type: object
                description: ''
                properties:
                  type:
                    type: string
                    description: URL to a document describing the error condition.
                  status:
                    type: integer
                    description: >-
                      Transmission of the HTTP status code so that all
                      information can be found in one place, but also to correct
                      changes in the status code due to the use of proxy
                      servers.
                  title:
                    type: string
                    description: >-
                      A short, human-readable title for the general error type;
                      the title should not change for given types.
                  detail:
                    type: string
                    description: A human-readable description of the specific error.
                  instance:
                    type: string
                    description: >-
                      This optional key may be present, with a unique URI for
                      the specific error; this will often point to an error log
                      for that specific response.
                  request_id:
                    type: string
                    description: Correlation ID for the original request.
                required:
                  - type
                  - status
                additionalProperties: false
              example:
                status: 504
                type: gateway_timeout
    post:
      operationId: create_user_check
      summary: Create a new check for a user
      description: Creates a new check for a user specified by ID.
      tags:
        - User Checks
      security:
        - oauth-client-credentials:
            - checks:admin
      requestBody:
        content:
          application/json:
            schema:
              title: User Check - Create - Request
              oneOf:
                - title: User Check - Know your customer - Create - Request
                  type: object
                  description: >-
                    The KYC (Know your customer) check is completed by the
                    client sharing the valid and relevant KYC data for the user.
                  properties:
                    type:
                      type: string
                      default: KYC
                      description: The type of check must be “KYC”.
                    check_confirmed_at:
                      type: string
                      format: date-time
                      description: >-
                        Completion date and time of the KYC check. Must not be
                        older than 24 months.
                    data_download_link:
                      type: string
                      format: url
                      maxLength: 1000
                      description: >-
                        Download URL for the KYC evidence file. The file size
                        must not exceed 250 MB.
                    document_type:
                      type: string
                      description: >
                        The type of document used in the KYC process.

                        * PASSPORT - Passport

                        * ID_CARD - National Identification document

                        * RESIDENCE_PERMIT - Residence Permit

                        * DRIVING_LICENSE - Driving License

                        * TWO_PLUS_TWO_VERIFICATION_PROOF - Two plus two
                        verification proof (for GB residence users only)
                      enum:
                        - PASSPORT
                        - ID_CARD
                        - RESIDENCE_PERMIT
                        - DRIVING_LICENSE
                        - TWO_PLUS_TWO_VERIFICATION_PROOF
                    document_expiration_date:
                      type: string
                      format: date
                      description: >
                        Expiration date of the document used in KYC process in
                        YYYY-MM-DD format.


                        **The field is required for the following document
                        types:**

                        * PASSPORT

                        * ID_CARD

                        * RESIDENCE_PERMIT

                        * DRIVING_LICENSE
                    nationality:
                      type: string
                      pattern: ^[A-Z]{2}$
                      description: >
                        Issuing country of the document used in the KYC process.
                        [ISO 3166 alpha-2
                        codes](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2).


                        **The field is required for the following document
                        types:**

                        * PASSPORT

                        * ID_CARD

                        * RESIDENCE_PERMIT

                        * DRIVING_LICENSE
                    provider:
                      type: string
                      maxLength: 100
                      description: Provider that was used to perform the KYC check.
                    method:
                      type: string
                      description: >-
                        Method used for AML-compliant KYC process

                        * VIDEO_ID - Video identification

                        * IN_PERSON_ID - In-person identification at the post
                        office or the client's outlet

                        * ELECTRONIC_ID - Advanced electronic identification
                        methods (namely German eID)

                        * LIVENESS_PHOTO_ID - Photos and security features of
                        the identification document in combination with a
                        video-based liveness check (residence country must not
                        be Germany in this case)

                        * QUALIFIED_ELECTRONIC_SIGNATURE_WITH_TX - Qualified
                        electronic signature accompanied by a bank transaction
                        for verification

                        * TWO_PLUS_TWO_VERIFICATION - A method of verifying
                        identity by matching at least two personal details from
                        two separate sources (for GB residence users only)
                      enum:
                        - VIDEO_ID
                        - IN_PERSON_ID
                        - ELECTRONIC_ID
                        - LIVENESS_PHOTO_ID
                        - QUALIFIED_ELECTRONIC_SIGNATURE_WITH_TX
                        - TWO_PLUS_TWO_VERIFICATION
                    confirmed_address:
                      title: Address
                      type: object
                      description: Address. Must not be a P.O. box or c/o address.
                      properties:
                        address_line1:
                          type: string
                          description: First address line of the address.
                          maxLength: 100
                        address_line2:
                          type: string
                          description: Second address line of the address.
                          maxLength: 100
                        postcode:
                          title: Postal code
                          type: string
                          description: Postal code (postcode, PIN or ZIP code)
                          pattern: ^[a-zA-Z0-9][a-zA-Z0-9\s\-]{0,8}[a-zA-Z0-9]?$
                        country:
                          description: >-
                            Accepted country code. [ISO 3166-1 alpha-2
                            codes](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2).
                          type: string
                          enum:
                            - AD
                            - AE
                            - AF
                            - AG
                            - AI
                            - AL
                            - AM
                            - AO
                            - AQ
                            - AR
                            - AS
                            - AT
                            - AU
                            - AW
                            - AX
                            - AZ
                            - BA
                            - BB
                            - BD
                            - BE
                            - BF
                            - BG
                            - BH
                            - BI
                            - BJ
                            - BL
                            - BM
                            - BN
                            - BO
                            - BQ
                            - BR
                            - BS
                            - BT
                            - BV
                            - BW
                            - BY
                            - BZ
                            - CA
                            - CC
                            - CD
                            - CF
                            - CG
                            - CH
                            - CI
                            - CK
                            - CL
                            - CM
                            - CN
                            - CO
                            - CR
                            - CU
                            - CV
                            - CW
                            - CX
                            - CY
                            - CZ
                            - DE
                            - DJ
                            - DK
                            - DM
                            - DO
                            - DZ
                            - EC
                            - EE
                            - EG
                            - EH
                            - ER
                            - ES
                            - ET
                            - FI
                            - FJ
                            - FK
                            - FM
                            - FO
                            - FR
                            - GA
                            - GB
                            - GD
                            - GE
                            - GF
                            - GG
                            - GH
                            - GI
                            - GL
                            - GM
                            - GN
                            - GP
                            - GQ
                            - GR
                            - GS
                            - GT
                            - GU
                            - GW
                            - GY
                            - HK
                            - HM
                            - HN
                            - HR
                            - HT
                            - HU
                            - ID
                            - IE
                            - IL
                            - IM
                            - IN
                            - IO
                            - IQ
                            - IR
                            - IS
                            - IT
                            - JE
                            - JM
                            - JO
                            - JP
                            - KE
                            - KG
                            - KH
                            - KI
                            - KM
                            - KN
                            - KP
                            - KR
                            - KW
                            - KY
                            - KZ
                            - LA
                            - LB
                            - LC
                            - LI
                            - LK
                            - LR
                            - LS
                            - LT
                            - LU
                            - LV
                            - LY
                            - MA
                            - MC
                            - MD
                            - ME
                            - MF
                            - MG
                            - MH
                            - MK
                            - ML
                            - MM
                            - MN
                            - MO
                            - MP
                            - MQ
                            - MR
                            - MS
                            - MT
                            - MU
                            - MV
                            - MW
                            - MX
                            - MY
                            - MZ
                            - NA
                            - NC
                            - NE
                            - NF
                            - NG
                            - NI
                            - NL
                            - 'NO'
                            - NP
                            - NR
                            - NU
                            - NZ
                            - OM
                            - PA
                            - PE
                            - PF
                            - PG
                            - PH
                            - PK
                            - PL
                            - PM
                            - PN
                            - PR
                            - PS
                            - PT
                            - PW
                            - PY
                            - QA
                            - RE
                            - RO
                            - RS
                            - RU
                            - RW
                            - SA
                            - SB
                            - SC
                            - SD
                            - SE
                            - SG
                            - SH
                            - SI
                            - SJ
                            - SK
                            - SL
                            - SM
                            - SN
                            - SO
                            - SR
                            - SS
                            - ST
                            - SV
                            - SX
                            - SY
                            - SZ
                            - TC
                            - TD
                            - TF
                            - TG
                            - TH
                            - TJ
                            - TK
                            - TL
                            - TM
                            - TN
                            - TO
                            - TR
                            - TT
                            - TV
                            - TW
                            - TZ
                            - UA
                            - UG
                            - UM
                            - US
                            - UY
                            - UZ
                            - VA
                            - VC
                            - VE
                            - VG
                            - VI
                            - VN
                            - VU
                            - WF
                            - WS
                            - XK
                            - YE
                            - YT
                            - ZA
                            - ZM
                            - ZW
                        state:
                          description: >-
                            State, province, county. [ISO 3166 alpha-2
                            Codes](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2).
                          type: string
                          maxLength: 50
                        city:
                          title: City name
                          type: string
                          minLength: 1
                          maxLength: 85
                      required:
                        - address_line1
                        - postcode
                        - country
                        - city
                    kyc_update:
                      type: boolean
                      description: >-
                        Marks this check as a KYC refresh/update as opposed to
                        an initial record.
                  required:
                    - type
                    - check_confirmed_at
                    - data_download_link
                    - document_type
                    - provider
                    - method
                  additionalProperties: false
                - title: User Check - Proof of Residency - Create - Request
                  type: object
                  description: >-
                    The PoR (Proof of residency) check is completed by the
                    client sharing a valid PoR document, if not fulfilled by the
                    KYC check.
                  properties:
                    type:
                      type: string
                      default: POR
                      description: The type of check must be POR.
                    check_confirmed_at:
                      type: string
                      format: date-time
                      description: Completion date and time of the PoR check.
                    issuance_date:
                      type: string
                      format: date
                      description: Issuance date in YYYY-MM-DD format.
                    data_download_link:
                      type: string
                      format: url
                      maxLength: 1000
                      description: >-
                        Download URL for the PoR evidence file. The file size
                        must not exceed 250 MB.
                    document_type:
                      type: string
                      description: >-
                        The type of document used in the PoR process. Maximum
                        age of the document is 12 months (stated on the
                        document) applicable for: Utility bills (water, gas,
                        electricity), Telephone bills (only landline), Internet
                        bills, Bank account statements. Documents that need to
                        be still valid - Registration certificate (issued within
                        the past 5 years), Residence permit e.g. Blue Card (as
                        long as valid), ID Card that contains the registration
                        address.

                        * UTILITY_BILL - 

                        * TELEPHONE_BILL - 

                        * INTERNET_BILL - 

                        * BANK_STATEMENT - 

                        * REGISTRATION_CERT - 

                        * RESIDENCE_PERMIT - 

                        * ID_CARD - 
                      enum:
                        - UTILITY_BILL
                        - TELEPHONE_BILL
                        - INTERNET_BILL
                        - BANK_STATEMENT
                        - REGISTRATION_CERT
                        - RESIDENCE_PERMIT
                        - ID_CARD
                    confirmed_address:
                      title: Address
                      type: object
                      description: Address. Must not be a P.O. box or c/o address.
                      properties:
                        address_line1:
                          type: string
                          description: First address line of the address.
                          maxLength: 100
                        address_line2:
                          type: string
                          description: Second address line of the address.
                          maxLength: 100
                        postcode:
                          title: Postal code
                          type: string
                          description: Postal code (postcode, PIN or ZIP code)
                          pattern: ^[a-zA-Z0-9][a-zA-Z0-9\s\-]{0,8}[a-zA-Z0-9]?$
                        country:
                          description: >-
                            Accepted country code. [ISO 3166-1 alpha-2
                            codes](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2).
                          type: string
                          enum:
                            - AD
                            - AE
                            - AF
                            - AG
                            - AI
                            - AL
                            - AM
                            - AO
                            - AQ
                            - AR
                            - AS
                            - AT
                            - AU
                            - AW
                            - AX
                            - AZ
                            - BA
                            - BB
                            - BD
                            - BE
                            - BF
                            - BG
                            - BH
                            - BI
                            - BJ
                            - BL
                            - BM
                            - BN
                            - BO
                            - BQ
                            - BR
                            - BS
                            - BT
                            - BV
                            - BW
                            - BY
                            - BZ
                            - CA
                            - CC
                            - CD
                            - CF
                            - CG
                            - CH
                            - CI
                            - CK
                            - CL
                            - CM
                            - CN
                            - CO
                            - CR
                            - CU
                            - CV
                            - CW
                            - CX
                            - CY
                            - CZ
                            - DE
                            - DJ
                            - DK
                            - DM
                            - DO
                            - DZ
                            - EC
                            - EE
                            - EG
                            - EH
                            - ER
                            - ES
                            - ET
                            - FI
                            - FJ
                            - FK
                            - FM
                            - FO
                            - FR
                            - GA
                            - GB
                            - GD
                            - GE
                            - GF
                            - GG
                            - GH
                            - GI
                            - GL
                            - GM
                            - GN
                            - GP
                            - GQ
                            - GR
                            - GS
                            - GT
                            - GU
                            - GW
                            - GY
                            - HK
                            - HM
                            - HN
                            - HR
                            - HT
                            - HU
                            - ID
                            - IE
                            - IL
                            - IM
                            - IN
                            - IO
                            - IQ
                            - IR
                            - IS
                            - IT
                            - JE
                            - JM
                            - JO
                            - JP
                            - KE
                            - KG
                            - KH
                            - KI
                            - KM
                            - KN
                            - KP
                            - KR
                            - KW
                            - KY
                            - KZ
                            - LA
                            - LB
                            - LC
                            - LI
                            - LK
                            - LR
                            - LS
                            - LT
                            - LU
                            - LV
                            - LY
                            - MA
                            - MC
                            - MD
                            - ME
                            - MF
                            - MG
                            - MH
                            - MK
                            - ML
                            - MM
                            - MN
                            - MO
                            - MP
                            - MQ
                            - MR
                            - MS
                            - MT
                            - MU
                            - MV
                            - MW
                            - MX
                            - MY
                            - MZ
                            - NA
                            - NC
                            - NE
                            - NF
                            - NG
                            - NI
                            - NL
                            - 'NO'
                            - NP
                            - NR
                            - NU
                            - NZ
                            - OM
                            - PA
                            - PE
                            - PF
                            - PG
                            - PH
                            - PK
                            - PL
                            - PM
                            - PN
                            - PR
                            - PS
                            - PT
                            - PW
                            - PY
                            - QA
                            - RE
                            - RO
                            - RS
                            - RU
                            - RW
                            - SA
                            - SB
                            - SC
                            - SD
                            - SE
                            - SG
                            - SH
                            - SI
                            - SJ
                            - SK
                            - SL
                            - SM
                            - SN
                            - SO
                            - SR
                            - SS
                            - ST
                            - SV
                            - SX
                            - SY
                            - SZ
                            - TC
                            - TD
                            - TF
                            - TG
                            - TH
                            - TJ
                            - TK
                            - TL
                            - TM
                            - TN
                            - TO
                            - TR
                            - TT
                            - TV
                            - TW
                            - TZ
                            - UA
                            - UG
                            - UM
                            - US
                            - UY
                            - UZ
                            - VA
                            - VC
                            - VE
                            - VG
                            - VI
                            - VN
                            - VU
                            - WF
                            - WS
                            - XK
                            - YE
                            - YT
                            - ZA
                            - ZM
                            - ZW
                        state:
                          description: >-
                            State, province, county. [ISO 3166 alpha-2
                            Codes](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2).
                          type: string
                          maxLength: 50
                        city:
                          title: City name
                          type: string
                          minLength: 1
                          maxLength: 85
                      required:
                        - address_line1
                        - postcode
                        - country
                        - city
                  required:
                    - type
                    - check_confirmed_at
                    - issuance_date
                    - data_download_link
                    - document_type
                    - confirmed_address
                  additionalProperties: false
                - title: User Check - Instrument fit - Create - Request
                  type: object
                  description: >-
                    Instrument fit check is completed by the client providing
                    the user's answers to the instrument appropriateness or
                    suitability questionnaire.
                  properties:
                    type:
                      type: string
                      default: INSTRUMENT_FIT
                      description: The type of check must be INSTRUMENT_FIT.
                    check_confirmed_at:
                      type: string
                      format: date-time
                      description: Completion date and time of the instrument fit check.
                    instrument_suitability:
                      type: object
                      properties:
                        suitability:
                          type: boolean
                          description: >-
                            Did the user go through a suitability assessment and
                            the outcome indicated suitability.
                      required:
                        - suitability
                  required:
                    - type
                    - check_confirmed_at
                    - instrument_suitability
                  additionalProperties: false
            examples:
              KYC:
                summary: KYC check
                value:
                  type: KYC
                  check_confirmed_at: '2019-08-24T14:15:22Z'
                  data_download_link: https://bucket.customer.com/ident/user3.zip
                  document_type: ID_CARD
                  document_expiration_date: '2030-01-01'
                  nationality: DE
                  provider: KYC provider
                  method: VIDEO_ID
                  confirmed_address:
                    address_line1: Rosenweg 221
                    address_line2: apt. 33
                    postcode: '45678'
                    city: Berlin
                    state: BE
                    country: DE
              INSTRUMENT_FIT:
                summary: Instrument fit check
                value:
                  type: INSTRUMENT_FIT
                  check_confirmed_at: '2020-08-24T14:15:22Z'
                  instrument_suitability:
                    suitability: true
              POR:
                summary: PoR check
                value:
                  type: POR
                  check_confirmed_at: '2020-08-24T14:15:22Z'
                  issuance_date: '2020-01-01'
                  data_download_link: https://bucket.customer.com/por/user3.zip
                  document_type: UTILITY_BILL
                  confirmed_address:
                    address_line1: Rosenweg 221
                    address_line2: apt. 33
                    postcode: '45678'
                    city: Berlin
                    state: BE
                    country: DE
      responses:
        '202':
          description: The request has been successfully accepted.
          headers:
            upvest-request-id:
              required: true
              schema:
                type: string
                format: uuid
                example: 169ae4c7-ebd7-4041-94da-25369653eba7
          content:
            application/json:
              schema:
                title: User Check - Create - Response
                type: object
                properties:
                  id:
                    title: User Check unique identifier
                    type: string
                    description: User Check unique identifier.
                    format: uuid
                required:
                  - id
                additionalProperties: false
              example:
                id: e13e9d81-7f43-492d-a02a-440edced389a
        '400':
          description: Bad Request. The incoming request had a malformed parameter/object.
          headers:
            upvest-request-id:
              required: true
              schema:
                type: string
                format: uuid
                example: 169ae4c7-ebd7-4041-94da-25369653eba7
          content:
            application/problem+json:
              schema:
                title: Error
                type: object
                description: ''
                properties:
                  type:
                    type: string
                    description: URL to a document describing the error condition.
                  status:
                    type: integer
                    description: >-
                      Transmission of the HTTP status code so that all
                      information can be found in one place, but also to correct
                      changes in the status code due to the use of proxy
                      servers.
                  title:
                    type: string
                    description: >-
                      A short, human-readable title for the general error type;
                      the title should not change for given types.
                  detail:
                    type: string
                    description: A human-readable description of the specific error.
                  instance:
                    type: string
                    description: >-
                      This optional key may be present, with a unique URI for
                      the specific error; this will often point to an error log
                      for that specific response.
                  request_id:
                    type: string
                    description: Correlation ID for the original request.
                required:
                  - type
                  - status
                additionalProperties: false
              example:
                status: 400
                type: bad_request
        '401':
          description: Unauthorized. The caller has not been authenticated.
          headers:
            upvest-request-id:
              required: true
              schema:
                type: string
                format: uuid
                example: 169ae4c7-ebd7-4041-94da-25369653eba7
          content:
            application/problem+json:
              schema:
                title: Error
                type: object
                description: ''
                properties:
                  type:
                    type: string
                    description: URL to a document describing the error condition.
                  status:
                    type: integer
                    description: >-
                      Transmission of the HTTP status code so that all
                      information can be found in one place, but also to correct
                      changes in the status code due to the use of proxy
                      servers.
                  title:
                    type: string
                    description: >-
                      A short, human-readable title for the general error type;
                      the title should not change for given types.
                  detail:
                    type: string
                    description: A human-readable description of the specific error.
                  instance:
                    type: string
                    description: >-
                      This optional key may be present, with a unique URI for
                      the specific error; this will often point to an error log
                      for that specific response.
                  request_id:
                    type: string
                    description: Correlation ID for the original request.
                required:
                  - type
                  - status
                additionalProperties: false
              example:
                status: 401
                type: unauthorized
        '403':
          description: >-
            Forbidden. The caller has been authenticated but is not allowed to
            take the requested action.
          headers:
            upvest-request-id:
              required: true
              schema:
                type: string
                format: uuid
                example: 169ae4c7-ebd7-4041-94da-25369653eba7
          content:
            application/problem+json:
              schema:
                title: Error
                type: object
                description: ''
                properties:
                  type:
                    type: string
                    description: URL to a document describing the error condition.
                  status:
                    type: integer
                    description: >-
                      Transmission of the HTTP status code so that all
                      information can be found in one place, but also to correct
                      changes in the status code due to the use of proxy
                      servers.
                  title:
                    type: string
                    description: >-
                      A short, human-readable title for the general error type;
                      the title should not change for given types.
                  detail:
                    type: string
                    description: A human-readable description of the specific error.
                  instance:
                    type: string
                    description: >-
                      This optional key may be present, with a unique URI for
                      the specific error; this will often point to an error log
                      for that specific response.
                  request_id:
                    type: string
                    description: Correlation ID for the original request.
                required:
                  - type
                  - status
                additionalProperties: false
              example:
                status: 403
                type: forbidden
        '404':
          description: Not Found. The requested resource could not be found.
          headers:
            upvest-request-id:
              required: true
              schema:
                type: string
                format: uuid
                example: 169ae4c7-ebd7-4041-94da-25369653eba7
          content:
            application/problem+json:
              schema:
                title: Error
                type: object
                description: ''
                properties:
                  type:
                    type: string
                    description: URL to a document describing the error condition.
                  status:
                    type: integer
                    description: >-
                      Transmission of the HTTP status code so that all
                      information can be found in one place, but also to correct
                      changes in the status code due to the use of proxy
                      servers.
                  title:
                    type: string
                    description: >-
                      A short, human-readable title for the general error type;
                      the title should not change for given types.
                  detail:
                    type: string
                    description: A human-readable description of the specific error.
                  instance:
                    type: string
                    description: >-
                      This optional key may be present, with a unique URI for
                      the specific error; this will often point to an error log
                      for that specific response.
                  request_id:
                    type: string
                    description: Correlation ID for the original request.
                required:
                  - type
                  - status
                additionalProperties: false
              example:
                status: 404
                type: not_found
        '406':
          description: >-
            Not Acceptable. The resource does not have a current representation
            that would be acceptable to the user agent. "Accept" header defined
            unsupported value.
          headers:
            upvest-request-id:
              required: true
              schema:
                type: string
                format: uuid
                example: 169ae4c7-ebd7-4041-94da-25369653eba7
          content:
            application/problem+json:
              schema:
                title: Error
                type: object
                description: ''
                properties:
                  type:
                    type: string
                    description: URL to a document describing the error condition.
                  status:
                    type: integer
                    description: >-
                      Transmission of the HTTP status code so that all
                      information can be found in one place, but also to correct
                      changes in the status code due to the use of proxy
                      servers.
                  title:
                    type: string
                    description: >-
                      A short, human-readable title for the general error type;
                      the title should not change for given types.
                  detail:
                    type: string
                    description: A human-readable description of the specific error.
                  instance:
                    type: string
                    description: >-
                      This optional key may be present, with a unique URI for
                      the specific error; this will often point to an error log
                      for that specific response.
                  request_id:
                    type: string
                    description: Correlation ID for the original request.
                required:
                  - type
                  - status
                additionalProperties: false
              example:
                status: 406
                type: not_acceptable
        '429':
          description: >-
            Too Many Requests. The caller has exceeded their quota for the time
            period and has been throttled.
          headers:
            upvest-request-id:
              required: true
              schema:
                type: string
                format: uuid
                example: 169ae4c7-ebd7-4041-94da-25369653eba7
          content:
            application/problem+json:
              schema:
                title: Error
                type: object
                description: ''
                properties:
                  type:
                    type: string
                    description: URL to a document describing the error condition.
                  status:
                    type: integer
                    description: >-
                      Transmission of the HTTP status code so that all
                      information can be found in one place, but also to correct
                      changes in the status code due to the use of proxy
                      servers.
                  title:
                    type: string
                    description: >-
                      A short, human-readable title for the general error type;
                      the title should not change for given types.
                  detail:
                    type: string
                    description: A human-readable description of the specific error.
                  instance:
                    type: string
                    description: >-
                      This optional key may be present, with a unique URI for
                      the specific error; this will often point to an error log
                      for that specific response.
                  request_id:
                    type: string
                    description: Correlation ID for the original request.
                required:
                  - type
                  - status
                additionalProperties: false
              example:
                status: 429
                type: too_many_requests
        '500':
          description: Internal Server Error. The service encountered an unexpected error.
          headers:
            upvest-request-id:
              required: true
              schema:
                type: string
                format: uuid
                example: 169ae4c7-ebd7-4041-94da-25369653eba7
          content:
            application/problem+json:
              schema:
                title: Error
                type: object
                description: ''
                properties:
                  type:
                    type: string
                    description: URL to a document describing the error condition.
                  status:
                    type: integer
                    description: >-
                      Transmission of the HTTP status code so that all
                      information can be found in one place, but also to correct
                      changes in the status code due to the use of proxy
                      servers.
                  title:
                    type: string
                    description: >-
                      A short, human-readable title for the general error type;
                      the title should not change for given types.
                  detail:
                    type: string
                    description: A human-readable description of the specific error.
                  instance:
                    type: string
                    description: >-
                      This optional key may be present, with a unique URI for
                      the specific error; this will often point to an error log
                      for that specific response.
                  request_id:
                    type: string
                    description: Correlation ID for the original request.
                required:
                  - type
                  - status
                additionalProperties: false
              example:
                status: 500
                type: internal_server_error
        '503':
          description: >-
            Service Unavailable. The service handling for this request cannot be
            reached at this time.
          headers:
            upvest-request-id:
              required: true
              schema:
                type: string
                format: uuid
                example: 169ae4c7-ebd7-4041-94da-25369653eba7
          content:
            application/problem+json:
              schema:
                title: Error
                type: object
                description: ''
                properties:
                  type:
                    type: string
                    description: URL to a document describing the error condition.
                  status:
                    type: integer
                    description: >-
                      Transmission of the HTTP status code so that all
                      information can be found in one place, but also to correct
                      changes in the status code due to the use of proxy
                      servers.
                  title:
                    type: string
                    description: >-
                      A short, human-readable title for the general error type;
                      the title should not change for given types.
                  detail:
                    type: string
                    description: A human-readable description of the specific error.
                  instance:
                    type: string
                    description: >-
                      This optional key may be present, with a unique URI for
                      the specific error; this will often point to an error log
                      for that specific response.
                  request_id:
                    type: string
                    description: Correlation ID for the original request.
                required:
                  - type
                  - status
                additionalProperties: false
              example:
                status: 503
                type: method_not_allowed
        '504':
          description: >-
            Gateway Timeout. The service gateway has reached its internal
            timeout.
          headers:
            upvest-request-id:
              required: true
              schema:
                type: string
                format: uuid
                example: 169ae4c7-ebd7-4041-94da-25369653eba7
          content:
            application/problem+json:
              schema:
                title: Error
                type: object
                description: ''
                properties:
                  type:
                    type: string
                    description: URL to a document describing the error condition.
                  status:
                    type: integer
                    description: >-
                      Transmission of the HTTP status code so that all
                      information can be found in one place, but also to correct
                      changes in the status code due to the use of proxy
                      servers.
                  title:
                    type: string
                    description: >-
                      A short, human-readable title for the general error type;
                      the title should not change for given types.
                  detail:
                    type: string
                    description: A human-readable description of the specific error.
                  instance:
                    type: string
                    description: >-
                      This optional key may be present, with a unique URI for
                      the specific error; this will often point to an error log
                      for that specific response.
                  request_id:
                    type: string
                    description: Correlation ID for the original request.
                required:
                  - type
                  - status
                additionalProperties: false
              example:
                status: 504
                type: gateway_timeout
  /users/{user_id}/checks/{check_id}:
    parameters:
      - name: user_id
        in: path
        required: true
        schema:
          title: User unique identifier.
          type: string
          description: User unique identifier.
          format: uuid
      - name: check_id
        in: path
        required: true
        schema:
          title: User Check unique identifier
          type: string
          description: User Check unique identifier.
          format: uuid
      - name: upvest-client-id
        in: header
        description: Tenant Client ID
        required: true
        schema:
          type: string
          format: uuid
          example: ebabcf4d-61c3-4942-875c-e265a7c2d062
      - name: authorization
        in: header
        description: |
          Bearer (access) token from the OAuth flow with correct scopes.
          https://datatracker.ietf.org/doc/html/rfc6750
        required: true
        schema:
          type: string
          pattern: ^Bearer [a-zA-Z0-9\-\._~+/]*=*
          example: Bearer c2VjcmV0Cg==
      - name: signature
        in: header
        required: true
        schema:
          type: string
        description: >-
          https://tools.ietf.org/id/draft-ietf-httpbis-message-signatures-01.html#name-the-signature-http-header
      - name: signature-input
        in: header
        required: true
        schema:
          type: string
        description: >-
          https://tools.ietf.org/id/draft-ietf-httpbis-message-signatures-01.html#name-the-signature-input-http-he
      - name: upvest-api-version
        in: header
        required: false
        schema:
          type: string
          enum:
            - '1'
          default: '1'
          example: '1'
        description: 'Upvest API version (Note: Do not include quotation marks)'
    get:
      operationId: retrieve_user_check
      summary: Get a user check by ID
      description: Retrieves a check for a user specified by its ID.
      tags:
        - User Checks
      security:
        - oauth-client-credentials:
            - checks:read
            - checks:admin
      responses:
        '200':
          description: OK
          headers:
            upvest-request-id:
              required: true
              schema:
                type: string
                format: uuid
                example: 169ae4c7-ebd7-4041-94da-25369653eba7
          content:
            application/json:
              schema:
                title: User Check
                oneOf:
                  - title: User Check - Know your customer
                    type: object
                    description: >-
                      The KYC (Know your customer) check is completed by the
                      client sharing the valid and relevant KYC data for the
                      user.
                    properties:
                      id:
                        title: User Check unique identifier
                        type: string
                        description: User Check unique identifier.
                        format: uuid
                      user_id:
                        title: User unique identifier.
                        type: string
                        description: User unique identifier.
                        format: uuid
                      type:
                        type: string
                        default: KYC
                        description: The type of check must be “KYC”.
                      check_confirmed_at:
                        type: string
                        format: date-time
                        description: >-
                          Completion date and time of the KYC check. Must not be
                          older than 24 months.
                      data_download_link:
                        type: string
                        format: url
                        maxLength: 1000
                        description: >-
                          Download URL for the KYC evidence file. The file size
                          must not exceed 250 MB.
                      document_type:
                        type: string
                        description: >
                          The type of document used in the KYC process.

                          * PASSPORT - Passport

                          * ID_CARD - National Identification document

                          * RESIDENCE_PERMIT - Residence Permit

                          * DRIVING_LICENSE - Driving License

                          * TWO_PLUS_TWO_VERIFICATION_PROOF - Two plus two
                          verification proof (for GB residence users only)
                        enum:
                          - PASSPORT
                          - ID_CARD
                          - RESIDENCE_PERMIT
                          - DRIVING_LICENSE
                          - TWO_PLUS_TWO_VERIFICATION_PROOF
                      document_expiration_date:
                        type: string
                        format: date
                        description: >
                          Expiration date of the document used in KYC process in
                          YYYY-MM-DD format.


                          **The field is required for the following document
                          types:**

                          * PASSPORT

                          * ID_CARD

                          * RESIDENCE_PERMIT

                          * DRIVING_LICENSE
                      nationality:
                        type: string
                        pattern: ^[A-Z]{2}$
                        description: >
                          Issuing country of the document used in the KYC
                          process. [ISO 3166 alpha-2
                          codes](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2).


                          **The field is required for the following document
                          types:**

                          * PASSPORT

                          * ID_CARD

                          * RESIDENCE_PERMIT

                          * DRIVING_LICENSE
                      status:
                        type: string
                        description: |-
                          Final status of the KYC check.
                          * IN_PROGRESS - KYC check is in progress
                          * PASSED - KYC check passed
                          * FAILED - KYC check failed
                        enum:
                          - IN_PROGRESS
                          - PASSED
                          - FAILED
                      provider:
                        type: string
                        maxLength: 100
                        description: Provider that was used to perform the KYC check.
                      method:
                        type: string
                        description: >-
                          Method used for AML-compliant KYC process

                          * VIDEO_ID - Video identification

                          * IN_PERSON_ID - In-person identification at the post
                          office or the client's outlet

                          * ELECTRONIC_ID - Advanced electronic identification
                          methods (namely German eID)

                          * LIVENESS_PHOTO_ID - Photos and security features of
                          the identification document in combination with a
                          video-based liveness check (residence country must not
                          be Germany in this case)

                          * QUALIFIED_ELECTRONIC_SIGNATURE_WITH_TX - Qualified
                          electronic signature accompanied by a bank transaction
                          for verification

                          * TWO_PLUS_TWO_VERIFICATION - A method of verifying
                          identity by matching at least two personal details
                          from two separate sources (for GB residence users
                          only)
                        enum:
                          - VIDEO_ID
                          - IN_PERSON_ID
                          - ELECTRONIC_ID
                          - LIVENESS_PHOTO_ID
                          - QUALIFIED_ELECTRONIC_SIGNATURE_WITH_TX
                          - TWO_PLUS_TWO_VERIFICATION
                      confirmed_address:
                        title: Address
                        type: object
                        description: Address. Must not be a P.O. box or c/o address.
                        properties:
                          address_line1:
                            type: string
                            description: First address line of the address.
                            maxLength: 100
                          address_line2:
                            type: string
                            description: Second address line of the address.
                            maxLength: 100
                          postcode:
                            title: Postal code
                            type: string
                            description: Postal code (postcode, PIN or ZIP code)
                            pattern: ^[a-zA-Z0-9][a-zA-Z0-9\s\-]{0,8}[a-zA-Z0-9]?$
                          country:
                            description: >-
                              Accepted country code. [ISO 3166-1 alpha-2
                              codes](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2).
                            type: string
                            enum:
                              - AD
                              - AE
                              - AF
                              - AG
                              - AI
                              - AL
                              - AM
                              - AO
                              - AQ
                              - AR
                              - AS
                              - AT
                              - AU
                              - AW
                              - AX
                              - AZ
                              - BA
                              - BB
                              - BD
                              - BE
                              - BF
                              - BG
                              - BH
                              - BI
                              - BJ
                              - BL
                              - BM
                              - BN
                              - BO
                              - BQ
                              - BR
                              - BS
                              - BT
                              - BV
                              - BW
                              - BY
                              - BZ
                              - CA
                              - CC
                              - CD
                              - CF
                              - CG
                              - CH
                              - CI
                              - CK
                              - CL
                              - CM
                              - CN
                              - CO
                              - CR
                              - CU
                              - CV
                              - CW
                              - CX
                              - CY
                              - CZ
                              - DE
                              - DJ
                              - DK
                              - DM
                              - DO
                              - DZ
                              - EC
                              - EE
                              - EG
                              - EH
                              - ER
                              - ES
                              - ET
                              - FI
                              - FJ
                              - FK
                              - FM
                              - FO
                              - FR
                              - GA
                              - GB
                              - GD
                              - GE
                              - GF
                              - GG
                              - GH
                              - GI
                              - GL
                              - GM
                              - GN
                              - GP
                              - GQ
                              - GR
                              - GS
                              - GT
                              - GU
                              - GW
                              - GY
                              - HK
                              - HM
                              - HN
                              - HR
                              - HT
                              - HU
                              - ID
                              - IE
                              - IL
                              - IM
                              - IN
                              - IO
                              - IQ
                              - IR
                              - IS
                              - IT
                              - JE
                              - JM
                              - JO
                              - JP
                              - KE
                              - KG
                              - KH
                              - KI
                              - KM
                              - KN
                              - KP
                              - KR
                              - KW
                              - KY
                              - KZ
                              - LA
                              - LB
                              - LC
                              - LI
                              - LK
                              - LR
                              - LS
                              - LT
                              - LU
                              - LV
                              - LY
                              - MA
                              - MC
                              - MD
                              - ME
                              - MF
                              - MG
                              - MH
                              - MK
                              - ML
                              - MM
                              - MN
                              - MO
                              - MP
                              - MQ
                              - MR
                              - MS
                              - MT
                              - MU
                              - MV
                              - MW
                              - MX
                              - MY
                              - MZ
                              - NA
                              - NC
                              - NE
                              - NF
                              - NG
                              - NI
                              - NL
                              - 'NO'
                              - NP
                              - NR
                              - NU
                              - NZ
                              - OM
                              - PA
                              - PE
                              - PF
                              - PG
                              - PH
                              - PK
                              - PL
                              - PM
                              - PN
                              - PR
                              - PS
                              - PT
                              - PW
                              - PY
                              - QA
                              - RE
                              - RO
                              - RS
                              - RU
                              - RW
                              - SA
                              - SB
                              - SC
                              - SD
                              - SE
                              - SG
                              - SH
                              - SI
                              - SJ
                              - SK
                              - SL
                              - SM
                              - SN
                              - SO
                              - SR
                              - SS
                              - ST
                              - SV
                              - SX
                              - SY
                              - SZ
                              - TC
                              - TD
                              - TF
                              - TG
                              - TH
                              - TJ
                              - TK
                              - TL
                              - TM
                              - TN
                              - TO
                              - TR
                              - TT
                              - TV
                              - TW
                              - TZ
                              - UA
                              - UG
                              - UM
                              - US
                              - UY
                              - UZ
                              - VA
                              - VC
                              - VE
                              - VG
                              - VI
                              - VN
                              - VU
                              - WF
                              - WS
                              - XK
                              - YE
                              - YT
                              - ZA
                              - ZM
                              - ZW
                          state:
                            description: >-
                              State, province, county. [ISO 3166 alpha-2
                              Codes](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2).
                            type: string
                            maxLength: 50
                          city:
                            title: City name
                            type: string
                            minLength: 1
                            maxLength: 85
                        required:
                          - address_line1
                          - postcode
                          - country
                          - city
                      kyc_update:
                        type: boolean
                        description: >-
                          Marks this check as a KYC refresh/update as opposed to
                          an initial record.
                    required:
                      - id
                      - user_id
                      - type
                      - check_confirmed_at
                      - data_download_link
                      - document_type
                      - status
                      - provider
                      - method
                    additionalProperties: false
                  - title: User Check - Proof of Residency
                    type: object
                    description: >-
                      The PoR (Proof of residency) check is completed by the
                      client sharing a valid PoR document, if not fulfilled by
                      the KYC check.
                    properties:
                      id:
                        title: User Check unique identifier
                        type: string
                        description: User Check unique identifier.
                        format: uuid
                      user_id:
                        title: User unique identifier.
                        type: string
                        description: User unique identifier.
                        format: uuid
                      type:
                        type: string
                        default: POR
                        description: The type of check must be POR.
                      check_confirmed_at:
                        type: string
                        format: date-time
                        description: Completion date and time of the PoR check.
                      issuance_date:
                        type: string
                        format: date
                        description: Issuance date in YYYY-MM-DD format.
                      data_download_link:
                        type: string
                        format: url
                        maxLength: 1000
                        description: >-
                          Download URL for the PoR evidence file. The file size
                          must not exceed 250 MB.
                      document_type:
                        type: string
                        description: >-
                          The type of document used in the PoR process. Maximum
                          age of the document is 12 months (stated on the
                          document) applicable for: Utility bills (water, gas,
                          electricity), Telephone bills (only landline),
                          Internet bills, Bank account statements. Documents
                          that need to be still valid - Registration certificate
                          (issued within the past 5 years), Residence permit
                          e.g. Blue Card (as long as valid), ID Card that
                          contains the registration address.

                          * UTILITY_BILL - 

                          * TELEPHONE_BILL - 

                          * INTERNET_BILL - 

                          * BANK_STATEMENT - 

                          * REGISTRATION_CERT - 

                          * RESIDENCE_PERMIT - 

                          * ID_CARD - 

                          * PASSPORT - 
                        enum:
                          - UTILITY_BILL
                          - TELEPHONE_BILL
                          - INTERNET_BILL
                          - BANK_STATEMENT
                          - REGISTRATION_CERT
                          - RESIDENCE_PERMIT
                          - ID_CARD
                          - PASSPORT
                      status:
                        type: string
                        description: |-
                          Final status of the PoR check.
                          * IN_PROGRESS - 
                          * PASSED - 
                          * FAILED - 
                        enum:
                          - IN_PROGRESS
                          - PASSED
                          - FAILED
                      confirmed_address:
                        title: Address
                        type: object
                        description: Address. Must not be a P.O. box or c/o address.
                        properties:
                          address_line1:
                            type: string
                            description: First address line of the address.
                            maxLength: 100
                          address_line2:
                            type: string
                            description: Second address line of the address.
                            maxLength: 100
                          postcode:
                            title: Postal code
                            type: string
                            description: Postal code (postcode, PIN or ZIP code)
                            pattern: ^[a-zA-Z0-9][a-zA-Z0-9\s\-]{0,8}[a-zA-Z0-9]?$
                          country:
                            description: >-
                              Accepted country code. [ISO 3166-1 alpha-2
                              codes](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2).
                            type: string
                            enum:
                              - AD
                              - AE
                              - AF
                              - AG
                              - AI
                              - AL
                              - AM
                              - AO
                              - AQ
                              - AR
                              - AS
                              - AT
                              - AU
                              - AW
                              - AX
                              - AZ
                              - BA
                              - BB
                              - BD
                              - BE
                              - BF
                              - BG
                              - BH
                              - BI
                              - BJ
                              - BL
                              - BM
                              - BN
                              - BO
                              - BQ
                              - BR
                              - BS
                              - BT
                              - BV
                              - BW
                              - BY
                              - BZ
                              - CA
                              - CC
                              - CD
                              - CF
                              - CG
                              - CH
                              - CI
                              - CK
                              - CL
                              - CM
                              - CN
                              - CO
                              - CR
                              - CU
                              - CV
                              - CW
                              - CX
                              - CY
                              - CZ
                              - DE
                              - DJ
                              - DK
                              - DM
                              - DO
                              - DZ
                              - EC
                              - EE
                              - EG
                              - EH
                              - ER
                              - ES
                              - ET
                              - FI
                              - FJ
                              - FK
                              - FM
                              - FO
                              - FR
                              - GA
                              - GB
                              - GD
                              - GE
                              - GF
                              - GG
                              - GH
                              - GI
                              - GL
                              - GM
                              - GN
                              - GP
                              - GQ
                              - GR
                              - GS
                              - GT
                              - GU
                              - GW
                              - GY
                              - HK
                              - HM
                              - HN
                              - HR
                              - HT
                              - HU
                              - ID
                              - IE
                              - IL
                              - IM
                              - IN
                              - IO
                              - IQ
                              - IR
                              - IS
                              - IT
                              - JE
                              - JM
                              - JO
                              - JP
                              - KE
                              - KG
                              - KH
                              - KI
                              - KM
                              - KN
                              - KP
                              - KR
                              - KW
                              - KY
                              - KZ
                              - LA
                              - LB
                              - LC
                              - LI
                              - LK
                              - LR
                              - LS
                              - LT
                              - LU
                              - LV
                              - LY
                              - MA
                              - MC
                              - MD
                              - ME
                              - MF
                              - MG
                              - MH
                              - MK
                              - ML
                              - MM
                              - MN
                              - MO
                              - MP
                              - MQ
                              - MR
                              - MS
                              - MT
                              - MU
                              - MV
                              - MW
                              - MX
                              - MY
                              - MZ
                              - NA
                              - NC
                              - NE
                              - NF
                              - NG
                              - NI
                              - NL
                              - 'NO'
                              - NP
                              - NR
                              - NU
                              - NZ
                              - OM
                              - PA
                              - PE
                              - PF
                              - PG
                              - PH
                              - PK
                              - PL
                              - PM
                              - PN
                              - PR
                              - PS
                              - PT
                              - PW
                              - PY
                              - QA
                              - RE
                              - RO
                              - RS
                              - RU
                              - RW
                              - SA
                              - SB
                              - SC
                              - SD
                              - SE
                              - SG
                              - SH
                              - SI
                              - SJ
                              - SK
                              - SL
                              - SM
                              - SN
                              - SO
                              - SR
                              - SS
                              - ST
                              - SV
                              - SX
                              - SY
                              - SZ
                              - TC
                              - TD
                              - TF
                              - TG
                              - TH
                              - TJ
                              - TK
                              - TL
                              - TM
                              - TN
                              - TO
                              - TR
                              - TT
                              - TV
                              - TW
                              - TZ
                              - UA
                              - UG
                              - UM
                              - US
                              - UY
                              - UZ
                              - VA
                              - VC
                              - VE
                              - VG
                              - VI
                              - VN
                              - VU
                              - WF
                              - WS
                              - XK
                              - YE
                              - YT
                              - ZA
                              - ZM
                              - ZW
                          state:
                            description: >-
                              State, province, county. [ISO 3166 alpha-2
                              Codes](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2).
                            type: string
                            maxLength: 50
                          city:
                            title: City name
                            type: string
                            minLength: 1
                            maxLength: 85
                        required:
                          - address_line1
                          - postcode
                          - country
                          - city
                    required:
                      - id
                      - user_id
                      - type
                      - check_confirmed_at
                      - issuance_date
                      - data_download_link
                      - document_type
                      - status
                      - confirmed_address
                    additionalProperties: false
                  - title: User Check - Instrument fit
                    type: object
                    description: >-
                      Instrument fit check is completed by the client providing
                      the user's answers to the instrument appropriateness or
                      suitability questionnaire.
                    properties:
                      id:
                        title: User Check unique identifier
                        type: string
                        description: User Check unique identifier.
                        format: uuid
                      user_id:
                        title: User unique identifier.
                        type: string
                        description: User unique identifier.
                        format: uuid
                      type:
                        type: string
                        default: INSTRUMENT_FIT
                        description: The type of check must be INSTRUMENT_FIT.
                      check_confirmed_at:
                        type: string
                        format: date-time
                        description: Completion date and time of the instrument fit check.
                      status:
                        type: string
                        description: |-
                          Final status of the instrument fit check.
                          * IN_PROGRESS - Instrument fit check is in progress
                          * PASSED - Instrument fit check passed
                          * FAILED - Instrument fit check failed
                        enum:
                          - IN_PROGRESS
                          - PASSED
                          - FAILED
                      instrument_suitability:
                        type: object
                        properties:
                          suitability:
                            type: boolean
                            description: >-
                              Did the user go through a suitability assessment
                              and the outcome indicated suitability.
                        required:
                          - suitability
                    required:
                      - id
                      - user_id
                      - type
                      - check_confirmed_at
                      - status
                      - instrument_suitability
                    additionalProperties: false
                  - title: User Check - Compliance
                    type: object
                    description: Compliance check
                    properties:
                      id:
                        title: User Check unique identifier
                        type: string
                        description: User Check unique identifier.
                        format: uuid
                      user_id:
                        title: User unique identifier.
                        type: string
                        description: User unique identifier.
                        format: uuid
                      type:
                        type: string
                        default: COMPLIANCE
                        description: The type of check must be COMPLIANCE.
                      status:
                        type: string
                        description: |-
                          Final status of the COMPLIANCE check.
                          * IN_PROGRESS - Compliance check is in progress
                          * PASSED - Compliance check passed
                          * FAILED - Compliance check failed
                        enum:
                          - IN_PROGRESS
                          - PASSED
                          - FAILED
                      check_confirmed_at:
                        type: string
                        format: date-time
                        description: Completion date and time of the COMPLIANCE check.
                    required:
                      - id
                      - user_id
                      - type
                      - check_confirmed_at
                    additionalProperties: false
              examples:
                KYC:
                  summary: KYC user check
                  value:
                    id: 008a82d0-c5a4-4410-9318-d34786429c5a
                    user_id: 7b39529a-e68c-4688-8242-7549d10d6084
                    type: KYC
                    check_confirmed_at: '2019-08-24T14:15:22Z'
                    data_download_link: https://bucket.customer.com/ident/user3.zip
                    document_type: ID_CARD
                    document_expiration_date: '2030-01-01'
                    nationality: DE
                    status: PASSED
                    provider: KYC provider
                    method: VIDEO_ID
                    confirmed_address:
                      address_line1: Rosenweg 221
                      address_line2: apt. 33
                      postcode: '45678'
                      city: Berlin
                      state: BE
                      country: DE
                INSTRUMENT_FIT:
                  summary: Instrument fit user check
                  value:
                    id: a680ff52-3a96-4e82-a2ab-12563bbd1a2e
                    user_id: 7b39529a-e68c-4688-8242-7549d10d6084
                    type: INSTRUMENT_FIT
                    check_confirmed_at: '2020-08-24T14:15:22Z'
                    status: PASSED
                    instrument_suitability:
                      suitability: true
                POR:
                  summary: POR user check
                  value:
                    id: b633a915-ed3c-43d7-afb5-a550f26ccb0d
                    user_id: 7b39529a-e68c-4688-8242-7549d10d6084
                    type: POR
                    check_confirmed_at: '2020-08-24T14:15:22Z'
                    issuance_date: '2020-01-01'
                    data_download_link: https://bucket.customer.com/por/user3.zip
                    document_type: UTILITY_BILL
                    status: PASSED
                    confirmed_address:
                      address_line1: Rosenweg 221
                      address_line2: apt. 33
                      postcode: '45678'
                      city: Berlin
                      state: BE
                      country: DE
                COMPLIANCE:
                  summary: Compliance user check
                  value:
                    id: 76aa72aa-3738-4640-bad5-68c1196dc758
                    user_id: 7b39529a-e68c-4688-8242-7549d10d6084
                    type: COMPLIANCE
                    check_confirmed_at: '2020-08-24T14:15:22Z'
                    status: PASSED
        '401':
          description: Unauthorized. The caller has not been authenticated.
          headers:
            upvest-request-id:
              required: true
              schema:
                type: string
                format: uuid
                example: 169ae4c7-ebd7-4041-94da-25369653eba7
          content:
            application/problem+json:
              schema:
                title: Error
                type: object
                description: ''
                properties:
                  type:
                    type: string
                    description: URL to a document describing the error condition.
                  status:
                    type: integer
                    description: >-
                      Transmission of the HTTP status code so that all
                      information can be found in one place, but also to correct
                      changes in the status code due to the use of proxy
                      servers.
                  title:
                    type: string
                    description: >-
                      A short, human-readable title for the general error type;
                      the title should not change for given types.
                  detail:
                    type: string
                    description: A human-readable description of the specific error.
                  instance:
                    type: string
                    description: >-
                      This optional key may be present, with a unique URI for
                      the specific error; this will often point to an error log
                      for that specific response.
                  request_id:
                    type: string
                    description: Correlation ID for the original request.
                required:
                  - type
                  - status
                additionalProperties: false
              example:
                status: 401
                type: unauthorized
        '403':
          description: >-
            Forbidden. The caller has been authenticated but is not allowed to
            take the requested action.
          headers:
            upvest-request-id:
              required: true
              schema:
                type: string
                format: uuid
                example: 169ae4c7-ebd7-4041-94da-25369653eba7
          content:
            application/problem+json:
              schema:
                title: Error
                type: object
                description: ''
                properties:
                  type:
                    type: string
                    description: URL to a document describing the error condition.
                  status:
                    type: integer
                    description: >-
                      Transmission of the HTTP status code so that all
                      information can be found in one place, but also to correct
                      changes in the status code due to the use of proxy
                      servers.
                  title:
                    type: string
                    description: >-
                      A short, human-readable title for the general error type;
                      the title should not change for given types.
                  detail:
                    type: string
                    description: A human-readable description of the specific error.
                  instance:
                    type: string
                    description: >-
                      This optional key may be present, with a unique URI for
                      the specific error; this will often point to an error log
                      for that specific response.
                  request_id:
                    type: string
                    description: Correlation ID for the original request.
                required:
                  - type
                  - status
                additionalProperties: false
              example:
                status: 403
                type: forbidden
        '404':
          description: Not Found. The requested resource could not be found.
          headers:
            upvest-request-id:
              required: true
              schema:
                type: string
                format: uuid
                example: 169ae4c7-ebd7-4041-94da-25369653eba7
          content:
            application/problem+json:
              schema:
                title: Error
                type: object
                description: ''
                properties:
                  type:
                    type: string
                    description: URL to a document describing the error condition.
                  status:
                    type: integer
                    description: >-
                      Transmission of the HTTP status code so that all
                      information can be found in one place, but also to correct
                      changes in the status code due to the use of proxy
                      servers.
                  title:
                    type: string
                    description: >-
                      A short, human-readable title for the general error type;
                      the title should not change for given types.
                  detail:
                    type: string
                    description: A human-readable description of the specific error.
                  instance:
                    type: string
                    description: >-
                      This optional key may be present, with a unique URI for
                      the specific error; this will often point to an error log
                      for that specific response.
                  request_id:
                    type: string
                    description: Correlation ID for the original request.
                required:
                  - type
                  - status
                additionalProperties: false
              example:
                status: 404
                type: not_found
        '406':
          description: >-
            Not Acceptable. The resource does not have a current representation
            that would be acceptable to the user agent. "Accept" header defined
            unsupported value.
          headers:
            upvest-request-id:
              required: true
              schema:
                type: string
                format: uuid
                example: 169ae4c7-ebd7-4041-94da-25369653eba7
          content:
            application/problem+json:
              schema:
                title: Error
                type: object
                description: ''
                properties:
                  type:
                    type: string
                    description: URL to a document describing the error condition.
                  status:
                    type: integer
                    description: >-
                      Transmission of the HTTP status code so that all
                      information can be found in one place, but also to correct
                      changes in the status code due to the use of proxy
                      servers.
                  title:
                    type: string
                    description: >-
                      A short, human-readable title for the general error type;
                      the title should not change for given types.
                  detail:
                    type: string
                    description: A human-readable description of the specific error.
                  instance:
                    type: string
                    description: >-
                      This optional key may be present, with a unique URI for
                      the specific error; this will often point to an error log
                      for that specific response.
                  request_id:
                    type: string
                    description: Correlation ID for the original request.
                required:
                  - type
                  - status
                additionalProperties: false
              example:
                status: 406
                type: not_acceptable
        '429':
          description: >-
            Too Many Requests. The caller has exceeded their quota for the time
            period and has been throttled.
          headers:
            upvest-request-id:
              required: true
              schema:
                type: string
                format: uuid
                example: 169ae4c7-ebd7-4041-94da-25369653eba7
          content:
            application/problem+json:
              schema:
                title: Error
                type: object
                description: ''
                properties:
                  type:
                    type: string
                    description: URL to a document describing the error condition.
                  status:
                    type: integer
                    description: >-
                      Transmission of the HTTP status code so that all
                      information can be found in one place, but also to correct
                      changes in the status code due to the use of proxy
                      servers.
                  title:
                    type: string
                    description: >-
                      A short, human-readable title for the general error type;
                      the title should not change for given types.
                  detail:
                    type: string
                    description: A human-readable description of the specific error.
                  instance:
                    type: string
                    description: >-
                      This optional key may be present, with a unique URI for
                      the specific error; this will often point to an error log
                      for that specific response.
                  request_id:
                    type: string
                    description: Correlation ID for the original request.
                required:
                  - type
                  - status
                additionalProperties: false
              example:
                status: 429
                type: too_many_requests
        '500':
          description: Internal Server Error. The service encountered an unexpected error.
          headers:
            upvest-request-id:
              required: true
              schema:
                type: string
                format: uuid
                example: 169ae4c7-ebd7-4041-94da-25369653eba7
          content:
            application/problem+json:
              schema:
                title: Error
                type: object
                description: ''
                properties:
                  type:
                    type: string
                    description: URL to a document describing the error condition.
                  status:
                    type: integer
                    description: >-
                      Transmission of the HTTP status code so that all
                      information can be found in one place, but also to correct
                      changes in the status code due to the use of proxy
                      servers.
                  title:
                    type: string
                    description: >-
                      A short, human-readable title for the general error type;
                      the title should not change for given types.
                  detail:
                    type: string
                    description: A human-readable description of the specific error.
                  instance:
                    type: string
                    description: >-
                      This optional key may be present, with a unique URI for
                      the specific error; this will often point to an error log
                      for that specific response.
                  request_id:
                    type: string
                    description: Correlation ID for the original request.
                required:
                  - type
                  - status
                additionalProperties: false
              example:
                status: 500
                type: internal_server_error
        '503':
          description: >-
            Service Unavailable. The service handling for this request cannot be
            reached at this time.
          headers:
            upvest-request-id:
              required: true
              schema:
                type: string
                format: uuid
                example: 169ae4c7-ebd7-4041-94da-25369653eba7
          content:
            application/problem+json:
              schema:
                title: Error
                type: object
                description: ''
                properties:
                  type:
                    type: string
                    description: URL to a document describing the error condition.
                  status:
                    type: integer
                    description: >-
                      Transmission of the HTTP status code so that all
                      information can be found in one place, but also to correct
                      changes in the status code due to the use of proxy
                      servers.
                  title:
                    type: string
                    description: >-
                      A short, human-readable title for the general error type;
                      the title should not change for given types.
                  detail:
                    type: string
                    description: A human-readable description of the specific error.
                  instance:
                    type: string
                    description: >-
                      This optional key may be present, with a unique URI for
                      the specific error; this will often point to an error log
                      for that specific response.
                  request_id:
                    type: string
                    description: Correlation ID for the original request.
                required:
                  - type
                  - status
                additionalProperties: false
              example:
                status: 503
                type: method_not_allowed
        '504':
          description: >-
            Gateway Timeout. The service gateway has reached its internal
            timeout.
          headers:
            upvest-request-id:
              required: true
              schema:
                type: string
                format: uuid
                example: 169ae4c7-ebd7-4041-94da-25369653eba7
          content:
            application/problem+json:
              schema:
                title: Error
                type: object
                description: ''
                properties:
                  type:
                    type: string
                    description: URL to a document describing the error condition.
                  status:
                    type: integer
                    description: >-
                      Transmission of the HTTP status code so that all
                      information can be found in one place, but also to correct
                      changes in the status code due to the use of proxy
                      servers.
                  title:
                    type: string
                    description: >-
                      A short, human-readable title for the general error type;
                      the title should not change for given types.
                  detail:
                    type: string
                    description: A human-readable description of the specific error.
                  instance:
                    type: string
                    description: >-
                      This optional key may be present, with a unique URI for
                      the specific error; this will often point to an error log
                      for that specific response.
                  request_id:
                    type: string
                    description: Correlation ID for the original request.
                required:
                  - type
                  - status
                additionalProperties: false
              example:
                status: 504
                type: gateway_timeout
  /users/{user_id}/identifiers:
    parameters:
      - name: user_id
        in: path
        required: true
        schema:
          title: User unique identifier.
          type: string
          description: User unique identifier.
          format: uuid
      - name: upvest-client-id
        in: header
        description: Tenant Client ID
        required: true
        schema:
          type: string
          format: uuid
          example: ebabcf4d-61c3-4942-875c-e265a7c2d062
      - name: authorization
        in: header
        description: |
          Bearer (access) token from the OAuth flow with correct scopes.
          https://datatracker.ietf.org/doc/html/rfc6750
        required: true
        schema:
          type: string
          pattern: ^Bearer [a-zA-Z0-9\-\._~+/]*=*
          example: Bearer c2VjcmV0Cg==
      - name: signature
        in: header
        required: true
        schema:
          type: string
        description: >-
          https://tools.ietf.org/id/draft-ietf-httpbis-message-signatures-01.html#name-the-signature-http-header
      - name: signature-input
        in: header
        required: true
        schema:
          type: string
        description: >-
          https://tools.ietf.org/id/draft-ietf-httpbis-message-signatures-01.html#name-the-signature-input-http-he
      - name: upvest-api-version
        in: header
        required: false
        schema:
          type: string
          enum:
            - '1'
          default: '1'
          example: '1'
        description: 'Upvest API version (Note: Do not include quotation marks)'
    get:
      operationId: list_user_identifiers
      summary: Get user identifiers
      description: Lists all existing identifiers of a user used for transaction reporting.
      tags:
        - User Identifiers
      security:
        - oauth-client-credentials:
            - users:read
            - users:admin
      responses:
        '200':
          description: OK
          headers:
            upvest-request-id:
              required: true
              schema:
                type: string
                format: uuid
                example: 169ae4c7-ebd7-4041-94da-25369653eba7
          content:
            application/json:
              schema:
                title: Identifiers - List - Response
                type: object
                properties:
                  data:
                    type: array
                    items:
                      title: Identifier
                      type: object
                      properties:
                        id:
                          title: Unique identifier for the user's national ID.
                          type: string
                          description: Unique identifier for the user's national ID.
                          format: uuid
                        created_at:
                          type: string
                          format: date-time
                          description: >-
                            Date and time when the resource was created. [RFC
                            3339-5](https://datatracker.ietf.org/doc/html/rfc3339#section-5.6),
                            [ISO8601
                            UTC](https://www.iso.org/iso-8601-date-and-time-format.html)
                        updated_at:
                          type: string
                          format: date-time
                          description: >-
                            Date and time when the resource was last updated.
                            [RFC
                            3339-5](https://datatracker.ietf.org/doc/html/rfc3339#section-5.6),
                            [ISO8601
                            UTC](https://www.iso.org/iso-8601-date-and-time-format.html)
                        user_id:
                          title: User unique identifier.
                          type: string
                          description: User unique identifier.
                          format: uuid
                        identifier_standard:
                          type: string
                          maxLength: 6
                          description: >-
                            Identifier standard abbreviation. If it's not
                            provided, issuing country's corresponding 1st
                            Priority Identifier Standard will be used by
                            default. See [guide
                            here](/documentation/guides/users/identifiers)
                        identifier:
                          type: string
                          maxLength: 30
                          minLength: 0
                          description: >-
                            Identifier value. See [guide
                            here](/documentation/guides/users/identifiers)
                        type:
                          type: string
                          description: |-
                            Identifier type.
                            * NATIONAL_ID - 
                            * PASSPORT - 
                          enum:
                            - NATIONAL_ID
                            - PASSPORT
                          default: NATIONAL_ID
                        issuing_country:
                          description: >-
                            Accepted country code. [ISO 3166-1 alpha-2
                            codes](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2).
                          type: string
                          enum:
                            - AD
                            - AE
                            - AF
                            - AG
                            - AI
                            - AL
                            - AM
                            - AO
                            - AQ
                            - AR
                            - AS
                            - AT
                            - AU
                            - AW
                            - AX
                            - AZ
                            - BA
                            - BB
                            - BD
                            - BE
                            - BF
                            - BG
                            - BH
                            - BI
                            - BJ
                            - BL
                            - BM
                            - BN
                            - BO
                            - BQ
                            - BR
                            - BS
                            - BT
                            - BV
                            - BW
                            - BY
                            - BZ
                            - CA
                            - CC
                            - CD
                            - CF
                            - CG
                            - CH
                            - CI
                            - CK
                            - CL
                            - CM
                            - CN
                            - CO
                            - CR
                            - CU
                            - CV
                            - CW
                            - CX
                            - CY
                            - CZ
                            - DE
                            - DJ
                            - DK
                            - DM
                            - DO
                            - DZ
                            - EC
                            - EE
                            - EG
                            - EH
                            - ER
                            - ES
                            - ET
                            - FI
                            - FJ
                            - FK
                            - FM
                            - FO
                            - FR
                            - GA
                            - GB
                            - GD
                            - GE
                            - GF
                            - GG
                            - GH
                            - GI
                            - GL
                            - GM
                            - GN
                            - GP
                            - GQ
                            - GR
                            - GS
                            - GT
                            - GU
                            - GW
                            - GY
                            - HK
                            - HM
                            - HN
                            - HR
                            - HT
                            - HU
                            - ID
                            - IE
                            - IL
                            - IM
                            - IN
                            - IO
                            - IQ
                            - IR
                            - IS
                            - IT
                            - JE
                            - JM
                            - JO
                            - JP
                            - KE
                            - KG
                            - KH
                            - KI
                            - KM
                            - KN
                            - KP
                            - KR
                            - KW
                            - KY
                            - KZ
                            - LA
                            - LB
                            - LC
                            - LI
                            - LK
                            - LR
                            - LS
                            - LT
                            - LU
                            - LV
                            - LY
                            - MA
                            - MC
                            - MD
                            - ME
                            - MF
                            - MG
                            - MH
                            - MK
                            - ML
                            - MM
                            - MN
                            - MO
                            - MP
                            - MQ
                            - MR
                            - MS
                            - MT
                            - MU
                            - MV
                            - MW
                            - MX
                            - MY
                            - MZ
                            - NA
                            - NC
                            - NE
                            - NF
                            - NG
                            - NI
                            - NL
                            - 'NO'
                            - NP
                            - NR
                            - NU
                            - NZ
                            - OM
                            - PA
                            - PE
                            - PF
                            - PG
                            - PH
                            - PK
                            - PL
                            - PM
                            - PN
                            - PR
                            - PS
                            - PT
                            - PW
                            - PY
                            - QA
                            - RE
                            - RO
                            - RS
                            - RU
                            - RW
                            - SA
                            - SB
                            - SC
                            - SD
                            - SE
                            - SG
                            - SH
                            - SI
                            - SJ
                            - SK
                            - SL
                            - SM
                            - SN
                            - SO
                            - SR
                            - SS
                            - ST
                            - SV
                            - SX
                            - SY
                            - SZ
                            - TC
                            - TD
                            - TF
                            - TG
                            - TH
                            - TJ
                            - TK
                            - TL
                            - TM
                            - TN
                            - TO
                            - TR
                            - TT
                            - TV
                            - TW
                            - TZ
                            - UA
                            - UG
                            - UM
                            - US
                            - UY
                            - UZ
                            - VA
                            - VC
                            - VE
                            - VG
                            - VI
                            - VN
                            - VU
                            - WF
                            - WS
                            - XK
                            - YE
                            - YT
                            - ZA
                            - ZM
                            - ZW
                      required:
                        - id
                        - user_id
                        - created_at
                        - updated_at
                        - identifier_standard
                        - identifier
                        - type
                        - issuing_country
                      additionalProperties: false
                required:
                  - data
                additionalProperties: false
              example:
                data:
                  - id: 83d83ec2-d2ca-49ff-bbea-b92b5c3be202
                    created_at: '2021-07-21T14:10:00.00Z'
                    updated_at: '2021-07-21T14:10:00.00Z'
                    user_id: 00000ec2-d2ca-49ff-bbea-b92b5c3be203
                    type: NATIONAL_ID
                    issuing_country: PL
                    identifier_standard: PESEL
                    identifier: '83053078917'
                  - id: 83d83ec2-d2ca-49ff-bbea-b92b5c3be111
                    created_at: '2021-07-21T14:10:00.00Z'
                    updated_at: '2021-07-21T14:10:00.00Z'
                    user_id: 00000ec2-d2ca-49ff-bbea-b92b5c3be203
                    type: NATIONAL_ID
                    issuing_country: DK
                    identifier_standard: DPIC
                    identifier: '3005837891'
                  - id: 83d83ec2-d2ca-49ff-bbea-b92b5c3be303
                    created_at: '2021-07-21T14:10:00.00Z'
                    updated_at: '2021-07-21T14:10:00.00Z'
                    user_id: 00000ec2-d2ca-49ff-bbea-b92b5c3be505
                    type: NATIONAL_ID
                    issuing_country: DE
                    identifier_standard: CONCAT
                    identifier: ''
                  - id: 83d83ec2-d2ca-49ff-bbea-b92b5c3be303
                    created_at: '2021-07-21T14:10:00.00Z'
                    updated_at: '2021-07-21T14:10:00.00Z'
                    user_id: 00000ec2-d2ca-49ff-bbea-b92b5c3be505
                    type: PASSPORT
                    issuing_country: NL
                    identifier_standard: NLPN
                    identifier: ''
        '401':
          description: Unauthorized. The caller has not been authenticated.
          headers:
            upvest-request-id:
              required: true
              schema:
                type: string
                format: uuid
                example: 169ae4c7-ebd7-4041-94da-25369653eba7
          content:
            application/problem+json:
              schema:
                title: Error
                type: object
                description: ''
                properties:
                  type:
                    type: string
                    description: URL to a document describing the error condition.
                  status:
                    type: integer
                    description: >-
                      Transmission of the HTTP status code so that all
                      information can be found in one place, but also to correct
                      changes in the status code due to the use of proxy
                      servers.
                  title:
                    type: string
                    description: >-
                      A short, human-readable title for the general error type;
                      the title should not change for given types.
                  detail:
                    type: string
                    description: A human-readable description of the specific error.
                  instance:
                    type: string
                    description: >-
                      This optional key may be present, with a unique URI for
                      the specific error; this will often point to an error log
                      for that specific response.
                  request_id:
                    type: string
                    description: Correlation ID for the original request.
                required:
                  - type
                  - status
                additionalProperties: false
              example:
                status: 401
                type: unauthorized
        '403':
          description: >-
            Forbidden. The caller has been authenticated but is not allowed to
            take the requested action.
          headers:
            upvest-request-id:
              required: true
              schema:
                type: string
                format: uuid
                example: 169ae4c7-ebd7-4041-94da-25369653eba7
          content:
            application/problem+json:
              schema:
                title: Error
                type: object
                description: ''
                properties:
                  type:
                    type: string
                    description: URL to a document describing the error condition.
                  status:
                    type: integer
                    description: >-
                      Transmission of the HTTP status code so that all
                      information can be found in one place, but also to correct
                      changes in the status code due to the use of proxy
                      servers.
                  title:
                    type: string
                    description: >-
                      A short, human-readable title for the general error type;
                      the title should not change for given types.
                  detail:
                    type: string
                    description: A human-readable description of the specific error.
                  instance:
                    type: string
                    description: >-
                      This optional key may be present, with a unique URI for
                      the specific error; this will often point to an error log
                      for that specific response.
                  request_id:
                    type: string
                    description: Correlation ID for the original request.
                required:
                  - type
                  - status
                additionalProperties: false
              example:
                status: 403
                type: forbidden
        '404':
          description: Not Found. The requested resource could not be found.
          headers:
            upvest-request-id:
              required: true
              schema:
                type: string
                format: uuid
                example: 169ae4c7-ebd7-4041-94da-25369653eba7
          content:
            application/problem+json:
              schema:
                title: Error
                type: object
                description: ''
                properties:
                  type:
                    type: string
                    description: URL to a document describing the error condition.
                  status:
                    type: integer
                    description: >-
                      Transmission of the HTTP status code so that all
                      information can be found in one place, but also to correct
                      changes in the status code due to the use of proxy
                      servers.
                  title:
                    type: string
                    description: >-
                      A short, human-readable title for the general error type;
                      the title should not change for given types.
                  detail:
                    type: string
                    description: A human-readable description of the specific error.
                  instance:
                    type: string
                    description: >-
                      This optional key may be present, with a unique URI for
                      the specific error; this will often point to an error log
                      for that specific response.
                  request_id:
                    type: string
                    description: Correlation ID for the original request.
                required:
                  - type
                  - status
                additionalProperties: false
              example:
                status: 404
                type: not_found
        '406':
          description: >-
            Not Acceptable. The resource does not have a current representation
            that would be acceptable to the user agent. "Accept" header defined
            unsupported value.
          headers:
            upvest-request-id:
              required: true
              schema:
                type: string
                format: uuid
                example: 169ae4c7-ebd7-4041-94da-25369653eba7
          content:
            application/problem+json:
              schema:
                title: Error
                type: object
                description: ''
                properties:
                  type:
                    type: string
                    description: URL to a document describing the error condition.
                  status:
                    type: integer
                    description: >-
                      Transmission of the HTTP status code so that all
                      information can be found in one place, but also to correct
                      changes in the status code due to the use of proxy
                      servers.
                  title:
                    type: string
                    description: >-
                      A short, human-readable title for the general error type;
                      the title should not change for given types.
                  detail:
                    type: string
                    description: A human-readable description of the specific error.
                  instance:
                    type: string
                    description: >-
                      This optional key may be present, with a unique URI for
                      the specific error; this will often point to an error log
                      for that specific response.
                  request_id:
                    type: string
                    description: Correlation ID for the original request.
                required:
                  - type
                  - status
                additionalProperties: false
              example:
                status: 406
                type: not_acceptable
        '429':
          description: >-
            Too Many Requests. The caller has exceeded their quota for the time
            period and has been throttled.
          headers:
            upvest-request-id:
              required: true
              schema:
                type: string
                format: uuid
                example: 169ae4c7-ebd7-4041-94da-25369653eba7
          content:
            application/problem+json:
              schema:
                title: Error
                type: object
                description: ''
                properties:
                  type:
                    type: string
                    description: URL to a document describing the error condition.
                  status:
                    type: integer
                    description: >-
                      Transmission of the HTTP status code so that all
                      information can be found in one place, but also to correct
                      changes in the status code due to the use of proxy
                      servers.
                  title:
                    type: string
                    description: >-
                      A short, human-readable title for the general error type;
                      the title should not change for given types.
                  detail:
                    type: string
                    description: A human-readable description of the specific error.
                  instance:
                    type: string
                    description: >-
                      This optional key may be present, with a unique URI for
                      the specific error; this will often point to an error log
                      for that specific response.
                  request_id:
                    type: string
                    description: Correlation ID for the original request.
                required:
                  - type
                  - status
                additionalProperties: false
              example:
                status: 429
                type: too_many_requests
        '500':
          description: Internal Server Error. The service encountered an unexpected error.
          headers:
            upvest-request-id:
              required: true
              schema:
                type: string
                format: uuid
                example: 169ae4c7-ebd7-4041-94da-25369653eba7
          content:
            application/problem+json:
              schema:
                title: Error
                type: object
                description: ''
                properties:
                  type:
                    type: string
                    description: URL to a document describing the error condition.
                  status:
                    type: integer
                    description: >-
                      Transmission of the HTTP status code so that all
                      information can be found in one place, but also to correct
                      changes in the status code due to the use of proxy
                      servers.
                  title:
                    type: string
                    description: >-
                      A short, human-readable title for the general error type;
                      the title should not change for given types.
                  detail:
                    type: string
                    description: A human-readable description of the specific error.
                  instance:
                    type: string
                    description: >-
                      This optional key may be present, with a unique URI for
                      the specific error; this will often point to an error log
                      for that specific response.
                  request_id:
                    type: string
                    description: Correlation ID for the original request.
                required:
                  - type
                  - status
                additionalProperties: false
              example:
                status: 500
                type: internal_server_error
        '503':
          description: >-
            Service Unavailable. The service handling for this request cannot be
            reached at this time.
          headers:
            upvest-request-id:
              required: true
              schema:
                type: string
                format: uuid
                example: 169ae4c7-ebd7-4041-94da-25369653eba7
          content:
            application/problem+json:
              schema:
                title: Error
                type: object
                description: ''
                properties:
                  type:
                    type: string
                    description: URL to a document describing the error condition.
                  status:
                    type: integer
                    description: >-
                      Transmission of the HTTP status code so that all
                      information can be found in one place, but also to correct
                      changes in the status code due to the use of proxy
                      servers.
                  title:
                    type: string
                    description: >-
                      A short, human-readable title for the general error type;
                      the title should not change for given types.
                  detail:
                    type: string
                    description: A human-readable description of the specific error.
                  instance:
                    type: string
                    description: >-
                      This optional key may be present, with a unique URI for
                      the specific error; this will often point to an error log
                      for that specific response.
                  request_id:
                    type: string
                    description: Correlation ID for the original request.
                required:
                  - type
                  - status
                additionalProperties: false
              example:
                status: 503
                type: method_not_allowed
        '504':
          description: >-
            Gateway Timeout. The service gateway has reached its internal
            timeout.
          headers:
            upvest-request-id:
              required: true
              schema:
                type: string
                format: uuid
                example: 169ae4c7-ebd7-4041-94da-25369653eba7
          content:
            application/problem+json:
              schema:
                title: Error
                type: object
                description: ''
                properties:
                  type:
                    type: string
                    description: URL to a document describing the error condition.
                  status:
                    type: integer
                    description: >-
                      Transmission of the HTTP status code so that all
                      information can be found in one place, but also to correct
                      changes in the status code due to the use of proxy
                      servers.
                  title:
                    type: string
                    description: >-
                      A short, human-readable title for the general error type;
                      the title should not change for given types.
                  detail:
                    type: string
                    description: A human-readable description of the specific error.
                  instance:
                    type: string
                    description: >-
                      This optional key may be present, with a unique URI for
                      the specific error; this will often point to an error log
                      for that specific response.
                  request_id:
                    type: string
                    description: Correlation ID for the original request.
                required:
                  - type
                  - status
                additionalProperties: false
              example:
                status: 504
                type: gateway_timeout
    post:
      operationId: create_identifier
      summary: Create a user identifier
      description: >-
        Creates a new identifier for a user that will be used for transaction
        reporting obligations. This identifier is required for user activation
        if the user's nationalities do not allow reporting using the CONCAT
        format. More information can be found in the
        [guides](https://docs.upvest.co/documentation/guides/users/identifiers).
      tags:
        - User Identifiers
      security:
        - oauth-client-credentials:
            - users:admin
      requestBody:
        content:
          application/json:
            schema:
              title: Identifier - Create - Request
              type: object
              properties:
                type:
                  type: string
                  description: |-
                    Identifier type.
                    * NATIONAL_ID - 
                    * PASSPORT - 
                  enum:
                    - NATIONAL_ID
                    - PASSPORT
                  default: NATIONAL_ID
                issuing_country:
                  description: >-
                    Accepted country code. [ISO 3166-1 alpha-2
                    codes](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2).
                  type: string
                  enum:
                    - AD
                    - AE
                    - AF
                    - AG
                    - AI
                    - AL
                    - AM
                    - AO
                    - AQ
                    - AR
                    - AS
                    - AT
                    - AU
                    - AW
                    - AX
                    - AZ
                    - BA
                    - BB
                    - BD
                    - BE
                    - BF
                    - BG
                    - BH
                    - BI
                    - BJ
                    - BL
                    - BM
                    - BN
                    - BO
                    - BQ
                    - BR
                    - BS
                    - BT
                    - BV
                    - BW
                    - BY
                    - BZ
                    - CA
                    - CC
                    - CD
                    - CF
                    - CG
                    - CH
                    - CI
                    - CK
                    - CL
                    - CM
                    - CN
                    - CO
                    - CR
                    - CU
                    - CV
                    - CW
                    - CX
                    - CY
                    - CZ
                    - DE
                    - DJ
                    - DK
                    - DM
                    - DO
                    - DZ
                    - EC
                    - EE
                    - EG
                    - EH
                    - ER
                    - ES
                    - ET
                    - FI
                    - FJ
                    - FK
                    - FM
                    - FO
                    - FR
                    - GA
                    - GB
                    - GD
                    - GE
                    - GF
                    - GG
                    - GH
                    - GI
                    - GL
                    - GM
                    - GN
                    - GP
                    - GQ
                    - GR
                    - GS
                    - GT
                    - GU
                    - GW
                    - GY
                    - HK
                    - HM
                    - HN
                    - HR
                    - HT
                    - HU
                    - ID
                    - IE
                    - IL
                    - IM
                    - IN
                    - IO
                    - IQ
                    - IR
                    - IS
                    - IT
                    - JE
                    - JM
                    - JO
                    - JP
                    - KE
                    - KG
                    - KH
                    - KI
                    - KM
                    - KN
                    - KP
                    - KR
                    - KW
                    - KY
                    - KZ
                    - LA
                    - LB
                    - LC
                    - LI
                    - LK
                    - LR
                    - LS
                    - LT
                    - LU
                    - LV
                    - LY
                    - MA
                    - MC
                    - MD
                    - ME
                    - MF
                    - MG
                    - MH
                    - MK
                    - ML
                    - MM
                    - MN
                    - MO
                    - MP
                    - MQ
                    - MR
                    - MS
                    - MT
                    - MU
                    - MV
                    - MW
                    - MX
                    - MY
                    - MZ
                    - NA
                    - NC
                    - NE
                    - NF
                    - NG
                    - NI
                    - NL
                    - 'NO'
                    - NP
                    - NR
                    - NU
                    - NZ
                    - OM
                    - PA
                    - PE
                    - PF
                    - PG
                    - PH
                    - PK
                    - PL
                    - PM
                    - PN
                    - PR
                    - PS
                    - PT
                    - PW
                    - PY
                    - QA
                    - RE
                    - RO
                    - RS
                    - RU
                    - RW
                    - SA
                    - SB
                    - SC
                    - SD
                    - SE
                    - SG
                    - SH
                    - SI
                    - SJ
                    - SK
                    - SL
                    - SM
                    - SN
                    - SO
                    - SR
                    - SS
                    - ST
                    - SV
                    - SX
                    - SY
                    - SZ
                    - TC
                    - TD
                    - TF
                    - TG
                    - TH
                    - TJ
                    - TK
                    - TL
                    - TM
                    - TN
                    - TO
                    - TR
                    - TT
                    - TV
                    - TW
                    - TZ
                    - UA
                    - UG
                    - UM
                    - US
                    - UY
                    - UZ
                    - VA
                    - VC
                    - VE
                    - VG
                    - VI
                    - VN
                    - VU
                    - WF
                    - WS
                    - XK
                    - YE
                    - YT
                    - ZA
                    - ZM
                    - ZW
                identifier:
                  type: string
                  maxLength: 30
                  minLength: 0
                  description: >-
                    Identifier value. See [guide
                    here](/documentation/guides/users/identifiers)
                identifier_standard:
                  type: string
                  maxLength: 6
                  description: >-
                    Identifier standard abbreviation. If it's not provided,
                    issuing country's corresponding 1st Priority Identifier
                    Standard will be used by default. See [guide
                    here](/documentation/guides/users/identifiers)
              required:
                - type
                - issuing_country
                - identifier
              additionalProperties: false
            examples:
              national_id:
                summary: National ID
                value:
                  type: NATIONAL_ID
                  issuing_country: PL
                  identifier_standard: PESEL
                  identifier: '83053078917'
              passport:
                summary: Passport
                value:
                  type: PASSPORT
                  issuing_country: NL
                  identifier_standard: NLPN
                  identifier: AB12AB349
      responses:
        '200':
          description: The user identifier is created.
          headers:
            upvest-request-id:
              required: true
              schema:
                type: string
                format: uuid
                example: 169ae4c7-ebd7-4041-94da-25369653eba7
          content:
            application/json:
              schema:
                title: Identifier
                type: object
                properties:
                  id:
                    title: Unique identifier for the user's national ID.
                    type: string
                    description: Unique identifier for the user's national ID.
                    format: uuid
                  created_at:
                    type: string
                    format: date-time
                    description: >-
                      Date and time when the resource was created. [RFC
                      3339-5](https://datatracker.ietf.org/doc/html/rfc3339#section-5.6),
                      [ISO8601
                      UTC](https://www.iso.org/iso-8601-date-and-time-format.html)
                  updated_at:
                    type: string
                    format: date-time
                    description: >-
                      Date and time when the resource was last updated. [RFC
                      3339-5](https://datatracker.ietf.org/doc/html/rfc3339#section-5.6),
                      [ISO8601
                      UTC](https://www.iso.org/iso-8601-date-and-time-format.html)
                  user_id:
                    title: User unique identifier.
                    type: string
                    description: User unique identifier.
                    format: uuid
                  identifier_standard:
                    type: string
                    maxLength: 6
                    description: >-
                      Identifier standard abbreviation. If it's not provided,
                      issuing country's corresponding 1st Priority Identifier
                      Standard will be used by default. See [guide
                      here](/documentation/guides/users/identifiers)
                  identifier:
                    type: string
                    maxLength: 30
                    minLength: 0
                    description: >-
                      Identifier value. See [guide
                      here](/documentation/guides/users/identifiers)
                  type:
                    type: string
                    description: |-
                      Identifier type.
                      * NATIONAL_ID - 
                      * PASSPORT - 
                    enum:
                      - NATIONAL_ID
                      - PASSPORT
                    default: NATIONAL_ID
                  issuing_country:
                    description: >-
                      Accepted country code. [ISO 3166-1 alpha-2
                      codes](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2).
                    type: string
                    enum:
                      - AD
                      - AE
                      - AF
                      - AG
                      - AI
                      - AL
                      - AM
                      - AO
                      - AQ
                      - AR
                      - AS
                      - AT
                      - AU
                      - AW
                      - AX
                      - AZ
                      - BA
                      - BB
                      - BD
                      - BE
                      - BF
                      - BG
                      - BH
                      - BI
                      - BJ
                      - BL
                      - BM
                      - BN
                      - BO
                      - BQ
                      - BR
                      - BS
                      - BT
                      - BV
                      - BW
                      - BY
                      - BZ
                      - CA
                      - CC
                      - CD
                      - CF
                      - CG
                      - CH
                      - CI
                      - CK
                      - CL
                      - CM
                      - CN
                      - CO
                      - CR
                      - CU
                      - CV
                      - CW
                      - CX
                      - CY
                      - CZ
                      - DE
                      - DJ
                      - DK
                      - DM
                      - DO
                      - DZ
                      - EC
                      - EE
                      - EG
                      - EH
                      - ER
                      - ES
                      - ET
                      - FI
                      - FJ
                      - FK
                      - FM
                      - FO
                      - FR
                      - GA
                      - GB
                      - GD
                      - GE
                      - GF
                      - GG
                      - GH
                      - GI
                      - GL
                      - GM
                      - GN
                      - GP
                      - GQ
                      - GR
                      - GS
                      - GT
                      - GU
                      - GW
                      - GY
                      - HK
                      - HM
                      - HN
                      - HR
                      - HT
                      - HU
                      - ID
                      - IE
                      - IL
                      - IM
                      - IN
                      - IO
                      - IQ
                      - IR
                      - IS
                      - IT
                      - JE
                      - JM
                      - JO
                      - JP
                      - KE
                      - KG
                      - KH
                      - KI
                      - KM
                      - KN
                      - KP
                      - KR
                      - KW
                      - KY
                      - KZ
                      - LA
                      - LB
                      - LC
                      - LI
                      - LK
                      - LR
                      - LS
                      - LT
                      - LU
                      - LV
                      - LY
                      - MA
                      - MC
                      - MD
                      - ME
                      - MF
                      - MG
                      - MH
                      - MK
                      - ML
                      - MM
                      - MN
                      - MO
                      - MP
                      - MQ
                      - MR
                      - MS
                      - MT
                      - MU
                      - MV
                      - MW
                      - MX
                      - MY
                      - MZ
                      - NA
                      - NC
                      - NE
                      - NF
                      - NG
                      - NI
                      - NL
                      - 'NO'
                      - NP
                      - NR
                      - NU
                      - NZ
                      - OM
                      - PA
                      - PE
                      - PF
                      - PG
                      - PH
                      - PK
                      - PL
                      - PM
                      - PN
                      - PR
                      - PS
                      - PT
                      - PW
                      - PY
                      - QA
                      - RE
                      - RO
                      - RS
                      - RU
                      - RW
                      - SA
                      - SB
                      - SC
                      - SD
                      - SE
                      - SG
                      - SH
                      - SI
                      - SJ
                      - SK
                      - SL
                      - SM
                      - SN
                      - SO
                      - SR
                      - SS
                      - ST
                      - SV
                      - SX
                      - SY
                      - SZ
                      - TC
                      - TD
                      - TF
                      - TG
                      - TH
                      - TJ
                      - TK
                      - TL
                      - TM
                      - TN
                      - TO
                      - TR
                      - TT
                      - TV
                      - TW
                      - TZ
                      - UA
                      - UG
                      - UM
                      - US
                      - UY
                      - UZ
                      - VA
                      - VC
                      - VE
                      - VG
                      - VI
                      - VN
                      - VU
                      - WF
                      - WS
                      - XK
                      - YE
                      - YT
                      - ZA
                      - ZM
                      - ZW
                required:
                  - id
                  - user_id
                  - created_at
                  - updated_at
                  - identifier_standard
                  - identifier
                  - type
                  - issuing_country
                additionalProperties: false
              examples:
                national_id:
                  summary: National ID
                  value:
                    id: 83d83ec2-d2ca-49ff-bbea-b92b5c3be202
                    created_at: '2021-07-21T14:10:00.00Z'
                    updated_at: '2021-07-21T14:10:00.00Z'
                    user_id: 00000ec2-d2ca-49ff-bbea-b92b5c3be203
                    type: NATIONAL_ID
                    issuing_country: PL
                    identifier_standard: PESEL
                    identifier: '83053078917'
                passport:
                  summary: Passport
                  value:
                    id: 83d83ec2-d2ca-49ff-bbea-b92b5c3be202
                    created_at: '2021-07-21T14:10:00.00Z'
                    updated_at: '2021-07-21T14:10:00.00Z'
                    user_id: 00000ec2-d2ca-49ff-bbea-b92b5c3be203
                    type: PASSPORT
                    issuing_country: NL
                    identifier_standard: NLPN
                    identifier: '83053078917'
        '400':
          description: Bad Request. The incoming request had a malformed parameter/object.
          headers:
            upvest-request-id:
              required: true
              schema:
                type: string
                format: uuid
                example: 169ae4c7-ebd7-4041-94da-25369653eba7
          content:
            application/problem+json:
              schema:
                title: Error
                type: object
                description: ''
                properties:
                  type:
                    type: string
                    description: URL to a document describing the error condition.
                  status:
                    type: integer
                    description: >-
                      Transmission of the HTTP status code so that all
                      information can be found in one place, but also to correct
                      changes in the status code due to the use of proxy
                      servers.
                  title:
                    type: string
                    description: >-
                      A short, human-readable title for the general error type;
                      the title should not change for given types.
                  detail:
                    type: string
                    description: A human-readable description of the specific error.
                  instance:
                    type: string
                    description: >-
                      This optional key may be present, with a unique URI for
                      the specific error; this will often point to an error log
                      for that specific response.
                  request_id:
                    type: string
                    description: Correlation ID for the original request.
                required:
                  - type
                  - status
                additionalProperties: false
              example:
                status: 400
                type: bad_request
        '401':
          description: Unauthorized. The caller has not been authenticated.
          headers:
            upvest-request-id:
              required: true
              schema:
                type: string
                format: uuid
                example: 169ae4c7-ebd7-4041-94da-25369653eba7
          content:
            application/problem+json:
              schema:
                title: Error
                type: object
                description: ''
                properties:
                  type:
                    type: string
                    description: URL to a document describing the error condition.
                  status:
                    type: integer
                    description: >-
                      Transmission of the HTTP status code so that all
                      information can be found in one place, but also to correct
                      changes in the status code due to the use of proxy
                      servers.
                  title:
                    type: string
                    description: >-
                      A short, human-readable title for the general error type;
                      the title should not change for given types.
                  detail:
                    type: string
                    description: A human-readable description of the specific error.
                  instance:
                    type: string
                    description: >-
                      This optional key may be present, with a unique URI for
                      the specific error; this will often point to an error log
                      for that specific response.
                  request_id:
                    type: string
                    description: Correlation ID for the original request.
                required:
                  - type
                  - status
                additionalProperties: false
              example:
                status: 401
                type: unauthorized
        '403':
          description: >-
            Forbidden. The caller has been authenticated but is not allowed to
            take the requested action.
          headers:
            upvest-request-id:
              required: true
              schema:
                type: string
                format: uuid
                example: 169ae4c7-ebd7-4041-94da-25369653eba7
          content:
            application/problem+json:
              schema:
                title: Error
                type: object
                description: ''
                properties:
                  type:
                    type: string
                    description: URL to a document describing the error condition.
                  status:
                    type: integer
                    description: >-
                      Transmission of the HTTP status code so that all
                      information can be found in one place, but also to correct
                      changes in the status code due to the use of proxy
                      servers.
                  title:
                    type: string
                    description: >-
                      A short, human-readable title for the general error type;
                      the title should not change for given types.
                  detail:
                    type: string
                    description: A human-readable description of the specific error.
                  instance:
                    type: string
                    description: >-
                      This optional key may be present, with a unique URI for
                      the specific error; this will often point to an error log
                      for that specific response.
                  request_id:
                    type: string
                    description: Correlation ID for the original request.
                required:
                  - type
                  - status
                additionalProperties: false
              example:
                status: 403
                type: forbidden
        '404':
          description: Not Found. The requested resource could not be found.
          headers:
            upvest-request-id:
              required: true
              schema:
                type: string
                format: uuid
                example: 169ae4c7-ebd7-4041-94da-25369653eba7
          content:
            application/problem+json:
              schema:
                title: Error
                type: object
                description: ''
                properties:
                  type:
                    type: string
                    description: URL to a document describing the error condition.
                  status:
                    type: integer
                    description: >-
                      Transmission of the HTTP status code so that all
                      information can be found in one place, but also to correct
                      changes in the status code due to the use of proxy
                      servers.
                  title:
                    type: string
                    description: >-
                      A short, human-readable title for the general error type;
                      the title should not change for given types.
                  detail:
                    type: string
                    description: A human-readable description of the specific error.
                  instance:
                    type: string
                    description: >-
                      This optional key may be present, with a unique URI for
                      the specific error; this will often point to an error log
                      for that specific response.
                  request_id:
                    type: string
                    description: Correlation ID for the original request.
                required:
                  - type
                  - status
                additionalProperties: false
              example:
                status: 404
                type: not_found
        '406':
          description: >-
            Not Acceptable. The resource does not have a current representation
            that would be acceptable to the user agent. "Accept" header defined
            unsupported value.
          headers:
            upvest-request-id:
              required: true
              schema:
                type: string
                format: uuid
                example: 169ae4c7-ebd7-4041-94da-25369653eba7
          content:
            application/problem+json:
              schema:
                title: Error
                type: object
                description: ''
                properties:
                  type:
                    type: string
                    description: URL to a document describing the error condition.
                  status:
                    type: integer
                    description: >-
                      Transmission of the HTTP status code so that all
                      information can be found in one place, but also to correct
                      changes in the status code due to the use of proxy
                      servers.
                  title:
                    type: string
                    description: >-
                      A short, human-readable title for the general error type;
                      the title should not change for given types.
                  detail:
                    type: string
                    description: A human-readable description of the specific error.
                  instance:
                    type: string
                    description: >-
                      This optional key may be present, with a unique URI for
                      the specific error; this will often point to an error log
                      for that specific response.
                  request_id:
                    type: string
                    description: Correlation ID for the original request.
                required:
                  - type
                  - status
                additionalProperties: false
              example:
                status: 406
                type: not_acceptable
        '429':
          description: >-
            Too Many Requests. The caller has exceeded their quota for the time
            period and has been throttled.
          headers:
            upvest-request-id:
              required: true
              schema:
                type: string
                format: uuid
                example: 169ae4c7-ebd7-4041-94da-25369653eba7
          content:
            application/problem+json:
              schema:
                title: Error
                type: object
                description: ''
                properties:
                  type:
                    type: string
                    description: URL to a document describing the error condition.
                  status:
                    type: integer
                    description: >-
                      Transmission of the HTTP status code so that all
                      information can be found in one place, but also to correct
                      changes in the status code due to the use of proxy
                      servers.
                  title:
                    type: string
                    description: >-
                      A short, human-readable title for the general error type;
                      the title should not change for given types.
                  detail:
                    type: string
                    description: A human-readable description of the specific error.
                  instance:
                    type: string
                    description: >-
                      This optional key may be present, with a unique URI for
                      the specific error; this will often point to an error log
                      for that specific response.
                  request_id:
                    type: string
                    description: Correlation ID for the original request.
                required:
                  - type
                  - status
                additionalProperties: false
              example:
                status: 429
                type: too_many_requests
        '500':
          description: Internal Server Error. The service encountered an unexpected error.
          headers:
            upvest-request-id:
              required: true
              schema:
                type: string
                format: uuid
                example: 169ae4c7-ebd7-4041-94da-25369653eba7
          content:
            application/problem+json:
              schema:
                title: Error
                type: object
                description: ''
                properties:
                  type:
                    type: string
                    description: URL to a document describing the error condition.
                  status:
                    type: integer
                    description: >-
                      Transmission of the HTTP status code so that all
                      information can be found in one place, but also to correct
                      changes in the status code due to the use of proxy
                      servers.
                  title:
                    type: string
                    description: >-
                      A short, human-readable title for the general error type;
                      the title should not change for given types.
                  detail:
                    type: string
                    description: A human-readable description of the specific error.
                  instance:
                    type: string
                    description: >-
                      This optional key may be present, with a unique URI for
                      the specific error; this will often point to an error log
                      for that specific response.
                  request_id:
                    type: string
                    description: Correlation ID for the original request.
                required:
                  - type
                  - status
                additionalProperties: false
              example:
                status: 500
                type: internal_server_error
        '503':
          description: >-
            Service Unavailable. The service handling for this request cannot be
            reached at this time.
          headers:
            upvest-request-id:
              required: true
              schema:
                type: string
                format: uuid
                example: 169ae4c7-ebd7-4041-94da-25369653eba7
          content:
            application/problem+json:
              schema:
                title: Error
                type: object
                description: ''
                properties:
                  type:
                    type: string
                    description: URL to a document describing the error condition.
                  status:
                    type: integer
                    description: >-
                      Transmission of the HTTP status code so that all
                      information can be found in one place, but also to correct
                      changes in the status code due to the use of proxy
                      servers.
                  title:
                    type: string
                    description: >-
                      A short, human-readable title for the general error type;
                      the title should not change for given types.
                  detail:
                    type: string
                    description: A human-readable description of the specific error.
                  instance:
                    type: string
                    description: >-
                      This optional key may be present, with a unique URI for
                      the specific error; this will often point to an error log
                      for that specific response.
                  request_id:
                    type: string
                    description: Correlation ID for the original request.
                required:
                  - type
                  - status
                additionalProperties: false
              example:
                status: 503
                type: method_not_allowed
        '504':
          description: >-
            Gateway Timeout. The service gateway has reached its internal
            timeout.
          headers:
            upvest-request-id:
              required: true
              schema:
                type: string
                format: uuid
                example: 169ae4c7-ebd7-4041-94da-25369653eba7
          content:
            application/problem+json:
              schema:
                title: Error
                type: object
                description: ''
                properties:
                  type:
                    type: string
                    description: URL to a document describing the error condition.
                  status:
                    type: integer
                    description: >-
                      Transmission of the HTTP status code so that all
                      information can be found in one place, but also to correct
                      changes in the status code due to the use of proxy
                      servers.
                  title:
                    type: string
                    description: >-
                      A short, human-readable title for the general error type;
                      the title should not change for given types.
                  detail:
                    type: string
                    description: A human-readable description of the specific error.
                  instance:
                    type: string
                    description: >-
                      This optional key may be present, with a unique URI for
                      the specific error; this will often point to an error log
                      for that specific response.
                  request_id:
                    type: string
                    description: Correlation ID for the original request.
                required:
                  - type
                  - status
                additionalProperties: false
              example:
                status: 504
                type: gateway_timeout
  /users/{user_id}/identifiers/{identifier_id}:
    parameters:
      - name: user_id
        in: path
        required: true
        schema:
          title: User unique identifier.
          type: string
          description: User unique identifier.
          format: uuid
      - name: identifier_id
        in: path
        required: true
        schema:
          title: Unique identifier for the user's national ID.
          type: string
          description: Unique identifier for the user's national ID.
          format: uuid
      - name: upvest-client-id
        in: header
        description: Tenant Client ID
        required: true
        schema:
          type: string
          format: uuid
          example: ebabcf4d-61c3-4942-875c-e265a7c2d062
      - name: authorization
        in: header
        description: |
          Bearer (access) token from the OAuth flow with correct scopes.
          https://datatracker.ietf.org/doc/html/rfc6750
        required: true
        schema:
          type: string
          pattern: ^Bearer [a-zA-Z0-9\-\._~+/]*=*
          example: Bearer c2VjcmV0Cg==
      - name: signature
        in: header
        required: true
        schema:
          type: string
        description: >-
          https://tools.ietf.org/id/draft-ietf-httpbis-message-signatures-01.html#name-the-signature-http-header
      - name: signature-input
        in: header
        required: true
        schema:
          type: string
        description: >-
          https://tools.ietf.org/id/draft-ietf-httpbis-message-signatures-01.html#name-the-signature-input-http-he
      - name: upvest-api-version
        in: header
        required: false
        schema:
          type: string
          enum:
            - '1'
          default: '1'
          example: '1'
        description: 'Upvest API version (Note: Do not include quotation marks)'
    get:
      operationId: retrieve_identifier
      summary: Get a user identifier by ID
      description: >-
        Returns an existing identifier of a given user used for transaction
        reporting.
      tags:
        - User Identifiers
      security:
        - oauth-client-credentials:
            - users:read
            - users:admin
      responses:
        '200':
          description: OK
          headers:
            upvest-request-id:
              required: true
              schema:
                type: string
                format: uuid
                example: 169ae4c7-ebd7-4041-94da-25369653eba7
          content:
            application/json:
              schema:
                title: Identifier
                type: object
                properties:
                  id:
                    title: Unique identifier for the user's national ID.
                    type: string
                    description: Unique identifier for the user's national ID.
                    format: uuid
                  created_at:
                    type: string
                    format: date-time
                    description: >-
                      Date and time when the resource was created. [RFC
                      3339-5](https://datatracker.ietf.org/doc/html/rfc3339#section-5.6),
                      [ISO8601
                      UTC](https://www.iso.org/iso-8601-date-and-time-format.html)
                  updated_at:
                    type: string
                    format: date-time
                    description: >-
                      Date and time when the resource was last updated. [RFC
                      3339-5](https://datatracker.ietf.org/doc/html/rfc3339#section-5.6),
                      [ISO8601
                      UTC](https://www.iso.org/iso-8601-date-and-time-format.html)
                  user_id:
                    title: User unique identifier.
                    type: string
                    description: User unique identifier.
                    format: uuid
                  identifier_standard:
                    type: string
                    maxLength: 6
                    description: >-
                      Identifier standard abbreviation. If it's not provided,
                      issuing country's corresponding 1st Priority Identifier
                      Standard will be used by default. See [guide
                      here](/documentation/guides/users/identifiers)
                  identifier:
                    type: string
                    maxLength: 30
                    minLength: 0
                    description: >-
                      Identifier value. See [guide
                      here](/documentation/guides/users/identifiers)
                  type:
                    type: string
                    description: |-
                      Identifier type.
                      * NATIONAL_ID - 
                      * PASSPORT - 
                    enum:
                      - NATIONAL_ID
                      - PASSPORT
                    default: NATIONAL_ID
                  issuing_country:
                    description: >-
                      Accepted country code. [ISO 3166-1 alpha-2
                      codes](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2).
                    type: string
                    enum:
                      - AD
                      - AE
                      - AF
                      - AG
                      - AI
                      - AL
                      - AM
                      - AO
                      - AQ
                      - AR
                      - AS
                      - AT
                      - AU
                      - AW
                      - AX
                      - AZ
                      - BA
                      - BB
                      - BD
                      - BE
                      - BF
                      - BG
                      - BH
                      - BI
                      - BJ
                      - BL
                      - BM
                      - BN
                      - BO
                      - BQ
                      - BR
                      - BS
                      - BT
                      - BV
                      - BW
                      - BY
                      - BZ
                      - CA
                      - CC
                      - CD
                      - CF
                      - CG
                      - CH
                      - CI
                      - CK
                      - CL
                      - CM
                      - CN
                      - CO
                      - CR
                      - CU
                      - CV
                      - CW
                      - CX
                      - CY
                      - CZ
                      - DE
                      - DJ
                      - DK
                      - DM
                      - DO
                      - DZ
                      - EC
                      - EE
                      - EG
                      - EH
                      - ER
                      - ES
                      - ET
                      - FI
                      - FJ
                      - FK
                      - FM
                      - FO
                      - FR
                      - GA
                      - GB
                      - GD
                      - GE
                      - GF
                      - GG
                      - GH
                      - GI
                      - GL
                      - GM
                      - GN
                      - GP
                      - GQ
                      - GR
                      - GS
                      - GT
                      - GU
                      - GW
                      - GY
                      - HK
                      - HM
                      - HN
                      - HR
                      - HT
                      - HU
                      - ID
                      - IE
                      - IL
                      - IM
                      - IN
                      - IO
                      - IQ
                      - IR
                      - IS
                      - IT
                      - JE
                      - JM
                      - JO
                      - JP
                      - KE
                      - KG
                      - KH
                      - KI
                      - KM
                      - KN
                      - KP
                      - KR
                      - KW
                      - KY
                      - KZ
                      - LA
                      - LB
                      - LC
                      - LI
                      - LK
                      - LR
                      - LS
                      - LT
                      - LU
                      - LV
                      - LY
                      - MA
                      - MC
                      - MD
                      - ME
                      - MF
                      - MG
                      - MH
                      - MK
                      - ML
                      - MM
                      - MN
                      - MO
                      - MP
                      - MQ
                      - MR
                      - MS
                      - MT
                      - MU
                      - MV
                      - MW
                      - MX
                      - MY
                      - MZ
                      - NA
                      - NC
                      - NE
                      - NF
                      - NG
                      - NI
                      - NL
                      - 'NO'
                      - NP
                      - NR
                      - NU
                      - NZ
                      - OM
                      - PA
                      - PE
                      - PF
                      - PG
                      - PH
                      - PK
                      - PL
                      - PM
                      - PN
                      - PR
                      - PS
                      - PT
                      - PW
                      - PY
                      - QA
                      - RE
                      - RO
                      - RS
                      - RU
                      - RW
                      - SA
                      - SB
                      - SC
                      - SD
                      - SE
                      - SG
                      - SH
                      - SI
                      - SJ
                      - SK
                      - SL
                      - SM
                      - SN
                      - SO
                      - SR
                      - SS
                      - ST
                      - SV
                      - SX
                      - SY
                      - SZ
                      - TC
                      - TD
                      - TF
                      - TG
                      - TH
                      - TJ
                      - TK
                      - TL
                      - TM
                      - TN
                      - TO
                      - TR
                      - TT
                      - TV
                      - TW
                      - TZ
                      - UA
                      - UG
                      - UM
                      - US
                      - UY
                      - UZ
                      - VA
                      - VC
                      - VE
                      - VG
                      - VI
                      - VN
                      - VU
                      - WF
                      - WS
                      - XK
                      - YE
                      - YT
                      - ZA
                      - ZM
                      - ZW
                required:
                  - id
                  - user_id
                  - created_at
                  - updated_at
                  - identifier_standard
                  - identifier
                  - type
                  - issuing_country
                additionalProperties: false
              example:
                id: 83d83ec2-d2ca-49ff-bbea-b92b5c3be202
                created_at: '2021-07-21T14:10:00.00Z'
                updated_at: '2021-07-21T14:10:00.00Z'
                user_id: 00000ec2-d2ca-49ff-bbea-b92b5c3be203
                type: NATIONAL_ID
                issuing_country: PL
                identifier_standard: PESEL
                identifier: '83053078917'
        '401':
          description: Unauthorized. The caller has not been authenticated.
          headers:
            upvest-request-id:
              required: true
              schema:
                type: string
                format: uuid
                example: 169ae4c7-ebd7-4041-94da-25369653eba7
          content:
            application/problem+json:
              schema:
                title: Error
                type: object
                description: ''
                properties:
                  type:
                    type: string
                    description: URL to a document describing the error condition.
                  status:
                    type: integer
                    description: >-
                      Transmission of the HTTP status code so that all
                      information can be found in one place, but also to correct
                      changes in the status code due to the use of proxy
                      servers.
                  title:
                    type: string
                    description: >-
                      A short, human-readable title for the general error type;
                      the title should not change for given types.
                  detail:
                    type: string
                    description: A human-readable description of the specific error.
                  instance:
                    type: string
                    description: >-
                      This optional key may be present, with a unique URI for
                      the specific error; this will often point to an error log
                      for that specific response.
                  request_id:
                    type: string
                    description: Correlation ID for the original request.
                required:
                  - type
                  - status
                additionalProperties: false
              example:
                status: 401
                type: unauthorized
        '403':
          description: >-
            Forbidden. The caller has been authenticated but is not allowed to
            take the requested action.
          headers:
            upvest-request-id:
              required: true
              schema:
                type: string
                format: uuid
                example: 169ae4c7-ebd7-4041-94da-25369653eba7
          content:
            application/problem+json:
              schema:
                title: Error
                type: object
                description: ''
                properties:
                  type:
                    type: string
                    description: URL to a document describing the error condition.
                  status:
                    type: integer
                    description: >-
                      Transmission of the HTTP status code so that all
                      information can be found in one place, but also to correct
                      changes in the status code due to the use of proxy
                      servers.
                  title:
                    type: string
                    description: >-
                      A short, human-readable title for the general error type;
                      the title should not change for given types.
                  detail:
                    type: string
                    description: A human-readable description of the specific error.
                  instance:
                    type: string
                    description: >-
                      This optional key may be present, with a unique URI for
                      the specific error; this will often point to an error log
                      for that specific response.
                  request_id:
                    type: string
                    description: Correlation ID for the original request.
                required:
                  - type
                  - status
                additionalProperties: false
              example:
                status: 403
                type: forbidden
        '404':
          description: Not Found. The requested resource could not be found.
          headers:
            upvest-request-id:
              required: true
              schema:
                type: string
                format: uuid
                example: 169ae4c7-ebd7-4041-94da-25369653eba7
          content:
            application/problem+json:
              schema:
                title: Error
                type: object
                description: ''
                properties:
                  type:
                    type: string
                    description: URL to a document describing the error condition.
                  status:
                    type: integer
                    description: >-
                      Transmission of the HTTP status code so that all
                      information can be found in one place, but also to correct
                      changes in the status code due to the use of proxy
                      servers.
                  title:
                    type: string
                    description: >-
                      A short, human-readable title for the general error type;
                      the title should not change for given types.
                  detail:
                    type: string
                    description: A human-readable description of the specific error.
                  instance:
                    type: string
                    description: >-
                      This optional key may be present, with a unique URI for
                      the specific error; this will often point to an error log
                      for that specific response.
                  request_id:
                    type: string
                    description: Correlation ID for the original request.
                required:
                  - type
                  - status
                additionalProperties: false
              example:
                status: 404
                type: not_found
        '406':
          description: >-
            Not Acceptable. The resource does not have a current representation
            that would be acceptable to the user agent. "Accept" header defined
            unsupported value.
          headers:
            upvest-request-id:
              required: true
              schema:
                type: string
                format: uuid
                example: 169ae4c7-ebd7-4041-94da-25369653eba7
          content:
            application/problem+json:
              schema:
                title: Error
                type: object
                description: ''
                properties:
                  type:
                    type: string
                    description: URL to a document describing the error condition.
                  status:
                    type: integer
                    description: >-
                      Transmission of the HTTP status code so that all
                      information can be found in one place, but also to correct
                      changes in the status code due to the use of proxy
                      servers.
                  title:
                    type: string
                    description: >-
                      A short, human-readable title for the general error type;
                      the title should not change for given types.
                  detail:
                    type: string
                    description: A human-readable description of the specific error.
                  instance:
                    type: string
                    description: >-
                      This optional key may be present, with a unique URI for
                      the specific error; this will often point to an error log
                      for that specific response.
                  request_id:
                    type: string
                    description: Correlation ID for the original request.
                required:
                  - type
                  - status
                additionalProperties: false
              example:
                status: 406
                type: not_acceptable
        '429':
          description: >-
            Too Many Requests. The caller has exceeded their quota for the time
            period and has been throttled.
          headers:
            upvest-request-id:
              required: true
              schema:
                type: string
                format: uuid
                example: 169ae4c7-ebd7-4041-94da-25369653eba7
          content:
            application/problem+json:
              schema:
                title: Error
                type: object
                description: ''
                properties:
                  type:
                    type: string
                    description: URL to a document describing the error condition.
                  status:
                    type: integer
                    description: >-
                      Transmission of the HTTP status code so that all
                      information can be found in one place, but also to correct
                      changes in the status code due to the use of proxy
                      servers.
                  title:
                    type: string
                    description: >-
                      A short, human-readable title for the general error type;
                      the title should not change for given types.
                  detail:
                    type: string
                    description: A human-readable description of the specific error.
                  instance:
                    type: string
                    description: >-
                      This optional key may be present, with a unique URI for
                      the specific error; this will often point to an error log
                      for that specific response.
                  request_id:
                    type: string
                    description: Correlation ID for the original request.
                required:
                  - type
                  - status
                additionalProperties: false
              example:
                status: 429
                type: too_many_requests
        '500':
          description: Internal Server Error. The service encountered an unexpected error.
          headers:
            upvest-request-id:
              required: true
              schema:
                type: string
                format: uuid
                example: 169ae4c7-ebd7-4041-94da-25369653eba7
          content:
            application/problem+json:
              schema:
                title: Error
                type: object
                description: ''
                properties:
                  type:
                    type: string
                    description: URL to a document describing the error condition.
                  status:
                    type: integer
                    description: >-
                      Transmission of the HTTP status code so that all
                      information can be found in one place, but also to correct
                      changes in the status code due to the use of proxy
                      servers.
                  title:
                    type: string
                    description: >-
                      A short, human-readable title for the general error type;
                      the title should not change for given types.
                  detail:
                    type: string
                    description: A human-readable description of the specific error.
                  instance:
                    type: string
                    description: >-
                      This optional key may be present, with a unique URI for
                      the specific error; this will often point to an error log
                      for that specific response.
                  request_id:
                    type: string
                    description: Correlation ID for the original request.
                required:
                  - type
                  - status
                additionalProperties: false
              example:
                status: 500
                type: internal_server_error
        '503':
          description: >-
            Service Unavailable. The service handling for this request cannot be
            reached at this time.
          headers:
            upvest-request-id:
              required: true
              schema:
                type: string
                format: uuid
                example: 169ae4c7-ebd7-4041-94da-25369653eba7
          content:
            application/problem+json:
              schema:
                title: Error
                type: object
                description: ''
                properties:
                  type:
                    type: string
                    description: URL to a document describing the error condition.
                  status:
                    type: integer
                    description: >-
                      Transmission of the HTTP status code so that all
                      information can be found in one place, but also to correct
                      changes in the status code due to the use of proxy
                      servers.
                  title:
                    type: string
                    description: >-
                      A short, human-readable title for the general error type;
                      the title should not change for given types.
                  detail:
                    type: string
                    description: A human-readable description of the specific error.
                  instance:
                    type: string
                    description: >-
                      This optional key may be present, with a unique URI for
                      the specific error; this will often point to an error log
                      for that specific response.
                  request_id:
                    type: string
                    description: Correlation ID for the original request.
                required:
                  - type
                  - status
                additionalProperties: false
              example:
                status: 503
                type: method_not_allowed
        '504':
          description: >-
            Gateway Timeout. The service gateway has reached its internal
            timeout.
          headers:
            upvest-request-id:
              required: true
              schema:
                type: string
                format: uuid
                example: 169ae4c7-ebd7-4041-94da-25369653eba7
          content:
            application/problem+json:
              schema:
                title: Error
                type: object
                description: ''
                properties:
                  type:
                    type: string
                    description: URL to a document describing the error condition.
                  status:
                    type: integer
                    description: >-
                      Transmission of the HTTP status code so that all
                      information can be found in one place, but also to correct
                      changes in the status code due to the use of proxy
                      servers.
                  title:
                    type: string
                    description: >-
                      A short, human-readable title for the general error type;
                      the title should not change for given types.
                  detail:
                    type: string
                    description: A human-readable description of the specific error.
                  instance:
                    type: string
                    description: >-
                      This optional key may be present, with a unique URI for
                      the specific error; this will often point to an error log
                      for that specific response.
                  request_id:
                    type: string
                    description: Correlation ID for the original request.
                required:
                  - type
                  - status
                additionalProperties: false
              example:
                status: 504
                type: gateway_timeout
    patch:
      operationId: update_identifier
      summary: Update a user identifier by ID
      description: >-
        Updates an existing identifier of a given user used for transaction
        reporting.
      tags:
        - User Identifiers
      security:
        - oauth-client-credentials:
            - users:admin
      requestBody:
        content:
          application/json:
            schema:
              title: Identifier - Update - Request
              type: object
              properties:
                identifier:
                  type: string
                  maxLength: 30
                  minLength: 0
                  description: >-
                    Identifier value. See [guide
                    here](/documentation/guides/users/identifiers)
              required:
                - identifier
              additionalProperties: false
            example:
              identifier: '83053078111'
      responses:
        '200':
          description: The user identifier is updated.
          headers:
            upvest-request-id:
              required: true
              schema:
                type: string
                format: uuid
                example: 169ae4c7-ebd7-4041-94da-25369653eba7
          content:
            application/json:
              schema:
                title: Identifier
                type: object
                properties:
                  id:
                    title: Unique identifier for the user's national ID.
                    type: string
                    description: Unique identifier for the user's national ID.
                    format: uuid
                  created_at:
                    type: string
                    format: date-time
                    description: >-
                      Date and time when the resource was created. [RFC
                      3339-5](https://datatracker.ietf.org/doc/html/rfc3339#section-5.6),
                      [ISO8601
                      UTC](https://www.iso.org/iso-8601-date-and-time-format.html)
                  updated_at:
                    type: string
                    format: date-time
                    description: >-
                      Date and time when the resource was last updated. [RFC
                      3339-5](https://datatracker.ietf.org/doc/html/rfc3339#section-5.6),
                      [ISO8601
                      UTC](https://www.iso.org/iso-8601-date-and-time-format.html)
                  user_id:
                    title: User unique identifier.
                    type: string
                    description: User unique identifier.
                    format: uuid
                  identifier_standard:
                    type: string
                    maxLength: 6
                    description: >-
                      Identifier standard abbreviation. If it's not provided,
                      issuing country's corresponding 1st Priority Identifier
                      Standard will be used by default. See [guide
                      here](/documentation/guides/users/identifiers)
                  identifier:
                    type: string
                    maxLength: 30
                    minLength: 0
                    description: >-
                      Identifier value. See [guide
                      here](/documentation/guides/users/identifiers)
                  type:
                    type: string
                    description: |-
                      Identifier type.
                      * NATIONAL_ID - 
                      * PASSPORT - 
                    enum:
                      - NATIONAL_ID
                      - PASSPORT
                    default: NATIONAL_ID
                  issuing_country:
                    description: >-
                      Accepted country code. [ISO 3166-1 alpha-2
                      codes](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2).
                    type: string
                    enum:
                      - AD
                      - AE
                      - AF
                      - AG
                      - AI
                      - AL
                      - AM
                      - AO
                      - AQ
                      - AR
                      - AS
                      - AT
                      - AU
                      - AW
                      - AX
                      - AZ
                      - BA
                      - BB
                      - BD
                      - BE
                      - BF
                      - BG
                      - BH
                      - BI
                      - BJ
                      - BL
                      - BM
                      - BN
                      - BO
                      - BQ
                      - BR
                      - BS
                      - BT
                      - BV
                      - BW
                      - BY
                      - BZ
                      - CA
                      - CC
                      - CD
                      - CF
                      - CG
                      - CH
                      - CI
                      - CK
                      - CL
                      - CM
                      - CN
                      - CO
                      - CR
                      - CU
                      - CV
                      - CW
                      - CX
                      - CY
                      - CZ
                      - DE
                      - DJ
                      - DK
                      - DM
                      - DO
                      - DZ
                      - EC
                      - EE
                      - EG
                      - EH
                      - ER
                      - ES
                      - ET
                      - FI
                      - FJ
                      - FK
                      - FM
                      - FO
                      - FR
                      - GA
                      - GB
                      - GD
                      - GE
                      - GF
                      - GG
                      - GH
                      - GI
                      - GL
                      - GM
                      - GN
                      - GP
                      - GQ
                      - GR
                      - GS
                      - GT
                      - GU
                      - GW
                      - GY
                      - HK
                      - HM
                      - HN
                      - HR
                      - HT
                      - HU
                      - ID
                      - IE
                      - IL
                      - IM
                      - IN
                      - IO
                      - IQ
                      - IR
                      - IS
                      - IT
                      - JE
                      - JM
                      - JO
                      - JP
                      - KE
                      - KG
                      - KH
                      - KI
                      - KM
                      - KN
                      - KP
                      - KR
                      - KW
                      - KY
                      - KZ
                      - LA
                      - LB
                      - LC
                      - LI
                      - LK
                      - LR
                      - LS
                      - LT
                      - LU
                      - LV
                      - LY
                      - MA
                      - MC
                      - MD
                      - ME
                      - MF
                      - MG
                      - MH
                      - MK
                      - ML
                      - MM
                      - MN
                      - MO
                      - MP
                      - MQ
                      - MR
                      - MS
                      - MT
                      - MU
                      - MV
                      - MW
                      - MX
                      - MY
                      - MZ
                      - NA
                      - NC
                      - NE
                      - NF
                      - NG
                      - NI
                      - NL
                      - 'NO'
                      - NP
                      - NR
                      - NU
                      - NZ
                      - OM
                      - PA
                      - PE
                      - PF
                      - PG
                      - PH
                      - PK
                      - PL
                      - PM
                      - PN
                      - PR
                      - PS
                      - PT
                      - PW
                      - PY
                      - QA
                      - RE
                      - RO
                      - RS
                      - RU
                      - RW
                      - SA
                      - SB
                      - SC
                      - SD
                      - SE
                      - SG
                      - SH
                      - SI
                      - SJ
                      - SK
                      - SL
                      - SM
                      - SN
                      - SO
                      - SR
                      - SS
                      - ST
                      - SV
                      - SX
                      - SY
                      - SZ
                      - TC
                      - TD
                      - TF
                      - TG
                      - TH
                      - TJ
                      - TK
                      - TL
                      - TM
                      - TN
                      - TO
                      - TR
                      - TT
                      - TV
                      - TW
                      - TZ
                      - UA
                      - UG
                      - UM
                      - US
                      - UY
                      - UZ
                      - VA
                      - VC
                      - VE
                      - VG
                      - VI
                      - VN
                      - VU
                      - WF
                      - WS
                      - XK
                      - YE
                      - YT
                      - ZA
                      - ZM
                      - ZW
                required:
                  - id
                  - user_id
                  - created_at
                  - updated_at
                  - identifier_standard
                  - identifier
                  - type
                  - issuing_country
                additionalProperties: false
              example:
                id: 83d83ec2-d2ca-49ff-bbea-b92b5c3be202
                created_at: '2021-07-21T14:10:00.00Z'
                updated_at: '2021-07-22T15:20:10.00Z'
                user_id: 00000ec2-d2ca-49ff-bbea-b92b5c3be203
                type: NATIONAL_ID
                issuing_country: PL
                identifier_standard: PESEL
                identifier: '83053078111'
        '400':
          description: Bad Request. The incoming request had a malformed parameter/object.
          headers:
            upvest-request-id:
              required: true
              schema:
                type: string
                format: uuid
                example: 169ae4c7-ebd7-4041-94da-25369653eba7
          content:
            application/problem+json:
              schema:
                title: Error
                type: object
                description: ''
                properties:
                  type:
                    type: string
                    description: URL to a document describing the error condition.
                  status:
                    type: integer
                    description: >-
                      Transmission of the HTTP status code so that all
                      information can be found in one place, but also to correct
                      changes in the status code due to the use of proxy
                      servers.
                  title:
                    type: string
                    description: >-
                      A short, human-readable title for the general error type;
                      the title should not change for given types.
                  detail:
                    type: string
                    description: A human-readable description of the specific error.
                  instance:
                    type: string
                    description: >-
                      This optional key may be present, with a unique URI for
                      the specific error; this will often point to an error log
                      for that specific response.
                  request_id:
                    type: string
                    description: Correlation ID for the original request.
                required:
                  - type
                  - status
                additionalProperties: false
              example:
                status: 400
                type: bad_request
        '401':
          description: Unauthorized. The caller has not been authenticated.
          headers:
            upvest-request-id:
              required: true
              schema:
                type: string
                format: uuid
                example: 169ae4c7-ebd7-4041-94da-25369653eba7
          content:
            application/problem+json:
              schema:
                title: Error
                type: object
                description: ''
                properties:
                  type:
                    type: string
                    description: URL to a document describing the error condition.
                  status:
                    type: integer
                    description: >-
                      Transmission of the HTTP status code so that all
                      information can be found in one place, but also to correct
                      changes in the status code due to the use of proxy
                      servers.
                  title:
                    type: string
                    description: >-
                      A short, human-readable title for the general error type;
                      the title should not change for given types.
                  detail:
                    type: string
                    description: A human-readable description of the specific error.
                  instance:
                    type: string
                    description: >-
                      This optional key may be present, with a unique URI for
                      the specific error; this will often point to an error log
                      for that specific response.
                  request_id:
                    type: string
                    description: Correlation ID for the original request.
                required:
                  - type
                  - status
                additionalProperties: false
              example:
                status: 401
                type: unauthorized
        '403':
          description: >-
            Forbidden. The caller has been authenticated but is not allowed to
            take the requested action.
          headers:
            upvest-request-id:
              required: true
              schema:
                type: string
                format: uuid
                example: 169ae4c7-ebd7-4041-94da-25369653eba7
          content:
            application/problem+json:
              schema:
                title: Error
                type: object
                description: ''
                properties:
                  type:
                    type: string
                    description: URL to a document describing the error condition.
                  status:
                    type: integer
                    description: >-
                      Transmission of the HTTP status code so that all
                      information can be found in one place, but also to correct
                      changes in the status code due to the use of proxy
                      servers.
                  title:
                    type: string
                    description: >-
                      A short, human-readable title for the general error type;
                      the title should not change for given types.
                  detail:
                    type: string
                    description: A human-readable description of the specific error.
                  instance:
                    type: string
                    description: >-
                      This optional key may be present, with a unique URI for
                      the specific error; this will often point to an error log
                      for that specific response.
                  request_id:
                    type: string
                    description: Correlation ID for the original request.
                required:
                  - type
                  - status
                additionalProperties: false
              example:
                status: 403
                type: forbidden
        '404':
          description: Not Found. The requested resource could not be found.
          headers:
            upvest-request-id:
              required: true
              schema:
                type: string
                format: uuid
                example: 169ae4c7-ebd7-4041-94da-25369653eba7
          content:
            application/problem+json:
              schema:
                title: Error
                type: object
                description: ''
                properties:
                  type:
                    type: string
                    description: URL to a document describing the error condition.
                  status:
                    type: integer
                    description: >-
                      Transmission of the HTTP status code so that all
                      information can be found in one place, but also to correct
                      changes in the status code due to the use of proxy
                      servers.
                  title:
                    type: string
                    description: >-
                      A short, human-readable title for the general error type;
                      the title should not change for given types.
                  detail:
                    type: string
                    description: A human-readable description of the specific error.
                  instance:
                    type: string
                    description: >-
                      This optional key may be present, with a unique URI for
                      the specific error; this will often point to an error log
                      for that specific response.
                  request_id:
                    type: string
                    description: Correlation ID for the original request.
                required:
                  - type
                  - status
                additionalProperties: false
              example:
                status: 404
                type: not_found
        '406':
          description: >-
            Not Acceptable. The resource does not have a current representation
            that would be acceptable to the user agent. "Accept" header defined
            unsupported value.
          headers:
            upvest-request-id:
              required: true
              schema:
                type: string
                format: uuid
                example: 169ae4c7-ebd7-4041-94da-25369653eba7
          content:
            application/problem+json:
              schema:
                title: Error
                type: object
                description: ''
                properties:
                  type:
                    type: string
                    description: URL to a document describing the error condition.
                  status:
                    type: integer
                    description: >-
                      Transmission of the HTTP status code so that all
                      information can be found in one place, but also to correct
                      changes in the status code due to the use of proxy
                      servers.
                  title:
                    type: string
                    description: >-
                      A short, human-readable title for the general error type;
                      the title should not change for given types.
                  detail:
                    type: string
                    description: A human-readable description of the specific error.
                  instance:
                    type: string
                    description: >-
                      This optional key may be present, with a unique URI for
                      the specific error; this will often point to an error log
                      for that specific response.
                  request_id:
                    type: string
                    description: Correlation ID for the original request.
                required:
                  - type
                  - status
                additionalProperties: false
              example:
                status: 406
                type: not_acceptable
        '429':
          description: >-
            Too Many Requests. The caller has exceeded their quota for the time
            period and has been throttled.
          headers:
            upvest-request-id:
              required: true
              schema:
                type: string
                format: uuid
                example: 169ae4c7-ebd7-4041-94da-25369653eba7
          content:
            application/problem+json:
              schema:
                title: Error
                type: object
                description: ''
                properties:
                  type:
                    type: string
                    description: URL to a document describing the error condition.
                  status:
                    type: integer
                    description: >-
                      Transmission of the HTTP status code so that all
                      information can be found in one place, but also to correct
                      changes in the status code due to the use of proxy
                      servers.
                  title:
                    type: string
                    description: >-
                      A short, human-readable title for the general error type;
                      the title should not change for given types.
                  detail:
                    type: string
                    description: A human-readable description of the specific error.
                  instance:
                    type: string
                    description: >-
                      This optional key may be present, with a unique URI for
                      the specific error; this will often point to an error log
                      for that specific response.
                  request_id:
                    type: string
                    description: Correlation ID for the original request.
                required:
                  - type
                  - status
                additionalProperties: false
              example:
                status: 429
                type: too_many_requests
        '500':
          description: Internal Server Error. The service encountered an unexpected error.
          headers:
            upvest-request-id:
              required: true
              schema:
                type: string
                format: uuid
                example: 169ae4c7-ebd7-4041-94da-25369653eba7
          content:
            application/problem+json:
              schema:
                title: Error
                type: object
                description: ''
                properties:
                  type:
                    type: string
                    description: URL to a document describing the error condition.
                  status:
                    type: integer
                    description: >-
                      Transmission of the HTTP status code so that all
                      information can be found in one place, but also to correct
                      changes in the status code due to the use of proxy
                      servers.
                  title:
                    type: string
                    description: >-
                      A short, human-readable title for the general error type;
                      the title should not change for given types.
                  detail:
                    type: string
                    description: A human-readable description of the specific error.
                  instance:
                    type: string
                    description: >-
                      This optional key may be present, with a unique URI for
                      the specific error; this will often point to an error log
                      for that specific response.
                  request_id:
                    type: string
                    description: Correlation ID for the original request.
                required:
                  - type
                  - status
                additionalProperties: false
              example:
                status: 500
                type: internal_server_error
        '503':
          description: >-
            Service Unavailable. The service handling for this request cannot be
            reached at this time.
          headers:
            upvest-request-id:
              required: true
              schema:
                type: string
                format: uuid
                example: 169ae4c7-ebd7-4041-94da-25369653eba7
          content:
            application/problem+json:
              schema:
                title: Error
                type: object
                description: ''
                properties:
                  type:
                    type: string
                    description: URL to a document describing the error condition.
                  status:
                    type: integer
                    description: >-
                      Transmission of the HTTP status code so that all
                      information can be found in one place, but also to correct
                      changes in the status code due to the use of proxy
                      servers.
                  title:
                    type: string
                    description: >-
                      A short, human-readable title for the general error type;
                      the title should not change for given types.
                  detail:
                    type: string
                    description: A human-readable description of the specific error.
                  instance:
                    type: string
                    description: >-
                      This optional key may be present, with a unique URI for
                      the specific error; this will often point to an error log
                      for that specific response.
                  request_id:
                    type: string
                    description: Correlation ID for the original request.
                required:
                  - type
                  - status
                additionalProperties: false
              example:
                status: 503
                type: method_not_allowed
        '504':
          description: >-
            Gateway Timeout. The service gateway has reached its internal
            timeout.
          headers:
            upvest-request-id:
              required: true
              schema:
                type: string
                format: uuid
                example: 169ae4c7-ebd7-4041-94da-25369653eba7
          content:
            application/problem+json:
              schema:
                title: Error
                type: object
                description: ''
                properties:
                  type:
                    type: string
                    description: URL to a document describing the error condition.
                  status:
                    type: integer
                    description: >-
                      Transmission of the HTTP status code so that all
                      information can be found in one place, but also to correct
                      changes in the status code due to the use of proxy
                      servers.
                  title:
                    type: string
                    description: >-
                      A short, human-readable title for the general error type;
                      the title should not change for given types.
                  detail:
                    type: string
                    description: A human-readable description of the specific error.
                  instance:
                    type: string
                    description: >-
                      This optional key may be present, with a unique URI for
                      the specific error; this will often point to an error log
                      for that specific response.
                  request_id:
                    type: string
                    description: Correlation ID for the original request.
                required:
                  - type
                  - status
                additionalProperties: false
              example:
                status: 504
                type: gateway_timeout
  /users/{user_id}/account_groups:
    parameters:
      - name: user_id
        in: path
        required: true
        schema:
          title: User unique identifier.
          type: string
          description: User unique identifier.
          format: uuid
      - name: upvest-client-id
        in: header
        description: Tenant Client ID
        required: true
        schema:
          type: string
          format: uuid
          example: ebabcf4d-61c3-4942-875c-e265a7c2d062
      - name: authorization
        in: header
        description: |
          Bearer (access) token from the OAuth flow with correct scopes.
          https://datatracker.ietf.org/doc/html/rfc6750
        required: true
        schema:
          type: string
          pattern: ^Bearer [a-zA-Z0-9\-\._~+/]*=*
          example: Bearer c2VjcmV0Cg==
      - name: signature
        in: header
        required: true
        schema:
          type: string
        description: >-
          https://tools.ietf.org/id/draft-ietf-httpbis-message-signatures-01.html#name-the-signature-http-header
      - name: signature-input
        in: header
        required: true
        schema:
          type: string
        description: >-
          https://tools.ietf.org/id/draft-ietf-httpbis-message-signatures-01.html#name-the-signature-input-http-he
      - name: upvest-api-version
        in: header
        required: false
        schema:
          type: string
          enum:
            - '1'
          default: '1'
          example: '1'
        description: 'Upvest API version (Note: Do not include quotation marks)'
    get:
      operationId: list_user_account_groups
      summary: Get user account groups
      description: Lists the account groups of a user specified by ID.
      tags:
        - Account Groups
      security:
        - oauth-client-credentials:
            - accounts:read
            - accounts:admin
      parameters:
        - name: sort
          in: query
          required: false
          schema:
            type: string
            enum:
              - created_at
              - updated_at
            default: created_at
          description: Sort the result by `created_at`, `updated_at`.
        - name: order
          in: query
          required: false
          schema:
            type: string
            enum:
              - ASC
              - DESC
            default: ASC
          description: >-
            Sort order of the result list if the `sort` parameter is specified.
            Use `ASC` for ascending or `DESC` for descending sort order.
        - name: offset
          in: query
          schema:
            type: integer
            minimum: 0
            format: int32
          allowEmptyValue: true
          description: >-
            Use the `offset` argument to specify where in the list of results to
            start when returning items for a particular query.
        - name: limit
          in: query
          schema:
            type: integer
            format: int32
            default: 100
            minimum: 0
            maximum: 1000
          allowEmptyValue: true
          description: >-
            Use the `limit` argument to specify the maximum number of items
            returned.
      responses:
        '200':
          description: OK
          headers:
            upvest-request-id:
              required: true
              schema:
                type: string
                format: uuid
                example: 169ae4c7-ebd7-4041-94da-25369653eba7
          content:
            application/json:
              schema:
                title: Account Groups - List - Response
                type: object
                properties:
                  meta:
                    type: object
                    properties:
                      offset:
                        type: integer
                        description: Amount of resource to offset in the response.
                      limit:
                        type: integer
                        description: Total limit of the response.
                      count:
                        type: integer
                        description: Count of the resources returned in the response.
                      total_count:
                        type: integer
                        description: Total count of all the resources.
                      sort:
                        type: string
                        description: The field that the list is sorted by.
                      order:
                        type: string
                        description: |-
                          The ordering of the response.
                          * ASC - Ascending order
                          * DESC - Descending order
                        enum:
                          - ASC
                          - DESC
                    required:
                      - offset
                      - limit
                      - count
                      - total_count
                  data:
                    type: array
                    items:
                      title: Account Group
                      type: object
                      description: ''
                      properties:
                        id:
                          title: Account group unique identifier.
                          type: string
                          description: Account group unique identifier.
                          format: uuid
                        created_at:
                          type: string
                          format: date-time
                          description: >-
                            Date and time when the resource was created. [RFC
                            3339-5](https://datatracker.ietf.org/doc/html/rfc3339#section-5.6),
                            [ISO8601
                            UTC](https://www.iso.org/iso-8601-date-and-time-format.html)
                        updated_at:
                          type: string
                          format: date-time
                          description: >-
                            Date and time when the resource was last updated.
                            [RFC
                            3339-5](https://datatracker.ietf.org/doc/html/rfc3339#section-5.6),
                            [ISO8601
                            UTC](https://www.iso.org/iso-8601-date-and-time-format.html)
                        users:
                          type: array
                          items:
                            type: object
                            properties:
                              id:
                                title: User unique identifier.
                                type: string
                                description: User unique identifier.
                                format: uuid
                              type:
                                type: string
                                description: |-
                                  Relation type
                                  * OWNER - 
                                enum:
                                  - OWNER
                                default: OWNER
                        status:
                          type: string
                          description: >-
                            Status of the account group

                            * PENDING_APPROVAL - Account group approval is
                            pending - the account group is visible through our
                            API but cannot be acted on.

                            * ACTIVE - Account group is active - full
                            functionality of the Investment API is accessible.

                            * CLOSING - Account group is closing.

                            * CLOSED - Account group is closed.

                            * LOCKED - Account group is locked for all actions.
                          enum:
                            - PENDING_APPROVAL
                            - ACTIVE
                            - CLOSING
                            - CLOSED
                            - LOCKED
                        type:
                          type: string
                          description: >-
                            Account group type.

                            * PERSONAL - Account group of a person holding
                            assets on their own behalf.

                            * LEGAL_ENTITY - Account group of a legal entity
                            holding assets on behalf of their users.

                            * FRENCH_PEA - Account group of a french resident
                            holding assets in Plan d'Epargne en Actions.

                            * ISA - Account group of a UK resident holding
                            assets in an individual savings account.

                            * CHILD - Account group of a child user holding
                            assets in a child account.
                          enum:
                            - PERSONAL
                            - LEGAL_ENTITY
                            - FRENCH_PEA
                            - ISA
                            - CHILD
                        securities_account_number:
                          type: string
                          description: Securities account number
                          pattern: ^[0-9]{9}$
                      required:
                        - id
                        - created_at
                        - updated_at
                        - users
                        - status
                        - type
                        - securities_account_number
                      additionalProperties: false
                required:
                  - meta
                  - data
                additionalProperties: false
              example:
                meta:
                  offset: 0
                  limit: 100
                  count: 1
                  total_count: 1
                  sort: id
                  order: ASC
                data:
                  - id: 9d95820d-4333-46b6-98de-04ab7512e76f
                    created_at: '2020-08-24T14:15:22Z'
                    updated_at: '2020-08-24T14:15:22Z'
                    type: PERSONAL
                    status: ACTIVE
                    users:
                      - id: 9c36af78-91a0-4174-a515-fc81214e3dab
                        type: OWNER
                    securities_account_number: '123456789'
        '400':
          description: Bad Request. The incoming request had a malformed parameter/object.
          headers:
            upvest-request-id:
              required: true
              schema:
                type: string
                format: uuid
                example: 169ae4c7-ebd7-4041-94da-25369653eba7
          content:
            application/problem+json:
              schema:
                title: Error
                type: object
                description: ''
                properties:
                  type:
                    type: string
                    description: URL to a document describing the error condition.
                  status:
                    type: integer
                    description: >-
                      Transmission of the HTTP status code so that all
                      information can be found in one place, but also to correct
                      changes in the status code due to the use of proxy
                      servers.
                  title:
                    type: string
                    description: >-
                      A short, human-readable title for the general error type;
                      the title should not change for given types.
                  detail:
                    type: string
                    description: A human-readable description of the specific error.
                  instance:
                    type: string
                    description: >-
                      This optional key may be present, with a unique URI for
                      the specific error; this will often point to an error log
                      for that specific response.
                  request_id:
                    type: string
                    description: Correlation ID for the original request.
                required:
                  - type
                  - status
                additionalProperties: false
              example:
                status: 400
                type: bad_request
        '401':
          description: Unauthorized. The caller has not been authenticated.
          headers:
            upvest-request-id:
              required: true
              schema:
                type: string
                format: uuid
                example: 169ae4c7-ebd7-4041-94da-25369653eba7
          content:
            application/problem+json:
              schema:
                title: Error
                type: object
                description: ''
                properties:
                  type:
                    type: string
                    description: URL to a document describing the error condition.
                  status:
                    type: integer
                    description: >-
                      Transmission of the HTTP status code so that all
                      information can be found in one place, but also to correct
                      changes in the status code due to the use of proxy
                      servers.
                  title:
                    type: string
                    description: >-
                      A short, human-readable title for the general error type;
                      the title should not change for given types.
                  detail:
                    type: string
                    description: A human-readable description of the specific error.
                  instance:
                    type: string
                    description: >-
                      This optional key may be present, with a unique URI for
                      the specific error; this will often point to an error log
                      for that specific response.
                  request_id:
                    type: string
                    description: Correlation ID for the original request.
                required:
                  - type
                  - status
                additionalProperties: false
              example:
                status: 401
                type: unauthorized
        '403':
          description: >-
            Forbidden. The caller has been authenticated but is not allowed to
            take the requested action.
          headers:
            upvest-request-id:
              required: true
              schema:
                type: string
                format: uuid
                example: 169ae4c7-ebd7-4041-94da-25369653eba7
          content:
            application/problem+json:
              schema:
                title: Error
                type: object
                description: ''
                properties:
                  type:
                    type: string
                    description: URL to a document describing the error condition.
                  status:
                    type: integer
                    description: >-
                      Transmission of the HTTP status code so that all
                      information can be found in one place, but also to correct
                      changes in the status code due to the use of proxy
                      servers.
                  title:
                    type: string
                    description: >-
                      A short, human-readable title for the general error type;
                      the title should not change for given types.
                  detail:
                    type: string
                    description: A human-readable description of the specific error.
                  instance:
                    type: string
                    description: >-
                      This optional key may be present, with a unique URI for
                      the specific error; this will often point to an error log
                      for that specific response.
                  request_id:
                    type: string
                    description: Correlation ID for the original request.
                required:
                  - type
                  - status
                additionalProperties: false
              example:
                status: 403
                type: forbidden
        '404':
          description: Not Found. The requested resource could not be found.
          headers:
            upvest-request-id:
              required: true
              schema:
                type: string
                format: uuid
                example: 169ae4c7-ebd7-4041-94da-25369653eba7
          content:
            application/problem+json:
              schema:
                title: Error
                type: object
                description: ''
                properties:
                  type:
                    type: string
                    description: URL to a document describing the error condition.
                  status:
                    type: integer
                    description: >-
                      Transmission of the HTTP status code so that all
                      information can be found in one place, but also to correct
                      changes in the status code due to the use of proxy
                      servers.
                  title:
                    type: string
                    description: >-
                      A short, human-readable title for the general error type;
                      the title should not change for given types.
                  detail:
                    type: string
                    description: A human-readable description of the specific error.
                  instance:
                    type: string
                    description: >-
                      This optional key may be present, with a unique URI for
                      the specific error; this will often point to an error log
                      for that specific response.
                  request_id:
                    type: string
                    description: Correlation ID for the original request.
                required:
                  - type
                  - status
                additionalProperties: false
              example:
                status: 404
                type: not_found
        '406':
          description: >-
            Not Acceptable. The resource does not have a current representation
            that would be acceptable to the user agent. "Accept" header defined
            unsupported value.
          headers:
            upvest-request-id:
              required: true
              schema:
                type: string
                format: uuid
                example: 169ae4c7-ebd7-4041-94da-25369653eba7
          content:
            application/problem+json:
              schema:
                title: Error
                type: object
                description: ''
                properties:
                  type:
                    type: string
                    description: URL to a document describing the error condition.
                  status:
                    type: integer
                    description: >-
                      Transmission of the HTTP status code so that all
                      information can be found in one place, but also to correct
                      changes in the status code due to the use of proxy
                      servers.
                  title:
                    type: string
                    description: >-
                      A short, human-readable title for the general error type;
                      the title should not change for given types.
                  detail:
                    type: string
                    description: A human-readable description of the specific error.
                  instance:
                    type: string
                    description: >-
                      This optional key may be present, with a unique URI for
                      the specific error; this will often point to an error log
                      for that specific response.
                  request_id:
                    type: string
                    description: Correlation ID for the original request.
                required:
                  - type
                  - status
                additionalProperties: false
              example:
                status: 406
                type: not_acceptable
        '429':
          description: >-
            Too Many Requests. The caller has exceeded their quota for the time
            period and has been throttled.
          headers:
            upvest-request-id:
              required: true
              schema:
                type: string
                format: uuid
                example: 169ae4c7-ebd7-4041-94da-25369653eba7
          content:
            application/problem+json:
              schema:
                title: Error
                type: object
                description: ''
                properties:
                  type:
                    type: string
                    description: URL to a document describing the error condition.
                  status:
                    type: integer
                    description: >-
                      Transmission of the HTTP status code so that all
                      information can be found in one place, but also to correct
                      changes in the status code due to the use of proxy
                      servers.
                  title:
                    type: string
                    description: >-
                      A short, human-readable title for the general error type;
                      the title should not change for given types.
                  detail:
                    type: string
                    description: A human-readable description of the specific error.
                  instance:
                    type: string
                    description: >-
                      This optional key may be present, with a unique URI for
                      the specific error; this will often point to an error log
                      for that specific response.
                  request_id:
                    type: string
                    description: Correlation ID for the original request.
                required:
                  - type
                  - status
                additionalProperties: false
              example:
                status: 429
                type: too_many_requests
        '500':
          description: Internal Server Error. The service encountered an unexpected error.
          headers:
            upvest-request-id:
              required: true
              schema:
                type: string
                format: uuid
                example: 169ae4c7-ebd7-4041-94da-25369653eba7
          content:
            application/problem+json:
              schema:
                title: Error
                type: object
                description: ''
                properties:
                  type:
                    type: string
                    description: URL to a document describing the error condition.
                  status:
                    type: integer
                    description: >-
                      Transmission of the HTTP status code so that all
                      information can be found in one place, but also to correct
                      changes in the status code due to the use of proxy
                      servers.
                  title:
                    type: string
                    description: >-
                      A short, human-readable title for the general error type;
                      the title should not change for given types.
                  detail:
                    type: string
                    description: A human-readable description of the specific error.
                  instance:
                    type: string
                    description: >-
                      This optional key may be present, with a unique URI for
                      the specific error; this will often point to an error log
                      for that specific response.
                  request_id:
                    type: string
                    description: Correlation ID for the original request.
                required:
                  - type
                  - status
                additionalProperties: false
              example:
                status: 500
                type: internal_server_error
        '503':
          description: >-
            Service Unavailable. The service handling for this request cannot be
            reached at this time.
          headers:
            upvest-request-id:
              required: true
              schema:
                type: string
                format: uuid
                example: 169ae4c7-ebd7-4041-94da-25369653eba7
          content:
            application/problem+json:
              schema:
                title: Error
                type: object
                description: ''
                properties:
                  type:
                    type: string
                    description: URL to a document describing the error condition.
                  status:
                    type: integer
                    description: >-
                      Transmission of the HTTP status code so that all
                      information can be found in one place, but also to correct
                      changes in the status code due to the use of proxy
                      servers.
                  title:
                    type: string
                    description: >-
                      A short, human-readable title for the general error type;
                      the title should not change for given types.
                  detail:
                    type: string
                    description: A human-readable description of the specific error.
                  instance:
                    type: string
                    description: >-
                      This optional key may be present, with a unique URI for
                      the specific error; this will often point to an error log
                      for that specific response.
                  request_id:
                    type: string
                    description: Correlation ID for the original request.
                required:
                  - type
                  - status
                additionalProperties: false
              example:
                status: 503
                type: method_not_allowed
        '504':
          description: >-
            Gateway Timeout. The service gateway has reached its internal
            timeout.
          headers:
            upvest-request-id:
              required: true
              schema:
                type: string
                format: uuid
                example: 169ae4c7-ebd7-4041-94da-25369653eba7
          content:
            application/problem+json:
              schema:
                title: Error
                type: object
                description: ''
                properties:
                  type:
                    type: string
                    description: URL to a document describing the error condition.
                  status:
                    type: integer
                    description: >-
                      Transmission of the HTTP status code so that all
                      information can be found in one place, but also to correct
                      changes in the status code due to the use of proxy
                      servers.
                  title:
                    type: string
                    description: >-
                      A short, human-readable title for the general error type;
                      the title should not change for given types.
                  detail:
                    type: string
                    description: A human-readable description of the specific error.
                  instance:
                    type: string
                    description: >-
                      This optional key may be present, with a unique URI for
                      the specific error; this will often point to an error log
                      for that specific response.
                  request_id:
                    type: string
                    description: Correlation ID for the original request.
                required:
                  - type
                  - status
                additionalProperties: false
              example:
                status: 504
                type: gateway_timeout
  /account_groups/{account_group_id}:
    parameters:
      - name: account_group_id
        in: path
        required: true
        schema:
          title: Account group unique identifier.
          type: string
          description: Account group unique identifier.
          format: uuid
      - name: upvest-client-id
        in: header
        description: Tenant Client ID
        required: true
        schema:
          type: string
          format: uuid
          example: ebabcf4d-61c3-4942-875c-e265a7c2d062
      - name: authorization
        in: header
        description: |
          Bearer (access) token from the OAuth flow with correct scopes.
          https://datatracker.ietf.org/doc/html/rfc6750
        required: true
        schema:
          type: string
          pattern: ^Bearer [a-zA-Z0-9\-\._~+/]*=*
          example: Bearer c2VjcmV0Cg==
      - name: signature
        in: header
        required: true
        schema:
          type: string
        description: >-
          https://tools.ietf.org/id/draft-ietf-httpbis-message-signatures-01.html#name-the-signature-http-header
      - name: signature-input
        in: header
        required: true
        schema:
          type: string
        description: >-
          https://tools.ietf.org/id/draft-ietf-httpbis-message-signatures-01.html#name-the-signature-input-http-he
      - name: upvest-api-version
        in: header
        required: false
        schema:
          type: string
          enum:
            - '1'
          default: '1'
          example: '1'
        description: 'Upvest API version (Note: Do not include quotation marks)'
    get:
      operationId: retrieve_account_group
      summary: Get an account group by ID
      description: Returns the account group specified by its ID.
      tags:
        - Account Groups
      security:
        - oauth-client-credentials:
            - accounts:read
            - accounts:admin
      responses:
        '200':
          description: OK
          headers:
            upvest-request-id:
              required: true
              schema:
                type: string
                format: uuid
                example: 169ae4c7-ebd7-4041-94da-25369653eba7
          content:
            application/json:
              schema:
                title: Account Group
                type: object
                description: ''
                properties:
                  id:
                    title: Account group unique identifier.
                    type: string
                    description: Account group unique identifier.
                    format: uuid
                  created_at:
                    type: string
                    format: date-time
                    description: >-
                      Date and time when the resource was created. [RFC
                      3339-5](https://datatracker.ietf.org/doc/html/rfc3339#section-5.6),
                      [ISO8601
                      UTC](https://www.iso.org/iso-8601-date-and-time-format.html)
                  updated_at:
                    type: string
                    format: date-time
                    description: >-
                      Date and time when the resource was last updated. [RFC
                      3339-5](https://datatracker.ietf.org/doc/html/rfc3339#section-5.6),
                      [ISO8601
                      UTC](https://www.iso.org/iso-8601-date-and-time-format.html)
                  users:
                    type: array
                    items:
                      type: object
                      properties:
                        id:
                          title: User unique identifier.
                          type: string
                          description: User unique identifier.
                          format: uuid
                        type:
                          type: string
                          description: |-
                            Relation type
                            * OWNER - 
                          enum:
                            - OWNER
                          default: OWNER
                  status:
                    type: string
                    description: >-
                      Status of the account group

                      * PENDING_APPROVAL - Account group approval is pending -
                      the account group is visible through our API but cannot be
                      acted on.

                      * ACTIVE - Account group is active - full functionality of
                      the Investment API is accessible.

                      * CLOSING - Account group is closing.

                      * CLOSED - Account group is closed.

                      * LOCKED - Account group is locked for all actions.
                    enum:
                      - PENDING_APPROVAL
                      - ACTIVE
                      - CLOSING
                      - CLOSED
                      - LOCKED
                  type:
                    type: string
                    description: >-
                      Account group type.

                      * PERSONAL - Account group of a person holding assets on
                      their own behalf.

                      * LEGAL_ENTITY - Account group of a legal entity holding
                      assets on behalf of their users.

                      * FRENCH_PEA - Account group of a french resident holding
                      assets in Plan d'Epargne en Actions.

                      * ISA - Account group of a UK resident holding assets in
                      an individual savings account.

                      * CHILD - Account group of a child user holding assets in
                      a child account.
                    enum:
                      - PERSONAL
                      - LEGAL_ENTITY
                      - FRENCH_PEA
                      - ISA
                      - CHILD
                  securities_account_number:
                    type: string
                    description: Securities account number
                    pattern: ^[0-9]{9}$
                required:
                  - id
                  - created_at
                  - updated_at
                  - users
                  - status
                  - type
                  - securities_account_number
                additionalProperties: false
              example:
                id: 9d95820d-4333-46b6-98de-04ab7512e76f
                created_at: '2020-08-24T14:15:22Z'
                updated_at: '2020-08-24T14:15:22Z'
                type: PERSONAL
                status: ACTIVE
                users:
                  - id: 413715f2-5401-4b97-8055-034a6b879f8c
                    type: OWNER
                securities_account_number: '123456789'
        '401':
          description: Unauthorized. The caller has not been authenticated.
          headers:
            upvest-request-id:
              required: true
              schema:
                type: string
                format: uuid
                example: 169ae4c7-ebd7-4041-94da-25369653eba7
          content:
            application/problem+json:
              schema:
                title: Error
                type: object
                description: ''
                properties:
                  type:
                    type: string
                    description: URL to a document describing the error condition.
                  status:
                    type: integer
                    description: >-
                      Transmission of the HTTP status code so that all
                      information can be found in one place, but also to correct
                      changes in the status code due to the use of proxy
                      servers.
                  title:
                    type: string
                    description: >-
                      A short, human-readable title for the general error type;
                      the title should not change for given types.
                  detail:
                    type: string
                    description: A human-readable description of the specific error.
                  instance:
                    type: string
                    description: >-
                      This optional key may be present, with a unique URI for
                      the specific error; this will often point to an error log
                      for that specific response.
                  request_id:
                    type: string
                    description: Correlation ID for the original request.
                required:
                  - type
                  - status
                additionalProperties: false
              example:
                status: 401
                type: unauthorized
        '403':
          description: >-
            Forbidden. The caller has been authenticated but is not allowed to
            take the requested action.
          headers:
            upvest-request-id:
              required: true
              schema:
                type: string
                format: uuid
                example: 169ae4c7-ebd7-4041-94da-25369653eba7
          content:
            application/problem+json:
              schema:
                title: Error
                type: object
                description: ''
                properties:
                  type:
                    type: string
                    description: URL to a document describing the error condition.
                  status:
                    type: integer
                    description: >-
                      Transmission of the HTTP status code so that all
                      information can be found in one place, but also to correct
                      changes in the status code due to the use of proxy
                      servers.
                  title:
                    type: string
                    description: >-
                      A short, human-readable title for the general error type;
                      the title should not change for given types.
                  detail:
                    type: string
                    description: A human-readable description of the specific error.
                  instance:
                    type: string
                    description: >-
                      This optional key may be present, with a unique URI for
                      the specific error; this will often point to an error log
                      for that specific response.
                  request_id:
                    type: string
                    description: Correlation ID for the original request.
                required:
                  - type
                  - status
                additionalProperties: false
              example:
                status: 403
                type: forbidden
        '404':
          description: Not Found. The requested resource could not be found.
          headers:
            upvest-request-id:
              required: true
              schema:
                type: string
                format: uuid
                example: 169ae4c7-ebd7-4041-94da-25369653eba7
          content:
            application/problem+json:
              schema:
                title: Error
                type: object
                description: ''
                properties:
                  type:
                    type: string
                    description: URL to a document describing the error condition.
                  status:
                    type: integer
                    description: >-
                      Transmission of the HTTP status code so that all
                      information can be found in one place, but also to correct
                      changes in the status code due to the use of proxy
                      servers.
                  title:
                    type: string
                    description: >-
                      A short, human-readable title for the general error type;
                      the title should not change for given types.
                  detail:
                    type: string
                    description: A human-readable description of the specific error.
                  instance:
                    type: string
                    description: >-
                      This optional key may be present, with a unique URI for
                      the specific error; this will often point to an error log
                      for that specific response.
                  request_id:
                    type: string
                    description: Correlation ID for the original request.
                required:
                  - type
                  - status
                additionalProperties: false
              example:
                status: 404
                type: not_found
        '406':
          description: >-
            Not Acceptable. The resource does not have a current representation
            that would be acceptable to the user agent. "Accept" header defined
            unsupported value.
          headers:
            upvest-request-id:
              required: true
              schema:
                type: string
                format: uuid
                example: 169ae4c7-ebd7-4041-94da-25369653eba7
          content:
            application/problem+json:
              schema:
                title: Error
                type: object
                description: ''
                properties:
                  type:
                    type: string
                    description: URL to a document describing the error condition.
                  status:
                    type: integer
                    description: >-
                      Transmission of the HTTP status code so that all
                      information can be found in one place, but also to correct
                      changes in the status code due to the use of proxy
                      servers.
                  title:
                    type: string
                    description: >-
                      A short, human-readable title for the general error type;
                      the title should not change for given types.
                  detail:
                    type: string
                    description: A human-readable description of the specific error.
                  instance:
                    type: string
                    description: >-
                      This optional key may be present, with a unique URI for
                      the specific error; this will often point to an error log
                      for that specific response.
                  request_id:
                    type: string
                    description: Correlation ID for the original request.
                required:
                  - type
                  - status
                additionalProperties: false
              example:
                status: 406
                type: not_acceptable
        '429':
          description: >-
            Too Many Requests. The caller has exceeded their quota for the time
            period and has been throttled.
          headers:
            upvest-request-id:
              required: true
              schema:
                type: string
                format: uuid
                example: 169ae4c7-ebd7-4041-94da-25369653eba7
          content:
            application/problem+json:
              schema:
                title: Error
                type: object
                description: ''
                properties:
                  type:
                    type: string
                    description: URL to a document describing the error condition.
                  status:
                    type: integer
                    description: >-
                      Transmission of the HTTP status code so that all
                      information can be found in one place, but also to correct
                      changes in the status code due to the use of proxy
                      servers.
                  title:
                    type: string
                    description: >-
                      A short, human-readable title for the general error type;
                      the title should not change for given types.
                  detail:
                    type: string
                    description: A human-readable description of the specific error.
                  instance:
                    type: string
                    description: >-
                      This optional key may be present, with a unique URI for
                      the specific error; this will often point to an error log
                      for that specific response.
                  request_id:
                    type: string
                    description: Correlation ID for the original request.
                required:
                  - type
                  - status
                additionalProperties: false
              example:
                status: 429
                type: too_many_requests
        '500':
          description: Internal Server Error. The service encountered an unexpected error.
          headers:
            upvest-request-id:
              required: true
              schema:
                type: string
                format: uuid
                example: 169ae4c7-ebd7-4041-94da-25369653eba7
          content:
            application/problem+json:
              schema:
                title: Error
                type: object
                description: ''
                properties:
                  type:
                    type: string
                    description: URL to a document describing the error condition.
                  status:
                    type: integer
                    description: >-
                      Transmission of the HTTP status code so that all
                      information can be found in one place, but also to correct
                      changes in the status code due to the use of proxy
                      servers.
                  title:
                    type: string
                    description: >-
                      A short, human-readable title for the general error type;
                      the title should not change for given types.
                  detail:
                    type: string
                    description: A human-readable description of the specific error.
                  instance:
                    type: string
                    description: >-
                      This optional key may be present, with a unique URI for
                      the specific error; this will often point to an error log
                      for that specific response.
                  request_id:
                    type: string
                    description: Correlation ID for the original request.
                required:
                  - type
                  - status
                additionalProperties: false
              example:
                status: 500
                type: internal_server_error
        '503':
          description: >-
            Service Unavailable. The service handling for this request cannot be
            reached at this time.
          headers:
            upvest-request-id:
              required: true
              schema:
                type: string
                format: uuid
                example: 169ae4c7-ebd7-4041-94da-25369653eba7
          content:
            application/problem+json:
              schema:
                title: Error
                type: object
                description: ''
                properties:
                  type:
                    type: string
                    description: URL to a document describing the error condition.
                  status:
                    type: integer
                    description: >-
                      Transmission of the HTTP status code so that all
                      information can be found in one place, but also to correct
                      changes in the status code due to the use of proxy
                      servers.
                  title:
                    type: string
                    description: >-
                      A short, human-readable title for the general error type;
                      the title should not change for given types.
                  detail:
                    type: string
                    description: A human-readable description of the specific error.
                  instance:
                    type: string
                    description: >-
                      This optional key may be present, with a unique URI for
                      the specific error; this will often point to an error log
                      for that specific response.
                  request_id:
                    type: string
                    description: Correlation ID for the original request.
                required:
                  - type
                  - status
                additionalProperties: false
              example:
                status: 503
                type: method_not_allowed
        '504':
          description: >-
            Gateway Timeout. The service gateway has reached its internal
            timeout.
          headers:
            upvest-request-id:
              required: true
              schema:
                type: string
                format: uuid
                example: 169ae4c7-ebd7-4041-94da-25369653eba7
          content:
            application/problem+json:
              schema:
                title: Error
                type: object
                description: ''
                properties:
                  type:
                    type: string
                    description: URL to a document describing the error condition.
                  status:
                    type: integer
                    description: >-
                      Transmission of the HTTP status code so that all
                      information can be found in one place, but also to correct
                      changes in the status code due to the use of proxy
                      servers.
                  title:
                    type: string
                    description: >-
                      A short, human-readable title for the general error type;
                      the title should not change for given types.
                  detail:
                    type: string
                    description: A human-readable description of the specific error.
                  instance:
                    type: string
                    description: >-
                      This optional key may be present, with a unique URI for
                      the specific error; this will often point to an error log
                      for that specific response.
                  request_id:
                    type: string
                    description: Correlation ID for the original request.
                required:
                  - type
                  - status
                additionalProperties: false
              example:
                status: 504
                type: gateway_timeout
    delete:
      operationId: account_group_closure
      summary: Close an account group by ID
      description: Initiates the closure request for an account group specified by its ID.
      parameters:
        - name: closure_reason
          in: query
          required: false
          schema:
            type: string
            enum:
              - dunning
              - power_of_attorney
              - loss_of_legal_capacity
              - aml
              - risk_based
              - contract_breach
              - user_initiated
          description: Records the reason for the account group closure.
        - name: notification_only
          in: query
          required: false
          schema:
            type: boolean
          description: >-
            Indicates whether the request notifies of an intended future
            closing.
      tags:
        - Account Groups
      security:
        - oauth-client-credentials:
            - accounts:admin
      responses:
        '202':
          description: >-
            The request has been successfully accepted and will be processed
            asynchronously.
          headers:
            upvest-request-id:
              required: true
              schema:
                type: string
                format: uuid
                example: 169ae4c7-ebd7-4041-94da-25369653eba7
        '400':
          description: Bad Request. The incoming request had a malformed parameter/object.
          headers:
            upvest-request-id:
              required: true
              schema:
                type: string
                format: uuid
                example: 169ae4c7-ebd7-4041-94da-25369653eba7
          content:
            application/problem+json:
              schema:
                title: Error
                type: object
                description: ''
                properties:
                  type:
                    type: string
                    description: URL to a document describing the error condition.
                  status:
                    type: integer
                    description: >-
                      Transmission of the HTTP status code so that all
                      information can be found in one place, but also to correct
                      changes in the status code due to the use of proxy
                      servers.
                  title:
                    type: string
                    description: >-
                      A short, human-readable title for the general error type;
                      the title should not change for given types.
                  detail:
                    type: string
                    description: A human-readable description of the specific error.
                  instance:
                    type: string
                    description: >-
                      This optional key may be present, with a unique URI for
                      the specific error; this will often point to an error log
                      for that specific response.
                  request_id:
                    type: string
                    description: Correlation ID for the original request.
                required:
                  - type
                  - status
                additionalProperties: false
              example:
                status: 400
                type: bad_request
        '401':
          description: Unauthorized. The caller has not been authenticated.
          headers:
            upvest-request-id:
              required: true
              schema:
                type: string
                format: uuid
                example: 169ae4c7-ebd7-4041-94da-25369653eba7
          content:
            application/problem+json:
              schema:
                title: Error
                type: object
                description: ''
                properties:
                  type:
                    type: string
                    description: URL to a document describing the error condition.
                  status:
                    type: integer
                    description: >-
                      Transmission of the HTTP status code so that all
                      information can be found in one place, but also to correct
                      changes in the status code due to the use of proxy
                      servers.
                  title:
                    type: string
                    description: >-
                      A short, human-readable title for the general error type;
                      the title should not change for given types.
                  detail:
                    type: string
                    description: A human-readable description of the specific error.
                  instance:
                    type: string
                    description: >-
                      This optional key may be present, with a unique URI for
                      the specific error; this will often point to an error log
                      for that specific response.
                  request_id:
                    type: string
                    description: Correlation ID for the original request.
                required:
                  - type
                  - status
                additionalProperties: false
              example:
                status: 401
                type: unauthorized
        '403':
          description: >-
            Forbidden. The caller has been authenticated but is not allowed to
            take the requested action.
          headers:
            upvest-request-id:
              required: true
              schema:
                type: string
                format: uuid
                example: 169ae4c7-ebd7-4041-94da-25369653eba7
          content:
            application/problem+json:
              schema:
                title: Error
                type: object
                description: ''
                properties:
                  type:
                    type: string
                    description: URL to a document describing the error condition.
                  status:
                    type: integer
                    description: >-
                      Transmission of the HTTP status code so that all
                      information can be found in one place, but also to correct
                      changes in the status code due to the use of proxy
                      servers.
                  title:
                    type: string
                    description: >-
                      A short, human-readable title for the general error type;
                      the title should not change for given types.
                  detail:
                    type: string
                    description: A human-readable description of the specific error.
                  instance:
                    type: string
                    description: >-
                      This optional key may be present, with a unique URI for
                      the specific error; this will often point to an error log
                      for that specific response.
                  request_id:
                    type: string
                    description: Correlation ID for the original request.
                required:
                  - type
                  - status
                additionalProperties: false
              example:
                status: 403
                type: forbidden
        '404':
          description: Not Found. The requested resource could not be found.
          headers:
            upvest-request-id:
              required: true
              schema:
                type: string
                format: uuid
                example: 169ae4c7-ebd7-4041-94da-25369653eba7
          content:
            application/problem+json:
              schema:
                title: Error
                type: object
                description: ''
                properties:
                  type:
                    type: string
                    description: URL to a document describing the error condition.
                  status:
                    type: integer
                    description: >-
                      Transmission of the HTTP status code so that all
                      information can be found in one place, but also to correct
                      changes in the status code due to the use of proxy
                      servers.
                  title:
                    type: string
                    description: >-
                      A short, human-readable title for the general error type;
                      the title should not change for given types.
                  detail:
                    type: string
                    description: A human-readable description of the specific error.
                  instance:
                    type: string
                    description: >-
                      This optional key may be present, with a unique URI for
                      the specific error; this will often point to an error log
                      for that specific response.
                  request_id:
                    type: string
                    description: Correlation ID for the original request.
                required:
                  - type
                  - status
                additionalProperties: false
              example:
                status: 404
                type: not_found
        '406':
          description: >-
            Not Acceptable. The resource does not have a current representation
            that would be acceptable to the user agent. "Accept" header defined
            unsupported value.
          headers:
            upvest-request-id:
              required: true
              schema:
                type: string
                format: uuid
                example: 169ae4c7-ebd7-4041-94da-25369653eba7
          content:
            application/problem+json:
              schema:
                title: Error
                type: object
                description: ''
                properties:
                  type:
                    type: string
                    description: URL to a document describing the error condition.
                  status:
                    type: integer
                    description: >-
                      Transmission of the HTTP status code so that all
                      information can be found in one place, but also to correct
                      changes in the status code due to the use of proxy
                      servers.
                  title:
                    type: string
                    description: >-
                      A short, human-readable title for the general error type;
                      the title should not change for given types.
                  detail:
                    type: string
                    description: A human-readable description of the specific error.
                  instance:
                    type: string
                    description: >-
                      This optional key may be present, with a unique URI for
                      the specific error; this will often point to an error log
                      for that specific response.
                  request_id:
                    type: string
                    description: Correlation ID for the original request.
                required:
                  - type
                  - status
                additionalProperties: false
              example:
                status: 406
                type: not_acceptable
        '409':
          description: >-
            Conflict. An operation is not available for the current state of the
            resource.
          headers:
            upvest-request-id:
              required: true
              schema:
                type: string
                format: uuid
                example: 169ae4c7-ebd7-4041-94da-25369653eba7
          content:
            application/problem+json:
              schema:
                title: Error
                type: object
                description: ''
                properties:
                  type:
                    type: string
                    description: URL to a document describing the error condition.
                  status:
                    type: integer
                    description: >-
                      Transmission of the HTTP status code so that all
                      information can be found in one place, but also to correct
                      changes in the status code due to the use of proxy
                      servers.
                  title:
                    type: string
                    description: >-
                      A short, human-readable title for the general error type;
                      the title should not change for given types.
                  detail:
                    type: string
                    description: A human-readable description of the specific error.
                  instance:
                    type: string
                    description: >-
                      This optional key may be present, with a unique URI for
                      the specific error; this will often point to an error log
                      for that specific response.
                  request_id:
                    type: string
                    description: Correlation ID for the original request.
                required:
                  - type
                  - status
                additionalProperties: false
              example:
                status: 409
                type: conflict
        '429':
          description: >-
            Too Many Requests. The caller has exceeded their quota for the time
            period and has been throttled.
          headers:
            upvest-request-id:
              required: true
              schema:
                type: string
                format: uuid
                example: 169ae4c7-ebd7-4041-94da-25369653eba7
          content:
            application/problem+json:
              schema:
                title: Error
                type: object
                description: ''
                properties:
                  type:
                    type: string
                    description: URL to a document describing the error condition.
                  status:
                    type: integer
                    description: >-
                      Transmission of the HTTP status code so that all
                      information can be found in one place, but also to correct
                      changes in the status code due to the use of proxy
                      servers.
                  title:
                    type: string
                    description: >-
                      A short, human-readable title for the general error type;
                      the title should not change for given types.
                  detail:
                    type: string
                    description: A human-readable description of the specific error.
                  instance:
                    type: string
                    description: >-
                      This optional key may be present, with a unique URI for
                      the specific error; this will often point to an error log
                      for that specific response.
                  request_id:
                    type: string
                    description: Correlation ID for the original request.
                required:
                  - type
                  - status
                additionalProperties: false
              example:
                status: 429
                type: too_many_requests
        '500':
          description: Internal Server Error. The service encountered an unexpected error.
          headers:
            upvest-request-id:
              required: true
              schema:
                type: string
                format: uuid
                example: 169ae4c7-ebd7-4041-94da-25369653eba7
          content:
            application/problem+json:
              schema:
                title: Error
                type: object
                description: ''
                properties:
                  type:
                    type: string
                    description: URL to a document describing the error condition.
                  status:
                    type: integer
                    description: >-
                      Transmission of the HTTP status code so that all
                      information can be found in one place, but also to correct
                      changes in the status code due to the use of proxy
                      servers.
                  title:
                    type: string
                    description: >-
                      A short, human-readable title for the general error type;
                      the title should not change for given types.
                  detail:
                    type: string
                    description: A human-readable description of the specific error.
                  instance:
                    type: string
                    description: >-
                      This optional key may be present, with a unique URI for
                      the specific error; this will often point to an error log
                      for that specific response.
                  request_id:
                    type: string
                    description: Correlation ID for the original request.
                required:
                  - type
                  - status
                additionalProperties: false
              example:
                status: 500
                type: internal_server_error
        '503':
          description: >-
            Service Unavailable. The service handling for this request cannot be
            reached at this time.
          headers:
            upvest-request-id:
              required: true
              schema:
                type: string
                format: uuid
                example: 169ae4c7-ebd7-4041-94da-25369653eba7
          content:
            application/problem+json:
              schema:
                title: Error
                type: object
                description: ''
                properties:
                  type:
                    type: string
                    description: URL to a document describing the error condition.
                  status:
                    type: integer
                    description: >-
                      Transmission of the HTTP status code so that all
                      information can be found in one place, but also to correct
                      changes in the status code due to the use of proxy
                      servers.
                  title:
                    type: string
                    description: >-
                      A short, human-readable title for the general error type;
                      the title should not change for given types.
                  detail:
                    type: string
                    description: A human-readable description of the specific error.
                  instance:
                    type: string
                    description: >-
                      This optional key may be present, with a unique URI for
                      the specific error; this will often point to an error log
                      for that specific response.
                  request_id:
                    type: string
                    description: Correlation ID for the original request.
                required:
                  - type
                  - status
                additionalProperties: false
              example:
                status: 503
                type: method_not_allowed
        '504':
          description: >-
            Gateway Timeout. The service gateway has reached its internal
            timeout.
          headers:
            upvest-request-id:
              required: true
              schema:
                type: string
                format: uuid
                example: 169ae4c7-ebd7-4041-94da-25369653eba7
          content:
            application/problem+json:
              schema:
                title: Error
                type: object
                description: ''
                properties:
                  type:
                    type: string
                    description: URL to a document describing the error condition.
                  status:
                    type: integer
                    description: >-
                      Transmission of the HTTP status code so that all
                      information can be found in one place, but also to correct
                      changes in the status code due to the use of proxy
                      servers.
                  title:
                    type: string
                    description: >-
                      A short, human-readable title for the general error type;
                      the title should not change for given types.
                  detail:
                    type: string
                    description: A human-readable description of the specific error.
                  instance:
                    type: string
                    description: >-
                      This optional key may be present, with a unique URI for
                      the specific error; this will often point to an error log
                      for that specific response.
                  request_id:
                    type: string
                    description: Correlation ID for the original request.
                required:
                  - type
                  - status
                additionalProperties: false
              example:
                status: 504
                type: gateway_timeout
  /account_groups/{account_group_id}/payments/cash_balance:
    parameters:
      - name: account_group_id
        in: path
        required: true
        schema:
          title: Account group unique identifier.
          type: string
          description: Account group unique identifier.
          format: uuid
      - name: upvest-client-id
        in: header
        description: Tenant Client ID
        required: true
        schema:
          type: string
          format: uuid
          example: ebabcf4d-61c3-4942-875c-e265a7c2d062
      - name: authorization
        in: header
        description: |
          Bearer (access) token from the OAuth flow with correct scopes.
          https://datatracker.ietf.org/doc/html/rfc6750
        required: true
        schema:
          type: string
          pattern: ^Bearer [a-zA-Z0-9\-\._~+/]*=*
          example: Bearer c2VjcmV0Cg==
      - name: signature
        in: header
        required: true
        schema:
          type: string
        description: >-
          https://tools.ietf.org/id/draft-ietf-httpbis-message-signatures-01.html#name-the-signature-http-header
      - name: signature-input
        in: header
        required: true
        schema:
          type: string
        description: >-
          https://tools.ietf.org/id/draft-ietf-httpbis-message-signatures-01.html#name-the-signature-input-http-he
      - name: upvest-api-version
        in: header
        required: false
        schema:
          type: string
          enum:
            - '1'
          default: '1'
          example: '1'
        description: 'Upvest API version (Note: Do not include quotation marks)'
    get:
      operationId: retrieve_cash_balance
      summary: Retrieve an account group's cash balance
      deprecated: true
      description: Retrieve an account group's cash balance
      tags:
        - Cash Balances
      security:
        - oauth-client-credentials:
            - positions:read
      responses:
        '200':
          description: Response
          headers:
            upvest-request-id:
              required: true
              schema:
                type: string
                format: uuid
                example: 169ae4c7-ebd7-4041-94da-25369653eba7
          content:
            application/json:
              schema:
                type: object
                properties:
                  account_group_id:
                    title: Account group unique identifier.
                    type: string
                    description: Account group unique identifier.
                    format: uuid
                  currency:
                    type: string
                    description: >-
                      Alphabetic three-letter [ISO
                      4217](https://en.wikipedia.org/wiki/ISO_4217) currency
                      code.

                      * EUR - Euro 

                      * GBP - Great British Pound
                    enum:
                      - EUR
                      - GBP
                  balance:
                    type: string
                    pattern: ^-?[0-9]{0,63}(\.[0-9]{1,27})?$
                  locked_for_trading:
                    type: string
                    pattern: ^[0-9]{0,63}(\.[0-9]{1,27})?$
                  pending_settlement:
                    type: string
                    pattern: ^[0-9]{0,63}(\.[0-9]{1,27})?$
                  available_for_withdrawal:
                    type: string
                    pattern: ^-?[0-9]{0,63}(\.[0-9]{1,27})?$
                  available_for_trading:
                    type: string
                    pattern: ^-?[0-9]{0,63}(\.[0-9]{1,27})?$
                required:
                  - account_group_id
                  - currency
                  - balance
                  - locked_for_trading
                  - pending_settlement
                  - available_for_withdrawal
                  - available_for_trading
                additionalProperties: false
              examples:
                cash_balance:
                  summary: Cash Balance
                  value:
                    account_group_id: d0fc0305-97b7-4e3b-bddf-66d3c434898c
                    currency: EUR
                    balance: '100'
                    locked_for_trading: '10'
                    pending_settlement: '10'
                    available_for_withdrawal: '80'
                    available_for_trading: '80'
                nominal_buy_order_new_cash_balance_update:
                  summary: Cash Balance when Nominal Buy Order is still NEW
                  value:
                    account_group_id: d0fc0305-97b7-4e3b-bddf-66d3c434898c
                    currency: EUR
                    balance: '1000'
                    locked_for_trading: '1000'
                    pending_settlement: '0'
                    available_for_withdrawal: '0'
                    available_for_trading: '0'
                nominal_buy_order_filled_cash_balance_update:
                  summary: Cash Balance after Nominal Buy Order was filled
                  value:
                    account_group_id: d0fc0305-97b7-4e3b-bddf-66d3c434898c
                    currency: EUR
                    balance: '0'
                    locked_for_trading: '0'
                    pending_settlement: '0'
                    available_for_withdrawal: '0'
                    available_for_trading: '0'
                unit_sell_order_filled_cash_balance_update:
                  summary: Cash Balance after a Unit Sell Order was filled
                  value:
                    account_group_id: d0fc0305-97b7-4e3b-bddf-66d3c434898c
                    currency: EUR
                    balance: '828.75'
                    locked_for_trading: '0'
                    pending_settlement: '828.75'
                    available_for_withdrawal: '0'
                    available_for_trading: '828.75'
                cash_balance_available_before_withdrawal_request:
                  summary: Cash Balance available before withdrawal request
                  value:
                    account_group_id: d0fc0305-97b7-4e3b-bddf-66d3c434898c
                    currency: EUR
                    balance: '200'
                    locked_for_trading: '0'
                    pending_settlement: '0'
                    available_for_withdrawal: '200'
                    available_for_trading: '0'
        '401':
          description: Unauthorized. The caller has not been authenticated.
          headers:
            upvest-request-id:
              required: true
              schema:
                type: string
                format: uuid
                example: 169ae4c7-ebd7-4041-94da-25369653eba7
          content:
            application/problem+json:
              schema:
                title: Error
                type: object
                description: ''
                properties:
                  type:
                    type: string
                    description: URL to a document describing the error condition.
                  status:
                    type: integer
                    description: >-
                      Transmission of the HTTP status code so that all
                      information can be found in one place, but also to correct
                      changes in the status code due to the use of proxy
                      servers.
                  title:
                    type: string
                    description: >-
                      A short, human-readable title for the general error type;
                      the title should not change for given types.
                  detail:
                    type: string
                    description: A human-readable description of the specific error.
                  instance:
                    type: string
                    description: >-
                      This optional key may be present, with a unique URI for
                      the specific error; this will often point to an error log
                      for that specific response.
                  request_id:
                    type: string
                    description: Correlation ID for the original request.
                required:
                  - type
                  - status
                additionalProperties: false
              example:
                status: 401
                type: unauthorized
        '403':
          description: >-
            Forbidden. The caller has been authenticated but is not allowed to
            take the requested action.
          headers:
            upvest-request-id:
              required: true
              schema:
                type: string
                format: uuid
                example: 169ae4c7-ebd7-4041-94da-25369653eba7
          content:
            application/problem+json:
              schema:
                title: Error
                type: object
                description: ''
                properties:
                  type:
                    type: string
                    description: URL to a document describing the error condition.
                  status:
                    type: integer
                    description: >-
                      Transmission of the HTTP status code so that all
                      information can be found in one place, but also to correct
                      changes in the status code due to the use of proxy
                      servers.
                  title:
                    type: string
                    description: >-
                      A short, human-readable title for the general error type;
                      the title should not change for given types.
                  detail:
                    type: string
                    description: A human-readable description of the specific error.
                  instance:
                    type: string
                    description: >-
                      This optional key may be present, with a unique URI for
                      the specific error; this will often point to an error log
                      for that specific response.
                  request_id:
                    type: string
                    description: Correlation ID for the original request.
                required:
                  - type
                  - status
                additionalProperties: false
              example:
                status: 403
                type: forbidden
        '404':
          description: Not Found. The requested resource could not be found.
          headers:
            upvest-request-id:
              required: true
              schema:
                type: string
                format: uuid
                example: 169ae4c7-ebd7-4041-94da-25369653eba7
          content:
            application/problem+json:
              schema:
                title: Error
                type: object
                description: ''
                properties:
                  type:
                    type: string
                    description: URL to a document describing the error condition.
                  status:
                    type: integer
                    description: >-
                      Transmission of the HTTP status code so that all
                      information can be found in one place, but also to correct
                      changes in the status code due to the use of proxy
                      servers.
                  title:
                    type: string
                    description: >-
                      A short, human-readable title for the general error type;
                      the title should not change for given types.
                  detail:
                    type: string
                    description: A human-readable description of the specific error.
                  instance:
                    type: string
                    description: >-
                      This optional key may be present, with a unique URI for
                      the specific error; this will often point to an error log
                      for that specific response.
                  request_id:
                    type: string
                    description: Correlation ID for the original request.
                required:
                  - type
                  - status
                additionalProperties: false
              example:
                status: 404
                type: not_found
        '406':
          description: Not Found. The requested resource could not be found.
          headers:
            upvest-request-id:
              required: true
              schema:
                type: string
                format: uuid
                example: 169ae4c7-ebd7-4041-94da-25369653eba7
          content:
            application/problem+json:
              schema:
                title: Error
                type: object
                description: ''
                properties:
                  type:
                    type: string
                    description: URL to a document describing the error condition.
                  status:
                    type: integer
                    description: >-
                      Transmission of the HTTP status code so that all
                      information can be found in one place, but also to correct
                      changes in the status code due to the use of proxy
                      servers.
                  title:
                    type: string
                    description: >-
                      A short, human-readable title for the general error type;
                      the title should not change for given types.
                  detail:
                    type: string
                    description: A human-readable description of the specific error.
                  instance:
                    type: string
                    description: >-
                      This optional key may be present, with a unique URI for
                      the specific error; this will often point to an error log
                      for that specific response.
                  request_id:
                    type: string
                    description: Correlation ID for the original request.
                required:
                  - type
                  - status
                additionalProperties: false
              example:
                status: 404
                type: not_found
        '429':
          description: >-
            Too Many Requests. The caller has exceeded their quota for the time
            period and has been throttled.
          headers:
            upvest-request-id:
              required: true
              schema:
                type: string
                format: uuid
                example: 169ae4c7-ebd7-4041-94da-25369653eba7
          content:
            application/problem+json:
              schema:
                title: Error
                type: object
                description: ''
                properties:
                  type:
                    type: string
                    description: URL to a document describing the error condition.
                  status:
                    type: integer
                    description: >-
                      Transmission of the HTTP status code so that all
                      information can be found in one place, but also to correct
                      changes in the status code due to the use of proxy
                      servers.
                  title:
                    type: string
                    description: >-
                      A short, human-readable title for the general error type;
                      the title should not change for given types.
                  detail:
                    type: string
                    description: A human-readable description of the specific error.
                  instance:
                    type: string
                    description: >-
                      This optional key may be present, with a unique URI for
                      the specific error; this will often point to an error log
                      for that specific response.
                  request_id:
                    type: string
                    description: Correlation ID for the original request.
                required:
                  - type
                  - status
                additionalProperties: false
              example:
                status: 429
                type: too_many_requests
        '500':
          description: Internal Server Error. The service encountered an unexpected error.
          headers:
            upvest-request-id:
              required: true
              schema:
                type: string
                format: uuid
                example: 169ae4c7-ebd7-4041-94da-25369653eba7
          content:
            application/problem+json:
              schema:
                title: Error
                type: object
                description: ''
                properties:
                  type:
                    type: string
                    description: URL to a document describing the error condition.
                  status:
                    type: integer
                    description: >-
                      Transmission of the HTTP status code so that all
                      information can be found in one place, but also to correct
                      changes in the status code due to the use of proxy
                      servers.
                  title:
                    type: string
                    description: >-
                      A short, human-readable title for the general error type;
                      the title should not change for given types.
                  detail:
                    type: string
                    description: A human-readable description of the specific error.
                  instance:
                    type: string
                    description: >-
                      This optional key may be present, with a unique URI for
                      the specific error; this will often point to an error log
                      for that specific response.
                  request_id:
                    type: string
                    description: Correlation ID for the original request.
                required:
                  - type
                  - status
                additionalProperties: false
              example:
                status: 500
                type: internal_server_error
        '503':
          description: >-
            Service Unavailable. The service handling for this request cannot be
            reached at this time.
          headers:
            upvest-request-id:
              required: true
              schema:
                type: string
                format: uuid
                example: 169ae4c7-ebd7-4041-94da-25369653eba7
          content:
            application/problem+json:
              schema:
                title: Error
                type: object
                description: ''
                properties:
                  type:
                    type: string
                    description: URL to a document describing the error condition.
                  status:
                    type: integer
                    description: >-
                      Transmission of the HTTP status code so that all
                      information can be found in one place, but also to correct
                      changes in the status code due to the use of proxy
                      servers.
                  title:
                    type: string
                    description: >-
                      A short, human-readable title for the general error type;
                      the title should not change for given types.
                  detail:
                    type: string
                    description: A human-readable description of the specific error.
                  instance:
                    type: string
                    description: >-
                      This optional key may be present, with a unique URI for
                      the specific error; this will often point to an error log
                      for that specific response.
                  request_id:
                    type: string
                    description: Correlation ID for the original request.
                required:
                  - type
                  - status
                additionalProperties: false
              example:
                status: 503
                type: method_not_allowed
        '504':
          description: >-
            Gateway Timeout. The service gateway has reached its internal
            timeout.
          headers:
            upvest-request-id:
              required: true
              schema:
                type: string
                format: uuid
                example: 169ae4c7-ebd7-4041-94da-25369653eba7
          content:
            application/problem+json:
              schema:
                title: Error
                type: object
                description: ''
                properties:
                  type:
                    type: string
                    description: URL to a document describing the error condition.
                  status:
                    type: integer
                    description: >-
                      Transmission of the HTTP status code so that all
                      information can be found in one place, but also to correct
                      changes in the status code due to the use of proxy
                      servers.
                  title:
                    type: string
                    description: >-
                      A short, human-readable title for the general error type;
                      the title should not change for given types.
                  detail:
                    type: string
                    description: A human-readable description of the specific error.
                  instance:
                    type: string
                    description: >-
                      This optional key may be present, with a unique URI for
                      the specific error; this will often point to an error log
                      for that specific response.
                  request_id:
                    type: string
                    description: Correlation ID for the original request.
                required:
                  - type
                  - status
                additionalProperties: false
              example:
                status: 504
                type: gateway_timeout
  /account_groups/{account_group_id}/payments/cash_balances:
    parameters:
      - name: account_group_id
        in: path
        required: true
        schema:
          title: Account group unique identifier.
          type: string
          description: Account group unique identifier.
          format: uuid
      - name: upvest-client-id
        in: header
        description: Tenant Client ID
        required: true
        schema:
          type: string
          format: uuid
          example: ebabcf4d-61c3-4942-875c-e265a7c2d062
      - name: authorization
        in: header
        description: |
          Bearer (access) token from the OAuth flow with correct scopes.
          https://datatracker.ietf.org/doc/html/rfc6750
        required: true
        schema:
          type: string
          pattern: ^Bearer [a-zA-Z0-9\-\._~+/]*=*
          example: Bearer c2VjcmV0Cg==
      - name: signature
        in: header
        required: true
        schema:
          type: string
        description: >-
          https://tools.ietf.org/id/draft-ietf-httpbis-message-signatures-01.html#name-the-signature-http-header
      - name: signature-input
        in: header
        required: true
        schema:
          type: string
        description: >-
          https://tools.ietf.org/id/draft-ietf-httpbis-message-signatures-01.html#name-the-signature-input-http-he
      - name: upvest-api-version
        in: header
        required: false
        schema:
          type: string
          enum:
            - '1'
          default: '1'
          example: '1'
        description: 'Upvest API version (Note: Do not include quotation marks)'
    get:
      operationId: retrieve_cash_balances
      summary: Retrieve an account group's cash balances
      deprecated: true
      description: Retrieve an account group's cash balances
      tags:
        - Cash Balances
      security:
        - oauth-client-credentials:
            - positions:read
      responses:
        '200':
          description: Response
          headers:
            upvest-request-id:
              required: true
              schema:
                type: string
                format: uuid
                example: 169ae4c7-ebd7-4041-94da-25369653eba7
          content:
            application/json:
              schema:
                title: Cash Balances - Retrieve - Response
                type: object
                properties:
                  meta:
                    type: object
                    properties:
                      offset:
                        type: integer
                        description: Amount of resource to offset in the response.
                      limit:
                        type: integer
                        description: Total limit of the response.
                      count:
                        type: integer
                        description: Count of the resources returned in the response.
                      total_count:
                        type: integer
                        description: Total count of all the resources.
                      sort:
                        type: string
                        description: The field that the list is sorted by.
                      order:
                        type: string
                        description: |-
                          The ordering of the response.
                          * ASC - Ascending order
                          * DESC - Descending order
                        enum:
                          - ASC
                          - DESC
                    required:
                      - offset
                      - limit
                      - count
                      - total_count
                  data:
                    type: array
                    items:
                      type: object
                      properties:
                        account_group_id:
                          title: Account group unique identifier.
                          type: string
                          description: Account group unique identifier.
                          format: uuid
                        currency:
                          type: string
                          description: >-
                            Alphabetic three-letter [ISO
                            4217](https://en.wikipedia.org/wiki/ISO_4217)
                            currency code.

                            * EUR - Euro 

                            * GBP - Great British Pound
                          enum:
                            - EUR
                            - GBP
                        balance:
                          type: string
                          pattern: ^-?[0-9]{0,63}(\.[0-9]{1,27})?$
                        locked_for_trading:
                          type: string
                          pattern: ^[0-9]{0,63}(\.[0-9]{1,27})?$
                        pending_settlement:
                          type: string
                          pattern: ^[0-9]{0,63}(\.[0-9]{1,27})?$
                        available_for_withdrawal:
                          type: string
                          pattern: ^-?[0-9]{0,63}(\.[0-9]{1,27})?$
                        available_for_trading:
                          type: string
                          pattern: ^-?[0-9]{0,63}(\.[0-9]{1,27})?$
                      required:
                        - account_group_id
                        - currency
                        - balance
                        - locked_for_trading
                        - pending_settlement
                        - available_for_withdrawal
                        - available_for_trading
                      additionalProperties: false
                required:
                  - meta
                  - data
                additionalProperties: false
              example:
                meta:
                  count: 2
                  total_count: 2
                  offset: 0
                  limit: 100
                data:
                  - account_group_id: d0fc0305-97b7-4e3b-bddf-66d3c434898c
                    currency: EUR
                    balance: '100'
                    locked_for_trading: '10'
                    pending_settlement: '10'
                    available_for_withdrawal: '80'
                    available_for_trading: '80'
                  - account_group_id: d0fc0305-97b7-4e3b-bddf-66d3c434898c
                    currency: GBP
                    balance: '250'
                    locked_for_trading: '0'
                    pending_settlement: '0'
                    available_for_withdrawal: '0'
                    available_for_trading: ''
        '401':
          description: Unauthorized. The caller has not been authenticated.
          headers:
            upvest-request-id:
              required: true
              schema:
                type: string
                format: uuid
                example: 169ae4c7-ebd7-4041-94da-25369653eba7
          content:
            application/problem+json:
              schema:
                title: Error
                type: object
                description: ''
                properties:
                  type:
                    type: string
                    description: URL to a document describing the error condition.
                  status:
                    type: integer
                    description: >-
                      Transmission of the HTTP status code so that all
                      information can be found in one place, but also to correct
                      changes in the status code due to the use of proxy
                      servers.
                  title:
                    type: string
                    description: >-
                      A short, human-readable title for the general error type;
                      the title should not change for given types.
                  detail:
                    type: string
                    description: A human-readable description of the specific error.
                  instance:
                    type: string
                    description: >-
                      This optional key may be present, with a unique URI for
                      the specific error; this will often point to an error log
                      for that specific response.
                  request_id:
                    type: string
                    description: Correlation ID for the original request.
                required:
                  - type
                  - status
                additionalProperties: false
              example:
                status: 401
                type: unauthorized
        '403':
          description: >-
            Forbidden. The caller has been authenticated but is not allowed to
            take the requested action.
          headers:
            upvest-request-id:
              required: true
              schema:
                type: string
                format: uuid
                example: 169ae4c7-ebd7-4041-94da-25369653eba7
          content:
            application/problem+json:
              schema:
                title: Error
                type: object
                description: ''
                properties:
                  type:
                    type: string
                    description: URL to a document describing the error condition.
                  status:
                    type: integer
                    description: >-
                      Transmission of the HTTP status code so that all
                      information can be found in one place, but also to correct
                      changes in the status code due to the use of proxy
                      servers.
                  title:
                    type: string
                    description: >-
                      A short, human-readable title for the general error type;
                      the title should not change for given types.
                  detail:
                    type: string
                    description: A human-readable description of the specific error.
                  instance:
                    type: string
                    description: >-
                      This optional key may be present, with a unique URI for
                      the specific error; this will often point to an error log
                      for that specific response.
                  request_id:
                    type: string
                    description: Correlation ID for the original request.
                required:
                  - type
                  - status
                additionalProperties: false
              example:
                status: 403
                type: forbidden
        '404':
          description: Not Found. The requested resource could not be found.
          headers:
            upvest-request-id:
              required: true
              schema:
                type: string
                format: uuid
                example: 169ae4c7-ebd7-4041-94da-25369653eba7
          content:
            application/problem+json:
              schema:
                title: Error
                type: object
                description: ''
                properties:
                  type:
                    type: string
                    description: URL to a document describing the error condition.
                  status:
                    type: integer
                    description: >-
                      Transmission of the HTTP status code so that all
                      information can be found in one place, but also to correct
                      changes in the status code due to the use of proxy
                      servers.
                  title:
                    type: string
                    description: >-
                      A short, human-readable title for the general error type;
                      the title should not change for given types.
                  detail:
                    type: string
                    description: A human-readable description of the specific error.
                  instance:
                    type: string
                    description: >-
                      This optional key may be present, with a unique URI for
                      the specific error; this will often point to an error log
                      for that specific response.
                  request_id:
                    type: string
                    description: Correlation ID for the original request.
                required:
                  - type
                  - status
                additionalProperties: false
              example:
                status: 404
                type: not_found
        '406':
          description: Not Found. The requested resource could not be found.
          headers:
            upvest-request-id:
              required: true
              schema:
                type: string
                format: uuid
                example: 169ae4c7-ebd7-4041-94da-25369653eba7
          content:
            application/problem+json:
              schema:
                title: Error
                type: object
                description: ''
                properties:
                  type:
                    type: string
                    description: URL to a document describing the error condition.
                  status:
                    type: integer
                    description: >-
                      Transmission of the HTTP status code so that all
                      information can be found in one place, but also to correct
                      changes in the status code due to the use of proxy
                      servers.
                  title:
                    type: string
                    description: >-
                      A short, human-readable title for the general error type;
                      the title should not change for given types.
                  detail:
                    type: string
                    description: A human-readable description of the specific error.
                  instance:
                    type: string
                    description: >-
                      This optional key may be present, with a unique URI for
                      the specific error; this will often point to an error log
                      for that specific response.
                  request_id:
                    type: string
                    description: Correlation ID for the original request.
                required:
                  - type
                  - status
                additionalProperties: false
              example:
                status: 404
                type: not_found
        '429':
          description: >-
            Too Many Requests. The caller has exceeded their quota for the time
            period and has been throttled.
          headers:
            upvest-request-id:
              required: true
              schema:
                type: string
                format: uuid
                example: 169ae4c7-ebd7-4041-94da-25369653eba7
          content:
            application/problem+json:
              schema:
                title: Error
                type: object
                description: ''
                properties:
                  type:
                    type: string
                    description: URL to a document describing the error condition.
                  status:
                    type: integer
                    description: >-
                      Transmission of the HTTP status code so that all
                      information can be found in one place, but also to correct
                      changes in the status code due to the use of proxy
                      servers.
                  title:
                    type: string
                    description: >-
                      A short, human-readable title for the general error type;
                      the title should not change for given types.
                  detail:
                    type: string
                    description: A human-readable description of the specific error.
                  instance:
                    type: string
                    description: >-
                      This optional key may be present, with a unique URI for
                      the specific error; this will often point to an error log
                      for that specific response.
                  request_id:
                    type: string
                    description: Correlation ID for the original request.
                required:
                  - type
                  - status
                additionalProperties: false
              example:
                status: 429
                type: too_many_requests
        '500':
          description: Internal Server Error. The service encountered an unexpected error.
          headers:
            upvest-request-id:
              required: true
              schema:
                type: string
                format: uuid
                example: 169ae4c7-ebd7-4041-94da-25369653eba7
          content:
            application/problem+json:
              schema:
                title: Error
                type: object
                description: ''
                properties:
                  type:
                    type: string
                    description: URL to a document describing the error condition.
                  status:
                    type: integer
                    description: >-
                      Transmission of the HTTP status code so that all
                      information can be found in one place, but also to correct
                      changes in the status code due to the use of proxy
                      servers.
                  title:
                    type: string
                    description: >-
                      A short, human-readable title for the general error type;
                      the title should not change for given types.
                  detail:
                    type: string
                    description: A human-readable description of the specific error.
                  instance:
                    type: string
                    description: >-
                      This optional key may be present, with a unique URI for
                      the specific error; this will often point to an error log
                      for that specific response.
                  request_id:
                    type: string
                    description: Correlation ID for the original request.
                required:
                  - type
                  - status
                additionalProperties: false
              example:
                status: 500
                type: internal_server_error
        '503':
          description: >-
            Service Unavailable. The service handling for this request cannot be
            reached at this time.
          headers:
            upvest-request-id:
              required: true
              schema:
                type: string
                format: uuid
                example: 169ae4c7-ebd7-4041-94da-25369653eba7
          content:
            application/problem+json:
              schema:
                title: Error
                type: object
                description: ''
                properties:
                  type:
                    type: string
                    description: URL to a document describing the error condition.
                  status:
                    type: integer
                    description: >-
                      Transmission of the HTTP status code so that all
                      information can be found in one place, but also to correct
                      changes in the status code due to the use of proxy
                      servers.
                  title:
                    type: string
                    description: >-
                      A short, human-readable title for the general error type;
                      the title should not change for given types.
                  detail:
                    type: string
                    description: A human-readable description of the specific error.
                  instance:
                    type: string
                    description: >-
                      This optional key may be present, with a unique URI for
                      the specific error; this will often point to an error log
                      for that specific response.
                  request_id:
                    type: string
                    description: Correlation ID for the original request.
                required:
                  - type
                  - status
                additionalProperties: false
              example:
                status: 503
                type: method_not_allowed
        '504':
          description: >-
            Gateway Timeout. The service gateway has reached its internal
            timeout.
          headers:
            upvest-request-id:
              required: true
              schema:
                type: string
                format: uuid
                example: 169ae4c7-ebd7-4041-94da-25369653eba7
          content:
            application/problem+json:
              schema:
                title: Error
                type: object
                description: ''
                properties:
                  type:
                    type: string
                    description: URL to a document describing the error condition.
                  status:
                    type: integer
                    description: >-
                      Transmission of the HTTP status code so that all
                      information can be found in one place, but also to correct
                      changes in the status code due to the use of proxy
                      servers.
                  title:
                    type: string
                    description: >-
                      A short, human-readable title for the general error type;
                      the title should not change for given types.
                  detail:
                    type: string
                    description: A human-readable description of the specific error.
                  instance:
                    type: string
                    description: >-
                      This optional key may be present, with a unique URI for
                      the specific error; this will often point to an error log
                      for that specific response.
                  request_id:
                    type: string
                    description: Correlation ID for the original request.
                required:
                  - type
                  - status
                additionalProperties: false
              example:
                status: 504
                type: gateway_timeout
  /account_groups/{account_group_id}/payments/cash_balances/{currency}:
    parameters:
      - name: account_group_id
        in: path
        required: true
        schema:
          title: Account group unique identifier.
          type: string
          description: Account group unique identifier.
          format: uuid
      - name: currency
        in: path
        required: true
        schema:
          type: string
          description: >-
            Alphabetic three-letter [ISO
            4217](https://en.wikipedia.org/wiki/ISO_4217) currency code.

            * EUR - Euro 

            * GBP - Great British Pound
          enum:
            - EUR
            - GBP
      - name: upvest-client-id
        in: header
        description: Tenant Client ID
        required: true
        schema:
          type: string
          format: uuid
          example: ebabcf4d-61c3-4942-875c-e265a7c2d062
      - name: authorization
        in: header
        description: |
          Bearer (access) token from the OAuth flow with correct scopes.
          https://datatracker.ietf.org/doc/html/rfc6750
        required: true
        schema:
          type: string
          pattern: ^Bearer [a-zA-Z0-9\-\._~+/]*=*
          example: Bearer c2VjcmV0Cg==
      - name: signature
        in: header
        required: true
        schema:
          type: string
        description: >-
          https://tools.ietf.org/id/draft-ietf-httpbis-message-signatures-01.html#name-the-signature-http-header
      - name: signature-input
        in: header
        required: true
        schema:
          type: string
        description: >-
          https://tools.ietf.org/id/draft-ietf-httpbis-message-signatures-01.html#name-the-signature-input-http-he
      - name: upvest-api-version
        in: header
        required: false
        schema:
          type: string
          enum:
            - '1'
          default: '1'
          example: '1'
        description: 'Upvest API version (Note: Do not include quotation marks)'
    get:
      operationId: retrieve_cash_balance_with_currency
      summary: >-
        Retrieve an account group's cash balance for particular ISO currency
        code
      description: >-
        Retrieve an account group's cash balance for particular ISO currency
        code
      tags:
        - Cash Balances
      security:
        - oauth-client-credentials:
            - positions:read
      responses:
        '200':
          description: Response
          headers:
            upvest-request-id:
              required: true
              schema:
                type: string
                format: uuid
                example: 169ae4c7-ebd7-4041-94da-25369653eba7
          content:
            application/json:
              schema:
                type: object
                properties:
                  account_group_id:
                    title: Account group unique identifier.
                    type: string
                    description: Account group unique identifier.
                    format: uuid
                  currency:
                    type: string
                    description: >-
                      Alphabetic three-letter [ISO
                      4217](https://en.wikipedia.org/wiki/ISO_4217) currency
                      code.

                      * EUR - Euro 

                      * GBP - Great British Pound
                    enum:
                      - EUR
                      - GBP
                  balance:
                    type: string
                    pattern: ^-?[0-9]{0,63}(\.[0-9]{1,27})?$
                  locked_for_trading:
                    type: string
                    pattern: ^[0-9]{0,63}(\.[0-9]{1,27})?$
                  pending_settlement:
                    type: string
                    pattern: ^[0-9]{0,63}(\.[0-9]{1,27})?$
                  available_for_withdrawal:
                    type: string
                    pattern: ^-?[0-9]{0,63}(\.[0-9]{1,27})?$
                  available_for_trading:
                    type: string
                    pattern: ^-?[0-9]{0,63}(\.[0-9]{1,27})?$
                required:
                  - account_group_id
                  - currency
                  - balance
                  - locked_for_trading
                  - pending_settlement
                  - available_for_withdrawal
                  - available_for_trading
                additionalProperties: false
              examples:
                cash_balance:
                  summary: Cash Balance
                  value:
                    account_group_id: d0fc0305-97b7-4e3b-bddf-66d3c434898c
                    currency: EUR
                    balance: '100'
                    locked_for_trading: '10'
                    pending_settlement: '10'
                    available_for_withdrawal: '80'
                    available_for_trading: '80'
                nominal_buy_order_new_cash_balance_update:
                  summary: Cash Balance when Nominal Buy Order is still NEW
                  value:
                    account_group_id: d0fc0305-97b7-4e3b-bddf-66d3c434898c
                    currency: EUR
                    balance: '1000'
                    locked_for_trading: '1000'
                    pending_settlement: '0'
                    available_for_withdrawal: '0'
                    available_for_trading: '0'
                nominal_buy_order_filled_cash_balance_update:
                  summary: Cash Balance after Nominal Buy Order was filled
                  value:
                    account_group_id: d0fc0305-97b7-4e3b-bddf-66d3c434898c
                    currency: EUR
                    balance: '0'
                    locked_for_trading: '0'
                    pending_settlement: '0'
                    available_for_withdrawal: '0'
                    available_for_trading: '0'
                unit_sell_order_filled_cash_balance_update:
                  summary: Cash Balance after a Unit Sell Order was filled
                  value:
                    account_group_id: d0fc0305-97b7-4e3b-bddf-66d3c434898c
                    currency: EUR
                    balance: '828.75'
                    locked_for_trading: '0'
                    pending_settlement: '828.75'
                    available_for_withdrawal: '0'
                    available_for_trading: '828.75'
                cash_balance_available_before_withdrawal_request:
                  summary: Cash Balance available before withdrawal request
                  value:
                    account_group_id: d0fc0305-97b7-4e3b-bddf-66d3c434898c
                    currency: EUR
                    balance: '200'
                    locked_for_trading: '0'
                    pending_settlement: '0'
                    available_for_withdrawal: '200'
                    available_for_trading: '0'
        '401':
          description: Unauthorized. The caller has not been authenticated.
          headers:
            upvest-request-id:
              required: true
              schema:
                type: string
                format: uuid
                example: 169ae4c7-ebd7-4041-94da-25369653eba7
          content:
            application/problem+json:
              schema:
                title: Error
                type: object
                description: ''
                properties:
                  type:
                    type: string
                    description: URL to a document describing the error condition.
                  status:
                    type: integer
                    description: >-
                      Transmission of the HTTP status code so that all
                      information can be found in one place, but also to correct
                      changes in the status code due to the use of proxy
                      servers.
                  title:
                    type: string
                    description: >-
                      A short, human-readable title for the general error type;
                      the title should not change for given types.
                  detail:
                    type: string
                    description: A human-readable description of the specific error.
                  instance:
                    type: string
                    description: >-
                      This optional key may be present, with a unique URI for
                      the specific error; this will often point to an error log
                      for that specific response.
                  request_id:
                    type: string
                    description: Correlation ID for the original request.
                required:
                  - type
                  - status
                additionalProperties: false
              example:
                status: 401
                type: unauthorized
        '403':
          description: >-
            Forbidden. The caller has been authenticated but is not allowed to
            take the requested action.
          headers:
            upvest-request-id:
              required: true
              schema:
                type: string
                format: uuid
                example: 169ae4c7-ebd7-4041-94da-25369653eba7
          content:
            application/problem+json:
              schema:
                title: Error
                type: object
                description: ''
                properties:
                  type:
                    type: string
                    description: URL to a document describing the error condition.
                  status:
                    type: integer
                    description: >-
                      Transmission of the HTTP status code so that all
                      information can be found in one place, but also to correct
                      changes in the status code due to the use of proxy
                      servers.
                  title:
                    type: string
                    description: >-
                      A short, human-readable title for the general error type;
                      the title should not change for given types.
                  detail:
                    type: string
                    description: A human-readable description of the specific error.
                  instance:
                    type: string
                    description: >-
                      This optional key may be present, with a unique URI for
                      the specific error; this will often point to an error log
                      for that specific response.
                  request_id:
                    type: string
                    description: Correlation ID for the original request.
                required:
                  - type
                  - status
                additionalProperties: false
              example:
                status: 403
                type: forbidden
        '404':
          description: Not Found. The requested resource could not be found.
          headers:
            upvest-request-id:
              required: true
              schema:
                type: string
                format: uuid
                example: 169ae4c7-ebd7-4041-94da-25369653eba7
          content:
            application/problem+json:
              schema:
                title: Error
                type: object
                description: ''
                properties:
                  type:
                    type: string
                    description: URL to a document describing the error condition.
                  status:
                    type: integer
                    description: >-
                      Transmission of the HTTP status code so that all
                      information can be found in one place, but also to correct
                      changes in the status code due to the use of proxy
                      servers.
                  title:
                    type: string
                    description: >-
                      A short, human-readable title for the general error type;
                      the title should not change for given types.
                  detail:
                    type: string
                    description: A human-readable description of the specific error.
                  instance:
                    type: string
                    description: >-
                      This optional key may be present, with a unique URI for
                      the specific error; this will often point to an error log
                      for that specific response.
                  request_id:
                    type: string
                    description: Correlation ID for the original request.
                required:
                  - type
                  - status
                additionalProperties: false
              example:
                status: 404
                type: not_found
        '406':
          description: Not Found. The requested resource could not be found.
          headers:
            upvest-request-id:
              required: true
              schema:
                type: string
                format: uuid
                example: 169ae4c7-ebd7-4041-94da-25369653eba7
          content:
            application/problem+json:
              schema:
                title: Error
                type: object
                description: ''
                properties:
                  type:
                    type: string
                    description: URL to a document describing the error condition.
                  status:
                    type: integer
                    description: >-
                      Transmission of the HTTP status code so that all
                      information can be found in one place, but also to correct
                      changes in the status code due to the use of proxy
                      servers.
                  title:
                    type: string
                    description: >-
                      A short, human-readable title for the general error type;
                      the title should not change for given types.
                  detail:
                    type: string
                    description: A human-readable description of the specific error.
                  instance:
                    type: string
                    description: >-
                      This optional key may be present, with a unique URI for
                      the specific error; this will often point to an error log
                      for that specific response.
                  request_id:
                    type: string
                    description: Correlation ID for the original request.
                required:
                  - type
                  - status
                additionalProperties: false
              example:
                status: 404
                type: not_found
        '429':
          description: >-
            Too Many Requests. The caller has exceeded their quota for the time
            period and has been throttled.
          headers:
            upvest-request-id:
              required: true
              schema:
                type: string
                format: uuid
                example: 169ae4c7-ebd7-4041-94da-25369653eba7
          content:
            application/problem+json:
              schema:
                title: Error
                type: object
                description: ''
                properties:
                  type:
                    type: string
                    description: URL to a document describing the error condition.
                  status:
                    type: integer
                    description: >-
                      Transmission of the HTTP status code so that all
                      information can be found in one place, but also to correct
                      changes in the status code due to the use of proxy
                      servers.
                  title:
                    type: string
                    description: >-
                      A short, human-readable title for the general error type;
                      the title should not change for given types.
                  detail:
                    type: string
                    description: A human-readable description of the specific error.
                  instance:
                    type: string
                    description: >-
                      This optional key may be present, with a unique URI for
                      the specific error; this will often point to an error log
                      for that specific response.
                  request_id:
                    type: string
                    description: Correlation ID for the original request.
                required:
                  - type
                  - status
                additionalProperties: false
              example:
                status: 429
                type: too_many_requests
        '500':
          description: Internal Server Error. The service encountered an unexpected error.
          headers:
            upvest-request-id:
              required: true
              schema:
                type: string
                format: uuid
                example: 169ae4c7-ebd7-4041-94da-25369653eba7
          content:
            application/problem+json:
              schema:
                title: Error
                type: object
                description: ''
                properties:
                  type:
                    type: string
                    description: URL to a document describing the error condition.
                  status:
                    type: integer
                    description: >-
                      Transmission of the HTTP status code so that all
                      information can be found in one place, but also to correct
                      changes in the status code due to the use of proxy
                      servers.
                  title:
                    type: string
                    description: >-
                      A short, human-readable title for the general error type;
                      the title should not change for given types.
                  detail:
                    type: string
                    description: A human-readable description of the specific error.
                  instance:
                    type: string
                    description: >-
                      This optional key may be present, with a unique URI for
                      the specific error; this will often point to an error log
                      for that specific response.
                  request_id:
                    type: string
                    description: Correlation ID for the original request.
                required:
                  - type
                  - status
                additionalProperties: false
              example:
                status: 500
                type: internal_server_error
        '503':
          description: >-
            Service Unavailable. The service handling for this request cannot be
            reached at this time.
          headers:
            upvest-request-id:
              required: true
              schema:
                type: string
                format: uuid
                example: 169ae4c7-ebd7-4041-94da-25369653eba7
          content:
            application/problem+json:
              schema:
                title: Error
                type: object
                description: ''
                properties:
                  type:
                    type: string
                    description: URL to a document describing the error condition.
                  status:
                    type: integer
                    description: >-
                      Transmission of the HTTP status code so that all
                      information can be found in one place, but also to correct
                      changes in the status code due to the use of proxy
                      servers.
                  title:
                    type: string
                    description: >-
                      A short, human-readable title for the general error type;
                      the title should not change for given types.
                  detail:
                    type: string
                    description: A human-readable description of the specific error.
                  instance:
                    type: string
                    description: >-
                      This optional key may be present, with a unique URI for
                      the specific error; this will often point to an error log
                      for that specific response.
                  request_id:
                    type: string
                    description: Correlation ID for the original request.
                required:
                  - type
                  - status
                additionalProperties: false
              example:
                status: 503
                type: method_not_allowed
        '504':
          description: >-
            Gateway Timeout. The service gateway has reached its internal
            timeout.
          headers:
            upvest-request-id:
              required: true
              schema:
                type: string
                format: uuid
                example: 169ae4c7-ebd7-4041-94da-25369653eba7
          content:
            application/problem+json:
              schema:
                title: Error
                type: object
                description: ''
                properties:
                  type:
                    type: string
                    description: URL to a document describing the error condition.
                  status:
                    type: integer
                    description: >-
                      Transmission of the HTTP status code so that all
                      information can be found in one place, but also to correct
                      changes in the status code due to the use of proxy
                      servers.
                  title:
                    type: string
                    description: >-
                      A short, human-readable title for the general error type;
                      the title should not change for given types.
                  detail:
                    type: string
                    description: A human-readable description of the specific error.
                  instance:
                    type: string
                    description: >-
                      This optional key may be present, with a unique URI for
                      the specific error; this will often point to an error log
                      for that specific response.
                  request_id:
                    type: string
                    description: Correlation ID for the original request.
                required:
                  - type
                  - status
                additionalProperties: false
              example:
                status: 504
                type: gateway_timeout
  /users/{user_id}/accounts:
    parameters:
      - name: user_id
        in: path
        required: true
        schema:
          title: User unique identifier.
          type: string
          description: User unique identifier.
          format: uuid
      - name: upvest-client-id
        in: header
        description: Tenant Client ID
        required: true
        schema:
          type: string
          format: uuid
          example: ebabcf4d-61c3-4942-875c-e265a7c2d062
      - name: authorization
        in: header
        description: |
          Bearer (access) token from the OAuth flow with correct scopes.
          https://datatracker.ietf.org/doc/html/rfc6750
        required: true
        schema:
          type: string
          pattern: ^Bearer [a-zA-Z0-9\-\._~+/]*=*
          example: Bearer c2VjcmV0Cg==
      - name: signature
        in: header
        required: true
        schema:
          type: string
        description: >-
          https://tools.ietf.org/id/draft-ietf-httpbis-message-signatures-01.html#name-the-signature-http-header
      - name: signature-input
        in: header
        required: true
        schema:
          type: string
        description: >-
          https://tools.ietf.org/id/draft-ietf-httpbis-message-signatures-01.html#name-the-signature-input-http-he
      - name: upvest-api-version
        in: header
        required: false
        schema:
          type: string
          enum:
            - '1'
          default: '1'
          example: '1'
        description: 'Upvest API version (Note: Do not include quotation marks)'
    get:
      operationId: list_user_accounts
      summary: Get user accounts
      description: Lists the accounts of a user specified by ID.
      tags:
        - Accounts
      security:
        - oauth-client-credentials:
            - accounts:read
            - accounts:admin
      parameters:
        - name: sort
          in: query
          required: false
          schema:
            type: string
            enum:
              - created_at
              - updated_at
            default: created_at
          description: Sort the result by `created_at`, `updated_at`.
        - name: order
          in: query
          required: false
          schema:
            type: string
            enum:
              - ASC
              - DESC
            default: ASC
          description: >-
            Sort order of the result list if the `sort` parameter is specified.
            Use `ASC` for ascending or `DESC` for descending sort order.
        - name: offset
          in: query
          schema:
            type: integer
            minimum: 0
            format: int32
          allowEmptyValue: true
          description: >-
            Use the `offset` argument to specify where in the list of results to
            start when returning items for a particular query.
        - name: limit
          in: query
          schema:
            type: integer
            format: int32
            default: 100
            minimum: 0
            maximum: 1000
          allowEmptyValue: true
          description: >-
            Use the `limit` argument to specify the maximum number of items
            returned.
      responses:
        '200':
          description: OK
          headers:
            upvest-request-id:
              required: true
              schema:
                type: string
                format: uuid
                example: 169ae4c7-ebd7-4041-94da-25369653eba7
          content:
            application/json:
              schema:
                title: Accounts - List - Response
                type: object
                properties:
                  meta:
                    type: object
                    properties:
                      offset:
                        type: integer
                        description: Amount of resource to offset in the response.
                      limit:
                        type: integer
                        description: Total limit of the response.
                      count:
                        type: integer
                        description: Count of the resources returned in the response.
                      total_count:
                        type: integer
                        description: Total count of all the resources.
                      sort:
                        type: string
                        description: The field that the list is sorted by.
                      order:
                        type: string
                        description: |-
                          The ordering of the response.
                          * ASC - Ascending order
                          * DESC - Descending order
                        enum:
                          - ASC
                          - DESC
                    required:
                      - offset
                      - limit
                      - count
                      - total_count
                  data:
                    type: array
                    items:
                      title: Account
                      type: object
                      description: ''
                      properties:
                        id:
                          title: Account unique identifier.
                          type: string
                          description: Account unique identifier.
                          format: uuid
                        created_at:
                          type: string
                          format: date-time
                          description: >-
                            Date and time when the resource was created. [RFC
                            3339-5](https://datatracker.ietf.org/doc/html/rfc3339#section-5.6),
                            [ISO8601
                            UTC](https://www.iso.org/iso-8601-date-and-time-format.html)
                        updated_at:
                          type: string
                          format: date-time
                          description: >-
                            Date and time when the resource was last updated.
                            [RFC
                            3339-5](https://datatracker.ietf.org/doc/html/rfc3339#section-5.6),
                            [ISO8601
                            UTC](https://www.iso.org/iso-8601-date-and-time-format.html)
                        account_group_id:
                          title: Account group unique identifier.
                          type: string
                          description: Account group unique identifier.
                          format: uuid
                        type:
                          type: string
                          description: >-
                            Account type.

                            * TRADING - Orders in accounts of this type are
                            created on a specific instrument basis.

                            * PORTFOLIO - Orders in accounts of this type are
                            created on a portfolio basis and additional
                            portfolio functionality is available.
                          enum:
                            - TRADING
                            - PORTFOLIO
                        users:
                          type: array
                          items:
                            type: object
                            properties:
                              id:
                                title: User unique identifier.
                                type: string
                                description: User unique identifier.
                                format: uuid
                              type:
                                type: string
                                description: |-
                                  Relation type
                                  * OWNER - 
                                enum:
                                  - OWNER
                                default: OWNER
                        account_number:
                          type: integer
                          description: >-
                            The serial account number of the account in the
                            account group.
                          minimum: 1
                        name:
                          type: string
                          description: The name of the account.
                          maxLength: 100
                        status:
                          type: string
                          description: >-
                            The status of the account

                            * PENDING_APPROVAL - Account approval is pending -
                            the account is visible through our API but cannot be
                            acted on.

                            * ACTIVE - Account is active - full functionality of
                            the Investment API is accessible.

                            * CLOSING - Account is closing - only sell orders or
                            the transfer of positions out are permissible before
                            the account is closed.

                            * CLOSED - Account is closed with zero balance
                            successfully.

                            * LOCKED - Account is locked for all actions.
                          enum:
                            - PENDING_APPROVAL
                            - ACTIVE
                            - CLOSING
                            - CLOSED
                            - LOCKED
                      required:
                        - id
                        - created_at
                        - updated_at
                        - account_group_id
                        - type
                        - users
                        - name
                        - status
                        - account_number
                      additionalProperties: false
                required:
                  - meta
                  - data
                additionalProperties: false
              example:
                meta:
                  offset: 0
                  limit: 100
                  count: 1
                  total_count: 1
                  sort: id
                  order: ASC
                data:
                  - id: ad45b27f-c0e7-4cfb-b48c-a83670dbdfbd
                    created_at: '2020-08-24T14:15:22Z'
                    updated_at: '2020-08-24T14:15:22Z'
                    account_group_id: fa2414ed-8d62-46fd-85ed-565a340c81d6
                    type: TRADING
                    users:
                      - id: 9c36af78-91a0-4174-a515-fc81214e3dab
                        type: OWNER
                    account_number: 1
                    name: Main account
                    status: ACTIVE
        '400':
          description: Bad Request. The incoming request had a malformed parameter/object.
          headers:
            upvest-request-id:
              required: true
              schema:
                type: string
                format: uuid
                example: 169ae4c7-ebd7-4041-94da-25369653eba7
          content:
            application/problem+json:
              schema:
                title: Error
                type: object
                description: ''
                properties:
                  type:
                    type: string
                    description: URL to a document describing the error condition.
                  status:
                    type: integer
                    description: >-
                      Transmission of the HTTP status code so that all
                      information can be found in one place, but also to correct
                      changes in the status code due to the use of proxy
                      servers.
                  title:
                    type: string
                    description: >-
                      A short, human-readable title for the general error type;
                      the title should not change for given types.
                  detail:
                    type: string
                    description: A human-readable description of the specific error.
                  instance:
                    type: string
                    description: >-
                      This optional key may be present, with a unique URI for
                      the specific error; this will often point to an error log
                      for that specific response.
                  request_id:
                    type: string
                    description: Correlation ID for the original request.
                required:
                  - type
                  - status
                additionalProperties: false
              example:
                status: 400
                type: bad_request
        '401':
          description: Unauthorized. The caller has not been authenticated.
          headers:
            upvest-request-id:
              required: true
              schema:
                type: string
                format: uuid
                example: 169ae4c7-ebd7-4041-94da-25369653eba7
          content:
            application/problem+json:
              schema:
                title: Error
                type: object
                description: ''
                properties:
                  type:
                    type: string
                    description: URL to a document describing the error condition.
                  status:
                    type: integer
                    description: >-
                      Transmission of the HTTP status code so that all
                      information can be found in one place, but also to correct
                      changes in the status code due to the use of proxy
                      servers.
                  title:
                    type: string
                    description: >-
                      A short, human-readable title for the general error type;
                      the title should not change for given types.
                  detail:
                    type: string
                    description: A human-readable description of the specific error.
                  instance:
                    type: string
                    description: >-
                      This optional key may be present, with a unique URI for
                      the specific error; this will often point to an error log
                      for that specific response.
                  request_id:
                    type: string
                    description: Correlation ID for the original request.
                required:
                  - type
                  - status
                additionalProperties: false
              example:
                status: 401
                type: unauthorized
        '403':
          description: >-
            Forbidden. The caller has been authenticated but is not allowed to
            take the requested action.
          headers:
            upvest-request-id:
              required: true
              schema:
                type: string
                format: uuid
                example: 169ae4c7-ebd7-4041-94da-25369653eba7
          content:
            application/problem+json:
              schema:
                title: Error
                type: object
                description: ''
                properties:
                  type:
                    type: string
                    description: URL to a document describing the error condition.
                  status:
                    type: integer
                    description: >-
                      Transmission of the HTTP status code so that all
                      information can be found in one place, but also to correct
                      changes in the status code due to the use of proxy
                      servers.
                  title:
                    type: string
                    description: >-
                      A short, human-readable title for the general error type;
                      the title should not change for given types.
                  detail:
                    type: string
                    description: A human-readable description of the specific error.
                  instance:
                    type: string
                    description: >-
                      This optional key may be present, with a unique URI for
                      the specific error; this will often point to an error log
                      for that specific response.
                  request_id:
                    type: string
                    description: Correlation ID for the original request.
                required:
                  - type
                  - status
                additionalProperties: false
              example:
                status: 403
                type: forbidden
        '404':
          description: Not Found. The requested resource could not be found.
          headers:
            upvest-request-id:
              required: true
              schema:
                type: string
                format: uuid
                example: 169ae4c7-ebd7-4041-94da-25369653eba7
          content:
            application/problem+json:
              schema:
                title: Error
                type: object
                description: ''
                properties:
                  type:
                    type: string
                    description: URL to a document describing the error condition.
                  status:
                    type: integer
                    description: >-
                      Transmission of the HTTP status code so that all
                      information can be found in one place, but also to correct
                      changes in the status code due to the use of proxy
                      servers.
                  title:
                    type: string
                    description: >-
                      A short, human-readable title for the general error type;
                      the title should not change for given types.
                  detail:
                    type: string
                    description: A human-readable description of the specific error.
                  instance:
                    type: string
                    description: >-
                      This optional key may be present, with a unique URI for
                      the specific error; this will often point to an error log
                      for that specific response.
                  request_id:
                    type: string
                    description: Correlation ID for the original request.
                required:
                  - type
                  - status
                additionalProperties: false
              example:
                status: 404
                type: not_found
        '406':
          description: >-
            Not Acceptable. The resource does not have a current representation
            that would be acceptable to the user agent. "Accept" header defined
            unsupported value.
          headers:
            upvest-request-id:
              required: true
              schema:
                type: string
                format: uuid
                example: 169ae4c7-ebd7-4041-94da-25369653eba7
          content:
            application/problem+json:
              schema:
                title: Error
                type: object
                description: ''
                properties:
                  type:
                    type: string
                    description: URL to a document describing the error condition.
                  status:
                    type: integer
                    description: >-
                      Transmission of the HTTP status code so that all
                      information can be found in one place, but also to correct
                      changes in the status code due to the use of proxy
                      servers.
                  title:
                    type: string
                    description: >-
                      A short, human-readable title for the general error type;
                      the title should not change for given types.
                  detail:
                    type: string
                    description: A human-readable description of the specific error.
                  instance:
                    type: string
                    description: >-
                      This optional key may be present, with a unique URI for
                      the specific error; this will often point to an error log
                      for that specific response.
                  request_id:
                    type: string
                    description: Correlation ID for the original request.
                required:
                  - type
                  - status
                additionalProperties: false
              example:
                status: 406
                type: not_acceptable
        '429':
          description: >-
            Too Many Requests. The caller has exceeded their quota for the time
            period and has been throttled.
          headers:
            upvest-request-id:
              required: true
              schema:
                type: string
                format: uuid
                example: 169ae4c7-ebd7-4041-94da-25369653eba7
          content:
            application/problem+json:
              schema:
                title: Error
                type: object
                description: ''
                properties:
                  type:
                    type: string
                    description: URL to a document describing the error condition.
                  status:
                    type: integer
                    description: >-
                      Transmission of the HTTP status code so that all
                      information can be found in one place, but also to correct
                      changes in the status code due to the use of proxy
                      servers.
                  title:
                    type: string
                    description: >-
                      A short, human-readable title for the general error type;
                      the title should not change for given types.
                  detail:
                    type: string
                    description: A human-readable description of the specific error.
                  instance:
                    type: string
                    description: >-
                      This optional key may be present, with a unique URI for
                      the specific error; this will often point to an error log
                      for that specific response.
                  request_id:
                    type: string
                    description: Correlation ID for the original request.
                required:
                  - type
                  - status
                additionalProperties: false
              example:
                status: 429
                type: too_many_requests
        '500':
          description: Internal Server Error. The service encountered an unexpected error.
          headers:
            upvest-request-id:
              required: true
              schema:
                type: string
                format: uuid
                example: 169ae4c7-ebd7-4041-94da-25369653eba7
          content:
            application/problem+json:
              schema:
                title: Error
                type: object
                description: ''
                properties:
                  type:
                    type: string
                    description: URL to a document describing the error condition.
                  status:
                    type: integer
                    description: >-
                      Transmission of the HTTP status code so that all
                      information can be found in one place, but also to correct
                      changes in the status code due to the use of proxy
                      servers.
                  title:
                    type: string
                    description: >-
                      A short, human-readable title for the general error type;
                      the title should not change for given types.
                  detail:
                    type: string
                    description: A human-readable description of the specific error.
                  instance:
                    type: string
                    description: >-
                      This optional key may be present, with a unique URI for
                      the specific error; this will often point to an error log
                      for that specific response.
                  request_id:
                    type: string
                    description: Correlation ID for the original request.
                required:
                  - type
                  - status
                additionalProperties: false
              example:
                status: 500
                type: internal_server_error
        '503':
          description: >-
            Service Unavailable. The service handling for this request cannot be
            reached at this time.
          headers:
            upvest-request-id:
              required: true
              schema:
                type: string
                format: uuid
                example: 169ae4c7-ebd7-4041-94da-25369653eba7
          content:
            application/problem+json:
              schema:
                title: Error
                type: object
                description: ''
                properties:
                  type:
                    type: string
                    description: URL to a document describing the error condition.
                  status:
                    type: integer
                    description: >-
                      Transmission of the HTTP status code so that all
                      information can be found in one place, but also to correct
                      changes in the status code due to the use of proxy
                      servers.
                  title:
                    type: string
                    description: >-
                      A short, human-readable title for the general error type;
                      the title should not change for given types.
                  detail:
                    type: string
                    description: A human-readable description of the specific error.
                  instance:
                    type: string
                    description: >-
                      This optional key may be present, with a unique URI for
                      the specific error; this will often point to an error log
                      for that specific response.
                  request_id:
                    type: string
                    description: Correlation ID for the original request.
                required:
                  - type
                  - status
                additionalProperties: false
              example:
                status: 503
                type: method_not_allowed
        '504':
          description: >-
            Gateway Timeout. The service gateway has reached its internal
            timeout.
          headers:
            upvest-request-id:
              required: true
              schema:
                type: string
                format: uuid
                example: 169ae4c7-ebd7-4041-94da-25369653eba7
          content:
            application/problem+json:
              schema:
                title: Error
                type: object
                description: ''
                properties:
                  type:
                    type: string
                    description: URL to a document describing the error condition.
                  status:
                    type: integer
                    description: >-
                      Transmission of the HTTP status code so that all
                      information can be found in one place, but also to correct
                      changes in the status code due to the use of proxy
                      servers.
                  title:
                    type: string
                    description: >-
                      A short, human-readable title for the general error type;
                      the title should not change for given types.
                  detail:
                    type: string
                    description: A human-readable description of the specific error.
                  instance:
                    type: string
                    description: >-
                      This optional key may be present, with a unique URI for
                      the specific error; this will often point to an error log
                      for that specific response.
                  request_id:
                    type: string
                    description: Correlation ID for the original request.
                required:
                  - type
                  - status
                additionalProperties: false
              example:
                status: 504
                type: gateway_timeout
  /accounts/{account_id}:
    parameters:
      - name: account_id
        in: path
        required: true
        schema:
          title: Account unique identifier.
          type: string
          description: Account unique identifier.
          format: uuid
      - name: upvest-client-id
        in: header
        description: Tenant Client ID
        required: true
        schema:
          type: string
          format: uuid
          example: ebabcf4d-61c3-4942-875c-e265a7c2d062
      - name: authorization
        in: header
        description: |
          Bearer (access) token from the OAuth flow with correct scopes.
          https://datatracker.ietf.org/doc/html/rfc6750
        required: true
        schema:
          type: string
          pattern: ^Bearer [a-zA-Z0-9\-\._~+/]*=*
          example: Bearer c2VjcmV0Cg==
      - name: signature
        in: header
        required: true
        schema:
          type: string
        description: >-
          https://tools.ietf.org/id/draft-ietf-httpbis-message-signatures-01.html#name-the-signature-http-header
      - name: signature-input
        in: header
        required: true
        schema:
          type: string
        description: >-
          https://tools.ietf.org/id/draft-ietf-httpbis-message-signatures-01.html#name-the-signature-input-http-he
      - name: upvest-api-version
        in: header
        required: false
        schema:
          type: string
          enum:
            - '1'
          default: '1'
          example: '1'
        description: 'Upvest API version (Note: Do not include quotation marks)'
    get:
      operationId: retrieve_account
      summary: Get account by ID
      description: Returns the account specified by its ID.
      tags:
        - Accounts
      security:
        - oauth-client-credentials:
            - accounts:read
            - accounts:admin
      responses:
        '200':
          description: OK
          headers:
            upvest-request-id:
              required: true
              schema:
                type: string
                format: uuid
                example: 169ae4c7-ebd7-4041-94da-25369653eba7
          content:
            application/json:
              schema:
                title: Account
                type: object
                description: ''
                properties:
                  id:
                    title: Account unique identifier.
                    type: string
                    description: Account unique identifier.
                    format: uuid
                  created_at:
                    type: string
                    format: date-time
                    description: >-
                      Date and time when the resource was created. [RFC
                      3339-5](https://datatracker.ietf.org/doc/html/rfc3339#section-5.6),
                      [ISO8601
                      UTC](https://www.iso.org/iso-8601-date-and-time-format.html)
                  updated_at:
                    type: string
                    format: date-time
                    description: >-
                      Date and time when the resource was last updated. [RFC
                      3339-5](https://datatracker.ietf.org/doc/html/rfc3339#section-5.6),
                      [ISO8601
                      UTC](https://www.iso.org/iso-8601-date-and-time-format.html)
                  account_group_id:
                    title: Account group unique identifier.
                    type: string
                    description: Account group unique identifier.
                    format: uuid
                  type:
                    type: string
                    description: >-
                      Account type.

                      * TRADING - Orders in accounts of this type are created on
                      a specific instrument basis.

                      * PORTFOLIO - Orders in accounts of this type are created
                      on a portfolio basis and additional portfolio
                      functionality is available.
                    enum:
                      - TRADING
                      - PORTFOLIO
                  users:
                    type: array
                    items:
                      type: object
                      properties:
                        id:
                          title: User unique identifier.
                          type: string
                          description: User unique identifier.
                          format: uuid
                        type:
                          type: string
                          description: |-
                            Relation type
                            * OWNER - 
                          enum:
                            - OWNER
                          default: OWNER
                  account_number:
                    type: integer
                    description: >-
                      The serial account number of the account in the account
                      group.
                    minimum: 1
                  name:
                    type: string
                    description: The name of the account.
                    maxLength: 100
                  status:
                    type: string
                    description: >-
                      The status of the account

                      * PENDING_APPROVAL - Account approval is pending - the
                      account is visible through our API but cannot be acted on.

                      * ACTIVE - Account is active - full functionality of the
                      Investment API is accessible.

                      * CLOSING - Account is closing - only sell orders or the
                      transfer of positions out are permissible before the
                      account is closed.

                      * CLOSED - Account is closed with zero balance
                      successfully.

                      * LOCKED - Account is locked for all actions.
                    enum:
                      - PENDING_APPROVAL
                      - ACTIVE
                      - CLOSING
                      - CLOSED
                      - LOCKED
                required:
                  - id
                  - created_at
                  - updated_at
                  - account_group_id
                  - type
                  - users
                  - name
                  - status
                  - account_number
                additionalProperties: false
              example:
                id: ad45b27f-c0e7-4cfb-b48c-a83670dbdfbd
                created_at: '2020-08-24T14:15:22Z'
                updated_at: '2020-08-24T14:15:22Z'
                account_group_id: fa2414ed-8d62-46fd-85ed-565a340c81d6
                type: TRADING
                users:
                  - id: 9c36af78-91a0-4174-a515-fc81214e3dab
                    type: OWNER
                account_number: 1
                name: Main account
                status: ACTIVE
        '401':
          description: Unauthorized. The caller has not been authenticated.
          headers:
            upvest-request-id:
              required: true
              schema:
                type: string
                format: uuid
                example: 169ae4c7-ebd7-4041-94da-25369653eba7
          content:
            application/problem+json:
              schema:
                title: Error
                type: object
                description: ''
                properties:
                  type:
                    type: string
                    description: URL to a document describing the error condition.
                  status:
                    type: integer
                    description: >-
                      Transmission of the HTTP status code so that all
                      information can be found in one place, but also to correct
                      changes in the status code due to the use of proxy
                      servers.
                  title:
                    type: string
                    description: >-
                      A short, human-readable title for the general error type;
                      the title should not change for given types.
                  detail:
                    type: string
                    description: A human-readable description of the specific error.
                  instance:
                    type: string
                    description: >-
                      This optional key may be present, with a unique URI for
                      the specific error; this will often point to an error log
                      for that specific response.
                  request_id:
                    type: string
                    description: Correlation ID for the original request.
                required:
                  - type
                  - status
                additionalProperties: false
              example:
                status: 401
                type: unauthorized
        '403':
          description: >-
            Forbidden. The caller has been authenticated but is not allowed to
            take the requested action.
          headers:
            upvest-request-id:
              required: true
              schema:
                type: string
                format: uuid
                example: 169ae4c7-ebd7-4041-94da-25369653eba7
          content:
            application/problem+json:
              schema:
                title: Error
                type: object
                description: ''
                properties:
                  type:
                    type: string
                    description: URL to a document describing the error condition.
                  status:
                    type: integer
                    description: >-
                      Transmission of the HTTP status code so that all
                      information can be found in one place, but also to correct
                      changes in the status code due to the use of proxy
                      servers.
                  title:
                    type: string
                    description: >-
                      A short, human-readable title for the general error type;
                      the title should not change for given types.
                  detail:
                    type: string
                    description: A human-readable description of the specific error.
                  instance:
                    type: string
                    description: >-
                      This optional key may be present, with a unique URI for
                      the specific error; this will often point to an error log
                      for that specific response.
                  request_id:
                    type: string
                    description: Correlation ID for the original request.
                required:
                  - type
                  - status
                additionalProperties: false
              example:
                status: 403
                type: forbidden
        '404':
          description: Not Found. The requested resource could not be found.
          headers:
            upvest-request-id:
              required: true
              schema:
                type: string
                format: uuid
                example: 169ae4c7-ebd7-4041-94da-25369653eba7
          content:
            application/problem+json:
              schema:
                title: Error
                type: object
                description: ''
                properties:
                  type:
                    type: string
                    description: URL to a document describing the error condition.
                  status:
                    type: integer
                    description: >-
                      Transmission of the HTTP status code so that all
                      information can be found in one place, but also to correct
                      changes in the status code due to the use of proxy
                      servers.
                  title:
                    type: string
                    description: >-
                      A short, human-readable title for the general error type;
                      the title should not change for given types.
                  detail:
                    type: string
                    description: A human-readable description of the specific error.
                  instance:
                    type: string
                    description: >-
                      This optional key may be present, with a unique URI for
                      the specific error; this will often point to an error log
                      for that specific response.
                  request_id:
                    type: string
                    description: Correlation ID for the original request.
                required:
                  - type
                  - status
                additionalProperties: false
              example:
                status: 404
                type: not_found
        '406':
          description: >-
            Not Acceptable. The resource does not have a current representation
            that would be acceptable to the user agent. "Accept" header defined
            unsupported value.
          headers:
            upvest-request-id:
              required: true
              schema:
                type: string
                format: uuid
                example: 169ae4c7-ebd7-4041-94da-25369653eba7
          content:
            application/problem+json:
              schema:
                title: Error
                type: object
                description: ''
                properties:
                  type:
                    type: string
                    description: URL to a document describing the error condition.
                  status:
                    type: integer
                    description: >-
                      Transmission of the HTTP status code so that all
                      information can be found in one place, but also to correct
                      changes in the status code due to the use of proxy
                      servers.
                  title:
                    type: string
                    description: >-
                      A short, human-readable title for the general error type;
                      the title should not change for given types.
                  detail:
                    type: string
                    description: A human-readable description of the specific error.
                  instance:
                    type: string
                    description: >-
                      This optional key may be present, with a unique URI for
                      the specific error; this will often point to an error log
                      for that specific response.
                  request_id:
                    type: string
                    description: Correlation ID for the original request.
                required:
                  - type
                  - status
                additionalProperties: false
              example:
                status: 406
                type: not_acceptable
        '429':
          description: >-
            Too Many Requests. The caller has exceeded their quota for the time
            period and has been throttled.
          headers:
            upvest-request-id:
              required: true
              schema:
                type: string
                format: uuid
                example: 169ae4c7-ebd7-4041-94da-25369653eba7
          content:
            application/problem+json:
              schema:
                title: Error
                type: object
                description: ''
                properties:
                  type:
                    type: string
                    description: URL to a document describing the error condition.
                  status:
                    type: integer
                    description: >-
                      Transmission of the HTTP status code so that all
                      information can be found in one place, but also to correct
                      changes in the status code due to the use of proxy
                      servers.
                  title:
                    type: string
                    description: >-
                      A short, human-readable title for the general error type;
                      the title should not change for given types.
                  detail:
                    type: string
                    description: A human-readable description of the specific error.
                  instance:
                    type: string
                    description: >-
                      This optional key may be present, with a unique URI for
                      the specific error; this will often point to an error log
                      for that specific response.
                  request_id:
                    type: string
                    description: Correlation ID for the original request.
                required:
                  - type
                  - status
                additionalProperties: false
              example:
                status: 429
                type: too_many_requests
        '500':
          description: Internal Server Error. The service encountered an unexpected error.
          headers:
            upvest-request-id:
              required: true
              schema:
                type: string
                format: uuid
                example: 169ae4c7-ebd7-4041-94da-25369653eba7
          content:
            application/problem+json:
              schema:
                title: Error
                type: object
                description: ''
                properties:
                  type:
                    type: string
                    description: URL to a document describing the error condition.
                  status:
                    type: integer
                    description: >-
                      Transmission of the HTTP status code so that all
                      information can be found in one place, but also to correct
                      changes in the status code due to the use of proxy
                      servers.
                  title:
                    type: string
                    description: >-
                      A short, human-readable title for the general error type;
                      the title should not change for given types.
                  detail:
                    type: string
                    description: A human-readable description of the specific error.
                  instance:
                    type: string
                    description: >-
                      This optional key may be present, with a unique URI for
                      the specific error; this will often point to an error log
                      for that specific response.
                  request_id:
                    type: string
                    description: Correlation ID for the original request.
                required:
                  - type
                  - status
                additionalProperties: false
              example:
                status: 500
                type: internal_server_error
        '503':
          description: >-
            Service Unavailable. The service handling for this request cannot be
            reached at this time.
          headers:
            upvest-request-id:
              required: true
              schema:
                type: string
                format: uuid
                example: 169ae4c7-ebd7-4041-94da-25369653eba7
          content:
            application/problem+json:
              schema:
                title: Error
                type: object
                description: ''
                properties:
                  type:
                    type: string
                    description: URL to a document describing the error condition.
                  status:
                    type: integer
                    description: >-
                      Transmission of the HTTP status code so that all
                      information can be found in one place, but also to correct
                      changes in the status code due to the use of proxy
                      servers.
                  title:
                    type: string
                    description: >-
                      A short, human-readable title for the general error type;
                      the title should not change for given types.
                  detail:
                    type: string
                    description: A human-readable description of the specific error.
                  instance:
                    type: string
                    description: >-
                      This optional key may be present, with a unique URI for
                      the specific error; this will often point to an error log
                      for that specific response.
                  request_id:
                    type: string
                    description: Correlation ID for the original request.
                required:
                  - type
                  - status
                additionalProperties: false
              example:
                status: 503
                type: method_not_allowed
        '504':
          description: >-
            Gateway Timeout. The service gateway has reached its internal
            timeout.
          headers:
            upvest-request-id:
              required: true
              schema:
                type: string
                format: uuid
                example: 169ae4c7-ebd7-4041-94da-25369653eba7
          content:
            application/problem+json:
              schema:
                title: Error
                type: object
                description: ''
                properties:
                  type:
                    type: string
                    description: URL to a document describing the error condition.
                  status:
                    type: integer
                    description: >-
                      Transmission of the HTTP status code so that all
                      information can be found in one place, but also to correct
                      changes in the status code due to the use of proxy
                      servers.
                  title:
                    type: string
                    description: >-
                      A short, human-readable title for the general error type;
                      the title should not change for given types.
                  detail:
                    type: string
                    description: A human-readable description of the specific error.
                  instance:
                    type: string
                    description: >-
                      This optional key may be present, with a unique URI for
                      the specific error; this will often point to an error log
                      for that specific response.
                  request_id:
                    type: string
                    description: Correlation ID for the original request.
                required:
                  - type
                  - status
                additionalProperties: false
              example:
                status: 504
                type: gateway_timeout
    patch:
      operationId: update_account
      summary: Update account by ID
      description: Updates the account specified by its ID.
      tags:
        - Accounts
      security:
        - oauth-client-credentials:
            - accounts:admin
      requestBody:
        content:
          application/json:
            schema:
              title: Account - Update - Request
              type: object
              properties:
                name:
                  type: string
                  description: The name of the account.
                  maxLength: 100
              additionalProperties: false
            example:
              name: Main account
      responses:
        '200':
          description: Account updated.
          headers:
            upvest-request-id:
              required: true
              schema:
                type: string
                format: uuid
                example: 169ae4c7-ebd7-4041-94da-25369653eba7
          content:
            application/json:
              schema:
                title: Account
                type: object
                description: ''
                properties:
                  id:
                    title: Account unique identifier.
                    type: string
                    description: Account unique identifier.
                    format: uuid
                  created_at:
                    type: string
                    format: date-time
                    description: >-
                      Date and time when the resource was created. [RFC
                      3339-5](https://datatracker.ietf.org/doc/html/rfc3339#section-5.6),
                      [ISO8601
                      UTC](https://www.iso.org/iso-8601-date-and-time-format.html)
                  updated_at:
                    type: string
                    format: date-time
                    description: >-
                      Date and time when the resource was last updated. [RFC
                      3339-5](https://datatracker.ietf.org/doc/html/rfc3339#section-5.6),
                      [ISO8601
                      UTC](https://www.iso.org/iso-8601-date-and-time-format.html)
                  account_group_id:
                    title: Account group unique identifier.
                    type: string
                    description: Account group unique identifier.
                    format: uuid
                  type:
                    type: string
                    description: >-
                      Account type.

                      * TRADING - Orders in accounts of this type are created on
                      a specific instrument basis.

                      * PORTFOLIO - Orders in accounts of this type are created
                      on a portfolio basis and additional portfolio
                      functionality is available.
                    enum:
                      - TRADING
                      - PORTFOLIO
                  users:
                    type: array
                    items:
                      type: object
                      properties:
                        id:
                          title: User unique identifier.
                          type: string
                          description: User unique identifier.
                          format: uuid
                        type:
                          type: string
                          description: |-
                            Relation type
                            * OWNER - 
                          enum:
                            - OWNER
                          default: OWNER
                  account_number:
                    type: integer
                    description: >-
                      The serial account number of the account in the account
                      group.
                    minimum: 1
                  name:
                    type: string
                    description: The name of the account.
                    maxLength: 100
                  status:
                    type: string
                    description: >-
                      The status of the account

                      * PENDING_APPROVAL - Account approval is pending - the
                      account is visible through our API but cannot be acted on.

                      * ACTIVE - Account is active - full functionality of the
                      Investment API is accessible.

                      * CLOSING - Account is closing - only sell orders or the
                      transfer of positions out are permissible before the
                      account is closed.

                      * CLOSED - Account is closed with zero balance
                      successfully.

                      * LOCKED - Account is locked for all actions.
                    enum:
                      - PENDING_APPROVAL
                      - ACTIVE
                      - CLOSING
                      - CLOSED
                      - LOCKED
                required:
                  - id
                  - created_at
                  - updated_at
                  - account_group_id
                  - type
                  - users
                  - name
                  - status
                  - account_number
                additionalProperties: false
              example:
                id: ad45b27f-c0e7-4cfb-b48c-a83670dbdfbd
                created_at: '2020-08-24T14:15:22Z'
                updated_at: '2020-08-24T14:15:22Z'
                account_group_id: fa2414ed-8d62-46fd-85ed-565a340c81d6
                type: TRADING
                users:
                  - id: 9c36af78-91a0-4174-a515-fc81214e3dab
                    type: OWNER
                account_number: 1
                name: Main account
                status: ACTIVE
        '400':
          description: Bad Request. The incoming request had a malformed parameter/object.
          headers:
            upvest-request-id:
              required: true
              schema:
                type: string
                format: uuid
                example: 169ae4c7-ebd7-4041-94da-25369653eba7
          content:
            application/problem+json:
              schema:
                title: Error
                type: object
                description: ''
                properties:
                  type:
                    type: string
                    description: URL to a document describing the error condition.
                  status:
                    type: integer
                    description: >-
                      Transmission of the HTTP status code so that all
                      information can be found in one place, but also to correct
                      changes in the status code due to the use of proxy
                      servers.
                  title:
                    type: string
                    description: >-
                      A short, human-readable title for the general error type;
                      the title should not change for given types.
                  detail:
                    type: string
                    description: A human-readable description of the specific error.
                  instance:
                    type: string
                    description: >-
                      This optional key may be present, with a unique URI for
                      the specific error; this will often point to an error log
                      for that specific response.
                  request_id:
                    type: string
                    description: Correlation ID for the original request.
                required:
                  - type
                  - status
                additionalProperties: false
              example:
                status: 400
                type: bad_request
        '401':
          description: Unauthorized. The caller has not been authenticated.
          headers:
            upvest-request-id:
              required: true
              schema:
                type: string
                format: uuid
                example: 169ae4c7-ebd7-4041-94da-25369653eba7
          content:
            application/problem+json:
              schema:
                title: Error
                type: object
                description: ''
                properties:
                  type:
                    type: string
                    description: URL to a document describing the error condition.
                  status:
                    type: integer
                    description: >-
                      Transmission of the HTTP status code so that all
                      information can be found in one place, but also to correct
                      changes in the status code due to the use of proxy
                      servers.
                  title:
                    type: string
                    description: >-
                      A short, human-readable title for the general error type;
                      the title should not change for given types.
                  detail:
                    type: string
                    description: A human-readable description of the specific error.
                  instance:
                    type: string
                    description: >-
                      This optional key may be present, with a unique URI for
                      the specific error; this will often point to an error log
                      for that specific response.
                  request_id:
                    type: string
                    description: Correlation ID for the original request.
                required:
                  - type
                  - status
                additionalProperties: false
              example:
                status: 401
                type: unauthorized
        '403':
          description: >-
            Forbidden. The caller has been authenticated but is not allowed to
            take the requested action.
          headers:
            upvest-request-id:
              required: true
              schema:
                type: string
                format: uuid
                example: 169ae4c7-ebd7-4041-94da-25369653eba7
          content:
            application/problem+json:
              schema:
                title: Error
                type: object
                description: ''
                properties:
                  type:
                    type: string
                    description: URL to a document describing the error condition.
                  status:
                    type: integer
                    description: >-
                      Transmission of the HTTP status code so that all
                      information can be found in one place, but also to correct
                      changes in the status code due to the use of proxy
                      servers.
                  title:
                    type: string
                    description: >-
                      A short, human-readable title for the general error type;
                      the title should not change for given types.
                  detail:
                    type: string
                    description: A human-readable description of the specific error.
                  instance:
                    type: string
                    description: >-
                      This optional key may be present, with a unique URI for
                      the specific error; this will often point to an error log
                      for that specific response.
                  request_id:
                    type: string
                    description: Correlation ID for the original request.
                required:
                  - type
                  - status
                additionalProperties: false
              example:
                status: 403
                type: forbidden
        '404':
          description: Not Found. The requested resource could not be found.
          headers:
            upvest-request-id:
              required: true
              schema:
                type: string
                format: uuid
                example: 169ae4c7-ebd7-4041-94da-25369653eba7
          content:
            application/problem+json:
              schema:
                title: Error
                type: object
                description: ''
                properties:
                  type:
                    type: string
                    description: URL to a document describing the error condition.
                  status:
                    type: integer
                    description: >-
                      Transmission of the HTTP status code so that all
                      information can be found in one place, but also to correct
                      changes in the status code due to the use of proxy
                      servers.
                  title:
                    type: string
                    description: >-
                      A short, human-readable title for the general error type;
                      the title should not change for given types.
                  detail:
                    type: string
                    description: A human-readable description of the specific error.
                  instance:
                    type: string
                    description: >-
                      This optional key may be present, with a unique URI for
                      the specific error; this will often point to an error log
                      for that specific response.
                  request_id:
                    type: string
                    description: Correlation ID for the original request.
                required:
                  - type
                  - status
                additionalProperties: false
              example:
                status: 404
                type: not_found
        '406':
          description: >-
            Not Acceptable. The resource does not have a current representation
            that would be acceptable to the user agent. "Accept" header defined
            unsupported value.
          headers:
            upvest-request-id:
              required: true
              schema:
                type: string
                format: uuid
                example: 169ae4c7-ebd7-4041-94da-25369653eba7
          content:
            application/problem+json:
              schema:
                title: Error
                type: object
                description: ''
                properties:
                  type:
                    type: string
                    description: URL to a document describing the error condition.
                  status:
                    type: integer
                    description: >-
                      Transmission of the HTTP status code so that all
                      information can be found in one place, but also to correct
                      changes in the status code due to the use of proxy
                      servers.
                  title:
                    type: string
                    description: >-
                      A short, human-readable title for the general error type;
                      the title should not change for given types.
                  detail:
                    type: string
                    description: A human-readable description of the specific error.
                  instance:
                    type: string
                    description: >-
                      This optional key may be present, with a unique URI for
                      the specific error; this will often point to an error log
                      for that specific response.
                  request_id:
                    type: string
                    description: Correlation ID for the original request.
                required:
                  - type
                  - status
                additionalProperties: false
              example:
                status: 406
                type: not_acceptable
        '429':
          description: >-
            Too Many Requests. The caller has exceeded their quota for the time
            period and has been throttled.
          headers:
            upvest-request-id:
              required: true
              schema:
                type: string
                format: uuid
                example: 169ae4c7-ebd7-4041-94da-25369653eba7
          content:
            application/problem+json:
              schema:
                title: Error
                type: object
                description: ''
                properties:
                  type:
                    type: string
                    description: URL to a document describing the error condition.
                  status:
                    type: integer
                    description: >-
                      Transmission of the HTTP status code so that all
                      information can be found in one place, but also to correct
                      changes in the status code due to the use of proxy
                      servers.
                  title:
                    type: string
                    description: >-
                      A short, human-readable title for the general error type;
                      the title should not change for given types.
                  detail:
                    type: string
                    description: A human-readable description of the specific error.
                  instance:
                    type: string
                    description: >-
                      This optional key may be present, with a unique URI for
                      the specific error; this will often point to an error log
                      for that specific response.
                  request_id:
                    type: string
                    description: Correlation ID for the original request.
                required:
                  - type
                  - status
                additionalProperties: false
              example:
                status: 429
                type: too_many_requests
        '500':
          description: Internal Server Error. The service encountered an unexpected error.
          headers:
            upvest-request-id:
              required: true
              schema:
                type: string
                format: uuid
                example: 169ae4c7-ebd7-4041-94da-25369653eba7
          content:
            application/problem+json:
              schema:
                title: Error
                type: object
                description: ''
                properties:
                  type:
                    type: string
                    description: URL to a document describing the error condition.
                  status:
                    type: integer
                    description: >-
                      Transmission of the HTTP status code so that all
                      information can be found in one place, but also to correct
                      changes in the status code due to the use of proxy
                      servers.
                  title:
                    type: string
                    description: >-
                      A short, human-readable title for the general error type;
                      the title should not change for given types.
                  detail:
                    type: string
                    description: A human-readable description of the specific error.
                  instance:
                    type: string
                    description: >-
                      This optional key may be present, with a unique URI for
                      the specific error; this will often point to an error log
                      for that specific response.
                  request_id:
                    type: string
                    description: Correlation ID for the original request.
                required:
                  - type
                  - status
                additionalProperties: false
              example:
                status: 500
                type: internal_server_error
        '503':
          description: >-
            Service Unavailable. The service handling for this request cannot be
            reached at this time.
          headers:
            upvest-request-id:
              required: true
              schema:
                type: string
                format: uuid
                example: 169ae4c7-ebd7-4041-94da-25369653eba7
          content:
            application/problem+json:
              schema:
                title: Error
                type: object
                description: ''
                properties:
                  type:
                    type: string
                    description: URL to a document describing the error condition.
                  status:
                    type: integer
                    description: >-
                      Transmission of the HTTP status code so that all
                      information can be found in one place, but also to correct
                      changes in the status code due to the use of proxy
                      servers.
                  title:
                    type: string
                    description: >-
                      A short, human-readable title for the general error type;
                      the title should not change for given types.
                  detail:
                    type: string
                    description: A human-readable description of the specific error.
                  instance:
                    type: string
                    description: >-
                      This optional key may be present, with a unique URI for
                      the specific error; this will often point to an error log
                      for that specific response.
                  request_id:
                    type: string
                    description: Correlation ID for the original request.
                required:
                  - type
                  - status
                additionalProperties: false
              example:
                status: 503
                type: method_not_allowed
        '504':
          description: >-
            Gateway Timeout. The service gateway has reached its internal
            timeout.
          headers:
            upvest-request-id:
              required: true
              schema:
                type: string
                format: uuid
                example: 169ae4c7-ebd7-4041-94da-25369653eba7
          content:
            application/problem+json:
              schema:
                title: Error
                type: object
                description: ''
                properties:
                  type:
                    type: string
                    description: URL to a document describing the error condition.
                  status:
                    type: integer
                    description: >-
                      Transmission of the HTTP status code so that all
                      information can be found in one place, but also to correct
                      changes in the status code due to the use of proxy
                      servers.
                  title:
                    type: string
                    description: >-
                      A short, human-readable title for the general error type;
                      the title should not change for given types.
                  detail:
                    type: string
                    description: A human-readable description of the specific error.
                  instance:
                    type: string
                    description: >-
                      This optional key may be present, with a unique URI for
                      the specific error; this will often point to an error log
                      for that specific response.
                  request_id:
                    type: string
                    description: Correlation ID for the original request.
                required:
                  - type
                  - status
                additionalProperties: false
              example:
                status: 504
                type: gateway_timeout
    delete:
      operationId: account_closure
      summary: Close account by ID
      description: Initiates the closure request for an account specified by its ID.
      tags:
        - Accounts
      security:
        - oauth-client-credentials:
            - accounts:admin
      responses:
        '202':
          description: >-
            The request has been successfully accepted and will be processed
            asynchronously.
          headers:
            upvest-request-id:
              required: true
              schema:
                type: string
                format: uuid
                example: 169ae4c7-ebd7-4041-94da-25369653eba7
        '401':
          description: Unauthorized. The caller has not been authenticated.
          headers:
            upvest-request-id:
              required: true
              schema:
                type: string
                format: uuid
                example: 169ae4c7-ebd7-4041-94da-25369653eba7
          content:
            application/problem+json:
              schema:
                title: Error
                type: object
                description: ''
                properties:
                  type:
                    type: string
                    description: URL to a document describing the error condition.
                  status:
                    type: integer
                    description: >-
                      Transmission of the HTTP status code so that all
                      information can be found in one place, but also to correct
                      changes in the status code due to the use of proxy
                      servers.
                  title:
                    type: string
                    description: >-
                      A short, human-readable title for the general error type;
                      the title should not change for given types.
                  detail:
                    type: string
                    description: A human-readable description of the specific error.
                  instance:
                    type: string
                    description: >-
                      This optional key may be present, with a unique URI for
                      the specific error; this will often point to an error log
                      for that specific response.
                  request_id:
                    type: string
                    description: Correlation ID for the original request.
                required:
                  - type
                  - status
                additionalProperties: false
              example:
                status: 401
                type: unauthorized
        '403':
          description: >-
            Forbidden. The caller has been authenticated but is not allowed to
            take the requested action.
          headers:
            upvest-request-id:
              required: true
              schema:
                type: string
                format: uuid
                example: 169ae4c7-ebd7-4041-94da-25369653eba7
          content:
            application/problem+json:
              schema:
                title: Error
                type: object
                description: ''
                properties:
                  type:
                    type: string
                    description: URL to a document describing the error condition.
                  status:
                    type: integer
                    description: >-
                      Transmission of the HTTP status code so that all
                      information can be found in one place, but also to correct
                      changes in the status code due to the use of proxy
                      servers.
                  title:
                    type: string
                    description: >-
                      A short, human-readable title for the general error type;
                      the title should not change for given types.
                  detail:
                    type: string
                    description: A human-readable description of the specific error.
                  instance:
                    type: string
                    description: >-
                      This optional key may be present, with a unique URI for
                      the specific error; this will often point to an error log
                      for that specific response.
                  request_id:
                    type: string
                    description: Correlation ID for the original request.
                required:
                  - type
                  - status
                additionalProperties: false
              example:
                status: 403
                type: forbidden
        '404':
          description: Not Found. The requested resource could not be found.
          headers:
            upvest-request-id:
              required: true
              schema:
                type: string
                format: uuid
                example: 169ae4c7-ebd7-4041-94da-25369653eba7
          content:
            application/problem+json:
              schema:
                title: Error
                type: object
                description: ''
                properties:
                  type:
                    type: string
                    description: URL to a document describing the error condition.
                  status:
                    type: integer
                    description: >-
                      Transmission of the HTTP status code so that all
                      information can be found in one place, but also to correct
                      changes in the status code due to the use of proxy
                      servers.
                  title:
                    type: string
                    description: >-
                      A short, human-readable title for the general error type;
                      the title should not change for given types.
                  detail:
                    type: string
                    description: A human-readable description of the specific error.
                  instance:
                    type: string
                    description: >-
                      This optional key may be present, with a unique URI for
                      the specific error; this will often point to an error log
                      for that specific response.
                  request_id:
                    type: string
                    description: Correlation ID for the original request.
                required:
                  - type
                  - status
                additionalProperties: false
              example:
                status: 404
                type: not_found
        '406':
          description: >-
            Not Acceptable. The resource does not have a current representation
            that would be acceptable to the user agent. "Accept" header defined
            unsupported value.
          headers:
            upvest-request-id:
              required: true
              schema:
                type: string
                format: uuid
                example: 169ae4c7-ebd7-4041-94da-25369653eba7
          content:
            application/problem+json:
              schema:
                title: Error
                type: object
                description: ''
                properties:
                  type:
                    type: string
                    description: URL to a document describing the error condition.
                  status:
                    type: integer
                    description: >-
                      Transmission of the HTTP status code so that all
                      information can be found in one place, but also to correct
                      changes in the status code due to the use of proxy
                      servers.
                  title:
                    type: string
                    description: >-
                      A short, human-readable title for the general error type;
                      the title should not change for given types.
                  detail:
                    type: string
                    description: A human-readable description of the specific error.
                  instance:
                    type: string
                    description: >-
                      This optional key may be present, with a unique URI for
                      the specific error; this will often point to an error log
                      for that specific response.
                  request_id:
                    type: string
                    description: Correlation ID for the original request.
                required:
                  - type
                  - status
                additionalProperties: false
              example:
                status: 406
                type: not_acceptable
        '409':
          description: >-
            Conflict. An operation is not available for the current state of the
            resource.
          headers:
            upvest-request-id:
              required: true
              schema:
                type: string
                format: uuid
                example: 169ae4c7-ebd7-4041-94da-25369653eba7
          content:
            application/problem+json:
              schema:
                title: Error
                type: object
                description: ''
                properties:
                  type:
                    type: string
                    description: URL to a document describing the error condition.
                  status:
                    type: integer
                    description: >-
                      Transmission of the HTTP status code so that all
                      information can be found in one place, but also to correct
                      changes in the status code due to the use of proxy
                      servers.
                  title:
                    type: string
                    description: >-
                      A short, human-readable title for the general error type;
                      the title should not change for given types.
                  detail:
                    type: string
                    description: A human-readable description of the specific error.
                  instance:
                    type: string
                    description: >-
                      This optional key may be present, with a unique URI for
                      the specific error; this will often point to an error log
                      for that specific response.
                  request_id:
                    type: string
                    description: Correlation ID for the original request.
                required:
                  - type
                  - status
                additionalProperties: false
              example:
                status: 409
                type: conflict
        '429':
          description: >-
            Too Many Requests. The caller has exceeded their quota for the time
            period and has been throttled.
          headers:
            upvest-request-id:
              required: true
              schema:
                type: string
                format: uuid
                example: 169ae4c7-ebd7-4041-94da-25369653eba7
          content:
            application/problem+json:
              schema:
                title: Error
                type: object
                description: ''
                properties:
                  type:
                    type: string
                    description: URL to a document describing the error condition.
                  status:
                    type: integer
                    description: >-
                      Transmission of the HTTP status code so that all
                      information can be found in one place, but also to correct
                      changes in the status code due to the use of proxy
                      servers.
                  title:
                    type: string
                    description: >-
                      A short, human-readable title for the general error type;
                      the title should not change for given types.
                  detail:
                    type: string
                    description: A human-readable description of the specific error.
                  instance:
                    type: string
                    description: >-
                      This optional key may be present, with a unique URI for
                      the specific error; this will often point to an error log
                      for that specific response.
                  request_id:
                    type: string
                    description: Correlation ID for the original request.
                required:
                  - type
                  - status
                additionalProperties: false
              example:
                status: 429
                type: too_many_requests
        '500':
          description: Internal Server Error. The service encountered an unexpected error.
          headers:
            upvest-request-id:
              required: true
              schema:
                type: string
                format: uuid
                example: 169ae4c7-ebd7-4041-94da-25369653eba7
          content:
            application/problem+json:
              schema:
                title: Error
                type: object
                description: ''
                properties:
                  type:
                    type: string
                    description: URL to a document describing the error condition.
                  status:
                    type: integer
                    description: >-
                      Transmission of the HTTP status code so that all
                      information can be found in one place, but also to correct
                      changes in the status code due to the use of proxy
                      servers.
                  title:
                    type: string
                    description: >-
                      A short, human-readable title for the general error type;
                      the title should not change for given types.
                  detail:
                    type: string
                    description: A human-readable description of the specific error.
                  instance:
                    type: string
                    description: >-
                      This optional key may be present, with a unique URI for
                      the specific error; this will often point to an error log
                      for that specific response.
                  request_id:
                    type: string
                    description: Correlation ID for the original request.
                required:
                  - type
                  - status
                additionalProperties: false
              example:
                status: 500
                type: internal_server_error
        '503':
          description: >-
            Service Unavailable. The service handling for this request cannot be
            reached at this time.
          headers:
            upvest-request-id:
              required: true
              schema:
                type: string
                format: uuid
                example: 169ae4c7-ebd7-4041-94da-25369653eba7
          content:
            application/problem+json:
              schema:
                title: Error
                type: object
                description: ''
                properties:
                  type:
                    type: string
                    description: URL to a document describing the error condition.
                  status:
                    type: integer
                    description: >-
                      Transmission of the HTTP status code so that all
                      information can be found in one place, but also to correct
                      changes in the status code due to the use of proxy
                      servers.
                  title:
                    type: string
                    description: >-
                      A short, human-readable title for the general error type;
                      the title should not change for given types.
                  detail:
                    type: string
                    description: A human-readable description of the specific error.
                  instance:
                    type: string
                    description: >-
                      This optional key may be present, with a unique URI for
                      the specific error; this will often point to an error log
                      for that specific response.
                  request_id:
                    type: string
                    description: Correlation ID for the original request.
                required:
                  - type
                  - status
                additionalProperties: false
              example:
                status: 503
                type: method_not_allowed
        '504':
          description: >-
            Gateway Timeout. The service gateway has reached its internal
            timeout.
          headers:
            upvest-request-id:
              required: true
              schema:
                type: string
                format: uuid
                example: 169ae4c7-ebd7-4041-94da-25369653eba7
          content:
            application/problem+json:
              schema:
                title: Error
                type: object
                description: ''
                properties:
                  type:
                    type: string
                    description: URL to a document describing the error condition.
                  status:
                    type: integer
                    description: >-
                      Transmission of the HTTP status code so that all
                      information can be found in one place, but also to correct
                      changes in the status code due to the use of proxy
                      servers.
                  title:
                    type: string
                    description: >-
                      A short, human-readable title for the general error type;
                      the title should not change for given types.
                  detail:
                    type: string
                    description: A human-readable description of the specific error.
                  instance:
                    type: string
                    description: >-
                      This optional key may be present, with a unique URI for
                      the specific error; this will often point to an error log
                      for that specific response.
                  request_id:
                    type: string
                    description: Correlation ID for the original request.
                required:
                  - type
                  - status
                additionalProperties: false
              example:
                status: 504
                type: gateway_timeout
  /accounts/{account_id}/positions:
    parameters:
      - name: account_id
        in: path
        required: true
        schema:
          title: Account unique identifier.
          type: string
          description: Account unique identifier.
          format: uuid
      - name: upvest-client-id
        in: header
        description: Tenant Client ID
        required: true
        schema:
          type: string
          format: uuid
          example: ebabcf4d-61c3-4942-875c-e265a7c2d062
      - name: authorization
        in: header
        description: |
          Bearer (access) token from the OAuth flow with correct scopes.
          https://datatracker.ietf.org/doc/html/rfc6750
        required: true
        schema:
          type: string
          pattern: ^Bearer [a-zA-Z0-9\-\._~+/]*=*
          example: Bearer c2VjcmV0Cg==
      - name: signature
        in: header
        required: true
        schema:
          type: string
        description: >-
          https://tools.ietf.org/id/draft-ietf-httpbis-message-signatures-01.html#name-the-signature-http-header
      - name: signature-input
        in: header
        required: true
        schema:
          type: string
        description: >-
          https://tools.ietf.org/id/draft-ietf-httpbis-message-signatures-01.html#name-the-signature-input-http-he
      - name: upvest-api-version
        in: header
        required: false
        schema:
          type: string
          enum:
            - '1'
          default: '1'
          example: '1'
        description: 'Upvest API version (Note: Do not include quotation marks)'
    get:
      operationId: list_positions
      summary: List positions
      description: List of account positions
      tags:
        - Positions
      security:
        - oauth-client-credentials:
            - positions:read
      parameters:
        - name: offset
          in: query
          schema:
            type: integer
            minimum: 0
            format: int32
          allowEmptyValue: true
          description: >-
            Use the `offset` argument to specify where in the list of results to
            start when returning items for a particular query.
        - name: limit
          in: query
          schema:
            type: integer
            format: int32
            default: 100
            minimum: 0
            maximum: 1000
          allowEmptyValue: true
          description: >-
            Use the `limit` argument to specify the maximum number of items
            returned.
      responses:
        '200':
          description: Response
          headers:
            upvest-request-id:
              required: true
              schema:
                type: string
                format: uuid
                example: 169ae4c7-ebd7-4041-94da-25369653eba7
          content:
            application/json:
              schema:
                title: Positions - List - Response
                type: object
                properties:
                  data:
                    type: array
                    items:
                      type: object
                      properties:
                        account_id:
                          title: Account unique identifier.
                          type: string
                          description: Account unique identifier.
                          format: uuid
                        instrument:
                          type: object
                          properties:
                            uuid:
                              type: string
                              description: Instrument unique identifier.
                              format: uuid
                            isin:
                              title: International securities identification number
                              type: string
                              description: >-
                                International securities identification number
                                defined by [ISO
                                6166](https://en.wikipedia.org/wiki/International_Securities_Identification_Number).
                              pattern: ^[A-Z]{2}[A-Z0-9]{9}[0-9]$
                          required:
                            - uuid
                          additionalProperties: false
                        quantity:
                          type: string
                          pattern: ^-?[0-9]{0,63}(\.[0-9]{1,27})?$
                        locked_for_trading:
                          type: string
                          pattern: ^[0-9]{0,63}(\.[0-9]{1,27})?$
                        pending_settlement:
                          type: string
                          pattern: ^[0-9]{0,63}(\.[0-9]{1,27})?$
                        available_for_trading:
                          type: string
                          pattern: ^-?[0-9]{0,63}(\.[0-9]{1,27})?$
                      required:
                        - account_id
                        - instrument
                        - quantity
                        - locked_for_trading
                        - pending_settlement
                        - available_for_trading
                      additionalProperties: false
                  meta:
                    type: object
                    properties:
                      offset:
                        type: integer
                        description: Amount of resource to offset in the response.
                      limit:
                        type: integer
                        description: Total limit of the response.
                      count:
                        type: integer
                        description: Count of the resources returned in the response.
                      total_count:
                        type: integer
                        description: Total count of all the resources.
                      sort:
                        type: string
                        description: The field that the list is sorted by.
                      order:
                        type: string
                        description: |-
                          The ordering of the response.
                          * ASC - Ascending order
                          * DESC - Descending order
                        enum:
                          - ASC
                          - DESC
                    required:
                      - offset
                      - limit
                      - count
                      - total_count
                required:
                  - data
                  - meta
                additionalProperties: false
              example:
                meta:
                  offset: 0
                  limit: 100
                  count: 1
                  total_count: 1
                  sort: id
                  order: ASC
                data:
                  - account_id: c5161455-4d27-4781-bc74-f05532e49a77
                    instrument:
                      isin: US0378331005
                      uuid: ccb86937-8a39-4160-8d33-85bf9e902321
                    quantity: '10.4'
                    locked_for_trading: '5'
                    pending_settlement: '0'
                    available_for_trading: '5.4'
        '400':
          description: Bad Request. The incoming request had a malformed parameter/object.
          headers:
            upvest-request-id:
              required: true
              schema:
                type: string
                format: uuid
                example: 169ae4c7-ebd7-4041-94da-25369653eba7
          content:
            application/problem+json:
              schema:
                title: Error
                type: object
                description: ''
                properties:
                  type:
                    type: string
                    description: URL to a document describing the error condition.
                  status:
                    type: integer
                    description: >-
                      Transmission of the HTTP status code so that all
                      information can be found in one place, but also to correct
                      changes in the status code due to the use of proxy
                      servers.
                  title:
                    type: string
                    description: >-
                      A short, human-readable title for the general error type;
                      the title should not change for given types.
                  detail:
                    type: string
                    description: A human-readable description of the specific error.
                  instance:
                    type: string
                    description: >-
                      This optional key may be present, with a unique URI for
                      the specific error; this will often point to an error log
                      for that specific response.
                  request_id:
                    type: string
                    description: Correlation ID for the original request.
                required:
                  - type
                  - status
                additionalProperties: false
              example:
                status: 400
                type: bad_request
        '401':
          description: Unauthorized. The caller has not been authenticated.
          headers:
            upvest-request-id:
              required: true
              schema:
                type: string
                format: uuid
                example: 169ae4c7-ebd7-4041-94da-25369653eba7
          content:
            application/problem+json:
              schema:
                title: Error
                type: object
                description: ''
                properties:
                  type:
                    type: string
                    description: URL to a document describing the error condition.
                  status:
                    type: integer
                    description: >-
                      Transmission of the HTTP status code so that all
                      information can be found in one place, but also to correct
                      changes in the status code due to the use of proxy
                      servers.
                  title:
                    type: string
                    description: >-
                      A short, human-readable title for the general error type;
                      the title should not change for given types.
                  detail:
                    type: string
                    description: A human-readable description of the specific error.
                  instance:
                    type: string
                    description: >-
                      This optional key may be present, with a unique URI for
                      the specific error; this will often point to an error log
                      for that specific response.
                  request_id:
                    type: string
                    description: Correlation ID for the original request.
                required:
                  - type
                  - status
                additionalProperties: false
              example:
                status: 401
                type: unauthorized
        '403':
          description: >-
            Forbidden. The caller has been authenticated but is not allowed to
            take the requested action.
          headers:
            upvest-request-id:
              required: true
              schema:
                type: string
                format: uuid
                example: 169ae4c7-ebd7-4041-94da-25369653eba7
          content:
            application/problem+json:
              schema:
                title: Error
                type: object
                description: ''
                properties:
                  type:
                    type: string
                    description: URL to a document describing the error condition.
                  status:
                    type: integer
                    description: >-
                      Transmission of the HTTP status code so that all
                      information can be found in one place, but also to correct
                      changes in the status code due to the use of proxy
                      servers.
                  title:
                    type: string
                    description: >-
                      A short, human-readable title for the general error type;
                      the title should not change for given types.
                  detail:
                    type: string
                    description: A human-readable description of the specific error.
                  instance:
                    type: string
                    description: >-
                      This optional key may be present, with a unique URI for
                      the specific error; this will often point to an error log
                      for that specific response.
                  request_id:
                    type: string
                    description: Correlation ID for the original request.
                required:
                  - type
                  - status
                additionalProperties: false
              example:
                status: 403
                type: forbidden
        '404':
          description: Not Found. The requested resource could not be found.
          headers:
            upvest-request-id:
              required: true
              schema:
                type: string
                format: uuid
                example: 169ae4c7-ebd7-4041-94da-25369653eba7
          content:
            application/problem+json:
              schema:
                title: Error
                type: object
                description: ''
                properties:
                  type:
                    type: string
                    description: URL to a document describing the error condition.
                  status:
                    type: integer
                    description: >-
                      Transmission of the HTTP status code so that all
                      information can be found in one place, but also to correct
                      changes in the status code due to the use of proxy
                      servers.
                  title:
                    type: string
                    description: >-
                      A short, human-readable title for the general error type;
                      the title should not change for given types.
                  detail:
                    type: string
                    description: A human-readable description of the specific error.
                  instance:
                    type: string
                    description: >-
                      This optional key may be present, with a unique URI for
                      the specific error; this will often point to an error log
                      for that specific response.
                  request_id:
                    type: string
                    description: Correlation ID for the original request.
                required:
                  - type
                  - status
                additionalProperties: false
              example:
                status: 404
                type: not_found
        '406':
          description: >-
            Not Acceptable. The resource does not have a current representation
            that would be acceptable to the user agent. "Accept" header defined
            unsupported value.
          headers:
            upvest-request-id:
              required: true
              schema:
                type: string
                format: uuid
                example: 169ae4c7-ebd7-4041-94da-25369653eba7
          content:
            application/problem+json:
              schema:
                title: Error
                type: object
                description: ''
                properties:
                  type:
                    type: string
                    description: URL to a document describing the error condition.
                  status:
                    type: integer
                    description: >-
                      Transmission of the HTTP status code so that all
                      information can be found in one place, but also to correct
                      changes in the status code due to the use of proxy
                      servers.
                  title:
                    type: string
                    description: >-
                      A short, human-readable title for the general error type;
                      the title should not change for given types.
                  detail:
                    type: string
                    description: A human-readable description of the specific error.
                  instance:
                    type: string
                    description: >-
                      This optional key may be present, with a unique URI for
                      the specific error; this will often point to an error log
                      for that specific response.
                  request_id:
                    type: string
                    description: Correlation ID for the original request.
                required:
                  - type
                  - status
                additionalProperties: false
              example:
                status: 406
                type: not_acceptable
        '429':
          description: >-
            Too Many Requests. The caller has exceeded their quota for the time
            period and has been throttled.
          headers:
            upvest-request-id:
              required: true
              schema:
                type: string
                format: uuid
                example: 169ae4c7-ebd7-4041-94da-25369653eba7
          content:
            application/problem+json:
              schema:
                title: Error
                type: object
                description: ''
                properties:
                  type:
                    type: string
                    description: URL to a document describing the error condition.
                  status:
                    type: integer
                    description: >-
                      Transmission of the HTTP status code so that all
                      information can be found in one place, but also to correct
                      changes in the status code due to the use of proxy
                      servers.
                  title:
                    type: string
                    description: >-
                      A short, human-readable title for the general error type;
                      the title should not change for given types.
                  detail:
                    type: string
                    description: A human-readable description of the specific error.
                  instance:
                    type: string
                    description: >-
                      This optional key may be present, with a unique URI for
                      the specific error; this will often point to an error log
                      for that specific response.
                  request_id:
                    type: string
                    description: Correlation ID for the original request.
                required:
                  - type
                  - status
                additionalProperties: false
              example:
                status: 429
                type: too_many_requests
        '500':
          description: Internal Server Error. The service encountered an unexpected error.
          headers:
            upvest-request-id:
              required: true
              schema:
                type: string
                format: uuid
                example: 169ae4c7-ebd7-4041-94da-25369653eba7
          content:
            application/problem+json:
              schema:
                title: Error
                type: object
                description: ''
                properties:
                  type:
                    type: string
                    description: URL to a document describing the error condition.
                  status:
                    type: integer
                    description: >-
                      Transmission of the HTTP status code so that all
                      information can be found in one place, but also to correct
                      changes in the status code due to the use of proxy
                      servers.
                  title:
                    type: string
                    description: >-
                      A short, human-readable title for the general error type;
                      the title should not change for given types.
                  detail:
                    type: string
                    description: A human-readable description of the specific error.
                  instance:
                    type: string
                    description: >-
                      This optional key may be present, with a unique URI for
                      the specific error; this will often point to an error log
                      for that specific response.
                  request_id:
                    type: string
                    description: Correlation ID for the original request.
                required:
                  - type
                  - status
                additionalProperties: false
              example:
                status: 500
                type: internal_server_error
        '503':
          description: >-
            Service Unavailable. The service handling for this request cannot be
            reached at this time.
          headers:
            upvest-request-id:
              required: true
              schema:
                type: string
                format: uuid
                example: 169ae4c7-ebd7-4041-94da-25369653eba7
          content:
            application/problem+json:
              schema:
                title: Error
                type: object
                description: ''
                properties:
                  type:
                    type: string
                    description: URL to a document describing the error condition.
                  status:
                    type: integer
                    description: >-
                      Transmission of the HTTP status code so that all
                      information can be found in one place, but also to correct
                      changes in the status code due to the use of proxy
                      servers.
                  title:
                    type: string
                    description: >-
                      A short, human-readable title for the general error type;
                      the title should not change for given types.
                  detail:
                    type: string
                    description: A human-readable description of the specific error.
                  instance:
                    type: string
                    description: >-
                      This optional key may be present, with a unique URI for
                      the specific error; this will often point to an error log
                      for that specific response.
                  request_id:
                    type: string
                    description: Correlation ID for the original request.
                required:
                  - type
                  - status
                additionalProperties: false
              example:
                status: 503
                type: method_not_allowed
        '504':
          description: >-
            Gateway Timeout. The service gateway has reached its internal
            timeout.
          headers:
            upvest-request-id:
              required: true
              schema:
                type: string
                format: uuid
                example: 169ae4c7-ebd7-4041-94da-25369653eba7
          content:
            application/problem+json:
              schema:
                title: Error
                type: object
                description: ''
                properties:
                  type:
                    type: string
                    description: URL to a document describing the error condition.
                  status:
                    type: integer
                    description: >-
                      Transmission of the HTTP status code so that all
                      information can be found in one place, but also to correct
                      changes in the status code due to the use of proxy
                      servers.
                  title:
                    type: string
                    description: >-
                      A short, human-readable title for the general error type;
                      the title should not change for given types.
                  detail:
                    type: string
                    description: A human-readable description of the specific error.
                  instance:
                    type: string
                    description: >-
                      This optional key may be present, with a unique URI for
                      the specific error; this will often point to an error log
                      for that specific response.
                  request_id:
                    type: string
                    description: Correlation ID for the original request.
                required:
                  - type
                  - status
                additionalProperties: false
              example:
                status: 504
                type: gateway_timeout
  /accounts/{account_id}/positions/{instrument_id}:
    parameters:
      - name: instrument_id
        in: path
        required: true
        schema:
          title: Instrument unique identifier
          description: Instrument unique identifier.
          oneOf:
            - title: >-
                International securities identification number with 'isin:' URN
                namespace
              type: string
              description: >-
                International securities identification number defined by [ISO
                6166](https://en.wikipedia.org/wiki/International_Securities_Identification_Number),
                prefixed with a 'isin:' [URN
                scheme](https://datatracker.ietf.org/doc/html/rfc8141).
              pattern: ^(urn:)?isin:[A-Z]{2}[A-Z0-9]{9}[0-9]$
            - title: Universally Unique IDentifier (UUID) with 'uuid:' URN scheme
              type: string
              description: >-
                Universally Unique IDentifier (UUID) with 'uuid:' URN namespace,
                defined by [RFC
                4122](https://datatracker.ietf.org/doc/html/rfc4122).
              pattern: >-
                ^(urn:)?uuid:[0-9a-fA-F]{8}-?[0-9a-fA-F]{4}-?[0-5][0-9a-fA-F]{3}-?[089abAB][0-9a-fA-F]{3}-?[0-9a-fA-F]{12}$
      - name: account_id
        in: path
        required: true
        schema:
          title: Account unique identifier.
          type: string
          description: Account unique identifier.
          format: uuid
      - name: upvest-client-id
        in: header
        description: Tenant Client ID
        required: true
        schema:
          type: string
          format: uuid
          example: ebabcf4d-61c3-4942-875c-e265a7c2d062
      - name: authorization
        in: header
        description: |
          Bearer (access) token from the OAuth flow with correct scopes.
          https://datatracker.ietf.org/doc/html/rfc6750
        required: true
        schema:
          type: string
          pattern: ^Bearer [a-zA-Z0-9\-\._~+/]*=*
          example: Bearer c2VjcmV0Cg==
      - name: signature
        in: header
        required: true
        schema:
          type: string
        description: >-
          https://tools.ietf.org/id/draft-ietf-httpbis-message-signatures-01.html#name-the-signature-http-header
      - name: signature-input
        in: header
        required: true
        schema:
          type: string
        description: >-
          https://tools.ietf.org/id/draft-ietf-httpbis-message-signatures-01.html#name-the-signature-input-http-he
      - name: upvest-api-version
        in: header
        required: false
        schema:
          type: string
          enum:
            - '1'
          default: '1'
          example: '1'
        description: 'Upvest API version (Note: Do not include quotation marks)'
    get:
      operationId: retrieve_position
      summary: Retrieve position
      description: Retrieve an account position
      tags:
        - Positions
      security:
        - oauth-client-credentials:
            - positions:read
      responses:
        '200':
          description: Response
          headers:
            upvest-request-id:
              required: true
              schema:
                type: string
                format: uuid
                example: 169ae4c7-ebd7-4041-94da-25369653eba7
          content:
            application/json:
              schema:
                type: object
                properties:
                  account_id:
                    title: Account unique identifier.
                    type: string
                    description: Account unique identifier.
                    format: uuid
                  instrument:
                    type: object
                    properties:
                      uuid:
                        type: string
                        description: Instrument unique identifier.
                        format: uuid
                      isin:
                        title: International securities identification number
                        type: string
                        description: >-
                          International securities identification number defined
                          by [ISO
                          6166](https://en.wikipedia.org/wiki/International_Securities_Identification_Number).
                        pattern: ^[A-Z]{2}[A-Z0-9]{9}[0-9]$
                    required:
                      - uuid
                    additionalProperties: false
                  quantity:
                    type: string
                    pattern: ^-?[0-9]{0,63}(\.[0-9]{1,27})?$
                  locked_for_trading:
                    type: string
                    pattern: ^[0-9]{0,63}(\.[0-9]{1,27})?$
                  pending_settlement:
                    type: string
                    pattern: ^[0-9]{0,63}(\.[0-9]{1,27})?$
                  available_for_trading:
                    type: string
                    pattern: ^-?[0-9]{0,63}(\.[0-9]{1,27})?$
                required:
                  - account_id
                  - instrument
                  - quantity
                  - locked_for_trading
                  - pending_settlement
                  - available_for_trading
                additionalProperties: false
              examples:
                position:
                  summary: Position Example
                  value:
                    account_id: c5161455-4d27-4781-bc74-f05532e49a77
                    instrument:
                      isin: US0378331005
                      uuid: ccb86937-8a39-4160-8d33-85bf9e902321
                    quantity: '10.4'
                    locked_for_trading: '5'
                    pending_settlement: '0'
                    available_for_trading: '5.4'
                unit_sell_order_new_and_filled_position_update:
                  summary: Position Example
                  value:
                    account_id: debf2026-f2da-4ff0-bb84-92e45babb1e3
                    instrument:
                      isin: US0378331005
                      uuid: ccb86937-8a39-4160-8d33-85bf9e902321
                    quantity: '10'
                    locked_for_trading: '10'
                    pending_settlement: '0'
                    available_for_trading: '0'
                unit_sell_order_filled_position_update:
                  summary: Position Example
                  value:
                    account_id: debf2026-f2da-4ff0-bb84-92e45babb1e3
                    instrument:
                      isin: US0378331005
                      uuid: ccb86937-8a39-4160-8d33-85bf9e902321
                    quantity: '0'
                    locked_for_trading: '0'
                    pending_settlement: '0'
                    available_for_trading: '0'
                nominal_buy_order_filled_positions_update:
                  summary: Position Example
                  value:
                    account_id: debf2026-f2da-4ff0-bb84-92e45babb1e3
                    instrument:
                      isin: US0378331005
                      uuid: ccb86937-8a39-4160-8d33-85bf9e902321
                    quantity: '11.734334663'
                    locked_for_trading: '0'
                    pending_settlement: '0'
                    available_for_trading: '11.734334663'
        '401':
          description: Unauthorized. The caller has not been authenticated.
          headers:
            upvest-request-id:
              required: true
              schema:
                type: string
                format: uuid
                example: 169ae4c7-ebd7-4041-94da-25369653eba7
          content:
            application/problem+json:
              schema:
                title: Error
                type: object
                description: ''
                properties:
                  type:
                    type: string
                    description: URL to a document describing the error condition.
                  status:
                    type: integer
                    description: >-
                      Transmission of the HTTP status code so that all
                      information can be found in one place, but also to correct
                      changes in the status code due to the use of proxy
                      servers.
                  title:
                    type: string
                    description: >-
                      A short, human-readable title for the general error type;
                      the title should not change for given types.
                  detail:
                    type: string
                    description: A human-readable description of the specific error.
                  instance:
                    type: string
                    description: >-
                      This optional key may be present, with a unique URI for
                      the specific error; this will often point to an error log
                      for that specific response.
                  request_id:
                    type: string
                    description: Correlation ID for the original request.
                required:
                  - type
                  - status
                additionalProperties: false
              example:
                status: 401
                type: unauthorized
        '403':
          description: >-
            Forbidden. The caller has been authenticated but is not allowed to
            take the requested action.
          headers:
            upvest-request-id:
              required: true
              schema:
                type: string
                format: uuid
                example: 169ae4c7-ebd7-4041-94da-25369653eba7
          content:
            application/problem+json:
              schema:
                title: Error
                type: object
                description: ''
                properties:
                  type:
                    type: string
                    description: URL to a document describing the error condition.
                  status:
                    type: integer
                    description: >-
                      Transmission of the HTTP status code so that all
                      information can be found in one place, but also to correct
                      changes in the status code due to the use of proxy
                      servers.
                  title:
                    type: string
                    description: >-
                      A short, human-readable title for the general error type;
                      the title should not change for given types.
                  detail:
                    type: string
                    description: A human-readable description of the specific error.
                  instance:
                    type: string
                    description: >-
                      This optional key may be present, with a unique URI for
                      the specific error; this will often point to an error log
                      for that specific response.
                  request_id:
                    type: string
                    description: Correlation ID for the original request.
                required:
                  - type
                  - status
                additionalProperties: false
              example:
                status: 403
                type: forbidden
        '404':
          description: Not Found. The requested resource could not be found.
          headers:
            upvest-request-id:
              required: true
              schema:
                type: string
                format: uuid
                example: 169ae4c7-ebd7-4041-94da-25369653eba7
          content:
            application/problem+json:
              schema:
                title: Error
                type: object
                description: ''
                properties:
                  type:
                    type: string
                    description: URL to a document describing the error condition.
                  status:
                    type: integer
                    description: >-
                      Transmission of the HTTP status code so that all
                      information can be found in one place, but also to correct
                      changes in the status code due to the use of proxy
                      servers.
                  title:
                    type: string
                    description: >-
                      A short, human-readable title for the general error type;
                      the title should not change for given types.
                  detail:
                    type: string
                    description: A human-readable description of the specific error.
                  instance:
                    type: string
                    description: >-
                      This optional key may be present, with a unique URI for
                      the specific error; this will often point to an error log
                      for that specific response.
                  request_id:
                    type: string
                    description: Correlation ID for the original request.
                required:
                  - type
                  - status
                additionalProperties: false
              example:
                status: 404
                type: not_found
        '406':
          description: >-
            Not Acceptable. The resource does not have a current representation
            that would be acceptable to the user agent. "Accept" header defined
            unsupported value.
          headers:
            upvest-request-id:
              required: true
              schema:
                type: string
                format: uuid
                example: 169ae4c7-ebd7-4041-94da-25369653eba7
          content:
            application/problem+json:
              schema:
                title: Error
                type: object
                description: ''
                properties:
                  type:
                    type: string
                    description: URL to a document describing the error condition.
                  status:
                    type: integer
                    description: >-
                      Transmission of the HTTP status code so that all
                      information can be found in one place, but also to correct
                      changes in the status code due to the use of proxy
                      servers.
                  title:
                    type: string
                    description: >-
                      A short, human-readable title for the general error type;
                      the title should not change for given types.
                  detail:
                    type: string
                    description: A human-readable description of the specific error.
                  instance:
                    type: string
                    description: >-
                      This optional key may be present, with a unique URI for
                      the specific error; this will often point to an error log
                      for that specific response.
                  request_id:
                    type: string
                    description: Correlation ID for the original request.
                required:
                  - type
                  - status
                additionalProperties: false
              example:
                status: 406
                type: not_acceptable
        '429':
          description: >-
            Too Many Requests. The caller has exceeded their quota for the time
            period and has been throttled.
          headers:
            upvest-request-id:
              required: true
              schema:
                type: string
                format: uuid
                example: 169ae4c7-ebd7-4041-94da-25369653eba7
          content:
            application/problem+json:
              schema:
                title: Error
                type: object
                description: ''
                properties:
                  type:
                    type: string
                    description: URL to a document describing the error condition.
                  status:
                    type: integer
                    description: >-
                      Transmission of the HTTP status code so that all
                      information can be found in one place, but also to correct
                      changes in the status code due to the use of proxy
                      servers.
                  title:
                    type: string
                    description: >-
                      A short, human-readable title for the general error type;
                      the title should not change for given types.
                  detail:
                    type: string
                    description: A human-readable description of the specific error.
                  instance:
                    type: string
                    description: >-
                      This optional key may be present, with a unique URI for
                      the specific error; this will often point to an error log
                      for that specific response.
                  request_id:
                    type: string
                    description: Correlation ID for the original request.
                required:
                  - type
                  - status
                additionalProperties: false
              example:
                status: 429
                type: too_many_requests
        '500':
          description: Internal Server Error. The service encountered an unexpected error.
          headers:
            upvest-request-id:
              required: true
              schema:
                type: string
                format: uuid
                example: 169ae4c7-ebd7-4041-94da-25369653eba7
          content:
            application/problem+json:
              schema:
                title: Error
                type: object
                description: ''
                properties:
                  type:
                    type: string
                    description: URL to a document describing the error condition.
                  status:
                    type: integer
                    description: >-
                      Transmission of the HTTP status code so that all
                      information can be found in one place, but also to correct
                      changes in the status code due to the use of proxy
                      servers.
                  title:
                    type: string
                    description: >-
                      A short, human-readable title for the general error type;
                      the title should not change for given types.
                  detail:
                    type: string
                    description: A human-readable description of the specific error.
                  instance:
                    type: string
                    description: >-
                      This optional key may be present, with a unique URI for
                      the specific error; this will often point to an error log
                      for that specific response.
                  request_id:
                    type: string
                    description: Correlation ID for the original request.
                required:
                  - type
                  - status
                additionalProperties: false
              example:
                status: 500
                type: internal_server_error
        '503':
          description: >-
            Service Unavailable. The service handling for this request cannot be
            reached at this time.
          headers:
            upvest-request-id:
              required: true
              schema:
                type: string
                format: uuid
                example: 169ae4c7-ebd7-4041-94da-25369653eba7
          content:
            application/problem+json:
              schema:
                title: Error
                type: object
                description: ''
                properties:
                  type:
                    type: string
                    description: URL to a document describing the error condition.
                  status:
                    type: integer
                    description: >-
                      Transmission of the HTTP status code so that all
                      information can be found in one place, but also to correct
                      changes in the status code due to the use of proxy
                      servers.
                  title:
                    type: string
                    description: >-
                      A short, human-readable title for the general error type;
                      the title should not change for given types.
                  detail:
                    type: string
                    description: A human-readable description of the specific error.
                  instance:
                    type: string
                    description: >-
                      This optional key may be present, with a unique URI for
                      the specific error; this will often point to an error log
                      for that specific response.
                  request_id:
                    type: string
                    description: Correlation ID for the original request.
                required:
                  - type
                  - status
                additionalProperties: false
              example:
                status: 503
                type: method_not_allowed
        '504':
          description: >-
            Gateway Timeout. The service gateway has reached its internal
            timeout.
          headers:
            upvest-request-id:
              required: true
              schema:
                type: string
                format: uuid
                example: 169ae4c7-ebd7-4041-94da-25369653eba7
          content:
            application/problem+json:
              schema:
                title: Error
                type: object
                description: ''
                properties:
                  type:
                    type: string
                    description: URL to a document describing the error condition.
                  status:
                    type: integer
                    description: >-
                      Transmission of the HTTP status code so that all
                      information can be found in one place, but also to correct
                      changes in the status code due to the use of proxy
                      servers.
                  title:
                    type: string
                    description: >-
                      A short, human-readable title for the general error type;
                      the title should not change for given types.
                  detail:
                    type: string
                    description: A human-readable description of the specific error.
                  instance:
                    type: string
                    description: >-
                      This optional key may be present, with a unique URI for
                      the specific error; this will often point to an error log
                      for that specific response.
                  request_id:
                    type: string
                    description: Correlation ID for the original request.
                required:
                  - type
                  - status
                additionalProperties: false
              example:
                status: 504
                type: gateway_timeout
  /users/{user_id}/payments/reference_accounts:
    parameters:
      - name: user_id
        in: path
        required: true
        schema:
          title: User unique identifier.
          type: string
          description: User unique identifier.
          format: uuid
      - name: upvest-client-id
        in: header
        description: Tenant Client ID
        required: true
        schema:
          type: string
          format: uuid
          example: ebabcf4d-61c3-4942-875c-e265a7c2d062
      - name: authorization
        in: header
        description: |
          Bearer (access) token from the OAuth flow with correct scopes.
          https://datatracker.ietf.org/doc/html/rfc6750
        required: true
        schema:
          type: string
          pattern: ^Bearer [a-zA-Z0-9\-\._~+/]*=*
          example: Bearer c2VjcmV0Cg==
      - name: signature
        in: header
        required: true
        schema:
          type: string
        description: >-
          https://tools.ietf.org/id/draft-ietf-httpbis-message-signatures-01.html#name-the-signature-http-header
      - name: signature-input
        in: header
        required: true
        schema:
          type: string
        description: >-
          https://tools.ietf.org/id/draft-ietf-httpbis-message-signatures-01.html#name-the-signature-input-http-he
      - name: upvest-api-version
        in: header
        required: false
        schema:
          type: string
          enum:
            - '1'
          default: '1'
          example: '1'
        description: 'Upvest API version (Note: Do not include quotation marks)'
    get:
      operationId: list_reference_accounts
      summary: Get reference accounts of a user
      description: Returns the list of reference accounts of a user specified by ID.
      tags:
        - Reference Accounts
      security:
        - oauth-client-credentials:
            - reference_accounts:admin
            - reference_accounts:read
      parameters:
        - name: sort
          in: query
          required: false
          schema:
            type: string
            enum:
              - id
              - created_at
            default: created_at
          description: Field of resource to sort by
          example: id
        - name: order
          in: query
          required: false
          schema:
            type: string
            enum:
              - ASC
              - DESC
            default: ASC
          description: >-
            Sort order of the result list if the `sort` parameter is specified.
            Use `ASC` for ascending or `DESC` for descending sort order.
        - name: offset
          in: query
          schema:
            type: integer
            minimum: 0
            format: int32
          allowEmptyValue: true
          description: >-
            Use the `offset` argument to specify where in the list of results to
            start when returning items for a particular query.
        - name: limit
          in: query
          schema:
            type: integer
            format: int32
            default: 100
            minimum: 0
            maximum: 1000
          allowEmptyValue: true
          description: >-
            Use the `limit` argument to specify the maximum number of items
            returned.
      responses:
        '200':
          description: OK
          headers:
            upvest-request-id:
              required: true
              schema:
                type: string
                format: uuid
                example: 169ae4c7-ebd7-4041-94da-25369653eba7
          content:
            application/json:
              schema:
                title: Users - List - Response
                type: object
                properties:
                  meta:
                    type: object
                    properties:
                      offset:
                        type: integer
                        description: Amount of resource to offset in the response.
                      limit:
                        type: integer
                        description: Total limit of the response.
                      count:
                        type: integer
                        description: Count of the resources returned in the response.
                      total_count:
                        type: integer
                        description: Total count of all the resources.
                      sort:
                        type: string
                        description: The field that the list is sorted by.
                      order:
                        type: string
                        description: |-
                          The ordering of the response.
                          * ASC - Ascending order
                          * DESC - Descending order
                        enum:
                          - ASC
                          - DESC
                    required:
                      - offset
                      - limit
                      - count
                      - total_count
                  data:
                    type: array
                    items:
                      title: Reference Account
                      type: object
                      properties:
                        id:
                          title: Reference account unique identifier.
                          type: string
                          description: Reference account unique identifier.
                          format: uuid
                        created_at:
                          type: string
                          format: date-time
                          description: >-
                            Date and time when the resource was created. [RFC
                            3339-5](https://datatracker.ietf.org/doc/html/rfc3339#section-5.6),
                            [ISO8601
                            UTC](https://www.iso.org/iso-8601-date-and-time-format.html)
                        updated_at:
                          type: string
                          format: date-time
                          description: >-
                            Date and time when the resource was last updated.
                            [RFC
                            3339-5](https://datatracker.ietf.org/doc/html/rfc3339#section-5.6),
                            [ISO8601
                            UTC](https://www.iso.org/iso-8601-date-and-time-format.html)
                        user_id:
                          title: User unique identifier.
                          type: string
                          description: User unique identifier.
                          format: uuid
                        account_owner:
                          type: string
                          maxLength: 140
                          description: First and last name of the reference account owner
                        name:
                          type: string
                          maxLength: 100
                          description: Human-readable name of the reference bank account
                        iban:
                          title: International Bank Account Number (IBAN)
                          type: string
                          description: >-
                            Obfuscated International Bank Account Number
                            [IBAN](https://en.wikipedia.org/wiki/International_Bank_Account_Number).
                          pattern: ^[A-Z]{2}[0-9]{2}[A-Z0-9]{2}\*{10}[A-Z0-9]{4}$
                        bic:
                          title: Business Identifier Code
                          type: string
                          description: >-
                            Business Identifier Code (also known as SWIFT-BIC,
                            BIC, SWIFT ID or SWIFT code) [ISO
                            9362](https://en.wikipedia.org/wiki/ISO_9362).
                          pattern: ^[A-Z]{6}[A-Z0-9]{2}([A-Z0-9]{3})?$
                        confirmed_at:
                          type: string
                          format: date-time
                          description: >-
                            Timestamp of when user validated the reference
                            account
                      required:
                        - id
                        - created_at
                        - updated_at
                        - user_id
                        - account_owner
                        - name
                        - iban
                        - bic
                        - confirmed_at
                      additionalProperties: false
                required:
                  - meta
                  - data
                additionalProperties: false
              examples:
                SEPA:
                  summary: SEPA Reference Account
                  value:
                    meta:
                      offset: 0
                      limit: 100
                      count: 1
                      total_count: 1
                    data:
                      - id: c18f80bd-401e-4836-9776-7dc24c32d35e
                        created_at: '2020-08-24T14:15:22Z'
                        updated_at: '2020-08-24T14:15:22Z'
                        user_id: 83d83ec2-d2ca-49ff-bbea-b92b5c3be202
                        account_owner: Max Mustermann
                        name: Max's Reference Account
                        iban: DE0210**********0402
                        bic: BELADEBE
                        confirmed_at: '2020-08-23T14:15:22Z'
        '400':
          description: Bad Request. The incoming request had a malformed parameter/object.
          headers:
            upvest-request-id:
              required: true
              schema:
                type: string
                format: uuid
                example: 169ae4c7-ebd7-4041-94da-25369653eba7
          content:
            application/problem+json:
              schema:
                title: Error
                type: object
                description: ''
                properties:
                  type:
                    type: string
                    description: URL to a document describing the error condition.
                  status:
                    type: integer
                    description: >-
                      Transmission of the HTTP status code so that all
                      information can be found in one place, but also to correct
                      changes in the status code due to the use of proxy
                      servers.
                  title:
                    type: string
                    description: >-
                      A short, human-readable title for the general error type;
                      the title should not change for given types.
                  detail:
                    type: string
                    description: A human-readable description of the specific error.
                  instance:
                    type: string
                    description: >-
                      This optional key may be present, with a unique URI for
                      the specific error; this will often point to an error log
                      for that specific response.
                  request_id:
                    type: string
                    description: Correlation ID for the original request.
                required:
                  - type
                  - status
                additionalProperties: false
              example:
                status: 400
                type: bad_request
        '401':
          description: Unauthorized. The caller has not been authenticated.
          headers:
            upvest-request-id:
              required: true
              schema:
                type: string
                format: uuid
                example: 169ae4c7-ebd7-4041-94da-25369653eba7
          content:
            application/problem+json:
              schema:
                title: Error
                type: object
                description: ''
                properties:
                  type:
                    type: string
                    description: URL to a document describing the error condition.
                  status:
                    type: integer
                    description: >-
                      Transmission of the HTTP status code so that all
                      information can be found in one place, but also to correct
                      changes in the status code due to the use of proxy
                      servers.
                  title:
                    type: string
                    description: >-
                      A short, human-readable title for the general error type;
                      the title should not change for given types.
                  detail:
                    type: string
                    description: A human-readable description of the specific error.
                  instance:
                    type: string
                    description: >-
                      This optional key may be present, with a unique URI for
                      the specific error; this will often point to an error log
                      for that specific response.
                  request_id:
                    type: string
                    description: Correlation ID for the original request.
                required:
                  - type
                  - status
                additionalProperties: false
              example:
                status: 401
                type: unauthorized
        '403':
          description: >-
            Forbidden. The caller has been authenticated but is not allowed to
            take the requested action.
          headers:
            upvest-request-id:
              required: true
              schema:
                type: string
                format: uuid
                example: 169ae4c7-ebd7-4041-94da-25369653eba7
          content:
            application/problem+json:
              schema:
                title: Error
                type: object
                description: ''
                properties:
                  type:
                    type: string
                    description: URL to a document describing the error condition.
                  status:
                    type: integer
                    description: >-
                      Transmission of the HTTP status code so that all
                      information can be found in one place, but also to correct
                      changes in the status code due to the use of proxy
                      servers.
                  title:
                    type: string
                    description: >-
                      A short, human-readable title for the general error type;
                      the title should not change for given types.
                  detail:
                    type: string
                    description: A human-readable description of the specific error.
                  instance:
                    type: string
                    description: >-
                      This optional key may be present, with a unique URI for
                      the specific error; this will often point to an error log
                      for that specific response.
                  request_id:
                    type: string
                    description: Correlation ID for the original request.
                required:
                  - type
                  - status
                additionalProperties: false
              example:
                status: 403
                type: forbidden
        '404':
          description: Not Found. The requested resource could not be found.
          headers:
            upvest-request-id:
              required: true
              schema:
                type: string
                format: uuid
                example: 169ae4c7-ebd7-4041-94da-25369653eba7
          content:
            application/problem+json:
              schema:
                title: Error
                type: object
                description: ''
                properties:
                  type:
                    type: string
                    description: URL to a document describing the error condition.
                  status:
                    type: integer
                    description: >-
                      Transmission of the HTTP status code so that all
                      information can be found in one place, but also to correct
                      changes in the status code due to the use of proxy
                      servers.
                  title:
                    type: string
                    description: >-
                      A short, human-readable title for the general error type;
                      the title should not change for given types.
                  detail:
                    type: string
                    description: A human-readable description of the specific error.
                  instance:
                    type: string
                    description: >-
                      This optional key may be present, with a unique URI for
                      the specific error; this will often point to an error log
                      for that specific response.
                  request_id:
                    type: string
                    description: Correlation ID for the original request.
                required:
                  - type
                  - status
                additionalProperties: false
              example:
                status: 404
                type: not_found
        '406':
          description: >-
            Not Acceptable. The resource does not have a current representation
            that would be acceptable to the user agent. "Accept" header defined
            unsupported value.
          headers:
            upvest-request-id:
              required: true
              schema:
                type: string
                format: uuid
                example: 169ae4c7-ebd7-4041-94da-25369653eba7
          content:
            application/problem+json:
              schema:
                title: Error
                type: object
                description: ''
                properties:
                  type:
                    type: string
                    description: URL to a document describing the error condition.
                  status:
                    type: integer
                    description: >-
                      Transmission of the HTTP status code so that all
                      information can be found in one place, but also to correct
                      changes in the status code due to the use of proxy
                      servers.
                  title:
                    type: string
                    description: >-
                      A short, human-readable title for the general error type;
                      the title should not change for given types.
                  detail:
                    type: string
                    description: A human-readable description of the specific error.
                  instance:
                    type: string
                    description: >-
                      This optional key may be present, with a unique URI for
                      the specific error; this will often point to an error log
                      for that specific response.
                  request_id:
                    type: string
                    description: Correlation ID for the original request.
                required:
                  - type
                  - status
                additionalProperties: false
              example:
                status: 406
                type: not_acceptable
        '429':
          description: >-
            Too Many Requests. The caller has exceeded their quota for the time
            period and has been throttled.
          headers:
            upvest-request-id:
              required: true
              schema:
                type: string
                format: uuid
                example: 169ae4c7-ebd7-4041-94da-25369653eba7
          content:
            application/problem+json:
              schema:
                title: Error
                type: object
                description: ''
                properties:
                  type:
                    type: string
                    description: URL to a document describing the error condition.
                  status:
                    type: integer
                    description: >-
                      Transmission of the HTTP status code so that all
                      information can be found in one place, but also to correct
                      changes in the status code due to the use of proxy
                      servers.
                  title:
                    type: string
                    description: >-
                      A short, human-readable title for the general error type;
                      the title should not change for given types.
                  detail:
                    type: string
                    description: A human-readable description of the specific error.
                  instance:
                    type: string
                    description: >-
                      This optional key may be present, with a unique URI for
                      the specific error; this will often point to an error log
                      for that specific response.
                  request_id:
                    type: string
                    description: Correlation ID for the original request.
                required:
                  - type
                  - status
                additionalProperties: false
              example:
                status: 429
                type: too_many_requests
        '500':
          description: Internal Server Error. The service encountered an unexpected error.
          headers:
            upvest-request-id:
              required: true
              schema:
                type: string
                format: uuid
                example: 169ae4c7-ebd7-4041-94da-25369653eba7
          content:
            application/problem+json:
              schema:
                title: Error
                type: object
                description: ''
                properties:
                  type:
                    type: string
                    description: URL to a document describing the error condition.
                  status:
                    type: integer
                    description: >-
                      Transmission of the HTTP status code so that all
                      information can be found in one place, but also to correct
                      changes in the status code due to the use of proxy
                      servers.
                  title:
                    type: string
                    description: >-
                      A short, human-readable title for the general error type;
                      the title should not change for given types.
                  detail:
                    type: string
                    description: A human-readable description of the specific error.
                  instance:
                    type: string
                    description: >-
                      This optional key may be present, with a unique URI for
                      the specific error; this will often point to an error log
                      for that specific response.
                  request_id:
                    type: string
                    description: Correlation ID for the original request.
                required:
                  - type
                  - status
                additionalProperties: false
              example:
                status: 500
                type: internal_server_error
        '503':
          description: >-
            Service Unavailable. The service handling for this request cannot be
            reached at this time.
          headers:
            upvest-request-id:
              required: true
              schema:
                type: string
                format: uuid
                example: 169ae4c7-ebd7-4041-94da-25369653eba7
          content:
            application/problem+json:
              schema:
                title: Error
                type: object
                description: ''
                properties:
                  type:
                    type: string
                    description: URL to a document describing the error condition.
                  status:
                    type: integer
                    description: >-
                      Transmission of the HTTP status code so that all
                      information can be found in one place, but also to correct
                      changes in the status code due to the use of proxy
                      servers.
                  title:
                    type: string
                    description: >-
                      A short, human-readable title for the general error type;
                      the title should not change for given types.
                  detail:
                    type: string
                    description: A human-readable description of the specific error.
                  instance:
                    type: string
                    description: >-
                      This optional key may be present, with a unique URI for
                      the specific error; this will often point to an error log
                      for that specific response.
                  request_id:
                    type: string
                    description: Correlation ID for the original request.
                required:
                  - type
                  - status
                additionalProperties: false
              example:
                status: 503
                type: method_not_allowed
        '504':
          description: >-
            Gateway Timeout. The service gateway has reached its internal
            timeout.
          headers:
            upvest-request-id:
              required: true
              schema:
                type: string
                format: uuid
                example: 169ae4c7-ebd7-4041-94da-25369653eba7
          content:
            application/problem+json:
              schema:
                title: Error
                type: object
                description: ''
                properties:
                  type:
                    type: string
                    description: URL to a document describing the error condition.
                  status:
                    type: integer
                    description: >-
                      Transmission of the HTTP status code so that all
                      information can be found in one place, but also to correct
                      changes in the status code due to the use of proxy
                      servers.
                  title:
                    type: string
                    description: >-
                      A short, human-readable title for the general error type;
                      the title should not change for given types.
                  detail:
                    type: string
                    description: A human-readable description of the specific error.
                  instance:
                    type: string
                    description: >-
                      This optional key may be present, with a unique URI for
                      the specific error; this will often point to an error log
                      for that specific response.
                  request_id:
                    type: string
                    description: Correlation ID for the original request.
                required:
                  - type
                  - status
                additionalProperties: false
              example:
                status: 504
                type: gateway_timeout
  /payments/reference_accounts:
    parameters:
      - name: upvest-client-id
        in: header
        description: Tenant Client ID
        required: true
        schema:
          type: string
          format: uuid
          example: ebabcf4d-61c3-4942-875c-e265a7c2d062
      - name: authorization
        in: header
        description: |
          Bearer (access) token from the OAuth flow with correct scopes.
          https://datatracker.ietf.org/doc/html/rfc6750
        required: true
        schema:
          type: string
          pattern: ^Bearer [a-zA-Z0-9\-\._~+/]*=*
          example: Bearer c2VjcmV0Cg==
      - name: signature
        in: header
        required: true
        schema:
          type: string
        description: >-
          https://tools.ietf.org/id/draft-ietf-httpbis-message-signatures-01.html#name-the-signature-http-header
      - name: signature-input
        in: header
        required: true
        schema:
          type: string
        description: >-
          https://tools.ietf.org/id/draft-ietf-httpbis-message-signatures-01.html#name-the-signature-input-http-he
      - name: upvest-api-version
        in: header
        required: false
        schema:
          type: string
          enum:
            - '1'
          default: '1'
          example: '1'
        description: 'Upvest API version (Note: Do not include quotation marks)'
    post:
      operationId: create_reference_account
      summary: Create a reference account
      description: Creates a new reference account for a user specified by ID.
      tags:
        - Reference Accounts
      parameters:
        - name: idempotency-key
          in: header
          required: true
          schema:
            type: string
            format: uuid
            pattern: >-
              ^[0-9a-fA-F]{8}-?[0-9a-fA-F]{4}-?[0-5][0-9a-fA-F]{3}-?[089abAB][0-9a-fA-F]{3}-?[0-9a-fA-F]{12}$
            example: ccb07f42-4104-44ad-8e1f-c660bb7b269c
          description: >
            A UUID to be used as an idempotency key.  This prevents a duplicate
            request from being replayed.

            https://docs.upvest.co/documentation/concepts/api_concepts/idempotency
      security:
        - oauth-client-credentials:
            - reference_accounts:admin
      requestBody:
        content:
          application/json:
            schema:
              title: Reference Account - Create - Request
              type: object
              properties:
                user_id:
                  title: User unique identifier.
                  type: string
                  description: User unique identifier.
                  format: uuid
                account_owner:
                  type: string
                  maxLength: 140
                  description: First and last name of the reference account owner
                name:
                  type: string
                  maxLength: 100
                  description: Human-readable name of the reference bank account
                iban:
                  title: International Bank Account Number (IBAN)
                  type: string
                  description: >-
                    International Bank Account Number
                    [IBAN](https://en.wikipedia.org/wiki/International_Bank_Account_Number).
                  pattern: ^[A-Z]{2}[0-9]{2}[A-Z0-9]{11,26}$
                bic:
                  title: Business Identifier Code
                  type: string
                  description: >-
                    Business Identifier Code (also known as SWIFT-BIC, BIC,
                    SWIFT ID or SWIFT code) [ISO
                    9362](https://en.wikipedia.org/wiki/ISO_9362).
                  pattern: ^[A-Z]{6}[A-Z0-9]{2}([A-Z0-9]{3})?$
                confirmed_at:
                  type: string
                  format: date-time
                  description: Timestamp of when user validated the reference account
              required:
                - account_owner
                - iban
                - bic
                - confirmed_at
              additionalProperties: false
            examples:
              SEPA:
                summary: SEPA Reference Account
                value:
                  user_id: 83d83ec2-d2ca-49ff-bbea-b92b5c3be202
                  account_owner: Max Mustermann
                  name: Max's Reference Account
                  iban: DE02100500000054540402
                  bic: BELADEBE
                  confirmed_at: '2020-08-23T14:15:22Z'
      responses:
        '200':
          description: Reference account created.
          headers:
            upvest-request-id:
              required: true
              schema:
                type: string
                format: uuid
                example: 169ae4c7-ebd7-4041-94da-25369653eba7
          content:
            application/json:
              schema:
                title: Reference Account
                type: object
                properties:
                  id:
                    title: Reference account unique identifier.
                    type: string
                    description: Reference account unique identifier.
                    format: uuid
                  created_at:
                    type: string
                    format: date-time
                    description: >-
                      Date and time when the resource was created. [RFC
                      3339-5](https://datatracker.ietf.org/doc/html/rfc3339#section-5.6),
                      [ISO8601
                      UTC](https://www.iso.org/iso-8601-date-and-time-format.html)
                  updated_at:
                    type: string
                    format: date-time
                    description: >-
                      Date and time when the resource was last updated. [RFC
                      3339-5](https://datatracker.ietf.org/doc/html/rfc3339#section-5.6),
                      [ISO8601
                      UTC](https://www.iso.org/iso-8601-date-and-time-format.html)
                  user_id:
                    title: User unique identifier.
                    type: string
                    description: User unique identifier.
                    format: uuid
                  account_owner:
                    type: string
                    maxLength: 140
                    description: First and last name of the reference account owner
                  name:
                    type: string
                    maxLength: 100
                    description: Human-readable name of the reference bank account
                  iban:
                    title: International Bank Account Number (IBAN)
                    type: string
                    description: >-
                      Obfuscated International Bank Account Number
                      [IBAN](https://en.wikipedia.org/wiki/International_Bank_Account_Number).
                    pattern: ^[A-Z]{2}[0-9]{2}[A-Z0-9]{2}\*{10}[A-Z0-9]{4}$
                  bic:
                    title: Business Identifier Code
                    type: string
                    description: >-
                      Business Identifier Code (also known as SWIFT-BIC, BIC,
                      SWIFT ID or SWIFT code) [ISO
                      9362](https://en.wikipedia.org/wiki/ISO_9362).
                    pattern: ^[A-Z]{6}[A-Z0-9]{2}([A-Z0-9]{3})?$
                  confirmed_at:
                    type: string
                    format: date-time
                    description: Timestamp of when user validated the reference account
                required:
                  - id
                  - created_at
                  - updated_at
                  - user_id
                  - account_owner
                  - name
                  - iban
                  - bic
                  - confirmed_at
                additionalProperties: false
              examples:
                SEPA:
                  summary: SEPA Reference Account
                  value:
                    id: c18f80bd-401e-4836-9776-7dc24c32d35e
                    created_at: '2020-08-24T14:15:22Z'
                    updated_at: '2020-08-24T14:15:22Z'
                    user_id: 83d83ec2-d2ca-49ff-bbea-b92b5c3be202
                    account_owner: Max Mustermann
                    name: Max's Reference Account
                    iban: DE0210**********0402
                    bic: BELADEBE
                    confirmed_at: '2020-08-23T14:15:22Z'
        '400':
          description: Bad Request. The incoming request had a malformed parameter/object.
          headers:
            upvest-request-id:
              required: true
              schema:
                type: string
                format: uuid
                example: 169ae4c7-ebd7-4041-94da-25369653eba7
          content:
            application/problem+json:
              schema:
                title: Error
                type: object
                description: ''
                properties:
                  type:
                    type: string
                    description: URL to a document describing the error condition.
                  status:
                    type: integer
                    description: >-
                      Transmission of the HTTP status code so that all
                      information can be found in one place, but also to correct
                      changes in the status code due to the use of proxy
                      servers.
                  title:
                    type: string
                    description: >-
                      A short, human-readable title for the general error type;
                      the title should not change for given types.
                  detail:
                    type: string
                    description: A human-readable description of the specific error.
                  instance:
                    type: string
                    description: >-
                      This optional key may be present, with a unique URI for
                      the specific error; this will often point to an error log
                      for that specific response.
                  request_id:
                    type: string
                    description: Correlation ID for the original request.
                required:
                  - type
                  - status
                additionalProperties: false
              example:
                status: 400
                type: bad_request
        '401':
          description: Unauthorized. The caller has not been authenticated.
          headers:
            upvest-request-id:
              required: true
              schema:
                type: string
                format: uuid
                example: 169ae4c7-ebd7-4041-94da-25369653eba7
          content:
            application/problem+json:
              schema:
                title: Error
                type: object
                description: ''
                properties:
                  type:
                    type: string
                    description: URL to a document describing the error condition.
                  status:
                    type: integer
                    description: >-
                      Transmission of the HTTP status code so that all
                      information can be found in one place, but also to correct
                      changes in the status code due to the use of proxy
                      servers.
                  title:
                    type: string
                    description: >-
                      A short, human-readable title for the general error type;
                      the title should not change for given types.
                  detail:
                    type: string
                    description: A human-readable description of the specific error.
                  instance:
                    type: string
                    description: >-
                      This optional key may be present, with a unique URI for
                      the specific error; this will often point to an error log
                      for that specific response.
                  request_id:
                    type: string
                    description: Correlation ID for the original request.
                required:
                  - type
                  - status
                additionalProperties: false
              example:
                status: 401
                type: unauthorized
        '403':
          description: >-
            Forbidden. The caller has been authenticated but is not allowed to
            take the requested action.
          headers:
            upvest-request-id:
              required: true
              schema:
                type: string
                format: uuid
                example: 169ae4c7-ebd7-4041-94da-25369653eba7
          content:
            application/problem+json:
              schema:
                title: Error
                type: object
                description: ''
                properties:
                  type:
                    type: string
                    description: URL to a document describing the error condition.
                  status:
                    type: integer
                    description: >-
                      Transmission of the HTTP status code so that all
                      information can be found in one place, but also to correct
                      changes in the status code due to the use of proxy
                      servers.
                  title:
                    type: string
                    description: >-
                      A short, human-readable title for the general error type;
                      the title should not change for given types.
                  detail:
                    type: string
                    description: A human-readable description of the specific error.
                  instance:
                    type: string
                    description: >-
                      This optional key may be present, with a unique URI for
                      the specific error; this will often point to an error log
                      for that specific response.
                  request_id:
                    type: string
                    description: Correlation ID for the original request.
                required:
                  - type
                  - status
                additionalProperties: false
              example:
                status: 403
                type: forbidden
        '404':
          description: Not Found. The requested resource could not be found.
          headers:
            upvest-request-id:
              required: true
              schema:
                type: string
                format: uuid
                example: 169ae4c7-ebd7-4041-94da-25369653eba7
          content:
            application/problem+json:
              schema:
                title: Error
                type: object
                description: ''
                properties:
                  type:
                    type: string
                    description: URL to a document describing the error condition.
                  status:
                    type: integer
                    description: >-
                      Transmission of the HTTP status code so that all
                      information can be found in one place, but also to correct
                      changes in the status code due to the use of proxy
                      servers.
                  title:
                    type: string
                    description: >-
                      A short, human-readable title for the general error type;
                      the title should not change for given types.
                  detail:
                    type: string
                    description: A human-readable description of the specific error.
                  instance:
                    type: string
                    description: >-
                      This optional key may be present, with a unique URI for
                      the specific error; this will often point to an error log
                      for that specific response.
                  request_id:
                    type: string
                    description: Correlation ID for the original request.
                required:
                  - type
                  - status
                additionalProperties: false
              example:
                status: 404
                type: not_found
        '406':
          description: >-
            Not Acceptable. The resource does not have a current representation
            that would be acceptable to the user agent. "Accept" header defined
            unsupported value.
          headers:
            upvest-request-id:
              required: true
              schema:
                type: string
                format: uuid
                example: 169ae4c7-ebd7-4041-94da-25369653eba7
          content:
            application/problem+json:
              schema:
                title: Error
                type: object
                description: ''
                properties:
                  type:
                    type: string
                    description: URL to a document describing the error condition.
                  status:
                    type: integer
                    description: >-
                      Transmission of the HTTP status code so that all
                      information can be found in one place, but also to correct
                      changes in the status code due to the use of proxy
                      servers.
                  title:
                    type: string
                    description: >-
                      A short, human-readable title for the general error type;
                      the title should not change for given types.
                  detail:
                    type: string
                    description: A human-readable description of the specific error.
                  instance:
                    type: string
                    description: >-
                      This optional key may be present, with a unique URI for
                      the specific error; this will often point to an error log
                      for that specific response.
                  request_id:
                    type: string
                    description: Correlation ID for the original request.
                required:
                  - type
                  - status
                additionalProperties: false
              example:
                status: 406
                type: not_acceptable
        '429':
          description: >-
            Too Many Requests. The caller has exceeded their quota for the time
            period and has been throttled.
          headers:
            upvest-request-id:
              required: true
              schema:
                type: string
                format: uuid
                example: 169ae4c7-ebd7-4041-94da-25369653eba7
          content:
            application/problem+json:
              schema:
                title: Error
                type: object
                description: ''
                properties:
                  type:
                    type: string
                    description: URL to a document describing the error condition.
                  status:
                    type: integer
                    description: >-
                      Transmission of the HTTP status code so that all
                      information can be found in one place, but also to correct
                      changes in the status code due to the use of proxy
                      servers.
                  title:
                    type: string
                    description: >-
                      A short, human-readable title for the general error type;
                      the title should not change for given types.
                  detail:
                    type: string
                    description: A human-readable description of the specific error.
                  instance:
                    type: string
                    description: >-
                      This optional key may be present, with a unique URI for
                      the specific error; this will often point to an error log
                      for that specific response.
                  request_id:
                    type: string
                    description: Correlation ID for the original request.
                required:
                  - type
                  - status
                additionalProperties: false
              example:
                status: 429
                type: too_many_requests
        '500':
          description: Internal Server Error. The service encountered an unexpected error.
          headers:
            upvest-request-id:
              required: true
              schema:
                type: string
                format: uuid
                example: 169ae4c7-ebd7-4041-94da-25369653eba7
          content:
            application/problem+json:
              schema:
                title: Error
                type: object
                description: ''
                properties:
                  type:
                    type: string
                    description: URL to a document describing the error condition.
                  status:
                    type: integer
                    description: >-
                      Transmission of the HTTP status code so that all
                      information can be found in one place, but also to correct
                      changes in the status code due to the use of proxy
                      servers.
                  title:
                    type: string
                    description: >-
                      A short, human-readable title for the general error type;
                      the title should not change for given types.
                  detail:
                    type: string
                    description: A human-readable description of the specific error.
                  instance:
                    type: string
                    description: >-
                      This optional key may be present, with a unique URI for
                      the specific error; this will often point to an error log
                      for that specific response.
                  request_id:
                    type: string
                    description: Correlation ID for the original request.
                required:
                  - type
                  - status
                additionalProperties: false
              example:
                status: 500
                type: internal_server_error
        '503':
          description: >-
            Service Unavailable. The service handling for this request cannot be
            reached at this time.
          headers:
            upvest-request-id:
              required: true
              schema:
                type: string
                format: uuid
                example: 169ae4c7-ebd7-4041-94da-25369653eba7
          content:
            application/problem+json:
              schema:
                title: Error
                type: object
                description: ''
                properties:
                  type:
                    type: string
                    description: URL to a document describing the error condition.
                  status:
                    type: integer
                    description: >-
                      Transmission of the HTTP status code so that all
                      information can be found in one place, but also to correct
                      changes in the status code due to the use of proxy
                      servers.
                  title:
                    type: string
                    description: >-
                      A short, human-readable title for the general error type;
                      the title should not change for given types.
                  detail:
                    type: string
                    description: A human-readable description of the specific error.
                  instance:
                    type: string
                    description: >-
                      This optional key may be present, with a unique URI for
                      the specific error; this will often point to an error log
                      for that specific response.
                  request_id:
                    type: string
                    description: Correlation ID for the original request.
                required:
                  - type
                  - status
                additionalProperties: false
              example:
                status: 503
                type: method_not_allowed
        '504':
          description: >-
            Gateway Timeout. The service gateway has reached its internal
            timeout.
          headers:
            upvest-request-id:
              required: true
              schema:
                type: string
                format: uuid
                example: 169ae4c7-ebd7-4041-94da-25369653eba7
          content:
            application/problem+json:
              schema:
                title: Error
                type: object
                description: ''
                properties:
                  type:
                    type: string
                    description: URL to a document describing the error condition.
                  status:
                    type: integer
                    description: >-
                      Transmission of the HTTP status code so that all
                      information can be found in one place, but also to correct
                      changes in the status code due to the use of proxy
                      servers.
                  title:
                    type: string
                    description: >-
                      A short, human-readable title for the general error type;
                      the title should not change for given types.
                  detail:
                    type: string
                    description: A human-readable description of the specific error.
                  instance:
                    type: string
                    description: >-
                      This optional key may be present, with a unique URI for
                      the specific error; this will often point to an error log
                      for that specific response.
                  request_id:
                    type: string
                    description: Correlation ID for the original request.
                required:
                  - type
                  - status
                additionalProperties: false
              example:
                status: 504
                type: gateway_timeout
  /payments/reference_accounts/{reference_account_id}:
    parameters:
      - name: reference_account_id
        in: path
        required: true
        schema:
          title: Reference account unique identifier.
          type: string
          description: Reference account unique identifier.
          format: uuid
      - name: upvest-client-id
        in: header
        description: Tenant Client ID
        required: true
        schema:
          type: string
          format: uuid
          example: ebabcf4d-61c3-4942-875c-e265a7c2d062
      - name: authorization
        in: header
        description: |
          Bearer (access) token from the OAuth flow with correct scopes.
          https://datatracker.ietf.org/doc/html/rfc6750
        required: true
        schema:
          type: string
          pattern: ^Bearer [a-zA-Z0-9\-\._~+/]*=*
          example: Bearer c2VjcmV0Cg==
      - name: signature
        in: header
        required: true
        schema:
          type: string
        description: >-
          https://tools.ietf.org/id/draft-ietf-httpbis-message-signatures-01.html#name-the-signature-http-header
      - name: signature-input
        in: header
        required: true
        schema:
          type: string
        description: >-
          https://tools.ietf.org/id/draft-ietf-httpbis-message-signatures-01.html#name-the-signature-input-http-he
      - name: upvest-api-version
        in: header
        required: false
        schema:
          type: string
          enum:
            - '1'
          default: '1'
          example: '1'
        description: 'Upvest API version (Note: Do not include quotation marks)'
    get:
      operationId: retrieve_reference_account
      summary: Get a reference account by ID
      description: Retrieves the reference account specified by its ID.
      tags:
        - Reference Accounts
      security:
        - oauth-client-credentials:
            - reference_accounts:admin
            - reference_accounts:read
      responses:
        '200':
          description: OK
          headers:
            upvest-request-id:
              required: true
              schema:
                type: string
                format: uuid
                example: 169ae4c7-ebd7-4041-94da-25369653eba7
          content:
            application/json:
              schema:
                title: Reference Account
                type: object
                properties:
                  id:
                    title: Reference account unique identifier.
                    type: string
                    description: Reference account unique identifier.
                    format: uuid
                  created_at:
                    type: string
                    format: date-time
                    description: >-
                      Date and time when the resource was created. [RFC
                      3339-5](https://datatracker.ietf.org/doc/html/rfc3339#section-5.6),
                      [ISO8601
                      UTC](https://www.iso.org/iso-8601-date-and-time-format.html)
                  updated_at:
                    type: string
                    format: date-time
                    description: >-
                      Date and time when the resource was last updated. [RFC
                      3339-5](https://datatracker.ietf.org/doc/html/rfc3339#section-5.6),
                      [ISO8601
                      UTC](https://www.iso.org/iso-8601-date-and-time-format.html)
                  user_id:
                    title: User unique identifier.
                    type: string
                    description: User unique identifier.
                    format: uuid
                  account_owner:
                    type: string
                    maxLength: 140
                    description: First and last name of the reference account owner
                  name:
                    type: string
                    maxLength: 100
                    description: Human-readable name of the reference bank account
                  iban:
                    title: International Bank Account Number (IBAN)
                    type: string
                    description: >-
                      Obfuscated International Bank Account Number
                      [IBAN](https://en.wikipedia.org/wiki/International_Bank_Account_Number).
                    pattern: ^[A-Z]{2}[0-9]{2}[A-Z0-9]{2}\*{10}[A-Z0-9]{4}$
                  bic:
                    title: Business Identifier Code
                    type: string
                    description: >-
                      Business Identifier Code (also known as SWIFT-BIC, BIC,
                      SWIFT ID or SWIFT code) [ISO
                      9362](https://en.wikipedia.org/wiki/ISO_9362).
                    pattern: ^[A-Z]{6}[A-Z0-9]{2}([A-Z0-9]{3})?$
                  confirmed_at:
                    type: string
                    format: date-time
                    description: Timestamp of when user validated the reference account
                required:
                  - id
                  - created_at
                  - updated_at
                  - user_id
                  - account_owner
                  - name
                  - iban
                  - bic
                  - confirmed_at
                additionalProperties: false
              examples:
                SEPA:
                  summary: SEPA Reference Account
                  value:
                    id: c18f80bd-401e-4836-9776-7dc24c32d35e
                    created_at: '2020-08-24T14:15:22Z'
                    updated_at: '2020-08-24T14:15:22Z'
                    user_id: 83d83ec2-d2ca-49ff-bbea-b92b5c3be202
                    account_owner: Max Mustermann
                    name: Max's Reference Account
                    iban: DE0210**********0402
                    bic: BELADEBE
                    confirmed_at: '2020-08-23T14:15:22Z'
        '401':
          description: Unauthorized. The caller has not been authenticated.
          headers:
            upvest-request-id:
              required: true
              schema:
                type: string
                format: uuid
                example: 169ae4c7-ebd7-4041-94da-25369653eba7
          content:
            application/problem+json:
              schema:
                title: Error
                type: object
                description: ''
                properties:
                  type:
                    type: string
                    description: URL to a document describing the error condition.
                  status:
                    type: integer
                    description: >-
                      Transmission of the HTTP status code so that all
                      information can be found in one place, but also to correct
                      changes in the status code due to the use of proxy
                      servers.
                  title:
                    type: string
                    description: >-
                      A short, human-readable title for the general error type;
                      the title should not change for given types.
                  detail:
                    type: string
                    description: A human-readable description of the specific error.
                  instance:
                    type: string
                    description: >-
                      This optional key may be present, with a unique URI for
                      the specific error; this will often point to an error log
                      for that specific response.
                  request_id:
                    type: string
                    description: Correlation ID for the original request.
                required:
                  - type
                  - status
                additionalProperties: false
              example:
                status: 401
                type: unauthorized
        '403':
          description: >-
            Forbidden. The caller has been authenticated but is not allowed to
            take the requested action.
          headers:
            upvest-request-id:
              required: true
              schema:
                type: string
                format: uuid
                example: 169ae4c7-ebd7-4041-94da-25369653eba7
          content:
            application/problem+json:
              schema:
                title: Error
                type: object
                description: ''
                properties:
                  type:
                    type: string
                    description: URL to a document describing the error condition.
                  status:
                    type: integer
                    description: >-
                      Transmission of the HTTP status code so that all
                      information can be found in one place, but also to correct
                      changes in the status code due to the use of proxy
                      servers.
                  title:
                    type: string
                    description: >-
                      A short, human-readable title for the general error type;
                      the title should not change for given types.
                  detail:
                    type: string
                    description: A human-readable description of the specific error.
                  instance:
                    type: string
                    description: >-
                      This optional key may be present, with a unique URI for
                      the specific error; this will often point to an error log
                      for that specific response.
                  request_id:
                    type: string
                    description: Correlation ID for the original request.
                required:
                  - type
                  - status
                additionalProperties: false
              example:
                status: 403
                type: forbidden
        '404':
          description: Not Found. The requested resource could not be found.
          headers:
            upvest-request-id:
              required: true
              schema:
                type: string
                format: uuid
                example: 169ae4c7-ebd7-4041-94da-25369653eba7
          content:
            application/problem+json:
              schema:
                title: Error
                type: object
                description: ''
                properties:
                  type:
                    type: string
                    description: URL to a document describing the error condition.
                  status:
                    type: integer
                    description: >-
                      Transmission of the HTTP status code so that all
                      information can be found in one place, but also to correct
                      changes in the status code due to the use of proxy
                      servers.
                  title:
                    type: string
                    description: >-
                      A short, human-readable title for the general error type;
                      the title should not change for given types.
                  detail:
                    type: string
                    description: A human-readable description of the specific error.
                  instance:
                    type: string
                    description: >-
                      This optional key may be present, with a unique URI for
                      the specific error; this will often point to an error log
                      for that specific response.
                  request_id:
                    type: string
                    description: Correlation ID for the original request.
                required:
                  - type
                  - status
                additionalProperties: false
              example:
                status: 404
                type: not_found
        '406':
          description: >-
            Not Acceptable. The resource does not have a current representation
            that would be acceptable to the user agent. "Accept" header defined
            unsupported value.
          headers:
            upvest-request-id:
              required: true
              schema:
                type: string
                format: uuid
                example: 169ae4c7-ebd7-4041-94da-25369653eba7
          content:
            application/problem+json:
              schema:
                title: Error
                type: object
                description: ''
                properties:
                  type:
                    type: string
                    description: URL to a document describing the error condition.
                  status:
                    type: integer
                    description: >-
                      Transmission of the HTTP status code so that all
                      information can be found in one place, but also to correct
                      changes in the status code due to the use of proxy
                      servers.
                  title:
                    type: string
                    description: >-
                      A short, human-readable title for the general error type;
                      the title should not change for given types.
                  detail:
                    type: string
                    description: A human-readable description of the specific error.
                  instance:
                    type: string
                    description: >-
                      This optional key may be present, with a unique URI for
                      the specific error; this will often point to an error log
                      for that specific response.
                  request_id:
                    type: string
                    description: Correlation ID for the original request.
                required:
                  - type
                  - status
                additionalProperties: false
              example:
                status: 406
                type: not_acceptable
        '429':
          description: >-
            Too Many Requests. The caller has exceeded their quota for the time
            period and has been throttled.
          headers:
            upvest-request-id:
              required: true
              schema:
                type: string
                format: uuid
                example: 169ae4c7-ebd7-4041-94da-25369653eba7
          content:
            application/problem+json:
              schema:
                title: Error
                type: object
                description: ''
                properties:
                  type:
                    type: string
                    description: URL to a document describing the error condition.
                  status:
                    type: integer
                    description: >-
                      Transmission of the HTTP status code so that all
                      information can be found in one place, but also to correct
                      changes in the status code due to the use of proxy
                      servers.
                  title:
                    type: string
                    description: >-
                      A short, human-readable title for the general error type;
                      the title should not change for given types.
                  detail:
                    type: string
                    description: A human-readable description of the specific error.
                  instance:
                    type: string
                    description: >-
                      This optional key may be present, with a unique URI for
                      the specific error; this will often point to an error log
                      for that specific response.
                  request_id:
                    type: string
                    description: Correlation ID for the original request.
                required:
                  - type
                  - status
                additionalProperties: false
              example:
                status: 429
                type: too_many_requests
        '500':
          description: Internal Server Error. The service encountered an unexpected error.
          headers:
            upvest-request-id:
              required: true
              schema:
                type: string
                format: uuid
                example: 169ae4c7-ebd7-4041-94da-25369653eba7
          content:
            application/problem+json:
              schema:
                title: Error
                type: object
                description: ''
                properties:
                  type:
                    type: string
                    description: URL to a document describing the error condition.
                  status:
                    type: integer
                    description: >-
                      Transmission of the HTTP status code so that all
                      information can be found in one place, but also to correct
                      changes in the status code due to the use of proxy
                      servers.
                  title:
                    type: string
                    description: >-
                      A short, human-readable title for the general error type;
                      the title should not change for given types.
                  detail:
                    type: string
                    description: A human-readable description of the specific error.
                  instance:
                    type: string
                    description: >-
                      This optional key may be present, with a unique URI for
                      the specific error; this will often point to an error log
                      for that specific response.
                  request_id:
                    type: string
                    description: Correlation ID for the original request.
                required:
                  - type
                  - status
                additionalProperties: false
              example:
                status: 500
                type: internal_server_error
        '503':
          description: >-
            Service Unavailable. The service handling for this request cannot be
            reached at this time.
          headers:
            upvest-request-id:
              required: true
              schema:
                type: string
                format: uuid
                example: 169ae4c7-ebd7-4041-94da-25369653eba7
          content:
            application/problem+json:
              schema:
                title: Error
                type: object
                description: ''
                properties:
                  type:
                    type: string
                    description: URL to a document describing the error condition.
                  status:
                    type: integer
                    description: >-
                      Transmission of the HTTP status code so that all
                      information can be found in one place, but also to correct
                      changes in the status code due to the use of proxy
                      servers.
                  title:
                    type: string
                    description: >-
                      A short, human-readable title for the general error type;
                      the title should not change for given types.
                  detail:
                    type: string
                    description: A human-readable description of the specific error.
                  instance:
                    type: string
                    description: >-
                      This optional key may be present, with a unique URI for
                      the specific error; this will often point to an error log
                      for that specific response.
                  request_id:
                    type: string
                    description: Correlation ID for the original request.
                required:
                  - type
                  - status
                additionalProperties: false
              example:
                status: 503
                type: method_not_allowed
        '504':
          description: >-
            Gateway Timeout. The service gateway has reached its internal
            timeout.
          headers:
            upvest-request-id:
              required: true
              schema:
                type: string
                format: uuid
                example: 169ae4c7-ebd7-4041-94da-25369653eba7
          content:
            application/problem+json:
              schema:
                title: Error
                type: object
                description: ''
                properties:
                  type:
                    type: string
                    description: URL to a document describing the error condition.
                  status:
                    type: integer
                    description: >-
                      Transmission of the HTTP status code so that all
                      information can be found in one place, but also to correct
                      changes in the status code due to the use of proxy
                      servers.
                  title:
                    type: string
                    description: >-
                      A short, human-readable title for the general error type;
                      the title should not change for given types.
                  detail:
                    type: string
                    description: A human-readable description of the specific error.
                  instance:
                    type: string
                    description: >-
                      This optional key may be present, with a unique URI for
                      the specific error; this will often point to an error log
                      for that specific response.
                  request_id:
                    type: string
                    description: Correlation ID for the original request.
                required:
                  - type
                  - status
                additionalProperties: false
              example:
                status: 504
                type: gateway_timeout
    delete:
      operationId: delete_reference_account
      summary: Delete a reference account by ID
      description: Deletes the reference account specified by its ID.
      tags:
        - Reference Accounts
      security:
        - oauth-client-credentials:
            - reference_accounts:admin
      responses:
        '204':
          description: Request has been processed successfully.
          headers:
            upvest-request-id:
              required: true
              schema:
                type: string
                format: uuid
                example: 169ae4c7-ebd7-4041-94da-25369653eba7
        '401':
          description: Unauthorized. The caller has not been authenticated.
          headers:
            upvest-request-id:
              required: true
              schema:
                type: string
                format: uuid
                example: 169ae4c7-ebd7-4041-94da-25369653eba7
          content:
            application/problem+json:
              schema:
                title: Error
                type: object
                description: ''
                properties:
                  type:
                    type: string
                    description: URL to a document describing the error condition.
                  status:
                    type: integer
                    description: >-
                      Transmission of the HTTP status code so that all
                      information can be found in one place, but also to correct
                      changes in the status code due to the use of proxy
                      servers.
                  title:
                    type: string
                    description: >-
                      A short, human-readable title for the general error type;
                      the title should not change for given types.
                  detail:
                    type: string
                    description: A human-readable description of the specific error.
                  instance:
                    type: string
                    description: >-
                      This optional key may be present, with a unique URI for
                      the specific error; this will often point to an error log
                      for that specific response.
                  request_id:
                    type: string
                    description: Correlation ID for the original request.
                required:
                  - type
                  - status
                additionalProperties: false
              example:
                status: 401
                type: unauthorized
        '403':
          description: >-
            Forbidden. The caller has been authenticated but is not allowed to
            take the requested action.
          headers:
            upvest-request-id:
              required: true
              schema:
                type: string
                format: uuid
                example: 169ae4c7-ebd7-4041-94da-25369653eba7
          content:
            application/problem+json:
              schema:
                title: Error
                type: object
                description: ''
                properties:
                  type:
                    type: string
                    description: URL to a document describing the error condition.
                  status:
                    type: integer
                    description: >-
                      Transmission of the HTTP status code so that all
                      information can be found in one place, but also to correct
                      changes in the status code due to the use of proxy
                      servers.
                  title:
                    type: string
                    description: >-
                      A short, human-readable title for the general error type;
                      the title should not change for given types.
                  detail:
                    type: string
                    description: A human-readable description of the specific error.
                  instance:
                    type: string
                    description: >-
                      This optional key may be present, with a unique URI for
                      the specific error; this will often point to an error log
                      for that specific response.
                  request_id:
                    type: string
                    description: Correlation ID for the original request.
                required:
                  - type
                  - status
                additionalProperties: false
              example:
                status: 403
                type: forbidden
        '404':
          description: Not Found. The requested resource could not be found.
          headers:
            upvest-request-id:
              required: true
              schema:
                type: string
                format: uuid
                example: 169ae4c7-ebd7-4041-94da-25369653eba7
          content:
            application/problem+json:
              schema:
                title: Error
                type: object
                description: ''
                properties:
                  type:
                    type: string
                    description: URL to a document describing the error condition.
                  status:
                    type: integer
                    description: >-
                      Transmission of the HTTP status code so that all
                      information can be found in one place, but also to correct
                      changes in the status code due to the use of proxy
                      servers.
                  title:
                    type: string
                    description: >-
                      A short, human-readable title for the general error type;
                      the title should not change for given types.
                  detail:
                    type: string
                    description: A human-readable description of the specific error.
                  instance:
                    type: string
                    description: >-
                      This optional key may be present, with a unique URI for
                      the specific error; this will often point to an error log
                      for that specific response.
                  request_id:
                    type: string
                    description: Correlation ID for the original request.
                required:
                  - type
                  - status
                additionalProperties: false
              example:
                status: 404
                type: not_found
        '429':
          description: >-
            Too Many Requests. The caller has exceeded their quota for the time
            period and has been throttled.
          headers:
            upvest-request-id:
              required: true
              schema:
                type: string
                format: uuid
                example: 169ae4c7-ebd7-4041-94da-25369653eba7
          content:
            application/problem+json:
              schema:
                title: Error
                type: object
                description: ''
                properties:
                  type:
                    type: string
                    description: URL to a document describing the error condition.
                  status:
                    type: integer
                    description: >-
                      Transmission of the HTTP status code so that all
                      information can be found in one place, but also to correct
                      changes in the status code due to the use of proxy
                      servers.
                  title:
                    type: string
                    description: >-
                      A short, human-readable title for the general error type;
                      the title should not change for given types.
                  detail:
                    type: string
                    description: A human-readable description of the specific error.
                  instance:
                    type: string
                    description: >-
                      This optional key may be present, with a unique URI for
                      the specific error; this will often point to an error log
                      for that specific response.
                  request_id:
                    type: string
                    description: Correlation ID for the original request.
                required:
                  - type
                  - status
                additionalProperties: false
              example:
                status: 429
                type: too_many_requests
        '500':
          description: Internal Server Error. The service encountered an unexpected error.
          headers:
            upvest-request-id:
              required: true
              schema:
                type: string
                format: uuid
                example: 169ae4c7-ebd7-4041-94da-25369653eba7
          content:
            application/problem+json:
              schema:
                title: Error
                type: object
                description: ''
                properties:
                  type:
                    type: string
                    description: URL to a document describing the error condition.
                  status:
                    type: integer
                    description: >-
                      Transmission of the HTTP status code so that all
                      information can be found in one place, but also to correct
                      changes in the status code due to the use of proxy
                      servers.
                  title:
                    type: string
                    description: >-
                      A short, human-readable title for the general error type;
                      the title should not change for given types.
                  detail:
                    type: string
                    description: A human-readable description of the specific error.
                  instance:
                    type: string
                    description: >-
                      This optional key may be present, with a unique URI for
                      the specific error; this will often point to an error log
                      for that specific response.
                  request_id:
                    type: string
                    description: Correlation ID for the original request.
                required:
                  - type
                  - status
                additionalProperties: false
              example:
                status: 500
                type: internal_server_error
        '503':
          description: >-
            Service Unavailable. The service handling for this request cannot be
            reached at this time.
          headers:
            upvest-request-id:
              required: true
              schema:
                type: string
                format: uuid
                example: 169ae4c7-ebd7-4041-94da-25369653eba7
          content:
            application/problem+json:
              schema:
                title: Error
                type: object
                description: ''
                properties:
                  type:
                    type: string
                    description: URL to a document describing the error condition.
                  status:
                    type: integer
                    description: >-
                      Transmission of the HTTP status code so that all
                      information can be found in one place, but also to correct
                      changes in the status code due to the use of proxy
                      servers.
                  title:
                    type: string
                    description: >-
                      A short, human-readable title for the general error type;
                      the title should not change for given types.
                  detail:
                    type: string
                    description: A human-readable description of the specific error.
                  instance:
                    type: string
                    description: >-
                      This optional key may be present, with a unique URI for
                      the specific error; this will often point to an error log
                      for that specific response.
                  request_id:
                    type: string
                    description: Correlation ID for the original request.
                required:
                  - type
                  - status
                additionalProperties: false
              example:
                status: 503
                type: method_not_allowed
        '504':
          description: >-
            Gateway Timeout. The service gateway has reached its internal
            timeout.
          headers:
            upvest-request-id:
              required: true
              schema:
                type: string
                format: uuid
                example: 169ae4c7-ebd7-4041-94da-25369653eba7
          content:
            application/problem+json:
              schema:
                title: Error
                type: object
                description: ''
                properties:
                  type:
                    type: string
                    description: URL to a document describing the error condition.
                  status:
                    type: integer
                    description: >-
                      Transmission of the HTTP status code so that all
                      information can be found in one place, but also to correct
                      changes in the status code due to the use of proxy
                      servers.
                  title:
                    type: string
                    description: >-
                      A short, human-readable title for the general error type;
                      the title should not change for given types.
                  detail:
                    type: string
                    description: A human-readable description of the specific error.
                  instance:
                    type: string
                    description: >-
                      This optional key may be present, with a unique URI for
                      the specific error; this will often point to an error log
                      for that specific response.
                  request_id:
                    type: string
                    description: Correlation ID for the original request.
                required:
                  - type
                  - status
                additionalProperties: false
              example:
                status: 504
                type: gateway_timeout
  /users/{user_id}/payments/mandates:
    parameters:
      - name: user_id
        in: path
        required: true
        schema:
          title: User unique identifier.
          type: string
          description: User unique identifier.
          format: uuid
      - name: upvest-client-id
        in: header
        description: Tenant Client ID
        required: true
        schema:
          type: string
          format: uuid
          example: ebabcf4d-61c3-4942-875c-e265a7c2d062
      - name: authorization
        in: header
        description: |
          Bearer (access) token from the OAuth flow with correct scopes.
          https://datatracker.ietf.org/doc/html/rfc6750
        required: true
        schema:
          type: string
          pattern: ^Bearer [a-zA-Z0-9\-\._~+/]*=*
          example: Bearer c2VjcmV0Cg==
      - name: signature
        in: header
        required: true
        schema:
          type: string
        description: >-
          https://tools.ietf.org/id/draft-ietf-httpbis-message-signatures-01.html#name-the-signature-http-header
      - name: signature-input
        in: header
        required: true
        schema:
          type: string
        description: >-
          https://tools.ietf.org/id/draft-ietf-httpbis-message-signatures-01.html#name-the-signature-input-http-he
      - name: upvest-api-version
        in: header
        required: false
        schema:
          type: string
          enum:
            - '1'
          default: '1'
          example: '1'
        description: 'Upvest API version (Note: Do not include quotation marks)'
    get:
      operationId: list_mandates
      summary: List mandates
      description: List mandates
      tags:
        - Mandates
      security:
        - oauth-client-credentials:
            - mandates:admin
            - mandates:read
      parameters:
        - name: sort
          in: query
          required: false
          schema:
            type: string
            enum:
              - id
              - created_at
            default: created_at
          description: Field of resource to sort by
          example: id
        - name: order
          in: query
          required: false
          schema:
            type: string
            enum:
              - ASC
              - DESC
            default: ASC
          description: >-
            Sort order of the result list if the `sort` parameter is specified.
            Use `ASC` for ascending or `DESC` for descending sort order.
        - name: limit
          in: query
          schema:
            type: integer
            format: int32
            default: 100
            minimum: 0
            maximum: 1000
          allowEmptyValue: true
          description: >-
            Use the `limit` argument to specify the maximum number of items
            returned.
        - name: offset
          in: query
          schema:
            type: integer
            minimum: 0
            format: int32
          allowEmptyValue: true
          description: >-
            Use the `offset` argument to specify where in the list of results to
            start when returning items for a particular query.
      responses:
        '200':
          description: Mandates list
          headers:
            upvest-request-id:
              required: true
              schema:
                type: string
                format: uuid
                example: 169ae4c7-ebd7-4041-94da-25369653eba7
          content:
            application/json:
              schema:
                title: Mandates - List - Response
                type: object
                properties:
                  meta:
                    type: object
                    properties:
                      offset:
                        type: integer
                        description: Amount of resource to offset in the response.
                      limit:
                        type: integer
                        description: Total limit of the response.
                      count:
                        type: integer
                        description: Count of the resources returned in the response.
                      total_count:
                        type: integer
                        description: Total count of all the resources.
                      sort:
                        type: string
                        description: The field that the list is sorted by.
                      order:
                        type: string
                        description: |-
                          The ordering of the response.
                          * ASC - Ascending order
                          * DESC - Descending order
                        enum:
                          - ASC
                          - DESC
                    required:
                      - offset
                      - limit
                      - count
                      - total_count
                  data:
                    type: array
                    items:
                      title: Direct Debit Mandate
                      type: object
                      properties:
                        id:
                          title: Direct Debit Mandate unique identifier.
                          type: string
                          description: Direct Debit Mandate unique identifier.
                          format: uuid
                        created_at:
                          type: string
                          format: date-time
                          description: >-
                            Date and time when the resource was created. [RFC
                            3339-5](https://datatracker.ietf.org/doc/html/rfc3339#section-5.6),
                            [ISO8601
                            UTC](https://www.iso.org/iso-8601-date-and-time-format.html)
                        user_id:
                          title: User unique identifier.
                          type: string
                          description: User unique identifier.
                          format: uuid
                        iban:
                          title: International Bank Account Number (IBAN)
                          type: string
                          description: >-
                            Obfuscated International Bank Account Number
                            [IBAN](https://en.wikipedia.org/wiki/International_Bank_Account_Number).
                          pattern: ^[A-Z]{2}[0-9]{2}[A-Z0-9]{2}\*{10}[A-Z0-9]{4}$
                        bic:
                          title: Business Identifier Code
                          type: string
                          description: >-
                            Business Identifier Code (also known as SWIFT-BIC,
                            BIC, SWIFT ID or SWIFT code) [ISO
                            9362](https://en.wikipedia.org/wiki/ISO_9362).
                          pattern: ^[A-Z]{6}[A-Z0-9]{2}([A-Z0-9]{3})?$
                        creditor_name:
                          type: string
                          maxLength: 100
                          description: Name of the creditor on the mandate.
                        creditor_id:
                          type: string
                          maxLength: 20
                          description: Banking identifier of the creditor.
                        creditor_address:
                          title: Address
                          type: object
                          description: Address. Must not be a P.O. box or c/o address.
                          properties:
                            address_line1:
                              type: string
                              description: First address line of the address.
                              maxLength: 100
                            address_line2:
                              type: string
                              description: Second address line of the address.
                              maxLength: 100
                            postcode:
                              title: Postal code
                              type: string
                              description: Postal code (postcode, PIN or ZIP code)
                              pattern: ^[a-zA-Z0-9][a-zA-Z0-9\s\-]{0,8}[a-zA-Z0-9]?$
                            country:
                              description: >-
                                Accepted country code. [ISO 3166-1 alpha-2
                                codes](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2).
                              type: string
                              enum:
                                - AD
                                - AE
                                - AF
                                - AG
                                - AI
                                - AL
                                - AM
                                - AO
                                - AQ
                                - AR
                                - AS
                                - AT
                                - AU
                                - AW
                                - AX
                                - AZ
                                - BA
                                - BB
                                - BD
                                - BE
                                - BF
                                - BG
                                - BH
                                - BI
                                - BJ
                                - BL
                                - BM
                                - BN
                                - BO
                                - BQ
                                - BR
                                - BS
                                - BT
                                - BV
                                - BW
                                - BY
                                - BZ
                                - CA
                                - CC
                                - CD
                                - CF
                                - CG
                                - CH
                                - CI
                                - CK
                                - CL
                                - CM
                                - CN
                                - CO
                                - CR
                                - CU
                                - CV
                                - CW
                                - CX
                                - CY
                                - CZ
                                - DE
                                - DJ
                                - DK
                                - DM
                                - DO
                                - DZ
                                - EC
                                - EE
                                - EG
                                - EH
                                - ER
                                - ES
                                - ET
                                - FI
                                - FJ
                                - FK
                                - FM
                                - FO
                                - FR
                                - GA
                                - GB
                                - GD
                                - GE
                                - GF
                                - GG
                                - GH
                                - GI
                                - GL
                                - GM
                                - GN
                                - GP
                                - GQ
                                - GR
                                - GS
                                - GT
                                - GU
                                - GW
                                - GY
                                - HK
                                - HM
                                - HN
                                - HR
                                - HT
                                - HU
                                - ID
                                - IE
                                - IL
                                - IM
                                - IN
                                - IO
                                - IQ
                                - IR
                                - IS
                                - IT
                                - JE
                                - JM
                                - JO
                                - JP
                                - KE
                                - KG
                                - KH
                                - KI
                                - KM
                                - KN
                                - KP
                                - KR
                                - KW
                                - KY
                                - KZ
                                - LA
                                - LB
                                - LC
                                - LI
                                - LK
                                - LR
                                - LS
                                - LT
                                - LU
                                - LV
                                - LY
                                - MA
                                - MC
                                - MD
                                - ME
                                - MF
                                - MG
                                - MH
                                - MK
                                - ML
                                - MM
                                - MN
                                - MO
                                - MP
                                - MQ
                                - MR
                                - MS
                                - MT
                                - MU
                                - MV
                                - MW
                                - MX
                                - MY
                                - MZ
                                - NA
                                - NC
                                - NE
                                - NF
                                - NG
                                - NI
                                - NL
                                - 'NO'
                                - NP
                                - NR
                                - NU
                                - NZ
                                - OM
                                - PA
                                - PE
                                - PF
                                - PG
                                - PH
                                - PK
                                - PL
                                - PM
                                - PN
                                - PR
                                - PS
                                - PT
                                - PW
                                - PY
                                - QA
                                - RE
                                - RO
                                - RS
                                - RU
                                - RW
                                - SA
                                - SB
                                - SC
                                - SD
                                - SE
                                - SG
                                - SH
                                - SI
                                - SJ
                                - SK
                                - SL
                                - SM
                                - SN
                                - SO
                                - SR
                                - SS
                                - ST
                                - SV
                                - SX
                                - SY
                                - SZ
                                - TC
                                - TD
                                - TF
                                - TG
                                - TH
                                - TJ
                                - TK
                                - TL
                                - TM
                                - TN
                                - TO
                                - TR
                                - TT
                                - TV
                                - TW
                                - TZ
                                - UA
                                - UG
                                - UM
                                - US
                                - UY
                                - UZ
                                - VA
                                - VC
                                - VE
                                - VG
                                - VI
                                - VN
                                - VU
                                - WF
                                - WS
                                - XK
                                - YE
                                - YT
                                - ZA
                                - ZM
                                - ZW
                            state:
                              description: >-
                                State, province, county. [ISO 3166 alpha-2
                                Codes](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2).
                              type: string
                              maxLength: 50
                            city:
                              title: City name
                              type: string
                              minLength: 1
                              maxLength: 85
                          required:
                            - address_line1
                            - postcode
                            - country
                            - city
                        type:
                          type: string
                          maxLength: 10
                          enum:
                            - RECURRENT
                          default: RECURRENT
                          description: |-
                            Type of mandate.
                            * RECURRENT - 
                        confirmed_at:
                          type: string
                          format: date-time
                          description: Timestamp of when user validated the mandate
                      required:
                        - id
                        - created_at
                        - user_id
                        - iban
                        - bic
                        - creditor_name
                        - creditor_id
                        - creditor_address
                        - type
                        - confirmed_at
                      additionalProperties: false
                required:
                  - meta
                  - data
                additionalProperties: false
              example:
                meta:
                  offset: 0
                  limit: 100
                  count: 1
                  total_count: 1
                  sort: id
                  order: ASC
                data:
                  - id: 9c5a7dea-46f2-4502-b6b5-9902a53860e4
                    created_at: '2020-08-24T14:15:22Z'
                    user_id: 83d83ec2-d2ca-49ff-bbea-b92b5c3be202
                    iban: DE8900**********0000
                    bic: ABCDEXXX
                    creditor_name: Creditor Company
                    creditor_id: DE98ZZZ09999999999
                    creditor_address:
                      address_line1: Strasse 1
                      address_line2: Company GmbH
                      postcode: '12345'
                      city: Berlin
                      state: BE
                      country: DE
                    type: RECURRENT
                    confirmed_at: '2021-12-08T08:38:48.021Z'
        '400':
          description: Bad Request. The incoming request had a malformed parameter/object.
          headers:
            upvest-request-id:
              required: true
              schema:
                type: string
                format: uuid
                example: 169ae4c7-ebd7-4041-94da-25369653eba7
          content:
            application/problem+json:
              schema:
                title: Error
                type: object
                description: ''
                properties:
                  type:
                    type: string
                    description: URL to a document describing the error condition.
                  status:
                    type: integer
                    description: >-
                      Transmission of the HTTP status code so that all
                      information can be found in one place, but also to correct
                      changes in the status code due to the use of proxy
                      servers.
                  title:
                    type: string
                    description: >-
                      A short, human-readable title for the general error type;
                      the title should not change for given types.
                  detail:
                    type: string
                    description: A human-readable description of the specific error.
                  instance:
                    type: string
                    description: >-
                      This optional key may be present, with a unique URI for
                      the specific error; this will often point to an error log
                      for that specific response.
                  request_id:
                    type: string
                    description: Correlation ID for the original request.
                required:
                  - type
                  - status
                additionalProperties: false
              example:
                status: 400
                type: bad_request
        '401':
          description: Unauthorized. The caller has not been authenticated.
          headers:
            upvest-request-id:
              required: true
              schema:
                type: string
                format: uuid
                example: 169ae4c7-ebd7-4041-94da-25369653eba7
          content:
            application/problem+json:
              schema:
                title: Error
                type: object
                description: ''
                properties:
                  type:
                    type: string
                    description: URL to a document describing the error condition.
                  status:
                    type: integer
                    description: >-
                      Transmission of the HTTP status code so that all
                      information can be found in one place, but also to correct
                      changes in the status code due to the use of proxy
                      servers.
                  title:
                    type: string
                    description: >-
                      A short, human-readable title for the general error type;
                      the title should not change for given types.
                  detail:
                    type: string
                    description: A human-readable description of the specific error.
                  instance:
                    type: string
                    description: >-
                      This optional key may be present, with a unique URI for
                      the specific error; this will often point to an error log
                      for that specific response.
                  request_id:
                    type: string
                    description: Correlation ID for the original request.
                required:
                  - type
                  - status
                additionalProperties: false
              example:
                status: 401
                type: unauthorized
        '403':
          description: >-
            Forbidden. The caller has been authenticated but is not allowed to
            take the requested action.
          headers:
            upvest-request-id:
              required: true
              schema:
                type: string
                format: uuid
                example: 169ae4c7-ebd7-4041-94da-25369653eba7
          content:
            application/problem+json:
              schema:
                title: Error
                type: object
                description: ''
                properties:
                  type:
                    type: string
                    description: URL to a document describing the error condition.
                  status:
                    type: integer
                    description: >-
                      Transmission of the HTTP status code so that all
                      information can be found in one place, but also to correct
                      changes in the status code due to the use of proxy
                      servers.
                  title:
                    type: string
                    description: >-
                      A short, human-readable title for the general error type;
                      the title should not change for given types.
                  detail:
                    type: string
                    description: A human-readable description of the specific error.
                  instance:
                    type: string
                    description: >-
                      This optional key may be present, with a unique URI for
                      the specific error; this will often point to an error log
                      for that specific response.
                  request_id:
                    type: string
                    description: Correlation ID for the original request.
                required:
                  - type
                  - status
                additionalProperties: false
              example:
                status: 403
                type: forbidden
        '404':
          description: Not Found. The requested resource could not be found.
          headers:
            upvest-request-id:
              required: true
              schema:
                type: string
                format: uuid
                example: 169ae4c7-ebd7-4041-94da-25369653eba7
          content:
            application/problem+json:
              schema:
                title: Error
                type: object
                description: ''
                properties:
                  type:
                    type: string
                    description: URL to a document describing the error condition.
                  status:
                    type: integer
                    description: >-
                      Transmission of the HTTP status code so that all
                      information can be found in one place, but also to correct
                      changes in the status code due to the use of proxy
                      servers.
                  title:
                    type: string
                    description: >-
                      A short, human-readable title for the general error type;
                      the title should not change for given types.
                  detail:
                    type: string
                    description: A human-readable description of the specific error.
                  instance:
                    type: string
                    description: >-
                      This optional key may be present, with a unique URI for
                      the specific error; this will often point to an error log
                      for that specific response.
                  request_id:
                    type: string
                    description: Correlation ID for the original request.
                required:
                  - type
                  - status
                additionalProperties: false
              example:
                status: 404
                type: not_found
        '406':
          description: >-
            Not Acceptable. The resource does not have a current representation
            that would be acceptable to the user agent. "Accept" header defined
            unsupported value.
          headers:
            upvest-request-id:
              required: true
              schema:
                type: string
                format: uuid
                example: 169ae4c7-ebd7-4041-94da-25369653eba7
          content:
            application/problem+json:
              schema:
                title: Error
                type: object
                description: ''
                properties:
                  type:
                    type: string
                    description: URL to a document describing the error condition.
                  status:
                    type: integer
                    description: >-
                      Transmission of the HTTP status code so that all
                      information can be found in one place, but also to correct
                      changes in the status code due to the use of proxy
                      servers.
                  title:
                    type: string
                    description: >-
                      A short, human-readable title for the general error type;
                      the title should not change for given types.
                  detail:
                    type: string
                    description: A human-readable description of the specific error.
                  instance:
                    type: string
                    description: >-
                      This optional key may be present, with a unique URI for
                      the specific error; this will often point to an error log
                      for that specific response.
                  request_id:
                    type: string
                    description: Correlation ID for the original request.
                required:
                  - type
                  - status
                additionalProperties: false
              example:
                status: 406
                type: not_acceptable
        '429':
          description: >-
            Too Many Requests. The caller has exceeded their quota for the time
            period and has been throttled.
          headers:
            upvest-request-id:
              required: true
              schema:
                type: string
                format: uuid
                example: 169ae4c7-ebd7-4041-94da-25369653eba7
          content:
            application/problem+json:
              schema:
                title: Error
                type: object
                description: ''
                properties:
                  type:
                    type: string
                    description: URL to a document describing the error condition.
                  status:
                    type: integer
                    description: >-
                      Transmission of the HTTP status code so that all
                      information can be found in one place, but also to correct
                      changes in the status code due to the use of proxy
                      servers.
                  title:
                    type: string
                    description: >-
                      A short, human-readable title for the general error type;
                      the title should not change for given types.
                  detail:
                    type: string
                    description: A human-readable description of the specific error.
                  instance:
                    type: string
                    description: >-
                      This optional key may be present, with a unique URI for
                      the specific error; this will often point to an error log
                      for that specific response.
                  request_id:
                    type: string
                    description: Correlation ID for the original request.
                required:
                  - type
                  - status
                additionalProperties: false
              example:
                status: 429
                type: too_many_requests
        '500':
          description: Internal Server Error. The service encountered an unexpected error.
          headers:
            upvest-request-id:
              required: true
              schema:
                type: string
                format: uuid
                example: 169ae4c7-ebd7-4041-94da-25369653eba7
          content:
            application/problem+json:
              schema:
                title: Error
                type: object
                description: ''
                properties:
                  type:
                    type: string
                    description: URL to a document describing the error condition.
                  status:
                    type: integer
                    description: >-
                      Transmission of the HTTP status code so that all
                      information can be found in one place, but also to correct
                      changes in the status code due to the use of proxy
                      servers.
                  title:
                    type: string
                    description: >-
                      A short, human-readable title for the general error type;
                      the title should not change for given types.
                  detail:
                    type: string
                    description: A human-readable description of the specific error.
                  instance:
                    type: string
                    description: >-
                      This optional key may be present, with a unique URI for
                      the specific error; this will often point to an error log
                      for that specific response.
                  request_id:
                    type: string
                    description: Correlation ID for the original request.
                required:
                  - type
                  - status
                additionalProperties: false
              example:
                status: 500
                type: internal_server_error
        '503':
          description: >-
            Service Unavailable. The service handling for this request cannot be
            reached at this time.
          headers:
            upvest-request-id:
              required: true
              schema:
                type: string
                format: uuid
                example: 169ae4c7-ebd7-4041-94da-25369653eba7
          content:
            application/problem+json:
              schema:
                title: Error
                type: object
                description: ''
                properties:
                  type:
                    type: string
                    description: URL to a document describing the error condition.
                  status:
                    type: integer
                    description: >-
                      Transmission of the HTTP status code so that all
                      information can be found in one place, but also to correct
                      changes in the status code due to the use of proxy
                      servers.
                  title:
                    type: string
                    description: >-
                      A short, human-readable title for the general error type;
                      the title should not change for given types.
                  detail:
                    type: string
                    description: A human-readable description of the specific error.
                  instance:
                    type: string
                    description: >-
                      This optional key may be present, with a unique URI for
                      the specific error; this will often point to an error log
                      for that specific response.
                  request_id:
                    type: string
                    description: Correlation ID for the original request.
                required:
                  - type
                  - status
                additionalProperties: false
              example:
                status: 503
                type: method_not_allowed
        '504':
          description: >-
            Gateway Timeout. The service gateway has reached its internal
            timeout.
          headers:
            upvest-request-id:
              required: true
              schema:
                type: string
                format: uuid
                example: 169ae4c7-ebd7-4041-94da-25369653eba7
          content:
            application/problem+json:
              schema:
                title: Error
                type: object
                description: ''
                properties:
                  type:
                    type: string
                    description: URL to a document describing the error condition.
                  status:
                    type: integer
                    description: >-
                      Transmission of the HTTP status code so that all
                      information can be found in one place, but also to correct
                      changes in the status code due to the use of proxy
                      servers.
                  title:
                    type: string
                    description: >-
                      A short, human-readable title for the general error type;
                      the title should not change for given types.
                  detail:
                    type: string
                    description: A human-readable description of the specific error.
                  instance:
                    type: string
                    description: >-
                      This optional key may be present, with a unique URI for
                      the specific error; this will often point to an error log
                      for that specific response.
                  request_id:
                    type: string
                    description: Correlation ID for the original request.
                required:
                  - type
                  - status
                additionalProperties: false
              example:
                status: 504
                type: gateway_timeout
  /payments/mandates:
    parameters:
      - name: upvest-client-id
        in: header
        description: Tenant Client ID
        required: true
        schema:
          type: string
          format: uuid
          example: ebabcf4d-61c3-4942-875c-e265a7c2d062
      - name: authorization
        in: header
        description: |
          Bearer (access) token from the OAuth flow with correct scopes.
          https://datatracker.ietf.org/doc/html/rfc6750
        required: true
        schema:
          type: string
          pattern: ^Bearer [a-zA-Z0-9\-\._~+/]*=*
          example: Bearer c2VjcmV0Cg==
      - name: signature
        in: header
        required: true
        schema:
          type: string
        description: >-
          https://tools.ietf.org/id/draft-ietf-httpbis-message-signatures-01.html#name-the-signature-http-header
      - name: signature-input
        in: header
        required: true
        schema:
          type: string
        description: >-
          https://tools.ietf.org/id/draft-ietf-httpbis-message-signatures-01.html#name-the-signature-input-http-he
      - name: upvest-api-version
        in: header
        required: false
        schema:
          type: string
          enum:
            - '1'
          default: '1'
          example: '1'
        description: 'Upvest API version (Note: Do not include quotation marks)'
    post:
      operationId: create_mandate
      summary: Create a mandate
      description: Create a mandate
      tags:
        - Mandates
      security:
        - oauth-client-credentials:
            - mandates:admin
      parameters:
        - name: idempotency-key
          in: header
          required: true
          schema:
            type: string
            format: uuid
            pattern: >-
              ^[0-9a-fA-F]{8}-?[0-9a-fA-F]{4}-?[0-5][0-9a-fA-F]{3}-?[089abAB][0-9a-fA-F]{3}-?[0-9a-fA-F]{12}$
            example: ccb07f42-4104-44ad-8e1f-c660bb7b269c
          description: >
            A UUID to be used as an idempotency key.  This prevents a duplicate
            request from being replayed.

            https://docs.upvest.co/documentation/concepts/api_concepts/idempotency
      requestBody:
        content:
          application/json:
            schema:
              title: Mandate - Create - Request
              type: object
              properties:
                user_id:
                  title: User unique identifier.
                  type: string
                  description: User unique identifier.
                  format: uuid
                iban:
                  title: International Bank Account Number (IBAN)
                  type: string
                  description: >-
                    International Bank Account Number
                    [IBAN](https://en.wikipedia.org/wiki/International_Bank_Account_Number).
                  pattern: ^[A-Z]{2}[0-9]{2}[A-Z0-9]{11,26}$
                bic:
                  title: Business Identifier Code
                  type: string
                  description: >-
                    Business Identifier Code (also known as SWIFT-BIC, BIC,
                    SWIFT ID or SWIFT code) [ISO
                    9362](https://en.wikipedia.org/wiki/ISO_9362).
                  pattern: ^[A-Z]{6}[A-Z0-9]{2}([A-Z0-9]{3})?$
                confirmed_at:
                  type: string
                  format: date-time
                  description: Timestamp of when user validated the mandate
              required:
                - iban
                - bic
                - confirmed_at
              additionalProperties: false
            example:
              user_id: 83d83ec2-d2ca-49ff-bbea-b92b5c3be202
              iban: DE89000000000000000000
              bic: ABCDEXXX
              confirmed_at: '2021-12-08T08:38:48.021Z'
      responses:
        '200':
          description: Mandate
          headers:
            upvest-request-id:
              required: true
              schema:
                type: string
                format: uuid
                example: 169ae4c7-ebd7-4041-94da-25369653eba7
          content:
            application/json:
              schema:
                title: Direct Debit Mandate
                type: object
                properties:
                  id:
                    title: Direct Debit Mandate unique identifier.
                    type: string
                    description: Direct Debit Mandate unique identifier.
                    format: uuid
                  created_at:
                    type: string
                    format: date-time
                    description: >-
                      Date and time when the resource was created. [RFC
                      3339-5](https://datatracker.ietf.org/doc/html/rfc3339#section-5.6),
                      [ISO8601
                      UTC](https://www.iso.org/iso-8601-date-and-time-format.html)
                  user_id:
                    title: User unique identifier.
                    type: string
                    description: User unique identifier.
                    format: uuid
                  iban:
                    title: International Bank Account Number (IBAN)
                    type: string
                    description: >-
                      Obfuscated International Bank Account Number
                      [IBAN](https://en.wikipedia.org/wiki/International_Bank_Account_Number).
                    pattern: ^[A-Z]{2}[0-9]{2}[A-Z0-9]{2}\*{10}[A-Z0-9]{4}$
                  bic:
                    title: Business Identifier Code
                    type: string
                    description: >-
                      Business Identifier Code (also known as SWIFT-BIC, BIC,
                      SWIFT ID or SWIFT code) [ISO
                      9362](https://en.wikipedia.org/wiki/ISO_9362).
                    pattern: ^[A-Z]{6}[A-Z0-9]{2}([A-Z0-9]{3})?$
                  creditor_name:
                    type: string
                    maxLength: 100
                    description: Name of the creditor on the mandate.
                  creditor_id:
                    type: string
                    maxLength: 20
                    description: Banking identifier of the creditor.
                  creditor_address:
                    title: Address
                    type: object
                    description: Address. Must not be a P.O. box or c/o address.
                    properties:
                      address_line1:
                        type: string
                        description: First address line of the address.
                        maxLength: 100
                      address_line2:
                        type: string
                        description: Second address line of the address.
                        maxLength: 100
                      postcode:
                        title: Postal code
                        type: string
                        description: Postal code (postcode, PIN or ZIP code)
                        pattern: ^[a-zA-Z0-9][a-zA-Z0-9\s\-]{0,8}[a-zA-Z0-9]?$
                      country:
                        description: >-
                          Accepted country code. [ISO 3166-1 alpha-2
                          codes](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2).
                        type: string
                        enum:
                          - AD
                          - AE
                          - AF
                          - AG
                          - AI
                          - AL
                          - AM
                          - AO
                          - AQ
                          - AR
                          - AS
                          - AT
                          - AU
                          - AW
                          - AX
                          - AZ
                          - BA
                          - BB
                          - BD
                          - BE
                          - BF
                          - BG
                          - BH
                          - BI
                          - BJ
                          - BL
                          - BM
                          - BN
                          - BO
                          - BQ
                          - BR
                          - BS
                          - BT
                          - BV
                          - BW
                          - BY
                          - BZ
                          - CA
                          - CC
                          - CD
                          - CF
                          - CG
                          - CH
                          - CI
                          - CK
                          - CL
                          - CM
                          - CN
                          - CO
                          - CR
                          - CU
                          - CV
                          - CW
                          - CX
                          - CY
                          - CZ
                          - DE
                          - DJ
                          - DK
                          - DM
                          - DO
                          - DZ
                          - EC
                          - EE
                          - EG
                          - EH
                          - ER
                          - ES
                          - ET
                          - FI
                          - FJ
                          - FK
                          - FM
                          - FO
                          - FR
                          - GA
                          - GB
                          - GD
                          - GE
                          - GF
                          - GG
                          - GH
                          - GI
                          - GL
                          - GM
                          - GN
                          - GP
                          - GQ
                          - GR
                          - GS
                          - GT
                          - GU
                          - GW
                          - GY
                          - HK
                          - HM
                          - HN
                          - HR
                          - HT
                          - HU
                          - ID
                          - IE
                          - IL
                          - IM
                          - IN
                          - IO
                          - IQ
                          - IR
                          - IS
                          - IT
                          - JE
                          - JM
                          - JO
                          - JP
                          - KE
                          - KG
                          - KH
                          - KI
                          - KM
                          - KN
                          - KP
                          - KR
                          - KW
                          - KY
                          - KZ
                          - LA
                          - LB
                          - LC
                          - LI
                          - LK
                          - LR
                          - LS
                          - LT
                          - LU
                          - LV
                          - LY
                          - MA
                          - MC
                          - MD
                          - ME
                          - MF
                          - MG
                          - MH
                          - MK
                          - ML
                          - MM
                          - MN
                          - MO
                          - MP
                          - MQ
                          - MR
                          - MS
                          - MT
                          - MU
                          - MV
                          - MW
                          - MX
                          - MY
                          - MZ
                          - NA
                          - NC
                          - NE
                          - NF
                          - NG
                          - NI
                          - NL
                          - 'NO'
                          - NP
                          - NR
                          - NU
                          - NZ
                          - OM
                          - PA
                          - PE
                          - PF
                          - PG
                          - PH
                          - PK
                          - PL
                          - PM
                          - PN
                          - PR
                          - PS
                          - PT
                          - PW
                          - PY
                          - QA
                          - RE
                          - RO
                          - RS
                          - RU
                          - RW
                          - SA
                          - SB
                          - SC
                          - SD
                          - SE
                          - SG
                          - SH
                          - SI
                          - SJ
                          - SK
                          - SL
                          - SM
                          - SN
                          - SO
                          - SR
                          - SS
                          - ST
                          - SV
                          - SX
                          - SY
                          - SZ
                          - TC
                          - TD
                          - TF
                          - TG
                          - TH
                          - TJ
                          - TK
                          - TL
                          - TM
                          - TN
                          - TO
                          - TR
                          - TT
                          - TV
                          - TW
                          - TZ
                          - UA
                          - UG
                          - UM
                          - US
                          - UY
                          - UZ
                          - VA
                          - VC
                          - VE
                          - VG
                          - VI
                          - VN
                          - VU
                          - WF
                          - WS
                          - XK
                          - YE
                          - YT
                          - ZA
                          - ZM
                          - ZW
                      state:
                        description: >-
                          State, province, county. [ISO 3166 alpha-2
                          Codes](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2).
                        type: string
                        maxLength: 50
                      city:
                        title: City name
                        type: string
                        minLength: 1
                        maxLength: 85
                    required:
                      - address_line1
                      - postcode
                      - country
                      - city
                  type:
                    type: string
                    maxLength: 10
                    enum:
                      - RECURRENT
                    default: RECURRENT
                    description: |-
                      Type of mandate.
                      * RECURRENT - 
                  confirmed_at:
                    type: string
                    format: date-time
                    description: Timestamp of when user validated the mandate
                required:
                  - id
                  - created_at
                  - user_id
                  - iban
                  - bic
                  - creditor_name
                  - creditor_id
                  - creditor_address
                  - type
                  - confirmed_at
                additionalProperties: false
              example:
                id: 9c5a7dea-46f2-4502-b6b5-9902a53860e4
                created_at: '2020-08-24T14:15:22Z'
                user_id: 83d83ec2-d2ca-49ff-bbea-b92b5c3be202
                iban: DE8900**********0000
                bic: ABCDEXXX
                creditor_name: Creditor Company
                creditor_id: DE98ZZZ09999999999
                creditor_address:
                  address_line1: Strasse 1
                  address_line2: Company GmbH
                  postcode: '12345'
                  city: Berlin
                  state: BE
                  country: DE
                type: RECURRENT
                confirmed_at: '2021-12-08T08:38:48.021Z'
        '400':
          description: Bad Request. The incoming request had a malformed parameter/object.
          headers:
            upvest-request-id:
              required: true
              schema:
                type: string
                format: uuid
                example: 169ae4c7-ebd7-4041-94da-25369653eba7
          content:
            application/problem+json:
              schema:
                title: Error
                type: object
                description: ''
                properties:
                  type:
                    type: string
                    description: URL to a document describing the error condition.
                  status:
                    type: integer
                    description: >-
                      Transmission of the HTTP status code so that all
                      information can be found in one place, but also to correct
                      changes in the status code due to the use of proxy
                      servers.
                  title:
                    type: string
                    description: >-
                      A short, human-readable title for the general error type;
                      the title should not change for given types.
                  detail:
                    type: string
                    description: A human-readable description of the specific error.
                  instance:
                    type: string
                    description: >-
                      This optional key may be present, with a unique URI for
                      the specific error; this will often point to an error log
                      for that specific response.
                  request_id:
                    type: string
                    description: Correlation ID for the original request.
                required:
                  - type
                  - status
                additionalProperties: false
              example:
                status: 400
                type: bad_request
        '401':
          description: Unauthorized. The caller has not been authenticated.
          headers:
            upvest-request-id:
              required: true
              schema:
                type: string
                format: uuid
                example: 169ae4c7-ebd7-4041-94da-25369653eba7
          content:
            application/problem+json:
              schema:
                title: Error
                type: object
                description: ''
                properties:
                  type:
                    type: string
                    description: URL to a document describing the error condition.
                  status:
                    type: integer
                    description: >-
                      Transmission of the HTTP status code so that all
                      information can be found in one place, but also to correct
                      changes in the status code due to the use of proxy
                      servers.
                  title:
                    type: string
                    description: >-
                      A short, human-readable title for the general error type;
                      the title should not change for given types.
                  detail:
                    type: string
                    description: A human-readable description of the specific error.
                  instance:
                    type: string
                    description: >-
                      This optional key may be present, with a unique URI for
                      the specific error; this will often point to an error log
                      for that specific response.
                  request_id:
                    type: string
                    description: Correlation ID for the original request.
                required:
                  - type
                  - status
                additionalProperties: false
              example:
                status: 401
                type: unauthorized
        '403':
          description: >-
            Forbidden. The caller has been authenticated but is not allowed to
            take the requested action.
          headers:
            upvest-request-id:
              required: true
              schema:
                type: string
                format: uuid
                example: 169ae4c7-ebd7-4041-94da-25369653eba7
          content:
            application/problem+json:
              schema:
                title: Error
                type: object
                description: ''
                properties:
                  type:
                    type: string
                    description: URL to a document describing the error condition.
                  status:
                    type: integer
                    description: >-
                      Transmission of the HTTP status code so that all
                      information can be found in one place, but also to correct
                      changes in the status code due to the use of proxy
                      servers.
                  title:
                    type: string
                    description: >-
                      A short, human-readable title for the general error type;
                      the title should not change for given types.
                  detail:
                    type: string
                    description: A human-readable description of the specific error.
                  instance:
                    type: string
                    description: >-
                      This optional key may be present, with a unique URI for
                      the specific error; this will often point to an error log
                      for that specific response.
                  request_id:
                    type: string
                    description: Correlation ID for the original request.
                required:
                  - type
                  - status
                additionalProperties: false
              example:
                status: 403
                type: forbidden
        '404':
          description: Not Found. The requested resource could not be found.
          headers:
            upvest-request-id:
              required: true
              schema:
                type: string
                format: uuid
                example: 169ae4c7-ebd7-4041-94da-25369653eba7
          content:
            application/problem+json:
              schema:
                title: Error
                type: object
                description: ''
                properties:
                  type:
                    type: string
                    description: URL to a document describing the error condition.
                  status:
                    type: integer
                    description: >-
                      Transmission of the HTTP status code so that all
                      information can be found in one place, but also to correct
                      changes in the status code due to the use of proxy
                      servers.
                  title:
                    type: string
                    description: >-
                      A short, human-readable title for the general error type;
                      the title should not change for given types.
                  detail:
                    type: string
                    description: A human-readable description of the specific error.
                  instance:
                    type: string
                    description: >-
                      This optional key may be present, with a unique URI for
                      the specific error; this will often point to an error log
                      for that specific response.
                  request_id:
                    type: string
                    description: Correlation ID for the original request.
                required:
                  - type
                  - status
                additionalProperties: false
              example:
                status: 404
                type: not_found
        '406':
          description: >-
            Not Acceptable. The resource does not have a current representation
            that would be acceptable to the user agent. "Accept" header defined
            unsupported value.
          headers:
            upvest-request-id:
              required: true
              schema:
                type: string
                format: uuid
                example: 169ae4c7-ebd7-4041-94da-25369653eba7
          content:
            application/problem+json:
              schema:
                title: Error
                type: object
                description: ''
                properties:
                  type:
                    type: string
                    description: URL to a document describing the error condition.
                  status:
                    type: integer
                    description: >-
                      Transmission of the HTTP status code so that all
                      information can be found in one place, but also to correct
                      changes in the status code due to the use of proxy
                      servers.
                  title:
                    type: string
                    description: >-
                      A short, human-readable title for the general error type;
                      the title should not change for given types.
                  detail:
                    type: string
                    description: A human-readable description of the specific error.
                  instance:
                    type: string
                    description: >-
                      This optional key may be present, with a unique URI for
                      the specific error; this will often point to an error log
                      for that specific response.
                  request_id:
                    type: string
                    description: Correlation ID for the original request.
                required:
                  - type
                  - status
                additionalProperties: false
              example:
                status: 406
                type: not_acceptable
        '429':
          description: >-
            Too Many Requests. The caller has exceeded their quota for the time
            period and has been throttled.
          headers:
            upvest-request-id:
              required: true
              schema:
                type: string
                format: uuid
                example: 169ae4c7-ebd7-4041-94da-25369653eba7
          content:
            application/problem+json:
              schema:
                title: Error
                type: object
                description: ''
                properties:
                  type:
                    type: string
                    description: URL to a document describing the error condition.
                  status:
                    type: integer
                    description: >-
                      Transmission of the HTTP status code so that all
                      information can be found in one place, but also to correct
                      changes in the status code due to the use of proxy
                      servers.
                  title:
                    type: string
                    description: >-
                      A short, human-readable title for the general error type;
                      the title should not change for given types.
                  detail:
                    type: string
                    description: A human-readable description of the specific error.
                  instance:
                    type: string
                    description: >-
                      This optional key may be present, with a unique URI for
                      the specific error; this will often point to an error log
                      for that specific response.
                  request_id:
                    type: string
                    description: Correlation ID for the original request.
                required:
                  - type
                  - status
                additionalProperties: false
              example:
                status: 429
                type: too_many_requests
        '500':
          description: Internal Server Error. The service encountered an unexpected error.
          headers:
            upvest-request-id:
              required: true
              schema:
                type: string
                format: uuid
                example: 169ae4c7-ebd7-4041-94da-25369653eba7
          content:
            application/problem+json:
              schema:
                title: Error
                type: object
                description: ''
                properties:
                  type:
                    type: string
                    description: URL to a document describing the error condition.
                  status:
                    type: integer
                    description: >-
                      Transmission of the HTTP status code so that all
                      information can be found in one place, but also to correct
                      changes in the status code due to the use of proxy
                      servers.
                  title:
                    type: string
                    description: >-
                      A short, human-readable title for the general error type;
                      the title should not change for given types.
                  detail:
                    type: string
                    description: A human-readable description of the specific error.
                  instance:
                    type: string
                    description: >-
                      This optional key may be present, with a unique URI for
                      the specific error; this will often point to an error log
                      for that specific response.
                  request_id:
                    type: string
                    description: Correlation ID for the original request.
                required:
                  - type
                  - status
                additionalProperties: false
              example:
                status: 500
                type: internal_server_error
        '503':
          description: >-
            Service Unavailable. The service handling for this request cannot be
            reached at this time.
          headers:
            upvest-request-id:
              required: true
              schema:
                type: string
                format: uuid
                example: 169ae4c7-ebd7-4041-94da-25369653eba7
          content:
            application/problem+json:
              schema:
                title: Error
                type: object
                description: ''
                properties:
                  type:
                    type: string
                    description: URL to a document describing the error condition.
                  status:
                    type: integer
                    description: >-
                      Transmission of the HTTP status code so that all
                      information can be found in one place, but also to correct
                      changes in the status code due to the use of proxy
                      servers.
                  title:
                    type: string
                    description: >-
                      A short, human-readable title for the general error type;
                      the title should not change for given types.
                  detail:
                    type: string
                    description: A human-readable description of the specific error.
                  instance:
                    type: string
                    description: >-
                      This optional key may be present, with a unique URI for
                      the specific error; this will often point to an error log
                      for that specific response.
                  request_id:
                    type: string
                    description: Correlation ID for the original request.
                required:
                  - type
                  - status
                additionalProperties: false
              example:
                status: 503
                type: method_not_allowed
        '504':
          description: >-
            Gateway Timeout. The service gateway has reached its internal
            timeout.
          headers:
            upvest-request-id:
              required: true
              schema:
                type: string
                format: uuid
                example: 169ae4c7-ebd7-4041-94da-25369653eba7
          content:
            application/problem+json:
              schema:
                title: Error
                type: object
                description: ''
                properties:
                  type:
                    type: string
                    description: URL to a document describing the error condition.
                  status:
                    type: integer
                    description: >-
                      Transmission of the HTTP status code so that all
                      information can be found in one place, but also to correct
                      changes in the status code due to the use of proxy
                      servers.
                  title:
                    type: string
                    description: >-
                      A short, human-readable title for the general error type;
                      the title should not change for given types.
                  detail:
                    type: string
                    description: A human-readable description of the specific error.
                  instance:
                    type: string
                    description: >-
                      This optional key may be present, with a unique URI for
                      the specific error; this will often point to an error log
                      for that specific response.
                  request_id:
                    type: string
                    description: Correlation ID for the original request.
                required:
                  - type
                  - status
                additionalProperties: false
              example:
                status: 504
                type: gateway_timeout
  /payments/mandates/{mandate_id}:
    parameters:
      - name: mandate_id
        in: path
        required: true
        schema:
          title: Direct Debit Mandate unique identifier.
          type: string
          description: Direct Debit Mandate unique identifier.
          format: uuid
      - name: upvest-client-id
        in: header
        description: Tenant Client ID
        required: true
        schema:
          type: string
          format: uuid
          example: ebabcf4d-61c3-4942-875c-e265a7c2d062
      - name: authorization
        in: header
        description: |
          Bearer (access) token from the OAuth flow with correct scopes.
          https://datatracker.ietf.org/doc/html/rfc6750
        required: true
        schema:
          type: string
          pattern: ^Bearer [a-zA-Z0-9\-\._~+/]*=*
          example: Bearer c2VjcmV0Cg==
      - name: signature
        in: header
        required: true
        schema:
          type: string
        description: >-
          https://tools.ietf.org/id/draft-ietf-httpbis-message-signatures-01.html#name-the-signature-http-header
      - name: signature-input
        in: header
        required: true
        schema:
          type: string
        description: >-
          https://tools.ietf.org/id/draft-ietf-httpbis-message-signatures-01.html#name-the-signature-input-http-he
      - name: upvest-api-version
        in: header
        required: false
        schema:
          type: string
          enum:
            - '1'
          default: '1'
          example: '1'
        description: 'Upvest API version (Note: Do not include quotation marks)'
    get:
      operationId: retrieve_mandate
      summary: Retrieve a direct debit mandate
      description: Retrieve a direct debit mandate
      tags:
        - Mandates
      security:
        - oauth-client-credentials:
            - mandates:admin
            - mandates:read
      responses:
        '200':
          description: Mandate
          headers:
            upvest-request-id:
              required: true
              schema:
                type: string
                format: uuid
                example: 169ae4c7-ebd7-4041-94da-25369653eba7
          content:
            application/json:
              schema:
                title: Direct Debit Mandate
                type: object
                properties:
                  id:
                    title: Direct Debit Mandate unique identifier.
                    type: string
                    description: Direct Debit Mandate unique identifier.
                    format: uuid
                  created_at:
                    type: string
                    format: date-time
                    description: >-
                      Date and time when the resource was created. [RFC
                      3339-5](https://datatracker.ietf.org/doc/html/rfc3339#section-5.6),
                      [ISO8601
                      UTC](https://www.iso.org/iso-8601-date-and-time-format.html)
                  user_id:
                    title: User unique identifier.
                    type: string
                    description: User unique identifier.
                    format: uuid
                  iban:
                    title: International Bank Account Number (IBAN)
                    type: string
                    description: >-
                      Obfuscated International Bank Account Number
                      [IBAN](https://en.wikipedia.org/wiki/International_Bank_Account_Number).
                    pattern: ^[A-Z]{2}[0-9]{2}[A-Z0-9]{2}\*{10}[A-Z0-9]{4}$
                  bic:
                    title: Business Identifier Code
                    type: string
                    description: >-
                      Business Identifier Code (also known as SWIFT-BIC, BIC,
                      SWIFT ID or SWIFT code) [ISO
                      9362](https://en.wikipedia.org/wiki/ISO_9362).
                    pattern: ^[A-Z]{6}[A-Z0-9]{2}([A-Z0-9]{3})?$
                  creditor_name:
                    type: string
                    maxLength: 100
                    description: Name of the creditor on the mandate.
                  creditor_id:
                    type: string
                    maxLength: 20
                    description: Banking identifier of the creditor.
                  creditor_address:
                    title: Address
                    type: object
                    description: Address. Must not be a P.O. box or c/o address.
                    properties:
                      address_line1:
                        type: string
                        description: First address line of the address.
                        maxLength: 100
                      address_line2:
                        type: string
                        description: Second address line of the address.
                        maxLength: 100
                      postcode:
                        title: Postal code
                        type: string
                        description: Postal code (postcode, PIN or ZIP code)
                        pattern: ^[a-zA-Z0-9][a-zA-Z0-9\s\-]{0,8}[a-zA-Z0-9]?$
                      country:
                        description: >-
                          Accepted country code. [ISO 3166-1 alpha-2
                          codes](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2).
                        type: string
                        enum:
                          - AD
                          - AE
                          - AF
                          - AG
                          - AI
                          - AL
                          - AM
                          - AO
                          - AQ
                          - AR
                          - AS
                          - AT
                          - AU
                          - AW
                          - AX
                          - AZ
                          - BA
                          - BB
                          - BD
                          - BE
                          - BF
                          - BG
                          - BH
                          - BI
                          - BJ
                          - BL
                          - BM
                          - BN
                          - BO
                          - BQ
                          - BR
                          - BS
                          - BT
                          - BV
                          - BW
                          - BY
                          - BZ
                          - CA
                          - CC
                          - CD
                          - CF
                          - CG
                          - CH
                          - CI
                          - CK
                          - CL
                          - CM
                          - CN
                          - CO
                          - CR
                          - CU
                          - CV
                          - CW
                          - CX
                          - CY
                          - CZ
                          - DE
                          - DJ
                          - DK
                          - DM
                          - DO
                          - DZ
                          - EC
                          - EE
                          - EG
                          - EH
                          - ER
                          - ES
                          - ET
                          - FI
                          - FJ
                          - FK
                          - FM
                          - FO
                          - FR
                          - GA
                          - GB
                          - GD
                          - GE
                          - GF
                          - GG
                          - GH
                          - GI
                          - GL
                          - GM
                          - GN
                          - GP
                          - GQ
                          - GR
                          - GS
                          - GT
                          - GU
                          - GW
                          - GY
                          - HK
                          - HM
                          - HN
                          - HR
                          - HT
                          - HU
                          - ID
                          - IE
                          - IL
                          - IM
                          - IN
                          - IO
                          - IQ
                          - IR
                          - IS
                          - IT
                          - JE
                          - JM
                          - JO
                          - JP
                          - KE
                          - KG
                          - KH
                          - KI
                          - KM
                          - KN
                          - KP
                          - KR
                          - KW
                          - KY
                          - KZ
                          - LA
                          - LB
                          - LC
                          - LI
                          - LK
                          - LR
                          - LS
                          - LT
                          - LU
                          - LV
                          - LY
                          - MA
                          - MC
                          - MD
                          - ME
                          - MF
                          - MG
                          - MH
                          - MK
                          - ML
                          - MM
                          - MN
                          - MO
                          - MP
                          - MQ
                          - MR
                          - MS
                          - MT
                          - MU
                          - MV
                          - MW
                          - MX
                          - MY
                          - MZ
                          - NA
                          - NC
                          - NE
                          - NF
                          - NG
                          - NI
                          - NL
                          - 'NO'
                          - NP
                          - NR
                          - NU
                          - NZ
                          - OM
                          - PA
                          - PE
                          - PF
                          - PG
                          - PH
                          - PK
                          - PL
                          - PM
                          - PN
                          - PR
                          - PS
                          - PT
                          - PW
                          - PY
                          - QA
                          - RE
                          - RO
                          - RS
                          - RU
                          - RW
                          - SA
                          - SB
                          - SC
                          - SD
                          - SE
                          - SG
                          - SH
                          - SI
                          - SJ
                          - SK
                          - SL
                          - SM
                          - SN
                          - SO
                          - SR
                          - SS
                          - ST
                          - SV
                          - SX
                          - SY
                          - SZ
                          - TC
                          - TD
                          - TF
                          - TG
                          - TH
                          - TJ
                          - TK
                          - TL
                          - TM
                          - TN
                          - TO
                          - TR
                          - TT
                          - TV
                          - TW
                          - TZ
                          - UA
                          - UG
                          - UM
                          - US
                          - UY
                          - UZ
                          - VA
                          - VC
                          - VE
                          - VG
                          - VI
                          - VN
                          - VU
                          - WF
                          - WS
                          - XK
                          - YE
                          - YT
                          - ZA
                          - ZM
                          - ZW
                      state:
                        description: >-
                          State, province, county. [ISO 3166 alpha-2
                          Codes](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2).
                        type: string
                        maxLength: 50
                      city:
                        title: City name
                        type: string
                        minLength: 1
                        maxLength: 85
                    required:
                      - address_line1
                      - postcode
                      - country
                      - city
                  type:
                    type: string
                    maxLength: 10
                    enum:
                      - RECURRENT
                    default: RECURRENT
                    description: |-
                      Type of mandate.
                      * RECURRENT - 
                  confirmed_at:
                    type: string
                    format: date-time
                    description: Timestamp of when user validated the mandate
                required:
                  - id
                  - created_at
                  - user_id
                  - iban
                  - bic
                  - creditor_name
                  - creditor_id
                  - creditor_address
                  - type
                  - confirmed_at
                additionalProperties: false
              example:
                id: 9c5a7dea-46f2-4502-b6b5-9902a53860e4
                created_at: '2020-08-24T14:15:22Z'
                user_id: 83d83ec2-d2ca-49ff-bbea-b92b5c3be202
                iban: DE8900**********0000
                bic: ABCDEXXX
                creditor_name: Creditor Company
                creditor_id: DE98ZZZ09999999999
                creditor_address:
                  address_line1: Strasse 1
                  address_line2: Company GmbH
                  postcode: '12345'
                  city: Berlin
                  state: BE
                  country: DE
                type: RECURRENT
                confirmed_at: '2021-12-08T08:38:48.021Z'
        '401':
          description: Unauthorized. The caller has not been authenticated.
          headers:
            upvest-request-id:
              required: true
              schema:
                type: string
                format: uuid
                example: 169ae4c7-ebd7-4041-94da-25369653eba7
          content:
            application/problem+json:
              schema:
                title: Error
                type: object
                description: ''
                properties:
                  type:
                    type: string
                    description: URL to a document describing the error condition.
                  status:
                    type: integer
                    description: >-
                      Transmission of the HTTP status code so that all
                      information can be found in one place, but also to correct
                      changes in the status code due to the use of proxy
                      servers.
                  title:
                    type: string
                    description: >-
                      A short, human-readable title for the general error type;
                      the title should not change for given types.
                  detail:
                    type: string
                    description: A human-readable description of the specific error.
                  instance:
                    type: string
                    description: >-
                      This optional key may be present, with a unique URI for
                      the specific error; this will often point to an error log
                      for that specific response.
                  request_id:
                    type: string
                    description: Correlation ID for the original request.
                required:
                  - type
                  - status
                additionalProperties: false
              example:
                status: 401
                type: unauthorized
        '403':
          description: >-
            Forbidden. The caller has been authenticated but is not allowed to
            take the requested action.
          headers:
            upvest-request-id:
              required: true
              schema:
                type: string
                format: uuid
                example: 169ae4c7-ebd7-4041-94da-25369653eba7
          content:
            application/problem+json:
              schema:
                title: Error
                type: object
                description: ''
                properties:
                  type:
                    type: string
                    description: URL to a document describing the error condition.
                  status:
                    type: integer
                    description: >-
                      Transmission of the HTTP status code so that all
                      information can be found in one place, but also to correct
                      changes in the status code due to the use of proxy
                      servers.
                  title:
                    type: string
                    description: >-
                      A short, human-readable title for the general error type;
                      the title should not change for given types.
                  detail:
                    type: string
                    description: A human-readable description of the specific error.
                  instance:
                    type: string
                    description: >-
                      This optional key may be present, with a unique URI for
                      the specific error; this will often point to an error log
                      for that specific response.
                  request_id:
                    type: string
                    description: Correlation ID for the original request.
                required:
                  - type
                  - status
                additionalProperties: false
              example:
                status: 403
                type: forbidden
        '404':
          description: Not Found. The requested resource could not be found.
          headers:
            upvest-request-id:
              required: true
              schema:
                type: string
                format: uuid
                example: 169ae4c7-ebd7-4041-94da-25369653eba7
          content:
            application/problem+json:
              schema:
                title: Error
                type: object
                description: ''
                properties:
                  type:
                    type: string
                    description: URL to a document describing the error condition.
                  status:
                    type: integer
                    description: >-
                      Transmission of the HTTP status code so that all
                      information can be found in one place, but also to correct
                      changes in the status code due to the use of proxy
                      servers.
                  title:
                    type: string
                    description: >-
                      A short, human-readable title for the general error type;
                      the title should not change for given types.
                  detail:
                    type: string
                    description: A human-readable description of the specific error.
                  instance:
                    type: string
                    description: >-
                      This optional key may be present, with a unique URI for
                      the specific error; this will often point to an error log
                      for that specific response.
                  request_id:
                    type: string
                    description: Correlation ID for the original request.
                required:
                  - type
                  - status
                additionalProperties: false
              example:
                status: 404
                type: not_found
        '406':
          description: >-
            Not Acceptable. The resource does not have a current representation
            that would be acceptable to the user agent. "Accept" header defined
            unsupported value.
          headers:
            upvest-request-id:
              required: true
              schema:
                type: string
                format: uuid
                example: 169ae4c7-ebd7-4041-94da-25369653eba7
          content:
            application/problem+json:
              schema:
                title: Error
                type: object
                description: ''
                properties:
                  type:
                    type: string
                    description: URL to a document describing the error condition.
                  status:
                    type: integer
                    description: >-
                      Transmission of the HTTP status code so that all
                      information can be found in one place, but also to correct
                      changes in the status code due to the use of proxy
                      servers.
                  title:
                    type: string
                    description: >-
                      A short, human-readable title for the general error type;
                      the title should not change for given types.
                  detail:
                    type: string
                    description: A human-readable description of the specific error.
                  instance:
                    type: string
                    description: >-
                      This optional key may be present, with a unique URI for
                      the specific error; this will often point to an error log
                      for that specific response.
                  request_id:
                    type: string
                    description: Correlation ID for the original request.
                required:
                  - type
                  - status
                additionalProperties: false
              example:
                status: 406
                type: not_acceptable
        '429':
          description: >-
            Too Many Requests. The caller has exceeded their quota for the time
            period and has been throttled.
          headers:
            upvest-request-id:
              required: true
              schema:
                type: string
                format: uuid
                example: 169ae4c7-ebd7-4041-94da-25369653eba7
          content:
            application/problem+json:
              schema:
                title: Error
                type: object
                description: ''
                properties:
                  type:
                    type: string
                    description: URL to a document describing the error condition.
                  status:
                    type: integer
                    description: >-
                      Transmission of the HTTP status code so that all
                      information can be found in one place, but also to correct
                      changes in the status code due to the use of proxy
                      servers.
                  title:
                    type: string
                    description: >-
                      A short, human-readable title for the general error type;
                      the title should not change for given types.
                  detail:
                    type: string
                    description: A human-readable description of the specific error.
                  instance:
                    type: string
                    description: >-
                      This optional key may be present, with a unique URI for
                      the specific error; this will often point to an error log
                      for that specific response.
                  request_id:
                    type: string
                    description: Correlation ID for the original request.
                required:
                  - type
                  - status
                additionalProperties: false
              example:
                status: 429
                type: too_many_requests
        '500':
          description: Internal Server Error. The service encountered an unexpected error.
          headers:
            upvest-request-id:
              required: true
              schema:
                type: string
                format: uuid
                example: 169ae4c7-ebd7-4041-94da-25369653eba7
          content:
            application/problem+json:
              schema:
                title: Error
                type: object
                description: ''
                properties:
                  type:
                    type: string
                    description: URL to a document describing the error condition.
                  status:
                    type: integer
                    description: >-
                      Transmission of the HTTP status code so that all
                      information can be found in one place, but also to correct
                      changes in the status code due to the use of proxy
                      servers.
                  title:
                    type: string
                    description: >-
                      A short, human-readable title for the general error type;
                      the title should not change for given types.
                  detail:
                    type: string
                    description: A human-readable description of the specific error.
                  instance:
                    type: string
                    description: >-
                      This optional key may be present, with a unique URI for
                      the specific error; this will often point to an error log
                      for that specific response.
                  request_id:
                    type: string
                    description: Correlation ID for the original request.
                required:
                  - type
                  - status
                additionalProperties: false
              example:
                status: 500
                type: internal_server_error
        '503':
          description: >-
            Service Unavailable. The service handling for this request cannot be
            reached at this time.
          headers:
            upvest-request-id:
              required: true
              schema:
                type: string
                format: uuid
                example: 169ae4c7-ebd7-4041-94da-25369653eba7
          content:
            application/problem+json:
              schema:
                title: Error
                type: object
                description: ''
                properties:
                  type:
                    type: string
                    description: URL to a document describing the error condition.
                  status:
                    type: integer
                    description: >-
                      Transmission of the HTTP status code so that all
                      information can be found in one place, but also to correct
                      changes in the status code due to the use of proxy
                      servers.
                  title:
                    type: string
                    description: >-
                      A short, human-readable title for the general error type;
                      the title should not change for given types.
                  detail:
                    type: string
                    description: A human-readable description of the specific error.
                  instance:
                    type: string
                    description: >-
                      This optional key may be present, with a unique URI for
                      the specific error; this will often point to an error log
                      for that specific response.
                  request_id:
                    type: string
                    description: Correlation ID for the original request.
                required:
                  - type
                  - status
                additionalProperties: false
              example:
                status: 503
                type: method_not_allowed
        '504':
          description: >-
            Gateway Timeout. The service gateway has reached its internal
            timeout.
          headers:
            upvest-request-id:
              required: true
              schema:
                type: string
                format: uuid
                example: 169ae4c7-ebd7-4041-94da-25369653eba7
          content:
            application/problem+json:
              schema:
                title: Error
                type: object
                description: ''
                properties:
                  type:
                    type: string
                    description: URL to a document describing the error condition.
                  status:
                    type: integer
                    description: >-
                      Transmission of the HTTP status code so that all
                      information can be found in one place, but also to correct
                      changes in the status code due to the use of proxy
                      servers.
                  title:
                    type: string
                    description: >-
                      A short, human-readable title for the general error type;
                      the title should not change for given types.
                  detail:
                    type: string
                    description: A human-readable description of the specific error.
                  instance:
                    type: string
                    description: >-
                      This optional key may be present, with a unique URI for
                      the specific error; this will often point to an error log
                      for that specific response.
                  request_id:
                    type: string
                    description: Correlation ID for the original request.
                required:
                  - type
                  - status
                additionalProperties: false
              example:
                status: 504
                type: gateway_timeout
    delete:
      operationId: delete_mandate
      summary: Delete mandate
      description: Delete mandate
      tags:
        - Mandates
      security:
        - oauth-client-credentials:
            - mandates:admin
      responses:
        '204':
          description: Request has been processed successfully.
          headers:
            upvest-request-id:
              required: true
              schema:
                type: string
                format: uuid
                example: 169ae4c7-ebd7-4041-94da-25369653eba7
        '401':
          description: Unauthorized. The caller has not been authenticated.
          headers:
            upvest-request-id:
              required: true
              schema:
                type: string
                format: uuid
                example: 169ae4c7-ebd7-4041-94da-25369653eba7
          content:
            application/problem+json:
              schema:
                title: Error
                type: object
                description: ''
                properties:
                  type:
                    type: string
                    description: URL to a document describing the error condition.
                  status:
                    type: integer
                    description: >-
                      Transmission of the HTTP status code so that all
                      information can be found in one place, but also to correct
                      changes in the status code due to the use of proxy
                      servers.
                  title:
                    type: string
                    description: >-
                      A short, human-readable title for the general error type;
                      the title should not change for given types.
                  detail:
                    type: string
                    description: A human-readable description of the specific error.
                  instance:
                    type: string
                    description: >-
                      This optional key may be present, with a unique URI for
                      the specific error; this will often point to an error log
                      for that specific response.
                  request_id:
                    type: string
                    description: Correlation ID for the original request.
                required:
                  - type
                  - status
                additionalProperties: false
              example:
                status: 401
                type: unauthorized
        '403':
          description: >-
            Forbidden. The caller has been authenticated but is not allowed to
            take the requested action.
          headers:
            upvest-request-id:
              required: true
              schema:
                type: string
                format: uuid
                example: 169ae4c7-ebd7-4041-94da-25369653eba7
          content:
            application/problem+json:
              schema:
                title: Error
                type: object
                description: ''
                properties:
                  type:
                    type: string
                    description: URL to a document describing the error condition.
                  status:
                    type: integer
                    description: >-
                      Transmission of the HTTP status code so that all
                      information can be found in one place, but also to correct
                      changes in the status code due to the use of proxy
                      servers.
                  title:
                    type: string
                    description: >-
                      A short, human-readable title for the general error type;
                      the title should not change for given types.
                  detail:
                    type: string
                    description: A human-readable description of the specific error.
                  instance:
                    type: string
                    description: >-
                      This optional key may be present, with a unique URI for
                      the specific error; this will often point to an error log
                      for that specific response.
                  request_id:
                    type: string
                    description: Correlation ID for the original request.
                required:
                  - type
                  - status
                additionalProperties: false
              example:
                status: 403
                type: forbidden
        '404':
          description: Not Found. The requested resource could not be found.
          headers:
            upvest-request-id:
              required: true
              schema:
                type: string
                format: uuid
                example: 169ae4c7-ebd7-4041-94da-25369653eba7
          content:
            application/problem+json:
              schema:
                title: Error
                type: object
                description: ''
                properties:
                  type:
                    type: string
                    description: URL to a document describing the error condition.
                  status:
                    type: integer
                    description: >-
                      Transmission of the HTTP status code so that all
                      information can be found in one place, but also to correct
                      changes in the status code due to the use of proxy
                      servers.
                  title:
                    type: string
                    description: >-
                      A short, human-readable title for the general error type;
                      the title should not change for given types.
                  detail:
                    type: string
                    description: A human-readable description of the specific error.
                  instance:
                    type: string
                    description: >-
                      This optional key may be present, with a unique URI for
                      the specific error; this will often point to an error log
                      for that specific response.
                  request_id:
                    type: string
                    description: Correlation ID for the original request.
                required:
                  - type
                  - status
                additionalProperties: false
              example:
                status: 404
                type: not_found
        '429':
          description: >-
            Too Many Requests. The caller has exceeded their quota for the time
            period and has been throttled.
          headers:
            upvest-request-id:
              required: true
              schema:
                type: string
                format: uuid
                example: 169ae4c7-ebd7-4041-94da-25369653eba7
          content:
            application/problem+json:
              schema:
                title: Error
                type: object
                description: ''
                properties:
                  type:
                    type: string
                    description: URL to a document describing the error condition.
                  status:
                    type: integer
                    description: >-
                      Transmission of the HTTP status code so that all
                      information can be found in one place, but also to correct
                      changes in the status code due to the use of proxy
                      servers.
                  title:
                    type: string
                    description: >-
                      A short, human-readable title for the general error type;
                      the title should not change for given types.
                  detail:
                    type: string
                    description: A human-readable description of the specific error.
                  instance:
                    type: string
                    description: >-
                      This optional key may be present, with a unique URI for
                      the specific error; this will often point to an error log
                      for that specific response.
                  request_id:
                    type: string
                    description: Correlation ID for the original request.
                required:
                  - type
                  - status
                additionalProperties: false
              example:
                status: 429
                type: too_many_requests
        '500':
          description: Internal Server Error. The service encountered an unexpected error.
          headers:
            upvest-request-id:
              required: true
              schema:
                type: string
                format: uuid
                example: 169ae4c7-ebd7-4041-94da-25369653eba7
          content:
            application/problem+json:
              schema:
                title: Error
                type: object
                description: ''
                properties:
                  type:
                    type: string
                    description: URL to a document describing the error condition.
                  status:
                    type: integer
                    description: >-
                      Transmission of the HTTP status code so that all
                      information can be found in one place, but also to correct
                      changes in the status code due to the use of proxy
                      servers.
                  title:
                    type: string
                    description: >-
                      A short, human-readable title for the general error type;
                      the title should not change for given types.
                  detail:
                    type: string
                    description: A human-readable description of the specific error.
                  instance:
                    type: string
                    description: >-
                      This optional key may be present, with a unique URI for
                      the specific error; this will often point to an error log
                      for that specific response.
                  request_id:
                    type: string
                    description: Correlation ID for the original request.
                required:
                  - type
                  - status
                additionalProperties: false
              example:
                status: 500
                type: internal_server_error
        '503':
          description: >-
            Service Unavailable. The service handling for this request cannot be
            reached at this time.
          headers:
            upvest-request-id:
              required: true
              schema:
                type: string
                format: uuid
                example: 169ae4c7-ebd7-4041-94da-25369653eba7
          content:
            application/problem+json:
              schema:
                title: Error
                type: object
                description: ''
                properties:
                  type:
                    type: string
                    description: URL to a document describing the error condition.
                  status:
                    type: integer
                    description: >-
                      Transmission of the HTTP status code so that all
                      information can be found in one place, but also to correct
                      changes in the status code due to the use of proxy
                      servers.
                  title:
                    type: string
                    description: >-
                      A short, human-readable title for the general error type;
                      the title should not change for given types.
                  detail:
                    type: string
                    description: A human-readable description of the specific error.
                  instance:
                    type: string
                    description: >-
                      This optional key may be present, with a unique URI for
                      the specific error; this will often point to an error log
                      for that specific response.
                  request_id:
                    type: string
                    description: Correlation ID for the original request.
                required:
                  - type
                  - status
                additionalProperties: false
              example:
                status: 503
                type: method_not_allowed
        '504':
          description: >-
            Gateway Timeout. The service gateway has reached its internal
            timeout.
          headers:
            upvest-request-id:
              required: true
              schema:
                type: string
                format: uuid
                example: 169ae4c7-ebd7-4041-94da-25369653eba7
          content:
            application/problem+json:
              schema:
                title: Error
                type: object
                description: ''
                properties:
                  type:
                    type: string
                    description: URL to a document describing the error condition.
                  status:
                    type: integer
                    description: >-
                      Transmission of the HTTP status code so that all
                      information can be found in one place, but also to correct
                      changes in the status code due to the use of proxy
                      servers.
                  title:
                    type: string
                    description: >-
                      A short, human-readable title for the general error type;
                      the title should not change for given types.
                  detail:
                    type: string
                    description: A human-readable description of the specific error.
                  instance:
                    type: string
                    description: >-
                      This optional key may be present, with a unique URI for
                      the specific error; this will often point to an error log
                      for that specific response.
                  request_id:
                    type: string
                    description: Correlation ID for the original request.
                required:
                  - type
                  - status
                additionalProperties: false
              example:
                status: 504
                type: gateway_timeout
  /account_groups/{account_group_id}/payments/direct_debits:
    parameters:
      - name: account_group_id
        in: path
        required: true
        schema:
          title: Account group unique identifier.
          type: string
          description: Account group unique identifier.
          format: uuid
      - name: upvest-client-id
        in: header
        description: Tenant Client ID
        required: true
        schema:
          type: string
          format: uuid
          example: ebabcf4d-61c3-4942-875c-e265a7c2d062
      - name: authorization
        in: header
        description: |
          Bearer (access) token from the OAuth flow with correct scopes.
          https://datatracker.ietf.org/doc/html/rfc6750
        required: true
        schema:
          type: string
          pattern: ^Bearer [a-zA-Z0-9\-\._~+/]*=*
          example: Bearer c2VjcmV0Cg==
      - name: signature
        in: header
        required: true
        schema:
          type: string
        description: >-
          https://tools.ietf.org/id/draft-ietf-httpbis-message-signatures-01.html#name-the-signature-http-header
      - name: signature-input
        in: header
        required: true
        schema:
          type: string
        description: >-
          https://tools.ietf.org/id/draft-ietf-httpbis-message-signatures-01.html#name-the-signature-input-http-he
      - name: upvest-api-version
        in: header
        required: false
        schema:
          type: string
          enum:
            - '1'
          default: '1'
          example: '1'
        description: 'Upvest API version (Note: Do not include quotation marks)'
    get:
      operationId: list_direct_debits
      summary: List direct debits
      description: List direct debits
      tags:
        - Direct Debits
      security:
        - oauth-client-credentials:
            - payments:admin
            - payments:read
      parameters:
        - name: sort
          in: query
          required: false
          schema:
            type: string
            enum:
              - id
              - created_at
            default: created_at
          description: Field of resource to sort by
          example: id
        - name: order
          in: query
          required: false
          schema:
            type: string
            enum:
              - ASC
              - DESC
            default: ASC
          description: >-
            Sort order of the result list if the `sort` parameter is specified.
            Use `ASC` for ascending or `DESC` for descending sort order.
        - name: limit
          in: query
          schema:
            type: integer
            format: int32
            default: 100
            minimum: 0
            maximum: 1000
          allowEmptyValue: true
          description: >-
            Use the `limit` argument to specify the maximum number of items
            returned.
        - name: offset
          in: query
          schema:
            type: integer
            minimum: 0
            format: int32
          allowEmptyValue: true
          description: >-
            Use the `offset` argument to specify where in the list of results to
            start when returning items for a particular query.
      responses:
        '200':
          description: Direct debits list
          headers:
            upvest-request-id:
              required: true
              schema:
                type: string
                format: uuid
                example: 169ae4c7-ebd7-4041-94da-25369653eba7
          content:
            application/json:
              schema:
                title: Payments - Direct Debits List - Response
                type: object
                properties:
                  meta:
                    type: object
                    properties:
                      offset:
                        type: integer
                        description: Amount of resource to offset in the response.
                      limit:
                        type: integer
                        description: Total limit of the response.
                      count:
                        type: integer
                        description: Count of the resources returned in the response.
                      total_count:
                        type: integer
                        description: Total count of all the resources.
                      sort:
                        type: string
                        description: The field that the list is sorted by.
                      order:
                        type: string
                        description: |-
                          The ordering of the response.
                          * ASC - Ascending order
                          * DESC - Descending order
                        enum:
                          - ASC
                          - DESC
                    required:
                      - offset
                      - limit
                      - count
                      - total_count
                  data:
                    type: array
                    items:
                      type: object
                      properties:
                        id:
                          title: Direct debit funding request unique identifier
                          type: string
                          description: Direct debit funding request unique identifier
                          format: uuid
                        created_at:
                          type: string
                          format: date-time
                          description: >-
                            Date and time when the resource was created. [RFC
                            3339-5](https://datatracker.ietf.org/doc/html/rfc3339#section-5.6),
                            [ISO8601
                            UTC](https://www.iso.org/iso-8601-date-and-time-format.html)
                        user_id:
                          title: User unique identifier.
                          type: string
                          description: User unique identifier.
                          format: uuid
                        account_group_id:
                          title: Account group unique identifier.
                          type: string
                          description: Account group unique identifier.
                          format: uuid
                        mandate_id:
                          title: Direct Debit Mandate unique identifier.
                          type: string
                          description: Direct Debit Mandate unique identifier.
                          format: uuid
                        cash_amount:
                          type: string
                          pattern: ^-?[0-9]{1,9}(\.[0-9]{2})?$
                        currency:
                          type: string
                          description: >-
                            Alphabetic three-letter [ISO
                            4217](https://en.wikipedia.org/wiki/ISO_4217)
                            currency code.

                            * EUR - Euro
                          enum:
                            - EUR
                          default: EUR
                        remittance_information:
                          type: string
                          maxLength: 140
                          pattern: ^[0-9A-Za-z+?/\-:()\.,';_ ]{0,140}$
                          description: >-
                            Payment reference the end user will see in their
                            bank statement for the corresponding direct debit
                            booking (“Verwendungszweck”). We recommend that you
                            keep this info concise and avoid special characters
                            or non-standardised formatting ([see
                            more](/documentation/guides/payments/direct_debit/direct_debit_submitting)).
                        status:
                          type: string
                          description: >-
                            Status of the direct debit

                            * NEW - Direct debit is created but not started
                            processing.

                            * PROCESSING - Direct debit is in processing.

                            * CONFIRMED - Direct debit was successfully
                            processed.

                            * CANCELLED - Direct debit was cancelled.
                          enum:
                            - NEW
                            - PROCESSING
                            - CONFIRMED
                            - CANCELLED
                        purpose_code:
                          type: string
                          maxLength: 4
                          description: >-
                            Purpose of the payment based on
                            *ExternalPurpose1Code* from [ISO
                            20022](https://www.iso20022.org/catalogue-messages/additional-content-messages/external-code-sets).
                      required:
                        - id
                        - created_at
                        - user_id
                        - account_group_id
                        - mandate_id
                        - cash_amount
                        - currency
                      additionalProperties: false
                required:
                  - meta
                  - data
                additionalProperties: false
              example:
                meta:
                  offset: 0
                  limit: 100
                  count: 1
                  total_count: 1
                  sort: id
                  order: ASC
                data:
                  - id: 1ab4fef9-a097-4c6f-9345-647025d5fde6
                    created_at: '2020-08-24T14:15:22Z'
                    user_id: 82b49999-1145-4e05-916a-567662daa7bc
                    account_group_id: 1ea60f56-b67b-61fc-829a-0242ac130003
                    mandate_id: 730b8719-0bc6-401d-98dd-b2de72afbf05
                    cash_amount: '200.00'
                    currency: EUR
                    remittance_information: payment for green energy portfolio
                    status: NEW
                    purpose_code: OTHR
        '400':
          description: Bad Request. The incoming request had a malformed parameter/object.
          headers:
            upvest-request-id:
              required: true
              schema:
                type: string
                format: uuid
                example: 169ae4c7-ebd7-4041-94da-25369653eba7
          content:
            application/problem+json:
              schema:
                title: Error
                type: object
                description: ''
                properties:
                  type:
                    type: string
                    description: URL to a document describing the error condition.
                  status:
                    type: integer
                    description: >-
                      Transmission of the HTTP status code so that all
                      information can be found in one place, but also to correct
                      changes in the status code due to the use of proxy
                      servers.
                  title:
                    type: string
                    description: >-
                      A short, human-readable title for the general error type;
                      the title should not change for given types.
                  detail:
                    type: string
                    description: A human-readable description of the specific error.
                  instance:
                    type: string
                    description: >-
                      This optional key may be present, with a unique URI for
                      the specific error; this will often point to an error log
                      for that specific response.
                  request_id:
                    type: string
                    description: Correlation ID for the original request.
                required:
                  - type
                  - status
                additionalProperties: false
              example:
                status: 400
                type: bad_request
        '401':
          description: Unauthorized. The caller has not been authenticated.
          headers:
            upvest-request-id:
              required: true
              schema:
                type: string
                format: uuid
                example: 169ae4c7-ebd7-4041-94da-25369653eba7
          content:
            application/problem+json:
              schema:
                title: Error
                type: object
                description: ''
                properties:
                  type:
                    type: string
                    description: URL to a document describing the error condition.
                  status:
                    type: integer
                    description: >-
                      Transmission of the HTTP status code so that all
                      information can be found in one place, but also to correct
                      changes in the status code due to the use of proxy
                      servers.
                  title:
                    type: string
                    description: >-
                      A short, human-readable title for the general error type;
                      the title should not change for given types.
                  detail:
                    type: string
                    description: A human-readable description of the specific error.
                  instance:
                    type: string
                    description: >-
                      This optional key may be present, with a unique URI for
                      the specific error; this will often point to an error log
                      for that specific response.
                  request_id:
                    type: string
                    description: Correlation ID for the original request.
                required:
                  - type
                  - status
                additionalProperties: false
              example:
                status: 401
                type: unauthorized
        '403':
          description: >-
            Forbidden. The caller has been authenticated but is not allowed to
            take the requested action.
          headers:
            upvest-request-id:
              required: true
              schema:
                type: string
                format: uuid
                example: 169ae4c7-ebd7-4041-94da-25369653eba7
          content:
            application/problem+json:
              schema:
                title: Error
                type: object
                description: ''
                properties:
                  type:
                    type: string
                    description: URL to a document describing the error condition.
                  status:
                    type: integer
                    description: >-
                      Transmission of the HTTP status code so that all
                      information can be found in one place, but also to correct
                      changes in the status code due to the use of proxy
                      servers.
                  title:
                    type: string
                    description: >-
                      A short, human-readable title for the general error type;
                      the title should not change for given types.
                  detail:
                    type: string
                    description: A human-readable description of the specific error.
                  instance:
                    type: string
                    description: >-
                      This optional key may be present, with a unique URI for
                      the specific error; this will often point to an error log
                      for that specific response.
                  request_id:
                    type: string
                    description: Correlation ID for the original request.
                required:
                  - type
                  - status
                additionalProperties: false
              example:
                status: 403
                type: forbidden
        '404':
          description: Not Found. The requested resource could not be found.
          headers:
            upvest-request-id:
              required: true
              schema:
                type: string
                format: uuid
                example: 169ae4c7-ebd7-4041-94da-25369653eba7
          content:
            application/problem+json:
              schema:
                title: Error
                type: object
                description: ''
                properties:
                  type:
                    type: string
                    description: URL to a document describing the error condition.
                  status:
                    type: integer
                    description: >-
                      Transmission of the HTTP status code so that all
                      information can be found in one place, but also to correct
                      changes in the status code due to the use of proxy
                      servers.
                  title:
                    type: string
                    description: >-
                      A short, human-readable title for the general error type;
                      the title should not change for given types.
                  detail:
                    type: string
                    description: A human-readable description of the specific error.
                  instance:
                    type: string
                    description: >-
                      This optional key may be present, with a unique URI for
                      the specific error; this will often point to an error log
                      for that specific response.
                  request_id:
                    type: string
                    description: Correlation ID for the original request.
                required:
                  - type
                  - status
                additionalProperties: false
              example:
                status: 404
                type: not_found
        '406':
          description: >-
            Not Acceptable. The resource does not have a current representation
            that would be acceptable to the user agent. "Accept" header defined
            unsupported value.
          headers:
            upvest-request-id:
              required: true
              schema:
                type: string
                format: uuid
                example: 169ae4c7-ebd7-4041-94da-25369653eba7
          content:
            application/problem+json:
              schema:
                title: Error
                type: object
                description: ''
                properties:
                  type:
                    type: string
                    description: URL to a document describing the error condition.
                  status:
                    type: integer
                    description: >-
                      Transmission of the HTTP status code so that all
                      information can be found in one place, but also to correct
                      changes in the status code due to the use of proxy
                      servers.
                  title:
                    type: string
                    description: >-
                      A short, human-readable title for the general error type;
                      the title should not change for given types.
                  detail:
                    type: string
                    description: A human-readable description of the specific error.
                  instance:
                    type: string
                    description: >-
                      This optional key may be present, with a unique URI for
                      the specific error; this will often point to an error log
                      for that specific response.
                  request_id:
                    type: string
                    description: Correlation ID for the original request.
                required:
                  - type
                  - status
                additionalProperties: false
              example:
                status: 406
                type: not_acceptable
        '429':
          description: >-
            Too Many Requests. The caller has exceeded their quota for the time
            period and has been throttled.
          headers:
            upvest-request-id:
              required: true
              schema:
                type: string
                format: uuid
                example: 169ae4c7-ebd7-4041-94da-25369653eba7
          content:
            application/problem+json:
              schema:
                title: Error
                type: object
                description: ''
                properties:
                  type:
                    type: string
                    description: URL to a document describing the error condition.
                  status:
                    type: integer
                    description: >-
                      Transmission of the HTTP status code so that all
                      information can be found in one place, but also to correct
                      changes in the status code due to the use of proxy
                      servers.
                  title:
                    type: string
                    description: >-
                      A short, human-readable title for the general error type;
                      the title should not change for given types.
                  detail:
                    type: string
                    description: A human-readable description of the specific error.
                  instance:
                    type: string
                    description: >-
                      This optional key may be present, with a unique URI for
                      the specific error; this will often point to an error log
                      for that specific response.
                  request_id:
                    type: string
                    description: Correlation ID for the original request.
                required:
                  - type
                  - status
                additionalProperties: false
              example:
                status: 429
                type: too_many_requests
        '500':
          description: Internal Server Error. The service encountered an unexpected error.
          headers:
            upvest-request-id:
              required: true
              schema:
                type: string
                format: uuid
                example: 169ae4c7-ebd7-4041-94da-25369653eba7
          content:
            application/problem+json:
              schema:
                title: Error
                type: object
                description: ''
                properties:
                  type:
                    type: string
                    description: URL to a document describing the error condition.
                  status:
                    type: integer
                    description: >-
                      Transmission of the HTTP status code so that all
                      information can be found in one place, but also to correct
                      changes in the status code due to the use of proxy
                      servers.
                  title:
                    type: string
                    description: >-
                      A short, human-readable title for the general error type;
                      the title should not change for given types.
                  detail:
                    type: string
                    description: A human-readable description of the specific error.
                  instance:
                    type: string
                    description: >-
                      This optional key may be present, with a unique URI for
                      the specific error; this will often point to an error log
                      for that specific response.
                  request_id:
                    type: string
                    description: Correlation ID for the original request.
                required:
                  - type
                  - status
                additionalProperties: false
              example:
                status: 500
                type: internal_server_error
        '503':
          description: >-
            Service Unavailable. The service handling for this request cannot be
            reached at this time.
          headers:
            upvest-request-id:
              required: true
              schema:
                type: string
                format: uuid
                example: 169ae4c7-ebd7-4041-94da-25369653eba7
          content:
            application/problem+json:
              schema:
                title: Error
                type: object
                description: ''
                properties:
                  type:
                    type: string
                    description: URL to a document describing the error condition.
                  status:
                    type: integer
                    description: >-
                      Transmission of the HTTP status code so that all
                      information can be found in one place, but also to correct
                      changes in the status code due to the use of proxy
                      servers.
                  title:
                    type: string
                    description: >-
                      A short, human-readable title for the general error type;
                      the title should not change for given types.
                  detail:
                    type: string
                    description: A human-readable description of the specific error.
                  instance:
                    type: string
                    description: >-
                      This optional key may be present, with a unique URI for
                      the specific error; this will often point to an error log
                      for that specific response.
                  request_id:
                    type: string
                    description: Correlation ID for the original request.
                required:
                  - type
                  - status
                additionalProperties: false
              example:
                status: 503
                type: method_not_allowed
        '504':
          description: >-
            Gateway Timeout. The service gateway has reached its internal
            timeout.
          headers:
            upvest-request-id:
              required: true
              schema:
                type: string
                format: uuid
                example: 169ae4c7-ebd7-4041-94da-25369653eba7
          content:
            application/problem+json:
              schema:
                title: Error
                type: object
                description: ''
                properties:
                  type:
                    type: string
                    description: URL to a document describing the error condition.
                  status:
                    type: integer
                    description: >-
                      Transmission of the HTTP status code so that all
                      information can be found in one place, but also to correct
                      changes in the status code due to the use of proxy
                      servers.
                  title:
                    type: string
                    description: >-
                      A short, human-readable title for the general error type;
                      the title should not change for given types.
                  detail:
                    type: string
                    description: A human-readable description of the specific error.
                  instance:
                    type: string
                    description: >-
                      This optional key may be present, with a unique URI for
                      the specific error; this will often point to an error log
                      for that specific response.
                  request_id:
                    type: string
                    description: Correlation ID for the original request.
                required:
                  - type
                  - status
                additionalProperties: false
              example:
                status: 504
                type: gateway_timeout
  /payments/direct_debits:
    parameters:
      - name: upvest-client-id
        in: header
        description: Tenant Client ID
        required: true
        schema:
          type: string
          format: uuid
          example: ebabcf4d-61c3-4942-875c-e265a7c2d062
      - name: authorization
        in: header
        description: |
          Bearer (access) token from the OAuth flow with correct scopes.
          https://datatracker.ietf.org/doc/html/rfc6750
        required: true
        schema:
          type: string
          pattern: ^Bearer [a-zA-Z0-9\-\._~+/]*=*
          example: Bearer c2VjcmV0Cg==
      - name: signature
        in: header
        required: true
        schema:
          type: string
        description: >-
          https://tools.ietf.org/id/draft-ietf-httpbis-message-signatures-01.html#name-the-signature-http-header
      - name: signature-input
        in: header
        required: true
        schema:
          type: string
        description: >-
          https://tools.ietf.org/id/draft-ietf-httpbis-message-signatures-01.html#name-the-signature-input-http-he
      - name: upvest-api-version
        in: header
        required: false
        schema:
          type: string
          enum:
            - '1'
          default: '1'
          example: '1'
        description: 'Upvest API version (Note: Do not include quotation marks)'
    post:
      operationId: create_direct_debit
      summary: Trigger a direct debit
      description: Trigger a direct debit
      tags:
        - Direct Debits
      security:
        - oauth-client-credentials:
            - payments:admin
      parameters:
        - name: idempotency-key
          in: header
          required: true
          schema:
            type: string
            format: uuid
            pattern: >-
              ^[0-9a-fA-F]{8}-?[0-9a-fA-F]{4}-?[0-5][0-9a-fA-F]{3}-?[089abAB][0-9a-fA-F]{3}-?[0-9a-fA-F]{12}$
            example: ccb07f42-4104-44ad-8e1f-c660bb7b269c
          description: >
            A UUID to be used as an idempotency key.  This prevents a duplicate
            request from being replayed.

            https://docs.upvest.co/documentation/concepts/api_concepts/idempotency
      requestBody:
        content:
          application/json:
            schema:
              title: Payments - Direct Debit - Create - Request
              type: object
              properties:
                user_id:
                  title: User unique identifier.
                  type: string
                  description: User unique identifier.
                  format: uuid
                account_group_id:
                  title: Account group unique identifier.
                  type: string
                  description: Account group unique identifier.
                  format: uuid
                mandate_id:
                  title: Direct Debit Mandate unique identifier.
                  type: string
                  description: Direct Debit Mandate unique identifier.
                  format: uuid
                cash_amount:
                  type: string
                  pattern: ^-?[0-9]{1,9}(\.[0-9]{2})?$
                currency:
                  type: string
                  description: >-
                    Alphabetic three-letter [ISO
                    4217](https://en.wikipedia.org/wiki/ISO_4217) currency code.

                    * EUR - Euro
                  enum:
                    - EUR
                  default: EUR
                remittance_information:
                  type: string
                  maxLength: 140
                  pattern: ^[0-9A-Za-z+?/\-:()\.,';_ ]{0,140}$
                  description: >-
                    Payment reference the end user will see in their bank
                    statement for the corresponding direct debit booking
                    (“Verwendungszweck”). We recommend that you keep this info
                    concise and avoid special characters or non-standardised
                    formatting ([see
                    more](/documentation/guides/payments/direct_debit/direct_debit_submitting)).
                purpose_code:
                  type: string
                  maxLength: 4
                  description: >-
                    Purpose of the payment based on *ExternalPurpose1Code* from
                    [ISO
                    20022](https://www.iso20022.org/catalogue-messages/additional-content-messages/external-code-sets).
              required:
                - user_id
                - account_group_id
                - mandate_id
                - cash_amount
              additionalProperties: false
            example:
              user_id: 83d83ec2-d2ca-49ff-bbea-b92b5c3be202
              account_group_id: 1ea60f56-b67b-61fc-829a-0242ac130003
              mandate_id: 95b8304e-19fc-4cd9-8e50-82532e6b8d8c
              cash_amount: '200.00'
              currency: EUR
              remittance_information: payment for green energy portfolio
              purpose_code: OTHR
      responses:
        '200':
          description: Direct debit
          headers:
            upvest-request-id:
              required: true
              schema:
                type: string
                format: uuid
                example: 169ae4c7-ebd7-4041-94da-25369653eba7
          content:
            application/json:
              schema:
                type: object
                properties:
                  id:
                    title: Direct debit funding request unique identifier
                    type: string
                    description: Direct debit funding request unique identifier
                    format: uuid
                  created_at:
                    type: string
                    format: date-time
                    description: >-
                      Date and time when the resource was created. [RFC
                      3339-5](https://datatracker.ietf.org/doc/html/rfc3339#section-5.6),
                      [ISO8601
                      UTC](https://www.iso.org/iso-8601-date-and-time-format.html)
                  user_id:
                    title: User unique identifier.
                    type: string
                    description: User unique identifier.
                    format: uuid
                  account_group_id:
                    title: Account group unique identifier.
                    type: string
                    description: Account group unique identifier.
                    format: uuid
                  mandate_id:
                    title: Direct Debit Mandate unique identifier.
                    type: string
                    description: Direct Debit Mandate unique identifier.
                    format: uuid
                  cash_amount:
                    type: string
                    pattern: ^-?[0-9]{1,9}(\.[0-9]{2})?$
                  currency:
                    type: string
                    description: >-
                      Alphabetic three-letter [ISO
                      4217](https://en.wikipedia.org/wiki/ISO_4217) currency
                      code.

                      * EUR - Euro
                    enum:
                      - EUR
                    default: EUR
                  remittance_information:
                    type: string
                    maxLength: 140
                    pattern: ^[0-9A-Za-z+?/\-:()\.,';_ ]{0,140}$
                    description: >-
                      Payment reference the end user will see in their bank
                      statement for the corresponding direct debit booking
                      (“Verwendungszweck”). We recommend that you keep this info
                      concise and avoid special characters or non-standardised
                      formatting ([see
                      more](/documentation/guides/payments/direct_debit/direct_debit_submitting)).
                  status:
                    type: string
                    description: >-
                      Status of the direct debit

                      * NEW - Direct debit is created but not started
                      processing.

                      * PROCESSING - Direct debit is in processing.

                      * CONFIRMED - Direct debit was successfully processed.

                      * CANCELLED - Direct debit was cancelled.
                    enum:
                      - NEW
                      - PROCESSING
                      - CONFIRMED
                      - CANCELLED
                  purpose_code:
                    type: string
                    maxLength: 4
                    description: >-
                      Purpose of the payment based on *ExternalPurpose1Code*
                      from [ISO
                      20022](https://www.iso20022.org/catalogue-messages/additional-content-messages/external-code-sets).
                required:
                  - id
                  - created_at
                  - user_id
                  - account_group_id
                  - mandate_id
                  - cash_amount
                  - currency
                additionalProperties: false
              example:
                id: 1ab4fef9-a097-4c6f-9345-647025d5fde6
                created_at: '2020-08-24T14:15:22Z'
                user_id: 82b49999-1145-4e05-916a-567662daa7bc
                account_group_id: 1ea60f56-b67b-61fc-829a-0242ac130003
                mandate_id: 730b8719-0bc6-401d-98dd-b2de72afbf05
                cash_amount: '200.00'
                currency: EUR
                status: NEW
                purpose_code: OTHR
        '400':
          description: Bad Request. The incoming request had a malformed parameter/object.
          headers:
            upvest-request-id:
              required: true
              schema:
                type: string
                format: uuid
                example: 169ae4c7-ebd7-4041-94da-25369653eba7
          content:
            application/problem+json:
              schema:
                title: Error
                type: object
                description: ''
                properties:
                  type:
                    type: string
                    description: URL to a document describing the error condition.
                  status:
                    type: integer
                    description: >-
                      Transmission of the HTTP status code so that all
                      information can be found in one place, but also to correct
                      changes in the status code due to the use of proxy
                      servers.
                  title:
                    type: string
                    description: >-
                      A short, human-readable title for the general error type;
                      the title should not change for given types.
                  detail:
                    type: string
                    description: A human-readable description of the specific error.
                  instance:
                    type: string
                    description: >-
                      This optional key may be present, with a unique URI for
                      the specific error; this will often point to an error log
                      for that specific response.
                  request_id:
                    type: string
                    description: Correlation ID for the original request.
                required:
                  - type
                  - status
                additionalProperties: false
              example:
                status: 400
                type: bad_request
        '401':
          description: Unauthorized. The caller has not been authenticated.
          headers:
            upvest-request-id:
              required: true
              schema:
                type: string
                format: uuid
                example: 169ae4c7-ebd7-4041-94da-25369653eba7
          content:
            application/problem+json:
              schema:
                title: Error
                type: object
                description: ''
                properties:
                  type:
                    type: string
                    description: URL to a document describing the error condition.
                  status:
                    type: integer
                    description: >-
                      Transmission of the HTTP status code so that all
                      information can be found in one place, but also to correct
                      changes in the status code due to the use of proxy
                      servers.
                  title:
                    type: string
                    description: >-
                      A short, human-readable title for the general error type;
                      the title should not change for given types.
                  detail:
                    type: string
                    description: A human-readable description of the specific error.
                  instance:
                    type: string
                    description: >-
                      This optional key may be present, with a unique URI for
                      the specific error; this will often point to an error log
                      for that specific response.
                  request_id:
                    type: string
                    description: Correlation ID for the original request.
                required:
                  - type
                  - status
                additionalProperties: false
              example:
                status: 401
                type: unauthorized
        '403':
          description: >-
            Forbidden. The caller has been authenticated but is not allowed to
            take the requested action.
          headers:
            upvest-request-id:
              required: true
              schema:
                type: string
                format: uuid
                example: 169ae4c7-ebd7-4041-94da-25369653eba7
          content:
            application/problem+json:
              schema:
                title: Error
                type: object
                description: ''
                properties:
                  type:
                    type: string
                    description: URL to a document describing the error condition.
                  status:
                    type: integer
                    description: >-
                      Transmission of the HTTP status code so that all
                      information can be found in one place, but also to correct
                      changes in the status code due to the use of proxy
                      servers.
                  title:
                    type: string
                    description: >-
                      A short, human-readable title for the general error type;
                      the title should not change for given types.
                  detail:
                    type: string
                    description: A human-readable description of the specific error.
                  instance:
                    type: string
                    description: >-
                      This optional key may be present, with a unique URI for
                      the specific error; this will often point to an error log
                      for that specific response.
                  request_id:
                    type: string
                    description: Correlation ID for the original request.
                required:
                  - type
                  - status
                additionalProperties: false
              example:
                status: 403
                type: forbidden
        '404':
          description: Not Found. The requested resource could not be found.
          headers:
            upvest-request-id:
              required: true
              schema:
                type: string
                format: uuid
                example: 169ae4c7-ebd7-4041-94da-25369653eba7
          content:
            application/problem+json:
              schema:
                title: Error
                type: object
                description: ''
                properties:
                  type:
                    type: string
                    description: URL to a document describing the error condition.
                  status:
                    type: integer
                    description: >-
                      Transmission of the HTTP status code so that all
                      information can be found in one place, but also to correct
                      changes in the status code due to the use of proxy
                      servers.
                  title:
                    type: string
                    description: >-
                      A short, human-readable title for the general error type;
                      the title should not change for given types.
                  detail:
                    type: string
                    description: A human-readable description of the specific error.
                  instance:
                    type: string
                    description: >-
                      This optional key may be present, with a unique URI for
                      the specific error; this will often point to an error log
                      for that specific response.
                  request_id:
                    type: string
                    description: Correlation ID for the original request.
                required:
                  - type
                  - status
                additionalProperties: false
              example:
                status: 404
                type: not_found
        '406':
          description: >-
            Not Acceptable. The resource does not have a current representation
            that would be acceptable to the user agent. "Accept" header defined
            unsupported value.
          headers:
            upvest-request-id:
              required: true
              schema:
                type: string
                format: uuid
                example: 169ae4c7-ebd7-4041-94da-25369653eba7
          content:
            application/problem+json:
              schema:
                title: Error
                type: object
                description: ''
                properties:
                  type:
                    type: string
                    description: URL to a document describing the error condition.
                  status:
                    type: integer
                    description: >-
                      Transmission of the HTTP status code so that all
                      information can be found in one place, but also to correct
                      changes in the status code due to the use of proxy
                      servers.
                  title:
                    type: string
                    description: >-
                      A short, human-readable title for the general error type;
                      the title should not change for given types.
                  detail:
                    type: string
                    description: A human-readable description of the specific error.
                  instance:
                    type: string
                    description: >-
                      This optional key may be present, with a unique URI for
                      the specific error; this will often point to an error log
                      for that specific response.
                  request_id:
                    type: string
                    description: Correlation ID for the original request.
                required:
                  - type
                  - status
                additionalProperties: false
              example:
                status: 406
                type: not_acceptable
        '429':
          description: >-
            Too Many Requests. The caller has exceeded their quota for the time
            period and has been throttled.
          headers:
            upvest-request-id:
              required: true
              schema:
                type: string
                format: uuid
                example: 169ae4c7-ebd7-4041-94da-25369653eba7
          content:
            application/problem+json:
              schema:
                title: Error
                type: object
                description: ''
                properties:
                  type:
                    type: string
                    description: URL to a document describing the error condition.
                  status:
                    type: integer
                    description: >-
                      Transmission of the HTTP status code so that all
                      information can be found in one place, but also to correct
                      changes in the status code due to the use of proxy
                      servers.
                  title:
                    type: string
                    description: >-
                      A short, human-readable title for the general error type;
                      the title should not change for given types.
                  detail:
                    type: string
                    description: A human-readable description of the specific error.
                  instance:
                    type: string
                    description: >-
                      This optional key may be present, with a unique URI for
                      the specific error; this will often point to an error log
                      for that specific response.
                  request_id:
                    type: string
                    description: Correlation ID for the original request.
                required:
                  - type
                  - status
                additionalProperties: false
              example:
                status: 429
                type: too_many_requests
        '500':
          description: Internal Server Error. The service encountered an unexpected error.
          headers:
            upvest-request-id:
              required: true
              schema:
                type: string
                format: uuid
                example: 169ae4c7-ebd7-4041-94da-25369653eba7
          content:
            application/problem+json:
              schema:
                title: Error
                type: object
                description: ''
                properties:
                  type:
                    type: string
                    description: URL to a document describing the error condition.
                  status:
                    type: integer
                    description: >-
                      Transmission of the HTTP status code so that all
                      information can be found in one place, but also to correct
                      changes in the status code due to the use of proxy
                      servers.
                  title:
                    type: string
                    description: >-
                      A short, human-readable title for the general error type;
                      the title should not change for given types.
                  detail:
                    type: string
                    description: A human-readable description of the specific error.
                  instance:
                    type: string
                    description: >-
                      This optional key may be present, with a unique URI for
                      the specific error; this will often point to an error log
                      for that specific response.
                  request_id:
                    type: string
                    description: Correlation ID for the original request.
                required:
                  - type
                  - status
                additionalProperties: false
              example:
                status: 500
                type: internal_server_error
        '503':
          description: >-
            Service Unavailable. The service handling for this request cannot be
            reached at this time.
          headers:
            upvest-request-id:
              required: true
              schema:
                type: string
                format: uuid
                example: 169ae4c7-ebd7-4041-94da-25369653eba7
          content:
            application/problem+json:
              schema:
                title: Error
                type: object
                description: ''
                properties:
                  type:
                    type: string
                    description: URL to a document describing the error condition.
                  status:
                    type: integer
                    description: >-
                      Transmission of the HTTP status code so that all
                      information can be found in one place, but also to correct
                      changes in the status code due to the use of proxy
                      servers.
                  title:
                    type: string
                    description: >-
                      A short, human-readable title for the general error type;
                      the title should not change for given types.
                  detail:
                    type: string
                    description: A human-readable description of the specific error.
                  instance:
                    type: string
                    description: >-
                      This optional key may be present, with a unique URI for
                      the specific error; this will often point to an error log
                      for that specific response.
                  request_id:
                    type: string
                    description: Correlation ID for the original request.
                required:
                  - type
                  - status
                additionalProperties: false
              example:
                status: 503
                type: method_not_allowed
        '504':
          description: >-
            Gateway Timeout. The service gateway has reached its internal
            timeout.
          headers:
            upvest-request-id:
              required: true
              schema:
                type: string
                format: uuid
                example: 169ae4c7-ebd7-4041-94da-25369653eba7
          content:
            application/problem+json:
              schema:
                title: Error
                type: object
                description: ''
                properties:
                  type:
                    type: string
                    description: URL to a document describing the error condition.
                  status:
                    type: integer
                    description: >-
                      Transmission of the HTTP status code so that all
                      information can be found in one place, but also to correct
                      changes in the status code due to the use of proxy
                      servers.
                  title:
                    type: string
                    description: >-
                      A short, human-readable title for the general error type;
                      the title should not change for given types.
                  detail:
                    type: string
                    description: A human-readable description of the specific error.
                  instance:
                    type: string
                    description: >-
                      This optional key may be present, with a unique URI for
                      the specific error; this will often point to an error log
                      for that specific response.
                  request_id:
                    type: string
                    description: Correlation ID for the original request.
                required:
                  - type
                  - status
                additionalProperties: false
              example:
                status: 504
                type: gateway_timeout
  /payments/direct_debits/{direct_debit_id}:
    parameters:
      - name: direct_debit_id
        in: path
        required: true
        schema:
          title: Direct debit funding request unique identifier
          type: string
          description: Direct debit funding request unique identifier
          format: uuid
      - name: upvest-client-id
        in: header
        description: Tenant Client ID
        required: true
        schema:
          type: string
          format: uuid
          example: ebabcf4d-61c3-4942-875c-e265a7c2d062
      - name: authorization
        in: header
        description: |
          Bearer (access) token from the OAuth flow with correct scopes.
          https://datatracker.ietf.org/doc/html/rfc6750
        required: true
        schema:
          type: string
          pattern: ^Bearer [a-zA-Z0-9\-\._~+/]*=*
          example: Bearer c2VjcmV0Cg==
      - name: signature
        in: header
        required: true
        schema:
          type: string
        description: >-
          https://tools.ietf.org/id/draft-ietf-httpbis-message-signatures-01.html#name-the-signature-http-header
      - name: signature-input
        in: header
        required: true
        schema:
          type: string
        description: >-
          https://tools.ietf.org/id/draft-ietf-httpbis-message-signatures-01.html#name-the-signature-input-http-he
      - name: upvest-api-version
        in: header
        required: false
        schema:
          type: string
          enum:
            - '1'
          default: '1'
          example: '1'
        description: 'Upvest API version (Note: Do not include quotation marks)'
    get:
      operationId: retrieve_direct_debit
      summary: Retrieve a direct debit
      description: Retrieve a direct debit
      tags:
        - Direct Debits
      security:
        - oauth-client-credentials:
            - payments:admin
            - payments:read
      responses:
        '200':
          description: Direct debit payment
          headers:
            upvest-request-id:
              required: true
              schema:
                type: string
                format: uuid
                example: 169ae4c7-ebd7-4041-94da-25369653eba7
          content:
            application/json:
              schema:
                type: object
                properties:
                  id:
                    title: Direct debit funding request unique identifier
                    type: string
                    description: Direct debit funding request unique identifier
                    format: uuid
                  created_at:
                    type: string
                    format: date-time
                    description: >-
                      Date and time when the resource was created. [RFC
                      3339-5](https://datatracker.ietf.org/doc/html/rfc3339#section-5.6),
                      [ISO8601
                      UTC](https://www.iso.org/iso-8601-date-and-time-format.html)
                  user_id:
                    title: User unique identifier.
                    type: string
                    description: User unique identifier.
                    format: uuid
                  account_group_id:
                    title: Account group unique identifier.
                    type: string
                    description: Account group unique identifier.
                    format: uuid
                  mandate_id:
                    title: Direct Debit Mandate unique identifier.
                    type: string
                    description: Direct Debit Mandate unique identifier.
                    format: uuid
                  cash_amount:
                    type: string
                    pattern: ^-?[0-9]{1,9}(\.[0-9]{2})?$
                  currency:
                    type: string
                    description: >-
                      Alphabetic three-letter [ISO
                      4217](https://en.wikipedia.org/wiki/ISO_4217) currency
                      code.

                      * EUR - Euro
                    enum:
                      - EUR
                    default: EUR
                  remittance_information:
                    type: string
                    maxLength: 140
                    pattern: ^[0-9A-Za-z+?/\-:()\.,';_ ]{0,140}$
                    description: >-
                      Payment reference the end user will see in their bank
                      statement for the corresponding direct debit booking
                      (“Verwendungszweck”). We recommend that you keep this info
                      concise and avoid special characters or non-standardised
                      formatting ([see
                      more](/documentation/guides/payments/direct_debit/direct_debit_submitting)).
                  status:
                    type: string
                    description: >-
                      Status of the direct debit

                      * NEW - Direct debit is created but not started
                      processing.

                      * PROCESSING - Direct debit is in processing.

                      * CONFIRMED - Direct debit was successfully processed.

                      * CANCELLED - Direct debit was cancelled.
                    enum:
                      - NEW
                      - PROCESSING
                      - CONFIRMED
                      - CANCELLED
                  purpose_code:
                    type: string
                    maxLength: 4
                    description: >-
                      Purpose of the payment based on *ExternalPurpose1Code*
                      from [ISO
                      20022](https://www.iso20022.org/catalogue-messages/additional-content-messages/external-code-sets).
                required:
                  - id
                  - created_at
                  - user_id
                  - account_group_id
                  - mandate_id
                  - cash_amount
                  - currency
                additionalProperties: false
              example:
                id: 1ab4fef9-a097-4c6f-9345-647025d5fde6
                created_at: '2020-08-24T14:15:22Z'
                user_id: 82b49999-1145-4e05-916a-567662daa7bc
                account_group_id: 1ea60f56-b67b-61fc-829a-0242ac130003
                mandate_id: 730b8719-0bc6-401d-98dd-b2de72afbf05
                cash_amount: '200.00'
                currency: EUR
                remittance_information: payment for green energy portfolio
                status: NEW
                purpose_code: OTHR
        '401':
          description: Unauthorized. The caller has not been authenticated.
          headers:
            upvest-request-id:
              required: true
              schema:
                type: string
                format: uuid
                example: 169ae4c7-ebd7-4041-94da-25369653eba7
          content:
            application/problem+json:
              schema:
                title: Error
                type: object
                description: ''
                properties:
                  type:
                    type: string
                    description: URL to a document describing the error condition.
                  status:
                    type: integer
                    description: >-
                      Transmission of the HTTP status code so that all
                      information can be found in one place, but also to correct
                      changes in the status code due to the use of proxy
                      servers.
                  title:
                    type: string
                    description: >-
                      A short, human-readable title for the general error type;
                      the title should not change for given types.
                  detail:
                    type: string
                    description: A human-readable description of the specific error.
                  instance:
                    type: string
                    description: >-
                      This optional key may be present, with a unique URI for
                      the specific error; this will often point to an error log
                      for that specific response.
                  request_id:
                    type: string
                    description: Correlation ID for the original request.
                required:
                  - type
                  - status
                additionalProperties: false
              example:
                status: 401
                type: unauthorized
        '403':
          description: >-
            Forbidden. The caller has been authenticated but is not allowed to
            take the requested action.
          headers:
            upvest-request-id:
              required: true
              schema:
                type: string
                format: uuid
                example: 169ae4c7-ebd7-4041-94da-25369653eba7
          content:
            application/problem+json:
              schema:
                title: Error
                type: object
                description: ''
                properties:
                  type:
                    type: string
                    description: URL to a document describing the error condition.
                  status:
                    type: integer
                    description: >-
                      Transmission of the HTTP status code so that all
                      information can be found in one place, but also to correct
                      changes in the status code due to the use of proxy
                      servers.
                  title:
                    type: string
                    description: >-
                      A short, human-readable title for the general error type;
                      the title should not change for given types.
                  detail:
                    type: string
                    description: A human-readable description of the specific error.
                  instance:
                    type: string
                    description: >-
                      This optional key may be present, with a unique URI for
                      the specific error; this will often point to an error log
                      for that specific response.
                  request_id:
                    type: string
                    description: Correlation ID for the original request.
                required:
                  - type
                  - status
                additionalProperties: false
              example:
                status: 403
                type: forbidden
        '404':
          description: Not Found. The requested resource could not be found.
          headers:
            upvest-request-id:
              required: true
              schema:
                type: string
                format: uuid
                example: 169ae4c7-ebd7-4041-94da-25369653eba7
          content:
            application/problem+json:
              schema:
                title: Error
                type: object
                description: ''
                properties:
                  type:
                    type: string
                    description: URL to a document describing the error condition.
                  status:
                    type: integer
                    description: >-
                      Transmission of the HTTP status code so that all
                      information can be found in one place, but also to correct
                      changes in the status code due to the use of proxy
                      servers.
                  title:
                    type: string
                    description: >-
                      A short, human-readable title for the general error type;
                      the title should not change for given types.
                  detail:
                    type: string
                    description: A human-readable description of the specific error.
                  instance:
                    type: string
                    description: >-
                      This optional key may be present, with a unique URI for
                      the specific error; this will often point to an error log
                      for that specific response.
                  request_id:
                    type: string
                    description: Correlation ID for the original request.
                required:
                  - type
                  - status
                additionalProperties: false
              example:
                status: 404
                type: not_found
        '406':
          description: >-
            Not Acceptable. The resource does not have a current representation
            that would be acceptable to the user agent. "Accept" header defined
            unsupported value.
          headers:
            upvest-request-id:
              required: true
              schema:
                type: string
                format: uuid
                example: 169ae4c7-ebd7-4041-94da-25369653eba7
          content:
            application/problem+json:
              schema:
                title: Error
                type: object
                description: ''
                properties:
                  type:
                    type: string
                    description: URL to a document describing the error condition.
                  status:
                    type: integer
                    description: >-
                      Transmission of the HTTP status code so that all
                      information can be found in one place, but also to correct
                      changes in the status code due to the use of proxy
                      servers.
                  title:
                    type: string
                    description: >-
                      A short, human-readable title for the general error type;
                      the title should not change for given types.
                  detail:
                    type: string
                    description: A human-readable description of the specific error.
                  instance:
                    type: string
                    description: >-
                      This optional key may be present, with a unique URI for
                      the specific error; this will often point to an error log
                      for that specific response.
                  request_id:
                    type: string
                    description: Correlation ID for the original request.
                required:
                  - type
                  - status
                additionalProperties: false
              example:
                status: 406
                type: not_acceptable
        '429':
          description: >-
            Too Many Requests. The caller has exceeded their quota for the time
            period and has been throttled.
          headers:
            upvest-request-id:
              required: true
              schema:
                type: string
                format: uuid
                example: 169ae4c7-ebd7-4041-94da-25369653eba7
          content:
            application/problem+json:
              schema:
                title: Error
                type: object
                description: ''
                properties:
                  type:
                    type: string
                    description: URL to a document describing the error condition.
                  status:
                    type: integer
                    description: >-
                      Transmission of the HTTP status code so that all
                      information can be found in one place, but also to correct
                      changes in the status code due to the use of proxy
                      servers.
                  title:
                    type: string
                    description: >-
                      A short, human-readable title for the general error type;
                      the title should not change for given types.
                  detail:
                    type: string
                    description: A human-readable description of the specific error.
                  instance:
                    type: string
                    description: >-
                      This optional key may be present, with a unique URI for
                      the specific error; this will often point to an error log
                      for that specific response.
                  request_id:
                    type: string
                    description: Correlation ID for the original request.
                required:
                  - type
                  - status
                additionalProperties: false
              example:
                status: 429
                type: too_many_requests
        '500':
          description: Internal Server Error. The service encountered an unexpected error.
          headers:
            upvest-request-id:
              required: true
              schema:
                type: string
                format: uuid
                example: 169ae4c7-ebd7-4041-94da-25369653eba7
          content:
            application/problem+json:
              schema:
                title: Error
                type: object
                description: ''
                properties:
                  type:
                    type: string
                    description: URL to a document describing the error condition.
                  status:
                    type: integer
                    description: >-
                      Transmission of the HTTP status code so that all
                      information can be found in one place, but also to correct
                      changes in the status code due to the use of proxy
                      servers.
                  title:
                    type: string
                    description: >-
                      A short, human-readable title for the general error type;
                      the title should not change for given types.
                  detail:
                    type: string
                    description: A human-readable description of the specific error.
                  instance:
                    type: string
                    description: >-
                      This optional key may be present, with a unique URI for
                      the specific error; this will often point to an error log
                      for that specific response.
                  request_id:
                    type: string
                    description: Correlation ID for the original request.
                required:
                  - type
                  - status
                additionalProperties: false
              example:
                status: 500
                type: internal_server_error
        '503':
          description: >-
            Service Unavailable. The service handling for this request cannot be
            reached at this time.
          headers:
            upvest-request-id:
              required: true
              schema:
                type: string
                format: uuid
                example: 169ae4c7-ebd7-4041-94da-25369653eba7
          content:
            application/problem+json:
              schema:
                title: Error
                type: object
                description: ''
                properties:
                  type:
                    type: string
                    description: URL to a document describing the error condition.
                  status:
                    type: integer
                    description: >-
                      Transmission of the HTTP status code so that all
                      information can be found in one place, but also to correct
                      changes in the status code due to the use of proxy
                      servers.
                  title:
                    type: string
                    description: >-
                      A short, human-readable title for the general error type;
                      the title should not change for given types.
                  detail:
                    type: string
                    description: A human-readable description of the specific error.
                  instance:
                    type: string
                    description: >-
                      This optional key may be present, with a unique URI for
                      the specific error; this will often point to an error log
                      for that specific response.
                  request_id:
                    type: string
                    description: Correlation ID for the original request.
                required:
                  - type
                  - status
                additionalProperties: false
              example:
                status: 503
                type: method_not_allowed
        '504':
          description: >-
            Gateway Timeout. The service gateway has reached its internal
            timeout.
          headers:
            upvest-request-id:
              required: true
              schema:
                type: string
                format: uuid
                example: 169ae4c7-ebd7-4041-94da-25369653eba7
          content:
            application/problem+json:
              schema:
                title: Error
                type: object
                description: ''
                properties:
                  type:
                    type: string
                    description: URL to a document describing the error condition.
                  status:
                    type: integer
                    description: >-
                      Transmission of the HTTP status code so that all
                      information can be found in one place, but also to correct
                      changes in the status code due to the use of proxy
                      servers.
                  title:
                    type: string
                    description: >-
                      A short, human-readable title for the general error type;
                      the title should not change for given types.
                  detail:
                    type: string
                    description: A human-readable description of the specific error.
                  instance:
                    type: string
                    description: >-
                      This optional key may be present, with a unique URI for
                      the specific error; this will often point to an error log
                      for that specific response.
                  request_id:
                    type: string
                    description: Correlation ID for the original request.
                required:
                  - type
                  - status
                additionalProperties: false
              example:
                status: 504
                type: gateway_timeout
  /account_groups/{account_group_id}/payments/topups:
    parameters:
      - name: account_group_id
        in: path
        required: true
        schema:
          title: Account group unique identifier.
          type: string
          description: Account group unique identifier.
          format: uuid
      - name: upvest-client-id
        in: header
        description: Tenant Client ID
        required: true
        schema:
          type: string
          format: uuid
          example: ebabcf4d-61c3-4942-875c-e265a7c2d062
      - name: authorization
        in: header
        description: |
          Bearer (access) token from the OAuth flow with correct scopes.
          https://datatracker.ietf.org/doc/html/rfc6750
        required: true
        schema:
          type: string
          pattern: ^Bearer [a-zA-Z0-9\-\._~+/]*=*
          example: Bearer c2VjcmV0Cg==
      - name: signature
        in: header
        required: true
        schema:
          type: string
        description: >-
          https://tools.ietf.org/id/draft-ietf-httpbis-message-signatures-01.html#name-the-signature-http-header
      - name: signature-input
        in: header
        required: true
        schema:
          type: string
        description: >-
          https://tools.ietf.org/id/draft-ietf-httpbis-message-signatures-01.html#name-the-signature-input-http-he
      - name: upvest-api-version
        in: header
        required: false
        schema:
          type: string
          enum:
            - '1'
          default: '1'
          example: '1'
        description: 'Upvest API version (Note: Do not include quotation marks)'
    get:
      operationId: list_topups
      summary: List top-ups
      description: Returns a list of top-ups.
      tags:
        - Top-ups
      security:
        - oauth-client-credentials:
            - topups:admin
            - topups:read
      parameters:
        - name: sort
          in: query
          required: false
          schema:
            type: string
            enum:
              - id
              - created_at
            default: created_at
          description: Field of resource to sort by
          example: id
        - name: order
          in: query
          required: false
          schema:
            type: string
            enum:
              - ASC
              - DESC
            default: ASC
          description: >-
            Sort order of the result list if the `sort` parameter is specified.
            Use `ASC` for ascending or `DESC` for descending sort order.
        - name: limit
          in: query
          schema:
            type: integer
            format: int32
            default: 100
            minimum: 0
            maximum: 1000
          allowEmptyValue: true
          description: >-
            Use the `limit` argument to specify the maximum number of items
            returned.
        - name: offset
          in: query
          schema:
            type: integer
            minimum: 0
            format: int32
          allowEmptyValue: true
          description: >-
            Use the `offset` argument to specify where in the list of results to
            start when returning items for a particular query.
      responses:
        '200':
          description: List of top-ups.
          headers:
            upvest-request-id:
              required: true
              schema:
                type: string
                format: uuid
                example: 169ae4c7-ebd7-4041-94da-25369653eba7
          content:
            application/json:
              schema:
                title: Payments - Top ups List - Response
                type: object
                properties:
                  meta:
                    type: object
                    properties:
                      offset:
                        type: integer
                        description: Amount of resource to offset in the response.
                      limit:
                        type: integer
                        description: Total limit of the response.
                      count:
                        type: integer
                        description: Count of the resources returned in the response.
                      total_count:
                        type: integer
                        description: Total count of all the resources.
                      sort:
                        type: string
                        description: The field that the list is sorted by.
                      order:
                        type: string
                        description: |-
                          The ordering of the response.
                          * ASC - Ascending order
                          * DESC - Descending order
                        enum:
                          - ASC
                          - DESC
                    required:
                      - offset
                      - limit
                      - count
                      - total_count
                  data:
                    type: array
                    items:
                      type: object
                      properties:
                        id:
                          title: Top up request unique identifier.
                          type: string
                          description: Top up request unique identifier.
                          format: uuid
                        created_at:
                          type: string
                          format: date-time
                          description: >-
                            Date and time when the resource was created. [RFC
                            3339-5](https://datatracker.ietf.org/doc/html/rfc3339#section-5.6),
                            [ISO8601
                            UTC](https://www.iso.org/iso-8601-date-and-time-format.html)
                        account_group_id:
                          title: Account group unique identifier.
                          type: string
                          description: Account group unique identifier.
                          format: uuid
                        cash_amount:
                          type: string
                          pattern: ^[0-9]{1,9}(\.[0-9]{2})?$
                        currency:
                          type: string
                          description: >-
                            Alphabetic three-letter [ISO
                            4217](https://en.wikipedia.org/wiki/ISO_4217)
                            currency code.

                            * EUR - Euro
                          enum:
                            - EUR
                          default: EUR
                        settlement_reference:
                          type: string
                          maxLength: 130
                          pattern: ^[0-9A-Za-z+?/\-:()\.,'; ]{0,130}$
                          description: >-
                            Settlement reference to be included in the
                            corresponding bank transfer to settle this top up.
                        status:
                          type: string
                          description: |-
                            Status of the top up
                            * CONFIRMED - The top up is created and confirmed.
                            * SETTLED - The top up is settled.
                            * CANCELLED - The top up is cancelled
                          enum:
                            - CONFIRMED
                            - SETTLED
                            - CANCELLED
                      required:
                        - id
                        - created_at
                        - account_group_id
                        - cash_amount
                        - currency
                      additionalProperties: false
                required:
                  - meta
                  - data
                additionalProperties: false
              example:
                meta:
                  offset: 0
                  limit: 100
                  count: 1
                  total_count: 1
                  sort: id
                  order: ASC
                data:
                  - id: 1ab4fef9-a097-4c6f-9345-647025d5fde6
                    created_at: '2020-08-24T14:15:22Z'
                    account_group_id: 1ea60f56-b67b-61fc-829a-0242ac130003
                    cash_amount: '200.00'
                    currency: EUR
                    status: CONFIRMED
        '400':
          description: Bad Request. The incoming request had a malformed parameter/object.
          headers:
            upvest-request-id:
              required: true
              schema:
                type: string
                format: uuid
                example: 169ae4c7-ebd7-4041-94da-25369653eba7
          content:
            application/problem+json:
              schema:
                title: Error
                type: object
                description: ''
                properties:
                  type:
                    type: string
                    description: URL to a document describing the error condition.
                  status:
                    type: integer
                    description: >-
                      Transmission of the HTTP status code so that all
                      information can be found in one place, but also to correct
                      changes in the status code due to the use of proxy
                      servers.
                  title:
                    type: string
                    description: >-
                      A short, human-readable title for the general error type;
                      the title should not change for given types.
                  detail:
                    type: string
                    description: A human-readable description of the specific error.
                  instance:
                    type: string
                    description: >-
                      This optional key may be present, with a unique URI for
                      the specific error; this will often point to an error log
                      for that specific response.
                  request_id:
                    type: string
                    description: Correlation ID for the original request.
                required:
                  - type
                  - status
                additionalProperties: false
              example:
                status: 400
                type: bad_request
        '401':
          description: Unauthorized. The caller has not been authenticated.
          headers:
            upvest-request-id:
              required: true
              schema:
                type: string
                format: uuid
                example: 169ae4c7-ebd7-4041-94da-25369653eba7
          content:
            application/problem+json:
              schema:
                title: Error
                type: object
                description: ''
                properties:
                  type:
                    type: string
                    description: URL to a document describing the error condition.
                  status:
                    type: integer
                    description: >-
                      Transmission of the HTTP status code so that all
                      information can be found in one place, but also to correct
                      changes in the status code due to the use of proxy
                      servers.
                  title:
                    type: string
                    description: >-
                      A short, human-readable title for the general error type;
                      the title should not change for given types.
                  detail:
                    type: string
                    description: A human-readable description of the specific error.
                  instance:
                    type: string
                    description: >-
                      This optional key may be present, with a unique URI for
                      the specific error; this will often point to an error log
                      for that specific response.
                  request_id:
                    type: string
                    description: Correlation ID for the original request.
                required:
                  - type
                  - status
                additionalProperties: false
              example:
                status: 401
                type: unauthorized
        '403':
          description: >-
            Forbidden. The caller has been authenticated but is not allowed to
            take the requested action.
          headers:
            upvest-request-id:
              required: true
              schema:
                type: string
                format: uuid
                example: 169ae4c7-ebd7-4041-94da-25369653eba7
          content:
            application/problem+json:
              schema:
                title: Error
                type: object
                description: ''
                properties:
                  type:
                    type: string
                    description: URL to a document describing the error condition.
                  status:
                    type: integer
                    description: >-
                      Transmission of the HTTP status code so that all
                      information can be found in one place, but also to correct
                      changes in the status code due to the use of proxy
                      servers.
                  title:
                    type: string
                    description: >-
                      A short, human-readable title for the general error type;
                      the title should not change for given types.
                  detail:
                    type: string
                    description: A human-readable description of the specific error.
                  instance:
                    type: string
                    description: >-
                      This optional key may be present, with a unique URI for
                      the specific error; this will often point to an error log
                      for that specific response.
                  request_id:
                    type: string
                    description: Correlation ID for the original request.
                required:
                  - type
                  - status
                additionalProperties: false
              example:
                status: 403
                type: forbidden
        '404':
          description: Not Found. The requested resource could not be found.
          headers:
            upvest-request-id:
              required: true
              schema:
                type: string
                format: uuid
                example: 169ae4c7-ebd7-4041-94da-25369653eba7
          content:
            application/problem+json:
              schema:
                title: Error
                type: object
                description: ''
                properties:
                  type:
                    type: string
                    description: URL to a document describing the error condition.
                  status:
                    type: integer
                    description: >-
                      Transmission of the HTTP status code so that all
                      information can be found in one place, but also to correct
                      changes in the status code due to the use of proxy
                      servers.
                  title:
                    type: string
                    description: >-
                      A short, human-readable title for the general error type;
                      the title should not change for given types.
                  detail:
                    type: string
                    description: A human-readable description of the specific error.
                  instance:
                    type: string
                    description: >-
                      This optional key may be present, with a unique URI for
                      the specific error; this will often point to an error log
                      for that specific response.
                  request_id:
                    type: string
                    description: Correlation ID for the original request.
                required:
                  - type
                  - status
                additionalProperties: false
              example:
                status: 404
                type: not_found
        '406':
          description: >-
            Not Acceptable. The resource does not have a current representation
            that would be acceptable to the user agent. "Accept" header defined
            unsupported value.
          headers:
            upvest-request-id:
              required: true
              schema:
                type: string
                format: uuid
                example: 169ae4c7-ebd7-4041-94da-25369653eba7
          content:
            application/problem+json:
              schema:
                title: Error
                type: object
                description: ''
                properties:
                  type:
                    type: string
                    description: URL to a document describing the error condition.
                  status:
                    type: integer
                    description: >-
                      Transmission of the HTTP status code so that all
                      information can be found in one place, but also to correct
                      changes in the status code due to the use of proxy
                      servers.
                  title:
                    type: string
                    description: >-
                      A short, human-readable title for the general error type;
                      the title should not change for given types.
                  detail:
                    type: string
                    description: A human-readable description of the specific error.
                  instance:
                    type: string
                    description: >-
                      This optional key may be present, with a unique URI for
                      the specific error; this will often point to an error log
                      for that specific response.
                  request_id:
                    type: string
                    description: Correlation ID for the original request.
                required:
                  - type
                  - status
                additionalProperties: false
              example:
                status: 406
                type: not_acceptable
        '429':
          description: >-
            Too Many Requests. The caller has exceeded their quota for the time
            period and has been throttled.
          headers:
            upvest-request-id:
              required: true
              schema:
                type: string
                format: uuid
                example: 169ae4c7-ebd7-4041-94da-25369653eba7
          content:
            application/problem+json:
              schema:
                title: Error
                type: object
                description: ''
                properties:
                  type:
                    type: string
                    description: URL to a document describing the error condition.
                  status:
                    type: integer
                    description: >-
                      Transmission of the HTTP status code so that all
                      information can be found in one place, but also to correct
                      changes in the status code due to the use of proxy
                      servers.
                  title:
                    type: string
                    description: >-
                      A short, human-readable title for the general error type;
                      the title should not change for given types.
                  detail:
                    type: string
                    description: A human-readable description of the specific error.
                  instance:
                    type: string
                    description: >-
                      This optional key may be present, with a unique URI for
                      the specific error; this will often point to an error log
                      for that specific response.
                  request_id:
                    type: string
                    description: Correlation ID for the original request.
                required:
                  - type
                  - status
                additionalProperties: false
              example:
                status: 429
                type: too_many_requests
        '500':
          description: Internal Server Error. The service encountered an unexpected error.
          headers:
            upvest-request-id:
              required: true
              schema:
                type: string
                format: uuid
                example: 169ae4c7-ebd7-4041-94da-25369653eba7
          content:
            application/problem+json:
              schema:
                title: Error
                type: object
                description: ''
                properties:
                  type:
                    type: string
                    description: URL to a document describing the error condition.
                  status:
                    type: integer
                    description: >-
                      Transmission of the HTTP status code so that all
                      information can be found in one place, but also to correct
                      changes in the status code due to the use of proxy
                      servers.
                  title:
                    type: string
                    description: >-
                      A short, human-readable title for the general error type;
                      the title should not change for given types.
                  detail:
                    type: string
                    description: A human-readable description of the specific error.
                  instance:
                    type: string
                    description: >-
                      This optional key may be present, with a unique URI for
                      the specific error; this will often point to an error log
                      for that specific response.
                  request_id:
                    type: string
                    description: Correlation ID for the original request.
                required:
                  - type
                  - status
                additionalProperties: false
              example:
                status: 500
                type: internal_server_error
        '503':
          description: >-
            Service Unavailable. The service handling for this request cannot be
            reached at this time.
          headers:
            upvest-request-id:
              required: true
              schema:
                type: string
                format: uuid
                example: 169ae4c7-ebd7-4041-94da-25369653eba7
          content:
            application/problem+json:
              schema:
                title: Error
                type: object
                description: ''
                properties:
                  type:
                    type: string
                    description: URL to a document describing the error condition.
                  status:
                    type: integer
                    description: >-
                      Transmission of the HTTP status code so that all
                      information can be found in one place, but also to correct
                      changes in the status code due to the use of proxy
                      servers.
                  title:
                    type: string
                    description: >-
                      A short, human-readable title for the general error type;
                      the title should not change for given types.
                  detail:
                    type: string
                    description: A human-readable description of the specific error.
                  instance:
                    type: string
                    description: >-
                      This optional key may be present, with a unique URI for
                      the specific error; this will often point to an error log
                      for that specific response.
                  request_id:
                    type: string
                    description: Correlation ID for the original request.
                required:
                  - type
                  - status
                additionalProperties: false
              example:
                status: 503
                type: method_not_allowed
        '504':
          description: >-
            Gateway Timeout. The service gateway has reached its internal
            timeout.
          headers:
            upvest-request-id:
              required: true
              schema:
                type: string
                format: uuid
                example: 169ae4c7-ebd7-4041-94da-25369653eba7
          content:
            application/problem+json:
              schema:
                title: Error
                type: object
                description: ''
                properties:
                  type:
                    type: string
                    description: URL to a document describing the error condition.
                  status:
                    type: integer
                    description: >-
                      Transmission of the HTTP status code so that all
                      information can be found in one place, but also to correct
                      changes in the status code due to the use of proxy
                      servers.
                  title:
                    type: string
                    description: >-
                      A short, human-readable title for the general error type;
                      the title should not change for given types.
                  detail:
                    type: string
                    description: A human-readable description of the specific error.
                  instance:
                    type: string
                    description: >-
                      This optional key may be present, with a unique URI for
                      the specific error; this will often point to an error log
                      for that specific response.
                  request_id:
                    type: string
                    description: Correlation ID for the original request.
                required:
                  - type
                  - status
                additionalProperties: false
              example:
                status: 504
                type: gateway_timeout
  /payments/topups:
    parameters:
      - name: upvest-client-id
        in: header
        description: Tenant Client ID
        required: true
        schema:
          type: string
          format: uuid
          example: ebabcf4d-61c3-4942-875c-e265a7c2d062
      - name: authorization
        in: header
        description: |
          Bearer (access) token from the OAuth flow with correct scopes.
          https://datatracker.ietf.org/doc/html/rfc6750
        required: true
        schema:
          type: string
          pattern: ^Bearer [a-zA-Z0-9\-\._~+/]*=*
          example: Bearer c2VjcmV0Cg==
      - name: signature
        in: header
        required: true
        schema:
          type: string
        description: >-
          https://tools.ietf.org/id/draft-ietf-httpbis-message-signatures-01.html#name-the-signature-http-header
      - name: signature-input
        in: header
        required: true
        schema:
          type: string
        description: >-
          https://tools.ietf.org/id/draft-ietf-httpbis-message-signatures-01.html#name-the-signature-input-http-he
      - name: upvest-api-version
        in: header
        required: false
        schema:
          type: string
          enum:
            - '1'
          default: '1'
          example: '1'
        description: 'Upvest API version (Note: Do not include quotation marks)'
    post:
      operationId: create_topup
      summary: Trigger a top-up
      description: Triggers the creation of a top-up payment.
      tags:
        - Top-ups
      security:
        - oauth-client-credentials:
            - topups:admin
      parameters:
        - name: idempotency-key
          in: header
          required: true
          schema:
            type: string
            format: uuid
            pattern: >-
              ^[0-9a-fA-F]{8}-?[0-9a-fA-F]{4}-?[0-5][0-9a-fA-F]{3}-?[089abAB][0-9a-fA-F]{3}-?[0-9a-fA-F]{12}$
            example: ccb07f42-4104-44ad-8e1f-c660bb7b269c
          description: >
            A UUID to be used as an idempotency key.  This prevents a duplicate
            request from being replayed.

            https://docs.upvest.co/documentation/concepts/api_concepts/idempotency
      requestBody:
        content:
          application/json:
            schema:
              title: Payments - Top up - Create - Request
              type: object
              properties:
                account_group_id:
                  title: Account group unique identifier.
                  type: string
                  description: Account group unique identifier.
                  format: uuid
                cash_amount:
                  type: string
                  pattern: ^[0-9]{1,9}(\.[0-9]{2})?$
                currency:
                  type: string
                  description: >-
                    Alphabetic three-letter [ISO
                    4217](https://en.wikipedia.org/wiki/ISO_4217) currency code.

                    * EUR - Euro
                  enum:
                    - EUR
                  default: EUR
              required:
                - account_group_id
                - cash_amount
                - currency
              additionalProperties: false
            example:
              account_group_id: 1ea60f56-b67b-61fc-829a-0242ac130003
              cash_amount: '200.00'
              currency: EUR
      responses:
        '200':
          description: Top-up created.
          headers:
            upvest-request-id:
              required: true
              schema:
                type: string
                format: uuid
                example: 169ae4c7-ebd7-4041-94da-25369653eba7
          content:
            application/json:
              schema:
                type: object
                properties:
                  id:
                    title: Top up request unique identifier.
                    type: string
                    description: Top up request unique identifier.
                    format: uuid
                  created_at:
                    type: string
                    format: date-time
                    description: >-
                      Date and time when the resource was created. [RFC
                      3339-5](https://datatracker.ietf.org/doc/html/rfc3339#section-5.6),
                      [ISO8601
                      UTC](https://www.iso.org/iso-8601-date-and-time-format.html)
                  account_group_id:
                    title: Account group unique identifier.
                    type: string
                    description: Account group unique identifier.
                    format: uuid
                  cash_amount:
                    type: string
                    pattern: ^[0-9]{1,9}(\.[0-9]{2})?$
                  currency:
                    type: string
                    description: >-
                      Alphabetic three-letter [ISO
                      4217](https://en.wikipedia.org/wiki/ISO_4217) currency
                      code.

                      * EUR - Euro
                    enum:
                      - EUR
                    default: EUR
                  settlement_reference:
                    type: string
                    maxLength: 130
                    pattern: ^[0-9A-Za-z+?/\-:()\.,'; ]{0,130}$
                    description: >-
                      Settlement reference to be included in the corresponding
                      bank transfer to settle this top up.
                  status:
                    type: string
                    description: |-
                      Status of the top up
                      * CONFIRMED - The top up is created and confirmed.
                      * SETTLED - The top up is settled.
                      * CANCELLED - The top up is cancelled
                    enum:
                      - CONFIRMED
                      - SETTLED
                      - CANCELLED
                required:
                  - id
                  - created_at
                  - account_group_id
                  - cash_amount
                  - currency
                additionalProperties: false
              example:
                id: 1ab4fef9-a097-4c6f-9345-647025d5fde6
                created_at: '2020-08-24T14:15:22Z'
                account_group_id: 1ea60f56-b67b-61fc-829a-0242ac130003
                cash_amount: '200.00'
                currency: EUR
                status: CONFIRMED
                settlement_reference: 1ab4fef9-a097-4c6f-9345-647025d5fde6
        '400':
          description: Bad Request. The incoming request had a malformed parameter/object.
          headers:
            upvest-request-id:
              required: true
              schema:
                type: string
                format: uuid
                example: 169ae4c7-ebd7-4041-94da-25369653eba7
          content:
            application/problem+json:
              schema:
                title: Error
                type: object
                description: ''
                properties:
                  type:
                    type: string
                    description: URL to a document describing the error condition.
                  status:
                    type: integer
                    description: >-
                      Transmission of the HTTP status code so that all
                      information can be found in one place, but also to correct
                      changes in the status code due to the use of proxy
                      servers.
                  title:
                    type: string
                    description: >-
                      A short, human-readable title for the general error type;
                      the title should not change for given types.
                  detail:
                    type: string
                    description: A human-readable description of the specific error.
                  instance:
                    type: string
                    description: >-
                      This optional key may be present, with a unique URI for
                      the specific error; this will often point to an error log
                      for that specific response.
                  request_id:
                    type: string
                    description: Correlation ID for the original request.
                required:
                  - type
                  - status
                additionalProperties: false
              example:
                status: 400
                type: bad_request
        '401':
          description: Unauthorized. The caller has not been authenticated.
          headers:
            upvest-request-id:
              required: true
              schema:
                type: string
                format: uuid
                example: 169ae4c7-ebd7-4041-94da-25369653eba7
          content:
            application/problem+json:
              schema:
                title: Error
                type: object
                description: ''
                properties:
                  type:
                    type: string
                    description: URL to a document describing the error condition.
                  status:
                    type: integer
                    description: >-
                      Transmission of the HTTP status code so that all
                      information can be found in one place, but also to correct
                      changes in the status code due to the use of proxy
                      servers.
                  title:
                    type: string
                    description: >-
                      A short, human-readable title for the general error type;
                      the title should not change for given types.
                  detail:
                    type: string
                    description: A human-readable description of the specific error.
                  instance:
                    type: string
                    description: >-
                      This optional key may be present, with a unique URI for
                      the specific error; this will often point to an error log
                      for that specific response.
                  request_id:
                    type: string
                    description: Correlation ID for the original request.
                required:
                  - type
                  - status
                additionalProperties: false
              example:
                status: 401
                type: unauthorized
        '403':
          description: >-
            Forbidden. The caller has been authenticated but is not allowed to
            take the requested action.
          headers:
            upvest-request-id:
              required: true
              schema:
                type: string
                format: uuid
                example: 169ae4c7-ebd7-4041-94da-25369653eba7
          content:
            application/problem+json:
              schema:
                title: Error
                type: object
                description: ''
                properties:
                  type:
                    type: string
                    description: URL to a document describing the error condition.
                  status:
                    type: integer
                    description: >-
                      Transmission of the HTTP status code so that all
                      information can be found in one place, but also to correct
                      changes in the status code due to the use of proxy
                      servers.
                  title:
                    type: string
                    description: >-
                      A short, human-readable title for the general error type;
                      the title should not change for given types.
                  detail:
                    type: string
                    description: A human-readable description of the specific error.
                  instance:
                    type: string
                    description: >-
                      This optional key may be present, with a unique URI for
                      the specific error; this will often point to an error log
                      for that specific response.
                  request_id:
                    type: string
                    description: Correlation ID for the original request.
                required:
                  - type
                  - status
                additionalProperties: false
              example:
                status: 403
                type: forbidden
        '404':
          description: Not Found. The requested resource could not be found.
          headers:
            upvest-request-id:
              required: true
              schema:
                type: string
                format: uuid
                example: 169ae4c7-ebd7-4041-94da-25369653eba7
          content:
            application/problem+json:
              schema:
                title: Error
                type: object
                description: ''
                properties:
                  type:
                    type: string
                    description: URL to a document describing the error condition.
                  status:
                    type: integer
                    description: >-
                      Transmission of the HTTP status code so that all
                      information can be found in one place, but also to correct
                      changes in the status code due to the use of proxy
                      servers.
                  title:
                    type: string
                    description: >-
                      A short, human-readable title for the general error type;
                      the title should not change for given types.
                  detail:
                    type: string
                    description: A human-readable description of the specific error.
                  instance:
                    type: string
                    description: >-
                      This optional key may be present, with a unique URI for
                      the specific error; this will often point to an error log
                      for that specific response.
                  request_id:
                    type: string
                    description: Correlation ID for the original request.
                required:
                  - type
                  - status
                additionalProperties: false
              example:
                status: 404
                type: not_found
        '406':
          description: >-
            Not Acceptable. The resource does not have a current representation
            that would be acceptable to the user agent. "Accept" header defined
            unsupported value.
          headers:
            upvest-request-id:
              required: true
              schema:
                type: string
                format: uuid
                example: 169ae4c7-ebd7-4041-94da-25369653eba7
          content:
            application/problem+json:
              schema:
                title: Error
                type: object
                description: ''
                properties:
                  type:
                    type: string
                    description: URL to a document describing the error condition.
                  status:
                    type: integer
                    description: >-
                      Transmission of the HTTP status code so that all
                      information can be found in one place, but also to correct
                      changes in the status code due to the use of proxy
                      servers.
                  title:
                    type: string
                    description: >-
                      A short, human-readable title for the general error type;
                      the title should not change for given types.
                  detail:
                    type: string
                    description: A human-readable description of the specific error.
                  instance:
                    type: string
                    description: >-
                      This optional key may be present, with a unique URI for
                      the specific error; this will often point to an error log
                      for that specific response.
                  request_id:
                    type: string
                    description: Correlation ID for the original request.
                required:
                  - type
                  - status
                additionalProperties: false
              example:
                status: 406
                type: not_acceptable
        '429':
          description: >-
            Too Many Requests. The caller has exceeded their quota for the time
            period and has been throttled.
          headers:
            upvest-request-id:
              required: true
              schema:
                type: string
                format: uuid
                example: 169ae4c7-ebd7-4041-94da-25369653eba7
          content:
            application/problem+json:
              schema:
                title: Error
                type: object
                description: ''
                properties:
                  type:
                    type: string
                    description: URL to a document describing the error condition.
                  status:
                    type: integer
                    description: >-
                      Transmission of the HTTP status code so that all
                      information can be found in one place, but also to correct
                      changes in the status code due to the use of proxy
                      servers.
                  title:
                    type: string
                    description: >-
                      A short, human-readable title for the general error type;
                      the title should not change for given types.
                  detail:
                    type: string
                    description: A human-readable description of the specific error.
                  instance:
                    type: string
                    description: >-
                      This optional key may be present, with a unique URI for
                      the specific error; this will often point to an error log
                      for that specific response.
                  request_id:
                    type: string
                    description: Correlation ID for the original request.
                required:
                  - type
                  - status
                additionalProperties: false
              example:
                status: 429
                type: too_many_requests
        '500':
          description: Internal Server Error. The service encountered an unexpected error.
          headers:
            upvest-request-id:
              required: true
              schema:
                type: string
                format: uuid
                example: 169ae4c7-ebd7-4041-94da-25369653eba7
          content:
            application/problem+json:
              schema:
                title: Error
                type: object
                description: ''
                properties:
                  type:
                    type: string
                    description: URL to a document describing the error condition.
                  status:
                    type: integer
                    description: >-
                      Transmission of the HTTP status code so that all
                      information can be found in one place, but also to correct
                      changes in the status code due to the use of proxy
                      servers.
                  title:
                    type: string
                    description: >-
                      A short, human-readable title for the general error type;
                      the title should not change for given types.
                  detail:
                    type: string
                    description: A human-readable description of the specific error.
                  instance:
                    type: string
                    description: >-
                      This optional key may be present, with a unique URI for
                      the specific error; this will often point to an error log
                      for that specific response.
                  request_id:
                    type: string
                    description: Correlation ID for the original request.
                required:
                  - type
                  - status
                additionalProperties: false
              example:
                status: 500
                type: internal_server_error
        '503':
          description: >-
            Service Unavailable. The service handling for this request cannot be
            reached at this time.
          headers:
            upvest-request-id:
              required: true
              schema:
                type: string
                format: uuid
                example: 169ae4c7-ebd7-4041-94da-25369653eba7
          content:
            application/problem+json:
              schema:
                title: Error
                type: object
                description: ''
                properties:
                  type:
                    type: string
                    description: URL to a document describing the error condition.
                  status:
                    type: integer
                    description: >-
                      Transmission of the HTTP status code so that all
                      information can be found in one place, but also to correct
                      changes in the status code due to the use of proxy
                      servers.
                  title:
                    type: string
                    description: >-
                      A short, human-readable title for the general error type;
                      the title should not change for given types.
                  detail:
                    type: string
                    description: A human-readable description of the specific error.
                  instance:
                    type: string
                    description: >-
                      This optional key may be present, with a unique URI for
                      the specific error; this will often point to an error log
                      for that specific response.
                  request_id:
                    type: string
                    description: Correlation ID for the original request.
                required:
                  - type
                  - status
                additionalProperties: false
              example:
                status: 503
                type: method_not_allowed
        '504':
          description: >-
            Gateway Timeout. The service gateway has reached its internal
            timeout.
          headers:
            upvest-request-id:
              required: true
              schema:
                type: string
                format: uuid
                example: 169ae4c7-ebd7-4041-94da-25369653eba7
          content:
            application/problem+json:
              schema:
                title: Error
                type: object
                description: ''
                properties:
                  type:
                    type: string
                    description: URL to a document describing the error condition.
                  status:
                    type: integer
                    description: >-
                      Transmission of the HTTP status code so that all
                      information can be found in one place, but also to correct
                      changes in the status code due to the use of proxy
                      servers.
                  title:
                    type: string
                    description: >-
                      A short, human-readable title for the general error type;
                      the title should not change for given types.
                  detail:
                    type: string
                    description: A human-readable description of the specific error.
                  instance:
                    type: string
                    description: >-
                      This optional key may be present, with a unique URI for
                      the specific error; this will often point to an error log
                      for that specific response.
                  request_id:
                    type: string
                    description: Correlation ID for the original request.
                required:
                  - type
                  - status
                additionalProperties: false
              example:
                status: 504
                type: gateway_timeout
  /payments/topups/{topup_id}:
    parameters:
      - name: topup_id
        in: path
        required: true
        schema:
          title: Top up request unique identifier.
          type: string
          description: Top up request unique identifier.
          format: uuid
      - name: upvest-client-id
        in: header
        description: Tenant Client ID
        required: true
        schema:
          type: string
          format: uuid
          example: ebabcf4d-61c3-4942-875c-e265a7c2d062
      - name: authorization
        in: header
        description: |
          Bearer (access) token from the OAuth flow with correct scopes.
          https://datatracker.ietf.org/doc/html/rfc6750
        required: true
        schema:
          type: string
          pattern: ^Bearer [a-zA-Z0-9\-\._~+/]*=*
          example: Bearer c2VjcmV0Cg==
      - name: signature
        in: header
        required: true
        schema:
          type: string
        description: >-
          https://tools.ietf.org/id/draft-ietf-httpbis-message-signatures-01.html#name-the-signature-http-header
      - name: signature-input
        in: header
        required: true
        schema:
          type: string
        description: >-
          https://tools.ietf.org/id/draft-ietf-httpbis-message-signatures-01.html#name-the-signature-input-http-he
      - name: upvest-api-version
        in: header
        required: false
        schema:
          type: string
          enum:
            - '1'
          default: '1'
          example: '1'
        description: 'Upvest API version (Note: Do not include quotation marks)'
    get:
      operationId: retrieve_topup
      summary: Retrieve a top-up by ID
      description: Returns a top-up specified by its ID.
      tags:
        - Top-ups
      security:
        - oauth-client-credentials:
            - topups:admin
            - topups:read
      responses:
        '200':
          description: OK.
          headers:
            upvest-request-id:
              required: true
              schema:
                type: string
                format: uuid
                example: 169ae4c7-ebd7-4041-94da-25369653eba7
          content:
            application/json:
              schema:
                type: object
                properties:
                  id:
                    title: Top up request unique identifier.
                    type: string
                    description: Top up request unique identifier.
                    format: uuid
                  created_at:
                    type: string
                    format: date-time
                    description: >-
                      Date and time when the resource was created. [RFC
                      3339-5](https://datatracker.ietf.org/doc/html/rfc3339#section-5.6),
                      [ISO8601
                      UTC](https://www.iso.org/iso-8601-date-and-time-format.html)
                  account_group_id:
                    title: Account group unique identifier.
                    type: string
                    description: Account group unique identifier.
                    format: uuid
                  cash_amount:
                    type: string
                    pattern: ^[0-9]{1,9}(\.[0-9]{2})?$
                  currency:
                    type: string
                    description: >-
                      Alphabetic three-letter [ISO
                      4217](https://en.wikipedia.org/wiki/ISO_4217) currency
                      code.

                      * EUR - Euro
                    enum:
                      - EUR
                    default: EUR
                  settlement_reference:
                    type: string
                    maxLength: 130
                    pattern: ^[0-9A-Za-z+?/\-:()\.,'; ]{0,130}$
                    description: >-
                      Settlement reference to be included in the corresponding
                      bank transfer to settle this top up.
                  status:
                    type: string
                    description: |-
                      Status of the top up
                      * CONFIRMED - The top up is created and confirmed.
                      * SETTLED - The top up is settled.
                      * CANCELLED - The top up is cancelled
                    enum:
                      - CONFIRMED
                      - SETTLED
                      - CANCELLED
                required:
                  - id
                  - created_at
                  - account_group_id
                  - cash_amount
                  - currency
                additionalProperties: false
              example:
                id: 1ab4fef9-a097-4c6f-9345-647025d5fde6
                created_at: '2020-08-24T14:15:22Z'
                account_group_id: 1ea60f56-b67b-61fc-829a-0242ac130003
                cash_amount: '200.00'
                currency: EUR
                status: CONFIRMED
        '401':
          description: Unauthorized. The caller has not been authenticated.
          headers:
            upvest-request-id:
              required: true
              schema:
                type: string
                format: uuid
                example: 169ae4c7-ebd7-4041-94da-25369653eba7
          content:
            application/problem+json:
              schema:
                title: Error
                type: object
                description: ''
                properties:
                  type:
                    type: string
                    description: URL to a document describing the error condition.
                  status:
                    type: integer
                    description: >-
                      Transmission of the HTTP status code so that all
                      information can be found in one place, but also to correct
                      changes in the status code due to the use of proxy
                      servers.
                  title:
                    type: string
                    description: >-
                      A short, human-readable title for the general error type;
                      the title should not change for given types.
                  detail:
                    type: string
                    description: A human-readable description of the specific error.
                  instance:
                    type: string
                    description: >-
                      This optional key may be present, with a unique URI for
                      the specific error; this will often point to an error log
                      for that specific response.
                  request_id:
                    type: string
                    description: Correlation ID for the original request.
                required:
                  - type
                  - status
                additionalProperties: false
              example:
                status: 401
                type: unauthorized
        '403':
          description: >-
            Forbidden. The caller has been authenticated but is not allowed to
            take the requested action.
          headers:
            upvest-request-id:
              required: true
              schema:
                type: string
                format: uuid
                example: 169ae4c7-ebd7-4041-94da-25369653eba7
          content:
            application/problem+json:
              schema:
                title: Error
                type: object
                description: ''
                properties:
                  type:
                    type: string
                    description: URL to a document describing the error condition.
                  status:
                    type: integer
                    description: >-
                      Transmission of the HTTP status code so that all
                      information can be found in one place, but also to correct
                      changes in the status code due to the use of proxy
                      servers.
                  title:
                    type: string
                    description: >-
                      A short, human-readable title for the general error type;
                      the title should not change for given types.
                  detail:
                    type: string
                    description: A human-readable description of the specific error.
                  instance:
                    type: string
                    description: >-
                      This optional key may be present, with a unique URI for
                      the specific error; this will often point to an error log
                      for that specific response.
                  request_id:
                    type: string
                    description: Correlation ID for the original request.
                required:
                  - type
                  - status
                additionalProperties: false
              example:
                status: 403
                type: forbidden
        '404':
          description: Not Found. The requested resource could not be found.
          headers:
            upvest-request-id:
              required: true
              schema:
                type: string
                format: uuid
                example: 169ae4c7-ebd7-4041-94da-25369653eba7
          content:
            application/problem+json:
              schema:
                title: Error
                type: object
                description: ''
                properties:
                  type:
                    type: string
                    description: URL to a document describing the error condition.
                  status:
                    type: integer
                    description: >-
                      Transmission of the HTTP status code so that all
                      information can be found in one place, but also to correct
                      changes in the status code due to the use of proxy
                      servers.
                  title:
                    type: string
                    description: >-
                      A short, human-readable title for the general error type;
                      the title should not change for given types.
                  detail:
                    type: string
                    description: A human-readable description of the specific error.
                  instance:
                    type: string
                    description: >-
                      This optional key may be present, with a unique URI for
                      the specific error; this will often point to an error log
                      for that specific response.
                  request_id:
                    type: string
                    description: Correlation ID for the original request.
                required:
                  - type
                  - status
                additionalProperties: false
              example:
                status: 404
                type: not_found
        '406':
          description: >-
            Not Acceptable. The resource does not have a current representation
            that would be acceptable to the user agent. "Accept" header defined
            unsupported value.
          headers:
            upvest-request-id:
              required: true
              schema:
                type: string
                format: uuid
                example: 169ae4c7-ebd7-4041-94da-25369653eba7
          content:
            application/problem+json:
              schema:
                title: Error
                type: object
                description: ''
                properties:
                  type:
                    type: string
                    description: URL to a document describing the error condition.
                  status:
                    type: integer
                    description: >-
                      Transmission of the HTTP status code so that all
                      information can be found in one place, but also to correct
                      changes in the status code due to the use of proxy
                      servers.
                  title:
                    type: string
                    description: >-
                      A short, human-readable title for the general error type;
                      the title should not change for given types.
                  detail:
                    type: string
                    description: A human-readable description of the specific error.
                  instance:
                    type: string
                    description: >-
                      This optional key may be present, with a unique URI for
                      the specific error; this will often point to an error log
                      for that specific response.
                  request_id:
                    type: string
                    description: Correlation ID for the original request.
                required:
                  - type
                  - status
                additionalProperties: false
              example:
                status: 406
                type: not_acceptable
        '429':
          description: >-
            Too Many Requests. The caller has exceeded their quota for the time
            period and has been throttled.
          headers:
            upvest-request-id:
              required: true
              schema:
                type: string
                format: uuid
                example: 169ae4c7-ebd7-4041-94da-25369653eba7
          content:
            application/problem+json:
              schema:
                title: Error
                type: object
                description: ''
                properties:
                  type:
                    type: string
                    description: URL to a document describing the error condition.
                  status:
                    type: integer
                    description: >-
                      Transmission of the HTTP status code so that all
                      information can be found in one place, but also to correct
                      changes in the status code due to the use of proxy
                      servers.
                  title:
                    type: string
                    description: >-
                      A short, human-readable title for the general error type;
                      the title should not change for given types.
                  detail:
                    type: string
                    description: A human-readable description of the specific error.
                  instance:
                    type: string
                    description: >-
                      This optional key may be present, with a unique URI for
                      the specific error; this will often point to an error log
                      for that specific response.
                  request_id:
                    type: string
                    description: Correlation ID for the original request.
                required:
                  - type
                  - status
                additionalProperties: false
              example:
                status: 429
                type: too_many_requests
        '500':
          description: Internal Server Error. The service encountered an unexpected error.
          headers:
            upvest-request-id:
              required: true
              schema:
                type: string
                format: uuid
                example: 169ae4c7-ebd7-4041-94da-25369653eba7
          content:
            application/problem+json:
              schema:
                title: Error
                type: object
                description: ''
                properties:
                  type:
                    type: string
                    description: URL to a document describing the error condition.
                  status:
                    type: integer
                    description: >-
                      Transmission of the HTTP status code so that all
                      information can be found in one place, but also to correct
                      changes in the status code due to the use of proxy
                      servers.
                  title:
                    type: string
                    description: >-
                      A short, human-readable title for the general error type;
                      the title should not change for given types.
                  detail:
                    type: string
                    description: A human-readable description of the specific error.
                  instance:
                    type: string
                    description: >-
                      This optional key may be present, with a unique URI for
                      the specific error; this will often point to an error log
                      for that specific response.
                  request_id:
                    type: string
                    description: Correlation ID for the original request.
                required:
                  - type
                  - status
                additionalProperties: false
              example:
                status: 500
                type: internal_server_error
        '503':
          description: >-
            Service Unavailable. The service handling for this request cannot be
            reached at this time.
          headers:
            upvest-request-id:
              required: true
              schema:
                type: string
                format: uuid
                example: 169ae4c7-ebd7-4041-94da-25369653eba7
          content:
            application/problem+json:
              schema:
                title: Error
                type: object
                description: ''
                properties:
                  type:
                    type: string
                    description: URL to a document describing the error condition.
                  status:
                    type: integer
                    description: >-
                      Transmission of the HTTP status code so that all
                      information can be found in one place, but also to correct
                      changes in the status code due to the use of proxy
                      servers.
                  title:
                    type: string
                    description: >-
                      A short, human-readable title for the general error type;
                      the title should not change for given types.
                  detail:
                    type: string
                    description: A human-readable description of the specific error.
                  instance:
                    type: string
                    description: >-
                      This optional key may be present, with a unique URI for
                      the specific error; this will often point to an error log
                      for that specific response.
                  request_id:
                    type: string
                    description: Correlation ID for the original request.
                required:
                  - type
                  - status
                additionalProperties: false
              example:
                status: 503
                type: method_not_allowed
        '504':
          description: >-
            Gateway Timeout. The service gateway has reached its internal
            timeout.
          headers:
            upvest-request-id:
              required: true
              schema:
                type: string
                format: uuid
                example: 169ae4c7-ebd7-4041-94da-25369653eba7
          content:
            application/problem+json:
              schema:
                title: Error
                type: object
                description: ''
                properties:
                  type:
                    type: string
                    description: URL to a document describing the error condition.
                  status:
                    type: integer
                    description: >-
                      Transmission of the HTTP status code so that all
                      information can be found in one place, but also to correct
                      changes in the status code due to the use of proxy
                      servers.
                  title:
                    type: string
                    description: >-
                      A short, human-readable title for the general error type;
                      the title should not change for given types.
                  detail:
                    type: string
                    description: A human-readable description of the specific error.
                  instance:
                    type: string
                    description: >-
                      This optional key may be present, with a unique URI for
                      the specific error; this will often point to an error log
                      for that specific response.
                  request_id:
                    type: string
                    description: Correlation ID for the original request.
                required:
                  - type
                  - status
                additionalProperties: false
              example:
                status: 504
                type: gateway_timeout
    delete:
      operationId: cancel_topup
      summary: Cancel a top-up by ID
      description: >-
        Cancels a top-up specified by its ID. It is only possible to cancel a
        top-up if it has the status `NEW` or `CONFIRMED`.
      tags:
        - Top-ups
      security:
        - oauth-client-credentials:
            - topups:admin
      responses:
        '204':
          description: Request has been processed successfully.
          headers:
            upvest-request-id:
              required: true
              schema:
                type: string
                format: uuid
                example: 169ae4c7-ebd7-4041-94da-25369653eba7
        '401':
          description: Unauthorized. The caller has not been authenticated.
          headers:
            upvest-request-id:
              required: true
              schema:
                type: string
                format: uuid
                example: 169ae4c7-ebd7-4041-94da-25369653eba7
          content:
            application/problem+json:
              schema:
                title: Error
                type: object
                description: ''
                properties:
                  type:
                    type: string
                    description: URL to a document describing the error condition.
                  status:
                    type: integer
                    description: >-
                      Transmission of the HTTP status code so that all
                      information can be found in one place, but also to correct
                      changes in the status code due to the use of proxy
                      servers.
                  title:
                    type: string
                    description: >-
                      A short, human-readable title for the general error type;
                      the title should not change for given types.
                  detail:
                    type: string
                    description: A human-readable description of the specific error.
                  instance:
                    type: string
                    description: >-
                      This optional key may be present, with a unique URI for
                      the specific error; this will often point to an error log
                      for that specific response.
                  request_id:
                    type: string
                    description: Correlation ID for the original request.
                required:
                  - type
                  - status
                additionalProperties: false
              example:
                status: 401
                type: unauthorized
        '403':
          description: >-
            Forbidden. The caller has been authenticated but is not allowed to
            take the requested action.
          headers:
            upvest-request-id:
              required: true
              schema:
                type: string
                format: uuid
                example: 169ae4c7-ebd7-4041-94da-25369653eba7
          content:
            application/problem+json:
              schema:
                title: Error
                type: object
                description: ''
                properties:
                  type:
                    type: string
                    description: URL to a document describing the error condition.
                  status:
                    type: integer
                    description: >-
                      Transmission of the HTTP status code so that all
                      information can be found in one place, but also to correct
                      changes in the status code due to the use of proxy
                      servers.
                  title:
                    type: string
                    description: >-
                      A short, human-readable title for the general error type;
                      the title should not change for given types.
                  detail:
                    type: string
                    description: A human-readable description of the specific error.
                  instance:
                    type: string
                    description: >-
                      This optional key may be present, with a unique URI for
                      the specific error; this will often point to an error log
                      for that specific response.
                  request_id:
                    type: string
                    description: Correlation ID for the original request.
                required:
                  - type
                  - status
                additionalProperties: false
              example:
                status: 403
                type: forbidden
        '404':
          description: Not Found. The requested resource could not be found.
          headers:
            upvest-request-id:
              required: true
              schema:
                type: string
                format: uuid
                example: 169ae4c7-ebd7-4041-94da-25369653eba7
          content:
            application/problem+json:
              schema:
                title: Error
                type: object
                description: ''
                properties:
                  type:
                    type: string
                    description: URL to a document describing the error condition.
                  status:
                    type: integer
                    description: >-
                      Transmission of the HTTP status code so that all
                      information can be found in one place, but also to correct
                      changes in the status code due to the use of proxy
                      servers.
                  title:
                    type: string
                    description: >-
                      A short, human-readable title for the general error type;
                      the title should not change for given types.
                  detail:
                    type: string
                    description: A human-readable description of the specific error.
                  instance:
                    type: string
                    description: >-
                      This optional key may be present, with a unique URI for
                      the specific error; this will often point to an error log
                      for that specific response.
                  request_id:
                    type: string
                    description: Correlation ID for the original request.
                required:
                  - type
                  - status
                additionalProperties: false
              example:
                status: 404
                type: not_found
        '422':
          description: >-
            Unprocessable Entity. The syntax of request is correct but server
            can't process it due a semantic error.
          headers:
            upvest-request-id:
              required: true
              schema:
                type: string
                format: uuid
                example: 169ae4c7-ebd7-4041-94da-25369653eba7
          content:
            application/problem+json:
              schema:
                title: Error
                type: object
                description: ''
                properties:
                  type:
                    type: string
                    description: URL to a document describing the error condition.
                  status:
                    type: integer
                    description: >-
                      Transmission of the HTTP status code so that all
                      information can be found in one place, but also to correct
                      changes in the status code due to the use of proxy
                      servers.
                  title:
                    type: string
                    description: >-
                      A short, human-readable title for the general error type;
                      the title should not change for given types.
                  detail:
                    type: string
                    description: A human-readable description of the specific error.
                  instance:
                    type: string
                    description: >-
                      This optional key may be present, with a unique URI for
                      the specific error; this will often point to an error log
                      for that specific response.
                  request_id:
                    type: string
                    description: Correlation ID for the original request.
                required:
                  - type
                  - status
                additionalProperties: false
              example:
                status: 422
                type: unprocessable_entity
        '429':
          description: >-
            Too Many Requests. The caller has exceeded their quota for the time
            period and has been throttled.
          headers:
            upvest-request-id:
              required: true
              schema:
                type: string
                format: uuid
                example: 169ae4c7-ebd7-4041-94da-25369653eba7
          content:
            application/problem+json:
              schema:
                title: Error
                type: object
                description: ''
                properties:
                  type:
                    type: string
                    description: URL to a document describing the error condition.
                  status:
                    type: integer
                    description: >-
                      Transmission of the HTTP status code so that all
                      information can be found in one place, but also to correct
                      changes in the status code due to the use of proxy
                      servers.
                  title:
                    type: string
                    description: >-
                      A short, human-readable title for the general error type;
                      the title should not change for given types.
                  detail:
                    type: string
                    description: A human-readable description of the specific error.
                  instance:
                    type: string
                    description: >-
                      This optional key may be present, with a unique URI for
                      the specific error; this will often point to an error log
                      for that specific response.
                  request_id:
                    type: string
                    description: Correlation ID for the original request.
                required:
                  - type
                  - status
                additionalProperties: false
              example:
                status: 429
                type: too_many_requests
        '500':
          description: Internal Server Error. The service encountered an unexpected error.
          headers:
            upvest-request-id:
              required: true
              schema:
                type: string
                format: uuid
                example: 169ae4c7-ebd7-4041-94da-25369653eba7
          content:
            application/problem+json:
              schema:
                title: Error
                type: object
                description: ''
                properties:
                  type:
                    type: string
                    description: URL to a document describing the error condition.
                  status:
                    type: integer
                    description: >-
                      Transmission of the HTTP status code so that all
                      information can be found in one place, but also to correct
                      changes in the status code due to the use of proxy
                      servers.
                  title:
                    type: string
                    description: >-
                      A short, human-readable title for the general error type;
                      the title should not change for given types.
                  detail:
                    type: string
                    description: A human-readable description of the specific error.
                  instance:
                    type: string
                    description: >-
                      This optional key may be present, with a unique URI for
                      the specific error; this will often point to an error log
                      for that specific response.
                  request_id:
                    type: string
                    description: Correlation ID for the original request.
                required:
                  - type
                  - status
                additionalProperties: false
              example:
                status: 500
                type: internal_server_error
        '503':
          description: >-
            Service Unavailable. The service handling for this request cannot be
            reached at this time.
          headers:
            upvest-request-id:
              required: true
              schema:
                type: string
                format: uuid
                example: 169ae4c7-ebd7-4041-94da-25369653eba7
          content:
            application/problem+json:
              schema:
                title: Error
                type: object
                description: ''
                properties:
                  type:
                    type: string
                    description: URL to a document describing the error condition.
                  status:
                    type: integer
                    description: >-
                      Transmission of the HTTP status code so that all
                      information can be found in one place, but also to correct
                      changes in the status code due to the use of proxy
                      servers.
                  title:
                    type: string
                    description: >-
                      A short, human-readable title for the general error type;
                      the title should not change for given types.
                  detail:
                    type: string
                    description: A human-readable description of the specific error.
                  instance:
                    type: string
                    description: >-
                      This optional key may be present, with a unique URI for
                      the specific error; this will often point to an error log
                      for that specific response.
                  request_id:
                    type: string
                    description: Correlation ID for the original request.
                required:
                  - type
                  - status
                additionalProperties: false
              example:
                status: 503
                type: method_not_allowed
        '504':
          description: >-
            Gateway Timeout. The service gateway has reached its internal
            timeout.
          headers:
            upvest-request-id:
              required: true
              schema:
                type: string
                format: uuid
                example: 169ae4c7-ebd7-4041-94da-25369653eba7
          content:
            application/problem+json:
              schema:
                title: Error
                type: object
                description: ''
                properties:
                  type:
                    type: string
                    description: URL to a document describing the error condition.
                  status:
                    type: integer
                    description: >-
                      Transmission of the HTTP status code so that all
                      information can be found in one place, but also to correct
                      changes in the status code due to the use of proxy
                      servers.
                  title:
                    type: string
                    description: >-
                      A short, human-readable title for the general error type;
                      the title should not change for given types.
                  detail:
                    type: string
                    description: A human-readable description of the specific error.
                  instance:
                    type: string
                    description: >-
                      This optional key may be present, with a unique URI for
                      the specific error; this will often point to an error log
                      for that specific response.
                  request_id:
                    type: string
                    description: Correlation ID for the original request.
                required:
                  - type
                  - status
                additionalProperties: false
              example:
                status: 504
                type: gateway_timeout
  /account_groups/{account_group_id}/payments/credit_funding_details:
    parameters:
      - name: account_group_id
        in: path
        required: true
        schema:
          title: Account group unique identifier.
          type: string
          description: Account group unique identifier.
          format: uuid
      - name: upvest-client-id
        in: header
        description: Tenant Client ID
        required: true
        schema:
          type: string
          format: uuid
          example: ebabcf4d-61c3-4942-875c-e265a7c2d062
      - name: authorization
        in: header
        description: |
          Bearer (access) token from the OAuth flow with correct scopes.
          https://datatracker.ietf.org/doc/html/rfc6750
        required: true
        schema:
          type: string
          pattern: ^Bearer [a-zA-Z0-9\-\._~+/]*=*
          example: Bearer c2VjcmV0Cg==
      - name: signature
        in: header
        required: true
        schema:
          type: string
        description: >-
          https://tools.ietf.org/id/draft-ietf-httpbis-message-signatures-01.html#name-the-signature-http-header
      - name: signature-input
        in: header
        required: true
        schema:
          type: string
        description: >-
          https://tools.ietf.org/id/draft-ietf-httpbis-message-signatures-01.html#name-the-signature-input-http-he
      - name: upvest-api-version
        in: header
        required: false
        schema:
          type: string
          enum:
            - '1'
          default: '1'
          example: '1'
        description: 'Upvest API version (Note: Do not include quotation marks)'
    get:
      operationId: retrieve_funding_details
      summary: Retrieve funding details
      description: Retrieve funding details
      tags:
        - Credit Fundings
      security:
        - oauth-client-credentials:
            - payments:admin
            - payments:read
      parameters:
        - name: limit
          in: query
          schema:
            type: integer
            format: int32
            default: 100
            minimum: 0
            maximum: 1000
          allowEmptyValue: true
          description: >-
            Use the `limit` argument to specify the maximum number of items
            returned.
        - name: offset
          in: query
          schema:
            type: integer
            minimum: 0
            format: int32
          allowEmptyValue: true
          description: >-
            Use the `offset` argument to specify where in the list of results to
            start when returning items for a particular query.
      responses:
        '200':
          description: Funding Details
          headers:
            upvest-request-id:
              required: true
              schema:
                type: string
                format: uuid
                example: 169ae4c7-ebd7-4041-94da-25369653eba7
          content:
            application/json:
              schema:
                type: object
                properties:
                  meta:
                    type: object
                    properties:
                      offset:
                        type: integer
                        description: Amount of resource to offset in the response.
                      limit:
                        type: integer
                        description: Total limit of the response.
                      count:
                        type: integer
                        description: Count of the resources returned in the response.
                      total_count:
                        type: integer
                        description: Total count of all the resources.
                      sort:
                        type: string
                        description: The field that the list is sorted by.
                      order:
                        type: string
                        description: |-
                          The ordering of the response.
                          * ASC - Ascending order
                          * DESC - Descending order
                        enum:
                          - ASC
                          - DESC
                    required:
                      - offset
                      - limit
                      - count
                      - total_count
                  data:
                    type: array
                    items:
                      type: object
                      properties:
                        virtual_bank_account_id:
                          title: Virtual bank account request unique identifier.
                          type: string
                          description: Virtual bank account request unique identifier.
                          format: uuid
                        name:
                          type: string
                          description: >-
                            Name of the recipient account for the SEPA Credit
                            Transfer
                        currency:
                          type: string
                          description: >-
                            Alphabetic three-letter [ISO
                            4217](https://en.wikipedia.org/wiki/ISO_4217)
                            currency code.

                            * EUR - Euro
                          enum:
                            - EUR
                          default: EUR
                        owner:
                          type: object
                          description: Owner of the virtual bank account
                          properties:
                            name:
                              type: string
                              description: Name of the owner of the virtual bank account
                          required:
                            - name
                          additionalProperties: false
                        identification:
                          type: object
                          description: Identification details
                          properties:
                            swift:
                              type: object
                              description: SWIFT details
                              properties:
                                iban:
                                  title: International Bank Account Number (IBAN)
                                  type: string
                                  description: >-
                                    International Bank Account Number
                                    [IBAN](https://en.wikipedia.org/wiki/International_Bank_Account_Number).
                                  pattern: ^[A-Z]{2}[0-9]{2}[A-Z0-9]{11,26}$
                                bic:
                                  title: Business Identifier Code
                                  type: string
                                  description: >-
                                    Business Identifier Code (also known as
                                    SWIFT-BIC, BIC, SWIFT ID or SWIFT code) [ISO
                                    9362](https://en.wikipedia.org/wiki/ISO_9362).
                                  pattern: ^[A-Z]{6}[A-Z0-9]{2}([A-Z0-9]{3})?$
                              required:
                                - iban
                                - bic
                              additionalProperties: false
                          additionalProperties: false
                        remittance_information:
                          type: string
                          description: >-
                            Payment reference the one that should be used for
                            SEPA Credit Transfer
                      required:
                        - currency
                        - owner
                        - identification
                      additionalProperties: false
                required:
                  - meta
                  - data
                additionalProperties: false
              example:
                meta:
                  offset: 0
                  limit: 100
                  count: 1
                  total_count: 1
                  sort: created_at
                  order: ASC
                data:
                  - virtual_bank_account_id: 4e127ac5-dae3-487e-b76b-fef7225a8b80
                    name: Max's Virtual Bank Account
                    currency: EUR
                    owner:
                      name: Max Musterman
                    identification:
                      swift:
                        iban: DE02100500000054540402
                        bic: DEUTDEFFXXX
                  - virtual_bank_account_id: a38470db-f54c-4514-ad71-6904a5c2744f
                    name: Max's Virtual Bank Account
                    currency: EUR
                    owner:
                      name: Max Musterman
                    identification:
                      swift:
                        iban: DE02100500000054540403
                        bic: DEUTDEFFXXX
        '400':
          description: Bad Request. The incoming request had a malformed parameter/object.
          headers:
            upvest-request-id:
              required: true
              schema:
                type: string
                format: uuid
                example: 169ae4c7-ebd7-4041-94da-25369653eba7
          content:
            application/problem+json:
              schema:
                title: Error
                type: object
                description: ''
                properties:
                  type:
                    type: string
                    description: URL to a document describing the error condition.
                  status:
                    type: integer
                    description: >-
                      Transmission of the HTTP status code so that all
                      information can be found in one place, but also to correct
                      changes in the status code due to the use of proxy
                      servers.
                  title:
                    type: string
                    description: >-
                      A short, human-readable title for the general error type;
                      the title should not change for given types.
                  detail:
                    type: string
                    description: A human-readable description of the specific error.
                  instance:
                    type: string
                    description: >-
                      This optional key may be present, with a unique URI for
                      the specific error; this will often point to an error log
                      for that specific response.
                  request_id:
                    type: string
                    description: Correlation ID for the original request.
                required:
                  - type
                  - status
                additionalProperties: false
              example:
                status: 400
                type: bad_request
        '401':
          description: Unauthorized. The caller has not been authenticated.
          headers:
            upvest-request-id:
              required: true
              schema:
                type: string
                format: uuid
                example: 169ae4c7-ebd7-4041-94da-25369653eba7
          content:
            application/problem+json:
              schema:
                title: Error
                type: object
                description: ''
                properties:
                  type:
                    type: string
                    description: URL to a document describing the error condition.
                  status:
                    type: integer
                    description: >-
                      Transmission of the HTTP status code so that all
                      information can be found in one place, but also to correct
                      changes in the status code due to the use of proxy
                      servers.
                  title:
                    type: string
                    description: >-
                      A short, human-readable title for the general error type;
                      the title should not change for given types.
                  detail:
                    type: string
                    description: A human-readable description of the specific error.
                  instance:
                    type: string
                    description: >-
                      This optional key may be present, with a unique URI for
                      the specific error; this will often point to an error log
                      for that specific response.
                  request_id:
                    type: string
                    description: Correlation ID for the original request.
                required:
                  - type
                  - status
                additionalProperties: false
              example:
                status: 401
                type: unauthorized
        '403':
          description: >-
            Forbidden. The caller has been authenticated but is not allowed to
            take the requested action.
          headers:
            upvest-request-id:
              required: true
              schema:
                type: string
                format: uuid
                example: 169ae4c7-ebd7-4041-94da-25369653eba7
          content:
            application/problem+json:
              schema:
                title: Error
                type: object
                description: ''
                properties:
                  type:
                    type: string
                    description: URL to a document describing the error condition.
                  status:
                    type: integer
                    description: >-
                      Transmission of the HTTP status code so that all
                      information can be found in one place, but also to correct
                      changes in the status code due to the use of proxy
                      servers.
                  title:
                    type: string
                    description: >-
                      A short, human-readable title for the general error type;
                      the title should not change for given types.
                  detail:
                    type: string
                    description: A human-readable description of the specific error.
                  instance:
                    type: string
                    description: >-
                      This optional key may be present, with a unique URI for
                      the specific error; this will often point to an error log
                      for that specific response.
                  request_id:
                    type: string
                    description: Correlation ID for the original request.
                required:
                  - type
                  - status
                additionalProperties: false
              example:
                status: 403
                type: forbidden
        '404':
          description: Not Found. The requested resource could not be found.
          headers:
            upvest-request-id:
              required: true
              schema:
                type: string
                format: uuid
                example: 169ae4c7-ebd7-4041-94da-25369653eba7
          content:
            application/problem+json:
              schema:
                title: Error
                type: object
                description: ''
                properties:
                  type:
                    type: string
                    description: URL to a document describing the error condition.
                  status:
                    type: integer
                    description: >-
                      Transmission of the HTTP status code so that all
                      information can be found in one place, but also to correct
                      changes in the status code due to the use of proxy
                      servers.
                  title:
                    type: string
                    description: >-
                      A short, human-readable title for the general error type;
                      the title should not change for given types.
                  detail:
                    type: string
                    description: A human-readable description of the specific error.
                  instance:
                    type: string
                    description: >-
                      This optional key may be present, with a unique URI for
                      the specific error; this will often point to an error log
                      for that specific response.
                  request_id:
                    type: string
                    description: Correlation ID for the original request.
                required:
                  - type
                  - status
                additionalProperties: false
              example:
                status: 404
                type: not_found
        '406':
          description: >-
            Not Acceptable. The resource does not have a current representation
            that would be acceptable to the user agent. "Accept" header defined
            unsupported value.
          headers:
            upvest-request-id:
              required: true
              schema:
                type: string
                format: uuid
                example: 169ae4c7-ebd7-4041-94da-25369653eba7
          content:
            application/problem+json:
              schema:
                title: Error
                type: object
                description: ''
                properties:
                  type:
                    type: string
                    description: URL to a document describing the error condition.
                  status:
                    type: integer
                    description: >-
                      Transmission of the HTTP status code so that all
                      information can be found in one place, but also to correct
                      changes in the status code due to the use of proxy
                      servers.
                  title:
                    type: string
                    description: >-
                      A short, human-readable title for the general error type;
                      the title should not change for given types.
                  detail:
                    type: string
                    description: A human-readable description of the specific error.
                  instance:
                    type: string
                    description: >-
                      This optional key may be present, with a unique URI for
                      the specific error; this will often point to an error log
                      for that specific response.
                  request_id:
                    type: string
                    description: Correlation ID for the original request.
                required:
                  - type
                  - status
                additionalProperties: false
              example:
                status: 406
                type: not_acceptable
        '429':
          description: >-
            Too Many Requests. The caller has exceeded their quota for the time
            period and has been throttled.
          headers:
            upvest-request-id:
              required: true
              schema:
                type: string
                format: uuid
                example: 169ae4c7-ebd7-4041-94da-25369653eba7
          content:
            application/problem+json:
              schema:
                title: Error
                type: object
                description: ''
                properties:
                  type:
                    type: string
                    description: URL to a document describing the error condition.
                  status:
                    type: integer
                    description: >-
                      Transmission of the HTTP status code so that all
                      information can be found in one place, but also to correct
                      changes in the status code due to the use of proxy
                      servers.
                  title:
                    type: string
                    description: >-
                      A short, human-readable title for the general error type;
                      the title should not change for given types.
                  detail:
                    type: string
                    description: A human-readable description of the specific error.
                  instance:
                    type: string
                    description: >-
                      This optional key may be present, with a unique URI for
                      the specific error; this will often point to an error log
                      for that specific response.
                  request_id:
                    type: string
                    description: Correlation ID for the original request.
                required:
                  - type
                  - status
                additionalProperties: false
              example:
                status: 429
                type: too_many_requests
        '500':
          description: Internal Server Error. The service encountered an unexpected error.
          headers:
            upvest-request-id:
              required: true
              schema:
                type: string
                format: uuid
                example: 169ae4c7-ebd7-4041-94da-25369653eba7
          content:
            application/problem+json:
              schema:
                title: Error
                type: object
                description: ''
                properties:
                  type:
                    type: string
                    description: URL to a document describing the error condition.
                  status:
                    type: integer
                    description: >-
                      Transmission of the HTTP status code so that all
                      information can be found in one place, but also to correct
                      changes in the status code due to the use of proxy
                      servers.
                  title:
                    type: string
                    description: >-
                      A short, human-readable title for the general error type;
                      the title should not change for given types.
                  detail:
                    type: string
                    description: A human-readable description of the specific error.
                  instance:
                    type: string
                    description: >-
                      This optional key may be present, with a unique URI for
                      the specific error; this will often point to an error log
                      for that specific response.
                  request_id:
                    type: string
                    description: Correlation ID for the original request.
                required:
                  - type
                  - status
                additionalProperties: false
              example:
                status: 500
                type: internal_server_error
        '503':
          description: >-
            Service Unavailable. The service handling for this request cannot be
            reached at this time.
          headers:
            upvest-request-id:
              required: true
              schema:
                type: string
                format: uuid
                example: 169ae4c7-ebd7-4041-94da-25369653eba7
          content:
            application/problem+json:
              schema:
                title: Error
                type: object
                description: ''
                properties:
                  type:
                    type: string
                    description: URL to a document describing the error condition.
                  status:
                    type: integer
                    description: >-
                      Transmission of the HTTP status code so that all
                      information can be found in one place, but also to correct
                      changes in the status code due to the use of proxy
                      servers.
                  title:
                    type: string
                    description: >-
                      A short, human-readable title for the general error type;
                      the title should not change for given types.
                  detail:
                    type: string
                    description: A human-readable description of the specific error.
                  instance:
                    type: string
                    description: >-
                      This optional key may be present, with a unique URI for
                      the specific error; this will often point to an error log
                      for that specific response.
                  request_id:
                    type: string
                    description: Correlation ID for the original request.
                required:
                  - type
                  - status
                additionalProperties: false
              example:
                status: 503
                type: method_not_allowed
        '504':
          description: >-
            Gateway Timeout. The service gateway has reached its internal
            timeout.
          headers:
            upvest-request-id:
              required: true
              schema:
                type: string
                format: uuid
                example: 169ae4c7-ebd7-4041-94da-25369653eba7
          content:
            application/problem+json:
              schema:
                title: Error
                type: object
                description: ''
                properties:
                  type:
                    type: string
                    description: URL to a document describing the error condition.
                  status:
                    type: integer
                    description: >-
                      Transmission of the HTTP status code so that all
                      information can be found in one place, but also to correct
                      changes in the status code due to the use of proxy
                      servers.
                  title:
                    type: string
                    description: >-
                      A short, human-readable title for the general error type;
                      the title should not change for given types.
                  detail:
                    type: string
                    description: A human-readable description of the specific error.
                  instance:
                    type: string
                    description: >-
                      This optional key may be present, with a unique URI for
                      the specific error; this will often point to an error log
                      for that specific response.
                  request_id:
                    type: string
                    description: Correlation ID for the original request.
                required:
                  - type
                  - status
                additionalProperties: false
              example:
                status: 504
                type: gateway_timeout
  /account_groups/{account_group_id}/payments/credit_fundings:
    parameters:
      - name: account_group_id
        in: path
        required: true
        schema:
          title: Account group unique identifier.
          type: string
          description: Account group unique identifier.
          format: uuid
      - name: upvest-client-id
        in: header
        description: Tenant Client ID
        required: true
        schema:
          type: string
          format: uuid
          example: ebabcf4d-61c3-4942-875c-e265a7c2d062
      - name: authorization
        in: header
        description: |
          Bearer (access) token from the OAuth flow with correct scopes.
          https://datatracker.ietf.org/doc/html/rfc6750
        required: true
        schema:
          type: string
          pattern: ^Bearer [a-zA-Z0-9\-\._~+/]*=*
          example: Bearer c2VjcmV0Cg==
      - name: signature
        in: header
        required: true
        schema:
          type: string
        description: >-
          https://tools.ietf.org/id/draft-ietf-httpbis-message-signatures-01.html#name-the-signature-http-header
      - name: signature-input
        in: header
        required: true
        schema:
          type: string
        description: >-
          https://tools.ietf.org/id/draft-ietf-httpbis-message-signatures-01.html#name-the-signature-input-http-he
      - name: upvest-api-version
        in: header
        required: false
        schema:
          type: string
          enum:
            - '1'
          default: '1'
          example: '1'
        description: 'Upvest API version (Note: Do not include quotation marks)'
    get:
      operationId: list_credit_fundings
      summary: List credit fundings
      description: List credit fundings
      tags:
        - Credit Fundings
      security:
        - oauth-client-credentials:
            - credit_fundings:read
            - payments:admin
            - payments:read
      parameters:
        - name: sort
          in: query
          required: false
          schema:
            type: string
            enum:
              - created_at
            default: created_at
          description: Field of resource to sort by
          example: created_at
        - name: order
          in: query
          required: false
          schema:
            type: string
            enum:
              - ASC
              - DESC
            default: ASC
          description: >-
            Sort order of the result list if the `sort` parameter is specified.
            Use `ASC` for ascending or `DESC` for descending sort order.
        - name: limit
          in: query
          schema:
            type: integer
            format: int32
            default: 100
            minimum: 0
            maximum: 1000
          allowEmptyValue: true
          description: >-
            Use the `limit` argument to specify the maximum number of items
            returned.
        - name: offset
          in: query
          schema:
            type: integer
            minimum: 0
            format: int32
          allowEmptyValue: true
          description: >-
            Use the `offset` argument to specify where in the list of results to
            start when returning items for a particular query.
      responses:
        '200':
          description: Credit Funding list
          headers:
            upvest-request-id:
              required: true
              schema:
                type: string
                format: uuid
                example: 169ae4c7-ebd7-4041-94da-25369653eba7
          content:
            application/json:
              schema:
                title: Payments - Credit Fundings List - Response
                type: object
                properties:
                  meta:
                    type: object
                    properties:
                      offset:
                        type: integer
                        description: Amount of resource to offset in the response.
                      limit:
                        type: integer
                        description: Total limit of the response.
                      count:
                        type: integer
                        description: Count of the resources returned in the response.
                      total_count:
                        type: integer
                        description: Total count of all the resources.
                      sort:
                        type: string
                        description: The field that the list is sorted by.
                      order:
                        type: string
                        description: |-
                          The ordering of the response.
                          * ASC - Ascending order
                          * DESC - Descending order
                        enum:
                          - ASC
                          - DESC
                    required:
                      - offset
                      - limit
                      - count
                      - total_count
                  data:
                    type: array
                    items:
                      type: object
                      properties:
                        id:
                          title: Credit Funding request unique identifier
                          type: string
                          description: Credit Funding request unique identifier
                          format: uuid
                        created_at:
                          type: string
                          format: date-time
                          description: >-
                            Date and time when the resource was created. [RFC
                            3339-5](https://datatracker.ietf.org/doc/html/rfc3339#section-5.6),
                            [ISO8601
                            UTC](https://www.iso.org/iso-8601-date-and-time-format.html)
                        account_group_id:
                          title: Account group unique identifier.
                          type: string
                          description: Account group unique identifier.
                          format: uuid
                        cash_amount:
                          type: string
                          pattern: ^[0-9]{1,9}(\.[0-9]{2})?$
                        currency:
                          type: string
                          description: >-
                            Alphabetic three-letter [ISO
                            4217](https://en.wikipedia.org/wiki/ISO_4217)
                            currency code.

                            * EUR - Euro
                          enum:
                            - EUR
                          default: EUR
                        status:
                          type: string
                          description: |-
                            Status of the credit funding
                            * CONFIRMED - Credit Funding was confirmed.
                            * CANCELLED - Credit Funding was cancelled.
                          enum:
                            - CONFIRMED
                            - CANCELLED
                        remittance_information:
                          type: string
                          description: >-
                            Payment reference the one that was used by the end
                            user for the corresponding SEPA Credit Transfer
                        counterparty:
                          type: object
                          properties:
                            identification:
                              type: object
                              properties:
                                name:
                                  type: string
                                  description: Name of the counterparty
                              required:
                                - name
                            account:
                              type: object
                              properties:
                                identification:
                                  type: object
                                  properties:
                                    iban:
                                      title: International Bank Account Number (IBAN)
                                      type: string
                                      description: >-
                                        International Bank Account Number
                                        [IBAN](https://en.wikipedia.org/wiki/International_Bank_Account_Number).
                                      pattern: ^[A-Z]{2}[0-9]{2}[A-Z0-9]{11,26}$
                                  required:
                                    - iban
                              required:
                                - identification
                          required:
                            - identification
                            - account
                        virtual_bank_account_id:
                          title: Virtual bank account request unique identifier.
                          type: string
                          description: Virtual bank account request unique identifier.
                          format: uuid
                        purpose_code:
                          type: string
                          maxLength: 4
                          description: >-
                            Purpose of the payment based on
                            *ExternalPurpose1Code* from [ISO
                            20022](https://www.iso20022.org/catalogue-messages/additional-content-messages/external-code-sets).
                      required:
                        - id
                        - created_at
                        - account_group_id
                        - cash_amount
                        - currency
                        - remittance_information
                        - counterparty
                      additionalProperties: false
                required:
                  - meta
                  - data
                additionalProperties: false
              example:
                meta:
                  offset: 0
                  limit: 100
                  count: 1
                  total_count: 1
                  sort: id
                  order: ASC
                data:
                  - id: 1ab4fef9-a097-4c6f-9345-647025d5fde6
                    created_at: '2020-08-24T14:15:22Z'
                    account_group_id: 1ea60f56-b67b-61fc-829a-0242ac130003
                    cash_amount: '200.00'
                    currency: EUR
                    status: CONFIRMED
                    remittance_information: CF123456789
                    counterparty:
                      identification:
                        name: Max Musterman
                      account:
                        identification:
                          iban: DE02100500000054540402
                    virtual_bank_account_id: ab8f9b19-6a31-48d3-b201-4dee92f3da0d
                    purpose_code: OTHR
        '400':
          description: Bad Request. The incoming request had a malformed parameter/object.
          headers:
            upvest-request-id:
              required: true
              schema:
                type: string
                format: uuid
                example: 169ae4c7-ebd7-4041-94da-25369653eba7
          content:
            application/problem+json:
              schema:
                title: Error
                type: object
                description: ''
                properties:
                  type:
                    type: string
                    description: URL to a document describing the error condition.
                  status:
                    type: integer
                    description: >-
                      Transmission of the HTTP status code so that all
                      information can be found in one place, but also to correct
                      changes in the status code due to the use of proxy
                      servers.
                  title:
                    type: string
                    description: >-
                      A short, human-readable title for the general error type;
                      the title should not change for given types.
                  detail:
                    type: string
                    description: A human-readable description of the specific error.
                  instance:
                    type: string
                    description: >-
                      This optional key may be present, with a unique URI for
                      the specific error; this will often point to an error log
                      for that specific response.
                  request_id:
                    type: string
                    description: Correlation ID for the original request.
                required:
                  - type
                  - status
                additionalProperties: false
              example:
                status: 400
                type: bad_request
        '401':
          description: Unauthorized. The caller has not been authenticated.
          headers:
            upvest-request-id:
              required: true
              schema:
                type: string
                format: uuid
                example: 169ae4c7-ebd7-4041-94da-25369653eba7
          content:
            application/problem+json:
              schema:
                title: Error
                type: object
                description: ''
                properties:
                  type:
                    type: string
                    description: URL to a document describing the error condition.
                  status:
                    type: integer
                    description: >-
                      Transmission of the HTTP status code so that all
                      information can be found in one place, but also to correct
                      changes in the status code due to the use of proxy
                      servers.
                  title:
                    type: string
                    description: >-
                      A short, human-readable title for the general error type;
                      the title should not change for given types.
                  detail:
                    type: string
                    description: A human-readable description of the specific error.
                  instance:
                    type: string
                    description: >-
                      This optional key may be present, with a unique URI for
                      the specific error; this will often point to an error log
                      for that specific response.
                  request_id:
                    type: string
                    description: Correlation ID for the original request.
                required:
                  - type
                  - status
                additionalProperties: false
              example:
                status: 401
                type: unauthorized
        '403':
          description: >-
            Forbidden. The caller has been authenticated but is not allowed to
            take the requested action.
          headers:
            upvest-request-id:
              required: true
              schema:
                type: string
                format: uuid
                example: 169ae4c7-ebd7-4041-94da-25369653eba7
          content:
            application/problem+json:
              schema:
                title: Error
                type: object
                description: ''
                properties:
                  type:
                    type: string
                    description: URL to a document describing the error condition.
                  status:
                    type: integer
                    description: >-
                      Transmission of the HTTP status code so that all
                      information can be found in one place, but also to correct
                      changes in the status code due to the use of proxy
                      servers.
                  title:
                    type: string
                    description: >-
                      A short, human-readable title for the general error type;
                      the title should not change for given types.
                  detail:
                    type: string
                    description: A human-readable description of the specific error.
                  instance:
                    type: string
                    description: >-
                      This optional key may be present, with a unique URI for
                      the specific error; this will often point to an error log
                      for that specific response.
                  request_id:
                    type: string
                    description: Correlation ID for the original request.
                required:
                  - type
                  - status
                additionalProperties: false
              example:
                status: 403
                type: forbidden
        '404':
          description: Not Found. The requested resource could not be found.
          headers:
            upvest-request-id:
              required: true
              schema:
                type: string
                format: uuid
                example: 169ae4c7-ebd7-4041-94da-25369653eba7
          content:
            application/problem+json:
              schema:
                title: Error
                type: object
                description: ''
                properties:
                  type:
                    type: string
                    description: URL to a document describing the error condition.
                  status:
                    type: integer
                    description: >-
                      Transmission of the HTTP status code so that all
                      information can be found in one place, but also to correct
                      changes in the status code due to the use of proxy
                      servers.
                  title:
                    type: string
                    description: >-
                      A short, human-readable title for the general error type;
                      the title should not change for given types.
                  detail:
                    type: string
                    description: A human-readable description of the specific error.
                  instance:
                    type: string
                    description: >-
                      This optional key may be present, with a unique URI for
                      the specific error; this will often point to an error log
                      for that specific response.
                  request_id:
                    type: string
                    description: Correlation ID for the original request.
                required:
                  - type
                  - status
                additionalProperties: false
              example:
                status: 404
                type: not_found
        '406':
          description: >-
            Not Acceptable. The resource does not have a current representation
            that would be acceptable to the user agent. "Accept" header defined
            unsupported value.
          headers:
            upvest-request-id:
              required: true
              schema:
                type: string
                format: uuid
                example: 169ae4c7-ebd7-4041-94da-25369653eba7
          content:
            application/problem+json:
              schema:
                title: Error
                type: object
                description: ''
                properties:
                  type:
                    type: string
                    description: URL to a document describing the error condition.
                  status:
                    type: integer
                    description: >-
                      Transmission of the HTTP status code so that all
                      information can be found in one place, but also to correct
                      changes in the status code due to the use of proxy
                      servers.
                  title:
                    type: string
                    description: >-
                      A short, human-readable title for the general error type;
                      the title should not change for given types.
                  detail:
                    type: string
                    description: A human-readable description of the specific error.
                  instance:
                    type: string
                    description: >-
                      This optional key may be present, with a unique URI for
                      the specific error; this will often point to an error log
                      for that specific response.
                  request_id:
                    type: string
                    description: Correlation ID for the original request.
                required:
                  - type
                  - status
                additionalProperties: false
              example:
                status: 406
                type: not_acceptable
        '429':
          description: >-
            Too Many Requests. The caller has exceeded their quota for the time
            period and has been throttled.
          headers:
            upvest-request-id:
              required: true
              schema:
                type: string
                format: uuid
                example: 169ae4c7-ebd7-4041-94da-25369653eba7
          content:
            application/problem+json:
              schema:
                title: Error
                type: object
                description: ''
                properties:
                  type:
                    type: string
                    description: URL to a document describing the error condition.
                  status:
                    type: integer
                    description: >-
                      Transmission of the HTTP status code so that all
                      information can be found in one place, but also to correct
                      changes in the status code due to the use of proxy
                      servers.
                  title:
                    type: string
                    description: >-
                      A short, human-readable title for the general error type;
                      the title should not change for given types.
                  detail:
                    type: string
                    description: A human-readable description of the specific error.
                  instance:
                    type: string
                    description: >-
                      This optional key may be present, with a unique URI for
                      the specific error; this will often point to an error log
                      for that specific response.
                  request_id:
                    type: string
                    description: Correlation ID for the original request.
                required:
                  - type
                  - status
                additionalProperties: false
              example:
                status: 429
                type: too_many_requests
        '500':
          description: Internal Server Error. The service encountered an unexpected error.
          headers:
            upvest-request-id:
              required: true
              schema:
                type: string
                format: uuid
                example: 169ae4c7-ebd7-4041-94da-25369653eba7
          content:
            application/problem+json:
              schema:
                title: Error
                type: object
                description: ''
                properties:
                  type:
                    type: string
                    description: URL to a document describing the error condition.
                  status:
                    type: integer
                    description: >-
                      Transmission of the HTTP status code so that all
                      information can be found in one place, but also to correct
                      changes in the status code due to the use of proxy
                      servers.
                  title:
                    type: string
                    description: >-
                      A short, human-readable title for the general error type;
                      the title should not change for given types.
                  detail:
                    type: string
                    description: A human-readable description of the specific error.
                  instance:
                    type: string
                    description: >-
                      This optional key may be present, with a unique URI for
                      the specific error; this will often point to an error log
                      for that specific response.
                  request_id:
                    type: string
                    description: Correlation ID for the original request.
                required:
                  - type
                  - status
                additionalProperties: false
              example:
                status: 500
                type: internal_server_error
        '503':
          description: >-
            Service Unavailable. The service handling for this request cannot be
            reached at this time.
          headers:
            upvest-request-id:
              required: true
              schema:
                type: string
                format: uuid
                example: 169ae4c7-ebd7-4041-94da-25369653eba7
          content:
            application/problem+json:
              schema:
                title: Error
                type: object
                description: ''
                properties:
                  type:
                    type: string
                    description: URL to a document describing the error condition.
                  status:
                    type: integer
                    description: >-
                      Transmission of the HTTP status code so that all
                      information can be found in one place, but also to correct
                      changes in the status code due to the use of proxy
                      servers.
                  title:
                    type: string
                    description: >-
                      A short, human-readable title for the general error type;
                      the title should not change for given types.
                  detail:
                    type: string
                    description: A human-readable description of the specific error.
                  instance:
                    type: string
                    description: >-
                      This optional key may be present, with a unique URI for
                      the specific error; this will often point to an error log
                      for that specific response.
                  request_id:
                    type: string
                    description: Correlation ID for the original request.
                required:
                  - type
                  - status
                additionalProperties: false
              example:
                status: 503
                type: method_not_allowed
        '504':
          description: >-
            Gateway Timeout. The service gateway has reached its internal
            timeout.
          headers:
            upvest-request-id:
              required: true
              schema:
                type: string
                format: uuid
                example: 169ae4c7-ebd7-4041-94da-25369653eba7
          content:
            application/problem+json:
              schema:
                title: Error
                type: object
                description: ''
                properties:
                  type:
                    type: string
                    description: URL to a document describing the error condition.
                  status:
                    type: integer
                    description: >-
                      Transmission of the HTTP status code so that all
                      information can be found in one place, but also to correct
                      changes in the status code due to the use of proxy
                      servers.
                  title:
                    type: string
                    description: >-
                      A short, human-readable title for the general error type;
                      the title should not change for given types.
                  detail:
                    type: string
                    description: A human-readable description of the specific error.
                  instance:
                    type: string
                    description: >-
                      This optional key may be present, with a unique URI for
                      the specific error; this will often point to an error log
                      for that specific response.
                  request_id:
                    type: string
                    description: Correlation ID for the original request.
                required:
                  - type
                  - status
                additionalProperties: false
              example:
                status: 504
                type: gateway_timeout
  /payments/credit_fundings/{credit_funding_id}:
    parameters:
      - name: credit_funding_id
        in: path
        required: true
        schema:
          title: Credit Funding request unique identifier
          type: string
          description: Credit Funding request unique identifier
          format: uuid
      - name: upvest-client-id
        in: header
        description: Tenant Client ID
        required: true
        schema:
          type: string
          format: uuid
          example: ebabcf4d-61c3-4942-875c-e265a7c2d062
      - name: authorization
        in: header
        description: |
          Bearer (access) token from the OAuth flow with correct scopes.
          https://datatracker.ietf.org/doc/html/rfc6750
        required: true
        schema:
          type: string
          pattern: ^Bearer [a-zA-Z0-9\-\._~+/]*=*
          example: Bearer c2VjcmV0Cg==
      - name: signature
        in: header
        required: true
        schema:
          type: string
        description: >-
          https://tools.ietf.org/id/draft-ietf-httpbis-message-signatures-01.html#name-the-signature-http-header
      - name: signature-input
        in: header
        required: true
        schema:
          type: string
        description: >-
          https://tools.ietf.org/id/draft-ietf-httpbis-message-signatures-01.html#name-the-signature-input-http-he
      - name: upvest-api-version
        in: header
        required: false
        schema:
          type: string
          enum:
            - '1'
          default: '1'
          example: '1'
        description: 'Upvest API version (Note: Do not include quotation marks)'
    get:
      operationId: retrieve_credit_funding
      summary: Retrieve a credit funding
      description: Retrieve a credit funding
      tags:
        - Credit Fundings
      security:
        - oauth-client-credentials:
            - credit_fundings:read
            - payments:admin
            - payments:read
      responses:
        '200':
          description: Credit Funding payment
          headers:
            upvest-request-id:
              required: true
              schema:
                type: string
                format: uuid
                example: 169ae4c7-ebd7-4041-94da-25369653eba7
          content:
            application/json:
              schema:
                type: object
                properties:
                  id:
                    title: Credit Funding request unique identifier
                    type: string
                    description: Credit Funding request unique identifier
                    format: uuid
                  created_at:
                    type: string
                    format: date-time
                    description: >-
                      Date and time when the resource was created. [RFC
                      3339-5](https://datatracker.ietf.org/doc/html/rfc3339#section-5.6),
                      [ISO8601
                      UTC](https://www.iso.org/iso-8601-date-and-time-format.html)
                  account_group_id:
                    title: Account group unique identifier.
                    type: string
                    description: Account group unique identifier.
                    format: uuid
                  cash_amount:
                    type: string
                    pattern: ^[0-9]{1,9}(\.[0-9]{2})?$
                  currency:
                    type: string
                    description: >-
                      Alphabetic three-letter [ISO
                      4217](https://en.wikipedia.org/wiki/ISO_4217) currency
                      code.

                      * EUR - Euro
                    enum:
                      - EUR
                    default: EUR
                  status:
                    type: string
                    description: |-
                      Status of the credit funding
                      * CONFIRMED - Credit Funding was confirmed.
                      * CANCELLED - Credit Funding was cancelled.
                    enum:
                      - CONFIRMED
                      - CANCELLED
                  remittance_information:
                    type: string
                    description: >-
                      Payment reference the one that was used by the end user
                      for the corresponding SEPA Credit Transfer
                  counterparty:
                    type: object
                    properties:
                      identification:
                        type: object
                        properties:
                          name:
                            type: string
                            description: Name of the counterparty
                        required:
                          - name
                      account:
                        type: object
                        properties:
                          identification:
                            type: object
                            properties:
                              iban:
                                title: International Bank Account Number (IBAN)
                                type: string
                                description: >-
                                  International Bank Account Number
                                  [IBAN](https://en.wikipedia.org/wiki/International_Bank_Account_Number).
                                pattern: ^[A-Z]{2}[0-9]{2}[A-Z0-9]{11,26}$
                            required:
                              - iban
                        required:
                          - identification
                    required:
                      - identification
                      - account
                  virtual_bank_account_id:
                    title: Virtual bank account request unique identifier.
                    type: string
                    description: Virtual bank account request unique identifier.
                    format: uuid
                  purpose_code:
                    type: string
                    maxLength: 4
                    description: >-
                      Purpose of the payment based on *ExternalPurpose1Code*
                      from [ISO
                      20022](https://www.iso20022.org/catalogue-messages/additional-content-messages/external-code-sets).
                required:
                  - id
                  - created_at
                  - account_group_id
                  - cash_amount
                  - currency
                  - remittance_information
                  - counterparty
                additionalProperties: false
              example:
                id: 1ab4fef9-a097-4c6f-9345-647025d5fde6
                created_at: '2020-08-24T14:15:22Z'
                account_group_id: 1ea60f56-b67b-61fc-829a-0242ac130003
                cash_amount: '200.00'
                currency: EUR
                status: CONFIRMED
                remittance_information: CF123456789
                counterparty:
                  identification:
                    name: Max Musterman
                  account:
                    identification:
                      iban: DE02100500000054540402
                virtual_bank_account_id: ab8f9b19-6a31-48d3-b201-4dee92f3da0d
                purpose_code: OTHR
        '401':
          description: Unauthorized. The caller has not been authenticated.
          headers:
            upvest-request-id:
              required: true
              schema:
                type: string
                format: uuid
                example: 169ae4c7-ebd7-4041-94da-25369653eba7
          content:
            application/problem+json:
              schema:
                title: Error
                type: object
                description: ''
                properties:
                  type:
                    type: string
                    description: URL to a document describing the error condition.
                  status:
                    type: integer
                    description: >-
                      Transmission of the HTTP status code so that all
                      information can be found in one place, but also to correct
                      changes in the status code due to the use of proxy
                      servers.
                  title:
                    type: string
                    description: >-
                      A short, human-readable title for the general error type;
                      the title should not change for given types.
                  detail:
                    type: string
                    description: A human-readable description of the specific error.
                  instance:
                    type: string
                    description: >-
                      This optional key may be present, with a unique URI for
                      the specific error; this will often point to an error log
                      for that specific response.
                  request_id:
                    type: string
                    description: Correlation ID for the original request.
                required:
                  - type
                  - status
                additionalProperties: false
              example:
                status: 401
                type: unauthorized
        '403':
          description: >-
            Forbidden. The caller has been authenticated but is not allowed to
            take the requested action.
          headers:
            upvest-request-id:
              required: true
              schema:
                type: string
                format: uuid
                example: 169ae4c7-ebd7-4041-94da-25369653eba7
          content:
            application/problem+json:
              schema:
                title: Error
                type: object
                description: ''
                properties:
                  type:
                    type: string
                    description: URL to a document describing the error condition.
                  status:
                    type: integer
                    description: >-
                      Transmission of the HTTP status code so that all
                      information can be found in one place, but also to correct
                      changes in the status code due to the use of proxy
                      servers.
                  title:
                    type: string
                    description: >-
                      A short, human-readable title for the general error type;
                      the title should not change for given types.
                  detail:
                    type: string
                    description: A human-readable description of the specific error.
                  instance:
                    type: string
                    description: >-
                      This optional key may be present, with a unique URI for
                      the specific error; this will often point to an error log
                      for that specific response.
                  request_id:
                    type: string
                    description: Correlation ID for the original request.
                required:
                  - type
                  - status
                additionalProperties: false
              example:
                status: 403
                type: forbidden
        '404':
          description: Not Found. The requested resource could not be found.
          headers:
            upvest-request-id:
              required: true
              schema:
                type: string
                format: uuid
                example: 169ae4c7-ebd7-4041-94da-25369653eba7
          content:
            application/problem+json:
              schema:
                title: Error
                type: object
                description: ''
                properties:
                  type:
                    type: string
                    description: URL to a document describing the error condition.
                  status:
                    type: integer
                    description: >-
                      Transmission of the HTTP status code so that all
                      information can be found in one place, but also to correct
                      changes in the status code due to the use of proxy
                      servers.
                  title:
                    type: string
                    description: >-
                      A short, human-readable title for the general error type;
                      the title should not change for given types.
                  detail:
                    type: string
                    description: A human-readable description of the specific error.
                  instance:
                    type: string
                    description: >-
                      This optional key may be present, with a unique URI for
                      the specific error; this will often point to an error log
                      for that specific response.
                  request_id:
                    type: string
                    description: Correlation ID for the original request.
                required:
                  - type
                  - status
                additionalProperties: false
              example:
                status: 404
                type: not_found
        '406':
          description: >-
            Not Acceptable. The resource does not have a current representation
            that would be acceptable to the user agent. "Accept" header defined
            unsupported value.
          headers:
            upvest-request-id:
              required: true
              schema:
                type: string
                format: uuid
                example: 169ae4c7-ebd7-4041-94da-25369653eba7
          content:
            application/problem+json:
              schema:
                title: Error
                type: object
                description: ''
                properties:
                  type:
                    type: string
                    description: URL to a document describing the error condition.
                  status:
                    type: integer
                    description: >-
                      Transmission of the HTTP status code so that all
                      information can be found in one place, but also to correct
                      changes in the status code due to the use of proxy
                      servers.
                  title:
                    type: string
                    description: >-
                      A short, human-readable title for the general error type;
                      the title should not change for given types.
                  detail:
                    type: string
                    description: A human-readable description of the specific error.
                  instance:
                    type: string
                    description: >-
                      This optional key may be present, with a unique URI for
                      the specific error; this will often point to an error log
                      for that specific response.
                  request_id:
                    type: string
                    description: Correlation ID for the original request.
                required:
                  - type
                  - status
                additionalProperties: false
              example:
                status: 406
                type: not_acceptable
        '429':
          description: >-
            Too Many Requests. The caller has exceeded their quota for the time
            period and has been throttled.
          headers:
            upvest-request-id:
              required: true
              schema:
                type: string
                format: uuid
                example: 169ae4c7-ebd7-4041-94da-25369653eba7
          content:
            application/problem+json:
              schema:
                title: Error
                type: object
                description: ''
                properties:
                  type:
                    type: string
                    description: URL to a document describing the error condition.
                  status:
                    type: integer
                    description: >-
                      Transmission of the HTTP status code so that all
                      information can be found in one place, but also to correct
                      changes in the status code due to the use of proxy
                      servers.
                  title:
                    type: string
                    description: >-
                      A short, human-readable title for the general error type;
                      the title should not change for given types.
                  detail:
                    type: string
                    description: A human-readable description of the specific error.
                  instance:
                    type: string
                    description: >-
                      This optional key may be present, with a unique URI for
                      the specific error; this will often point to an error log
                      for that specific response.
                  request_id:
                    type: string
                    description: Correlation ID for the original request.
                required:
                  - type
                  - status
                additionalProperties: false
              example:
                status: 429
                type: too_many_requests
        '500':
          description: Internal Server Error. The service encountered an unexpected error.
          headers:
            upvest-request-id:
              required: true
              schema:
                type: string
                format: uuid
                example: 169ae4c7-ebd7-4041-94da-25369653eba7
          content:
            application/problem+json:
              schema:
                title: Error
                type: object
                description: ''
                properties:
                  type:
                    type: string
                    description: URL to a document describing the error condition.
                  status:
                    type: integer
                    description: >-
                      Transmission of the HTTP status code so that all
                      information can be found in one place, but also to correct
                      changes in the status code due to the use of proxy
                      servers.
                  title:
                    type: string
                    description: >-
                      A short, human-readable title for the general error type;
                      the title should not change for given types.
                  detail:
                    type: string
                    description: A human-readable description of the specific error.
                  instance:
                    type: string
                    description: >-
                      This optional key may be present, with a unique URI for
                      the specific error; this will often point to an error log
                      for that specific response.
                  request_id:
                    type: string
                    description: Correlation ID for the original request.
                required:
                  - type
                  - status
                additionalProperties: false
              example:
                status: 500
                type: internal_server_error
        '503':
          description: >-
            Service Unavailable. The service handling for this request cannot be
            reached at this time.
          headers:
            upvest-request-id:
              required: true
              schema:
                type: string
                format: uuid
                example: 169ae4c7-ebd7-4041-94da-25369653eba7
          content:
            application/problem+json:
              schema:
                title: Error
                type: object
                description: ''
                properties:
                  type:
                    type: string
                    description: URL to a document describing the error condition.
                  status:
                    type: integer
                    description: >-
                      Transmission of the HTTP status code so that all
                      information can be found in one place, but also to correct
                      changes in the status code due to the use of proxy
                      servers.
                  title:
                    type: string
                    description: >-
                      A short, human-readable title for the general error type;
                      the title should not change for given types.
                  detail:
                    type: string
                    description: A human-readable description of the specific error.
                  instance:
                    type: string
                    description: >-
                      This optional key may be present, with a unique URI for
                      the specific error; this will often point to an error log
                      for that specific response.
                  request_id:
                    type: string
                    description: Correlation ID for the original request.
                required:
                  - type
                  - status
                additionalProperties: false
              example:
                status: 503
                type: method_not_allowed
        '504':
          description: >-
            Gateway Timeout. The service gateway has reached its internal
            timeout.
          headers:
            upvest-request-id:
              required: true
              schema:
                type: string
                format: uuid
                example: 169ae4c7-ebd7-4041-94da-25369653eba7
          content:
            application/problem+json:
              schema:
                title: Error
                type: object
                description: ''
                properties:
                  type:
                    type: string
                    description: URL to a document describing the error condition.
                  status:
                    type: integer
                    description: >-
                      Transmission of the HTTP status code so that all
                      information can be found in one place, but also to correct
                      changes in the status code due to the use of proxy
                      servers.
                  title:
                    type: string
                    description: >-
                      A short, human-readable title for the general error type;
                      the title should not change for given types.
                  detail:
                    type: string
                    description: A human-readable description of the specific error.
                  instance:
                    type: string
                    description: >-
                      This optional key may be present, with a unique URI for
                      the specific error; this will often point to an error log
                      for that specific response.
                  request_id:
                    type: string
                    description: Correlation ID for the original request.
                required:
                  - type
                  - status
                additionalProperties: false
              example:
                status: 504
                type: gateway_timeout
  /payments/withdrawals:
    parameters:
      - name: upvest-client-id
        in: header
        description: Tenant Client ID
        required: true
        schema:
          type: string
          format: uuid
          example: ebabcf4d-61c3-4942-875c-e265a7c2d062
      - name: authorization
        in: header
        description: |
          Bearer (access) token from the OAuth flow with correct scopes.
          https://datatracker.ietf.org/doc/html/rfc6750
        required: true
        schema:
          type: string
          pattern: ^Bearer [a-zA-Z0-9\-\._~+/]*=*
          example: Bearer c2VjcmV0Cg==
      - name: signature
        in: header
        required: true
        schema:
          type: string
        description: >-
          https://tools.ietf.org/id/draft-ietf-httpbis-message-signatures-01.html#name-the-signature-http-header
      - name: signature-input
        in: header
        required: true
        schema:
          type: string
        description: >-
          https://tools.ietf.org/id/draft-ietf-httpbis-message-signatures-01.html#name-the-signature-input-http-he
      - name: upvest-api-version
        in: header
        required: false
        schema:
          type: string
          enum:
            - '1'
          default: '1'
          example: '1'
        description: 'Upvest API version (Note: Do not include quotation marks)'
    post:
      operationId: create_cash_withdrawal
      summary: Trigger a withdrawal
      description: Trigger a withdrawal
      tags:
        - Withdrawals
      parameters:
        - name: idempotency-key
          in: header
          required: true
          schema:
            type: string
            format: uuid
            pattern: >-
              ^[0-9a-fA-F]{8}-?[0-9a-fA-F]{4}-?[0-5][0-9a-fA-F]{3}-?[089abAB][0-9a-fA-F]{3}-?[0-9a-fA-F]{12}$
            example: ccb07f42-4104-44ad-8e1f-c660bb7b269c
          description: >
            A UUID to be used as an idempotency key.  This prevents a duplicate
            request from being replayed.

            https://docs.upvest.co/documentation/concepts/api_concepts/idempotency
      security:
        - oauth-client-credentials:
            - payments:admin
      requestBody:
        content:
          application/json:
            schema:
              title: Payments - Withdrawal - Create - Request
              type: object
              additionalProperties: false
              properties:
                reference_account_id:
                  title: Reference account unique identifier.
                  type: string
                  description: Reference account unique identifier.
                  format: uuid
                account_group_id:
                  title: Account group unique identifier.
                  type: string
                  description: Account group unique identifier.
                  format: uuid
                user_id:
                  title: User unique identifier.
                  type: string
                  description: User unique identifier.
                  format: uuid
                amount:
                  type: string
                  pattern: ^[0-9]{1,9}(\.[0-9]{2})?$
                currency:
                  type: string
                  description: >-
                    Alphabetic three-letter [ISO
                    4217](https://en.wikipedia.org/wiki/ISO_4217) currency code.

                    * EUR - Euro
                  enum:
                    - EUR
                  default: EUR
                remittance_information:
                  type: string
                  maxLength: 140
                  pattern: ^[0-9A-Za-z+?/\-:()\.,';_ ]{0,140}$
                  description: >-
                    Payment reference the end user will see in their bank
                    statement for the corresponding credit transfer booking
                    (“Verwendungszweck”). We recommend that you keep this info
                    concise and avoid special characters or non-standardised
                    formatting ([see
                    more](/documentation/guides/payments/cash_balances/cash_withdrawal)).
                purpose_code:
                  type: string
                  maxLength: 4
                  description: >-
                    Purpose of the payment based on *ExternalPurpose1Code* from
                    [ISO
                    20022](https://www.iso20022.org/catalogue-messages/additional-content-messages/external-code-sets).
              required:
                - reference_account_id
                - account_group_id
                - user_id
                - amount
            example:
              reference_account_id: 295378ec-036e-4f3f-ae5c-2be85c93e837
              account_group_id: 2596db3b-0d03-4651-9eda-970910479dfb
              user_id: e56c14b3-8370-4c04-bc67-7092f7ec113c
              amount: '200.00'
              currency: EUR
              remittance_information: Withdrawal
              purpose_code: OTHR
      responses:
        '200':
          description: Withdrawal
          headers:
            upvest-request-id:
              required: true
              schema:
                type: string
                format: uuid
                example: 169ae4c7-ebd7-4041-94da-25369653eba7
          content:
            application/json:
              schema:
                title: Payments - Withdrawal
                type: object
                additionalProperties: false
                properties:
                  id:
                    title: Cash withdrawal unique identifier
                    type: string
                    description: Cash withdrawal unique identifier
                    format: uuid
                  created_at:
                    type: string
                    format: date-time
                    description: >-
                      Date and time when the resource was created. [RFC
                      3339-5](https://datatracker.ietf.org/doc/html/rfc3339#section-5.6),
                      [ISO8601
                      UTC](https://www.iso.org/iso-8601-date-and-time-format.html)
                  updated_at:
                    type: string
                    format: date-time
                    description: >-
                      Date and time when the resource was last updated. [RFC
                      3339-5](https://datatracker.ietf.org/doc/html/rfc3339#section-5.6),
                      [ISO8601
                      UTC](https://www.iso.org/iso-8601-date-and-time-format.html)
                  reference_account_id:
                    title: Reference account unique identifier.
                    type: string
                    description: Reference account unique identifier.
                    format: uuid
                  account_group_id:
                    title: Account group unique identifier.
                    type: string
                    description: Account group unique identifier.
                    format: uuid
                  user_id:
                    title: User unique identifier.
                    type: string
                    description: User unique identifier.
                    format: uuid
                  amount:
                    type: string
                    pattern: ^[0-9]{1,9}(\.[0-9]{2})?$
                  currency:
                    type: string
                    description: >-
                      Alphabetic three-letter [ISO
                      4217](https://en.wikipedia.org/wiki/ISO_4217) currency
                      code.

                      * EUR - Euro
                    enum:
                      - EUR
                    default: EUR
                  remittance_information:
                    type: string
                    maxLength: 140
                    pattern: ^[0-9A-Za-z+?/\-:()\.,';_ ]{0,140}$
                    description: >-
                      Payment reference the end user will see in their bank
                      statement for the corresponding credit transfer booking
                      (“Verwendungszweck”). We recommend that you keep this info
                      concise and avoid special characters or non-standardised
                      formatting ([see
                      more](/documentation/guides/payments/cash_balances/cash_withdrawal)).
                  taxes:
                    type: array
                    items:
                      title: Tax
                      type: object
                      properties:
                        amount:
                          type: string
                          pattern: ^-?[0-9]{0,63}(\.[0-9]{1,27})?$
                        currency:
                          type: string
                          description: >-
                            Alphabetic three-letter [ISO
                            4217](https://en.wikipedia.org/wiki/ISO_4217)
                            currency code.

                            * EUR - Euro
                          enum:
                            - EUR
                          default: EUR
                        type:
                          type: string
                          description: |-
                            Type of the tax.
                            * TOTAL - Total taxes
                          enum:
                            - TOTAL
                          default: TOTAL
                      required:
                        - type
                        - amount
                        - currency
                  status:
                    type: string
                    description: |-
                      Status of the withdrawal
                      * NEW - Withdrawal is created but not started processing.
                      * PROCESSING - Withdrawal is in processing.
                      * CONFIRMED - Withdrawal was successfully processed.
                      * CANCELLED - Withdrawal was cancelled.
                    enum:
                      - NEW
                      - PROCESSING
                      - CONFIRMED
                      - CANCELLED
                  purpose_code:
                    type: string
                    maxLength: 4
                    description: >-
                      Purpose of the payment based on *ExternalPurpose1Code*
                      from [ISO
                      20022](https://www.iso20022.org/catalogue-messages/additional-content-messages/external-code-sets).
                required:
                  - id
                  - reference_account_id
                  - account_group_id
                  - user_id
                  - amount
                  - currency
                  - created_at
                  - updated_at
                  - remittance_information
              example:
                id: 6ffa6b16-2380-4e7a-88b2-ae625c8eef99
                created_at: '2020-08-24T14:15:22Z'
                updated_at: '2020-08-24T14:15:22Z'
                reference_account_id: 295378ec-036e-4f3f-ae5c-2be85c93e837
                account_group_id: ac1c39e9-2101-46b8-a624-d10a9e351b6c
                user_id: b668282b-cdf3-439a-bda2-3f3c9f655bb7
                amount: '200.00'
                currency: EUR
                remittance_information: Withdrawal
                taxes:
                  - type: TOTAL
                    amount: '38.00'
                    currency: EUR
                status: NEW
                purpose_code: OTHR
        '400':
          description: Bad Request. The incoming request had a malformed parameter/object.
          headers:
            upvest-request-id:
              required: true
              schema:
                type: string
                format: uuid
                example: 169ae4c7-ebd7-4041-94da-25369653eba7
          content:
            application/problem+json:
              schema:
                title: Error
                type: object
                description: ''
                properties:
                  type:
                    type: string
                    description: URL to a document describing the error condition.
                  status:
                    type: integer
                    description: >-
                      Transmission of the HTTP status code so that all
                      information can be found in one place, but also to correct
                      changes in the status code due to the use of proxy
                      servers.
                  title:
                    type: string
                    description: >-
                      A short, human-readable title for the general error type;
                      the title should not change for given types.
                  detail:
                    type: string
                    description: A human-readable description of the specific error.
                  instance:
                    type: string
                    description: >-
                      This optional key may be present, with a unique URI for
                      the specific error; this will often point to an error log
                      for that specific response.
                  request_id:
                    type: string
                    description: Correlation ID for the original request.
                required:
                  - type
                  - status
                additionalProperties: false
              example:
                status: 400
                type: bad_request
        '401':
          description: Unauthorized. The caller has not been authenticated.
          headers:
            upvest-request-id:
              required: true
              schema:
                type: string
                format: uuid
                example: 169ae4c7-ebd7-4041-94da-25369653eba7
          content:
            application/problem+json:
              schema:
                title: Error
                type: object
                description: ''
                properties:
                  type:
                    type: string
                    description: URL to a document describing the error condition.
                  status:
                    type: integer
                    description: >-
                      Transmission of the HTTP status code so that all
                      information can be found in one place, but also to correct
                      changes in the status code due to the use of proxy
                      servers.
                  title:
                    type: string
                    description: >-
                      A short, human-readable title for the general error type;
                      the title should not change for given types.
                  detail:
                    type: string
                    description: A human-readable description of the specific error.
                  instance:
                    type: string
                    description: >-
                      This optional key may be present, with a unique URI for
                      the specific error; this will often point to an error log
                      for that specific response.
                  request_id:
                    type: string
                    description: Correlation ID for the original request.
                required:
                  - type
                  - status
                additionalProperties: false
              example:
                status: 401
                type: unauthorized
        '403':
          description: >-
            Forbidden. The caller has been authenticated but is not allowed to
            take the requested action.
          headers:
            upvest-request-id:
              required: true
              schema:
                type: string
                format: uuid
                example: 169ae4c7-ebd7-4041-94da-25369653eba7
          content:
            application/problem+json:
              schema:
                title: Error
                type: object
                description: ''
                properties:
                  type:
                    type: string
                    description: URL to a document describing the error condition.
                  status:
                    type: integer
                    description: >-
                      Transmission of the HTTP status code so that all
                      information can be found in one place, but also to correct
                      changes in the status code due to the use of proxy
                      servers.
                  title:
                    type: string
                    description: >-
                      A short, human-readable title for the general error type;
                      the title should not change for given types.
                  detail:
                    type: string
                    description: A human-readable description of the specific error.
                  instance:
                    type: string
                    description: >-
                      This optional key may be present, with a unique URI for
                      the specific error; this will often point to an error log
                      for that specific response.
                  request_id:
                    type: string
                    description: Correlation ID for the original request.
                required:
                  - type
                  - status
                additionalProperties: false
              example:
                status: 403
                type: forbidden
        '404':
          description: Not Found. The requested resource could not be found.
          headers:
            upvest-request-id:
              required: true
              schema:
                type: string
                format: uuid
                example: 169ae4c7-ebd7-4041-94da-25369653eba7
          content:
            application/problem+json:
              schema:
                title: Error
                type: object
                description: ''
                properties:
                  type:
                    type: string
                    description: URL to a document describing the error condition.
                  status:
                    type: integer
                    description: >-
                      Transmission of the HTTP status code so that all
                      information can be found in one place, but also to correct
                      changes in the status code due to the use of proxy
                      servers.
                  title:
                    type: string
                    description: >-
                      A short, human-readable title for the general error type;
                      the title should not change for given types.
                  detail:
                    type: string
                    description: A human-readable description of the specific error.
                  instance:
                    type: string
                    description: >-
                      This optional key may be present, with a unique URI for
                      the specific error; this will often point to an error log
                      for that specific response.
                  request_id:
                    type: string
                    description: Correlation ID for the original request.
                required:
                  - type
                  - status
                additionalProperties: false
              example:
                status: 404
                type: not_found
        '406':
          description: >-
            Not Acceptable. The resource does not have a current representation
            that would be acceptable to the user agent. "Accept" header defined
            unsupported value.
          headers:
            upvest-request-id:
              required: true
              schema:
                type: string
                format: uuid
                example: 169ae4c7-ebd7-4041-94da-25369653eba7
          content:
            application/problem+json:
              schema:
                title: Error
                type: object
                description: ''
                properties:
                  type:
                    type: string
                    description: URL to a document describing the error condition.
                  status:
                    type: integer
                    description: >-
                      Transmission of the HTTP status code so that all
                      information can be found in one place, but also to correct
                      changes in the status code due to the use of proxy
                      servers.
                  title:
                    type: string
                    description: >-
                      A short, human-readable title for the general error type;
                      the title should not change for given types.
                  detail:
                    type: string
                    description: A human-readable description of the specific error.
                  instance:
                    type: string
                    description: >-
                      This optional key may be present, with a unique URI for
                      the specific error; this will often point to an error log
                      for that specific response.
                  request_id:
                    type: string
                    description: Correlation ID for the original request.
                required:
                  - type
                  - status
                additionalProperties: false
              example:
                status: 406
                type: not_acceptable
        '429':
          description: >-
            Too Many Requests. The caller has exceeded their quota for the time
            period and has been throttled.
          headers:
            upvest-request-id:
              required: true
              schema:
                type: string
                format: uuid
                example: 169ae4c7-ebd7-4041-94da-25369653eba7
          content:
            application/problem+json:
              schema:
                title: Error
                type: object
                description: ''
                properties:
                  type:
                    type: string
                    description: URL to a document describing the error condition.
                  status:
                    type: integer
                    description: >-
                      Transmission of the HTTP status code so that all
                      information can be found in one place, but also to correct
                      changes in the status code due to the use of proxy
                      servers.
                  title:
                    type: string
                    description: >-
                      A short, human-readable title for the general error type;
                      the title should not change for given types.
                  detail:
                    type: string
                    description: A human-readable description of the specific error.
                  instance:
                    type: string
                    description: >-
                      This optional key may be present, with a unique URI for
                      the specific error; this will often point to an error log
                      for that specific response.
                  request_id:
                    type: string
                    description: Correlation ID for the original request.
                required:
                  - type
                  - status
                additionalProperties: false
              example:
                status: 429
                type: too_many_requests
        '500':
          description: Internal Server Error. The service encountered an unexpected error.
          headers:
            upvest-request-id:
              required: true
              schema:
                type: string
                format: uuid
                example: 169ae4c7-ebd7-4041-94da-25369653eba7
          content:
            application/problem+json:
              schema:
                title: Error
                type: object
                description: ''
                properties:
                  type:
                    type: string
                    description: URL to a document describing the error condition.
                  status:
                    type: integer
                    description: >-
                      Transmission of the HTTP status code so that all
                      information can be found in one place, but also to correct
                      changes in the status code due to the use of proxy
                      servers.
                  title:
                    type: string
                    description: >-
                      A short, human-readable title for the general error type;
                      the title should not change for given types.
                  detail:
                    type: string
                    description: A human-readable description of the specific error.
                  instance:
                    type: string
                    description: >-
                      This optional key may be present, with a unique URI for
                      the specific error; this will often point to an error log
                      for that specific response.
                  request_id:
                    type: string
                    description: Correlation ID for the original request.
                required:
                  - type
                  - status
                additionalProperties: false
              example:
                status: 500
                type: internal_server_error
        '503':
          description: >-
            Service Unavailable. The service handling for this request cannot be
            reached at this time.
          headers:
            upvest-request-id:
              required: true
              schema:
                type: string
                format: uuid
                example: 169ae4c7-ebd7-4041-94da-25369653eba7
          content:
            application/problem+json:
              schema:
                title: Error
                type: object
                description: ''
                properties:
                  type:
                    type: string
                    description: URL to a document describing the error condition.
                  status:
                    type: integer
                    description: >-
                      Transmission of the HTTP status code so that all
                      information can be found in one place, but also to correct
                      changes in the status code due to the use of proxy
                      servers.
                  title:
                    type: string
                    description: >-
                      A short, human-readable title for the general error type;
                      the title should not change for given types.
                  detail:
                    type: string
                    description: A human-readable description of the specific error.
                  instance:
                    type: string
                    description: >-
                      This optional key may be present, with a unique URI for
                      the specific error; this will often point to an error log
                      for that specific response.
                  request_id:
                    type: string
                    description: Correlation ID for the original request.
                required:
                  - type
                  - status
                additionalProperties: false
              example:
                status: 503
                type: method_not_allowed
        '504':
          description: >-
            Gateway Timeout. The service gateway has reached its internal
            timeout.
          headers:
            upvest-request-id:
              required: true
              schema:
                type: string
                format: uuid
                example: 169ae4c7-ebd7-4041-94da-25369653eba7
          content:
            application/problem+json:
              schema:
                title: Error
                type: object
                description: ''
                properties:
                  type:
                    type: string
                    description: URL to a document describing the error condition.
                  status:
                    type: integer
                    description: >-
                      Transmission of the HTTP status code so that all
                      information can be found in one place, but also to correct
                      changes in the status code due to the use of proxy
                      servers.
                  title:
                    type: string
                    description: >-
                      A short, human-readable title for the general error type;
                      the title should not change for given types.
                  detail:
                    type: string
                    description: A human-readable description of the specific error.
                  instance:
                    type: string
                    description: >-
                      This optional key may be present, with a unique URI for
                      the specific error; this will often point to an error log
                      for that specific response.
                  request_id:
                    type: string
                    description: Correlation ID for the original request.
                required:
                  - type
                  - status
                additionalProperties: false
              example:
                status: 504
                type: gateway_timeout
  /payments/withdrawals/{withdrawal_id}:
    parameters:
      - name: withdrawal_id
        in: path
        required: true
        schema:
          title: Cash withdrawal unique identifier
          type: string
          description: Cash withdrawal unique identifier
          format: uuid
      - name: upvest-client-id
        in: header
        description: Tenant Client ID
        required: true
        schema:
          type: string
          format: uuid
          example: ebabcf4d-61c3-4942-875c-e265a7c2d062
      - name: authorization
        in: header
        description: |
          Bearer (access) token from the OAuth flow with correct scopes.
          https://datatracker.ietf.org/doc/html/rfc6750
        required: true
        schema:
          type: string
          pattern: ^Bearer [a-zA-Z0-9\-\._~+/]*=*
          example: Bearer c2VjcmV0Cg==
      - name: signature
        in: header
        required: true
        schema:
          type: string
        description: >-
          https://tools.ietf.org/id/draft-ietf-httpbis-message-signatures-01.html#name-the-signature-http-header
      - name: signature-input
        in: header
        required: true
        schema:
          type: string
        description: >-
          https://tools.ietf.org/id/draft-ietf-httpbis-message-signatures-01.html#name-the-signature-input-http-he
      - name: upvest-api-version
        in: header
        required: false
        schema:
          type: string
          enum:
            - '1'
          default: '1'
          example: '1'
        description: 'Upvest API version (Note: Do not include quotation marks)'
    get:
      operationId: retrieve_cash_withdrawal
      summary: Retrieve withdrawal
      description: Retrieve withdrawal
      tags:
        - Withdrawals
      security:
        - oauth-client-credentials:
            - payments:admin
            - payments:read
      responses:
        '200':
          description: Withdrawal
          headers:
            upvest-request-id:
              required: true
              schema:
                type: string
                format: uuid
                example: 169ae4c7-ebd7-4041-94da-25369653eba7
          content:
            application/json:
              schema:
                title: Payments - Withdrawal
                type: object
                additionalProperties: false
                properties:
                  id:
                    title: Cash withdrawal unique identifier
                    type: string
                    description: Cash withdrawal unique identifier
                    format: uuid
                  created_at:
                    type: string
                    format: date-time
                    description: >-
                      Date and time when the resource was created. [RFC
                      3339-5](https://datatracker.ietf.org/doc/html/rfc3339#section-5.6),
                      [ISO8601
                      UTC](https://www.iso.org/iso-8601-date-and-time-format.html)
                  updated_at:
                    type: string
                    format: date-time
                    description: >-
                      Date and time when the resource was last updated. [RFC
                      3339-5](https://datatracker.ietf.org/doc/html/rfc3339#section-5.6),
                      [ISO8601
                      UTC](https://www.iso.org/iso-8601-date-and-time-format.html)
                  reference_account_id:
                    title: Reference account unique identifier.
                    type: string
                    description: Reference account unique identifier.
                    format: uuid
                  account_group_id:
                    title: Account group unique identifier.
                    type: string
                    description: Account group unique identifier.
                    format: uuid
                  user_id:
                    title: User unique identifier.
                    type: string
                    description: User unique identifier.
                    format: uuid
                  amount:
                    type: string
                    pattern: ^[0-9]{1,9}(\.[0-9]{2})?$
                  currency:
                    type: string
                    description: >-
                      Alphabetic three-letter [ISO
                      4217](https://en.wikipedia.org/wiki/ISO_4217) currency
                      code.

                      * EUR - Euro
                    enum:
                      - EUR
                    default: EUR
                  remittance_information:
                    type: string
                    maxLength: 140
                    pattern: ^[0-9A-Za-z+?/\-:()\.,';_ ]{0,140}$
                    description: >-
                      Payment reference the end user will see in their bank
                      statement for the corresponding credit transfer booking
                      (“Verwendungszweck”). We recommend that you keep this info
                      concise and avoid special characters or non-standardised
                      formatting ([see
                      more](/documentation/guides/payments/cash_balances/cash_withdrawal)).
                  taxes:
                    type: array
                    items:
                      title: Tax
                      type: object
                      properties:
                        amount:
                          type: string
                          pattern: ^-?[0-9]{0,63}(\.[0-9]{1,27})?$
                        currency:
                          type: string
                          description: >-
                            Alphabetic three-letter [ISO
                            4217](https://en.wikipedia.org/wiki/ISO_4217)
                            currency code.

                            * EUR - Euro
                          enum:
                            - EUR
                          default: EUR
                        type:
                          type: string
                          description: |-
                            Type of the tax.
                            * TOTAL - Total taxes
                          enum:
                            - TOTAL
                          default: TOTAL
                      required:
                        - type
                        - amount
                        - currency
                  status:
                    type: string
                    description: |-
                      Status of the withdrawal
                      * NEW - Withdrawal is created but not started processing.
                      * PROCESSING - Withdrawal is in processing.
                      * CONFIRMED - Withdrawal was successfully processed.
                      * CANCELLED - Withdrawal was cancelled.
                    enum:
                      - NEW
                      - PROCESSING
                      - CONFIRMED
                      - CANCELLED
                  purpose_code:
                    type: string
                    maxLength: 4
                    description: >-
                      Purpose of the payment based on *ExternalPurpose1Code*
                      from [ISO
                      20022](https://www.iso20022.org/catalogue-messages/additional-content-messages/external-code-sets).
                required:
                  - id
                  - reference_account_id
                  - account_group_id
                  - user_id
                  - amount
                  - currency
                  - created_at
                  - updated_at
                  - remittance_information
              example:
                id: 6ffa6b16-2380-4e7a-88b2-ae625c8eef99
                created_at: '2020-08-24T14:15:22Z'
                updated_at: '2020-08-24T14:15:22Z'
                reference_account_id: 295378ec-036e-4f3f-ae5c-2be85c93e837
                account_group_id: ac1c39e9-2101-46b8-a624-d10a9e351b6c
                user_id: b668282b-cdf3-439a-bda2-3f3c9f655bb7
                amount: '200.00'
                currency: EUR
                remittance_information: Withdrawal
                taxes:
                  - type: TOTAL
                    amount: '38.00'
                    currency: EUR
                status: CONFIRMED
                purpose_code: OTHR
        '401':
          description: Unauthorized. The caller has not been authenticated.
          headers:
            upvest-request-id:
              required: true
              schema:
                type: string
                format: uuid
                example: 169ae4c7-ebd7-4041-94da-25369653eba7
          content:
            application/problem+json:
              schema:
                title: Error
                type: object
                description: ''
                properties:
                  type:
                    type: string
                    description: URL to a document describing the error condition.
                  status:
                    type: integer
                    description: >-
                      Transmission of the HTTP status code so that all
                      information can be found in one place, but also to correct
                      changes in the status code due to the use of proxy
                      servers.
                  title:
                    type: string
                    description: >-
                      A short, human-readable title for the general error type;
                      the title should not change for given types.
                  detail:
                    type: string
                    description: A human-readable description of the specific error.
                  instance:
                    type: string
                    description: >-
                      This optional key may be present, with a unique URI for
                      the specific error; this will often point to an error log
                      for that specific response.
                  request_id:
                    type: string
                    description: Correlation ID for the original request.
                required:
                  - type
                  - status
                additionalProperties: false
              example:
                status: 401
                type: unauthorized
        '403':
          description: >-
            Forbidden. The caller has been authenticated but is not allowed to
            take the requested action.
          headers:
            upvest-request-id:
              required: true
              schema:
                type: string
                format: uuid
                example: 169ae4c7-ebd7-4041-94da-25369653eba7
          content:
            application/problem+json:
              schema:
                title: Error
                type: object
                description: ''
                properties:
                  type:
                    type: string
                    description: URL to a document describing the error condition.
                  status:
                    type: integer
                    description: >-
                      Transmission of the HTTP status code so that all
                      information can be found in one place, but also to correct
                      changes in the status code due to the use of proxy
                      servers.
                  title:
                    type: string
                    description: >-
                      A short, human-readable title for the general error type;
                      the title should not change for given types.
                  detail:
                    type: string
                    description: A human-readable description of the specific error.
                  instance:
                    type: string
                    description: >-
                      This optional key may be present, with a unique URI for
                      the specific error; this will often point to an error log
                      for that specific response.
                  request_id:
                    type: string
                    description: Correlation ID for the original request.
                required:
                  - type
                  - status
                additionalProperties: false
              example:
                status: 403
                type: forbidden
        '404':
          description: Not Found. The requested resource could not be found.
          headers:
            upvest-request-id:
              required: true
              schema:
                type: string
                format: uuid
                example: 169ae4c7-ebd7-4041-94da-25369653eba7
          content:
            application/problem+json:
              schema:
                title: Error
                type: object
                description: ''
                properties:
                  type:
                    type: string
                    description: URL to a document describing the error condition.
                  status:
                    type: integer
                    description: >-
                      Transmission of the HTTP status code so that all
                      information can be found in one place, but also to correct
                      changes in the status code due to the use of proxy
                      servers.
                  title:
                    type: string
                    description: >-
                      A short, human-readable title for the general error type;
                      the title should not change for given types.
                  detail:
                    type: string
                    description: A human-readable description of the specific error.
                  instance:
                    type: string
                    description: >-
                      This optional key may be present, with a unique URI for
                      the specific error; this will often point to an error log
                      for that specific response.
                  request_id:
                    type: string
                    description: Correlation ID for the original request.
                required:
                  - type
                  - status
                additionalProperties: false
              example:
                status: 404
                type: not_found
        '406':
          description: >-
            Not Acceptable. The resource does not have a current representation
            that would be acceptable to the user agent. "Accept" header defined
            unsupported value.
          headers:
            upvest-request-id:
              required: true
              schema:
                type: string
                format: uuid
                example: 169ae4c7-ebd7-4041-94da-25369653eba7
          content:
            application/problem+json:
              schema:
                title: Error
                type: object
                description: ''
                properties:
                  type:
                    type: string
                    description: URL to a document describing the error condition.
                  status:
                    type: integer
                    description: >-
                      Transmission of the HTTP status code so that all
                      information can be found in one place, but also to correct
                      changes in the status code due to the use of proxy
                      servers.
                  title:
                    type: string
                    description: >-
                      A short, human-readable title for the general error type;
                      the title should not change for given types.
                  detail:
                    type: string
                    description: A human-readable description of the specific error.
                  instance:
                    type: string
                    description: >-
                      This optional key may be present, with a unique URI for
                      the specific error; this will often point to an error log
                      for that specific response.
                  request_id:
                    type: string
                    description: Correlation ID for the original request.
                required:
                  - type
                  - status
                additionalProperties: false
              example:
                status: 406
                type: not_acceptable
        '429':
          description: >-
            Too Many Requests. The caller has exceeded their quota for the time
            period and has been throttled.
          headers:
            upvest-request-id:
              required: true
              schema:
                type: string
                format: uuid
                example: 169ae4c7-ebd7-4041-94da-25369653eba7
          content:
            application/problem+json:
              schema:
                title: Error
                type: object
                description: ''
                properties:
                  type:
                    type: string
                    description: URL to a document describing the error condition.
                  status:
                    type: integer
                    description: >-
                      Transmission of the HTTP status code so that all
                      information can be found in one place, but also to correct
                      changes in the status code due to the use of proxy
                      servers.
                  title:
                    type: string
                    description: >-
                      A short, human-readable title for the general error type;
                      the title should not change for given types.
                  detail:
                    type: string
                    description: A human-readable description of the specific error.
                  instance:
                    type: string
                    description: >-
                      This optional key may be present, with a unique URI for
                      the specific error; this will often point to an error log
                      for that specific response.
                  request_id:
                    type: string
                    description: Correlation ID for the original request.
                required:
                  - type
                  - status
                additionalProperties: false
              example:
                status: 429
                type: too_many_requests
        '500':
          description: Internal Server Error. The service encountered an unexpected error.
          headers:
            upvest-request-id:
              required: true
              schema:
                type: string
                format: uuid
                example: 169ae4c7-ebd7-4041-94da-25369653eba7
          content:
            application/problem+json:
              schema:
                title: Error
                type: object
                description: ''
                properties:
                  type:
                    type: string
                    description: URL to a document describing the error condition.
                  status:
                    type: integer
                    description: >-
                      Transmission of the HTTP status code so that all
                      information can be found in one place, but also to correct
                      changes in the status code due to the use of proxy
                      servers.
                  title:
                    type: string
                    description: >-
                      A short, human-readable title for the general error type;
                      the title should not change for given types.
                  detail:
                    type: string
                    description: A human-readable description of the specific error.
                  instance:
                    type: string
                    description: >-
                      This optional key may be present, with a unique URI for
                      the specific error; this will often point to an error log
                      for that specific response.
                  request_id:
                    type: string
                    description: Correlation ID for the original request.
                required:
                  - type
                  - status
                additionalProperties: false
              example:
                status: 500
                type: internal_server_error
        '503':
          description: >-
            Service Unavailable. The service handling for this request cannot be
            reached at this time.
          headers:
            upvest-request-id:
              required: true
              schema:
                type: string
                format: uuid
                example: 169ae4c7-ebd7-4041-94da-25369653eba7
          content:
            application/problem+json:
              schema:
                title: Error
                type: object
                description: ''
                properties:
                  type:
                    type: string
                    description: URL to a document describing the error condition.
                  status:
                    type: integer
                    description: >-
                      Transmission of the HTTP status code so that all
                      information can be found in one place, but also to correct
                      changes in the status code due to the use of proxy
                      servers.
                  title:
                    type: string
                    description: >-
                      A short, human-readable title for the general error type;
                      the title should not change for given types.
                  detail:
                    type: string
                    description: A human-readable description of the specific error.
                  instance:
                    type: string
                    description: >-
                      This optional key may be present, with a unique URI for
                      the specific error; this will often point to an error log
                      for that specific response.
                  request_id:
                    type: string
                    description: Correlation ID for the original request.
                required:
                  - type
                  - status
                additionalProperties: false
              example:
                status: 503
                type: method_not_allowed
        '504':
          description: >-
            Gateway Timeout. The service gateway has reached its internal
            timeout.
          headers:
            upvest-request-id:
              required: true
              schema:
                type: string
                format: uuid
                example: 169ae4c7-ebd7-4041-94da-25369653eba7
          content:
            application/problem+json:
              schema:
                title: Error
                type: object
                description: ''
                properties:
                  type:
                    type: string
                    description: URL to a document describing the error condition.
                  status:
                    type: integer
                    description: >-
                      Transmission of the HTTP status code so that all
                      information can be found in one place, but also to correct
                      changes in the status code due to the use of proxy
                      servers.
                  title:
                    type: string
                    description: >-
                      A short, human-readable title for the general error type;
                      the title should not change for given types.
                  detail:
                    type: string
                    description: A human-readable description of the specific error.
                  instance:
                    type: string
                    description: >-
                      This optional key may be present, with a unique URI for
                      the specific error; this will often point to an error log
                      for that specific response.
                  request_id:
                    type: string
                    description: Correlation ID for the original request.
                required:
                  - type
                  - status
                additionalProperties: false
              example:
                status: 504
                type: gateway_timeout
    delete:
      operationId: cancel_cash_withdrawal
      summary: Cancel withdrawal by ID
      description: >-
        Cancels a withdrawal specified by its ID. It is only possible to cancel
        a withdrawal if it has the status `NEW`.
      tags:
        - Withdrawals
      security:
        - oauth-client-credentials:
            - payments:admin
      responses:
        '204':
          description: Request has been processed successfully.
          headers:
            upvest-request-id:
              required: true
              schema:
                type: string
                format: uuid
                example: 169ae4c7-ebd7-4041-94da-25369653eba7
        '401':
          description: Unauthorized. The caller has not been authenticated.
          headers:
            upvest-request-id:
              required: true
              schema:
                type: string
                format: uuid
                example: 169ae4c7-ebd7-4041-94da-25369653eba7
          content:
            application/problem+json:
              schema:
                title: Error
                type: object
                description: ''
                properties:
                  type:
                    type: string
                    description: URL to a document describing the error condition.
                  status:
                    type: integer
                    description: >-
                      Transmission of the HTTP status code so that all
                      information can be found in one place, but also to correct
                      changes in the status code due to the use of proxy
                      servers.
                  title:
                    type: string
                    description: >-
                      A short, human-readable title for the general error type;
                      the title should not change for given types.
                  detail:
                    type: string
                    description: A human-readable description of the specific error.
                  instance:
                    type: string
                    description: >-
                      This optional key may be present, with a unique URI for
                      the specific error; this will often point to an error log
                      for that specific response.
                  request_id:
                    type: string
                    description: Correlation ID for the original request.
                required:
                  - type
                  - status
                additionalProperties: false
              example:
                status: 401
                type: unauthorized
        '403':
          description: >-
            Forbidden. The caller has been authenticated but is not allowed to
            take the requested action.
          headers:
            upvest-request-id:
              required: true
              schema:
                type: string
                format: uuid
                example: 169ae4c7-ebd7-4041-94da-25369653eba7
          content:
            application/problem+json:
              schema:
                title: Error
                type: object
                description: ''
                properties:
                  type:
                    type: string
                    description: URL to a document describing the error condition.
                  status:
                    type: integer
                    description: >-
                      Transmission of the HTTP status code so that all
                      information can be found in one place, but also to correct
                      changes in the status code due to the use of proxy
                      servers.
                  title:
                    type: string
                    description: >-
                      A short, human-readable title for the general error type;
                      the title should not change for given types.
                  detail:
                    type: string
                    description: A human-readable description of the specific error.
                  instance:
                    type: string
                    description: >-
                      This optional key may be present, with a unique URI for
                      the specific error; this will often point to an error log
                      for that specific response.
                  request_id:
                    type: string
                    description: Correlation ID for the original request.
                required:
                  - type
                  - status
                additionalProperties: false
              example:
                status: 403
                type: forbidden
        '404':
          description: Not Found. The requested resource could not be found.
          headers:
            upvest-request-id:
              required: true
              schema:
                type: string
                format: uuid
                example: 169ae4c7-ebd7-4041-94da-25369653eba7
          content:
            application/problem+json:
              schema:
                title: Error
                type: object
                description: ''
                properties:
                  type:
                    type: string
                    description: URL to a document describing the error condition.
                  status:
                    type: integer
                    description: >-
                      Transmission of the HTTP status code so that all
                      information can be found in one place, but also to correct
                      changes in the status code due to the use of proxy
                      servers.
                  title:
                    type: string
                    description: >-
                      A short, human-readable title for the general error type;
                      the title should not change for given types.
                  detail:
                    type: string
                    description: A human-readable description of the specific error.
                  instance:
                    type: string
                    description: >-
                      This optional key may be present, with a unique URI for
                      the specific error; this will often point to an error log
                      for that specific response.
                  request_id:
                    type: string
                    description: Correlation ID for the original request.
                required:
                  - type
                  - status
                additionalProperties: false
              example:
                status: 404
                type: not_found
        '422':
          description: >-
            Unprocessable Entity. The syntax of request is correct but server
            can't process it due a semantic error.
          headers:
            upvest-request-id:
              required: true
              schema:
                type: string
                format: uuid
                example: 169ae4c7-ebd7-4041-94da-25369653eba7
          content:
            application/problem+json:
              schema:
                title: Error
                type: object
                description: ''
                properties:
                  type:
                    type: string
                    description: URL to a document describing the error condition.
                  status:
                    type: integer
                    description: >-
                      Transmission of the HTTP status code so that all
                      information can be found in one place, but also to correct
                      changes in the status code due to the use of proxy
                      servers.
                  title:
                    type: string
                    description: >-
                      A short, human-readable title for the general error type;
                      the title should not change for given types.
                  detail:
                    type: string
                    description: A human-readable description of the specific error.
                  instance:
                    type: string
                    description: >-
                      This optional key may be present, with a unique URI for
                      the specific error; this will often point to an error log
                      for that specific response.
                  request_id:
                    type: string
                    description: Correlation ID for the original request.
                required:
                  - type
                  - status
                additionalProperties: false
              example:
                status: 422
                type: unprocessable_entity
        '429':
          description: >-
            Too Many Requests. The caller has exceeded their quota for the time
            period and has been throttled.
          headers:
            upvest-request-id:
              required: true
              schema:
                type: string
                format: uuid
                example: 169ae4c7-ebd7-4041-94da-25369653eba7
          content:
            application/problem+json:
              schema:
                title: Error
                type: object
                description: ''
                properties:
                  type:
                    type: string
                    description: URL to a document describing the error condition.
                  status:
                    type: integer
                    description: >-
                      Transmission of the HTTP status code so that all
                      information can be found in one place, but also to correct
                      changes in the status code due to the use of proxy
                      servers.
                  title:
                    type: string
                    description: >-
                      A short, human-readable title for the general error type;
                      the title should not change for given types.
                  detail:
                    type: string
                    description: A human-readable description of the specific error.
                  instance:
                    type: string
                    description: >-
                      This optional key may be present, with a unique URI for
                      the specific error; this will often point to an error log
                      for that specific response.
                  request_id:
                    type: string
                    description: Correlation ID for the original request.
                required:
                  - type
                  - status
                additionalProperties: false
              example:
                status: 429
                type: too_many_requests
        '500':
          description: Internal Server Error. The service encountered an unexpected error.
          headers:
            upvest-request-id:
              required: true
              schema:
                type: string
                format: uuid
                example: 169ae4c7-ebd7-4041-94da-25369653eba7
          content:
            application/problem+json:
              schema:
                title: Error
                type: object
                description: ''
                properties:
                  type:
                    type: string
                    description: URL to a document describing the error condition.
                  status:
                    type: integer
                    description: >-
                      Transmission of the HTTP status code so that all
                      information can be found in one place, but also to correct
                      changes in the status code due to the use of proxy
                      servers.
                  title:
                    type: string
                    description: >-
                      A short, human-readable title for the general error type;
                      the title should not change for given types.
                  detail:
                    type: string
                    description: A human-readable description of the specific error.
                  instance:
                    type: string
                    description: >-
                      This optional key may be present, with a unique URI for
                      the specific error; this will often point to an error log
                      for that specific response.
                  request_id:
                    type: string
                    description: Correlation ID for the original request.
                required:
                  - type
                  - status
                additionalProperties: false
              example:
                status: 500
                type: internal_server_error
        '503':
          description: >-
            Service Unavailable. The service handling for this request cannot be
            reached at this time.
          headers:
            upvest-request-id:
              required: true
              schema:
                type: string
                format: uuid
                example: 169ae4c7-ebd7-4041-94da-25369653eba7
          content:
            application/problem+json:
              schema:
                title: Error
                type: object
                description: ''
                properties:
                  type:
                    type: string
                    description: URL to a document describing the error condition.
                  status:
                    type: integer
                    description: >-
                      Transmission of the HTTP status code so that all
                      information can be found in one place, but also to correct
                      changes in the status code due to the use of proxy
                      servers.
                  title:
                    type: string
                    description: >-
                      A short, human-readable title for the general error type;
                      the title should not change for given types.
                  detail:
                    type: string
                    description: A human-readable description of the specific error.
                  instance:
                    type: string
                    description: >-
                      This optional key may be present, with a unique URI for
                      the specific error; this will often point to an error log
                      for that specific response.
                  request_id:
                    type: string
                    description: Correlation ID for the original request.
                required:
                  - type
                  - status
                additionalProperties: false
              example:
                status: 503
                type: method_not_allowed
        '504':
          description: >-
            Gateway Timeout. The service gateway has reached its internal
            timeout.
          headers:
            upvest-request-id:
              required: true
              schema:
                type: string
                format: uuid
                example: 169ae4c7-ebd7-4041-94da-25369653eba7
          content:
            application/problem+json:
              schema:
                title: Error
                type: object
                description: ''
                properties:
                  type:
                    type: string
                    description: URL to a document describing the error condition.
                  status:
                    type: integer
                    description: >-
                      Transmission of the HTTP status code so that all
                      information can be found in one place, but also to correct
                      changes in the status code due to the use of proxy
                      servers.
                  title:
                    type: string
                    description: >-
                      A short, human-readable title for the general error type;
                      the title should not change for given types.
                  detail:
                    type: string
                    description: A human-readable description of the specific error.
                  instance:
                    type: string
                    description: >-
                      This optional key may be present, with a unique URI for
                      the specific error; this will often point to an error log
                      for that specific response.
                  request_id:
                    type: string
                    description: Correlation ID for the original request.
                required:
                  - type
                  - status
                additionalProperties: false
              example:
                status: 504
                type: gateway_timeout
  /account_groups/{account_group_id}/payments/withdrawals:
    parameters:
      - name: account_group_id
        in: path
        required: true
        schema:
          title: Account group unique identifier.
          type: string
          description: Account group unique identifier.
          format: uuid
      - name: upvest-client-id
        in: header
        description: Tenant Client ID
        required: true
        schema:
          type: string
          format: uuid
          example: ebabcf4d-61c3-4942-875c-e265a7c2d062
      - name: authorization
        in: header
        description: |
          Bearer (access) token from the OAuth flow with correct scopes.
          https://datatracker.ietf.org/doc/html/rfc6750
        required: true
        schema:
          type: string
          pattern: ^Bearer [a-zA-Z0-9\-\._~+/]*=*
          example: Bearer c2VjcmV0Cg==
      - name: signature
        in: header
        required: true
        schema:
          type: string
        description: >-
          https://tools.ietf.org/id/draft-ietf-httpbis-message-signatures-01.html#name-the-signature-http-header
      - name: signature-input
        in: header
        required: true
        schema:
          type: string
        description: >-
          https://tools.ietf.org/id/draft-ietf-httpbis-message-signatures-01.html#name-the-signature-input-http-he
      - name: upvest-api-version
        in: header
        required: false
        schema:
          type: string
          enum:
            - '1'
          default: '1'
          example: '1'
        description: 'Upvest API version (Note: Do not include quotation marks)'
    get:
      operationId: list_cash_withdrawals
      summary: List withdrawals
      description: List withdrawals
      tags:
        - Withdrawals
      security:
        - oauth-client-credentials:
            - payments:admin
            - payments:read
      parameters:
        - name: sort
          in: query
          required: false
          schema:
            type: string
            enum:
              - id
              - created_at
            default: created_at
          description: Field of resource to sort by
          example: id
        - name: order
          in: query
          required: false
          schema:
            type: string
            enum:
              - ASC
              - DESC
            default: ASC
          description: >-
            Sort order of the result list if the `sort` parameter is specified.
            Use `ASC` for ascending or `DESC` for descending sort order.
        - name: offset
          in: query
          schema:
            type: integer
            minimum: 0
            format: int32
          allowEmptyValue: true
          description: >-
            Use the `offset` argument to specify where in the list of results to
            start when returning items for a particular query.
        - name: limit
          in: query
          schema:
            type: integer
            format: int32
            default: 100
            minimum: 0
            maximum: 1000
          allowEmptyValue: true
          description: >-
            Use the `limit` argument to specify the maximum number of items
            returned.
      responses:
        '200':
          description: Withdrawals list
          headers:
            upvest-request-id:
              required: true
              schema:
                type: string
                format: uuid
                example: 169ae4c7-ebd7-4041-94da-25369653eba7
          content:
            application/json:
              schema:
                title: Withdrawals - List - Response
                type: object
                properties:
                  meta:
                    type: object
                    properties:
                      offset:
                        type: integer
                        description: Amount of resource to offset in the response.
                      limit:
                        type: integer
                        description: Total limit of the response.
                      count:
                        type: integer
                        description: Count of the resources returned in the response.
                      total_count:
                        type: integer
                        description: Total count of all the resources.
                      sort:
                        type: string
                        description: The field that the list is sorted by.
                      order:
                        type: string
                        description: |-
                          The ordering of the response.
                          * ASC - Ascending order
                          * DESC - Descending order
                        enum:
                          - ASC
                          - DESC
                    required:
                      - offset
                      - limit
                      - count
                      - total_count
                  data:
                    type: array
                    items:
                      title: Payments - Withdrawal
                      type: object
                      additionalProperties: false
                      properties:
                        id:
                          title: Cash withdrawal unique identifier
                          type: string
                          description: Cash withdrawal unique identifier
                          format: uuid
                        created_at:
                          type: string
                          format: date-time
                          description: >-
                            Date and time when the resource was created. [RFC
                            3339-5](https://datatracker.ietf.org/doc/html/rfc3339#section-5.6),
                            [ISO8601
                            UTC](https://www.iso.org/iso-8601-date-and-time-format.html)
                        updated_at:
                          type: string
                          format: date-time
                          description: >-
                            Date and time when the resource was last updated.
                            [RFC
                            3339-5](https://datatracker.ietf.org/doc/html/rfc3339#section-5.6),
                            [ISO8601
                            UTC](https://www.iso.org/iso-8601-date-and-time-format.html)
                        reference_account_id:
                          title: Reference account unique identifier.
                          type: string
                          description: Reference account unique identifier.
                          format: uuid
                        account_group_id:
                          title: Account group unique identifier.
                          type: string
                          description: Account group unique identifier.
                          format: uuid
                        user_id:
                          title: User unique identifier.
                          type: string
                          description: User unique identifier.
                          format: uuid
                        amount:
                          type: string
                          pattern: ^[0-9]{1,9}(\.[0-9]{2})?$
                        currency:
                          type: string
                          description: >-
                            Alphabetic three-letter [ISO
                            4217](https://en.wikipedia.org/wiki/ISO_4217)
                            currency code.

                            * EUR - Euro
                          enum:
                            - EUR
                          default: EUR
                        remittance_information:
                          type: string
                          maxLength: 140
                          pattern: ^[0-9A-Za-z+?/\-:()\.,';_ ]{0,140}$
                          description: >-
                            Payment reference the end user will see in their
                            bank statement for the corresponding credit transfer
                            booking (“Verwendungszweck”). We recommend that you
                            keep this info concise and avoid special characters
                            or non-standardised formatting ([see
                            more](/documentation/guides/payments/cash_balances/cash_withdrawal)).
                        taxes:
                          type: array
                          items:
                            title: Tax
                            type: object
                            properties:
                              amount:
                                type: string
                                pattern: ^-?[0-9]{0,63}(\.[0-9]{1,27})?$
                              currency:
                                type: string
                                description: >-
                                  Alphabetic three-letter [ISO
                                  4217](https://en.wikipedia.org/wiki/ISO_4217)
                                  currency code.

                                  * EUR - Euro
                                enum:
                                  - EUR
                                default: EUR
                              type:
                                type: string
                                description: |-
                                  Type of the tax.
                                  * TOTAL - Total taxes
                                enum:
                                  - TOTAL
                                default: TOTAL
                            required:
                              - type
                              - amount
                              - currency
                        status:
                          type: string
                          description: >-
                            Status of the withdrawal

                            * NEW - Withdrawal is created but not started
                            processing.

                            * PROCESSING - Withdrawal is in processing.

                            * CONFIRMED - Withdrawal was successfully processed.

                            * CANCELLED - Withdrawal was cancelled.
                          enum:
                            - NEW
                            - PROCESSING
                            - CONFIRMED
                            - CANCELLED
                        purpose_code:
                          type: string
                          maxLength: 4
                          description: >-
                            Purpose of the payment based on
                            *ExternalPurpose1Code* from [ISO
                            20022](https://www.iso20022.org/catalogue-messages/additional-content-messages/external-code-sets).
                      required:
                        - id
                        - reference_account_id
                        - account_group_id
                        - user_id
                        - amount
                        - currency
                        - created_at
                        - updated_at
                        - remittance_information
                required:
                  - meta
                  - data
                additionalProperties: false
              example:
                meta:
                  offset: 0
                  limit: 100
                  count: 1
                  total_count: 1
                data:
                  - id: 6ffa6b16-2380-4e7a-88b2-ae625c8eef99
                    created_at: '2020-08-24T14:15:22Z'
                    updated_at: '2020-08-24T14:15:22Z'
                    reference_account_id: 295378ec-036e-4f3f-ae5c-2be85c93e837
                    account_group_id: ac1c39e9-2101-46b8-a624-d10a9e351b6c
                    user_id: b668282b-cdf3-439a-bda2-3f3c9f655bb7
                    amount: '200.00'
                    currency: EUR
                    remittance_information: Withdrawal
                    taxes:
                      - type: TOTAL
                        amount: '38.00'
                        currency: EUR
                    status: CONFIRMED
                    purpose_code: OTHR
        '400':
          description: Bad Request. The incoming request had a malformed parameter/object.
          headers:
            upvest-request-id:
              required: true
              schema:
                type: string
                format: uuid
                example: 169ae4c7-ebd7-4041-94da-25369653eba7
          content:
            application/problem+json:
              schema:
                title: Error
                type: object
                description: ''
                properties:
                  type:
                    type: string
                    description: URL to a document describing the error condition.
                  status:
                    type: integer
                    description: >-
                      Transmission of the HTTP status code so that all
                      information can be found in one place, but also to correct
                      changes in the status code due to the use of proxy
                      servers.
                  title:
                    type: string
                    description: >-
                      A short, human-readable title for the general error type;
                      the title should not change for given types.
                  detail:
                    type: string
                    description: A human-readable description of the specific error.
                  instance:
                    type: string
                    description: >-
                      This optional key may be present, with a unique URI for
                      the specific error; this will often point to an error log
                      for that specific response.
                  request_id:
                    type: string
                    description: Correlation ID for the original request.
                required:
                  - type
                  - status
                additionalProperties: false
              example:
                status: 400
                type: bad_request
        '401':
          description: Unauthorized. The caller has not been authenticated.
          headers:
            upvest-request-id:
              required: true
              schema:
                type: string
                format: uuid
                example: 169ae4c7-ebd7-4041-94da-25369653eba7
          content:
            application/problem+json:
              schema:
                title: Error
                type: object
                description: ''
                properties:
                  type:
                    type: string
                    description: URL to a document describing the error condition.
                  status:
                    type: integer
                    description: >-
                      Transmission of the HTTP status code so that all
                      information can be found in one place, but also to correct
                      changes in the status code due to the use of proxy
                      servers.
                  title:
                    type: string
                    description: >-
                      A short, human-readable title for the general error type;
                      the title should not change for given types.
                  detail:
                    type: string
                    description: A human-readable description of the specific error.
                  instance:
                    type: string
                    description: >-
                      This optional key may be present, with a unique URI for
                      the specific error; this will often point to an error log
                      for that specific response.
                  request_id:
                    type: string
                    description: Correlation ID for the original request.
                required:
                  - type
                  - status
                additionalProperties: false
              example:
                status: 401
                type: unauthorized
        '403':
          description: >-
            Forbidden. The caller has been authenticated but is not allowed to
            take the requested action.
          headers:
            upvest-request-id:
              required: true
              schema:
                type: string
                format: uuid
                example: 169ae4c7-ebd7-4041-94da-25369653eba7
          content:
            application/problem+json:
              schema:
                title: Error
                type: object
                description: ''
                properties:
                  type:
                    type: string
                    description: URL to a document describing the error condition.
                  status:
                    type: integer
                    description: >-
                      Transmission of the HTTP status code so that all
                      information can be found in one place, but also to correct
                      changes in the status code due to the use of proxy
                      servers.
                  title:
                    type: string
                    description: >-
                      A short, human-readable title for the general error type;
                      the title should not change for given types.
                  detail:
                    type: string
                    description: A human-readable description of the specific error.
                  instance:
                    type: string
                    description: >-
                      This optional key may be present, with a unique URI for
                      the specific error; this will often point to an error log
                      for that specific response.
                  request_id:
                    type: string
                    description: Correlation ID for the original request.
                required:
                  - type
                  - status
                additionalProperties: false
              example:
                status: 403
                type: forbidden
        '404':
          description: Not Found. The requested resource could not be found.
          headers:
            upvest-request-id:
              required: true
              schema:
                type: string
                format: uuid
                example: 169ae4c7-ebd7-4041-94da-25369653eba7
          content:
            application/problem+json:
              schema:
                title: Error
                type: object
                description: ''
                properties:
                  type:
                    type: string
                    description: URL to a document describing the error condition.
                  status:
                    type: integer
                    description: >-
                      Transmission of the HTTP status code so that all
                      information can be found in one place, but also to correct
                      changes in the status code due to the use of proxy
                      servers.
                  title:
                    type: string
                    description: >-
                      A short, human-readable title for the general error type;
                      the title should not change for given types.
                  detail:
                    type: string
                    description: A human-readable description of the specific error.
                  instance:
                    type: string
                    description: >-
                      This optional key may be present, with a unique URI for
                      the specific error; this will often point to an error log
                      for that specific response.
                  request_id:
                    type: string
                    description: Correlation ID for the original request.
                required:
                  - type
                  - status
                additionalProperties: false
              example:
                status: 404
                type: not_found
        '406':
          description: >-
            Not Acceptable. The resource does not have a current representation
            that would be acceptable to the user agent. "Accept" header defined
            unsupported value.
          headers:
            upvest-request-id:
              required: true
              schema:
                type: string
                format: uuid
                example: 169ae4c7-ebd7-4041-94da-25369653eba7
          content:
            application/problem+json:
              schema:
                title: Error
                type: object
                description: ''
                properties:
                  type:
                    type: string
                    description: URL to a document describing the error condition.
                  status:
                    type: integer
                    description: >-
                      Transmission of the HTTP status code so that all
                      information can be found in one place, but also to correct
                      changes in the status code due to the use of proxy
                      servers.
                  title:
                    type: string
                    description: >-
                      A short, human-readable title for the general error type;
                      the title should not change for given types.
                  detail:
                    type: string
                    description: A human-readable description of the specific error.
                  instance:
                    type: string
                    description: >-
                      This optional key may be present, with a unique URI for
                      the specific error; this will often point to an error log
                      for that specific response.
                  request_id:
                    type: string
                    description: Correlation ID for the original request.
                required:
                  - type
                  - status
                additionalProperties: false
              example:
                status: 406
                type: not_acceptable
        '429':
          description: >-
            Too Many Requests. The caller has exceeded their quota for the time
            period and has been throttled.
          headers:
            upvest-request-id:
              required: true
              schema:
                type: string
                format: uuid
                example: 169ae4c7-ebd7-4041-94da-25369653eba7
          content:
            application/problem+json:
              schema:
                title: Error
                type: object
                description: ''
                properties:
                  type:
                    type: string
                    description: URL to a document describing the error condition.
                  status:
                    type: integer
                    description: >-
                      Transmission of the HTTP status code so that all
                      information can be found in one place, but also to correct
                      changes in the status code due to the use of proxy
                      servers.
                  title:
                    type: string
                    description: >-
                      A short, human-readable title for the general error type;
                      the title should not change for given types.
                  detail:
                    type: string
                    description: A human-readable description of the specific error.
                  instance:
                    type: string
                    description: >-
                      This optional key may be present, with a unique URI for
                      the specific error; this will often point to an error log
                      for that specific response.
                  request_id:
                    type: string
                    description: Correlation ID for the original request.
                required:
                  - type
                  - status
                additionalProperties: false
              example:
                status: 429
                type: too_many_requests
        '500':
          description: Internal Server Error. The service encountered an unexpected error.
          headers:
            upvest-request-id:
              required: true
              schema:
                type: string
                format: uuid
                example: 169ae4c7-ebd7-4041-94da-25369653eba7
          content:
            application/problem+json:
              schema:
                title: Error
                type: object
                description: ''
                properties:
                  type:
                    type: string
                    description: URL to a document describing the error condition.
                  status:
                    type: integer
                    description: >-
                      Transmission of the HTTP status code so that all
                      information can be found in one place, but also to correct
                      changes in the status code due to the use of proxy
                      servers.
                  title:
                    type: string
                    description: >-
                      A short, human-readable title for the general error type;
                      the title should not change for given types.
                  detail:
                    type: string
                    description: A human-readable description of the specific error.
                  instance:
                    type: string
                    description: >-
                      This optional key may be present, with a unique URI for
                      the specific error; this will often point to an error log
                      for that specific response.
                  request_id:
                    type: string
                    description: Correlation ID for the original request.
                required:
                  - type
                  - status
                additionalProperties: false
              example:
                status: 500
                type: internal_server_error
        '503':
          description: >-
            Service Unavailable. The service handling for this request cannot be
            reached at this time.
          headers:
            upvest-request-id:
              required: true
              schema:
                type: string
                format: uuid
                example: 169ae4c7-ebd7-4041-94da-25369653eba7
          content:
            application/problem+json:
              schema:
                title: Error
                type: object
                description: ''
                properties:
                  type:
                    type: string
                    description: URL to a document describing the error condition.
                  status:
                    type: integer
                    description: >-
                      Transmission of the HTTP status code so that all
                      information can be found in one place, but also to correct
                      changes in the status code due to the use of proxy
                      servers.
                  title:
                    type: string
                    description: >-
                      A short, human-readable title for the general error type;
                      the title should not change for given types.
                  detail:
                    type: string
                    description: A human-readable description of the specific error.
                  instance:
                    type: string
                    description: >-
                      This optional key may be present, with a unique URI for
                      the specific error; this will often point to an error log
                      for that specific response.
                  request_id:
                    type: string
                    description: Correlation ID for the original request.
                required:
                  - type
                  - status
                additionalProperties: false
              example:
                status: 503
                type: method_not_allowed
        '504':
          description: >-
            Gateway Timeout. The service gateway has reached its internal
            timeout.
          headers:
            upvest-request-id:
              required: true
              schema:
                type: string
                format: uuid
                example: 169ae4c7-ebd7-4041-94da-25369653eba7
          content:
            application/problem+json:
              schema:
                title: Error
                type: object
                description: ''
                properties:
                  type:
                    type: string
                    description: URL to a document describing the error condition.
                  status:
                    type: integer
                    description: >-
                      Transmission of the HTTP status code so that all
                      information can be found in one place, but also to correct
                      changes in the status code due to the use of proxy
                      servers.
                  title:
                    type: string
                    description: >-
                      A short, human-readable title for the general error type;
                      the title should not change for given types.
                  detail:
                    type: string
                    description: A human-readable description of the specific error.
                  instance:
                    type: string
                    description: >-
                      This optional key may be present, with a unique URI for
                      the specific error; this will often point to an error log
                      for that specific response.
                  request_id:
                    type: string
                    description: Correlation ID for the original request.
                required:
                  - type
                  - status
                additionalProperties: false
              example:
                status: 504
                type: gateway_timeout
  /account_groups/{account_group_id}/payments/virtual_bank_accounts:
    parameters:
      - name: account_group_id
        in: path
        required: true
        schema:
          title: Account group unique identifier.
          type: string
          description: Account group unique identifier.
          format: uuid
      - name: upvest-client-id
        in: header
        description: Tenant Client ID
        required: true
        schema:
          type: string
          format: uuid
          example: ebabcf4d-61c3-4942-875c-e265a7c2d062
      - name: authorization
        in: header
        description: |
          Bearer (access) token from the OAuth flow with correct scopes.
          https://datatracker.ietf.org/doc/html/rfc6750
        required: true
        schema:
          type: string
          pattern: ^Bearer [a-zA-Z0-9\-\._~+/]*=*
          example: Bearer c2VjcmV0Cg==
      - name: signature
        in: header
        required: true
        schema:
          type: string
        description: >-
          https://tools.ietf.org/id/draft-ietf-httpbis-message-signatures-01.html#name-the-signature-http-header
      - name: signature-input
        in: header
        required: true
        schema:
          type: string
        description: >-
          https://tools.ietf.org/id/draft-ietf-httpbis-message-signatures-01.html#name-the-signature-input-http-he
      - name: upvest-api-version
        in: header
        required: false
        schema:
          type: string
          enum:
            - '1'
          default: '1'
          example: '1'
        description: 'Upvest API version (Note: Do not include quotation marks)'
    get:
      operationId: list_virtual_bank_accounts
      summary: List virtual bank accounts
      description: Returns a list of virtual bank accounts.
      tags:
        - Virtual Bank Accounts
      security:
        - oauth-client-credentials:
            - payments:admin
            - payments:read
      parameters:
        - name: sort
          in: query
          required: false
          schema:
            type: string
            enum:
              - id
              - created_at
            default: created_at
          description: Field of resource to sort by
          example: id
        - name: order
          in: query
          required: false
          schema:
            type: string
            enum:
              - ASC
              - DESC
            default: ASC
          description: >-
            Sort order of the result list if the `sort` parameter is specified.
            Use `ASC` for ascending or `DESC` for descending sort order.
        - name: limit
          in: query
          schema:
            type: integer
            format: int32
            default: 100
            minimum: 0
            maximum: 1000
          allowEmptyValue: true
          description: >-
            Use the `limit` argument to specify the maximum number of items
            returned.
        - name: offset
          in: query
          schema:
            type: integer
            minimum: 0
            format: int32
          allowEmptyValue: true
          description: >-
            Use the `offset` argument to specify where in the list of results to
            start when returning items for a particular query.
      responses:
        '200':
          description: List of virtual bank accounts.
          headers:
            upvest-request-id:
              required: true
              schema:
                type: string
                format: uuid
                example: 169ae4c7-ebd7-4041-94da-25369653eba7
          content:
            application/json:
              schema:
                title: Payments - Virtual Bank Accounts List - Response
                type: object
                properties:
                  meta:
                    type: object
                    properties:
                      offset:
                        type: integer
                        description: Amount of resource to offset in the response.
                      limit:
                        type: integer
                        description: Total limit of the response.
                      count:
                        type: integer
                        description: Count of the resources returned in the response.
                      total_count:
                        type: integer
                        description: Total count of all the resources.
                      sort:
                        type: string
                        description: The field that the list is sorted by.
                      order:
                        type: string
                        description: |-
                          The ordering of the response.
                          * ASC - Ascending order
                          * DESC - Descending order
                        enum:
                          - ASC
                          - DESC
                    required:
                      - offset
                      - limit
                      - count
                      - total_count
                  data:
                    type: array
                    items:
                      type: object
                      properties:
                        id:
                          title: Virtual bank account request unique identifier.
                          type: string
                          description: Virtual bank account request unique identifier.
                          format: uuid
                        created_at:
                          type: string
                          format: date-time
                          description: >-
                            Date and time when the resource was created. [RFC
                            3339-5](https://datatracker.ietf.org/doc/html/rfc3339#section-5.6),
                            [ISO8601
                            UTC](https://www.iso.org/iso-8601-date-and-time-format.html)
                        account_group_id:
                          title: Account group unique identifier.
                          type: string
                          description: Account group unique identifier.
                          format: uuid
                        name:
                          type: string
                          description: Name of the virtual bank account
                        owner:
                          type: object
                          description: Owner of the virtual bank account
                          properties:
                            name:
                              type: string
                              description: Name of the owner of the virtual bank account
                          required:
                            - name
                          additionalProperties: false
                        identification:
                          type: object
                          description: Identification details
                          properties:
                            swift:
                              type: object
                              description: SWIFT details
                              properties:
                                iban:
                                  title: International Bank Account Number (IBAN)
                                  type: string
                                  description: >-
                                    International Bank Account Number
                                    [IBAN](https://en.wikipedia.org/wiki/International_Bank_Account_Number).
                                  pattern: ^[A-Z]{2}[0-9]{2}[A-Z0-9]{11,26}$
                                bic:
                                  title: Business Identifier Code
                                  type: string
                                  description: >-
                                    Business Identifier Code (also known as
                                    SWIFT-BIC, BIC, SWIFT ID or SWIFT code) [ISO
                                    9362](https://en.wikipedia.org/wiki/ISO_9362).
                                  pattern: ^[A-Z]{6}[A-Z0-9]{2}([A-Z0-9]{3})?$
                              required:
                                - iban
                                - bic
                              additionalProperties: false
                          additionalProperties: false
                      required:
                        - id
                        - created_at
                        - account_group_id
                        - owner
                        - identification
                      additionalProperties: false
                required:
                  - meta
                  - data
                additionalProperties: false
              example:
                meta:
                  offset: 0
                  limit: 100
                  count: 1
                  total_count: 1
                  sort: id
                  order: ASC
                data:
                  - id: 22913092-0484-42e9-9273-9ffd6dfd0b13
                    created_at: '2021-07-21T14:10:00.00Z'
                    account_group_id: d1354aad-6da7-4da7-aaa1-e00ebfd3240d
                    name: Max's Virtual Bank Account
                    owner:
                      name: Max Musterman
                    identification:
                      swift:
                        iban: DE89000000000000000000
                        bic: ABCDEXXX
        '400':
          description: Bad Request. The incoming request had a malformed parameter/object.
          headers:
            upvest-request-id:
              required: true
              schema:
                type: string
                format: uuid
                example: 169ae4c7-ebd7-4041-94da-25369653eba7
          content:
            application/problem+json:
              schema:
                title: Error
                type: object
                description: ''
                properties:
                  type:
                    type: string
                    description: URL to a document describing the error condition.
                  status:
                    type: integer
                    description: >-
                      Transmission of the HTTP status code so that all
                      information can be found in one place, but also to correct
                      changes in the status code due to the use of proxy
                      servers.
                  title:
                    type: string
                    description: >-
                      A short, human-readable title for the general error type;
                      the title should not change for given types.
                  detail:
                    type: string
                    description: A human-readable description of the specific error.
                  instance:
                    type: string
                    description: >-
                      This optional key may be present, with a unique URI for
                      the specific error; this will often point to an error log
                      for that specific response.
                  request_id:
                    type: string
                    description: Correlation ID for the original request.
                required:
                  - type
                  - status
                additionalProperties: false
              example:
                status: 400
                type: bad_request
        '401':
          description: Unauthorized. The caller has not been authenticated.
          headers:
            upvest-request-id:
              required: true
              schema:
                type: string
                format: uuid
                example: 169ae4c7-ebd7-4041-94da-25369653eba7
          content:
            application/problem+json:
              schema:
                title: Error
                type: object
                description: ''
                properties:
                  type:
                    type: string
                    description: URL to a document describing the error condition.
                  status:
                    type: integer
                    description: >-
                      Transmission of the HTTP status code so that all
                      information can be found in one place, but also to correct
                      changes in the status code due to the use of proxy
                      servers.
                  title:
                    type: string
                    description: >-
                      A short, human-readable title for the general error type;
                      the title should not change for given types.
                  detail:
                    type: string
                    description: A human-readable description of the specific error.
                  instance:
                    type: string
                    description: >-
                      This optional key may be present, with a unique URI for
                      the specific error; this will often point to an error log
                      for that specific response.
                  request_id:
                    type: string
                    description: Correlation ID for the original request.
                required:
                  - type
                  - status
                additionalProperties: false
              example:
                status: 401
                type: unauthorized
        '403':
          description: >-
            Forbidden. The caller has been authenticated but is not allowed to
            take the requested action.
          headers:
            upvest-request-id:
              required: true
              schema:
                type: string
                format: uuid
                example: 169ae4c7-ebd7-4041-94da-25369653eba7
          content:
            application/problem+json:
              schema:
                title: Error
                type: object
                description: ''
                properties:
                  type:
                    type: string
                    description: URL to a document describing the error condition.
                  status:
                    type: integer
                    description: >-
                      Transmission of the HTTP status code so that all
                      information can be found in one place, but also to correct
                      changes in the status code due to the use of proxy
                      servers.
                  title:
                    type: string
                    description: >-
                      A short, human-readable title for the general error type;
                      the title should not change for given types.
                  detail:
                    type: string
                    description: A human-readable description of the specific error.
                  instance:
                    type: string
                    description: >-
                      This optional key may be present, with a unique URI for
                      the specific error; this will often point to an error log
                      for that specific response.
                  request_id:
                    type: string
                    description: Correlation ID for the original request.
                required:
                  - type
                  - status
                additionalProperties: false
              example:
                status: 403
                type: forbidden
        '404':
          description: Not Found. The requested resource could not be found.
          headers:
            upvest-request-id:
              required: true
              schema:
                type: string
                format: uuid
                example: 169ae4c7-ebd7-4041-94da-25369653eba7
          content:
            application/problem+json:
              schema:
                title: Error
                type: object
                description: ''
                properties:
                  type:
                    type: string
                    description: URL to a document describing the error condition.
                  status:
                    type: integer
                    description: >-
                      Transmission of the HTTP status code so that all
                      information can be found in one place, but also to correct
                      changes in the status code due to the use of proxy
                      servers.
                  title:
                    type: string
                    description: >-
                      A short, human-readable title for the general error type;
                      the title should not change for given types.
                  detail:
                    type: string
                    description: A human-readable description of the specific error.
                  instance:
                    type: string
                    description: >-
                      This optional key may be present, with a unique URI for
                      the specific error; this will often point to an error log
                      for that specific response.
                  request_id:
                    type: string
                    description: Correlation ID for the original request.
                required:
                  - type
                  - status
                additionalProperties: false
              example:
                status: 404
                type: not_found
        '406':
          description: >-
            Not Acceptable. The resource does not have a current representation
            that would be acceptable to the user agent. "Accept" header defined
            unsupported value.
          headers:
            upvest-request-id:
              required: true
              schema:
                type: string
                format: uuid
                example: 169ae4c7-ebd7-4041-94da-25369653eba7
          content:
            application/problem+json:
              schema:
                title: Error
                type: object
                description: ''
                properties:
                  type:
                    type: string
                    description: URL to a document describing the error condition.
                  status:
                    type: integer
                    description: >-
                      Transmission of the HTTP status code so that all
                      information can be found in one place, but also to correct
                      changes in the status code due to the use of proxy
                      servers.
                  title:
                    type: string
                    description: >-
                      A short, human-readable title for the general error type;
                      the title should not change for given types.
                  detail:
                    type: string
                    description: A human-readable description of the specific error.
                  instance:
                    type: string
                    description: >-
                      This optional key may be present, with a unique URI for
                      the specific error; this will often point to an error log
                      for that specific response.
                  request_id:
                    type: string
                    description: Correlation ID for the original request.
                required:
                  - type
                  - status
                additionalProperties: false
              example:
                status: 406
                type: not_acceptable
        '429':
          description: >-
            Too Many Requests. The caller has exceeded their quota for the time
            period and has been throttled.
          headers:
            upvest-request-id:
              required: true
              schema:
                type: string
                format: uuid
                example: 169ae4c7-ebd7-4041-94da-25369653eba7
          content:
            application/problem+json:
              schema:
                title: Error
                type: object
                description: ''
                properties:
                  type:
                    type: string
                    description: URL to a document describing the error condition.
                  status:
                    type: integer
                    description: >-
                      Transmission of the HTTP status code so that all
                      information can be found in one place, but also to correct
                      changes in the status code due to the use of proxy
                      servers.
                  title:
                    type: string
                    description: >-
                      A short, human-readable title for the general error type;
                      the title should not change for given types.
                  detail:
                    type: string
                    description: A human-readable description of the specific error.
                  instance:
                    type: string
                    description: >-
                      This optional key may be present, with a unique URI for
                      the specific error; this will often point to an error log
                      for that specific response.
                  request_id:
                    type: string
                    description: Correlation ID for the original request.
                required:
                  - type
                  - status
                additionalProperties: false
              example:
                status: 429
                type: too_many_requests
        '500':
          description: Internal Server Error. The service encountered an unexpected error.
          headers:
            upvest-request-id:
              required: true
              schema:
                type: string
                format: uuid
                example: 169ae4c7-ebd7-4041-94da-25369653eba7
          content:
            application/problem+json:
              schema:
                title: Error
                type: object
                description: ''
                properties:
                  type:
                    type: string
                    description: URL to a document describing the error condition.
                  status:
                    type: integer
                    description: >-
                      Transmission of the HTTP status code so that all
                      information can be found in one place, but also to correct
                      changes in the status code due to the use of proxy
                      servers.
                  title:
                    type: string
                    description: >-
                      A short, human-readable title for the general error type;
                      the title should not change for given types.
                  detail:
                    type: string
                    description: A human-readable description of the specific error.
                  instance:
                    type: string
                    description: >-
                      This optional key may be present, with a unique URI for
                      the specific error; this will often point to an error log
                      for that specific response.
                  request_id:
                    type: string
                    description: Correlation ID for the original request.
                required:
                  - type
                  - status
                additionalProperties: false
              example:
                status: 500
                type: internal_server_error
        '503':
          description: >-
            Service Unavailable. The service handling for this request cannot be
            reached at this time.
          headers:
            upvest-request-id:
              required: true
              schema:
                type: string
                format: uuid
                example: 169ae4c7-ebd7-4041-94da-25369653eba7
          content:
            application/problem+json:
              schema:
                title: Error
                type: object
                description: ''
                properties:
                  type:
                    type: string
                    description: URL to a document describing the error condition.
                  status:
                    type: integer
                    description: >-
                      Transmission of the HTTP status code so that all
                      information can be found in one place, but also to correct
                      changes in the status code due to the use of proxy
                      servers.
                  title:
                    type: string
                    description: >-
                      A short, human-readable title for the general error type;
                      the title should not change for given types.
                  detail:
                    type: string
                    description: A human-readable description of the specific error.
                  instance:
                    type: string
                    description: >-
                      This optional key may be present, with a unique URI for
                      the specific error; this will often point to an error log
                      for that specific response.
                  request_id:
                    type: string
                    description: Correlation ID for the original request.
                required:
                  - type
                  - status
                additionalProperties: false
              example:
                status: 503
                type: method_not_allowed
        '504':
          description: >-
            Gateway Timeout. The service gateway has reached its internal
            timeout.
          headers:
            upvest-request-id:
              required: true
              schema:
                type: string
                format: uuid
                example: 169ae4c7-ebd7-4041-94da-25369653eba7
          content:
            application/problem+json:
              schema:
                title: Error
                type: object
                description: ''
                properties:
                  type:
                    type: string
                    description: URL to a document describing the error condition.
                  status:
                    type: integer
                    description: >-
                      Transmission of the HTTP status code so that all
                      information can be found in one place, but also to correct
                      changes in the status code due to the use of proxy
                      servers.
                  title:
                    type: string
                    description: >-
                      A short, human-readable title for the general error type;
                      the title should not change for given types.
                  detail:
                    type: string
                    description: A human-readable description of the specific error.
                  instance:
                    type: string
                    description: >-
                      This optional key may be present, with a unique URI for
                      the specific error; this will often point to an error log
                      for that specific response.
                  request_id:
                    type: string
                    description: Correlation ID for the original request.
                required:
                  - type
                  - status
                additionalProperties: false
              example:
                status: 504
                type: gateway_timeout
  /payments/virtual_bank_accounts:
    parameters:
      - name: upvest-client-id
        in: header
        description: Tenant Client ID
        required: true
        schema:
          type: string
          format: uuid
          example: ebabcf4d-61c3-4942-875c-e265a7c2d062
      - name: authorization
        in: header
        description: |
          Bearer (access) token from the OAuth flow with correct scopes.
          https://datatracker.ietf.org/doc/html/rfc6750
        required: true
        schema:
          type: string
          pattern: ^Bearer [a-zA-Z0-9\-\._~+/]*=*
          example: Bearer c2VjcmV0Cg==
      - name: signature
        in: header
        required: true
        schema:
          type: string
        description: >-
          https://tools.ietf.org/id/draft-ietf-httpbis-message-signatures-01.html#name-the-signature-http-header
      - name: signature-input
        in: header
        required: true
        schema:
          type: string
        description: >-
          https://tools.ietf.org/id/draft-ietf-httpbis-message-signatures-01.html#name-the-signature-input-http-he
      - name: upvest-api-version
        in: header
        required: false
        schema:
          type: string
          enum:
            - '1'
          default: '1'
          example: '1'
        description: 'Upvest API version (Note: Do not include quotation marks)'
    post:
      operationId: create_virtual_bank_account
      summary: Create a virtual bank account
      description: Triggers the creation of a virtual bank account.
      tags:
        - Virtual Bank Accounts
      security:
        - oauth-client-credentials:
            - payments:admin
      parameters:
        - name: idempotency-key
          in: header
          required: true
          schema:
            type: string
            format: uuid
            pattern: >-
              ^[0-9a-fA-F]{8}-?[0-9a-fA-F]{4}-?[0-5][0-9a-fA-F]{3}-?[089abAB][0-9a-fA-F]{3}-?[0-9a-fA-F]{12}$
            example: ccb07f42-4104-44ad-8e1f-c660bb7b269c
          description: >
            A UUID to be used as an idempotency key.  This prevents a duplicate
            request from being replayed.

            https://docs.upvest.co/documentation/concepts/api_concepts/idempotency
      requestBody:
        content:
          application/json:
            schema:
              title: Payments - Virtual Bank Account - Create - Request
              type: object
              properties:
                account_group_id:
                  title: Account group unique identifier.
                  type: string
                  description: Account group unique identifier.
                  format: uuid
                name:
                  type: string
                  description: Name of the virtual bank account
              required:
                - account_group_id
                - name
              additionalProperties: false
            example:
              account_group_id: f874a64a-ceaa-42b2-b59a-39d4f62166fb
              name: Max's Virtual Bank Account
      responses:
        '200':
          description: Virtual Bank Account created.
          headers:
            upvest-request-id:
              required: true
              schema:
                type: string
                format: uuid
                example: 169ae4c7-ebd7-4041-94da-25369653eba7
          content:
            application/json:
              schema:
                type: object
                properties:
                  id:
                    title: Virtual bank account request unique identifier.
                    type: string
                    description: Virtual bank account request unique identifier.
                    format: uuid
                  created_at:
                    type: string
                    format: date-time
                    description: >-
                      Date and time when the resource was created. [RFC
                      3339-5](https://datatracker.ietf.org/doc/html/rfc3339#section-5.6),
                      [ISO8601
                      UTC](https://www.iso.org/iso-8601-date-and-time-format.html)
                  account_group_id:
                    title: Account group unique identifier.
                    type: string
                    description: Account group unique identifier.
                    format: uuid
                  name:
                    type: string
                    description: Name of the virtual bank account
                  owner:
                    type: object
                    description: Owner of the virtual bank account
                    properties:
                      name:
                        type: string
                        description: Name of the owner of the virtual bank account
                    required:
                      - name
                    additionalProperties: false
                  identification:
                    type: object
                    description: Identification details
                    properties:
                      swift:
                        type: object
                        description: SWIFT details
                        properties:
                          iban:
                            title: International Bank Account Number (IBAN)
                            type: string
                            description: >-
                              International Bank Account Number
                              [IBAN](https://en.wikipedia.org/wiki/International_Bank_Account_Number).
                            pattern: ^[A-Z]{2}[0-9]{2}[A-Z0-9]{11,26}$
                          bic:
                            title: Business Identifier Code
                            type: string
                            description: >-
                              Business Identifier Code (also known as SWIFT-BIC,
                              BIC, SWIFT ID or SWIFT code) [ISO
                              9362](https://en.wikipedia.org/wiki/ISO_9362).
                            pattern: ^[A-Z]{6}[A-Z0-9]{2}([A-Z0-9]{3})?$
                        required:
                          - iban
                          - bic
                        additionalProperties: false
                    additionalProperties: false
                required:
                  - id
                  - created_at
                  - account_group_id
                  - owner
                  - identification
                additionalProperties: false
              example:
                id: 22913092-0484-42e9-9273-9ffd6dfd0b13
                created_at: '2021-07-21T14:10:00.00Z'
                account_group_id: d1354aad-6da7-4da7-aaa1-e00ebfd3240d
                name: Max's Virtual Bank Account
                owner:
                  name: Max Musterman
                identification:
                  swift:
                    iban: DE89000000000000000000
                    bic: ABCDEXXX
        '400':
          description: Bad Request. The incoming request had a malformed parameter/object.
          headers:
            upvest-request-id:
              required: true
              schema:
                type: string
                format: uuid
                example: 169ae4c7-ebd7-4041-94da-25369653eba7
          content:
            application/problem+json:
              schema:
                title: Error
                type: object
                description: ''
                properties:
                  type:
                    type: string
                    description: URL to a document describing the error condition.
                  status:
                    type: integer
                    description: >-
                      Transmission of the HTTP status code so that all
                      information can be found in one place, but also to correct
                      changes in the status code due to the use of proxy
                      servers.
                  title:
                    type: string
                    description: >-
                      A short, human-readable title for the general error type;
                      the title should not change for given types.
                  detail:
                    type: string
                    description: A human-readable description of the specific error.
                  instance:
                    type: string
                    description: >-
                      This optional key may be present, with a unique URI for
                      the specific error; this will often point to an error log
                      for that specific response.
                  request_id:
                    type: string
                    description: Correlation ID for the original request.
                required:
                  - type
                  - status
                additionalProperties: false
              example:
                status: 400
                type: bad_request
        '401':
          description: Unauthorized. The caller has not been authenticated.
          headers:
            upvest-request-id:
              required: true
              schema:
                type: string
                format: uuid
                example: 169ae4c7-ebd7-4041-94da-25369653eba7
          content:
            application/problem+json:
              schema:
                title: Error
                type: object
                description: ''
                properties:
                  type:
                    type: string
                    description: URL to a document describing the error condition.
                  status:
                    type: integer
                    description: >-
                      Transmission of the HTTP status code so that all
                      information can be found in one place, but also to correct
                      changes in the status code due to the use of proxy
                      servers.
                  title:
                    type: string
                    description: >-
                      A short, human-readable title for the general error type;
                      the title should not change for given types.
                  detail:
                    type: string
                    description: A human-readable description of the specific error.
                  instance:
                    type: string
                    description: >-
                      This optional key may be present, with a unique URI for
                      the specific error; this will often point to an error log
                      for that specific response.
                  request_id:
                    type: string
                    description: Correlation ID for the original request.
                required:
                  - type
                  - status
                additionalProperties: false
              example:
                status: 401
                type: unauthorized
        '403':
          description: >-
            Forbidden. The caller has been authenticated but is not allowed to
            take the requested action.
          headers:
            upvest-request-id:
              required: true
              schema:
                type: string
                format: uuid
                example: 169ae4c7-ebd7-4041-94da-25369653eba7
          content:
            application/problem+json:
              schema:
                title: Error
                type: object
                description: ''
                properties:
                  type:
                    type: string
                    description: URL to a document describing the error condition.
                  status:
                    type: integer
                    description: >-
                      Transmission of the HTTP status code so that all
                      information can be found in one place, but also to correct
                      changes in the status code due to the use of proxy
                      servers.
                  title:
                    type: string
                    description: >-
                      A short, human-readable title for the general error type;
                      the title should not change for given types.
                  detail:
                    type: string
                    description: A human-readable description of the specific error.
                  instance:
                    type: string
                    description: >-
                      This optional key may be present, with a unique URI for
                      the specific error; this will often point to an error log
                      for that specific response.
                  request_id:
                    type: string
                    description: Correlation ID for the original request.
                required:
                  - type
                  - status
                additionalProperties: false
              example:
                status: 403
                type: forbidden
        '404':
          description: Not Found. The requested resource could not be found.
          headers:
            upvest-request-id:
              required: true
              schema:
                type: string
                format: uuid
                example: 169ae4c7-ebd7-4041-94da-25369653eba7
          content:
            application/problem+json:
              schema:
                title: Error
                type: object
                description: ''
                properties:
                  type:
                    type: string
                    description: URL to a document describing the error condition.
                  status:
                    type: integer
                    description: >-
                      Transmission of the HTTP status code so that all
                      information can be found in one place, but also to correct
                      changes in the status code due to the use of proxy
                      servers.
                  title:
                    type: string
                    description: >-
                      A short, human-readable title for the general error type;
                      the title should not change for given types.
                  detail:
                    type: string
                    description: A human-readable description of the specific error.
                  instance:
                    type: string
                    description: >-
                      This optional key may be present, with a unique URI for
                      the specific error; this will often point to an error log
                      for that specific response.
                  request_id:
                    type: string
                    description: Correlation ID for the original request.
                required:
                  - type
                  - status
                additionalProperties: false
              example:
                status: 404
                type: not_found
        '406':
          description: >-
            Not Acceptable. The resource does not have a current representation
            that would be acceptable to the user agent. "Accept" header defined
            unsupported value.
          headers:
            upvest-request-id:
              required: true
              schema:
                type: string
                format: uuid
                example: 169ae4c7-ebd7-4041-94da-25369653eba7
          content:
            application/problem+json:
              schema:
                title: Error
                type: object
                description: ''
                properties:
                  type:
                    type: string
                    description: URL to a document describing the error condition.
                  status:
                    type: integer
                    description: >-
                      Transmission of the HTTP status code so that all
                      information can be found in one place, but also to correct
                      changes in the status code due to the use of proxy
                      servers.
                  title:
                    type: string
                    description: >-
                      A short, human-readable title for the general error type;
                      the title should not change for given types.
                  detail:
                    type: string
                    description: A human-readable description of the specific error.
                  instance:
                    type: string
                    description: >-
                      This optional key may be present, with a unique URI for
                      the specific error; this will often point to an error log
                      for that specific response.
                  request_id:
                    type: string
                    description: Correlation ID for the original request.
                required:
                  - type
                  - status
                additionalProperties: false
              example:
                status: 406
                type: not_acceptable
        '429':
          description: >-
            Too Many Requests. The caller has exceeded their quota for the time
            period and has been throttled.
          headers:
            upvest-request-id:
              required: true
              schema:
                type: string
                format: uuid
                example: 169ae4c7-ebd7-4041-94da-25369653eba7
          content:
            application/problem+json:
              schema:
                title: Error
                type: object
                description: ''
                properties:
                  type:
                    type: string
                    description: URL to a document describing the error condition.
                  status:
                    type: integer
                    description: >-
                      Transmission of the HTTP status code so that all
                      information can be found in one place, but also to correct
                      changes in the status code due to the use of proxy
                      servers.
                  title:
                    type: string
                    description: >-
                      A short, human-readable title for the general error type;
                      the title should not change for given types.
                  detail:
                    type: string
                    description: A human-readable description of the specific error.
                  instance:
                    type: string
                    description: >-
                      This optional key may be present, with a unique URI for
                      the specific error; this will often point to an error log
                      for that specific response.
                  request_id:
                    type: string
                    description: Correlation ID for the original request.
                required:
                  - type
                  - status
                additionalProperties: false
              example:
                status: 429
                type: too_many_requests
        '500':
          description: Internal Server Error. The service encountered an unexpected error.
          headers:
            upvest-request-id:
              required: true
              schema:
                type: string
                format: uuid
                example: 169ae4c7-ebd7-4041-94da-25369653eba7
          content:
            application/problem+json:
              schema:
                title: Error
                type: object
                description: ''
                properties:
                  type:
                    type: string
                    description: URL to a document describing the error condition.
                  status:
                    type: integer
                    description: >-
                      Transmission of the HTTP status code so that all
                      information can be found in one place, but also to correct
                      changes in the status code due to the use of proxy
                      servers.
                  title:
                    type: string
                    description: >-
                      A short, human-readable title for the general error type;
                      the title should not change for given types.
                  detail:
                    type: string
                    description: A human-readable description of the specific error.
                  instance:
                    type: string
                    description: >-
                      This optional key may be present, with a unique URI for
                      the specific error; this will often point to an error log
                      for that specific response.
                  request_id:
                    type: string
                    description: Correlation ID for the original request.
                required:
                  - type
                  - status
                additionalProperties: false
              example:
                status: 500
                type: internal_server_error
        '503':
          description: >-
            Service Unavailable. The service handling for this request cannot be
            reached at this time.
          headers:
            upvest-request-id:
              required: true
              schema:
                type: string
                format: uuid
                example: 169ae4c7-ebd7-4041-94da-25369653eba7
          content:
            application/problem+json:
              schema:
                title: Error
                type: object
                description: ''
                properties:
                  type:
                    type: string
                    description: URL to a document describing the error condition.
                  status:
                    type: integer
                    description: >-
                      Transmission of the HTTP status code so that all
                      information can be found in one place, but also to correct
                      changes in the status code due to the use of proxy
                      servers.
                  title:
                    type: string
                    description: >-
                      A short, human-readable title for the general error type;
                      the title should not change for given types.
                  detail:
                    type: string
                    description: A human-readable description of the specific error.
                  instance:
                    type: string
                    description: >-
                      This optional key may be present, with a unique URI for
                      the specific error; this will often point to an error log
                      for that specific response.
                  request_id:
                    type: string
                    description: Correlation ID for the original request.
                required:
                  - type
                  - status
                additionalProperties: false
              example:
                status: 503
                type: method_not_allowed
        '504':
          description: >-
            Gateway Timeout. The service gateway has reached its internal
            timeout.
          headers:
            upvest-request-id:
              required: true
              schema:
                type: string
                format: uuid
                example: 169ae4c7-ebd7-4041-94da-25369653eba7
          content:
            application/problem+json:
              schema:
                title: Error
                type: object
                description: ''
                properties:
                  type:
                    type: string
                    description: URL to a document describing the error condition.
                  status:
                    type: integer
                    description: >-
                      Transmission of the HTTP status code so that all
                      information can be found in one place, but also to correct
                      changes in the status code due to the use of proxy
                      servers.
                  title:
                    type: string
                    description: >-
                      A short, human-readable title for the general error type;
                      the title should not change for given types.
                  detail:
                    type: string
                    description: A human-readable description of the specific error.
                  instance:
                    type: string
                    description: >-
                      This optional key may be present, with a unique URI for
                      the specific error; this will often point to an error log
                      for that specific response.
                  request_id:
                    type: string
                    description: Correlation ID for the original request.
                required:
                  - type
                  - status
                additionalProperties: false
              example:
                status: 504
                type: gateway_timeout
  /payments/virtual_bank_accounts/{virtual_bank_account_id}:
    parameters:
      - name: virtual_bank_account_id
        in: path
        required: true
        schema:
          title: Virtual bank account request unique identifier.
          type: string
          description: Virtual bank account request unique identifier.
          format: uuid
      - name: upvest-client-id
        in: header
        description: Tenant Client ID
        required: true
        schema:
          type: string
          format: uuid
          example: ebabcf4d-61c3-4942-875c-e265a7c2d062
      - name: authorization
        in: header
        description: |
          Bearer (access) token from the OAuth flow with correct scopes.
          https://datatracker.ietf.org/doc/html/rfc6750
        required: true
        schema:
          type: string
          pattern: ^Bearer [a-zA-Z0-9\-\._~+/]*=*
          example: Bearer c2VjcmV0Cg==
      - name: signature
        in: header
        required: true
        schema:
          type: string
        description: >-
          https://tools.ietf.org/id/draft-ietf-httpbis-message-signatures-01.html#name-the-signature-http-header
      - name: signature-input
        in: header
        required: true
        schema:
          type: string
        description: >-
          https://tools.ietf.org/id/draft-ietf-httpbis-message-signatures-01.html#name-the-signature-input-http-he
      - name: upvest-api-version
        in: header
        required: false
        schema:
          type: string
          enum:
            - '1'
          default: '1'
          example: '1'
        description: 'Upvest API version (Note: Do not include quotation marks)'
    get:
      operationId: retrieve_virtual_bank_account
      summary: Retrieve a virtual bank account by ID
      description: Returns a virtual bank account specified by its ID.
      tags:
        - Virtual Bank Accounts
      security:
        - oauth-client-credentials:
            - payments:admin
            - payments:read
      responses:
        '200':
          description: OK.
          headers:
            upvest-request-id:
              required: true
              schema:
                type: string
                format: uuid
                example: 169ae4c7-ebd7-4041-94da-25369653eba7
          content:
            application/json:
              schema:
                type: object
                properties:
                  id:
                    title: Virtual bank account request unique identifier.
                    type: string
                    description: Virtual bank account request unique identifier.
                    format: uuid
                  created_at:
                    type: string
                    format: date-time
                    description: >-
                      Date and time when the resource was created. [RFC
                      3339-5](https://datatracker.ietf.org/doc/html/rfc3339#section-5.6),
                      [ISO8601
                      UTC](https://www.iso.org/iso-8601-date-and-time-format.html)
                  account_group_id:
                    title: Account group unique identifier.
                    type: string
                    description: Account group unique identifier.
                    format: uuid
                  name:
                    type: string
                    description: Name of the virtual bank account
                  owner:
                    type: object
                    description: Owner of the virtual bank account
                    properties:
                      name:
                        type: string
                        description: Name of the owner of the virtual bank account
                    required:
                      - name
                    additionalProperties: false
                  identification:
                    type: object
                    description: Identification details
                    properties:
                      swift:
                        type: object
                        description: SWIFT details
                        properties:
                          iban:
                            title: International Bank Account Number (IBAN)
                            type: string
                            description: >-
                              International Bank Account Number
                              [IBAN](https://en.wikipedia.org/wiki/International_Bank_Account_Number).
                            pattern: ^[A-Z]{2}[0-9]{2}[A-Z0-9]{11,26}$
                          bic:
                            title: Business Identifier Code
                            type: string
                            description: >-
                              Business Identifier Code (also known as SWIFT-BIC,
                              BIC, SWIFT ID or SWIFT code) [ISO
                              9362](https://en.wikipedia.org/wiki/ISO_9362).
                            pattern: ^[A-Z]{6}[A-Z0-9]{2}([A-Z0-9]{3})?$
                        required:
                          - iban
                          - bic
                        additionalProperties: false
                    additionalProperties: false
                required:
                  - id
                  - created_at
                  - account_group_id
                  - owner
                  - identification
                additionalProperties: false
              example:
                id: 22913092-0484-42e9-9273-9ffd6dfd0b13
                created_at: '2021-07-21T14:10:00.00Z'
                account_group_id: d1354aad-6da7-4da7-aaa1-e00ebfd3240d
                name: Max's Virtual Bank Account
                owner:
                  name: Max Musterman
                identification:
                  swift:
                    iban: DE89000000000000000000
                    bic: ABCDEXXX
        '401':
          description: Unauthorized. The caller has not been authenticated.
          headers:
            upvest-request-id:
              required: true
              schema:
                type: string
                format: uuid
                example: 169ae4c7-ebd7-4041-94da-25369653eba7
          content:
            application/problem+json:
              schema:
                title: Error
                type: object
                description: ''
                properties:
                  type:
                    type: string
                    description: URL to a document describing the error condition.
                  status:
                    type: integer
                    description: >-
                      Transmission of the HTTP status code so that all
                      information can be found in one place, but also to correct
                      changes in the status code due to the use of proxy
                      servers.
                  title:
                    type: string
                    description: >-
                      A short, human-readable title for the general error type;
                      the title should not change for given types.
                  detail:
                    type: string
                    description: A human-readable description of the specific error.
                  instance:
                    type: string
                    description: >-
                      This optional key may be present, with a unique URI for
                      the specific error; this will often point to an error log
                      for that specific response.
                  request_id:
                    type: string
                    description: Correlation ID for the original request.
                required:
                  - type
                  - status
                additionalProperties: false
              example:
                status: 401
                type: unauthorized
        '403':
          description: >-
            Forbidden. The caller has been authenticated but is not allowed to
            take the requested action.
          headers:
            upvest-request-id:
              required: true
              schema:
                type: string
                format: uuid
                example: 169ae4c7-ebd7-4041-94da-25369653eba7
          content:
            application/problem+json:
              schema:
                title: Error
                type: object
                description: ''
                properties:
                  type:
                    type: string
                    description: URL to a document describing the error condition.
                  status:
                    type: integer
                    description: >-
                      Transmission of the HTTP status code so that all
                      information can be found in one place, but also to correct
                      changes in the status code due to the use of proxy
                      servers.
                  title:
                    type: string
                    description: >-
                      A short, human-readable title for the general error type;
                      the title should not change for given types.
                  detail:
                    type: string
                    description: A human-readable description of the specific error.
                  instance:
                    type: string
                    description: >-
                      This optional key may be present, with a unique URI for
                      the specific error; this will often point to an error log
                      for that specific response.
                  request_id:
                    type: string
                    description: Correlation ID for the original request.
                required:
                  - type
                  - status
                additionalProperties: false
              example:
                status: 403
                type: forbidden
        '404':
          description: Not Found. The requested resource could not be found.
          headers:
            upvest-request-id:
              required: true
              schema:
                type: string
                format: uuid
                example: 169ae4c7-ebd7-4041-94da-25369653eba7
          content:
            application/problem+json:
              schema:
                title: Error
                type: object
                description: ''
                properties:
                  type:
                    type: string
                    description: URL to a document describing the error condition.
                  status:
                    type: integer
                    description: >-
                      Transmission of the HTTP status code so that all
                      information can be found in one place, but also to correct
                      changes in the status code due to the use of proxy
                      servers.
                  title:
                    type: string
                    description: >-
                      A short, human-readable title for the general error type;
                      the title should not change for given types.
                  detail:
                    type: string
                    description: A human-readable description of the specific error.
                  instance:
                    type: string
                    description: >-
                      This optional key may be present, with a unique URI for
                      the specific error; this will often point to an error log
                      for that specific response.
                  request_id:
                    type: string
                    description: Correlation ID for the original request.
                required:
                  - type
                  - status
                additionalProperties: false
              example:
                status: 404
                type: not_found
        '406':
          description: >-
            Not Acceptable. The resource does not have a current representation
            that would be acceptable to the user agent. "Accept" header defined
            unsupported value.
          headers:
            upvest-request-id:
              required: true
              schema:
                type: string
                format: uuid
                example: 169ae4c7-ebd7-4041-94da-25369653eba7
          content:
            application/problem+json:
              schema:
                title: Error
                type: object
                description: ''
                properties:
                  type:
                    type: string
                    description: URL to a document describing the error condition.
                  status:
                    type: integer
                    description: >-
                      Transmission of the HTTP status code so that all
                      information can be found in one place, but also to correct
                      changes in the status code due to the use of proxy
                      servers.
                  title:
                    type: string
                    description: >-
                      A short, human-readable title for the general error type;
                      the title should not change for given types.
                  detail:
                    type: string
                    description: A human-readable description of the specific error.
                  instance:
                    type: string
                    description: >-
                      This optional key may be present, with a unique URI for
                      the specific error; this will often point to an error log
                      for that specific response.
                  request_id:
                    type: string
                    description: Correlation ID for the original request.
                required:
                  - type
                  - status
                additionalProperties: false
              example:
                status: 406
                type: not_acceptable
        '429':
          description: >-
            Too Many Requests. The caller has exceeded their quota for the time
            period and has been throttled.
          headers:
            upvest-request-id:
              required: true
              schema:
                type: string
                format: uuid
                example: 169ae4c7-ebd7-4041-94da-25369653eba7
          content:
            application/problem+json:
              schema:
                title: Error
                type: object
                description: ''
                properties:
                  type:
                    type: string
                    description: URL to a document describing the error condition.
                  status:
                    type: integer
                    description: >-
                      Transmission of the HTTP status code so that all
                      information can be found in one place, but also to correct
                      changes in the status code due to the use of proxy
                      servers.
                  title:
                    type: string
                    description: >-
                      A short, human-readable title for the general error type;
                      the title should not change for given types.
                  detail:
                    type: string
                    description: A human-readable description of the specific error.
                  instance:
                    type: string
                    description: >-
                      This optional key may be present, with a unique URI for
                      the specific error; this will often point to an error log
                      for that specific response.
                  request_id:
                    type: string
                    description: Correlation ID for the original request.
                required:
                  - type
                  - status
                additionalProperties: false
              example:
                status: 429
                type: too_many_requests
        '500':
          description: Internal Server Error. The service encountered an unexpected error.
          headers:
            upvest-request-id:
              required: true
              schema:
                type: string
                format: uuid
                example: 169ae4c7-ebd7-4041-94da-25369653eba7
          content:
            application/problem+json:
              schema:
                title: Error
                type: object
                description: ''
                properties:
                  type:
                    type: string
                    description: URL to a document describing the error condition.
                  status:
                    type: integer
                    description: >-
                      Transmission of the HTTP status code so that all
                      information can be found in one place, but also to correct
                      changes in the status code due to the use of proxy
                      servers.
                  title:
                    type: string
                    description: >-
                      A short, human-readable title for the general error type;
                      the title should not change for given types.
                  detail:
                    type: string
                    description: A human-readable description of the specific error.
                  instance:
                    type: string
                    description: >-
                      This optional key may be present, with a unique URI for
                      the specific error; this will often point to an error log
                      for that specific response.
                  request_id:
                    type: string
                    description: Correlation ID for the original request.
                required:
                  - type
                  - status
                additionalProperties: false
              example:
                status: 500
                type: internal_server_error
        '503':
          description: >-
            Service Unavailable. The service handling for this request cannot be
            reached at this time.
          headers:
            upvest-request-id:
              required: true
              schema:
                type: string
                format: uuid
                example: 169ae4c7-ebd7-4041-94da-25369653eba7
          content:
            application/problem+json:
              schema:
                title: Error
                type: object
                description: ''
                properties:
                  type:
                    type: string
                    description: URL to a document describing the error condition.
                  status:
                    type: integer
                    description: >-
                      Transmission of the HTTP status code so that all
                      information can be found in one place, but also to correct
                      changes in the status code due to the use of proxy
                      servers.
                  title:
                    type: string
                    description: >-
                      A short, human-readable title for the general error type;
                      the title should not change for given types.
                  detail:
                    type: string
                    description: A human-readable description of the specific error.
                  instance:
                    type: string
                    description: >-
                      This optional key may be present, with a unique URI for
                      the specific error; this will often point to an error log
                      for that specific response.
                  request_id:
                    type: string
                    description: Correlation ID for the original request.
                required:
                  - type
                  - status
                additionalProperties: false
              example:
                status: 503
                type: method_not_allowed
        '504':
          description: >-
            Gateway Timeout. The service gateway has reached its internal
            timeout.
          headers:
            upvest-request-id:
              required: true
              schema:
                type: string
                format: uuid
                example: 169ae4c7-ebd7-4041-94da-25369653eba7
          content:
            application/problem+json:
              schema:
                title: Error
                type: object
                description: ''
                properties:
                  type:
                    type: string
                    description: URL to a document describing the error condition.
                  status:
                    type: integer
                    description: >-
                      Transmission of the HTTP status code so that all
                      information can be found in one place, but also to correct
                      changes in the status code due to the use of proxy
                      servers.
                  title:
                    type: string
                    description: >-
                      A short, human-readable title for the general error type;
                      the title should not change for given types.
                  detail:
                    type: string
                    description: A human-readable description of the specific error.
                  instance:
                    type: string
                    description: >-
                      This optional key may be present, with a unique URI for
                      the specific error; this will often point to an error log
                      for that specific response.
                  request_id:
                    type: string
                    description: Correlation ID for the original request.
                required:
                  - type
                  - status
                additionalProperties: false
              example:
                status: 504
                type: gateway_timeout
  /account_groups:
    parameters:
      - name: upvest-client-id
        in: header
        description: Tenant Client ID
        required: true
        schema:
          type: string
          format: uuid
          example: ebabcf4d-61c3-4942-875c-e265a7c2d062
      - name: authorization
        in: header
        description: |
          Bearer (access) token from the OAuth flow with correct scopes.
          https://datatracker.ietf.org/doc/html/rfc6750
        required: true
        schema:
          type: string
          pattern: ^Bearer [a-zA-Z0-9\-\._~+/]*=*
          example: Bearer c2VjcmV0Cg==
      - name: signature
        in: header
        required: true
        schema:
          type: string
        description: >-
          https://tools.ietf.org/id/draft-ietf-httpbis-message-signatures-01.html#name-the-signature-http-header
      - name: signature-input
        in: header
        required: true
        schema:
          type: string
        description: >-
          https://tools.ietf.org/id/draft-ietf-httpbis-message-signatures-01.html#name-the-signature-input-http-he
      - name: upvest-api-version
        in: header
        required: false
        schema:
          type: string
          enum:
            - '1'
          default: '1'
          example: '1'
        description: 'Upvest API version (Note: Do not include quotation marks)'
    get:
      operationId: list_account_groups
      summary: Get account groups
      description: Returns a list of all account groups.
      tags:
        - Account Groups
      security:
        - oauth-client-credentials:
            - accounts:read
            - accounts:admin
      parameters:
        - name: sort
          in: query
          required: false
          schema:
            type: string
            enum:
              - created_at
              - updated_at
            default: created_at
          description: Sort the result by `created_at`, `updated_at`.
        - name: order
          in: query
          required: false
          schema:
            type: string
            enum:
              - ASC
              - DESC
            default: ASC
          description: >-
            Sort order of the result list if the `sort` parameter is specified.
            Use `ASC` for ascending or `DESC` for descending sort order.
        - name: offset
          in: query
          schema:
            type: integer
            minimum: 0
            format: int32
          allowEmptyValue: true
          description: >-
            Use the `offset` argument to specify where in the list of results to
            start when returning items for a particular query.
        - name: limit
          in: query
          schema:
            type: integer
            format: int32
            default: 100
            minimum: 0
            maximum: 1000
          allowEmptyValue: true
          description: >-
            Use the `limit` argument to specify the maximum number of items
            returned.
      responses:
        '200':
          description: OK
          headers:
            upvest-request-id:
              required: true
              schema:
                type: string
                format: uuid
                example: 169ae4c7-ebd7-4041-94da-25369653eba7
          content:
            application/json:
              schema:
                title: Account Groups - List - Response
                type: object
                properties:
                  meta:
                    type: object
                    properties:
                      offset:
                        type: integer
                        description: Amount of resource to offset in the response.
                      limit:
                        type: integer
                        description: Total limit of the response.
                      count:
                        type: integer
                        description: Count of the resources returned in the response.
                      total_count:
                        type: integer
                        description: Total count of all the resources.
                      sort:
                        type: string
                        description: The field that the list is sorted by.
                      order:
                        type: string
                        description: |-
                          The ordering of the response.
                          * ASC - Ascending order
                          * DESC - Descending order
                        enum:
                          - ASC
                          - DESC
                    required:
                      - offset
                      - limit
                      - count
                      - total_count
                  data:
                    type: array
                    items:
                      title: Account Group
                      type: object
                      description: ''
                      properties:
                        id:
                          title: Account group unique identifier.
                          type: string
                          description: Account group unique identifier.
                          format: uuid
                        created_at:
                          type: string
                          format: date-time
                          description: >-
                            Date and time when the resource was created. [RFC
                            3339-5](https://datatracker.ietf.org/doc/html/rfc3339#section-5.6),
                            [ISO8601
                            UTC](https://www.iso.org/iso-8601-date-and-time-format.html)
                        updated_at:
                          type: string
                          format: date-time
                          description: >-
                            Date and time when the resource was last updated.
                            [RFC
                            3339-5](https://datatracker.ietf.org/doc/html/rfc3339#section-5.6),
                            [ISO8601
                            UTC](https://www.iso.org/iso-8601-date-and-time-format.html)
                        users:
                          type: array
                          items:
                            type: object
                            properties:
                              id:
                                title: User unique identifier.
                                type: string
                                description: User unique identifier.
                                format: uuid
                              type:
                                type: string
                                description: |-
                                  Relation type
                                  * OWNER - 
                                enum:
                                  - OWNER
                                default: OWNER
                        status:
                          type: string
                          description: >-
                            Status of the account group

                            * PENDING_APPROVAL - Account group approval is
                            pending - the account group is visible through our
                            API but cannot be acted on.

                            * ACTIVE - Account group is active - full
                            functionality of the Investment API is accessible.

                            * CLOSING - Account group is closing.

                            * CLOSED - Account group is closed.

                            * LOCKED - Account group is locked for all actions.
                          enum:
                            - PENDING_APPROVAL
                            - ACTIVE
                            - CLOSING
                            - CLOSED
                            - LOCKED
                        type:
                          type: string
                          description: >-
                            Account group type.

                            * PERSONAL - Account group of a person holding
                            assets on their own behalf.

                            * LEGAL_ENTITY - Account group of a legal entity
                            holding assets on behalf of their users.

                            * FRENCH_PEA - Account group of a french resident
                            holding assets in Plan d'Epargne en Actions.

                            * ISA - Account group of a UK resident holding
                            assets in an individual savings account.

                            * CHILD - Account group of a child user holding
                            assets in a child account.
                          enum:
                            - PERSONAL
                            - LEGAL_ENTITY
                            - FRENCH_PEA
                            - ISA
                            - CHILD
                        securities_account_number:
                          type: string
                          description: Securities account number
                          pattern: ^[0-9]{9}$
                      required:
                        - id
                        - created_at
                        - updated_at
                        - users
                        - status
                        - type
                        - securities_account_number
                      additionalProperties: false
                required:
                  - meta
                  - data
                additionalProperties: false
              example:
                meta:
                  offset: 0
                  limit: 100
                  count: 1
                  total_count: 1
                  sort: created_at
                  order: ASC
                data:
                  - id: 9d95820d-4333-46b6-98de-04ab7512e76f
                    created_at: '2020-08-24T14:15:22Z'
                    updated_at: '2020-08-24T14:15:22Z'
                    type: PERSONAL
                    status: ACTIVE
                    users:
                      - id: 9c36af78-91a0-4174-a515-fc81214e3dab
                        type: OWNER
                    securities_account_number: '123456789'
        '400':
          description: Bad Request. The incoming request had a malformed parameter/object.
          headers:
            upvest-request-id:
              required: true
              schema:
                type: string
                format: uuid
                example: 169ae4c7-ebd7-4041-94da-25369653eba7
          content:
            application/problem+json:
              schema:
                title: Error
                type: object
                description: ''
                properties:
                  type:
                    type: string
                    description: URL to a document describing the error condition.
                  status:
                    type: integer
                    description: >-
                      Transmission of the HTTP status code so that all
                      information can be found in one place, but also to correct
                      changes in the status code due to the use of proxy
                      servers.
                  title:
                    type: string
                    description: >-
                      A short, human-readable title for the general error type;
                      the title should not change for given types.
                  detail:
                    type: string
                    description: A human-readable description of the specific error.
                  instance:
                    type: string
                    description: >-
                      This optional key may be present, with a unique URI for
                      the specific error; this will often point to an error log
                      for that specific response.
                  request_id:
                    type: string
                    description: Correlation ID for the original request.
                required:
                  - type
                  - status
                additionalProperties: false
              example:
                status: 400
                type: bad_request
        '401':
          description: Unauthorized. The caller has not been authenticated.
          headers:
            upvest-request-id:
              required: true
              schema:
                type: string
                format: uuid
                example: 169ae4c7-ebd7-4041-94da-25369653eba7
          content:
            application/problem+json:
              schema:
                title: Error
                type: object
                description: ''
                properties:
                  type:
                    type: string
                    description: URL to a document describing the error condition.
                  status:
                    type: integer
                    description: >-
                      Transmission of the HTTP status code so that all
                      information can be found in one place, but also to correct
                      changes in the status code due to the use of proxy
                      servers.
                  title:
                    type: string
                    description: >-
                      A short, human-readable title for the general error type;
                      the title should not change for given types.
                  detail:
                    type: string
                    description: A human-readable description of the specific error.
                  instance:
                    type: string
                    description: >-
                      This optional key may be present, with a unique URI for
                      the specific error; this will often point to an error log
                      for that specific response.
                  request_id:
                    type: string
                    description: Correlation ID for the original request.
                required:
                  - type
                  - status
                additionalProperties: false
              example:
                status: 401
                type: unauthorized
        '403':
          description: >-
            Forbidden. The caller has been authenticated but is not allowed to
            take the requested action.
          headers:
            upvest-request-id:
              required: true
              schema:
                type: string
                format: uuid
                example: 169ae4c7-ebd7-4041-94da-25369653eba7
          content:
            application/problem+json:
              schema:
                title: Error
                type: object
                description: ''
                properties:
                  type:
                    type: string
                    description: URL to a document describing the error condition.
                  status:
                    type: integer
                    description: >-
                      Transmission of the HTTP status code so that all
                      information can be found in one place, but also to correct
                      changes in the status code due to the use of proxy
                      servers.
                  title:
                    type: string
                    description: >-
                      A short, human-readable title for the general error type;
                      the title should not change for given types.
                  detail:
                    type: string
                    description: A human-readable description of the specific error.
                  instance:
                    type: string
                    description: >-
                      This optional key may be present, with a unique URI for
                      the specific error; this will often point to an error log
                      for that specific response.
                  request_id:
                    type: string
                    description: Correlation ID for the original request.
                required:
                  - type
                  - status
                additionalProperties: false
              example:
                status: 403
                type: forbidden
        '406':
          description: >-
            Not Acceptable. The resource does not have a current representation
            that would be acceptable to the user agent. "Accept" header defined
            unsupported value.
          headers:
            upvest-request-id:
              required: true
              schema:
                type: string
                format: uuid
                example: 169ae4c7-ebd7-4041-94da-25369653eba7
          content:
            application/problem+json:
              schema:
                title: Error
                type: object
                description: ''
                properties:
                  type:
                    type: string
                    description: URL to a document describing the error condition.
                  status:
                    type: integer
                    description: >-
                      Transmission of the HTTP status code so that all
                      information can be found in one place, but also to correct
                      changes in the status code due to the use of proxy
                      servers.
                  title:
                    type: string
                    description: >-
                      A short, human-readable title for the general error type;
                      the title should not change for given types.
                  detail:
                    type: string
                    description: A human-readable description of the specific error.
                  instance:
                    type: string
                    description: >-
                      This optional key may be present, with a unique URI for
                      the specific error; this will often point to an error log
                      for that specific response.
                  request_id:
                    type: string
                    description: Correlation ID for the original request.
                required:
                  - type
                  - status
                additionalProperties: false
              example:
                status: 406
                type: not_acceptable
        '429':
          description: >-
            Too Many Requests. The caller has exceeded their quota for the time
            period and has been throttled.
          headers:
            upvest-request-id:
              required: true
              schema:
                type: string
                format: uuid
                example: 169ae4c7-ebd7-4041-94da-25369653eba7
          content:
            application/problem+json:
              schema:
                title: Error
                type: object
                description: ''
                properties:
                  type:
                    type: string
                    description: URL to a document describing the error condition.
                  status:
                    type: integer
                    description: >-
                      Transmission of the HTTP status code so that all
                      information can be found in one place, but also to correct
                      changes in the status code due to the use of proxy
                      servers.
                  title:
                    type: string
                    description: >-
                      A short, human-readable title for the general error type;
                      the title should not change for given types.
                  detail:
                    type: string
                    description: A human-readable description of the specific error.
                  instance:
                    type: string
                    description: >-
                      This optional key may be present, with a unique URI for
                      the specific error; this will often point to an error log
                      for that specific response.
                  request_id:
                    type: string
                    description: Correlation ID for the original request.
                required:
                  - type
                  - status
                additionalProperties: false
              example:
                status: 429
                type: too_many_requests
        '500':
          description: Internal Server Error. The service encountered an unexpected error.
          headers:
            upvest-request-id:
              required: true
              schema:
                type: string
                format: uuid
                example: 169ae4c7-ebd7-4041-94da-25369653eba7
          content:
            application/problem+json:
              schema:
                title: Error
                type: object
                description: ''
                properties:
                  type:
                    type: string
                    description: URL to a document describing the error condition.
                  status:
                    type: integer
                    description: >-
                      Transmission of the HTTP status code so that all
                      information can be found in one place, but also to correct
                      changes in the status code due to the use of proxy
                      servers.
                  title:
                    type: string
                    description: >-
                      A short, human-readable title for the general error type;
                      the title should not change for given types.
                  detail:
                    type: string
                    description: A human-readable description of the specific error.
                  instance:
                    type: string
                    description: >-
                      This optional key may be present, with a unique URI for
                      the specific error; this will often point to an error log
                      for that specific response.
                  request_id:
                    type: string
                    description: Correlation ID for the original request.
                required:
                  - type
                  - status
                additionalProperties: false
              example:
                status: 500
                type: internal_server_error
        '503':
          description: >-
            Service Unavailable. The service handling for this request cannot be
            reached at this time.
          headers:
            upvest-request-id:
              required: true
              schema:
                type: string
                format: uuid
                example: 169ae4c7-ebd7-4041-94da-25369653eba7
          content:
            application/problem+json:
              schema:
                title: Error
                type: object
                description: ''
                properties:
                  type:
                    type: string
                    description: URL to a document describing the error condition.
                  status:
                    type: integer
                    description: >-
                      Transmission of the HTTP status code so that all
                      information can be found in one place, but also to correct
                      changes in the status code due to the use of proxy
                      servers.
                  title:
                    type: string
                    description: >-
                      A short, human-readable title for the general error type;
                      the title should not change for given types.
                  detail:
                    type: string
                    description: A human-readable description of the specific error.
                  instance:
                    type: string
                    description: >-
                      This optional key may be present, with a unique URI for
                      the specific error; this will often point to an error log
                      for that specific response.
                  request_id:
                    type: string
                    description: Correlation ID for the original request.
                required:
                  - type
                  - status
                additionalProperties: false
              example:
                status: 503
                type: method_not_allowed
        '504':
          description: >-
            Gateway Timeout. The service gateway has reached its internal
            timeout.
          headers:
            upvest-request-id:
              required: true
              schema:
                type: string
                format: uuid
                example: 169ae4c7-ebd7-4041-94da-25369653eba7
          content:
            application/problem+json:
              schema:
                title: Error
                type: object
                description: ''
                properties:
                  type:
                    type: string
                    description: URL to a document describing the error condition.
                  status:
                    type: integer
                    description: >-
                      Transmission of the HTTP status code so that all
                      information can be found in one place, but also to correct
                      changes in the status code due to the use of proxy
                      servers.
                  title:
                    type: string
                    description: >-
                      A short, human-readable title for the general error type;
                      the title should not change for given types.
                  detail:
                    type: string
                    description: A human-readable description of the specific error.
                  instance:
                    type: string
                    description: >-
                      This optional key may be present, with a unique URI for
                      the specific error; this will often point to an error log
                      for that specific response.
                  request_id:
                    type: string
                    description: Correlation ID for the original request.
                required:
                  - type
                  - status
                additionalProperties: false
              example:
                status: 504
                type: gateway_timeout
    post:
      operationId: create_account_group
      summary: Create an account group
      description: Creates an account group.
      tags:
        - Account Groups
      security:
        - oauth-client-credentials:
            - accounts:admin
      parameters:
        - name: idempotency-key
          in: header
          required: true
          schema:
            type: string
            format: uuid
            pattern: >-
              ^[0-9a-fA-F]{8}-?[0-9a-fA-F]{4}-?[0-5][0-9a-fA-F]{3}-?[089abAB][0-9a-fA-F]{3}-?[0-9a-fA-F]{12}$
            example: ccb07f42-4104-44ad-8e1f-c660bb7b269c
          description: >
            A UUID to be used as an idempotency key.  This prevents a duplicate
            request from being replayed.

            https://docs.upvest.co/documentation/concepts/api_concepts/idempotency
      requestBody:
        content:
          application/json:
            schema:
              title: Account Group - Create - Request
              type: object
              properties:
                user_id:
                  title: User unique identifier.
                  type: string
                  description: User unique identifier.
                  format: uuid
                type:
                  type: string
                  description: >-
                    Account group type.

                    * PERSONAL - Account group of a person holding assets on
                    their own behalf.

                    * LEGAL_ENTITY - Account group of a legal entity holding
                    assets on behalf of their users.

                    * FRENCH_PEA - Account group of a french resident holding
                    assets in Plan d'Epargne en Actions.

                    * ISA - Account group of a UK resident holding assets in an
                    individual savings account.

                    * CHILD - Account group of a child user holding assets in a
                    child account.
                  enum:
                    - PERSONAL
                    - LEGAL_ENTITY
                    - FRENCH_PEA
                    - ISA
                    - CHILD
              required:
                - user_id
                - type
              additionalProperties: false
            example:
              user_id: 413715f2-5401-4b97-8055-034a6b879f8c
              type: PERSONAL
      responses:
        '200':
          description: Account group created.
          headers:
            upvest-request-id:
              required: true
              schema:
                type: string
                format: uuid
                example: 169ae4c7-ebd7-4041-94da-25369653eba7
          content:
            application/json:
              schema:
                title: Account Group
                type: object
                description: ''
                properties:
                  id:
                    title: Account group unique identifier.
                    type: string
                    description: Account group unique identifier.
                    format: uuid
                  created_at:
                    type: string
                    format: date-time
                    description: >-
                      Date and time when the resource was created. [RFC
                      3339-5](https://datatracker.ietf.org/doc/html/rfc3339#section-5.6),
                      [ISO8601
                      UTC](https://www.iso.org/iso-8601-date-and-time-format.html)
                  updated_at:
                    type: string
                    format: date-time
                    description: >-
                      Date and time when the resource was last updated. [RFC
                      3339-5](https://datatracker.ietf.org/doc/html/rfc3339#section-5.6),
                      [ISO8601
                      UTC](https://www.iso.org/iso-8601-date-and-time-format.html)
                  users:
                    type: array
                    items:
                      type: object
                      properties:
                        id:
                          title: User unique identifier.
                          type: string
                          description: User unique identifier.
                          format: uuid
                        type:
                          type: string
                          description: |-
                            Relation type
                            * OWNER - 
                          enum:
                            - OWNER
                          default: OWNER
                  status:
                    type: string
                    description: >-
                      Status of the account group

                      * PENDING_APPROVAL - Account group approval is pending -
                      the account group is visible through our API but cannot be
                      acted on.

                      * ACTIVE - Account group is active - full functionality of
                      the Investment API is accessible.

                      * CLOSING - Account group is closing.

                      * CLOSED - Account group is closed.

                      * LOCKED - Account group is locked for all actions.
                    enum:
                      - PENDING_APPROVAL
                      - ACTIVE
                      - CLOSING
                      - CLOSED
                      - LOCKED
                  type:
                    type: string
                    description: >-
                      Account group type.

                      * PERSONAL - Account group of a person holding assets on
                      their own behalf.

                      * LEGAL_ENTITY - Account group of a legal entity holding
                      assets on behalf of their users.

                      * FRENCH_PEA - Account group of a french resident holding
                      assets in Plan d'Epargne en Actions.

                      * ISA - Account group of a UK resident holding assets in
                      an individual savings account.

                      * CHILD - Account group of a child user holding assets in
                      a child account.
                    enum:
                      - PERSONAL
                      - LEGAL_ENTITY
                      - FRENCH_PEA
                      - ISA
                      - CHILD
                  securities_account_number:
                    type: string
                    description: Securities account number
                    pattern: ^[0-9]{9}$
                required:
                  - id
                  - created_at
                  - updated_at
                  - users
                  - status
                  - type
                  - securities_account_number
                additionalProperties: false
              example:
                id: 9d95820d-4333-46b6-98de-04ab7512e76f
                created_at: '2020-08-24T14:15:22Z'
                updated_at: '2020-08-24T14:15:22Z'
                type: PERSONAL
                status: ACTIVE
                users:
                  - id: 413715f2-5401-4b97-8055-034a6b879f8c
                    type: OWNER
                securities_account_number: '123456789'
        '400':
          description: Bad Request. The incoming request had a malformed parameter/object.
          headers:
            upvest-request-id:
              required: true
              schema:
                type: string
                format: uuid
                example: 169ae4c7-ebd7-4041-94da-25369653eba7
          content:
            application/problem+json:
              schema:
                title: Error
                type: object
                description: ''
                properties:
                  type:
                    type: string
                    description: URL to a document describing the error condition.
                  status:
                    type: integer
                    description: >-
                      Transmission of the HTTP status code so that all
                      information can be found in one place, but also to correct
                      changes in the status code due to the use of proxy
                      servers.
                  title:
                    type: string
                    description: >-
                      A short, human-readable title for the general error type;
                      the title should not change for given types.
                  detail:
                    type: string
                    description: A human-readable description of the specific error.
                  instance:
                    type: string
                    description: >-
                      This optional key may be present, with a unique URI for
                      the specific error; this will often point to an error log
                      for that specific response.
                  request_id:
                    type: string
                    description: Correlation ID for the original request.
                required:
                  - type
                  - status
                additionalProperties: false
              example:
                status: 400
                type: bad_request
        '401':
          description: Unauthorized. The caller has not been authenticated.
          headers:
            upvest-request-id:
              required: true
              schema:
                type: string
                format: uuid
                example: 169ae4c7-ebd7-4041-94da-25369653eba7
          content:
            application/problem+json:
              schema:
                title: Error
                type: object
                description: ''
                properties:
                  type:
                    type: string
                    description: URL to a document describing the error condition.
                  status:
                    type: integer
                    description: >-
                      Transmission of the HTTP status code so that all
                      information can be found in one place, but also to correct
                      changes in the status code due to the use of proxy
                      servers.
                  title:
                    type: string
                    description: >-
                      A short, human-readable title for the general error type;
                      the title should not change for given types.
                  detail:
                    type: string
                    description: A human-readable description of the specific error.
                  instance:
                    type: string
                    description: >-
                      This optional key may be present, with a unique URI for
                      the specific error; this will often point to an error log
                      for that specific response.
                  request_id:
                    type: string
                    description: Correlation ID for the original request.
                required:
                  - type
                  - status
                additionalProperties: false
              example:
                status: 401
                type: unauthorized
        '403':
          description: >-
            Forbidden. The caller has been authenticated but is not allowed to
            take the requested action.
          headers:
            upvest-request-id:
              required: true
              schema:
                type: string
                format: uuid
                example: 169ae4c7-ebd7-4041-94da-25369653eba7
          content:
            application/problem+json:
              schema:
                title: Error
                type: object
                description: ''
                properties:
                  type:
                    type: string
                    description: URL to a document describing the error condition.
                  status:
                    type: integer
                    description: >-
                      Transmission of the HTTP status code so that all
                      information can be found in one place, but also to correct
                      changes in the status code due to the use of proxy
                      servers.
                  title:
                    type: string
                    description: >-
                      A short, human-readable title for the general error type;
                      the title should not change for given types.
                  detail:
                    type: string
                    description: A human-readable description of the specific error.
                  instance:
                    type: string
                    description: >-
                      This optional key may be present, with a unique URI for
                      the specific error; this will often point to an error log
                      for that specific response.
                  request_id:
                    type: string
                    description: Correlation ID for the original request.
                required:
                  - type
                  - status
                additionalProperties: false
              example:
                status: 403
                type: forbidden
        '404':
          description: Not Found. The requested resource could not be found.
          headers:
            upvest-request-id:
              required: true
              schema:
                type: string
                format: uuid
                example: 169ae4c7-ebd7-4041-94da-25369653eba7
          content:
            application/problem+json:
              schema:
                title: Error
                type: object
                description: ''
                properties:
                  type:
                    type: string
                    description: URL to a document describing the error condition.
                  status:
                    type: integer
                    description: >-
                      Transmission of the HTTP status code so that all
                      information can be found in one place, but also to correct
                      changes in the status code due to the use of proxy
                      servers.
                  title:
                    type: string
                    description: >-
                      A short, human-readable title for the general error type;
                      the title should not change for given types.
                  detail:
                    type: string
                    description: A human-readable description of the specific error.
                  instance:
                    type: string
                    description: >-
                      This optional key may be present, with a unique URI for
                      the specific error; this will often point to an error log
                      for that specific response.
                  request_id:
                    type: string
                    description: Correlation ID for the original request.
                required:
                  - type
                  - status
                additionalProperties: false
              example:
                status: 404
                type: not_found
        '406':
          description: >-
            Not Acceptable. The resource does not have a current representation
            that would be acceptable to the user agent. "Accept" header defined
            unsupported value.
          headers:
            upvest-request-id:
              required: true
              schema:
                type: string
                format: uuid
                example: 169ae4c7-ebd7-4041-94da-25369653eba7
          content:
            application/problem+json:
              schema:
                title: Error
                type: object
                description: ''
                properties:
                  type:
                    type: string
                    description: URL to a document describing the error condition.
                  status:
                    type: integer
                    description: >-
                      Transmission of the HTTP status code so that all
                      information can be found in one place, but also to correct
                      changes in the status code due to the use of proxy
                      servers.
                  title:
                    type: string
                    description: >-
                      A short, human-readable title for the general error type;
                      the title should not change for given types.
                  detail:
                    type: string
                    description: A human-readable description of the specific error.
                  instance:
                    type: string
                    description: >-
                      This optional key may be present, with a unique URI for
                      the specific error; this will often point to an error log
                      for that specific response.
                  request_id:
                    type: string
                    description: Correlation ID for the original request.
                required:
                  - type
                  - status
                additionalProperties: false
              example:
                status: 406
                type: not_acceptable
        '429':
          description: >-
            Too Many Requests. The caller has exceeded their quota for the time
            period and has been throttled.
          headers:
            upvest-request-id:
              required: true
              schema:
                type: string
                format: uuid
                example: 169ae4c7-ebd7-4041-94da-25369653eba7
          content:
            application/problem+json:
              schema:
                title: Error
                type: object
                description: ''
                properties:
                  type:
                    type: string
                    description: URL to a document describing the error condition.
                  status:
                    type: integer
                    description: >-
                      Transmission of the HTTP status code so that all
                      information can be found in one place, but also to correct
                      changes in the status code due to the use of proxy
                      servers.
                  title:
                    type: string
                    description: >-
                      A short, human-readable title for the general error type;
                      the title should not change for given types.
                  detail:
                    type: string
                    description: A human-readable description of the specific error.
                  instance:
                    type: string
                    description: >-
                      This optional key may be present, with a unique URI for
                      the specific error; this will often point to an error log
                      for that specific response.
                  request_id:
                    type: string
                    description: Correlation ID for the original request.
                required:
                  - type
                  - status
                additionalProperties: false
              example:
                status: 429
                type: too_many_requests
        '500':
          description: Internal Server Error. The service encountered an unexpected error.
          headers:
            upvest-request-id:
              required: true
              schema:
                type: string
                format: uuid
                example: 169ae4c7-ebd7-4041-94da-25369653eba7
          content:
            application/problem+json:
              schema:
                title: Error
                type: object
                description: ''
                properties:
                  type:
                    type: string
                    description: URL to a document describing the error condition.
                  status:
                    type: integer
                    description: >-
                      Transmission of the HTTP status code so that all
                      information can be found in one place, but also to correct
                      changes in the status code due to the use of proxy
                      servers.
                  title:
                    type: string
                    description: >-
                      A short, human-readable title for the general error type;
                      the title should not change for given types.
                  detail:
                    type: string
                    description: A human-readable description of the specific error.
                  instance:
                    type: string
                    description: >-
                      This optional key may be present, with a unique URI for
                      the specific error; this will often point to an error log
                      for that specific response.
                  request_id:
                    type: string
                    description: Correlation ID for the original request.
                required:
                  - type
                  - status
                additionalProperties: false
              example:
                status: 500
                type: internal_server_error
        '503':
          description: >-
            Service Unavailable. The service handling for this request cannot be
            reached at this time.
          headers:
            upvest-request-id:
              required: true
              schema:
                type: string
                format: uuid
                example: 169ae4c7-ebd7-4041-94da-25369653eba7
          content:
            application/problem+json:
              schema:
                title: Error
                type: object
                description: ''
                properties:
                  type:
                    type: string
                    description: URL to a document describing the error condition.
                  status:
                    type: integer
                    description: >-
                      Transmission of the HTTP status code so that all
                      information can be found in one place, but also to correct
                      changes in the status code due to the use of proxy
                      servers.
                  title:
                    type: string
                    description: >-
                      A short, human-readable title for the general error type;
                      the title should not change for given types.
                  detail:
                    type: string
                    description: A human-readable description of the specific error.
                  instance:
                    type: string
                    description: >-
                      This optional key may be present, with a unique URI for
                      the specific error; this will often point to an error log
                      for that specific response.
                  request_id:
                    type: string
                    description: Correlation ID for the original request.
                required:
                  - type
                  - status
                additionalProperties: false
              example:
                status: 503
                type: method_not_allowed
        '504':
          description: >-
            Gateway Timeout. The service gateway has reached its internal
            timeout.
          headers:
            upvest-request-id:
              required: true
              schema:
                type: string
                format: uuid
                example: 169ae4c7-ebd7-4041-94da-25369653eba7
          content:
            application/problem+json:
              schema:
                title: Error
                type: object
                description: ''
                properties:
                  type:
                    type: string
                    description: URL to a document describing the error condition.
                  status:
                    type: integer
                    description: >-
                      Transmission of the HTTP status code so that all
                      information can be found in one place, but also to correct
                      changes in the status code due to the use of proxy
                      servers.
                  title:
                    type: string
                    description: >-
                      A short, human-readable title for the general error type;
                      the title should not change for given types.
                  detail:
                    type: string
                    description: A human-readable description of the specific error.
                  instance:
                    type: string
                    description: >-
                      This optional key may be present, with a unique URI for
                      the specific error; this will often point to an error log
                      for that specific response.
                  request_id:
                    type: string
                    description: Correlation ID for the original request.
                required:
                  - type
                  - status
                additionalProperties: false
              example:
                status: 504
                type: gateway_timeout
  /accounts:
    parameters:
      - name: upvest-client-id
        in: header
        description: Tenant Client ID
        required: true
        schema:
          type: string
          format: uuid
          example: ebabcf4d-61c3-4942-875c-e265a7c2d062
      - name: authorization
        in: header
        description: |
          Bearer (access) token from the OAuth flow with correct scopes.
          https://datatracker.ietf.org/doc/html/rfc6750
        required: true
        schema:
          type: string
          pattern: ^Bearer [a-zA-Z0-9\-\._~+/]*=*
          example: Bearer c2VjcmV0Cg==
      - name: signature
        in: header
        required: true
        schema:
          type: string
        description: >-
          https://tools.ietf.org/id/draft-ietf-httpbis-message-signatures-01.html#name-the-signature-http-header
      - name: signature-input
        in: header
        required: true
        schema:
          type: string
        description: >-
          https://tools.ietf.org/id/draft-ietf-httpbis-message-signatures-01.html#name-the-signature-input-http-he
      - name: upvest-api-version
        in: header
        required: false
        schema:
          type: string
          enum:
            - '1'
          default: '1'
          example: '1'
        description: 'Upvest API version (Note: Do not include quotation marks)'
    get:
      operationId: list_accounts
      summary: Get accounts
      description: Returns a list of all accounts.
      tags:
        - Accounts
      security:
        - oauth-client-credentials:
            - accounts:read
            - accounts:admin
      parameters:
        - name: sort
          in: query
          required: false
          schema:
            type: string
            enum:
              - created_at
              - updated_at
            default: created_at
          description: Sort the result by `created_at`, `updated_at§`.
        - name: order
          in: query
          required: false
          schema:
            type: string
            enum:
              - ASC
              - DESC
            default: ASC
          description: >-
            Sort order of the result list if the `sort` parameter is specified.
            Use `ASC` for ascending or `DESC` for descending sort order.
        - name: offset
          in: query
          schema:
            type: integer
            minimum: 0
            format: int32
          allowEmptyValue: true
          description: >-
            Use the `offset` argument to specify where in the list of results to
            start when returning items for a particular query.
        - name: limit
          in: query
          schema:
            type: integer
            format: int32
            default: 100
            minimum: 0
            maximum: 1000
          allowEmptyValue: true
          description: >-
            Use the `limit` argument to specify the maximum number of items
            returned.
      responses:
        '200':
          description: OK
          headers:
            upvest-request-id:
              required: true
              schema:
                type: string
                format: uuid
                example: 169ae4c7-ebd7-4041-94da-25369653eba7
          content:
            application/json:
              schema:
                title: Accounts - List - Response
                type: object
                properties:
                  meta:
                    type: object
                    properties:
                      offset:
                        type: integer
                        description: Amount of resource to offset in the response.
                      limit:
                        type: integer
                        description: Total limit of the response.
                      count:
                        type: integer
                        description: Count of the resources returned in the response.
                      total_count:
                        type: integer
                        description: Total count of all the resources.
                      sort:
                        type: string
                        description: The field that the list is sorted by.
                      order:
                        type: string
                        description: |-
                          The ordering of the response.
                          * ASC - Ascending order
                          * DESC - Descending order
                        enum:
                          - ASC
                          - DESC
                    required:
                      - offset
                      - limit
                      - count
                      - total_count
                  data:
                    type: array
                    items:
                      title: Account
                      type: object
                      description: ''
                      properties:
                        id:
                          title: Account unique identifier.
                          type: string
                          description: Account unique identifier.
                          format: uuid
                        created_at:
                          type: string
                          format: date-time
                          description: >-
                            Date and time when the resource was created. [RFC
                            3339-5](https://datatracker.ietf.org/doc/html/rfc3339#section-5.6),
                            [ISO8601
                            UTC](https://www.iso.org/iso-8601-date-and-time-format.html)
                        updated_at:
                          type: string
                          format: date-time
                          description: >-
                            Date and time when the resource was last updated.
                            [RFC
                            3339-5](https://datatracker.ietf.org/doc/html/rfc3339#section-5.6),
                            [ISO8601
                            UTC](https://www.iso.org/iso-8601-date-and-time-format.html)
                        account_group_id:
                          title: Account group unique identifier.
                          type: string
                          description: Account group unique identifier.
                          format: uuid
                        type:
                          type: string
                          description: >-
                            Account type.

                            * TRADING - Orders in accounts of this type are
                            created on a specific instrument basis.

                            * PORTFOLIO - Orders in accounts of this type are
                            created on a portfolio basis and additional
                            portfolio functionality is available.
                          enum:
                            - TRADING
                            - PORTFOLIO
                        users:
                          type: array
                          items:
                            type: object
                            properties:
                              id:
                                title: User unique identifier.
                                type: string
                                description: User unique identifier.
                                format: uuid
                              type:
                                type: string
                                description: |-
                                  Relation type
                                  * OWNER - 
                                enum:
                                  - OWNER
                                default: OWNER
                        account_number:
                          type: integer
                          description: >-
                            The serial account number of the account in the
                            account group.
                          minimum: 1
                        name:
                          type: string
                          description: The name of the account.
                          maxLength: 100
                        status:
                          type: string
                          description: >-
                            The status of the account

                            * PENDING_APPROVAL - Account approval is pending -
                            the account is visible through our API but cannot be
                            acted on.

                            * ACTIVE - Account is active - full functionality of
                            the Investment API is accessible.

                            * CLOSING - Account is closing - only sell orders or
                            the transfer of positions out are permissible before
                            the account is closed.

                            * CLOSED - Account is closed with zero balance
                            successfully.

                            * LOCKED - Account is locked for all actions.
                          enum:
                            - PENDING_APPROVAL
                            - ACTIVE
                            - CLOSING
                            - CLOSED
                            - LOCKED
                      required:
                        - id
                        - created_at
                        - updated_at
                        - account_group_id
                        - type
                        - users
                        - name
                        - status
                        - account_number
                      additionalProperties: false
                required:
                  - meta
                  - data
                additionalProperties: false
              example:
                meta:
                  offset: 0
                  limit: 100
                  count: 1
                  total_count: 1
                  sort: created_at
                  order: ASC
                data:
                  - id: ad45b27f-c0e7-4cfb-b48c-a83670dbdfbd
                    created_at: '2020-08-24T14:15:22Z'
                    updated_at: '2020-08-24T14:15:22Z'
                    account_group_id: fa2414ed-8d62-46fd-85ed-565a340c81d6
                    type: TRADING
                    users:
                      - id: 9c36af78-91a0-4174-a515-fc81214e3dab
                        type: OWNER
                    account_number: 1
                    name: Main account
                    status: ACTIVE
        '400':
          description: Bad Request. The incoming request had a malformed parameter/object.
          headers:
            upvest-request-id:
              required: true
              schema:
                type: string
                format: uuid
                example: 169ae4c7-ebd7-4041-94da-25369653eba7
          content:
            application/problem+json:
              schema:
                title: Error
                type: object
                description: ''
                properties:
                  type:
                    type: string
                    description: URL to a document describing the error condition.
                  status:
                    type: integer
                    description: >-
                      Transmission of the HTTP status code so that all
                      information can be found in one place, but also to correct
                      changes in the status code due to the use of proxy
                      servers.
                  title:
                    type: string
                    description: >-
                      A short, human-readable title for the general error type;
                      the title should not change for given types.
                  detail:
                    type: string
                    description: A human-readable description of the specific error.
                  instance:
                    type: string
                    description: >-
                      This optional key may be present, with a unique URI for
                      the specific error; this will often point to an error log
                      for that specific response.
                  request_id:
                    type: string
                    description: Correlation ID for the original request.
                required:
                  - type
                  - status
                additionalProperties: false
              example:
                status: 400
                type: bad_request
        '401':
          description: Unauthorized. The caller has not been authenticated.
          headers:
            upvest-request-id:
              required: true
              schema:
                type: string
                format: uuid
                example: 169ae4c7-ebd7-4041-94da-25369653eba7
          content:
            application/problem+json:
              schema:
                title: Error
                type: object
                description: ''
                properties:
                  type:
                    type: string
                    description: URL to a document describing the error condition.
                  status:
                    type: integer
                    description: >-
                      Transmission of the HTTP status code so that all
                      information can be found in one place, but also to correct
                      changes in the status code due to the use of proxy
                      servers.
                  title:
                    type: string
                    description: >-
                      A short, human-readable title for the general error type;
                      the title should not change for given types.
                  detail:
                    type: string
                    description: A human-readable description of the specific error.
                  instance:
                    type: string
                    description: >-
                      This optional key may be present, with a unique URI for
                      the specific error; this will often point to an error log
                      for that specific response.
                  request_id:
                    type: string
                    description: Correlation ID for the original request.
                required:
                  - type
                  - status
                additionalProperties: false
              example:
                status: 401
                type: unauthorized
        '403':
          description: >-
            Forbidden. The caller has been authenticated but is not allowed to
            take the requested action.
          headers:
            upvest-request-id:
              required: true
              schema:
                type: string
                format: uuid
                example: 169ae4c7-ebd7-4041-94da-25369653eba7
          content:
            application/problem+json:
              schema:
                title: Error
                type: object
                description: ''
                properties:
                  type:
                    type: string
                    description: URL to a document describing the error condition.
                  status:
                    type: integer
                    description: >-
                      Transmission of the HTTP status code so that all
                      information can be found in one place, but also to correct
                      changes in the status code due to the use of proxy
                      servers.
                  title:
                    type: string
                    description: >-
                      A short, human-readable title for the general error type;
                      the title should not change for given types.
                  detail:
                    type: string
                    description: A human-readable description of the specific error.
                  instance:
                    type: string
                    description: >-
                      This optional key may be present, with a unique URI for
                      the specific error; this will often point to an error log
                      for that specific response.
                  request_id:
                    type: string
                    description: Correlation ID for the original request.
                required:
                  - type
                  - status
                additionalProperties: false
              example:
                status: 403
                type: forbidden
        '406':
          description: >-
            Not Acceptable. The resource does not have a current representation
            that would be acceptable to the user agent. "Accept" header defined
            unsupported value.
          headers:
            upvest-request-id:
              required: true
              schema:
                type: string
                format: uuid
                example: 169ae4c7-ebd7-4041-94da-25369653eba7
          content:
            application/problem+json:
              schema:
                title: Error
                type: object
                description: ''
                properties:
                  type:
                    type: string
                    description: URL to a document describing the error condition.
                  status:
                    type: integer
                    description: >-
                      Transmission of the HTTP status code so that all
                      information can be found in one place, but also to correct
                      changes in the status code due to the use of proxy
                      servers.
                  title:
                    type: string
                    description: >-
                      A short, human-readable title for the general error type;
                      the title should not change for given types.
                  detail:
                    type: string
                    description: A human-readable description of the specific error.
                  instance:
                    type: string
                    description: >-
                      This optional key may be present, with a unique URI for
                      the specific error; this will often point to an error log
                      for that specific response.
                  request_id:
                    type: string
                    description: Correlation ID for the original request.
                required:
                  - type
                  - status
                additionalProperties: false
              example:
                status: 406
                type: not_acceptable
        '429':
          description: >-
            Too Many Requests. The caller has exceeded their quota for the time
            period and has been throttled.
          headers:
            upvest-request-id:
              required: true
              schema:
                type: string
                format: uuid
                example: 169ae4c7-ebd7-4041-94da-25369653eba7
          content:
            application/problem+json:
              schema:
                title: Error
                type: object
                description: ''
                properties:
                  type:
                    type: string
                    description: URL to a document describing the error condition.
                  status:
                    type: integer
                    description: >-
                      Transmission of the HTTP status code so that all
                      information can be found in one place, but also to correct
                      changes in the status code due to the use of proxy
                      servers.
                  title:
                    type: string
                    description: >-
                      A short, human-readable title for the general error type;
                      the title should not change for given types.
                  detail:
                    type: string
                    description: A human-readable description of the specific error.
                  instance:
                    type: string
                    description: >-
                      This optional key may be present, with a unique URI for
                      the specific error; this will often point to an error log
                      for that specific response.
                  request_id:
                    type: string
                    description: Correlation ID for the original request.
                required:
                  - type
                  - status
                additionalProperties: false
              example:
                status: 429
                type: too_many_requests
        '500':
          description: Internal Server Error. The service encountered an unexpected error.
          headers:
            upvest-request-id:
              required: true
              schema:
                type: string
                format: uuid
                example: 169ae4c7-ebd7-4041-94da-25369653eba7
          content:
            application/problem+json:
              schema:
                title: Error
                type: object
                description: ''
                properties:
                  type:
                    type: string
                    description: URL to a document describing the error condition.
                  status:
                    type: integer
                    description: >-
                      Transmission of the HTTP status code so that all
                      information can be found in one place, but also to correct
                      changes in the status code due to the use of proxy
                      servers.
                  title:
                    type: string
                    description: >-
                      A short, human-readable title for the general error type;
                      the title should not change for given types.
                  detail:
                    type: string
                    description: A human-readable description of the specific error.
                  instance:
                    type: string
                    description: >-
                      This optional key may be present, with a unique URI for
                      the specific error; this will often point to an error log
                      for that specific response.
                  request_id:
                    type: string
                    description: Correlation ID for the original request.
                required:
                  - type
                  - status
                additionalProperties: false
              example:
                status: 500
                type: internal_server_error
        '503':
          description: >-
            Service Unavailable. The service handling for this request cannot be
            reached at this time.
          headers:
            upvest-request-id:
              required: true
              schema:
                type: string
                format: uuid
                example: 169ae4c7-ebd7-4041-94da-25369653eba7
          content:
            application/problem+json:
              schema:
                title: Error
                type: object
                description: ''
                properties:
                  type:
                    type: string
                    description: URL to a document describing the error condition.
                  status:
                    type: integer
                    description: >-
                      Transmission of the HTTP status code so that all
                      information can be found in one place, but also to correct
                      changes in the status code due to the use of proxy
                      servers.
                  title:
                    type: string
                    description: >-
                      A short, human-readable title for the general error type;
                      the title should not change for given types.
                  detail:
                    type: string
                    description: A human-readable description of the specific error.
                  instance:
                    type: string
                    description: >-
                      This optional key may be present, with a unique URI for
                      the specific error; this will often point to an error log
                      for that specific response.
                  request_id:
                    type: string
                    description: Correlation ID for the original request.
                required:
                  - type
                  - status
                additionalProperties: false
              example:
                status: 503
                type: method_not_allowed
        '504':
          description: >-
            Gateway Timeout. The service gateway has reached its internal
            timeout.
          headers:
            upvest-request-id:
              required: true
              schema:
                type: string
                format: uuid
                example: 169ae4c7-ebd7-4041-94da-25369653eba7
          content:
            application/problem+json:
              schema:
                title: Error
                type: object
                description: ''
                properties:
                  type:
                    type: string
                    description: URL to a document describing the error condition.
                  status:
                    type: integer
                    description: >-
                      Transmission of the HTTP status code so that all
                      information can be found in one place, but also to correct
                      changes in the status code due to the use of proxy
                      servers.
                  title:
                    type: string
                    description: >-
                      A short, human-readable title for the general error type;
                      the title should not change for given types.
                  detail:
                    type: string
                    description: A human-readable description of the specific error.
                  instance:
                    type: string
                    description: >-
                      This optional key may be present, with a unique URI for
                      the specific error; this will often point to an error log
                      for that specific response.
                  request_id:
                    type: string
                    description: Correlation ID for the original request.
                required:
                  - type
                  - status
                additionalProperties: false
              example:
                status: 504
                type: gateway_timeout
    post:
      operationId: create_account
      summary: Create an account
      description: Creates an account.
      tags:
        - Accounts
      security:
        - oauth-client-credentials:
            - accounts:admin
      parameters:
        - name: idempotency-key
          in: header
          required: true
          schema:
            type: string
            format: uuid
            pattern: >-
              ^[0-9a-fA-F]{8}-?[0-9a-fA-F]{4}-?[0-5][0-9a-fA-F]{3}-?[089abAB][0-9a-fA-F]{3}-?[0-9a-fA-F]{12}$
            example: ccb07f42-4104-44ad-8e1f-c660bb7b269c
          description: >
            A UUID to be used as an idempotency key.  This prevents a duplicate
            request from being replayed.

            https://docs.upvest.co/documentation/concepts/api_concepts/idempotency
      requestBody:
        content:
          application/json:
            schema:
              title: Account - Create - Request
              type: object
              properties:
                user_id:
                  title: User unique identifier.
                  type: string
                  description: User unique identifier.
                  format: uuid
                account_group_id:
                  title: Account group unique identifier.
                  type: string
                  description: Account group unique identifier.
                  format: uuid
                type:
                  type: string
                  description: >-
                    Account type.

                    * TRADING - Orders in accounts of this type are created on a
                    specific instrument basis.

                    * PORTFOLIO - Orders in accounts of this type are created on
                    a portfolio basis and additional portfolio functionality is
                    available.
                  enum:
                    - TRADING
                    - PORTFOLIO
                name:
                  type: string
                  description: The name of the account.
                  maxLength: 100
              required:
                - user_id
                - account_group_id
                - type
              additionalProperties: false
            example:
              user_id: 413715f2-5401-4b97-8055-034a6b879f8c
              account_group_id: fa2414ed-8d62-46fd-85ed-565a340c81d6
              type: TRADING
              name: Main account
      responses:
        '200':
          description: Account created.
          headers:
            upvest-request-id:
              required: true
              schema:
                type: string
                format: uuid
                example: 169ae4c7-ebd7-4041-94da-25369653eba7
          content:
            application/json:
              schema:
                title: Account
                type: object
                description: ''
                properties:
                  id:
                    title: Account unique identifier.
                    type: string
                    description: Account unique identifier.
                    format: uuid
                  created_at:
                    type: string
                    format: date-time
                    description: >-
                      Date and time when the resource was created. [RFC
                      3339-5](https://datatracker.ietf.org/doc/html/rfc3339#section-5.6),
                      [ISO8601
                      UTC](https://www.iso.org/iso-8601-date-and-time-format.html)
                  updated_at:
                    type: string
                    format: date-time
                    description: >-
                      Date and time when the resource was last updated. [RFC
                      3339-5](https://datatracker.ietf.org/doc/html/rfc3339#section-5.6),
                      [ISO8601
                      UTC](https://www.iso.org/iso-8601-date-and-time-format.html)
                  account_group_id:
                    title: Account group unique identifier.
                    type: string
                    description: Account group unique identifier.
                    format: uuid
                  type:
                    type: string
                    description: >-
                      Account type.

                      * TRADING - Orders in accounts of this type are created on
                      a specific instrument basis.

                      * PORTFOLIO - Orders in accounts of this type are created
                      on a portfolio basis and additional portfolio
                      functionality is available.
                    enum:
                      - TRADING
                      - PORTFOLIO
                  users:
                    type: array
                    items:
                      type: object
                      properties:
                        id:
                          title: User unique identifier.
                          type: string
                          description: User unique identifier.
                          format: uuid
                        type:
                          type: string
                          description: |-
                            Relation type
                            * OWNER - 
                          enum:
                            - OWNER
                          default: OWNER
                  account_number:
                    type: integer
                    description: >-
                      The serial account number of the account in the account
                      group.
                    minimum: 1
                  name:
                    type: string
                    description: The name of the account.
                    maxLength: 100
                  status:
                    type: string
                    description: >-
                      The status of the account

                      * PENDING_APPROVAL - Account approval is pending - the
                      account is visible through our API but cannot be acted on.

                      * ACTIVE - Account is active - full functionality of the
                      Investment API is accessible.

                      * CLOSING - Account is closing - only sell orders or the
                      transfer of positions out are permissible before the
                      account is closed.

                      * CLOSED - Account is closed with zero balance
                      successfully.

                      * LOCKED - Account is locked for all actions.
                    enum:
                      - PENDING_APPROVAL
                      - ACTIVE
                      - CLOSING
                      - CLOSED
                      - LOCKED
                required:
                  - id
                  - created_at
                  - updated_at
                  - account_group_id
                  - type
                  - users
                  - name
                  - status
                  - account_number
                additionalProperties: false
              example:
                id: ad45b27f-c0e7-4cfb-b48c-a83670dbdfbd
                created_at: '2020-08-24T14:15:22Z'
                updated_at: '2020-08-24T14:15:22Z'
                account_group_id: fa2414ed-8d62-46fd-85ed-565a340c81d6
                type: TRADING
                users:
                  - id: 9c36af78-91a0-4174-a515-fc81214e3dab
                    type: OWNER
                account_number: 1
                name: Main account
                status: ACTIVE
        '400':
          description: Bad Request. The incoming request had a malformed parameter/object.
          headers:
            upvest-request-id:
              required: true
              schema:
                type: string
                format: uuid
                example: 169ae4c7-ebd7-4041-94da-25369653eba7
          content:
            application/problem+json:
              schema:
                title: Error
                type: object
                description: ''
                properties:
                  type:
                    type: string
                    description: URL to a document describing the error condition.
                  status:
                    type: integer
                    description: >-
                      Transmission of the HTTP status code so that all
                      information can be found in one place, but also to correct
                      changes in the status code due to the use of proxy
                      servers.
                  title:
                    type: string
                    description: >-
                      A short, human-readable title for the general error type;
                      the title should not change for given types.
                  detail:
                    type: string
                    description: A human-readable description of the specific error.
                  instance:
                    type: string
                    description: >-
                      This optional key may be present, with a unique URI for
                      the specific error; this will often point to an error log
                      for that specific response.
                  request_id:
                    type: string
                    description: Correlation ID for the original request.
                required:
                  - type
                  - status
                additionalProperties: false
              example:
                status: 400
                type: bad_request
        '401':
          description: Unauthorized. The caller has not been authenticated.
          headers:
            upvest-request-id:
              required: true
              schema:
                type: string
                format: uuid
                example: 169ae4c7-ebd7-4041-94da-25369653eba7
          content:
            application/problem+json:
              schema:
                title: Error
                type: object
                description: ''
                properties:
                  type:
                    type: string
                    description: URL to a document describing the error condition.
                  status:
                    type: integer
                    description: >-
                      Transmission of the HTTP status code so that all
                      information can be found in one place, but also to correct
                      changes in the status code due to the use of proxy
                      servers.
                  title:
                    type: string
                    description: >-
                      A short, human-readable title for the general error type;
                      the title should not change for given types.
                  detail:
                    type: string
                    description: A human-readable description of the specific error.
                  instance:
                    type: string
                    description: >-
                      This optional key may be present, with a unique URI for
                      the specific error; this will often point to an error log
                      for that specific response.
                  request_id:
                    type: string
                    description: Correlation ID for the original request.
                required:
                  - type
                  - status
                additionalProperties: false
              example:
                status: 401
                type: unauthorized
        '403':
          description: >-
            Forbidden. The caller has been authenticated but is not allowed to
            take the requested action.
          headers:
            upvest-request-id:
              required: true
              schema:
                type: string
                format: uuid
                example: 169ae4c7-ebd7-4041-94da-25369653eba7
          content:
            application/problem+json:
              schema:
                title: Error
                type: object
                description: ''
                properties:
                  type:
                    type: string
                    description: URL to a document describing the error condition.
                  status:
                    type: integer
                    description: >-
                      Transmission of the HTTP status code so that all
                      information can be found in one place, but also to correct
                      changes in the status code due to the use of proxy
                      servers.
                  title:
                    type: string
                    description: >-
                      A short, human-readable title for the general error type;
                      the title should not change for given types.
                  detail:
                    type: string
                    description: A human-readable description of the specific error.
                  instance:
                    type: string
                    description: >-
                      This optional key may be present, with a unique URI for
                      the specific error; this will often point to an error log
                      for that specific response.
                  request_id:
                    type: string
                    description: Correlation ID for the original request.
                required:
                  - type
                  - status
                additionalProperties: false
              example:
                status: 403
                type: forbidden
        '404':
          description: Not Found. The requested resource could not be found.
          headers:
            upvest-request-id:
              required: true
              schema:
                type: string
                format: uuid
                example: 169ae4c7-ebd7-4041-94da-25369653eba7
          content:
            application/problem+json:
              schema:
                title: Error
                type: object
                description: ''
                properties:
                  type:
                    type: string
                    description: URL to a document describing the error condition.
                  status:
                    type: integer
                    description: >-
                      Transmission of the HTTP status code so that all
                      information can be found in one place, but also to correct
                      changes in the status code due to the use of proxy
                      servers.
                  title:
                    type: string
                    description: >-
                      A short, human-readable title for the general error type;
                      the title should not change for given types.
                  detail:
                    type: string
                    description: A human-readable description of the specific error.
                  instance:
                    type: string
                    description: >-
                      This optional key may be present, with a unique URI for
                      the specific error; this will often point to an error log
                      for that specific response.
                  request_id:
                    type: string
                    description: Correlation ID for the original request.
                required:
                  - type
                  - status
                additionalProperties: false
              example:
                status: 404
                type: not_found
        '406':
          description: >-
            Not Acceptable. The resource does not have a current representation
            that would be acceptable to the user agent. "Accept" header defined
            unsupported value.
          headers:
            upvest-request-id:
              required: true
              schema:
                type: string
                format: uuid
                example: 169ae4c7-ebd7-4041-94da-25369653eba7
          content:
            application/problem+json:
              schema:
                title: Error
                type: object
                description: ''
                properties:
                  type:
                    type: string
                    description: URL to a document describing the error condition.
                  status:
                    type: integer
                    description: >-
                      Transmission of the HTTP status code so that all
                      information can be found in one place, but also to correct
                      changes in the status code due to the use of proxy
                      servers.
                  title:
                    type: string
                    description: >-
                      A short, human-readable title for the general error type;
                      the title should not change for given types.
                  detail:
                    type: string
                    description: A human-readable description of the specific error.
                  instance:
                    type: string
                    description: >-
                      This optional key may be present, with a unique URI for
                      the specific error; this will often point to an error log
                      for that specific response.
                  request_id:
                    type: string
                    description: Correlation ID for the original request.
                required:
                  - type
                  - status
                additionalProperties: false
              example:
                status: 406
                type: not_acceptable
        '429':
          description: >-
            Too Many Requests. The caller has exceeded their quota for the time
            period and has been throttled.
          headers:
            upvest-request-id:
              required: true
              schema:
                type: string
                format: uuid
                example: 169ae4c7-ebd7-4041-94da-25369653eba7
          content:
            application/problem+json:
              schema:
                title: Error
                type: object
                description: ''
                properties:
                  type:
                    type: string
                    description: URL to a document describing the error condition.
                  status:
                    type: integer
                    description: >-
                      Transmission of the HTTP status code so that all
                      information can be found in one place, but also to correct
                      changes in the status code due to the use of proxy
                      servers.
                  title:
                    type: string
                    description: >-
                      A short, human-readable title for the general error type;
                      the title should not change for given types.
                  detail:
                    type: string
                    description: A human-readable description of the specific error.
                  instance:
                    type: string
                    description: >-
                      This optional key may be present, with a unique URI for
                      the specific error; this will often point to an error log
                      for that specific response.
                  request_id:
                    type: string
                    description: Correlation ID for the original request.
                required:
                  - type
                  - status
                additionalProperties: false
              example:
                status: 429
                type: too_many_requests
        '500':
          description: Internal Server Error. The service encountered an unexpected error.
          headers:
            upvest-request-id:
              required: true
              schema:
                type: string
                format: uuid
                example: 169ae4c7-ebd7-4041-94da-25369653eba7
          content:
            application/problem+json:
              schema:
                title: Error
                type: object
                description: ''
                properties:
                  type:
                    type: string
                    description: URL to a document describing the error condition.
                  status:
                    type: integer
                    description: >-
                      Transmission of the HTTP status code so that all
                      information can be found in one place, but also to correct
                      changes in the status code due to the use of proxy
                      servers.
                  title:
                    type: string
                    description: >-
                      A short, human-readable title for the general error type;
                      the title should not change for given types.
                  detail:
                    type: string
                    description: A human-readable description of the specific error.
                  instance:
                    type: string
                    description: >-
                      This optional key may be present, with a unique URI for
                      the specific error; this will often point to an error log
                      for that specific response.
                  request_id:
                    type: string
                    description: Correlation ID for the original request.
                required:
                  - type
                  - status
                additionalProperties: false
              example:
                status: 500
                type: internal_server_error
        '503':
          description: >-
            Service Unavailable. The service handling for this request cannot be
            reached at this time.
          headers:
            upvest-request-id:
              required: true
              schema:
                type: string
                format: uuid
                example: 169ae4c7-ebd7-4041-94da-25369653eba7
          content:
            application/problem+json:
              schema:
                title: Error
                type: object
                description: ''
                properties:
                  type:
                    type: string
                    description: URL to a document describing the error condition.
                  status:
                    type: integer
                    description: >-
                      Transmission of the HTTP status code so that all
                      information can be found in one place, but also to correct
                      changes in the status code due to the use of proxy
                      servers.
                  title:
                    type: string
                    description: >-
                      A short, human-readable title for the general error type;
                      the title should not change for given types.
                  detail:
                    type: string
                    description: A human-readable description of the specific error.
                  instance:
                    type: string
                    description: >-
                      This optional key may be present, with a unique URI for
                      the specific error; this will often point to an error log
                      for that specific response.
                  request_id:
                    type: string
                    description: Correlation ID for the original request.
                required:
                  - type
                  - status
                additionalProperties: false
              example:
                status: 503
                type: method_not_allowed
        '504':
          description: >-
            Gateway Timeout. The service gateway has reached its internal
            timeout.
          headers:
            upvest-request-id:
              required: true
              schema:
                type: string
                format: uuid
                example: 169ae4c7-ebd7-4041-94da-25369653eba7
          content:
            application/problem+json:
              schema:
                title: Error
                type: object
                description: ''
                properties:
                  type:
                    type: string
                    description: URL to a document describing the error condition.
                  status:
                    type: integer
                    description: >-
                      Transmission of the HTTP status code so that all
                      information can be found in one place, but also to correct
                      changes in the status code due to the use of proxy
                      servers.
                  title:
                    type: string
                    description: >-
                      A short, human-readable title for the general error type;
                      the title should not change for given types.
                  detail:
                    type: string
                    description: A human-readable description of the specific error.
                  instance:
                    type: string
                    description: >-
                      This optional key may be present, with a unique URI for
                      the specific error; this will often point to an error log
                      for that specific response.
                  request_id:
                    type: string
                    description: Correlation ID for the original request.
                required:
                  - type
                  - status
                additionalProperties: false
              example:
                status: 504
                type: gateway_timeout
  /accounts/{account_id}/orders:
    parameters:
      - name: account_id
        in: path
        required: true
        schema:
          title: Account unique identifier.
          type: string
          description: Account unique identifier.
          format: uuid
      - name: upvest-client-id
        in: header
        description: Tenant Client ID
        required: true
        schema:
          type: string
          format: uuid
          example: ebabcf4d-61c3-4942-875c-e265a7c2d062
      - name: authorization
        in: header
        description: |
          Bearer (access) token from the OAuth flow with correct scopes.
          https://datatracker.ietf.org/doc/html/rfc6750
        required: true
        schema:
          type: string
          pattern: ^Bearer [a-zA-Z0-9\-\._~+/]*=*
          example: Bearer c2VjcmV0Cg==
      - name: signature
        in: header
        required: true
        schema:
          type: string
        description: >-
          https://tools.ietf.org/id/draft-ietf-httpbis-message-signatures-01.html#name-the-signature-http-header
      - name: signature-input
        in: header
        required: true
        schema:
          type: string
        description: >-
          https://tools.ietf.org/id/draft-ietf-httpbis-message-signatures-01.html#name-the-signature-input-http-he
      - name: upvest-api-version
        in: header
        required: false
        schema:
          type: string
          enum:
            - '1'
          default: '1'
          example: '1'
        description: 'Upvest API version (Note: Do not include quotation marks)'
    get:
      operationId: list_account_orders
      summary: Get orders for an account by ID
      description: Returns a list of all orders for the account specified by its ID.
      tags:
        - Orders
      security:
        - oauth-client-credentials:
            - orders:read
            - orders:admin
      parameters:
        - name: order
          in: query
          required: false
          schema:
            type: string
            enum:
              - ASC
              - DESC
            default: ASC
          description: >-
            Sort order of the result list if the `sort` parameter is specified.
            Use `ASC` for ascending or `DESC` for descending sort order.
        - name: account_group_id
          in: query
          required: false
          schema:
            title: Account group unique identifier.
            type: string
            description: Account group unique identifier.
            format: uuid
        - name: user_id
          in: query
          required: false
          schema:
            title: User unique identifier.
            type: string
            description: User unique identifier.
            format: uuid
        - name: status
          in: query
          required: false
          schema:
            type: string
            enum:
              - NEW
              - PROCESSING
              - FILLED
              - CANCELLED
            default: FILLED
          description: |-
            The execution status of the order.
            * NEW - 
            * PROCESSING - 
            * FILLED - 
            * CANCELLED - 
        - name: date_created_from
          in: query
          required: false
          schema:
            type: string
            format: date-time
            title: Date in YYYY-MM-DD format. RFC 3339, section 5.6
          description: date range from
          example: '2022-10-14T10:10:10Z'
        - name: date_created_to
          in: query
          required: false
          schema:
            type: string
            format: date-time
            title: Date in YYYY-MM-DD format. RFC 3339, section 5.6
          description: date range to
          example: '2022-10-14T10:10:10Z'
        - name: offset
          in: query
          schema:
            type: integer
            minimum: 0
            format: int32
          allowEmptyValue: true
          description: >-
            Use the `offset` argument to specify where in the list of results to
            start when returning items for a particular query.
        - name: limit
          in: query
          schema:
            type: integer
            format: int32
            default: 100
            minimum: 0
            maximum: 1000
          allowEmptyValue: true
          description: >-
            Use the `limit` argument to specify the maximum number of items
            returned.
      responses:
        '200':
          description: OK
          headers:
            upvest-request-id:
              required: true
              schema:
                type: string
                format: uuid
                example: 169ae4c7-ebd7-4041-94da-25369653eba7
          content:
            application/json:
              schema:
                title: Orders - List - Response
                type: object
                properties:
                  meta:
                    type: object
                    properties:
                      offset:
                        type: integer
                        description: Amount of resource to offset in the response.
                      limit:
                        type: integer
                        description: Total limit of the response.
                      count:
                        type: integer
                        description: Count of the resources returned in the response.
                      total_count:
                        type: integer
                        description: Total count of all the resources.
                      sort:
                        type: string
                        description: The field that the list is sorted by.
                      order:
                        type: string
                        description: |-
                          The ordering of the response.
                          * ASC - Ascending order
                          * DESC - Descending order
                        enum:
                          - ASC
                          - DESC
                    required:
                      - offset
                      - limit
                      - count
                      - total_count
                  data:
                    type: array
                    items:
                      title: Order
                      type: object
                      properties:
                        id:
                          title: Order unique identifier
                          type: string
                          format: uuid
                        created_at:
                          type: string
                          format: date-time
                          description: >-
                            Date and time when the resource was created. [RFC
                            3339-5](https://datatracker.ietf.org/doc/html/rfc3339#section-5.6),
                            [ISO8601
                            UTC](https://www.iso.org/iso-8601-date-and-time-format.html)
                        updated_at:
                          type: string
                          format: date-time
                          description: >-
                            Date and time when the resource was last updated.
                            [RFC
                            3339-5](https://datatracker.ietf.org/doc/html/rfc3339#section-5.6),
                            [ISO8601
                            UTC](https://www.iso.org/iso-8601-date-and-time-format.html)
                        user_id:
                          type: string
                          format: uuid
                          description: The ID of the user
                        account_id:
                          type: string
                          format: uuid
                          description: The ID of the account that owns the order
                        cash_amount:
                          allOf:
                            - type: string
                              pattern: ^[0-9]{1,9}(\.[0-9]{2})?$
                            - description: >-
                                Cash amount for a nominal order, not required if
                                a share quantity is specified.
                        currency:
                          allOf:
                            - type: string
                              description: >-
                                Alphabetic three-letter [ISO
                                4217](https://en.wikipedia.org/wiki/ISO_4217)
                                currency code.

                                * EUR - Euro

                                * GBP - British Pound
                              enum:
                                - EUR
                                - GBP
                            - description: The currency for the order.
                        side:
                          type: string
                          description: |-
                            Side of the order.
                            * BUY - 
                            * SELL - 
                          enum:
                            - BUY
                            - SELL
                        instrument_id:
                          title: International securities identification number
                          type: string
                          description: >-
                            International securities identification number
                            defined by [ISO
                            6166](https://en.wikipedia.org/wiki/International_Securities_Identification_Number).
                          pattern: ^[A-Z]{2}[A-Z0-9]{9}[0-9]$
                        instrument_id_type:
                          description: |-
                            The type of the ID used in the request.
                            * ISIN - 
                          enum:
                            - ISIN
                          default: ISIN
                          type: string
                        order_type:
                          type: string
                          description: |-
                            Type of the order.
                            * MARKET - 
                            * LIMIT - 
                            * STOP - 
                          enum:
                            - MARKET
                            - LIMIT
                            - STOP
                        quantity:
                          allOf:
                            - type: string
                              pattern: ^[0-9]{0,63}(\.[0-9]{1,27})?$
                            - description: >-
                                Quantity of securities for the order. Only
                                required if the cash amount is not specified.
                        user_instrument_fit_acknowledgement:
                          type: boolean
                          description: >-
                            Only applicable if the user has failed the
                            instrument fit check for the instrument type being
                            ordered. True if the user has acknowledged their
                            willingness to trade.
                        limit_price:
                          allOf:
                            - type: string
                              pattern: ^[0-9]{0,63}(\.[0-9]{1,27})?$
                            - description: The limit price for orders of the type 'limit'.
                        stop_price:
                          allOf:
                            - type: string
                              pattern: ^[0-9]{0,63}(\.[0-9]{1,27})?$
                            - description: The stop price for orders of the type 'stop'.
                        expiry_date:
                          allOf:
                            - title: Expiry date
                              type: string
                              pattern: ^[0-9]{4}-[0-9]{2}-[0-9]{2}$
                            - description: >-
                                The order expiration date (last day the order
                                can trade) in the YYYY-MM-DD format. [RFC 3339,
                                section
                                5.6](https://json-schema.org/draft/2020-12/json-schema-validation.html#RFC3339)
                                RFC 3339. The default value is order creation
                                date + 200 years
                        status:
                          type: string
                          description: |-
                            The execution status of the order.
                            * NEW - 
                            * PROCESSING - 
                            * FILLED - 
                            * CANCELLED - 
                          enum:
                            - NEW
                            - PROCESSING
                            - FILLED
                            - CANCELLED
                        fee:
                          type: string
                          pattern: ^[0-9]{0,63}(\.[0-9]{1,27})?$
                        cancellation_reason:
                          type: string
                          description: >-
                            Reason for Order cancellation. The field is present
                            in case the Order has a status of CANCELLED.

                            * CANCELLED_BY_CLIENT - 

                            * CANCELLED_BY_UPVEST_OPERATIONS - 

                            * CANCELLED_BY_TRADING_PARTNER - 

                            * CANCELLED_BY_UPVEST_PLATFORM - 
                          enum:
                            - CANCELLED_BY_CLIENT
                            - CANCELLED_BY_UPVEST_OPERATIONS
                            - CANCELLED_BY_TRADING_PARTNER
                            - CANCELLED_BY_UPVEST_PLATFORM
                        initiation_flow:
                          type: string
                          description: >-
                            Initiation flow used during order creation, i.e.
                            what triggered the order.

                            * API - 

                            * PORTFOLIO - 

                            * CASH_DIVIDEND_REINVESTMENT - 

                            * PORTFOLIO_REBALANCING - 

                            * SELL_TO_COVER_FEES - 

                            * SELL_TO_COVER_TAXES - 

                            * ACCOUNT_LIQUIDATION - 

                            * UPVEST_OPERATIONS - 

                            * SAVINGS_PLAN - 
                          enum:
                            - API
                            - PORTFOLIO
                            - CASH_DIVIDEND_REINVESTMENT
                            - PORTFOLIO_REBALANCING
                            - SELL_TO_COVER_FEES
                            - SELL_TO_COVER_TAXES
                            - ACCOUNT_LIQUIDATION
                            - UPVEST_OPERATIONS
                            - SAVINGS_PLAN
                        execution_flow:
                          type: string
                          description: >-
                            Execution flow that the order processing goes
                            through. If no value is specified, the default value
                            is assumed - `STRAIGHT_THROUGH`.

                            * STRAIGHT_THROUGH - 

                            * BLOCK - 
                          enum:
                            - STRAIGHT_THROUGH
                            - BLOCK
                        executions:
                          type: array
                          description: Order executions associated with this order
                          items:
                            title: Order execution
                            type: object
                            properties:
                              id:
                                title: Order execution unique identifier
                                type: string
                                format: uuid
                              cash_amount:
                                type: string
                                pattern: ^[0-9]{1,9}(\.[0-9]{2})?$
                              share_quantity:
                                type: string
                                pattern: ^[0-9]{0,63}(\.[0-9]{1,27})?$
                              price:
                                type: string
                                pattern: ^[0-9]{0,63}(\.[0-9]{1,4})?$
                              transaction_time:
                                type: string
                                format: date-time
                              taxes:
                                type: array
                                items:
                                  title: Tax
                                  type: object
                                  properties:
                                    type:
                                      type: string
                                      description: |-
                                        Tax type
                                        * TOTAL - 
                                      default: TOTAL
                                      enum:
                                        - TOTAL
                                    amount:
                                      type: string
                                      pattern: ^[0-9]{0,63}(\.[0-9]{1,27})?$
                                  required:
                                    - type
                                    - amount
                              order_id:
                                title: Order unique identifier
                                type: string
                                format: uuid
                              status:
                                type: string
                                description: |-
                                  Execution status of the Execution.
                                  * FILLED - 
                                  * SETTLED - 
                                  * CANCELLED - 
                                enum:
                                  - FILLED
                                  - SETTLED
                                  - CANCELLED
                              side:
                                type: string
                                description: |-
                                  Side of the execution.
                                  * BUY - 
                                  * SELL - 
                                enum:
                                  - BUY
                                  - SELL
                              currency:
                                type: string
                                description: >-
                                  Alphabetic three-letter [ISO
                                  4217](https://en.wikipedia.org/wiki/ISO_4217)
                                  currency code.

                                  * EUR - Euro

                                  * GBP - British Pound
                                enum:
                                  - EUR
                                  - GBP
                              settlement_date:
                                allOf:
                                  - title: Settlement date
                                    type: string
                                    pattern: ^[0-9]{4}-[0-9]{2}-[0-9]{2}$
                                  - description: >-
                                      Order execution settlement date in the
                                      YYYY-MM-DD format. [RFC 3339, section
                                      5.6](https://json-schema.org/draft/2020-12/json-schema-validation.html#RFC3339)
                                      RFC 3339
                              venue_id:
                                type: string
                                format: uuid
                                description: The ID of the venue
                            required:
                              - id
                              - cash_amount
                              - share_quantity
                              - price
                              - transaction_time
                              - taxes
                              - order_id
                              - status
                              - side
                              - currency
                              - venue_id
                            additionalProperties: false
                        client_reference:
                          type: string
                          description: >-
                            Immutable reference to the API flow that initiated
                            the order. For client initiated API flows, this is a
                            client provided ID. For internal initiations, it is
                            set to the ID of the related object.
                          maxLength: 100
                        fee_configuration:
                          type: array
                          description: fee configuration
                          items:
                            title: Absolute Fee
                            type: object
                            properties:
                              type:
                                title: Fee type
                                description: |-
                                  Fee type
                                  * TRANSACTION_FEE_BUY - 
                                  * TRANSACTION_FEE_SELL - 
                                type: string
                                enum:
                                  - TRANSACTION_FEE_BUY
                                  - TRANSACTION_FEE_SELL
                              value_type:
                                type: string
                                default: ABSOLUTE
                                description: The value type must be “ABSOLUTE”.
                              charge_method:
                                title: Fee charge method
                                type: string
                                description: >-
                                  Indicates whether the fee will be charged by
                                  client or by other methods.

                                  * CHARGED_BY_CLIENT - 

                                  * COLLECTED_BY_UPVEST - 
                                enum:
                                  - CHARGED_BY_CLIENT
                                  - COLLECTED_BY_UPVEST
                              cash_amount:
                                type: string
                                pattern: ^[0-9]{1,9}(\.[0-9]{2})?$
                              currency:
                                type: string
                                description: >-
                                  Alphabetic three-letter [ISO
                                  4217](https://en.wikipedia.org/wiki/ISO_4217)
                                  currency code.

                                  * EUR - Euro

                                  * GBP - British Pound
                                enum:
                                  - EUR
                                  - GBP
                            required:
                              - type
                              - value_type
                              - charge_method
                              - cash_amount
                              - currency
                            additionalProperties: false
                      required:
                        - id
                        - created_at
                        - updated_at
                        - user_id
                        - account_id
                        - cash_amount
                        - currency
                        - side
                        - instrument_id
                        - instrument_id_type
                        - order_type
                        - quantity
                        - status
                        - fee
                        - initiation_flow
                        - executions
                        - client_reference
                      additionalProperties: false
                required:
                  - meta
                  - data
                additionalProperties: false
              example:
                meta:
                  offset: 0
                  limit: 100
                  count: 1
                  total_count: 1
                  sort: id
                  order: ASC
                data:
                  - id: eb5ba93f-5dfe-4bf1-8571-4da0caacc80c
                    created_at: '2021-07-21T14:10:00.00Z'
                    updated_at: '2021-07-21T14:10:00.00Z'
                    user_id: 2dedfeb0-58cd-44f2-ae08-0e41fe0413d9
                    account_id: debf2026-f2da-4ff0-bb84-92e45babb1e3
                    cash_amount: '56.65'
                    currency: EUR
                    side: BUY
                    instrument_id: US0378331005
                    instrument_id_type: ISIN
                    order_type: MARKET
                    quantity: '0.05'
                    user_instrument_fit_acknowledgement: true
                    limit_price: ''
                    stop_price: ''
                    status: FILLED
                    fee: '0.5'
                    executions:
                      - id: b9dc0676-8a7d-412d-802a-3b325eefd15e
                        side: BUY
                        currency: EUR
                        status: FILLED
                        order_id: eb5ba93f-5dfe-4bf1-8571-4da0caacc80c
                        cash_amount: '56.65'
                        share_quantity: '0.05'
                        price: '130.65'
                        transaction_time: '2021-07-21T14:10:00.00Z'
                        taxes:
                          - amount: '1.3'
                            type: TOTAL
                        venue_id: 20d6024b-2df4-41ae-8d42-62e4744e455b
                    client_reference: ''
                    initiation_flow: API
        '400':
          description: Bad Request. The incoming request had a malformed parameter/object.
          headers:
            upvest-request-id:
              required: true
              schema:
                type: string
                format: uuid
                example: 169ae4c7-ebd7-4041-94da-25369653eba7
          content:
            application/problem+json:
              schema:
                title: Error
                type: object
                description: ''
                properties:
                  type:
                    type: string
                    description: URL to a document describing the error condition.
                  status:
                    type: integer
                    description: >-
                      Transmission of the HTTP status code so that all
                      information can be found in one place, but also to correct
                      changes in the status code due to the use of proxy
                      servers.
                  title:
                    type: string
                    description: >-
                      A short, human-readable title for the general error type;
                      the title should not change for given types.
                  detail:
                    type: string
                    description: A human-readable description of the specific error.
                  instance:
                    type: string
                    description: >-
                      This optional key may be present, with a unique URI for
                      the specific error; this will often point to an error log
                      for that specific response.
                  request_id:
                    type: string
                    description: Correlation ID for the original request.
                required:
                  - type
                  - status
                additionalProperties: false
              example:
                status: 400
                type: bad_request
        '401':
          description: Unauthorized. The caller has not been authenticated.
          headers:
            upvest-request-id:
              required: true
              schema:
                type: string
                format: uuid
                example: 169ae4c7-ebd7-4041-94da-25369653eba7
          content:
            application/problem+json:
              schema:
                title: Error
                type: object
                description: ''
                properties:
                  type:
                    type: string
                    description: URL to a document describing the error condition.
                  status:
                    type: integer
                    description: >-
                      Transmission of the HTTP status code so that all
                      information can be found in one place, but also to correct
                      changes in the status code due to the use of proxy
                      servers.
                  title:
                    type: string
                    description: >-
                      A short, human-readable title for the general error type;
                      the title should not change for given types.
                  detail:
                    type: string
                    description: A human-readable description of the specific error.
                  instance:
                    type: string
                    description: >-
                      This optional key may be present, with a unique URI for
                      the specific error; this will often point to an error log
                      for that specific response.
                  request_id:
                    type: string
                    description: Correlation ID for the original request.
                required:
                  - type
                  - status
                additionalProperties: false
              example:
                status: 401
                type: unauthorized
        '403':
          description: >-
            Forbidden. The caller has been authenticated but is not allowed to
            take the requested action.
          headers:
            upvest-request-id:
              required: true
              schema:
                type: string
                format: uuid
                example: 169ae4c7-ebd7-4041-94da-25369653eba7
          content:
            application/problem+json:
              schema:
                title: Error
                type: object
                description: ''
                properties:
                  type:
                    type: string
                    description: URL to a document describing the error condition.
                  status:
                    type: integer
                    description: >-
                      Transmission of the HTTP status code so that all
                      information can be found in one place, but also to correct
                      changes in the status code due to the use of proxy
                      servers.
                  title:
                    type: string
                    description: >-
                      A short, human-readable title for the general error type;
                      the title should not change for given types.
                  detail:
                    type: string
                    description: A human-readable description of the specific error.
                  instance:
                    type: string
                    description: >-
                      This optional key may be present, with a unique URI for
                      the specific error; this will often point to an error log
                      for that specific response.
                  request_id:
                    type: string
                    description: Correlation ID for the original request.
                required:
                  - type
                  - status
                additionalProperties: false
              example:
                status: 403
                type: forbidden
        '404':
          description: Not Found. The requested resource could not be found.
          headers:
            upvest-request-id:
              required: true
              schema:
                type: string
                format: uuid
                example: 169ae4c7-ebd7-4041-94da-25369653eba7
          content:
            application/problem+json:
              schema:
                title: Error
                type: object
                description: ''
                properties:
                  type:
                    type: string
                    description: URL to a document describing the error condition.
                  status:
                    type: integer
                    description: >-
                      Transmission of the HTTP status code so that all
                      information can be found in one place, but also to correct
                      changes in the status code due to the use of proxy
                      servers.
                  title:
                    type: string
                    description: >-
                      A short, human-readable title for the general error type;
                      the title should not change for given types.
                  detail:
                    type: string
                    description: A human-readable description of the specific error.
                  instance:
                    type: string
                    description: >-
                      This optional key may be present, with a unique URI for
                      the specific error; this will often point to an error log
                      for that specific response.
                  request_id:
                    type: string
                    description: Correlation ID for the original request.
                required:
                  - type
                  - status
                additionalProperties: false
              example:
                status: 404
                type: not_found
        '406':
          description: >-
            Not Acceptable. The resource does not have a current representation
            that would be acceptable to the user agent. "Accept" header defined
            unsupported value.
          headers:
            upvest-request-id:
              required: true
              schema:
                type: string
                format: uuid
                example: 169ae4c7-ebd7-4041-94da-25369653eba7
          content:
            application/problem+json:
              schema:
                title: Error
                type: object
                description: ''
                properties:
                  type:
                    type: string
                    description: URL to a document describing the error condition.
                  status:
                    type: integer
                    description: >-
                      Transmission of the HTTP status code so that all
                      information can be found in one place, but also to correct
                      changes in the status code due to the use of proxy
                      servers.
                  title:
                    type: string
                    description: >-
                      A short, human-readable title for the general error type;
                      the title should not change for given types.
                  detail:
                    type: string
                    description: A human-readable description of the specific error.
                  instance:
                    type: string
                    description: >-
                      This optional key may be present, with a unique URI for
                      the specific error; this will often point to an error log
                      for that specific response.
                  request_id:
                    type: string
                    description: Correlation ID for the original request.
                required:
                  - type
                  - status
                additionalProperties: false
              example:
                status: 406
                type: not_acceptable
        '429':
          description: >-
            Too Many Requests. The caller has exceeded their quota for the time
            period and has been throttled.
          headers:
            upvest-request-id:
              required: true
              schema:
                type: string
                format: uuid
                example: 169ae4c7-ebd7-4041-94da-25369653eba7
          content:
            application/problem+json:
              schema:
                title: Error
                type: object
                description: ''
                properties:
                  type:
                    type: string
                    description: URL to a document describing the error condition.
                  status:
                    type: integer
                    description: >-
                      Transmission of the HTTP status code so that all
                      information can be found in one place, but also to correct
                      changes in the status code due to the use of proxy
                      servers.
                  title:
                    type: string
                    description: >-
                      A short, human-readable title for the general error type;
                      the title should not change for given types.
                  detail:
                    type: string
                    description: A human-readable description of the specific error.
                  instance:
                    type: string
                    description: >-
                      This optional key may be present, with a unique URI for
                      the specific error; this will often point to an error log
                      for that specific response.
                  request_id:
                    type: string
                    description: Correlation ID for the original request.
                required:
                  - type
                  - status
                additionalProperties: false
              example:
                status: 429
                type: too_many_requests
        '500':
          description: Internal Server Error. The service encountered an unexpected error.
          headers:
            upvest-request-id:
              required: true
              schema:
                type: string
                format: uuid
                example: 169ae4c7-ebd7-4041-94da-25369653eba7
          content:
            application/problem+json:
              schema:
                title: Error
                type: object
                description: ''
                properties:
                  type:
                    type: string
                    description: URL to a document describing the error condition.
                  status:
                    type: integer
                    description: >-
                      Transmission of the HTTP status code so that all
                      information can be found in one place, but also to correct
                      changes in the status code due to the use of proxy
                      servers.
                  title:
                    type: string
                    description: >-
                      A short, human-readable title for the general error type;
                      the title should not change for given types.
                  detail:
                    type: string
                    description: A human-readable description of the specific error.
                  instance:
                    type: string
                    description: >-
                      This optional key may be present, with a unique URI for
                      the specific error; this will often point to an error log
                      for that specific response.
                  request_id:
                    type: string
                    description: Correlation ID for the original request.
                required:
                  - type
                  - status
                additionalProperties: false
              example:
                status: 500
                type: internal_server_error
        '503':
          description: >-
            Service Unavailable. The service handling for this request cannot be
            reached at this time.
          headers:
            upvest-request-id:
              required: true
              schema:
                type: string
                format: uuid
                example: 169ae4c7-ebd7-4041-94da-25369653eba7
          content:
            application/problem+json:
              schema:
                title: Error
                type: object
                description: ''
                properties:
                  type:
                    type: string
                    description: URL to a document describing the error condition.
                  status:
                    type: integer
                    description: >-
                      Transmission of the HTTP status code so that all
                      information can be found in one place, but also to correct
                      changes in the status code due to the use of proxy
                      servers.
                  title:
                    type: string
                    description: >-
                      A short, human-readable title for the general error type;
                      the title should not change for given types.
                  detail:
                    type: string
                    description: A human-readable description of the specific error.
                  instance:
                    type: string
                    description: >-
                      This optional key may be present, with a unique URI for
                      the specific error; this will often point to an error log
                      for that specific response.
                  request_id:
                    type: string
                    description: Correlation ID for the original request.
                required:
                  - type
                  - status
                additionalProperties: false
              example:
                status: 503
                type: method_not_allowed
        '504':
          description: >-
            Gateway Timeout. The service gateway has reached its internal
            timeout.
          headers:
            upvest-request-id:
              required: true
              schema:
                type: string
                format: uuid
                example: 169ae4c7-ebd7-4041-94da-25369653eba7
          content:
            application/problem+json:
              schema:
                title: Error
                type: object
                description: ''
                properties:
                  type:
                    type: string
                    description: URL to a document describing the error condition.
                  status:
                    type: integer
                    description: >-
                      Transmission of the HTTP status code so that all
                      information can be found in one place, but also to correct
                      changes in the status code due to the use of proxy
                      servers.
                  title:
                    type: string
                    description: >-
                      A short, human-readable title for the general error type;
                      the title should not change for given types.
                  detail:
                    type: string
                    description: A human-readable description of the specific error.
                  instance:
                    type: string
                    description: >-
                      This optional key may be present, with a unique URI for
                      the specific error; this will often point to an error log
                      for that specific response.
                  request_id:
                    type: string
                    description: Correlation ID for the original request.
                required:
                  - type
                  - status
                additionalProperties: false
              example:
                status: 504
                type: gateway_timeout
  /fees/configurations:
    parameters:
      - name: upvest-client-id
        in: header
        description: Tenant Client ID
        required: true
        schema:
          type: string
          format: uuid
          example: ebabcf4d-61c3-4942-875c-e265a7c2d062
      - name: authorization
        in: header
        description: |
          Bearer (access) token from the OAuth flow with correct scopes.
          https://datatracker.ietf.org/doc/html/rfc6750
        required: true
        schema:
          type: string
          pattern: ^Bearer [a-zA-Z0-9\-\._~+/]*=*
          example: Bearer c2VjcmV0Cg==
      - name: signature
        in: header
        required: true
        schema:
          type: string
        description: >-
          https://tools.ietf.org/id/draft-ietf-httpbis-message-signatures-01.html#name-the-signature-http-header
      - name: signature-input
        in: header
        required: true
        schema:
          type: string
        description: >-
          https://tools.ietf.org/id/draft-ietf-httpbis-message-signatures-01.html#name-the-signature-input-http-he
      - name: upvest-api-version
        in: header
        required: false
        schema:
          type: string
          enum:
            - '1'
          default: '1'
          example: '1'
        description: 'Upvest API version (Note: Do not include quotation marks)'
    post:
      operationId: create_fee_configuration
      summary: Create a fee configuration
      description: Creates a fee configuration for a fee collection.
      tags:
        - Fees Configurations
      security:
        - oauth-client-credentials:
            - fees:admin
      requestBody:
        content:
          application/json:
            schema:
              title: Fee configuration - Create - Request
              type: object
              properties:
                account_id:
                  title: Account unique identifier.
                  type: string
                  description: Account unique identifier.
                  format: uuid
                fee_model_id:
                  title: Fee model unique identifier.
                  type: string
                  description: Fee model unique identifier.
                  format: uuid
              required:
                - account_id
                - fee_model_id
              additionalProperties: false
            example:
              fee_model_id: 1df86975-06f4-484d-935e-46b54bab2f6c
              account_id: 7524949b-31fd-497e-ad92-f52de45341d1
      responses:
        '200':
          description: OK
          headers:
            upvest-request-id:
              required: true
              schema:
                type: string
                format: uuid
                example: 169ae4c7-ebd7-4041-94da-25369653eba7
          content:
            application/json:
              schema:
                title: Fee Configuration
                type: object
                properties:
                  created_at:
                    type: string
                    format: date-time
                    description: >-
                      Date and time when the resource was created. [RFC
                      3339-5](https://datatracker.ietf.org/doc/html/rfc3339#section-5.6),
                      [ISO8601
                      UTC](https://www.iso.org/iso-8601-date-and-time-format.html)
                  updated_at:
                    type: string
                    format: date-time
                    description: >-
                      Date and time when the resource was last updated. [RFC
                      3339-5](https://datatracker.ietf.org/doc/html/rfc3339#section-5.6),
                      [ISO8601
                      UTC](https://www.iso.org/iso-8601-date-and-time-format.html)
                  account_id:
                    title: Account unique identifier.
                    type: string
                    description: Account unique identifier.
                    format: uuid
                  fee_model_id:
                    title: Fee model unique identifier.
                    type: string
                    description: Fee model unique identifier.
                    format: uuid
                required:
                  - account_id
                  - fee_model_id
                  - created_at
                  - updated_at
                additionalProperties: false
              example:
                created_at: '2021-07-21T14:10:00.00Z'
                updated_at: '2021-07-21T14:10:00.00Z'
                fee_model_id: 1df86975-06f4-484d-935e-46b54bab2f6c
                account_id: 7524949b-31fd-497e-ad92-f52de45341d1
        '400':
          description: Bad Request. The incoming request had a malformed parameter/object.
          headers:
            upvest-request-id:
              required: true
              schema:
                type: string
                format: uuid
                example: 169ae4c7-ebd7-4041-94da-25369653eba7
          content:
            application/problem+json:
              schema:
                title: Error
                type: object
                description: ''
                properties:
                  type:
                    type: string
                    description: URL to a document describing the error condition.
                  status:
                    type: integer
                    description: >-
                      Transmission of the HTTP status code so that all
                      information can be found in one place, but also to correct
                      changes in the status code due to the use of proxy
                      servers.
                  title:
                    type: string
                    description: >-
                      A short, human-readable title for the general error type;
                      the title should not change for given types.
                  detail:
                    type: string
                    description: A human-readable description of the specific error.
                  instance:
                    type: string
                    description: >-
                      This optional key may be present, with a unique URI for
                      the specific error; this will often point to an error log
                      for that specific response.
                  request_id:
                    type: string
                    description: Correlation ID for the original request.
                required:
                  - type
                  - status
                additionalProperties: false
              example:
                status: 400
                type: bad_request
        '401':
          description: Unauthorized. The caller has not been authenticated.
          headers:
            upvest-request-id:
              required: true
              schema:
                type: string
                format: uuid
                example: 169ae4c7-ebd7-4041-94da-25369653eba7
          content:
            application/problem+json:
              schema:
                title: Error
                type: object
                description: ''
                properties:
                  type:
                    type: string
                    description: URL to a document describing the error condition.
                  status:
                    type: integer
                    description: >-
                      Transmission of the HTTP status code so that all
                      information can be found in one place, but also to correct
                      changes in the status code due to the use of proxy
                      servers.
                  title:
                    type: string
                    description: >-
                      A short, human-readable title for the general error type;
                      the title should not change for given types.
                  detail:
                    type: string
                    description: A human-readable description of the specific error.
                  instance:
                    type: string
                    description: >-
                      This optional key may be present, with a unique URI for
                      the specific error; this will often point to an error log
                      for that specific response.
                  request_id:
                    type: string
                    description: Correlation ID for the original request.
                required:
                  - type
                  - status
                additionalProperties: false
              example:
                status: 401
                type: unauthorized
        '403':
          description: >-
            Forbidden. The caller has been authenticated but is not allowed to
            take the requested action.
          headers:
            upvest-request-id:
              required: true
              schema:
                type: string
                format: uuid
                example: 169ae4c7-ebd7-4041-94da-25369653eba7
          content:
            application/problem+json:
              schema:
                title: Error
                type: object
                description: ''
                properties:
                  type:
                    type: string
                    description: URL to a document describing the error condition.
                  status:
                    type: integer
                    description: >-
                      Transmission of the HTTP status code so that all
                      information can be found in one place, but also to correct
                      changes in the status code due to the use of proxy
                      servers.
                  title:
                    type: string
                    description: >-
                      A short, human-readable title for the general error type;
                      the title should not change for given types.
                  detail:
                    type: string
                    description: A human-readable description of the specific error.
                  instance:
                    type: string
                    description: >-
                      This optional key may be present, with a unique URI for
                      the specific error; this will often point to an error log
                      for that specific response.
                  request_id:
                    type: string
                    description: Correlation ID for the original request.
                required:
                  - type
                  - status
                additionalProperties: false
              example:
                status: 403
                type: forbidden
        '404':
          description: Not Found. The requested resource could not be found.
          headers:
            upvest-request-id:
              required: true
              schema:
                type: string
                format: uuid
                example: 169ae4c7-ebd7-4041-94da-25369653eba7
          content:
            application/problem+json:
              schema:
                title: Error
                type: object
                description: ''
                properties:
                  type:
                    type: string
                    description: URL to a document describing the error condition.
                  status:
                    type: integer
                    description: >-
                      Transmission of the HTTP status code so that all
                      information can be found in one place, but also to correct
                      changes in the status code due to the use of proxy
                      servers.
                  title:
                    type: string
                    description: >-
                      A short, human-readable title for the general error type;
                      the title should not change for given types.
                  detail:
                    type: string
                    description: A human-readable description of the specific error.
                  instance:
                    type: string
                    description: >-
                      This optional key may be present, with a unique URI for
                      the specific error; this will often point to an error log
                      for that specific response.
                  request_id:
                    type: string
                    description: Correlation ID for the original request.
                required:
                  - type
                  - status
                additionalProperties: false
              example:
                status: 404
                type: not_found
        '406':
          description: >-
            Not Acceptable. The resource does not have a current representation
            that would be acceptable to the user agent. "Accept" header defined
            unsupported value.
          headers:
            upvest-request-id:
              required: true
              schema:
                type: string
                format: uuid
                example: 169ae4c7-ebd7-4041-94da-25369653eba7
          content:
            application/problem+json:
              schema:
                title: Error
                type: object
                description: ''
                properties:
                  type:
                    type: string
                    description: URL to a document describing the error condition.
                  status:
                    type: integer
                    description: >-
                      Transmission of the HTTP status code so that all
                      information can be found in one place, but also to correct
                      changes in the status code due to the use of proxy
                      servers.
                  title:
                    type: string
                    description: >-
                      A short, human-readable title for the general error type;
                      the title should not change for given types.
                  detail:
                    type: string
                    description: A human-readable description of the specific error.
                  instance:
                    type: string
                    description: >-
                      This optional key may be present, with a unique URI for
                      the specific error; this will often point to an error log
                      for that specific response.
                  request_id:
                    type: string
                    description: Correlation ID for the original request.
                required:
                  - type
                  - status
                additionalProperties: false
              example:
                status: 406
                type: not_acceptable
        '409':
          description: >-
            Conflict. An operation is not available for the current state of the
            resource.
          headers:
            upvest-request-id:
              required: true
              schema:
                type: string
                format: uuid
                example: 169ae4c7-ebd7-4041-94da-25369653eba7
          content:
            application/problem+json:
              schema:
                title: Error
                type: object
                description: ''
                properties:
                  type:
                    type: string
                    description: URL to a document describing the error condition.
                  status:
                    type: integer
                    description: >-
                      Transmission of the HTTP status code so that all
                      information can be found in one place, but also to correct
                      changes in the status code due to the use of proxy
                      servers.
                  title:
                    type: string
                    description: >-
                      A short, human-readable title for the general error type;
                      the title should not change for given types.
                  detail:
                    type: string
                    description: A human-readable description of the specific error.
                  instance:
                    type: string
                    description: >-
                      This optional key may be present, with a unique URI for
                      the specific error; this will often point to an error log
                      for that specific response.
                  request_id:
                    type: string
                    description: Correlation ID for the original request.
                required:
                  - type
                  - status
                additionalProperties: false
              example:
                status: 409
                type: conflict
        '429':
          description: >-
            Too Many Requests. The caller has exceeded their quota for the time
            period and has been throttled.
          headers:
            upvest-request-id:
              required: true
              schema:
                type: string
                format: uuid
                example: 169ae4c7-ebd7-4041-94da-25369653eba7
          content:
            application/problem+json:
              schema:
                title: Error
                type: object
                description: ''
                properties:
                  type:
                    type: string
                    description: URL to a document describing the error condition.
                  status:
                    type: integer
                    description: >-
                      Transmission of the HTTP status code so that all
                      information can be found in one place, but also to correct
                      changes in the status code due to the use of proxy
                      servers.
                  title:
                    type: string
                    description: >-
                      A short, human-readable title for the general error type;
                      the title should not change for given types.
                  detail:
                    type: string
                    description: A human-readable description of the specific error.
                  instance:
                    type: string
                    description: >-
                      This optional key may be present, with a unique URI for
                      the specific error; this will often point to an error log
                      for that specific response.
                  request_id:
                    type: string
                    description: Correlation ID for the original request.
                required:
                  - type
                  - status
                additionalProperties: false
              example:
                status: 429
                type: too_many_requests
        '500':
          description: Internal Server Error. The service encountered an unexpected error.
          headers:
            upvest-request-id:
              required: true
              schema:
                type: string
                format: uuid
                example: 169ae4c7-ebd7-4041-94da-25369653eba7
          content:
            application/problem+json:
              schema:
                title: Error
                type: object
                description: ''
                properties:
                  type:
                    type: string
                    description: URL to a document describing the error condition.
                  status:
                    type: integer
                    description: >-
                      Transmission of the HTTP status code so that all
                      information can be found in one place, but also to correct
                      changes in the status code due to the use of proxy
                      servers.
                  title:
                    type: string
                    description: >-
                      A short, human-readable title for the general error type;
                      the title should not change for given types.
                  detail:
                    type: string
                    description: A human-readable description of the specific error.
                  instance:
                    type: string
                    description: >-
                      This optional key may be present, with a unique URI for
                      the specific error; this will often point to an error log
                      for that specific response.
                  request_id:
                    type: string
                    description: Correlation ID for the original request.
                required:
                  - type
                  - status
                additionalProperties: false
              example:
                status: 500
                type: internal_server_error
        '503':
          description: >-
            Service Unavailable. The service handling for this request cannot be
            reached at this time.
          headers:
            upvest-request-id:
              required: true
              schema:
                type: string
                format: uuid
                example: 169ae4c7-ebd7-4041-94da-25369653eba7
          content:
            application/problem+json:
              schema:
                title: Error
                type: object
                description: ''
                properties:
                  type:
                    type: string
                    description: URL to a document describing the error condition.
                  status:
                    type: integer
                    description: >-
                      Transmission of the HTTP status code so that all
                      information can be found in one place, but also to correct
                      changes in the status code due to the use of proxy
                      servers.
                  title:
                    type: string
                    description: >-
                      A short, human-readable title for the general error type;
                      the title should not change for given types.
                  detail:
                    type: string
                    description: A human-readable description of the specific error.
                  instance:
                    type: string
                    description: >-
                      This optional key may be present, with a unique URI for
                      the specific error; this will often point to an error log
                      for that specific response.
                  request_id:
                    type: string
                    description: Correlation ID for the original request.
                required:
                  - type
                  - status
                additionalProperties: false
              example:
                status: 503
                type: method_not_allowed
        '504':
          description: >-
            Gateway Timeout. The service gateway has reached its internal
            timeout.
          headers:
            upvest-request-id:
              required: true
              schema:
                type: string
                format: uuid
                example: 169ae4c7-ebd7-4041-94da-25369653eba7
          content:
            application/problem+json:
              schema:
                title: Error
                type: object
                description: ''
                properties:
                  type:
                    type: string
                    description: URL to a document describing the error condition.
                  status:
                    type: integer
                    description: >-
                      Transmission of the HTTP status code so that all
                      information can be found in one place, but also to correct
                      changes in the status code due to the use of proxy
                      servers.
                  title:
                    type: string
                    description: >-
                      A short, human-readable title for the general error type;
                      the title should not change for given types.
                  detail:
                    type: string
                    description: A human-readable description of the specific error.
                  instance:
                    type: string
                    description: >-
                      This optional key may be present, with a unique URI for
                      the specific error; this will often point to an error log
                      for that specific response.
                  request_id:
                    type: string
                    description: Correlation ID for the original request.
                required:
                  - type
                  - status
                additionalProperties: false
              example:
                status: 504
                type: gateway_timeout
  /fees/configurations/{account_id}:
    parameters:
      - name: account_id
        in: path
        required: true
        schema:
          title: Account unique identifier.
          type: string
          description: Account unique identifier.
          format: uuid
      - name: upvest-client-id
        in: header
        description: Tenant Client ID
        required: true
        schema:
          type: string
          format: uuid
          example: ebabcf4d-61c3-4942-875c-e265a7c2d062
      - name: authorization
        in: header
        description: |
          Bearer (access) token from the OAuth flow with correct scopes.
          https://datatracker.ietf.org/doc/html/rfc6750
        required: true
        schema:
          type: string
          pattern: ^Bearer [a-zA-Z0-9\-\._~+/]*=*
          example: Bearer c2VjcmV0Cg==
      - name: signature
        in: header
        required: true
        schema:
          type: string
        description: >-
          https://tools.ietf.org/id/draft-ietf-httpbis-message-signatures-01.html#name-the-signature-http-header
      - name: signature-input
        in: header
        required: true
        schema:
          type: string
        description: >-
          https://tools.ietf.org/id/draft-ietf-httpbis-message-signatures-01.html#name-the-signature-input-http-he
      - name: upvest-api-version
        in: header
        required: false
        schema:
          type: string
          enum:
            - '1'
          default: '1'
          example: '1'
        description: 'Upvest API version (Note: Do not include quotation marks)'
    get:
      operationId: retrieve_fee_configurations
      summary: Get fee configuration
      description: Retrieve the fee configuration for a specific account.
      tags:
        - Fees Configurations
      security:
        - oauth-client-credentials:
            - fees:read
            - fees:admin
      responses:
        '200':
          description: OK
          headers:
            upvest-request-id:
              required: true
              schema:
                type: string
                format: uuid
                example: 169ae4c7-ebd7-4041-94da-25369653eba7
          content:
            application/json:
              schema:
                title: Fee Configuration
                type: object
                properties:
                  created_at:
                    type: string
                    format: date-time
                    description: >-
                      Date and time when the resource was created. [RFC
                      3339-5](https://datatracker.ietf.org/doc/html/rfc3339#section-5.6),
                      [ISO8601
                      UTC](https://www.iso.org/iso-8601-date-and-time-format.html)
                  updated_at:
                    type: string
                    format: date-time
                    description: >-
                      Date and time when the resource was last updated. [RFC
                      3339-5](https://datatracker.ietf.org/doc/html/rfc3339#section-5.6),
                      [ISO8601
                      UTC](https://www.iso.org/iso-8601-date-and-time-format.html)
                  account_id:
                    title: Account unique identifier.
                    type: string
                    description: Account unique identifier.
                    format: uuid
                  fee_model_id:
                    title: Fee model unique identifier.
                    type: string
                    description: Fee model unique identifier.
                    format: uuid
                required:
                  - account_id
                  - fee_model_id
                  - created_at
                  - updated_at
                additionalProperties: false
              example:
                created_at: '2021-07-21T14:10:00.00Z'
                updated_at: '2021-07-21T14:10:00.00Z'
                fee_model_id: 1df86975-06f4-484d-935e-46b54bab2f6c
                account_id: 7524949b-31fd-497e-ad92-f52de45341d1
        '401':
          description: Unauthorized. The caller has not been authenticated.
          headers:
            upvest-request-id:
              required: true
              schema:
                type: string
                format: uuid
                example: 169ae4c7-ebd7-4041-94da-25369653eba7
          content:
            application/problem+json:
              schema:
                title: Error
                type: object
                description: ''
                properties:
                  type:
                    type: string
                    description: URL to a document describing the error condition.
                  status:
                    type: integer
                    description: >-
                      Transmission of the HTTP status code so that all
                      information can be found in one place, but also to correct
                      changes in the status code due to the use of proxy
                      servers.
                  title:
                    type: string
                    description: >-
                      A short, human-readable title for the general error type;
                      the title should not change for given types.
                  detail:
                    type: string
                    description: A human-readable description of the specific error.
                  instance:
                    type: string
                    description: >-
                      This optional key may be present, with a unique URI for
                      the specific error; this will often point to an error log
                      for that specific response.
                  request_id:
                    type: string
                    description: Correlation ID for the original request.
                required:
                  - type
                  - status
                additionalProperties: false
              example:
                status: 401
                type: unauthorized
        '403':
          description: >-
            Forbidden. The caller has been authenticated but is not allowed to
            take the requested action.
          headers:
            upvest-request-id:
              required: true
              schema:
                type: string
                format: uuid
                example: 169ae4c7-ebd7-4041-94da-25369653eba7
          content:
            application/problem+json:
              schema:
                title: Error
                type: object
                description: ''
                properties:
                  type:
                    type: string
                    description: URL to a document describing the error condition.
                  status:
                    type: integer
                    description: >-
                      Transmission of the HTTP status code so that all
                      information can be found in one place, but also to correct
                      changes in the status code due to the use of proxy
                      servers.
                  title:
                    type: string
                    description: >-
                      A short, human-readable title for the general error type;
                      the title should not change for given types.
                  detail:
                    type: string
                    description: A human-readable description of the specific error.
                  instance:
                    type: string
                    description: >-
                      This optional key may be present, with a unique URI for
                      the specific error; this will often point to an error log
                      for that specific response.
                  request_id:
                    type: string
                    description: Correlation ID for the original request.
                required:
                  - type
                  - status
                additionalProperties: false
              example:
                status: 403
                type: forbidden
        '404':
          description: Not Found. The requested resource could not be found.
          headers:
            upvest-request-id:
              required: true
              schema:
                type: string
                format: uuid
                example: 169ae4c7-ebd7-4041-94da-25369653eba7
          content:
            application/problem+json:
              schema:
                title: Error
                type: object
                description: ''
                properties:
                  type:
                    type: string
                    description: URL to a document describing the error condition.
                  status:
                    type: integer
                    description: >-
                      Transmission of the HTTP status code so that all
                      information can be found in one place, but also to correct
                      changes in the status code due to the use of proxy
                      servers.
                  title:
                    type: string
                    description: >-
                      A short, human-readable title for the general error type;
                      the title should not change for given types.
                  detail:
                    type: string
                    description: A human-readable description of the specific error.
                  instance:
                    type: string
                    description: >-
                      This optional key may be present, with a unique URI for
                      the specific error; this will often point to an error log
                      for that specific response.
                  request_id:
                    type: string
                    description: Correlation ID for the original request.
                required:
                  - type
                  - status
                additionalProperties: false
              example:
                status: 404
                type: not_found
        '406':
          description: >-
            Not Acceptable. The resource does not have a current representation
            that would be acceptable to the user agent. "Accept" header defined
            unsupported value.
          headers:
            upvest-request-id:
              required: true
              schema:
                type: string
                format: uuid
                example: 169ae4c7-ebd7-4041-94da-25369653eba7
          content:
            application/problem+json:
              schema:
                title: Error
                type: object
                description: ''
                properties:
                  type:
                    type: string
                    description: URL to a document describing the error condition.
                  status:
                    type: integer
                    description: >-
                      Transmission of the HTTP status code so that all
                      information can be found in one place, but also to correct
                      changes in the status code due to the use of proxy
                      servers.
                  title:
                    type: string
                    description: >-
                      A short, human-readable title for the general error type;
                      the title should not change for given types.
                  detail:
                    type: string
                    description: A human-readable description of the specific error.
                  instance:
                    type: string
                    description: >-
                      This optional key may be present, with a unique URI for
                      the specific error; this will often point to an error log
                      for that specific response.
                  request_id:
                    type: string
                    description: Correlation ID for the original request.
                required:
                  - type
                  - status
                additionalProperties: false
              example:
                status: 406
                type: not_acceptable
        '429':
          description: >-
            Too Many Requests. The caller has exceeded their quota for the time
            period and has been throttled.
          headers:
            upvest-request-id:
              required: true
              schema:
                type: string
                format: uuid
                example: 169ae4c7-ebd7-4041-94da-25369653eba7
          content:
            application/problem+json:
              schema:
                title: Error
                type: object
                description: ''
                properties:
                  type:
                    type: string
                    description: URL to a document describing the error condition.
                  status:
                    type: integer
                    description: >-
                      Transmission of the HTTP status code so that all
                      information can be found in one place, but also to correct
                      changes in the status code due to the use of proxy
                      servers.
                  title:
                    type: string
                    description: >-
                      A short, human-readable title for the general error type;
                      the title should not change for given types.
                  detail:
                    type: string
                    description: A human-readable description of the specific error.
                  instance:
                    type: string
                    description: >-
                      This optional key may be present, with a unique URI for
                      the specific error; this will often point to an error log
                      for that specific response.
                  request_id:
                    type: string
                    description: Correlation ID for the original request.
                required:
                  - type
                  - status
                additionalProperties: false
              example:
                status: 429
                type: too_many_requests
        '500':
          description: Internal Server Error. The service encountered an unexpected error.
          headers:
            upvest-request-id:
              required: true
              schema:
                type: string
                format: uuid
                example: 169ae4c7-ebd7-4041-94da-25369653eba7
          content:
            application/problem+json:
              schema:
                title: Error
                type: object
                description: ''
                properties:
                  type:
                    type: string
                    description: URL to a document describing the error condition.
                  status:
                    type: integer
                    description: >-
                      Transmission of the HTTP status code so that all
                      information can be found in one place, but also to correct
                      changes in the status code due to the use of proxy
                      servers.
                  title:
                    type: string
                    description: >-
                      A short, human-readable title for the general error type;
                      the title should not change for given types.
                  detail:
                    type: string
                    description: A human-readable description of the specific error.
                  instance:
                    type: string
                    description: >-
                      This optional key may be present, with a unique URI for
                      the specific error; this will often point to an error log
                      for that specific response.
                  request_id:
                    type: string
                    description: Correlation ID for the original request.
                required:
                  - type
                  - status
                additionalProperties: false
              example:
                status: 500
                type: internal_server_error
        '503':
          description: >-
            Service Unavailable. The service handling for this request cannot be
            reached at this time.
          headers:
            upvest-request-id:
              required: true
              schema:
                type: string
                format: uuid
                example: 169ae4c7-ebd7-4041-94da-25369653eba7
          content:
            application/problem+json:
              schema:
                title: Error
                type: object
                description: ''
                properties:
                  type:
                    type: string
                    description: URL to a document describing the error condition.
                  status:
                    type: integer
                    description: >-
                      Transmission of the HTTP status code so that all
                      information can be found in one place, but also to correct
                      changes in the status code due to the use of proxy
                      servers.
                  title:
                    type: string
                    description: >-
                      A short, human-readable title for the general error type;
                      the title should not change for given types.
                  detail:
                    type: string
                    description: A human-readable description of the specific error.
                  instance:
                    type: string
                    description: >-
                      This optional key may be present, with a unique URI for
                      the specific error; this will often point to an error log
                      for that specific response.
                  request_id:
                    type: string
                    description: Correlation ID for the original request.
                required:
                  - type
                  - status
                additionalProperties: false
              example:
                status: 503
                type: method_not_allowed
        '504':
          description: >-
            Gateway Timeout. The service gateway has reached its internal
            timeout.
          headers:
            upvest-request-id:
              required: true
              schema:
                type: string
                format: uuid
                example: 169ae4c7-ebd7-4041-94da-25369653eba7
          content:
            application/problem+json:
              schema:
                title: Error
                type: object
                description: ''
                properties:
                  type:
                    type: string
                    description: URL to a document describing the error condition.
                  status:
                    type: integer
                    description: >-
                      Transmission of the HTTP status code so that all
                      information can be found in one place, but also to correct
                      changes in the status code due to the use of proxy
                      servers.
                  title:
                    type: string
                    description: >-
                      A short, human-readable title for the general error type;
                      the title should not change for given types.
                  detail:
                    type: string
                    description: A human-readable description of the specific error.
                  instance:
                    type: string
                    description: >-
                      This optional key may be present, with a unique URI for
                      the specific error; this will often point to an error log
                      for that specific response.
                  request_id:
                    type: string
                    description: Correlation ID for the original request.
                required:
                  - type
                  - status
                additionalProperties: false
              example:
                status: 504
                type: gateway_timeout
    patch:
      operationId: update_fee_configuration
      summary: Update fee configuration
      description: Update fee configuration
      tags:
        - Fees Configurations
      security:
        - oauth-client-credentials:
            - fees:admin
      requestBody:
        content:
          application/json:
            schema:
              title: Fee configuration - Update - Request
              type: object
              properties:
                fee_model_id:
                  title: Fee model unique identifier.
                  type: string
                  description: Fee model unique identifier.
                  format: uuid
              required:
                - fee_model_id
              additionalProperties: false
            example:
              fee_model_id: 1df86975-06f4-484d-935e-46b54bab2f6c
      responses:
        '200':
          description: OK
          headers:
            upvest-request-id:
              required: true
              schema:
                type: string
                format: uuid
                example: 169ae4c7-ebd7-4041-94da-25369653eba7
          content:
            application/json:
              schema:
                title: Fee Configuration
                type: object
                properties:
                  created_at:
                    type: string
                    format: date-time
                    description: >-
                      Date and time when the resource was created. [RFC
                      3339-5](https://datatracker.ietf.org/doc/html/rfc3339#section-5.6),
                      [ISO8601
                      UTC](https://www.iso.org/iso-8601-date-and-time-format.html)
                  updated_at:
                    type: string
                    format: date-time
                    description: >-
                      Date and time when the resource was last updated. [RFC
                      3339-5](https://datatracker.ietf.org/doc/html/rfc3339#section-5.6),
                      [ISO8601
                      UTC](https://www.iso.org/iso-8601-date-and-time-format.html)
                  account_id:
                    title: Account unique identifier.
                    type: string
                    description: Account unique identifier.
                    format: uuid
                  fee_model_id:
                    title: Fee model unique identifier.
                    type: string
                    description: Fee model unique identifier.
                    format: uuid
                required:
                  - account_id
                  - fee_model_id
                  - created_at
                  - updated_at
                additionalProperties: false
              example:
                created_at: '2021-07-21T14:10:00.00Z'
                updated_at: '2021-07-21T14:10:00.00Z'
                fee_model_id: 1df86975-06f4-484d-935e-46b54bab2f6c
                account_id: 7524949b-31fd-497e-ad92-f52de45341d1
        '400':
          description: Bad Request. The incoming request had a malformed parameter/object.
          headers:
            upvest-request-id:
              required: true
              schema:
                type: string
                format: uuid
                example: 169ae4c7-ebd7-4041-94da-25369653eba7
          content:
            application/problem+json:
              schema:
                title: Error
                type: object
                description: ''
                properties:
                  type:
                    type: string
                    description: URL to a document describing the error condition.
                  status:
                    type: integer
                    description: >-
                      Transmission of the HTTP status code so that all
                      information can be found in one place, but also to correct
                      changes in the status code due to the use of proxy
                      servers.
                  title:
                    type: string
                    description: >-
                      A short, human-readable title for the general error type;
                      the title should not change for given types.
                  detail:
                    type: string
                    description: A human-readable description of the specific error.
                  instance:
                    type: string
                    description: >-
                      This optional key may be present, with a unique URI for
                      the specific error; this will often point to an error log
                      for that specific response.
                  request_id:
                    type: string
                    description: Correlation ID for the original request.
                required:
                  - type
                  - status
                additionalProperties: false
              example:
                status: 400
                type: bad_request
        '401':
          description: Unauthorized. The caller has not been authenticated.
          headers:
            upvest-request-id:
              required: true
              schema:
                type: string
                format: uuid
                example: 169ae4c7-ebd7-4041-94da-25369653eba7
          content:
            application/problem+json:
              schema:
                title: Error
                type: object
                description: ''
                properties:
                  type:
                    type: string
                    description: URL to a document describing the error condition.
                  status:
                    type: integer
                    description: >-
                      Transmission of the HTTP status code so that all
                      information can be found in one place, but also to correct
                      changes in the status code due to the use of proxy
                      servers.
                  title:
                    type: string
                    description: >-
                      A short, human-readable title for the general error type;
                      the title should not change for given types.
                  detail:
                    type: string
                    description: A human-readable description of the specific error.
                  instance:
                    type: string
                    description: >-
                      This optional key may be present, with a unique URI for
                      the specific error; this will often point to an error log
                      for that specific response.
                  request_id:
                    type: string
                    description: Correlation ID for the original request.
                required:
                  - type
                  - status
                additionalProperties: false
              example:
                status: 401
                type: unauthorized
        '403':
          description: >-
            Forbidden. The caller has been authenticated but is not allowed to
            take the requested action.
          headers:
            upvest-request-id:
              required: true
              schema:
                type: string
                format: uuid
                example: 169ae4c7-ebd7-4041-94da-25369653eba7
          content:
            application/problem+json:
              schema:
                title: Error
                type: object
                description: ''
                properties:
                  type:
                    type: string
                    description: URL to a document describing the error condition.
                  status:
                    type: integer
                    description: >-
                      Transmission of the HTTP status code so that all
                      information can be found in one place, but also to correct
                      changes in the status code due to the use of proxy
                      servers.
                  title:
                    type: string
                    description: >-
                      A short, human-readable title for the general error type;
                      the title should not change for given types.
                  detail:
                    type: string
                    description: A human-readable description of the specific error.
                  instance:
                    type: string
                    description: >-
                      This optional key may be present, with a unique URI for
                      the specific error; this will often point to an error log
                      for that specific response.
                  request_id:
                    type: string
                    description: Correlation ID for the original request.
                required:
                  - type
                  - status
                additionalProperties: false
              example:
                status: 403
                type: forbidden
        '404':
          description: Not Found. The requested resource could not be found.
          headers:
            upvest-request-id:
              required: true
              schema:
                type: string
                format: uuid
                example: 169ae4c7-ebd7-4041-94da-25369653eba7
          content:
            application/problem+json:
              schema:
                title: Error
                type: object
                description: ''
                properties:
                  type:
                    type: string
                    description: URL to a document describing the error condition.
                  status:
                    type: integer
                    description: >-
                      Transmission of the HTTP status code so that all
                      information can be found in one place, but also to correct
                      changes in the status code due to the use of proxy
                      servers.
                  title:
                    type: string
                    description: >-
                      A short, human-readable title for the general error type;
                      the title should not change for given types.
                  detail:
                    type: string
                    description: A human-readable description of the specific error.
                  instance:
                    type: string
                    description: >-
                      This optional key may be present, with a unique URI for
                      the specific error; this will often point to an error log
                      for that specific response.
                  request_id:
                    type: string
                    description: Correlation ID for the original request.
                required:
                  - type
                  - status
                additionalProperties: false
              example:
                status: 404
                type: not_found
        '406':
          description: >-
            Not Acceptable. The resource does not have a current representation
            that would be acceptable to the user agent. "Accept" header defined
            unsupported value.
          headers:
            upvest-request-id:
              required: true
              schema:
                type: string
                format: uuid
                example: 169ae4c7-ebd7-4041-94da-25369653eba7
          content:
            application/problem+json:
              schema:
                title: Error
                type: object
                description: ''
                properties:
                  type:
                    type: string
                    description: URL to a document describing the error condition.
                  status:
                    type: integer
                    description: >-
                      Transmission of the HTTP status code so that all
                      information can be found in one place, but also to correct
                      changes in the status code due to the use of proxy
                      servers.
                  title:
                    type: string
                    description: >-
                      A short, human-readable title for the general error type;
                      the title should not change for given types.
                  detail:
                    type: string
                    description: A human-readable description of the specific error.
                  instance:
                    type: string
                    description: >-
                      This optional key may be present, with a unique URI for
                      the specific error; this will often point to an error log
                      for that specific response.
                  request_id:
                    type: string
                    description: Correlation ID for the original request.
                required:
                  - type
                  - status
                additionalProperties: false
              example:
                status: 406
                type: not_acceptable
        '429':
          description: >-
            Too Many Requests. The caller has exceeded their quota for the time
            period and has been throttled.
          headers:
            upvest-request-id:
              required: true
              schema:
                type: string
                format: uuid
                example: 169ae4c7-ebd7-4041-94da-25369653eba7
          content:
            application/problem+json:
              schema:
                title: Error
                type: object
                description: ''
                properties:
                  type:
                    type: string
                    description: URL to a document describing the error condition.
                  status:
                    type: integer
                    description: >-
                      Transmission of the HTTP status code so that all
                      information can be found in one place, but also to correct
                      changes in the status code due to the use of proxy
                      servers.
                  title:
                    type: string
                    description: >-
                      A short, human-readable title for the general error type;
                      the title should not change for given types.
                  detail:
                    type: string
                    description: A human-readable description of the specific error.
                  instance:
                    type: string
                    description: >-
                      This optional key may be present, with a unique URI for
                      the specific error; this will often point to an error log
                      for that specific response.
                  request_id:
                    type: string
                    description: Correlation ID for the original request.
                required:
                  - type
                  - status
                additionalProperties: false
              example:
                status: 429
                type: too_many_requests
        '500':
          description: Internal Server Error. The service encountered an unexpected error.
          headers:
            upvest-request-id:
              required: true
              schema:
                type: string
                format: uuid
                example: 169ae4c7-ebd7-4041-94da-25369653eba7
          content:
            application/problem+json:
              schema:
                title: Error
                type: object
                description: ''
                properties:
                  type:
                    type: string
                    description: URL to a document describing the error condition.
                  status:
                    type: integer
                    description: >-
                      Transmission of the HTTP status code so that all
                      information can be found in one place, but also to correct
                      changes in the status code due to the use of proxy
                      servers.
                  title:
                    type: string
                    description: >-
                      A short, human-readable title for the general error type;
                      the title should not change for given types.
                  detail:
                    type: string
                    description: A human-readable description of the specific error.
                  instance:
                    type: string
                    description: >-
                      This optional key may be present, with a unique URI for
                      the specific error; this will often point to an error log
                      for that specific response.
                  request_id:
                    type: string
                    description: Correlation ID for the original request.
                required:
                  - type
                  - status
                additionalProperties: false
              example:
                status: 500
                type: internal_server_error
        '503':
          description: >-
            Service Unavailable. The service handling for this request cannot be
            reached at this time.
          headers:
            upvest-request-id:
              required: true
              schema:
                type: string
                format: uuid
                example: 169ae4c7-ebd7-4041-94da-25369653eba7
          content:
            application/problem+json:
              schema:
                title: Error
                type: object
                description: ''
                properties:
                  type:
                    type: string
                    description: URL to a document describing the error condition.
                  status:
                    type: integer
                    description: >-
                      Transmission of the HTTP status code so that all
                      information can be found in one place, but also to correct
                      changes in the status code due to the use of proxy
                      servers.
                  title:
                    type: string
                    description: >-
                      A short, human-readable title for the general error type;
                      the title should not change for given types.
                  detail:
                    type: string
                    description: A human-readable description of the specific error.
                  instance:
                    type: string
                    description: >-
                      This optional key may be present, with a unique URI for
                      the specific error; this will often point to an error log
                      for that specific response.
                  request_id:
                    type: string
                    description: Correlation ID for the original request.
                required:
                  - type
                  - status
                additionalProperties: false
              example:
                status: 503
                type: method_not_allowed
        '504':
          description: >-
            Gateway Timeout. The service gateway has reached its internal
            timeout.
          headers:
            upvest-request-id:
              required: true
              schema:
                type: string
                format: uuid
                example: 169ae4c7-ebd7-4041-94da-25369653eba7
          content:
            application/problem+json:
              schema:
                title: Error
                type: object
                description: ''
                properties:
                  type:
                    type: string
                    description: URL to a document describing the error condition.
                  status:
                    type: integer
                    description: >-
                      Transmission of the HTTP status code so that all
                      information can be found in one place, but also to correct
                      changes in the status code due to the use of proxy
                      servers.
                  title:
                    type: string
                    description: >-
                      A short, human-readable title for the general error type;
                      the title should not change for given types.
                  detail:
                    type: string
                    description: A human-readable description of the specific error.
                  instance:
                    type: string
                    description: >-
                      This optional key may be present, with a unique URI for
                      the specific error; this will often point to an error log
                      for that specific response.
                  request_id:
                    type: string
                    description: Correlation ID for the original request.
                required:
                  - type
                  - status
                additionalProperties: false
              example:
                status: 504
                type: gateway_timeout
  /fees/collections:
    parameters:
      - name: upvest-client-id
        in: header
        description: Tenant Client ID
        required: true
        schema:
          type: string
          format: uuid
          example: ebabcf4d-61c3-4942-875c-e265a7c2d062
      - name: authorization
        in: header
        description: |
          Bearer (access) token from the OAuth flow with correct scopes.
          https://datatracker.ietf.org/doc/html/rfc6750
        required: true
        schema:
          type: string
          pattern: ^Bearer [a-zA-Z0-9\-\._~+/]*=*
          example: Bearer c2VjcmV0Cg==
      - name: signature
        in: header
        required: true
        schema:
          type: string
        description: >-
          https://tools.ietf.org/id/draft-ietf-httpbis-message-signatures-01.html#name-the-signature-http-header
      - name: signature-input
        in: header
        required: true
        schema:
          type: string
        description: >-
          https://tools.ietf.org/id/draft-ietf-httpbis-message-signatures-01.html#name-the-signature-input-http-he
      - name: upvest-api-version
        in: header
        required: false
        schema:
          type: string
          enum:
            - '1'
          default: '1'
          example: '1'
        description: 'Upvest API version (Note: Do not include quotation marks)'
    get:
      operationId: list_fee_collections
      summary: Get fee collections
      description: Returns a list of fee collections.
      tags:
        - Fees
      security:
        - oauth-client-credentials:
            - fees:read
            - fees:admin
      parameters:
        - name: account_id
          in: query
          required: false
          schema:
            title: Account unique identifier.
            type: string
            description: Account unique identifier.
            format: uuid
          description: >-
            Filters the list to show only fees associated with a specific
            account ID.
          example: 413715f2-5401-4b97-8055-034a6b879f8c
        - name: account_group_id
          in: query
          required: false
          schema:
            title: Account group unique identifier.
            type: string
            description: Account group unique identifier.
            format: uuid
          description: >-
            Filters the list to show only fees associated with a specific
            account group ID.
          example: 72da9e41-9926-419f-976e-4c8069a04249
        - name: sort
          in: query
          required: false
          schema:
            type: string
            enum:
              - created_at
              - updated_at
            default: created_at
          description: Field of resource to sort by.
          example: created_at
        - name: order
          in: query
          required: false
          schema:
            type: string
            enum:
              - ASC
              - DESC
            default: ASC
          description: >-
            Sort order of the result list if the `sort` parameter is specified.
            Use `ASC` for ascending or `DESC` for descending sort order.
        - name: offset
          in: query
          schema:
            type: integer
            minimum: 0
            format: int32
          allowEmptyValue: true
          description: >-
            Use the `offset` argument to specify where in the list of results to
            start when returning items for a particular query.
        - name: limit
          in: query
          schema:
            type: integer
            format: int32
            default: 100
            minimum: 0
            maximum: 1000
          allowEmptyValue: true
          description: >-
            Use the `limit` argument to specify the maximum number of items
            returned.
      responses:
        '200':
          description: OK
          headers:
            upvest-request-id:
              required: true
              schema:
                type: string
                format: uuid
                example: 169ae4c7-ebd7-4041-94da-25369653eba7
          content:
            application/json:
              schema:
                title: Fee Collection - List - Response
                type: object
                properties:
                  meta:
                    type: object
                    properties:
                      offset:
                        type: integer
                        description: Amount of resource to offset in the response.
                      limit:
                        type: integer
                        description: Total limit of the response.
                      count:
                        type: integer
                        description: Count of the resources returned in the response.
                      total_count:
                        type: integer
                        description: Total count of all the resources.
                      sort:
                        type: string
                        description: The field that the list is sorted by.
                      order:
                        type: string
                        description: |-
                          The ordering of the response.
                          * ASC - Ascending order
                          * DESC - Descending order
                        enum:
                          - ASC
                          - DESC
                    required:
                      - offset
                      - limit
                      - count
                      - total_count
                  data:
                    type: array
                    items:
                      title: Fee Collection
                      type: object
                      properties:
                        id:
                          title: Fee collection unique identifier.
                          type: string
                          description: Fee collection unique identifier.
                          format: uuid
                        created_at:
                          type: string
                          format: date-time
                          description: >-
                            Date and time when the resource was created. [RFC
                            3339-5](https://datatracker.ietf.org/doc/html/rfc3339#section-5.6),
                            [ISO8601
                            UTC](https://www.iso.org/iso-8601-date-and-time-format.html)
                        updated_at:
                          type: string
                          format: date-time
                          description: >-
                            Date and time when the resource was last updated.
                            [RFC
                            3339-5](https://datatracker.ietf.org/doc/html/rfc3339#section-5.6),
                            [ISO8601
                            UTC](https://www.iso.org/iso-8601-date-and-time-format.html)
                        account_id:
                          title: Account unique identifier.
                          type: string
                          description: Account unique identifier.
                          format: uuid
                        account_group_id:
                          title: Account group unique identifier.
                          type: string
                          description: Account group unique identifier.
                          format: uuid
                        type:
                          type: string
                          description: >-
                            Type of the fee collection

                            * SERVICE_FEE - Service fee intake in a pre-defined
                            cadence (e.g. monthly)

                            * SERVICE_FEE_LIQUIDATION - Service fee intake as a
                            result of a Portfolio liquidation
                          enum:
                            - SERVICE_FEE
                            - SERVICE_FEE_LIQUIDATION
                        collection_amount:
                          type: string
                          pattern: ^[0-9]{1,9}(\.[0-9]{2})?$
                        processed_amount:
                          type: object
                          properties:
                            cash_balance:
                              type: string
                              pattern: ^[0-9]{1,9}(\.[0-9]{2})?$
                            sell_to_cover:
                              type: string
                              pattern: ^[0-9]{1,9}(\.[0-9]{2})?$
                        currency:
                          type: string
                          description: >-
                            Alphabetic three-letter [ISO
                            4217](https://en.wikipedia.org/wiki/ISO_4217)
                            currency code.

                            * EUR - Euro
                          enum:
                            - EUR
                          default: EUR
                        status:
                          type: string
                          description: >-
                            Status of the fee collection

                            * PROCESSING - Fee collection is in progress.

                            * FINALISED - Fees have been collected from the
                            account and the funds has been transferred to the
                            client.

                            * CANCELLED - Fee collection has been cancelled.
                          enum:
                            - PROCESSING
                            - FINALISED
                            - CANCELLED
                        period_start:
                          type: string
                          format: date
                          description: >-
                            Start date of the fee collection period in
                            YYYY-MM-DD format. [RFC 3339, section
                            5.6](https://json-schema.org/draft/2020-12/json-schema-validation.html#RFC3339)
                            RFC 3339
                        period_end:
                          type: string
                          format: date
                          description: >-
                            End date of the fee collection period in YYYY-MM-DD
                            format. [RFC 3339, section
                            5.6](https://json-schema.org/draft/2020-12/json-schema-validation.html#RFC3339)
                            RFC 3339
                      required:
                        - id
                        - account_id
                        - account_group_id
                        - type
                        - collection_amount
                        - processed_amount
                        - currency
                        - status
                        - period_start
                        - period_end
                        - created_at
                        - updated_at
                      additionalProperties: false
                required:
                  - meta
                  - data
                additionalProperties: false
              example:
                meta:
                  offset: 0
                  limit: 100
                  count: 3
                  total_count: 3
                  sort: id
                  order: ASC
                data:
                  - id: d77e6924-9bb7-4db0-addc-404442258f4b
                    created_at: '2022-11-30T14:16:22Z'
                    updated_at: '2022-11-30T14:16:22Z'
                    account_id: 689f7566-2ca3-4007-b99d-e501be8c7783
                    account_group_id: 999f7566-2ca3-4007-b99d-e501be8c7222
                    type: SERVICE_FEE
                    collection_amount: '12.41'
                    processed_amount:
                      cash_balance: '6.50'
                      sell_to_cover: '0'
                    currency: EUR
                    status: PROCESSING
                    period_start: '2022-11-01'
                    period_end: '2022-11-30'
                  - id: 7c5f2b11-7078-4bb9-8ed8-9dcf5eb7597f
                    created_at: '2022-11-30T14:16:22Z'
                    updated_at: '2022-11-30T14:16:22Z'
                    account_id: 5b8b1e66-cf3c-40f3-94d3-c94f2ac7abb7
                    account_group_id: 87805651-ad25-4a85-8c04-88a666164ad4
                    type: SERVICE_FEE
                    collection_amount: '82.12'
                    processed_amount:
                      cash_balance: '40.00'
                      sell_to_cover: '42.12'
                    currency: EUR
                    status: FINALISED
                    period_start: '2022-09-01'
                    period_end: '2022-12-31'
                  - id: 85fba2a0-da2f-46ac-a2a8-b4e7c66cb375
                    created_at: '2022-11-30T14:16:22Z'
                    updated_at: '2022-11-30T14:16:22Z'
                    account_id: c28b6611-7ac1-405a-8eb7-ab3b35caccc2
                    account_group_id: f930f9d4-3e21-4ad5-a266-730821d9a9fc
                    type: SERVICE_FEE_LIQUIDATION
                    collection_amount: '65.30'
                    processed_amount:
                      cash_balance: '0.00'
                      sell_to_cover: '0.00'
                    currency: EUR
                    status: CANCELLED
                    period_start: '2022-03-01'
                    period_end: '2022-07-30'
        '400':
          description: Bad Request. The incoming request had a malformed parameter/object.
          headers:
            upvest-request-id:
              required: true
              schema:
                type: string
                format: uuid
                example: 169ae4c7-ebd7-4041-94da-25369653eba7
          content:
            application/problem+json:
              schema:
                title: Error
                type: object
                description: ''
                properties:
                  type:
                    type: string
                    description: URL to a document describing the error condition.
                  status:
                    type: integer
                    description: >-
                      Transmission of the HTTP status code so that all
                      information can be found in one place, but also to correct
                      changes in the status code due to the use of proxy
                      servers.
                  title:
                    type: string
                    description: >-
                      A short, human-readable title for the general error type;
                      the title should not change for given types.
                  detail:
                    type: string
                    description: A human-readable description of the specific error.
                  instance:
                    type: string
                    description: >-
                      This optional key may be present, with a unique URI for
                      the specific error; this will often point to an error log
                      for that specific response.
                  request_id:
                    type: string
                    description: Correlation ID for the original request.
                required:
                  - type
                  - status
                additionalProperties: false
              example:
                status: 400
                type: bad_request
        '401':
          description: Unauthorized. The caller has not been authenticated.
          headers:
            upvest-request-id:
              required: true
              schema:
                type: string
                format: uuid
                example: 169ae4c7-ebd7-4041-94da-25369653eba7
          content:
            application/problem+json:
              schema:
                title: Error
                type: object
                description: ''
                properties:
                  type:
                    type: string
                    description: URL to a document describing the error condition.
                  status:
                    type: integer
                    description: >-
                      Transmission of the HTTP status code so that all
                      information can be found in one place, but also to correct
                      changes in the status code due to the use of proxy
                      servers.
                  title:
                    type: string
                    description: >-
                      A short, human-readable title for the general error type;
                      the title should not change for given types.
                  detail:
                    type: string
                    description: A human-readable description of the specific error.
                  instance:
                    type: string
                    description: >-
                      This optional key may be present, with a unique URI for
                      the specific error; this will often point to an error log
                      for that specific response.
                  request_id:
                    type: string
                    description: Correlation ID for the original request.
                required:
                  - type
                  - status
                additionalProperties: false
              example:
                status: 401
                type: unauthorized
        '403':
          description: >-
            Forbidden. The caller has been authenticated but is not allowed to
            take the requested action.
          headers:
            upvest-request-id:
              required: true
              schema:
                type: string
                format: uuid
                example: 169ae4c7-ebd7-4041-94da-25369653eba7
          content:
            application/problem+json:
              schema:
                title: Error
                type: object
                description: ''
                properties:
                  type:
                    type: string
                    description: URL to a document describing the error condition.
                  status:
                    type: integer
                    description: >-
                      Transmission of the HTTP status code so that all
                      information can be found in one place, but also to correct
                      changes in the status code due to the use of proxy
                      servers.
                  title:
                    type: string
                    description: >-
                      A short, human-readable title for the general error type;
                      the title should not change for given types.
                  detail:
                    type: string
                    description: A human-readable description of the specific error.
                  instance:
                    type: string
                    description: >-
                      This optional key may be present, with a unique URI for
                      the specific error; this will often point to an error log
                      for that specific response.
                  request_id:
                    type: string
                    description: Correlation ID for the original request.
                required:
                  - type
                  - status
                additionalProperties: false
              example:
                status: 403
                type: forbidden
        '406':
          description: >-
            Not Acceptable. The resource does not have a current representation
            that would be acceptable to the user agent. "Accept" header defined
            unsupported value.
          headers:
            upvest-request-id:
              required: true
              schema:
                type: string
                format: uuid
                example: 169ae4c7-ebd7-4041-94da-25369653eba7
          content:
            application/problem+json:
              schema:
                title: Error
                type: object
                description: ''
                properties:
                  type:
                    type: string
                    description: URL to a document describing the error condition.
                  status:
                    type: integer
                    description: >-
                      Transmission of the HTTP status code so that all
                      information can be found in one place, but also to correct
                      changes in the status code due to the use of proxy
                      servers.
                  title:
                    type: string
                    description: >-
                      A short, human-readable title for the general error type;
                      the title should not change for given types.
                  detail:
                    type: string
                    description: A human-readable description of the specific error.
                  instance:
                    type: string
                    description: >-
                      This optional key may be present, with a unique URI for
                      the specific error; this will often point to an error log
                      for that specific response.
                  request_id:
                    type: string
                    description: Correlation ID for the original request.
                required:
                  - type
                  - status
                additionalProperties: false
              example:
                status: 406
                type: not_acceptable
        '429':
          description: >-
            Too Many Requests. The caller has exceeded their quota for the time
            period and has been throttled.
          headers:
            upvest-request-id:
              required: true
              schema:
                type: string
                format: uuid
                example: 169ae4c7-ebd7-4041-94da-25369653eba7
          content:
            application/problem+json:
              schema:
                title: Error
                type: object
                description: ''
                properties:
                  type:
                    type: string
                    description: URL to a document describing the error condition.
                  status:
                    type: integer
                    description: >-
                      Transmission of the HTTP status code so that all
                      information can be found in one place, but also to correct
                      changes in the status code due to the use of proxy
                      servers.
                  title:
                    type: string
                    description: >-
                      A short, human-readable title for the general error type;
                      the title should not change for given types.
                  detail:
                    type: string
                    description: A human-readable description of the specific error.
                  instance:
                    type: string
                    description: >-
                      This optional key may be present, with a unique URI for
                      the specific error; this will often point to an error log
                      for that specific response.
                  request_id:
                    type: string
                    description: Correlation ID for the original request.
                required:
                  - type
                  - status
                additionalProperties: false
              example:
                status: 429
                type: too_many_requests
        '500':
          description: Internal Server Error. The service encountered an unexpected error.
          headers:
            upvest-request-id:
              required: true
              schema:
                type: string
                format: uuid
                example: 169ae4c7-ebd7-4041-94da-25369653eba7
          content:
            application/problem+json:
              schema:
                title: Error
                type: object
                description: ''
                properties:
                  type:
                    type: string
                    description: URL to a document describing the error condition.
                  status:
                    type: integer
                    description: >-
                      Transmission of the HTTP status code so that all
                      information can be found in one place, but also to correct
                      changes in the status code due to the use of proxy
                      servers.
                  title:
                    type: string
                    description: >-
                      A short, human-readable title for the general error type;
                      the title should not change for given types.
                  detail:
                    type: string
                    description: A human-readable description of the specific error.
                  instance:
                    type: string
                    description: >-
                      This optional key may be present, with a unique URI for
                      the specific error; this will often point to an error log
                      for that specific response.
                  request_id:
                    type: string
                    description: Correlation ID for the original request.
                required:
                  - type
                  - status
                additionalProperties: false
              example:
                status: 500
                type: internal_server_error
        '503':
          description: >-
            Service Unavailable. The service handling for this request cannot be
            reached at this time.
          headers:
            upvest-request-id:
              required: true
              schema:
                type: string
                format: uuid
                example: 169ae4c7-ebd7-4041-94da-25369653eba7
          content:
            application/problem+json:
              schema:
                title: Error
                type: object
                description: ''
                properties:
                  type:
                    type: string
                    description: URL to a document describing the error condition.
                  status:
                    type: integer
                    description: >-
                      Transmission of the HTTP status code so that all
                      information can be found in one place, but also to correct
                      changes in the status code due to the use of proxy
                      servers.
                  title:
                    type: string
                    description: >-
                      A short, human-readable title for the general error type;
                      the title should not change for given types.
                  detail:
                    type: string
                    description: A human-readable description of the specific error.
                  instance:
                    type: string
                    description: >-
                      This optional key may be present, with a unique URI for
                      the specific error; this will often point to an error log
                      for that specific response.
                  request_id:
                    type: string
                    description: Correlation ID for the original request.
                required:
                  - type
                  - status
                additionalProperties: false
              example:
                status: 503
                type: method_not_allowed
        '504':
          description: >-
            Gateway Timeout. The service gateway has reached its internal
            timeout.
          headers:
            upvest-request-id:
              required: true
              schema:
                type: string
                format: uuid
                example: 169ae4c7-ebd7-4041-94da-25369653eba7
          content:
            application/problem+json:
              schema:
                title: Error
                type: object
                description: ''
                properties:
                  type:
                    type: string
                    description: URL to a document describing the error condition.
                  status:
                    type: integer
                    description: >-
                      Transmission of the HTTP status code so that all
                      information can be found in one place, but also to correct
                      changes in the status code due to the use of proxy
                      servers.
                  title:
                    type: string
                    description: >-
                      A short, human-readable title for the general error type;
                      the title should not change for given types.
                  detail:
                    type: string
                    description: A human-readable description of the specific error.
                  instance:
                    type: string
                    description: >-
                      This optional key may be present, with a unique URI for
                      the specific error; this will often point to an error log
                      for that specific response.
                  request_id:
                    type: string
                    description: Correlation ID for the original request.
                required:
                  - type
                  - status
                additionalProperties: false
              example:
                status: 504
                type: gateway_timeout
    post:
      operationId: create_fee_collection
      summary: Create a fee collection
      description: Creates a fee collection for pre-calculated fee amounts.
      tags:
        - Fees
      security:
        - oauth-client-credentials:
            - fees:admin
      parameters:
        - name: idempotency-key
          in: header
          required: true
          schema:
            type: string
            format: uuid
            pattern: >-
              ^[0-9a-fA-F]{8}-?[0-9a-fA-F]{4}-?[0-5][0-9a-fA-F]{3}-?[089abAB][0-9a-fA-F]{3}-?[0-9a-fA-F]{12}$
            example: ccb07f42-4104-44ad-8e1f-c660bb7b269c
          description: >
            A UUID to be used as an idempotency key.  This prevents a duplicate
            request from being replayed.

            https://docs.upvest.co/documentation/concepts/api_concepts/idempotency
      requestBody:
        content:
          application/json:
            schema:
              title: Fee Collection - Create - Request
              type: object
              properties:
                account_id:
                  title: Account unique identifier.
                  type: string
                  description: Account unique identifier.
                  format: uuid
                type:
                  type: string
                  description: >-
                    Type of the fee collection

                    * SERVICE_FEE - Service fee intake in a pre-defined cadence
                    (e.g. monthly)

                    * SERVICE_FEE_LIQUIDATION - Service fee intake as a result
                    of a Portfolio liquidation
                  enum:
                    - SERVICE_FEE
                    - SERVICE_FEE_LIQUIDATION
                collection_amount:
                  type: string
                  pattern: ^[0-9]{1,9}(\.[0-9]{2})?$
                currency:
                  type: string
                  description: >-
                    Alphabetic three-letter [ISO
                    4217](https://en.wikipedia.org/wiki/ISO_4217) currency code.

                    * EUR - Euro
                  enum:
                    - EUR
                  default: EUR
                period_start:
                  type: string
                  format: date
                  description: >-
                    Start date of the fee collection period in YYYY-MM-DD
                    format. [RFC 3339, section
                    5.6](https://json-schema.org/draft/2020-12/json-schema-validation.html#RFC3339)
                    RFC 3339
                period_end:
                  type: string
                  format: date
                  description: >-
                    End date of the fee collection period in YYYY-MM-DD format.
                    [RFC 3339, section
                    5.6](https://json-schema.org/draft/2020-12/json-schema-validation.html#RFC3339)
                    RFC 3339
              required:
                - account_id
                - type
                - collection_amount
                - currency
                - period_start
                - period_end
              additionalProperties: false
            example:
              account_id: 689f7566-2ca3-4007-b99d-e501be8c7783
              type: SERVICE_FEE
              collection_amount: '12.41'
              currency: EUR
              period_start: '2022-11-01'
              period_end: '2022-11-30'
      responses:
        '200':
          description: Fee collection created.
          headers:
            upvest-request-id:
              required: true
              schema:
                type: string
                format: uuid
                example: 169ae4c7-ebd7-4041-94da-25369653eba7
          content:
            application/json:
              schema:
                title: Fee Collection
                type: object
                properties:
                  id:
                    title: Fee collection unique identifier.
                    type: string
                    description: Fee collection unique identifier.
                    format: uuid
                  created_at:
                    type: string
                    format: date-time
                    description: >-
                      Date and time when the resource was created. [RFC
                      3339-5](https://datatracker.ietf.org/doc/html/rfc3339#section-5.6),
                      [ISO8601
                      UTC](https://www.iso.org/iso-8601-date-and-time-format.html)
                  updated_at:
                    type: string
                    format: date-time
                    description: >-
                      Date and time when the resource was last updated. [RFC
                      3339-5](https://datatracker.ietf.org/doc/html/rfc3339#section-5.6),
                      [ISO8601
                      UTC](https://www.iso.org/iso-8601-date-and-time-format.html)
                  account_id:
                    title: Account unique identifier.
                    type: string
                    description: Account unique identifier.
                    format: uuid
                  account_group_id:
                    title: Account group unique identifier.
                    type: string
                    description: Account group unique identifier.
                    format: uuid
                  type:
                    type: string
                    description: >-
                      Type of the fee collection

                      * SERVICE_FEE - Service fee intake in a pre-defined
                      cadence (e.g. monthly)

                      * SERVICE_FEE_LIQUIDATION - Service fee intake as a result
                      of a Portfolio liquidation
                    enum:
                      - SERVICE_FEE
                      - SERVICE_FEE_LIQUIDATION
                  collection_amount:
                    type: string
                    pattern: ^[0-9]{1,9}(\.[0-9]{2})?$
                  processed_amount:
                    type: object
                    properties:
                      cash_balance:
                        type: string
                        pattern: ^[0-9]{1,9}(\.[0-9]{2})?$
                      sell_to_cover:
                        type: string
                        pattern: ^[0-9]{1,9}(\.[0-9]{2})?$
                  currency:
                    type: string
                    description: >-
                      Alphabetic three-letter [ISO
                      4217](https://en.wikipedia.org/wiki/ISO_4217) currency
                      code.

                      * EUR - Euro
                    enum:
                      - EUR
                    default: EUR
                  status:
                    type: string
                    description: >-
                      Status of the fee collection

                      * PROCESSING - Fee collection is in progress.

                      * FINALISED - Fees have been collected from the account
                      and the funds has been transferred to the client.

                      * CANCELLED - Fee collection has been cancelled.
                    enum:
                      - PROCESSING
                      - FINALISED
                      - CANCELLED
                  period_start:
                    type: string
                    format: date
                    description: >-
                      Start date of the fee collection period in YYYY-MM-DD
                      format. [RFC 3339, section
                      5.6](https://json-schema.org/draft/2020-12/json-schema-validation.html#RFC3339)
                      RFC 3339
                  period_end:
                    type: string
                    format: date
                    description: >-
                      End date of the fee collection period in YYYY-MM-DD
                      format. [RFC 3339, section
                      5.6](https://json-schema.org/draft/2020-12/json-schema-validation.html#RFC3339)
                      RFC 3339
                required:
                  - id
                  - account_id
                  - account_group_id
                  - type
                  - collection_amount
                  - processed_amount
                  - currency
                  - status
                  - period_start
                  - period_end
                  - created_at
                  - updated_at
                additionalProperties: false
              example:
                id: d77e6924-9bb7-4db0-addc-404442258f4b
                created_at: '2022-11-30T14:16:22Z'
                updated_at: '2022-11-30T14:16:22Z'
                account_id: 689f7566-2ca3-4007-b99d-e501be8c7783
                account_group_id: 999f7566-2ca3-4007-b99d-e501be8c7222
                type: SERVICE_FEE
                collection_amount: '12.41'
                processed_amount:
                  cash_balance: '6.50'
                  sell_to_cover: '0'
                currency: EUR
                status: PROCESSING
                period_start: '2022-11-01'
                period_end: '2022-11-30'
        '400':
          description: Bad Request. The incoming request had a malformed parameter/object.
          headers:
            upvest-request-id:
              required: true
              schema:
                type: string
                format: uuid
                example: 169ae4c7-ebd7-4041-94da-25369653eba7
          content:
            application/problem+json:
              schema:
                title: Error
                type: object
                description: ''
                properties:
                  type:
                    type: string
                    description: URL to a document describing the error condition.
                  status:
                    type: integer
                    description: >-
                      Transmission of the HTTP status code so that all
                      information can be found in one place, but also to correct
                      changes in the status code due to the use of proxy
                      servers.
                  title:
                    type: string
                    description: >-
                      A short, human-readable title for the general error type;
                      the title should not change for given types.
                  detail:
                    type: string
                    description: A human-readable description of the specific error.
                  instance:
                    type: string
                    description: >-
                      This optional key may be present, with a unique URI for
                      the specific error; this will often point to an error log
                      for that specific response.
                  request_id:
                    type: string
                    description: Correlation ID for the original request.
                required:
                  - type
                  - status
                additionalProperties: false
              example:
                status: 400
                type: bad_request
        '401':
          description: Unauthorized. The caller has not been authenticated.
          headers:
            upvest-request-id:
              required: true
              schema:
                type: string
                format: uuid
                example: 169ae4c7-ebd7-4041-94da-25369653eba7
          content:
            application/problem+json:
              schema:
                title: Error
                type: object
                description: ''
                properties:
                  type:
                    type: string
                    description: URL to a document describing the error condition.
                  status:
                    type: integer
                    description: >-
                      Transmission of the HTTP status code so that all
                      information can be found in one place, but also to correct
                      changes in the status code due to the use of proxy
                      servers.
                  title:
                    type: string
                    description: >-
                      A short, human-readable title for the general error type;
                      the title should not change for given types.
                  detail:
                    type: string
                    description: A human-readable description of the specific error.
                  instance:
                    type: string
                    description: >-
                      This optional key may be present, with a unique URI for
                      the specific error; this will often point to an error log
                      for that specific response.
                  request_id:
                    type: string
                    description: Correlation ID for the original request.
                required:
                  - type
                  - status
                additionalProperties: false
              example:
                status: 401
                type: unauthorized
        '403':
          description: >-
            Forbidden. The caller has been authenticated but is not allowed to
            take the requested action.
          headers:
            upvest-request-id:
              required: true
              schema:
                type: string
                format: uuid
                example: 169ae4c7-ebd7-4041-94da-25369653eba7
          content:
            application/problem+json:
              schema:
                title: Error
                type: object
                description: ''
                properties:
                  type:
                    type: string
                    description: URL to a document describing the error condition.
                  status:
                    type: integer
                    description: >-
                      Transmission of the HTTP status code so that all
                      information can be found in one place, but also to correct
                      changes in the status code due to the use of proxy
                      servers.
                  title:
                    type: string
                    description: >-
                      A short, human-readable title for the general error type;
                      the title should not change for given types.
                  detail:
                    type: string
                    description: A human-readable description of the specific error.
                  instance:
                    type: string
                    description: >-
                      This optional key may be present, with a unique URI for
                      the specific error; this will often point to an error log
                      for that specific response.
                  request_id:
                    type: string
                    description: Correlation ID for the original request.
                required:
                  - type
                  - status
                additionalProperties: false
              example:
                status: 403
                type: forbidden
        '404':
          description: Not Found. The requested resource could not be found.
          headers:
            upvest-request-id:
              required: true
              schema:
                type: string
                format: uuid
                example: 169ae4c7-ebd7-4041-94da-25369653eba7
          content:
            application/problem+json:
              schema:
                title: Error
                type: object
                description: ''
                properties:
                  type:
                    type: string
                    description: URL to a document describing the error condition.
                  status:
                    type: integer
                    description: >-
                      Transmission of the HTTP status code so that all
                      information can be found in one place, but also to correct
                      changes in the status code due to the use of proxy
                      servers.
                  title:
                    type: string
                    description: >-
                      A short, human-readable title for the general error type;
                      the title should not change for given types.
                  detail:
                    type: string
                    description: A human-readable description of the specific error.
                  instance:
                    type: string
                    description: >-
                      This optional key may be present, with a unique URI for
                      the specific error; this will often point to an error log
                      for that specific response.
                  request_id:
                    type: string
                    description: Correlation ID for the original request.
                required:
                  - type
                  - status
                additionalProperties: false
              example:
                status: 404
                type: not_found
        '406':
          description: >-
            Not Acceptable. The resource does not have a current representation
            that would be acceptable to the user agent. "Accept" header defined
            unsupported value.
          headers:
            upvest-request-id:
              required: true
              schema:
                type: string
                format: uuid
                example: 169ae4c7-ebd7-4041-94da-25369653eba7
          content:
            application/problem+json:
              schema:
                title: Error
                type: object
                description: ''
                properties:
                  type:
                    type: string
                    description: URL to a document describing the error condition.
                  status:
                    type: integer
                    description: >-
                      Transmission of the HTTP status code so that all
                      information can be found in one place, but also to correct
                      changes in the status code due to the use of proxy
                      servers.
                  title:
                    type: string
                    description: >-
                      A short, human-readable title for the general error type;
                      the title should not change for given types.
                  detail:
                    type: string
                    description: A human-readable description of the specific error.
                  instance:
                    type: string
                    description: >-
                      This optional key may be present, with a unique URI for
                      the specific error; this will often point to an error log
                      for that specific response.
                  request_id:
                    type: string
                    description: Correlation ID for the original request.
                required:
                  - type
                  - status
                additionalProperties: false
              example:
                status: 406
                type: not_acceptable
        '429':
          description: >-
            Too Many Requests. The caller has exceeded their quota for the time
            period and has been throttled.
          headers:
            upvest-request-id:
              required: true
              schema:
                type: string
                format: uuid
                example: 169ae4c7-ebd7-4041-94da-25369653eba7
          content:
            application/problem+json:
              schema:
                title: Error
                type: object
                description: ''
                properties:
                  type:
                    type: string
                    description: URL to a document describing the error condition.
                  status:
                    type: integer
                    description: >-
                      Transmission of the HTTP status code so that all
                      information can be found in one place, but also to correct
                      changes in the status code due to the use of proxy
                      servers.
                  title:
                    type: string
                    description: >-
                      A short, human-readable title for the general error type;
                      the title should not change for given types.
                  detail:
                    type: string
                    description: A human-readable description of the specific error.
                  instance:
                    type: string
                    description: >-
                      This optional key may be present, with a unique URI for
                      the specific error; this will often point to an error log
                      for that specific response.
                  request_id:
                    type: string
                    description: Correlation ID for the original request.
                required:
                  - type
                  - status
                additionalProperties: false
              example:
                status: 429
                type: too_many_requests
        '500':
          description: Internal Server Error. The service encountered an unexpected error.
          headers:
            upvest-request-id:
              required: true
              schema:
                type: string
                format: uuid
                example: 169ae4c7-ebd7-4041-94da-25369653eba7
          content:
            application/problem+json:
              schema:
                title: Error
                type: object
                description: ''
                properties:
                  type:
                    type: string
                    description: URL to a document describing the error condition.
                  status:
                    type: integer
                    description: >-
                      Transmission of the HTTP status code so that all
                      information can be found in one place, but also to correct
                      changes in the status code due to the use of proxy
                      servers.
                  title:
                    type: string
                    description: >-
                      A short, human-readable title for the general error type;
                      the title should not change for given types.
                  detail:
                    type: string
                    description: A human-readable description of the specific error.
                  instance:
                    type: string
                    description: >-
                      This optional key may be present, with a unique URI for
                      the specific error; this will often point to an error log
                      for that specific response.
                  request_id:
                    type: string
                    description: Correlation ID for the original request.
                required:
                  - type
                  - status
                additionalProperties: false
              example:
                status: 500
                type: internal_server_error
        '503':
          description: >-
            Service Unavailable. The service handling for this request cannot be
            reached at this time.
          headers:
            upvest-request-id:
              required: true
              schema:
                type: string
                format: uuid
                example: 169ae4c7-ebd7-4041-94da-25369653eba7
          content:
            application/problem+json:
              schema:
                title: Error
                type: object
                description: ''
                properties:
                  type:
                    type: string
                    description: URL to a document describing the error condition.
                  status:
                    type: integer
                    description: >-
                      Transmission of the HTTP status code so that all
                      information can be found in one place, but also to correct
                      changes in the status code due to the use of proxy
                      servers.
                  title:
                    type: string
                    description: >-
                      A short, human-readable title for the general error type;
                      the title should not change for given types.
                  detail:
                    type: string
                    description: A human-readable description of the specific error.
                  instance:
                    type: string
                    description: >-
                      This optional key may be present, with a unique URI for
                      the specific error; this will often point to an error log
                      for that specific response.
                  request_id:
                    type: string
                    description: Correlation ID for the original request.
                required:
                  - type
                  - status
                additionalProperties: false
              example:
                status: 503
                type: method_not_allowed
        '504':
          description: >-
            Gateway Timeout. The service gateway has reached its internal
            timeout.
          headers:
            upvest-request-id:
              required: true
              schema:
                type: string
                format: uuid
                example: 169ae4c7-ebd7-4041-94da-25369653eba7
          content:
            application/problem+json:
              schema:
                title: Error
                type: object
                description: ''
                properties:
                  type:
                    type: string
                    description: URL to a document describing the error condition.
                  status:
                    type: integer
                    description: >-
                      Transmission of the HTTP status code so that all
                      information can be found in one place, but also to correct
                      changes in the status code due to the use of proxy
                      servers.
                  title:
                    type: string
                    description: >-
                      A short, human-readable title for the general error type;
                      the title should not change for given types.
                  detail:
                    type: string
                    description: A human-readable description of the specific error.
                  instance:
                    type: string
                    description: >-
                      This optional key may be present, with a unique URI for
                      the specific error; this will often point to an error log
                      for that specific response.
                  request_id:
                    type: string
                    description: Correlation ID for the original request.
                required:
                  - type
                  - status
                additionalProperties: false
              example:
                status: 504
                type: gateway_timeout
  /fees/collections/{fee_collection_id}:
    parameters:
      - name: fee_collection_id
        in: path
        required: true
        schema:
          title: Fee collection unique identifier.
          type: string
          description: Fee collection unique identifier.
          format: uuid
      - name: upvest-client-id
        in: header
        description: Tenant Client ID
        required: true
        schema:
          type: string
          format: uuid
          example: ebabcf4d-61c3-4942-875c-e265a7c2d062
      - name: authorization
        in: header
        description: |
          Bearer (access) token from the OAuth flow with correct scopes.
          https://datatracker.ietf.org/doc/html/rfc6750
        required: true
        schema:
          type: string
          pattern: ^Bearer [a-zA-Z0-9\-\._~+/]*=*
          example: Bearer c2VjcmV0Cg==
      - name: signature
        in: header
        required: true
        schema:
          type: string
        description: >-
          https://tools.ietf.org/id/draft-ietf-httpbis-message-signatures-01.html#name-the-signature-http-header
      - name: signature-input
        in: header
        required: true
        schema:
          type: string
        description: >-
          https://tools.ietf.org/id/draft-ietf-httpbis-message-signatures-01.html#name-the-signature-input-http-he
      - name: upvest-api-version
        in: header
        required: false
        schema:
          type: string
          enum:
            - '1'
          default: '1'
          example: '1'
        description: 'Upvest API version (Note: Do not include quotation marks)'
    get:
      operationId: retrieve_fee_collection
      summary: Get a fee collection by ID
      description: Returns the fee collection specified by its ID.
      tags:
        - Fees
      security:
        - oauth-client-credentials:
            - fees:read
            - fees:admin
      responses:
        '200':
          description: OK
          headers:
            upvest-request-id:
              required: true
              schema:
                type: string
                format: uuid
                example: 169ae4c7-ebd7-4041-94da-25369653eba7
          content:
            application/json:
              schema:
                title: Fee Collection
                type: object
                properties:
                  id:
                    title: Fee collection unique identifier.
                    type: string
                    description: Fee collection unique identifier.
                    format: uuid
                  created_at:
                    type: string
                    format: date-time
                    description: >-
                      Date and time when the resource was created. [RFC
                      3339-5](https://datatracker.ietf.org/doc/html/rfc3339#section-5.6),
                      [ISO8601
                      UTC](https://www.iso.org/iso-8601-date-and-time-format.html)
                  updated_at:
                    type: string
                    format: date-time
                    description: >-
                      Date and time when the resource was last updated. [RFC
                      3339-5](https://datatracker.ietf.org/doc/html/rfc3339#section-5.6),
                      [ISO8601
                      UTC](https://www.iso.org/iso-8601-date-and-time-format.html)
                  account_id:
                    title: Account unique identifier.
                    type: string
                    description: Account unique identifier.
                    format: uuid
                  account_group_id:
                    title: Account group unique identifier.
                    type: string
                    description: Account group unique identifier.
                    format: uuid
                  type:
                    type: string
                    description: >-
                      Type of the fee collection

                      * SERVICE_FEE - Service fee intake in a pre-defined
                      cadence (e.g. monthly)

                      * SERVICE_FEE_LIQUIDATION - Service fee intake as a result
                      of a Portfolio liquidation
                    enum:
                      - SERVICE_FEE
                      - SERVICE_FEE_LIQUIDATION
                  collection_amount:
                    type: string
                    pattern: ^[0-9]{1,9}(\.[0-9]{2})?$
                  processed_amount:
                    type: object
                    properties:
                      cash_balance:
                        type: string
                        pattern: ^[0-9]{1,9}(\.[0-9]{2})?$
                      sell_to_cover:
                        type: string
                        pattern: ^[0-9]{1,9}(\.[0-9]{2})?$
                  currency:
                    type: string
                    description: >-
                      Alphabetic three-letter [ISO
                      4217](https://en.wikipedia.org/wiki/ISO_4217) currency
                      code.

                      * EUR - Euro
                    enum:
                      - EUR
                    default: EUR
                  status:
                    type: string
                    description: >-
                      Status of the fee collection

                      * PROCESSING - Fee collection is in progress.

                      * FINALISED - Fees have been collected from the account
                      and the funds has been transferred to the client.

                      * CANCELLED - Fee collection has been cancelled.
                    enum:
                      - PROCESSING
                      - FINALISED
                      - CANCELLED
                  period_start:
                    type: string
                    format: date
                    description: >-
                      Start date of the fee collection period in YYYY-MM-DD
                      format. [RFC 3339, section
                      5.6](https://json-schema.org/draft/2020-12/json-schema-validation.html#RFC3339)
                      RFC 3339
                  period_end:
                    type: string
                    format: date
                    description: >-
                      End date of the fee collection period in YYYY-MM-DD
                      format. [RFC 3339, section
                      5.6](https://json-schema.org/draft/2020-12/json-schema-validation.html#RFC3339)
                      RFC 3339
                required:
                  - id
                  - account_id
                  - account_group_id
                  - type
                  - collection_amount
                  - processed_amount
                  - currency
                  - status
                  - period_start
                  - period_end
                  - created_at
                  - updated_at
                additionalProperties: false
              example:
                id: d77e6924-9bb7-4db0-addc-404442258f4b
                created_at: '2022-11-30T14:16:22Z'
                updated_at: '2022-11-30T14:16:22Z'
                account_id: 689f7566-2ca3-4007-b99d-e501be8c7783
                account_group_id: 999f7566-2ca3-4007-b99d-e501be8c7222
                type: SERVICE_FEE
                collection_amount: '12.41'
                processed_amount:
                  cash_balance: '6.50'
                  sell_to_cover: '0'
                currency: EUR
                status: PROCESSING
                period_start: '2022-11-01'
                period_end: '2022-11-30'
        '401':
          description: Unauthorized. The caller has not been authenticated.
          headers:
            upvest-request-id:
              required: true
              schema:
                type: string
                format: uuid
                example: 169ae4c7-ebd7-4041-94da-25369653eba7
          content:
            application/problem+json:
              schema:
                title: Error
                type: object
                description: ''
                properties:
                  type:
                    type: string
                    description: URL to a document describing the error condition.
                  status:
                    type: integer
                    description: >-
                      Transmission of the HTTP status code so that all
                      information can be found in one place, but also to correct
                      changes in the status code due to the use of proxy
                      servers.
                  title:
                    type: string
                    description: >-
                      A short, human-readable title for the general error type;
                      the title should not change for given types.
                  detail:
                    type: string
                    description: A human-readable description of the specific error.
                  instance:
                    type: string
                    description: >-
                      This optional key may be present, with a unique URI for
                      the specific error; this will often point to an error log
                      for that specific response.
                  request_id:
                    type: string
                    description: Correlation ID for the original request.
                required:
                  - type
                  - status
                additionalProperties: false
              example:
                status: 401
                type: unauthorized
        '403':
          description: >-
            Forbidden. The caller has been authenticated but is not allowed to
            take the requested action.
          headers:
            upvest-request-id:
              required: true
              schema:
                type: string
                format: uuid
                example: 169ae4c7-ebd7-4041-94da-25369653eba7
          content:
            application/problem+json:
              schema:
                title: Error
                type: object
                description: ''
                properties:
                  type:
                    type: string
                    description: URL to a document describing the error condition.
                  status:
                    type: integer
                    description: >-
                      Transmission of the HTTP status code so that all
                      information can be found in one place, but also to correct
                      changes in the status code due to the use of proxy
                      servers.
                  title:
                    type: string
                    description: >-
                      A short, human-readable title for the general error type;
                      the title should not change for given types.
                  detail:
                    type: string
                    description: A human-readable description of the specific error.
                  instance:
                    type: string
                    description: >-
                      This optional key may be present, with a unique URI for
                      the specific error; this will often point to an error log
                      for that specific response.
                  request_id:
                    type: string
                    description: Correlation ID for the original request.
                required:
                  - type
                  - status
                additionalProperties: false
              example:
                status: 403
                type: forbidden
        '404':
          description: Not Found. The requested resource could not be found.
          headers:
            upvest-request-id:
              required: true
              schema:
                type: string
                format: uuid
                example: 169ae4c7-ebd7-4041-94da-25369653eba7
          content:
            application/problem+json:
              schema:
                title: Error
                type: object
                description: ''
                properties:
                  type:
                    type: string
                    description: URL to a document describing the error condition.
                  status:
                    type: integer
                    description: >-
                      Transmission of the HTTP status code so that all
                      information can be found in one place, but also to correct
                      changes in the status code due to the use of proxy
                      servers.
                  title:
                    type: string
                    description: >-
                      A short, human-readable title for the general error type;
                      the title should not change for given types.
                  detail:
                    type: string
                    description: A human-readable description of the specific error.
                  instance:
                    type: string
                    description: >-
                      This optional key may be present, with a unique URI for
                      the specific error; this will often point to an error log
                      for that specific response.
                  request_id:
                    type: string
                    description: Correlation ID for the original request.
                required:
                  - type
                  - status
                additionalProperties: false
              example:
                status: 404
                type: not_found
        '406':
          description: >-
            Not Acceptable. The resource does not have a current representation
            that would be acceptable to the user agent. "Accept" header defined
            unsupported value.
          headers:
            upvest-request-id:
              required: true
              schema:
                type: string
                format: uuid
                example: 169ae4c7-ebd7-4041-94da-25369653eba7
          content:
            application/problem+json:
              schema:
                title: Error
                type: object
                description: ''
                properties:
                  type:
                    type: string
                    description: URL to a document describing the error condition.
                  status:
                    type: integer
                    description: >-
                      Transmission of the HTTP status code so that all
                      information can be found in one place, but also to correct
                      changes in the status code due to the use of proxy
                      servers.
                  title:
                    type: string
                    description: >-
                      A short, human-readable title for the general error type;
                      the title should not change for given types.
                  detail:
                    type: string
                    description: A human-readable description of the specific error.
                  instance:
                    type: string
                    description: >-
                      This optional key may be present, with a unique URI for
                      the specific error; this will often point to an error log
                      for that specific response.
                  request_id:
                    type: string
                    description: Correlation ID for the original request.
                required:
                  - type
                  - status
                additionalProperties: false
              example:
                status: 406
                type: not_acceptable
        '429':
          description: >-
            Too Many Requests. The caller has exceeded their quota for the time
            period and has been throttled.
          headers:
            upvest-request-id:
              required: true
              schema:
                type: string
                format: uuid
                example: 169ae4c7-ebd7-4041-94da-25369653eba7
          content:
            application/problem+json:
              schema:
                title: Error
                type: object
                description: ''
                properties:
                  type:
                    type: string
                    description: URL to a document describing the error condition.
                  status:
                    type: integer
                    description: >-
                      Transmission of the HTTP status code so that all
                      information can be found in one place, but also to correct
                      changes in the status code due to the use of proxy
                      servers.
                  title:
                    type: string
                    description: >-
                      A short, human-readable title for the general error type;
                      the title should not change for given types.
                  detail:
                    type: string
                    description: A human-readable description of the specific error.
                  instance:
                    type: string
                    description: >-
                      This optional key may be present, with a unique URI for
                      the specific error; this will often point to an error log
                      for that specific response.
                  request_id:
                    type: string
                    description: Correlation ID for the original request.
                required:
                  - type
                  - status
                additionalProperties: false
              example:
                status: 429
                type: too_many_requests
        '500':
          description: Internal Server Error. The service encountered an unexpected error.
          headers:
            upvest-request-id:
              required: true
              schema:
                type: string
                format: uuid
                example: 169ae4c7-ebd7-4041-94da-25369653eba7
          content:
            application/problem+json:
              schema:
                title: Error
                type: object
                description: ''
                properties:
                  type:
                    type: string
                    description: URL to a document describing the error condition.
                  status:
                    type: integer
                    description: >-
                      Transmission of the HTTP status code so that all
                      information can be found in one place, but also to correct
                      changes in the status code due to the use of proxy
                      servers.
                  title:
                    type: string
                    description: >-
                      A short, human-readable title for the general error type;
                      the title should not change for given types.
                  detail:
                    type: string
                    description: A human-readable description of the specific error.
                  instance:
                    type: string
                    description: >-
                      This optional key may be present, with a unique URI for
                      the specific error; this will often point to an error log
                      for that specific response.
                  request_id:
                    type: string
                    description: Correlation ID for the original request.
                required:
                  - type
                  - status
                additionalProperties: false
              example:
                status: 500
                type: internal_server_error
        '503':
          description: >-
            Service Unavailable. The service handling for this request cannot be
            reached at this time.
          headers:
            upvest-request-id:
              required: true
              schema:
                type: string
                format: uuid
                example: 169ae4c7-ebd7-4041-94da-25369653eba7
          content:
            application/problem+json:
              schema:
                title: Error
                type: object
                description: ''
                properties:
                  type:
                    type: string
                    description: URL to a document describing the error condition.
                  status:
                    type: integer
                    description: >-
                      Transmission of the HTTP status code so that all
                      information can be found in one place, but also to correct
                      changes in the status code due to the use of proxy
                      servers.
                  title:
                    type: string
                    description: >-
                      A short, human-readable title for the general error type;
                      the title should not change for given types.
                  detail:
                    type: string
                    description: A human-readable description of the specific error.
                  instance:
                    type: string
                    description: >-
                      This optional key may be present, with a unique URI for
                      the specific error; this will often point to an error log
                      for that specific response.
                  request_id:
                    type: string
                    description: Correlation ID for the original request.
                required:
                  - type
                  - status
                additionalProperties: false
              example:
                status: 503
                type: method_not_allowed
        '504':
          description: >-
            Gateway Timeout. The service gateway has reached its internal
            timeout.
          headers:
            upvest-request-id:
              required: true
              schema:
                type: string
                format: uuid
                example: 169ae4c7-ebd7-4041-94da-25369653eba7
          content:
            application/problem+json:
              schema:
                title: Error
                type: object
                description: ''
                properties:
                  type:
                    type: string
                    description: URL to a document describing the error condition.
                  status:
                    type: integer
                    description: >-
                      Transmission of the HTTP status code so that all
                      information can be found in one place, but also to correct
                      changes in the status code due to the use of proxy
                      servers.
                  title:
                    type: string
                    description: >-
                      A short, human-readable title for the general error type;
                      the title should not change for given types.
                  detail:
                    type: string
                    description: A human-readable description of the specific error.
                  instance:
                    type: string
                    description: >-
                      This optional key may be present, with a unique URI for
                      the specific error; this will often point to an error log
                      for that specific response.
                  request_id:
                    type: string
                    description: Correlation ID for the original request.
                required:
                  - type
                  - status
                additionalProperties: false
              example:
                status: 504
                type: gateway_timeout
  /tax_exemptions:
    parameters:
      - name: upvest-client-id
        in: header
        description: Tenant Client ID
        required: true
        schema:
          type: string
          format: uuid
          example: ebabcf4d-61c3-4942-875c-e265a7c2d062
      - name: authorization
        in: header
        description: |
          Bearer (access) token from the OAuth flow with correct scopes.
          https://datatracker.ietf.org/doc/html/rfc6750
        required: true
        schema:
          type: string
          pattern: ^Bearer [a-zA-Z0-9\-\._~+/]*=*
          example: Bearer c2VjcmV0Cg==
      - name: signature
        in: header
        required: true
        schema:
          type: string
        description: >-
          https://tools.ietf.org/id/draft-ietf-httpbis-message-signatures-01.html#name-the-signature-http-header
      - name: signature-input
        in: header
        required: true
        schema:
          type: string
        description: >-
          https://tools.ietf.org/id/draft-ietf-httpbis-message-signatures-01.html#name-the-signature-input-http-he
      - name: upvest-api-version
        in: header
        required: false
        schema:
          type: string
          enum:
            - '1'
          default: '1'
          example: '1'
        description: 'Upvest API version (Note: Do not include quotation marks)'
    post:
      operationId: create_tax_exemption
      summary: Create a tax exemption
      description: Creates a tax exemption.
      tags:
        - Tax Exemptions
      security:
        - oauth-client-credentials:
            - taxes:admin
      parameters:
        - name: idempotency-key
          in: header
          required: true
          schema:
            type: string
            format: uuid
            pattern: >-
              ^[0-9a-fA-F]{8}-?[0-9a-fA-F]{4}-?[0-5][0-9a-fA-F]{3}-?[089abAB][0-9a-fA-F]{3}-?[0-9a-fA-F]{12}$
            example: ccb07f42-4104-44ad-8e1f-c660bb7b269c
          description: >
            A UUID to be used as an idempotency key.  This prevents a duplicate
            request from being replayed.

            https://docs.upvest.co/documentation/concepts/api_concepts/idempotency
      requestBody:
        content:
          application/json:
            schema:
              title: Taxes - Tax Exemptions - Create - Request
              type: object
              additionalProperties: false
              properties:
                user_ids:
                  description: >-
                    Ids of the users for whom the tax exemption is to be
                    created.
                  type: array
                  items:
                    title: User unique identifier.
                    type: string
                    description: User unique identifier.
                    format: uuid
                tax_exemption_details:
                  title: Tax Exemption - Request - German Tax Exemption Details
                  type: object
                  additionalProperties: false
                  properties:
                    tax_exemption_type:
                      title: Tax Exemption Type
                      type: string
                      description: |-
                        Tax exemption type 
                        * SINGLE - Tax exemption for Individual. 
                        * MARRIED - Tax exemption for married couples.
                      enum:
                        - SINGLE
                        - MARRIED
                    tax_exemption_amount:
                      title: >-
                        Tax Exemption - Create - Request - Tax Exemption Details
                        - Amount
                      type: object
                      additionalProperties: false
                      properties:
                        amount:
                          type: string
                          pattern: ^[0-9]{1,9}(\.[0-9]{2})?$
                        currency:
                          type: string
                          description: >-
                            Alphabetic three-letter [ISO
                            4217](https://en.wikipedia.org/wiki/ISO_4217)
                            currency code.

                            * EUR - Euro
                          enum:
                            - EUR
                          default: EUR
                      required:
                        - amount
                        - currency
                  required:
                    - tax_exemption_amount
                country:
                  description: >-
                    Country code. [ISO 3166 alpha-2
                    Codes](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2).
                  type: string
                  pattern: ^[A-Z]{2}$
                valid_to_date:
                  type: string
                  format: date
                  description: >-
                    Date until which the tax exemption is valid. If it is
                    unlimited, it is omitted. For Germany it is always the last
                    day of the year (YYYY-12-31). [RFC 3339, section
                    5.6](https://json-schema.org/draft/2020-12/json-schema-validation.html#RFC3339)
              required:
                - user_ids
                - country
                - tax_exemption_details
            example:
              user_ids:
                - 70fd317b-81e1-4f21-9f7e-3b5cb4dfe686
              tax_exemption_details:
                tax_exemption_type: SINGLE
                tax_exemption_amount:
                  currency: EUR
                  amount: '1000'
              country: DE
              valid_to_date: '2024-12-31'
      responses:
        '202':
          description: Creation request accepted.
          headers:
            upvest-request-id:
              required: true
              schema:
                type: string
                format: uuid
                example: 169ae4c7-ebd7-4041-94da-25369653eba7
          content:
            application/json:
              schema:
                title: Tax Exemptions - Create - Response
                type: object
                additionalProperties: false
                properties:
                  id:
                    title: Tax Exemption Unique Identifier
                    type: string
                    description: Tax Exemption Unique Identifier
                    format: uuid
              example:
                id: f1a57a04-1a89-4dab-ae3a-ff9b2a9377c1
        '400':
          description: Bad Request. The incoming request had a malformed parameter/object.
          headers:
            upvest-request-id:
              required: true
              schema:
                type: string
                format: uuid
                example: 169ae4c7-ebd7-4041-94da-25369653eba7
          content:
            application/problem+json:
              schema:
                title: Error
                type: object
                description: ''
                properties:
                  type:
                    type: string
                    description: URL to a document describing the error condition.
                  status:
                    type: integer
                    description: >-
                      Transmission of the HTTP status code so that all
                      information can be found in one place, but also to correct
                      changes in the status code due to the use of proxy
                      servers.
                  title:
                    type: string
                    description: >-
                      A short, human-readable title for the general error type;
                      the title should not change for given types.
                  detail:
                    type: string
                    description: A human-readable description of the specific error.
                  instance:
                    type: string
                    description: >-
                      This optional key may be present, with a unique URI for
                      the specific error; this will often point to an error log
                      for that specific response.
                  request_id:
                    type: string
                    description: Correlation ID for the original request.
                required:
                  - type
                  - status
                additionalProperties: false
              example:
                status: 400
                type: bad_request
        '401':
          description: Unauthorized. The caller has not been authenticated.
          headers:
            upvest-request-id:
              required: true
              schema:
                type: string
                format: uuid
                example: 169ae4c7-ebd7-4041-94da-25369653eba7
          content:
            application/problem+json:
              schema:
                title: Error
                type: object
                description: ''
                properties:
                  type:
                    type: string
                    description: URL to a document describing the error condition.
                  status:
                    type: integer
                    description: >-
                      Transmission of the HTTP status code so that all
                      information can be found in one place, but also to correct
                      changes in the status code due to the use of proxy
                      servers.
                  title:
                    type: string
                    description: >-
                      A short, human-readable title for the general error type;
                      the title should not change for given types.
                  detail:
                    type: string
                    description: A human-readable description of the specific error.
                  instance:
                    type: string
                    description: >-
                      This optional key may be present, with a unique URI for
                      the specific error; this will often point to an error log
                      for that specific response.
                  request_id:
                    type: string
                    description: Correlation ID for the original request.
                required:
                  - type
                  - status
                additionalProperties: false
              example:
                status: 401
                type: unauthorized
        '403':
          description: >-
            Forbidden. The caller has been authenticated but is not allowed to
            take the requested action.
          headers:
            upvest-request-id:
              required: true
              schema:
                type: string
                format: uuid
                example: 169ae4c7-ebd7-4041-94da-25369653eba7
          content:
            application/problem+json:
              schema:
                title: Error
                type: object
                description: ''
                properties:
                  type:
                    type: string
                    description: URL to a document describing the error condition.
                  status:
                    type: integer
                    description: >-
                      Transmission of the HTTP status code so that all
                      information can be found in one place, but also to correct
                      changes in the status code due to the use of proxy
                      servers.
                  title:
                    type: string
                    description: >-
                      A short, human-readable title for the general error type;
                      the title should not change for given types.
                  detail:
                    type: string
                    description: A human-readable description of the specific error.
                  instance:
                    type: string
                    description: >-
                      This optional key may be present, with a unique URI for
                      the specific error; this will often point to an error log
                      for that specific response.
                  request_id:
                    type: string
                    description: Correlation ID for the original request.
                required:
                  - type
                  - status
                additionalProperties: false
              example:
                status: 403
                type: forbidden
        '404':
          description: Not Found. The requested resource could not be found.
          headers:
            upvest-request-id:
              required: true
              schema:
                type: string
                format: uuid
                example: 169ae4c7-ebd7-4041-94da-25369653eba7
          content:
            application/problem+json:
              schema:
                title: Error
                type: object
                description: ''
                properties:
                  type:
                    type: string
                    description: URL to a document describing the error condition.
                  status:
                    type: integer
                    description: >-
                      Transmission of the HTTP status code so that all
                      information can be found in one place, but also to correct
                      changes in the status code due to the use of proxy
                      servers.
                  title:
                    type: string
                    description: >-
                      A short, human-readable title for the general error type;
                      the title should not change for given types.
                  detail:
                    type: string
                    description: A human-readable description of the specific error.
                  instance:
                    type: string
                    description: >-
                      This optional key may be present, with a unique URI for
                      the specific error; this will often point to an error log
                      for that specific response.
                  request_id:
                    type: string
                    description: Correlation ID for the original request.
                required:
                  - type
                  - status
                additionalProperties: false
              example:
                status: 404
                type: not_found
        '406':
          description: >-
            Not Acceptable. The resource does not have a current representation
            that would be acceptable to the user agent. "Accept" header defined
            unsupported value.
          headers:
            upvest-request-id:
              required: true
              schema:
                type: string
                format: uuid
                example: 169ae4c7-ebd7-4041-94da-25369653eba7
          content:
            application/problem+json:
              schema:
                title: Error
                type: object
                description: ''
                properties:
                  type:
                    type: string
                    description: URL to a document describing the error condition.
                  status:
                    type: integer
                    description: >-
                      Transmission of the HTTP status code so that all
                      information can be found in one place, but also to correct
                      changes in the status code due to the use of proxy
                      servers.
                  title:
                    type: string
                    description: >-
                      A short, human-readable title for the general error type;
                      the title should not change for given types.
                  detail:
                    type: string
                    description: A human-readable description of the specific error.
                  instance:
                    type: string
                    description: >-
                      This optional key may be present, with a unique URI for
                      the specific error; this will often point to an error log
                      for that specific response.
                  request_id:
                    type: string
                    description: Correlation ID for the original request.
                required:
                  - type
                  - status
                additionalProperties: false
              example:
                status: 406
                type: not_acceptable
        '429':
          description: >-
            Too Many Requests. The caller has exceeded their quota for the time
            period and has been throttled.
          headers:
            upvest-request-id:
              required: true
              schema:
                type: string
                format: uuid
                example: 169ae4c7-ebd7-4041-94da-25369653eba7
          content:
            application/problem+json:
              schema:
                title: Error
                type: object
                description: ''
                properties:
                  type:
                    type: string
                    description: URL to a document describing the error condition.
                  status:
                    type: integer
                    description: >-
                      Transmission of the HTTP status code so that all
                      information can be found in one place, but also to correct
                      changes in the status code due to the use of proxy
                      servers.
                  title:
                    type: string
                    description: >-
                      A short, human-readable title for the general error type;
                      the title should not change for given types.
                  detail:
                    type: string
                    description: A human-readable description of the specific error.
                  instance:
                    type: string
                    description: >-
                      This optional key may be present, with a unique URI for
                      the specific error; this will often point to an error log
                      for that specific response.
                  request_id:
                    type: string
                    description: Correlation ID for the original request.
                required:
                  - type
                  - status
                additionalProperties: false
              example:
                status: 429
                type: too_many_requests
        '500':
          description: Internal Server Error. The service encountered an unexpected error.
          headers:
            upvest-request-id:
              required: true
              schema:
                type: string
                format: uuid
                example: 169ae4c7-ebd7-4041-94da-25369653eba7
          content:
            application/problem+json:
              schema:
                title: Error
                type: object
                description: ''
                properties:
                  type:
                    type: string
                    description: URL to a document describing the error condition.
                  status:
                    type: integer
                    description: >-
                      Transmission of the HTTP status code so that all
                      information can be found in one place, but also to correct
                      changes in the status code due to the use of proxy
                      servers.
                  title:
                    type: string
                    description: >-
                      A short, human-readable title for the general error type;
                      the title should not change for given types.
                  detail:
                    type: string
                    description: A human-readable description of the specific error.
                  instance:
                    type: string
                    description: >-
                      This optional key may be present, with a unique URI for
                      the specific error; this will often point to an error log
                      for that specific response.
                  request_id:
                    type: string
                    description: Correlation ID for the original request.
                required:
                  - type
                  - status
                additionalProperties: false
              example:
                status: 500
                type: internal_server_error
        '503':
          description: >-
            Service Unavailable. The service handling for this request cannot be
            reached at this time.
          headers:
            upvest-request-id:
              required: true
              schema:
                type: string
                format: uuid
                example: 169ae4c7-ebd7-4041-94da-25369653eba7
          content:
            application/problem+json:
              schema:
                title: Error
                type: object
                description: ''
                properties:
                  type:
                    type: string
                    description: URL to a document describing the error condition.
                  status:
                    type: integer
                    description: >-
                      Transmission of the HTTP status code so that all
                      information can be found in one place, but also to correct
                      changes in the status code due to the use of proxy
                      servers.
                  title:
                    type: string
                    description: >-
                      A short, human-readable title for the general error type;
                      the title should not change for given types.
                  detail:
                    type: string
                    description: A human-readable description of the specific error.
                  instance:
                    type: string
                    description: >-
                      This optional key may be present, with a unique URI for
                      the specific error; this will often point to an error log
                      for that specific response.
                  request_id:
                    type: string
                    description: Correlation ID for the original request.
                required:
                  - type
                  - status
                additionalProperties: false
              example:
                status: 503
                type: method_not_allowed
        '504':
          description: >-
            Gateway Timeout. The service gateway has reached its internal
            timeout.
          headers:
            upvest-request-id:
              required: true
              schema:
                type: string
                format: uuid
                example: 169ae4c7-ebd7-4041-94da-25369653eba7
          content:
            application/problem+json:
              schema:
                title: Error
                type: object
                description: ''
                properties:
                  type:
                    type: string
                    description: URL to a document describing the error condition.
                  status:
                    type: integer
                    description: >-
                      Transmission of the HTTP status code so that all
                      information can be found in one place, but also to correct
                      changes in the status code due to the use of proxy
                      servers.
                  title:
                    type: string
                    description: >-
                      A short, human-readable title for the general error type;
                      the title should not change for given types.
                  detail:
                    type: string
                    description: A human-readable description of the specific error.
                  instance:
                    type: string
                    description: >-
                      This optional key may be present, with a unique URI for
                      the specific error; this will often point to an error log
                      for that specific response.
                  request_id:
                    type: string
                    description: Correlation ID for the original request.
                required:
                  - type
                  - status
                additionalProperties: false
              example:
                status: 504
                type: gateway_timeout
  /tax_exemptions/{tax_exemption_id}:
    parameters:
      - name: tax_exemption_id
        description: ''
        in: path
        required: true
        schema:
          title: Tax Exemption Unique Identifier
          type: string
          description: Tax Exemption Unique Identifier
          format: uuid
      - name: upvest-client-id
        in: header
        description: Tenant Client ID
        required: true
        schema:
          type: string
          format: uuid
          example: ebabcf4d-61c3-4942-875c-e265a7c2d062
      - name: authorization
        in: header
        description: |
          Bearer (access) token from the OAuth flow with correct scopes.
          https://datatracker.ietf.org/doc/html/rfc6750
        required: true
        schema:
          type: string
          pattern: ^Bearer [a-zA-Z0-9\-\._~+/]*=*
          example: Bearer c2VjcmV0Cg==
      - name: signature
        in: header
        required: true
        schema:
          type: string
        description: >-
          https://tools.ietf.org/id/draft-ietf-httpbis-message-signatures-01.html#name-the-signature-http-header
      - name: signature-input
        in: header
        required: true
        schema:
          type: string
        description: >-
          https://tools.ietf.org/id/draft-ietf-httpbis-message-signatures-01.html#name-the-signature-input-http-he
      - name: upvest-api-version
        in: header
        required: false
        schema:
          type: string
          enum:
            - '1'
          default: '1'
          example: '1'
        description: 'Upvest API version (Note: Do not include quotation marks)'
    get:
      operationId: retrieve_tax_exemption_by_id
      summary: Get a tax exemption by ID
      description: Returns the tax exemption specified by its ID
      tags:
        - Tax Exemptions
      security:
        - oauth-client-credentials:
            - taxes:admin
      responses:
        '200':
          description: OK
          headers:
            upvest-request-id:
              required: true
              schema:
                type: string
                format: uuid
                example: 169ae4c7-ebd7-4041-94da-25369653eba7
          content:
            application/json:
              schema:
                title: Webhook - Tax exemption - Created - Tax exemption
                type: object
                additionalProperties: false
                properties:
                  id:
                    title: Tax Exemption Unique Identifier
                    type: string
                    description: Tax Exemption Unique Identifier
                    format: uuid
                  created_at:
                    type: string
                    format: date-time
                    description: >-
                      Date and time when the resource was created. [RFC
                      3339-5](https://datatracker.ietf.org/doc/html/rfc3339#section-5.6),
                      [ISO8601
                      UTC](https://www.iso.org/iso-8601-date-and-time-format.html)
                  updated_at:
                    type: string
                    format: date-time
                    description: >-
                      Date and time when the resource was last updated. [RFC
                      3339-5](https://datatracker.ietf.org/doc/html/rfc3339#section-5.6),
                      [ISO8601
                      UTC](https://www.iso.org/iso-8601-date-and-time-format.html)
                  status:
                    title: Tax exemption status
                    type: string
                    description: >-
                      Tax exemption status 

                      * NEW - The tax exemption request is created. 

                      * ACTIVE - The tax exemption is valid and active for the
                      current year. 

                      * EXPIRED - The tax exemption is no longer `ACTIVE` and
                      the `valid_to_date` already lies in the past. An update is
                      not possible. 

                      * CANCELLED - The tax exemption could not be created or
                      was cancelled.
                    enum:
                      - NEW
                      - ACTIVE
                      - EXPIRED
                      - CANCELLED
                  user_ids:
                    description: Ids of the users for whom the tax exemption was created.
                    type: array
                    items:
                      title: User unique identifier.
                      type: string
                      description: User unique identifier.
                      format: uuid
                  country:
                    description: >-
                      Country code. [ISO 3166 alpha-2
                      Codes](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2).
                    type: string
                    pattern: ^[A-Z]{2}$
                  valid_from_date:
                    type: string
                    format: date
                    description: >-
                      Date from which the tax exemption is valid. [RFC 3339,
                      section
                      5.6](https://json-schema.org/draft/2020-12/json-schema-validation.html#RFC3339)
                  valid_to_date:
                    type: string
                    format: date
                    nullable: true
                    description: >-
                      Date until which the tax exemption is valid. If it is
                      unlimited, it is omitted. For Germany it is always the
                      last day of the year (YYYY-12-31). [RFC 3339, section
                      5.6](https://json-schema.org/draft/2020-12/json-schema-validation.html#RFC3339)
                  tax_exemption_details:
                    title: Tax Exemption - German Tax Exemption Details
                    type: object
                    additionalProperties: false
                    properties:
                      tax_exemption_type:
                        title: Tax Exemption Type
                        type: string
                        description: |-
                          Tax exemption type 
                          * SINGLE - Tax exemption for Individual. 
                          * MARRIED - Tax exemption for married couples.
                        enum:
                          - SINGLE
                          - MARRIED
                      tax_exemption_amount:
                        title: >-
                          Tax Exemption - Create - Request - Tax Exemption
                          Details - Amount
                        type: object
                        additionalProperties: false
                        properties:
                          amount:
                            type: string
                            pattern: ^[0-9]{1,9}(\.[0-9]{2})?$
                          currency:
                            type: string
                            description: >-
                              Alphabetic three-letter [ISO
                              4217](https://en.wikipedia.org/wiki/ISO_4217)
                              currency code.

                              * EUR - Euro
                            enum:
                              - EUR
                            default: EUR
                        required:
                          - amount
                          - currency
                      utilized_amount:
                        title: >-
                          Tax Exemption - Create - Request - Tax Exemption
                          Details - Amount
                        type: object
                        additionalProperties: false
                        properties:
                          amount:
                            type: string
                            pattern: ^[0-9]{1,9}(\.[0-9]{2})?$
                          currency:
                            type: string
                            description: >-
                              Alphabetic three-letter [ISO
                              4217](https://en.wikipedia.org/wiki/ISO_4217)
                              currency code.

                              * EUR - Euro
                            enum:
                              - EUR
                            default: EUR
                        required:
                          - amount
                          - currency
                      remaining_amount:
                        title: >-
                          Tax Exemption - Create - Request - Tax Exemption
                          Details - Amount
                        type: object
                        additionalProperties: false
                        properties:
                          amount:
                            type: string
                            pattern: ^[0-9]{1,9}(\.[0-9]{2})?$
                          currency:
                            type: string
                            description: >-
                              Alphabetic three-letter [ISO
                              4217](https://en.wikipedia.org/wiki/ISO_4217)
                              currency code.

                              * EUR - Euro
                            enum:
                              - EUR
                            default: EUR
                        required:
                          - amount
                          - currency
                    required:
                      - tax_exemption_type
                      - tax_exemption_amount
                      - utilized_amount
                      - remaining_amount
                required:
                  - id
                  - status
                  - user_ids
                  - country
                  - valid_from_date
                  - valid_to_date
                  - tax_exemption_details
                  - created_at
                  - updated_at
              example:
                id: f1a57a04-1a89-4dab-ae3a-ff9b2a9377c1
                created_at: '2024-01-01T10:33:43Z'
                updated_at: '2024-01-01T10:33:43Z'
                status: ACTIVE
                user_ids:
                  - 70821d79-366f-4873-804b-14857d690496
                country: DE
                valid_from_date: '2024-01-01'
                valid_to_date: '2024-12-31'
                tax_exemption_details:
                  tax_exemption_type: SINGLE
                  tax_exemption_amount:
                    amount: '1000.00'
                    currency: EUR
                  utilized_amount:
                    amount: '0.00'
                    currency: EUR
                  remaining_amount:
                    amount: '1000.00'
                    currency: EUR
        '401':
          description: Unauthorized. The caller has not been authenticated.
          headers:
            upvest-request-id:
              required: true
              schema:
                type: string
                format: uuid
                example: 169ae4c7-ebd7-4041-94da-25369653eba7
          content:
            application/problem+json:
              schema:
                title: Error
                type: object
                description: ''
                properties:
                  type:
                    type: string
                    description: URL to a document describing the error condition.
                  status:
                    type: integer
                    description: >-
                      Transmission of the HTTP status code so that all
                      information can be found in one place, but also to correct
                      changes in the status code due to the use of proxy
                      servers.
                  title:
                    type: string
                    description: >-
                      A short, human-readable title for the general error type;
                      the title should not change for given types.
                  detail:
                    type: string
                    description: A human-readable description of the specific error.
                  instance:
                    type: string
                    description: >-
                      This optional key may be present, with a unique URI for
                      the specific error; this will often point to an error log
                      for that specific response.
                  request_id:
                    type: string
                    description: Correlation ID for the original request.
                required:
                  - type
                  - status
                additionalProperties: false
              example:
                status: 401
                type: unauthorized
        '403':
          description: >-
            Forbidden. The caller has been authenticated but is not allowed to
            take the requested action.
          headers:
            upvest-request-id:
              required: true
              schema:
                type: string
                format: uuid
                example: 169ae4c7-ebd7-4041-94da-25369653eba7
          content:
            application/problem+json:
              schema:
                title: Error
                type: object
                description: ''
                properties:
                  type:
                    type: string
                    description: URL to a document describing the error condition.
                  status:
                    type: integer
                    description: >-
                      Transmission of the HTTP status code so that all
                      information can be found in one place, but also to correct
                      changes in the status code due to the use of proxy
                      servers.
                  title:
                    type: string
                    description: >-
                      A short, human-readable title for the general error type;
                      the title should not change for given types.
                  detail:
                    type: string
                    description: A human-readable description of the specific error.
                  instance:
                    type: string
                    description: >-
                      This optional key may be present, with a unique URI for
                      the specific error; this will often point to an error log
                      for that specific response.
                  request_id:
                    type: string
                    description: Correlation ID for the original request.
                required:
                  - type
                  - status
                additionalProperties: false
              example:
                status: 403
                type: forbidden
        '404':
          description: Not Found. The requested resource could not be found.
          headers:
            upvest-request-id:
              required: true
              schema:
                type: string
                format: uuid
                example: 169ae4c7-ebd7-4041-94da-25369653eba7
          content:
            application/problem+json:
              schema:
                title: Error
                type: object
                description: ''
                properties:
                  type:
                    type: string
                    description: URL to a document describing the error condition.
                  status:
                    type: integer
                    description: >-
                      Transmission of the HTTP status code so that all
                      information can be found in one place, but also to correct
                      changes in the status code due to the use of proxy
                      servers.
                  title:
                    type: string
                    description: >-
                      A short, human-readable title for the general error type;
                      the title should not change for given types.
                  detail:
                    type: string
                    description: A human-readable description of the specific error.
                  instance:
                    type: string
                    description: >-
                      This optional key may be present, with a unique URI for
                      the specific error; this will often point to an error log
                      for that specific response.
                  request_id:
                    type: string
                    description: Correlation ID for the original request.
                required:
                  - type
                  - status
                additionalProperties: false
              example:
                status: 404
                type: not_found
        '406':
          description: >-
            Not Acceptable. The resource does not have a current representation
            that would be acceptable to the user agent. "Accept" header defined
            unsupported value.
          headers:
            upvest-request-id:
              required: true
              schema:
                type: string
                format: uuid
                example: 169ae4c7-ebd7-4041-94da-25369653eba7
          content:
            application/problem+json:
              schema:
                title: Error
                type: object
                description: ''
                properties:
                  type:
                    type: string
                    description: URL to a document describing the error condition.
                  status:
                    type: integer
                    description: >-
                      Transmission of the HTTP status code so that all
                      information can be found in one place, but also to correct
                      changes in the status code due to the use of proxy
                      servers.
                  title:
                    type: string
                    description: >-
                      A short, human-readable title for the general error type;
                      the title should not change for given types.
                  detail:
                    type: string
                    description: A human-readable description of the specific error.
                  instance:
                    type: string
                    description: >-
                      This optional key may be present, with a unique URI for
                      the specific error; this will often point to an error log
                      for that specific response.
                  request_id:
                    type: string
                    description: Correlation ID for the original request.
                required:
                  - type
                  - status
                additionalProperties: false
              example:
                status: 406
                type: not_acceptable
        '429':
          description: >-
            Too Many Requests. The caller has exceeded their quota for the time
            period and has been throttled.
          headers:
            upvest-request-id:
              required: true
              schema:
                type: string
                format: uuid
                example: 169ae4c7-ebd7-4041-94da-25369653eba7
          content:
            application/problem+json:
              schema:
                title: Error
                type: object
                description: ''
                properties:
                  type:
                    type: string
                    description: URL to a document describing the error condition.
                  status:
                    type: integer
                    description: >-
                      Transmission of the HTTP status code so that all
                      information can be found in one place, but also to correct
                      changes in the status code due to the use of proxy
                      servers.
                  title:
                    type: string
                    description: >-
                      A short, human-readable title for the general error type;
                      the title should not change for given types.
                  detail:
                    type: string
                    description: A human-readable description of the specific error.
                  instance:
                    type: string
                    description: >-
                      This optional key may be present, with a unique URI for
                      the specific error; this will often point to an error log
                      for that specific response.
                  request_id:
                    type: string
                    description: Correlation ID for the original request.
                required:
                  - type
                  - status
                additionalProperties: false
              example:
                status: 429
                type: too_many_requests
        '500':
          description: Internal Server Error. The service encountered an unexpected error.
          headers:
            upvest-request-id:
              required: true
              schema:
                type: string
                format: uuid
                example: 169ae4c7-ebd7-4041-94da-25369653eba7
          content:
            application/problem+json:
              schema:
                title: Error
                type: object
                description: ''
                properties:
                  type:
                    type: string
                    description: URL to a document describing the error condition.
                  status:
                    type: integer
                    description: >-
                      Transmission of the HTTP status code so that all
                      information can be found in one place, but also to correct
                      changes in the status code due to the use of proxy
                      servers.
                  title:
                    type: string
                    description: >-
                      A short, human-readable title for the general error type;
                      the title should not change for given types.
                  detail:
                    type: string
                    description: A human-readable description of the specific error.
                  instance:
                    type: string
                    description: >-
                      This optional key may be present, with a unique URI for
                      the specific error; this will often point to an error log
                      for that specific response.
                  request_id:
                    type: string
                    description: Correlation ID for the original request.
                required:
                  - type
                  - status
                additionalProperties: false
              example:
                status: 500
                type: internal_server_error
        '503':
          description: >-
            Service Unavailable. The service handling for this request cannot be
            reached at this time.
          headers:
            upvest-request-id:
              required: true
              schema:
                type: string
                format: uuid
                example: 169ae4c7-ebd7-4041-94da-25369653eba7
          content:
            application/problem+json:
              schema:
                title: Error
                type: object
                description: ''
                properties:
                  type:
                    type: string
                    description: URL to a document describing the error condition.
                  status:
                    type: integer
                    description: >-
                      Transmission of the HTTP status code so that all
                      information can be found in one place, but also to correct
                      changes in the status code due to the use of proxy
                      servers.
                  title:
                    type: string
                    description: >-
                      A short, human-readable title for the general error type;
                      the title should not change for given types.
                  detail:
                    type: string
                    description: A human-readable description of the specific error.
                  instance:
                    type: string
                    description: >-
                      This optional key may be present, with a unique URI for
                      the specific error; this will often point to an error log
                      for that specific response.
                  request_id:
                    type: string
                    description: Correlation ID for the original request.
                required:
                  - type
                  - status
                additionalProperties: false
              example:
                status: 503
                type: method_not_allowed
        '504':
          description: >-
            Gateway Timeout. The service gateway has reached its internal
            timeout.
          headers:
            upvest-request-id:
              required: true
              schema:
                type: string
                format: uuid
                example: 169ae4c7-ebd7-4041-94da-25369653eba7
          content:
            application/problem+json:
              schema:
                title: Error
                type: object
                description: ''
                properties:
                  type:
                    type: string
                    description: URL to a document describing the error condition.
                  status:
                    type: integer
                    description: >-
                      Transmission of the HTTP status code so that all
                      information can be found in one place, but also to correct
                      changes in the status code due to the use of proxy
                      servers.
                  title:
                    type: string
                    description: >-
                      A short, human-readable title for the general error type;
                      the title should not change for given types.
                  detail:
                    type: string
                    description: A human-readable description of the specific error.
                  instance:
                    type: string
                    description: >-
                      This optional key may be present, with a unique URI for
                      the specific error; this will often point to an error log
                      for that specific response.
                  request_id:
                    type: string
                    description: Correlation ID for the original request.
                required:
                  - type
                  - status
                additionalProperties: false
              example:
                status: 504
                type: gateway_timeout
    put:
      operationId: update_tax_exemption
      summary: Update a tax exemption
      description: Updates a tax exemption specified by its ID.
      tags:
        - Tax Exemptions
      security:
        - oauth-client-credentials:
            - taxes:admin
      requestBody:
        content:
          application/json:
            schema:
              title: Taxes - Tax Exemptions - Update - Request
              type: object
              additionalProperties: false
              properties:
                user_ids:
                  description: >-
                    Ids of the users for whom the tax exemption is to be
                    updated.
                  type: array
                  items:
                    title: User unique identifier.
                    type: string
                    description: User unique identifier.
                    format: uuid
                tax_exemption_details:
                  title: Tax Exemption - Request - German Tax Exemption Details
                  type: object
                  additionalProperties: false
                  properties:
                    tax_exemption_type:
                      title: Tax Exemption Type
                      type: string
                      description: |-
                        Tax exemption type 
                        * SINGLE - Tax exemption for Individual. 
                        * MARRIED - Tax exemption for married couples.
                      enum:
                        - SINGLE
                        - MARRIED
                    tax_exemption_amount:
                      title: >-
                        Tax Exemption - Create - Request - Tax Exemption Details
                        - Amount
                      type: object
                      additionalProperties: false
                      properties:
                        amount:
                          type: string
                          pattern: ^[0-9]{1,9}(\.[0-9]{2})?$
                        currency:
                          type: string
                          description: >-
                            Alphabetic three-letter [ISO
                            4217](https://en.wikipedia.org/wiki/ISO_4217)
                            currency code.

                            * EUR - Euro
                          enum:
                            - EUR
                          default: EUR
                      required:
                        - amount
                        - currency
                  required:
                    - tax_exemption_amount
                country:
                  description: >-
                    Country code. [ISO 3166 alpha-2
                    Codes](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2).
                  type: string
                  pattern: ^[A-Z]{2}$
                valid_to_date:
                  type: string
                  format: date
                  description: >-
                    Date until which the tax exemption is valid. If it is
                    unlimited, it is omitted. For Germany it is always the last
                    day of the year (YYYY-12-31). [RFC 3339, section
                    5.6](https://json-schema.org/draft/2020-12/json-schema-validation.html#RFC3339)
              required:
                - user_ids
                - country
                - tax_exemption_details
            example:
              user_ids:
                - 70fd317b-81e1-4f21-9f7e-3b5cb4dfe686
              tax_exemption_details:
                tax_exemption_type: SINGLE
                tax_exemption_amount:
                  currency: EUR
                  amount: '955'
              country: DE
              valid_to_date: '2024-12-31'
      responses:
        '202':
          description: The tax exemption update is submitted.
          headers:
            upvest-request-id:
              required: true
              schema:
                type: string
                format: uuid
                example: 169ae4c7-ebd7-4041-94da-25369653eba7
          content:
            application/json:
              schema:
                title: Tax Exemptions - Update - Response
                type: object
                additionalProperties: false
                properties:
                  id:
                    title: Tax Exemption Unique Identifier
                    type: string
                    description: Tax Exemption Unique Identifier
                    format: uuid
              example:
                id: f1a57a04-1a89-4dab-ae3a-ff9b2a9377c1
        '400':
          description: Bad Request. The incoming request had a malformed parameter/object.
          headers:
            upvest-request-id:
              required: true
              schema:
                type: string
                format: uuid
                example: 169ae4c7-ebd7-4041-94da-25369653eba7
          content:
            application/problem+json:
              schema:
                title: Error
                type: object
                description: ''
                properties:
                  type:
                    type: string
                    description: URL to a document describing the error condition.
                  status:
                    type: integer
                    description: >-
                      Transmission of the HTTP status code so that all
                      information can be found in one place, but also to correct
                      changes in the status code due to the use of proxy
                      servers.
                  title:
                    type: string
                    description: >-
                      A short, human-readable title for the general error type;
                      the title should not change for given types.
                  detail:
                    type: string
                    description: A human-readable description of the specific error.
                  instance:
                    type: string
                    description: >-
                      This optional key may be present, with a unique URI for
                      the specific error; this will often point to an error log
                      for that specific response.
                  request_id:
                    type: string
                    description: Correlation ID for the original request.
                required:
                  - type
                  - status
                additionalProperties: false
              example:
                status: 400
                type: bad_request
        '401':
          description: Unauthorized. The caller has not been authenticated.
          headers:
            upvest-request-id:
              required: true
              schema:
                type: string
                format: uuid
                example: 169ae4c7-ebd7-4041-94da-25369653eba7
          content:
            application/problem+json:
              schema:
                title: Error
                type: object
                description: ''
                properties:
                  type:
                    type: string
                    description: URL to a document describing the error condition.
                  status:
                    type: integer
                    description: >-
                      Transmission of the HTTP status code so that all
                      information can be found in one place, but also to correct
                      changes in the status code due to the use of proxy
                      servers.
                  title:
                    type: string
                    description: >-
                      A short, human-readable title for the general error type;
                      the title should not change for given types.
                  detail:
                    type: string
                    description: A human-readable description of the specific error.
                  instance:
                    type: string
                    description: >-
                      This optional key may be present, with a unique URI for
                      the specific error; this will often point to an error log
                      for that specific response.
                  request_id:
                    type: string
                    description: Correlation ID for the original request.
                required:
                  - type
                  - status
                additionalProperties: false
              example:
                status: 401
                type: unauthorized
        '403':
          description: >-
            Forbidden. The caller has been authenticated but is not allowed to
            take the requested action.
          headers:
            upvest-request-id:
              required: true
              schema:
                type: string
                format: uuid
                example: 169ae4c7-ebd7-4041-94da-25369653eba7
          content:
            application/problem+json:
              schema:
                title: Error
                type: object
                description: ''
                properties:
                  type:
                    type: string
                    description: URL to a document describing the error condition.
                  status:
                    type: integer
                    description: >-
                      Transmission of the HTTP status code so that all
                      information can be found in one place, but also to correct
                      changes in the status code due to the use of proxy
                      servers.
                  title:
                    type: string
                    description: >-
                      A short, human-readable title for the general error type;
                      the title should not change for given types.
                  detail:
                    type: string
                    description: A human-readable description of the specific error.
                  instance:
                    type: string
                    description: >-
                      This optional key may be present, with a unique URI for
                      the specific error; this will often point to an error log
                      for that specific response.
                  request_id:
                    type: string
                    description: Correlation ID for the original request.
                required:
                  - type
                  - status
                additionalProperties: false
              example:
                status: 403
                type: forbidden
        '404':
          description: Not Found. The requested resource could not be found.
          headers:
            upvest-request-id:
              required: true
              schema:
                type: string
                format: uuid
                example: 169ae4c7-ebd7-4041-94da-25369653eba7
          content:
            application/problem+json:
              schema:
                title: Error
                type: object
                description: ''
                properties:
                  type:
                    type: string
                    description: URL to a document describing the error condition.
                  status:
                    type: integer
                    description: >-
                      Transmission of the HTTP status code so that all
                      information can be found in one place, but also to correct
                      changes in the status code due to the use of proxy
                      servers.
                  title:
                    type: string
                    description: >-
                      A short, human-readable title for the general error type;
                      the title should not change for given types.
                  detail:
                    type: string
                    description: A human-readable description of the specific error.
                  instance:
                    type: string
                    description: >-
                      This optional key may be present, with a unique URI for
                      the specific error; this will often point to an error log
                      for that specific response.
                  request_id:
                    type: string
                    description: Correlation ID for the original request.
                required:
                  - type
                  - status
                additionalProperties: false
              example:
                status: 404
                type: not_found
        '406':
          description: >-
            Not Acceptable. The resource does not have a current representation
            that would be acceptable to the user agent. "Accept" header defined
            unsupported value.
          headers:
            upvest-request-id:
              required: true
              schema:
                type: string
                format: uuid
                example: 169ae4c7-ebd7-4041-94da-25369653eba7
          content:
            application/problem+json:
              schema:
                title: Error
                type: object
                description: ''
                properties:
                  type:
                    type: string
                    description: URL to a document describing the error condition.
                  status:
                    type: integer
                    description: >-
                      Transmission of the HTTP status code so that all
                      information can be found in one place, but also to correct
                      changes in the status code due to the use of proxy
                      servers.
                  title:
                    type: string
                    description: >-
                      A short, human-readable title for the general error type;
                      the title should not change for given types.
                  detail:
                    type: string
                    description: A human-readable description of the specific error.
                  instance:
                    type: string
                    description: >-
                      This optional key may be present, with a unique URI for
                      the specific error; this will often point to an error log
                      for that specific response.
                  request_id:
                    type: string
                    description: Correlation ID for the original request.
                required:
                  - type
                  - status
                additionalProperties: false
              example:
                status: 406
                type: not_acceptable
        '429':
          description: >-
            Too Many Requests. The caller has exceeded their quota for the time
            period and has been throttled.
          headers:
            upvest-request-id:
              required: true
              schema:
                type: string
                format: uuid
                example: 169ae4c7-ebd7-4041-94da-25369653eba7
          content:
            application/problem+json:
              schema:
                title: Error
                type: object
                description: ''
                properties:
                  type:
                    type: string
                    description: URL to a document describing the error condition.
                  status:
                    type: integer
                    description: >-
                      Transmission of the HTTP status code so that all
                      information can be found in one place, but also to correct
                      changes in the status code due to the use of proxy
                      servers.
                  title:
                    type: string
                    description: >-
                      A short, human-readable title for the general error type;
                      the title should not change for given types.
                  detail:
                    type: string
                    description: A human-readable description of the specific error.
                  instance:
                    type: string
                    description: >-
                      This optional key may be present, with a unique URI for
                      the specific error; this will often point to an error log
                      for that specific response.
                  request_id:
                    type: string
                    description: Correlation ID for the original request.
                required:
                  - type
                  - status
                additionalProperties: false
              example:
                status: 429
                type: too_many_requests
        '500':
          description: Internal Server Error. The service encountered an unexpected error.
          headers:
            upvest-request-id:
              required: true
              schema:
                type: string
                format: uuid
                example: 169ae4c7-ebd7-4041-94da-25369653eba7
          content:
            application/problem+json:
              schema:
                title: Error
                type: object
                description: ''
                properties:
                  type:
                    type: string
                    description: URL to a document describing the error condition.
                  status:
                    type: integer
                    description: >-
                      Transmission of the HTTP status code so that all
                      information can be found in one place, but also to correct
                      changes in the status code due to the use of proxy
                      servers.
                  title:
                    type: string
                    description: >-
                      A short, human-readable title for the general error type;
                      the title should not change for given types.
                  detail:
                    type: string
                    description: A human-readable description of the specific error.
                  instance:
                    type: string
                    description: >-
                      This optional key may be present, with a unique URI for
                      the specific error; this will often point to an error log
                      for that specific response.
                  request_id:
                    type: string
                    description: Correlation ID for the original request.
                required:
                  - type
                  - status
                additionalProperties: false
              example:
                status: 500
                type: internal_server_error
        '503':
          description: >-
            Service Unavailable. The service handling for this request cannot be
            reached at this time.
          headers:
            upvest-request-id:
              required: true
              schema:
                type: string
                format: uuid
                example: 169ae4c7-ebd7-4041-94da-25369653eba7
          content:
            application/problem+json:
              schema:
                title: Error
                type: object
                description: ''
                properties:
                  type:
                    type: string
                    description: URL to a document describing the error condition.
                  status:
                    type: integer
                    description: >-
                      Transmission of the HTTP status code so that all
                      information can be found in one place, but also to correct
                      changes in the status code due to the use of proxy
                      servers.
                  title:
                    type: string
                    description: >-
                      A short, human-readable title for the general error type;
                      the title should not change for given types.
                  detail:
                    type: string
                    description: A human-readable description of the specific error.
                  instance:
                    type: string
                    description: >-
                      This optional key may be present, with a unique URI for
                      the specific error; this will often point to an error log
                      for that specific response.
                  request_id:
                    type: string
                    description: Correlation ID for the original request.
                required:
                  - type
                  - status
                additionalProperties: false
              example:
                status: 503
                type: method_not_allowed
        '504':
          description: >-
            Gateway Timeout. The service gateway has reached its internal
            timeout.
          headers:
            upvest-request-id:
              required: true
              schema:
                type: string
                format: uuid
                example: 169ae4c7-ebd7-4041-94da-25369653eba7
          content:
            application/problem+json:
              schema:
                title: Error
                type: object
                description: ''
                properties:
                  type:
                    type: string
                    description: URL to a document describing the error condition.
                  status:
                    type: integer
                    description: >-
                      Transmission of the HTTP status code so that all
                      information can be found in one place, but also to correct
                      changes in the status code due to the use of proxy
                      servers.
                  title:
                    type: string
                    description: >-
                      A short, human-readable title for the general error type;
                      the title should not change for given types.
                  detail:
                    type: string
                    description: A human-readable description of the specific error.
                  instance:
                    type: string
                    description: >-
                      This optional key may be present, with a unique URI for
                      the specific error; this will often point to an error log
                      for that specific response.
                  request_id:
                    type: string
                    description: Correlation ID for the original request.
                required:
                  - type
                  - status
                additionalProperties: false
              example:
                status: 504
                type: gateway_timeout
    delete:
      operationId: delete_tax_exemption
      summary: Delete a tax exemption
      description: Deletes a tax exemption specified by its ID.
      tags:
        - Tax Exemptions
      security:
        - oauth-client-credentials:
            - taxes:admin
      responses:
        '202':
          description: >-
            The request has been successfully accepted and will be processed
            asynchronously.
          headers:
            upvest-request-id:
              required: true
              schema:
                type: string
                format: uuid
                example: 169ae4c7-ebd7-4041-94da-25369653eba7
        '401':
          description: Unauthorized. The caller has not been authenticated.
          headers:
            upvest-request-id:
              required: true
              schema:
                type: string
                format: uuid
                example: 169ae4c7-ebd7-4041-94da-25369653eba7
          content:
            application/problem+json:
              schema:
                title: Error
                type: object
                description: ''
                properties:
                  type:
                    type: string
                    description: URL to a document describing the error condition.
                  status:
                    type: integer
                    description: >-
                      Transmission of the HTTP status code so that all
                      information can be found in one place, but also to correct
                      changes in the status code due to the use of proxy
                      servers.
                  title:
                    type: string
                    description: >-
                      A short, human-readable title for the general error type;
                      the title should not change for given types.
                  detail:
                    type: string
                    description: A human-readable description of the specific error.
                  instance:
                    type: string
                    description: >-
                      This optional key may be present, with a unique URI for
                      the specific error; this will often point to an error log
                      for that specific response.
                  request_id:
                    type: string
                    description: Correlation ID for the original request.
                required:
                  - type
                  - status
                additionalProperties: false
              example:
                status: 401
                type: unauthorized
        '403':
          description: >-
            Forbidden. The caller has been authenticated but is not allowed to
            take the requested action.
          headers:
            upvest-request-id:
              required: true
              schema:
                type: string
                format: uuid
                example: 169ae4c7-ebd7-4041-94da-25369653eba7
          content:
            application/problem+json:
              schema:
                title: Error
                type: object
                description: ''
                properties:
                  type:
                    type: string
                    description: URL to a document describing the error condition.
                  status:
                    type: integer
                    description: >-
                      Transmission of the HTTP status code so that all
                      information can be found in one place, but also to correct
                      changes in the status code due to the use of proxy
                      servers.
                  title:
                    type: string
                    description: >-
                      A short, human-readable title for the general error type;
                      the title should not change for given types.
                  detail:
                    type: string
                    description: A human-readable description of the specific error.
                  instance:
                    type: string
                    description: >-
                      This optional key may be present, with a unique URI for
                      the specific error; this will often point to an error log
                      for that specific response.
                  request_id:
                    type: string
                    description: Correlation ID for the original request.
                required:
                  - type
                  - status
                additionalProperties: false
              example:
                status: 403
                type: forbidden
        '404':
          description: Not Found. The requested resource could not be found.
          headers:
            upvest-request-id:
              required: true
              schema:
                type: string
                format: uuid
                example: 169ae4c7-ebd7-4041-94da-25369653eba7
          content:
            application/problem+json:
              schema:
                title: Error
                type: object
                description: ''
                properties:
                  type:
                    type: string
                    description: URL to a document describing the error condition.
                  status:
                    type: integer
                    description: >-
                      Transmission of the HTTP status code so that all
                      information can be found in one place, but also to correct
                      changes in the status code due to the use of proxy
                      servers.
                  title:
                    type: string
                    description: >-
                      A short, human-readable title for the general error type;
                      the title should not change for given types.
                  detail:
                    type: string
                    description: A human-readable description of the specific error.
                  instance:
                    type: string
                    description: >-
                      This optional key may be present, with a unique URI for
                      the specific error; this will often point to an error log
                      for that specific response.
                  request_id:
                    type: string
                    description: Correlation ID for the original request.
                required:
                  - type
                  - status
                additionalProperties: false
              example:
                status: 404
                type: not_found
        '406':
          description: >-
            Not Acceptable. The resource does not have a current representation
            that would be acceptable to the user agent. "Accept" header defined
            unsupported value.
          headers:
            upvest-request-id:
              required: true
              schema:
                type: string
                format: uuid
                example: 169ae4c7-ebd7-4041-94da-25369653eba7
          content:
            application/problem+json:
              schema:
                title: Error
                type: object
                description: ''
                properties:
                  type:
                    type: string
                    description: URL to a document describing the error condition.
                  status:
                    type: integer
                    description: >-
                      Transmission of the HTTP status code so that all
                      information can be found in one place, but also to correct
                      changes in the status code due to the use of proxy
                      servers.
                  title:
                    type: string
                    description: >-
                      A short, human-readable title for the general error type;
                      the title should not change for given types.
                  detail:
                    type: string
                    description: A human-readable description of the specific error.
                  instance:
                    type: string
                    description: >-
                      This optional key may be present, with a unique URI for
                      the specific error; this will often point to an error log
                      for that specific response.
                  request_id:
                    type: string
                    description: Correlation ID for the original request.
                required:
                  - type
                  - status
                additionalProperties: false
              example:
                status: 406
                type: not_acceptable
        '429':
          description: >-
            Too Many Requests. The caller has exceeded their quota for the time
            period and has been throttled.
          headers:
            upvest-request-id:
              required: true
              schema:
                type: string
                format: uuid
                example: 169ae4c7-ebd7-4041-94da-25369653eba7
          content:
            application/problem+json:
              schema:
                title: Error
                type: object
                description: ''
                properties:
                  type:
                    type: string
                    description: URL to a document describing the error condition.
                  status:
                    type: integer
                    description: >-
                      Transmission of the HTTP status code so that all
                      information can be found in one place, but also to correct
                      changes in the status code due to the use of proxy
                      servers.
                  title:
                    type: string
                    description: >-
                      A short, human-readable title for the general error type;
                      the title should not change for given types.
                  detail:
                    type: string
                    description: A human-readable description of the specific error.
                  instance:
                    type: string
                    description: >-
                      This optional key may be present, with a unique URI for
                      the specific error; this will often point to an error log
                      for that specific response.
                  request_id:
                    type: string
                    description: Correlation ID for the original request.
                required:
                  - type
                  - status
                additionalProperties: false
              example:
                status: 429
                type: too_many_requests
        '500':
          description: Internal Server Error. The service encountered an unexpected error.
          headers:
            upvest-request-id:
              required: true
              schema:
                type: string
                format: uuid
                example: 169ae4c7-ebd7-4041-94da-25369653eba7
          content:
            application/problem+json:
              schema:
                title: Error
                type: object
                description: ''
                properties:
                  type:
                    type: string
                    description: URL to a document describing the error condition.
                  status:
                    type: integer
                    description: >-
                      Transmission of the HTTP status code so that all
                      information can be found in one place, but also to correct
                      changes in the status code due to the use of proxy
                      servers.
                  title:
                    type: string
                    description: >-
                      A short, human-readable title for the general error type;
                      the title should not change for given types.
                  detail:
                    type: string
                    description: A human-readable description of the specific error.
                  instance:
                    type: string
                    description: >-
                      This optional key may be present, with a unique URI for
                      the specific error; this will often point to an error log
                      for that specific response.
                  request_id:
                    type: string
                    description: Correlation ID for the original request.
                required:
                  - type
                  - status
                additionalProperties: false
              example:
                status: 500
                type: internal_server_error
        '503':
          description: >-
            Service Unavailable. The service handling for this request cannot be
            reached at this time.
          headers:
            upvest-request-id:
              required: true
              schema:
                type: string
                format: uuid
                example: 169ae4c7-ebd7-4041-94da-25369653eba7
          content:
            application/problem+json:
              schema:
                title: Error
                type: object
                description: ''
                properties:
                  type:
                    type: string
                    description: URL to a document describing the error condition.
                  status:
                    type: integer
                    description: >-
                      Transmission of the HTTP status code so that all
                      information can be found in one place, but also to correct
                      changes in the status code due to the use of proxy
                      servers.
                  title:
                    type: string
                    description: >-
                      A short, human-readable title for the general error type;
                      the title should not change for given types.
                  detail:
                    type: string
                    description: A human-readable description of the specific error.
                  instance:
                    type: string
                    description: >-
                      This optional key may be present, with a unique URI for
                      the specific error; this will often point to an error log
                      for that specific response.
                  request_id:
                    type: string
                    description: Correlation ID for the original request.
                required:
                  - type
                  - status
                additionalProperties: false
              example:
                status: 503
                type: method_not_allowed
        '504':
          description: >-
            Gateway Timeout. The service gateway has reached its internal
            timeout.
          headers:
            upvest-request-id:
              required: true
              schema:
                type: string
                format: uuid
                example: 169ae4c7-ebd7-4041-94da-25369653eba7
          content:
            application/problem+json:
              schema:
                title: Error
                type: object
                description: ''
                properties:
                  type:
                    type: string
                    description: URL to a document describing the error condition.
                  status:
                    type: integer
                    description: >-
                      Transmission of the HTTP status code so that all
                      information can be found in one place, but also to correct
                      changes in the status code due to the use of proxy
                      servers.
                  title:
                    type: string
                    description: >-
                      A short, human-readable title for the general error type;
                      the title should not change for given types.
                  detail:
                    type: string
                    description: A human-readable description of the specific error.
                  instance:
                    type: string
                    description: >-
                      This optional key may be present, with a unique URI for
                      the specific error; this will often point to an error log
                      for that specific response.
                  request_id:
                    type: string
                    description: Correlation ID for the original request.
                required:
                  - type
                  - status
                additionalProperties: false
              example:
                status: 504
                type: gateway_timeout
  /users/{user_id}/tax_exemptions:
    parameters:
      - name: user_id
        in: path
        required: true
        schema:
          title: User unique identifier.
          type: string
          description: User unique identifier.
          format: uuid
      - name: upvest-client-id
        in: header
        description: Tenant Client ID
        required: true
        schema:
          type: string
          format: uuid
          example: ebabcf4d-61c3-4942-875c-e265a7c2d062
      - name: authorization
        in: header
        description: |
          Bearer (access) token from the OAuth flow with correct scopes.
          https://datatracker.ietf.org/doc/html/rfc6750
        required: true
        schema:
          type: string
          pattern: ^Bearer [a-zA-Z0-9\-\._~+/]*=*
          example: Bearer c2VjcmV0Cg==
      - name: signature
        in: header
        required: true
        schema:
          type: string
        description: >-
          https://tools.ietf.org/id/draft-ietf-httpbis-message-signatures-01.html#name-the-signature-http-header
      - name: signature-input
        in: header
        required: true
        schema:
          type: string
        description: >-
          https://tools.ietf.org/id/draft-ietf-httpbis-message-signatures-01.html#name-the-signature-input-http-he
      - name: upvest-api-version
        in: header
        required: false
        schema:
          type: string
          enum:
            - '1'
          default: '1'
          example: '1'
        description: 'Upvest API version (Note: Do not include quotation marks)'
    get:
      operationId: retrieve_tax_exemptions_for_user
      summary: List tax exemptions for a user
      description: Returns the tax exemptions of the user specified by ID.
      tags:
        - Tax Exemptions
      security:
        - oauth-client-credentials:
            - taxes:admin
      parameters:
        - name: sort
          in: query
          required: false
          schema:
            type: string
            enum:
              - created_at
            default: created_at
          description: Sort the result by `created_at`.
        - name: order
          in: query
          required: false
          schema:
            type: string
            enum:
              - ASC
              - DESC
            default: ASC
          description: >-
            Sort order of the result list if the `sort` parameter is specified.
            Use `ASC` for ascending or `DESC` for descending sort order.
        - name: offset
          in: query
          schema:
            type: integer
            minimum: 0
            format: int32
          allowEmptyValue: true
          description: >-
            Use the `offset` argument to specify where in the list of results to
            start when returning items for a particular query.
        - name: limit
          in: query
          schema:
            type: integer
            format: int32
            default: 100
            minimum: 0
            maximum: 1000
          allowEmptyValue: true
          description: >-
            Use the `limit` argument to specify the maximum number of items
            returned.
      responses:
        '200':
          description: OK
          headers:
            upvest-request-id:
              required: true
              schema:
                type: string
                format: uuid
                example: 169ae4c7-ebd7-4041-94da-25369653eba7
          content:
            application/json:
              schema:
                title: Tax Exemption - Retrieve For User - Response
                type: object
                properties:
                  meta:
                    type: object
                    properties:
                      offset:
                        type: integer
                        description: Amount of resource to offset in the response.
                      limit:
                        type: integer
                        description: Total limit of the response.
                      count:
                        type: integer
                        description: Count of the resources returned in the response.
                      total_count:
                        type: integer
                        description: Total count of all the resources.
                      sort:
                        type: string
                        description: The field that the list is sorted by.
                      order:
                        type: string
                        description: |-
                          The ordering of the response.
                          * ASC - Ascending order
                          * DESC - Descending order
                        enum:
                          - ASC
                          - DESC
                    required:
                      - offset
                      - limit
                      - count
                      - total_count
                  data:
                    type: array
                    items:
                      title: Webhook - Tax exemption - Created - Tax exemption
                      type: object
                      additionalProperties: false
                      properties:
                        id:
                          title: Tax Exemption Unique Identifier
                          type: string
                          description: Tax Exemption Unique Identifier
                          format: uuid
                        created_at:
                          type: string
                          format: date-time
                          description: >-
                            Date and time when the resource was created. [RFC
                            3339-5](https://datatracker.ietf.org/doc/html/rfc3339#section-5.6),
                            [ISO8601
                            UTC](https://www.iso.org/iso-8601-date-and-time-format.html)
                        updated_at:
                          type: string
                          format: date-time
                          description: >-
                            Date and time when the resource was last updated.
                            [RFC
                            3339-5](https://datatracker.ietf.org/doc/html/rfc3339#section-5.6),
                            [ISO8601
                            UTC](https://www.iso.org/iso-8601-date-and-time-format.html)
                        status:
                          title: Tax exemption status
                          type: string
                          description: >-
                            Tax exemption status 

                            * NEW - The tax exemption request is created. 

                            * ACTIVE - The tax exemption is valid and active for
                            the current year. 

                            * EXPIRED - The tax exemption is no longer `ACTIVE`
                            and the `valid_to_date` already lies in the past. An
                            update is not possible. 

                            * CANCELLED - The tax exemption could not be created
                            or was cancelled.
                          enum:
                            - NEW
                            - ACTIVE
                            - EXPIRED
                            - CANCELLED
                        user_ids:
                          description: >-
                            Ids of the users for whom the tax exemption was
                            created.
                          type: array
                          items:
                            title: User unique identifier.
                            type: string
                            description: User unique identifier.
                            format: uuid
                        country:
                          description: >-
                            Country code. [ISO 3166 alpha-2
                            Codes](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2).
                          type: string
                          pattern: ^[A-Z]{2}$
                        valid_from_date:
                          type: string
                          format: date
                          description: >-
                            Date from which the tax exemption is valid. [RFC
                            3339, section
                            5.6](https://json-schema.org/draft/2020-12/json-schema-validation.html#RFC3339)
                        valid_to_date:
                          type: string
                          format: date
                          nullable: true
                          description: >-
                            Date until which the tax exemption is valid. If it
                            is unlimited, it is omitted. For Germany it is
                            always the last day of the year (YYYY-12-31). [RFC
                            3339, section
                            5.6](https://json-schema.org/draft/2020-12/json-schema-validation.html#RFC3339)
                        tax_exemption_details:
                          title: Tax Exemption - German Tax Exemption Details
                          type: object
                          additionalProperties: false
                          properties:
                            tax_exemption_type:
                              title: Tax Exemption Type
                              type: string
                              description: |-
                                Tax exemption type 
                                * SINGLE - Tax exemption for Individual. 
                                * MARRIED - Tax exemption for married couples.
                              enum:
                                - SINGLE
                                - MARRIED
                            tax_exemption_amount:
                              title: >-
                                Tax Exemption - Create - Request - Tax Exemption
                                Details - Amount
                              type: object
                              additionalProperties: false
                              properties:
                                amount:
                                  type: string
                                  pattern: ^[0-9]{1,9}(\.[0-9]{2})?$
                                currency:
                                  type: string
                                  description: >-
                                    Alphabetic three-letter [ISO
                                    4217](https://en.wikipedia.org/wiki/ISO_4217)
                                    currency code.

                                    * EUR - Euro
                                  enum:
                                    - EUR
                                  default: EUR
                              required:
                                - amount
                                - currency
                            utilized_amount:
                              title: >-
                                Tax Exemption - Create - Request - Tax Exemption
                                Details - Amount
                              type: object
                              additionalProperties: false
                              properties:
                                amount:
                                  type: string
                                  pattern: ^[0-9]{1,9}(\.[0-9]{2})?$
                                currency:
                                  type: string
                                  description: >-
                                    Alphabetic three-letter [ISO
                                    4217](https://en.wikipedia.org/wiki/ISO_4217)
                                    currency code.

                                    * EUR - Euro
                                  enum:
                                    - EUR
                                  default: EUR
                              required:
                                - amount
                                - currency
                            remaining_amount:
                              title: >-
                                Tax Exemption - Create - Request - Tax Exemption
                                Details - Amount
                              type: object
                              additionalProperties: false
                              properties:
                                amount:
                                  type: string
                                  pattern: ^[0-9]{1,9}(\.[0-9]{2})?$
                                currency:
                                  type: string
                                  description: >-
                                    Alphabetic three-letter [ISO
                                    4217](https://en.wikipedia.org/wiki/ISO_4217)
                                    currency code.

                                    * EUR - Euro
                                  enum:
                                    - EUR
                                  default: EUR
                              required:
                                - amount
                                - currency
                          required:
                            - tax_exemption_type
                            - tax_exemption_amount
                            - utilized_amount
                            - remaining_amount
                      required:
                        - id
                        - status
                        - user_ids
                        - country
                        - valid_from_date
                        - valid_to_date
                        - tax_exemption_details
                        - created_at
                        - updated_at
                required:
                  - meta
                  - data
                additionalProperties: false
              example:
                meta:
                  offset: 0
                  limit: 100
                  count: 1
                  total_count: 1
                  sort: created_at
                  order: ASC
                data:
                  - id: f1a57a04-1a89-4dab-ae3a-ff9b2a9377c1
                    created_at: '2024-01-01T10:33:43Z'
                    updated_at: '2024-01-01T10:33:43Z'
                    status: ACTIVE
                    user_ids:
                      - 70821d79-366f-4873-804b-14857d690496
                    country: DE
                    valid_from_date: '2024-01-01'
                    valid_to_date: '2024-12-31'
                    tax_exemption_details:
                      tax_exemption_type: SINGLE
                      tax_exemption_amount:
                        amount: '1000.00'
                        currency: EUR
                      utilized_amount:
                        amount: '0.00'
                        currency: EUR
                      remaining_amount:
                        amount: '1000.00'
                        currency: EUR
        '400':
          description: Bad Request. The incoming request had a malformed parameter/object.
          headers:
            upvest-request-id:
              required: true
              schema:
                type: string
                format: uuid
                example: 169ae4c7-ebd7-4041-94da-25369653eba7
          content:
            application/problem+json:
              schema:
                title: Error
                type: object
                description: ''
                properties:
                  type:
                    type: string
                    description: URL to a document describing the error condition.
                  status:
                    type: integer
                    description: >-
                      Transmission of the HTTP status code so that all
                      information can be found in one place, but also to correct
                      changes in the status code due to the use of proxy
                      servers.
                  title:
                    type: string
                    description: >-
                      A short, human-readable title for the general error type;
                      the title should not change for given types.
                  detail:
                    type: string
                    description: A human-readable description of the specific error.
                  instance:
                    type: string
                    description: >-
                      This optional key may be present, with a unique URI for
                      the specific error; this will often point to an error log
                      for that specific response.
                  request_id:
                    type: string
                    description: Correlation ID for the original request.
                required:
                  - type
                  - status
                additionalProperties: false
              example:
                status: 400
                type: bad_request
        '401':
          description: Unauthorized. The caller has not been authenticated.
          headers:
            upvest-request-id:
              required: true
              schema:
                type: string
                format: uuid
                example: 169ae4c7-ebd7-4041-94da-25369653eba7
          content:
            application/problem+json:
              schema:
                title: Error
                type: object
                description: ''
                properties:
                  type:
                    type: string
                    description: URL to a document describing the error condition.
                  status:
                    type: integer
                    description: >-
                      Transmission of the HTTP status code so that all
                      information can be found in one place, but also to correct
                      changes in the status code due to the use of proxy
                      servers.
                  title:
                    type: string
                    description: >-
                      A short, human-readable title for the general error type;
                      the title should not change for given types.
                  detail:
                    type: string
                    description: A human-readable description of the specific error.
                  instance:
                    type: string
                    description: >-
                      This optional key may be present, with a unique URI for
                      the specific error; this will often point to an error log
                      for that specific response.
                  request_id:
                    type: string
                    description: Correlation ID for the original request.
                required:
                  - type
                  - status
                additionalProperties: false
              example:
                status: 401
                type: unauthorized
        '403':
          description: >-
            Forbidden. The caller has been authenticated but is not allowed to
            take the requested action.
          headers:
            upvest-request-id:
              required: true
              schema:
                type: string
                format: uuid
                example: 169ae4c7-ebd7-4041-94da-25369653eba7
          content:
            application/problem+json:
              schema:
                title: Error
                type: object
                description: ''
                properties:
                  type:
                    type: string
                    description: URL to a document describing the error condition.
                  status:
                    type: integer
                    description: >-
                      Transmission of the HTTP status code so that all
                      information can be found in one place, but also to correct
                      changes in the status code due to the use of proxy
                      servers.
                  title:
                    type: string
                    description: >-
                      A short, human-readable title for the general error type;
                      the title should not change for given types.
                  detail:
                    type: string
                    description: A human-readable description of the specific error.
                  instance:
                    type: string
                    description: >-
                      This optional key may be present, with a unique URI for
                      the specific error; this will often point to an error log
                      for that specific response.
                  request_id:
                    type: string
                    description: Correlation ID for the original request.
                required:
                  - type
                  - status
                additionalProperties: false
              example:
                status: 403
                type: forbidden
        '404':
          description: Not Found. The requested resource could not be found.
          headers:
            upvest-request-id:
              required: true
              schema:
                type: string
                format: uuid
                example: 169ae4c7-ebd7-4041-94da-25369653eba7
          content:
            application/problem+json:
              schema:
                title: Error
                type: object
                description: ''
                properties:
                  type:
                    type: string
                    description: URL to a document describing the error condition.
                  status:
                    type: integer
                    description: >-
                      Transmission of the HTTP status code so that all
                      information can be found in one place, but also to correct
                      changes in the status code due to the use of proxy
                      servers.
                  title:
                    type: string
                    description: >-
                      A short, human-readable title for the general error type;
                      the title should not change for given types.
                  detail:
                    type: string
                    description: A human-readable description of the specific error.
                  instance:
                    type: string
                    description: >-
                      This optional key may be present, with a unique URI for
                      the specific error; this will often point to an error log
                      for that specific response.
                  request_id:
                    type: string
                    description: Correlation ID for the original request.
                required:
                  - type
                  - status
                additionalProperties: false
              example:
                status: 404
                type: not_found
        '405':
          description: >-
            Method Not Allowed. The requested method is not allowed on the
            requested resource.
          headers:
            upvest-request-id:
              required: true
              schema:
                type: string
                format: uuid
                example: 169ae4c7-ebd7-4041-94da-25369653eba7
          content:
            application/problem+json:
              schema:
                title: Error
                type: object
                description: ''
                properties:
                  type:
                    type: string
                    description: URL to a document describing the error condition.
                  status:
                    type: integer
                    description: >-
                      Transmission of the HTTP status code so that all
                      information can be found in one place, but also to correct
                      changes in the status code due to the use of proxy
                      servers.
                  title:
                    type: string
                    description: >-
                      A short, human-readable title for the general error type;
                      the title should not change for given types.
                  detail:
                    type: string
                    description: A human-readable description of the specific error.
                  instance:
                    type: string
                    description: >-
                      This optional key may be present, with a unique URI for
                      the specific error; this will often point to an error log
                      for that specific response.
                  request_id:
                    type: string
                    description: Correlation ID for the original request.
                required:
                  - type
                  - status
                additionalProperties: false
              example:
                status: 405
                type: method_not_allowed
        '406':
          description: >-
            Not Acceptable. The resource does not have a current representation
            that would be acceptable to the user agent. "Accept" header defined
            unsupported value.
          headers:
            upvest-request-id:
              required: true
              schema:
                type: string
                format: uuid
                example: 169ae4c7-ebd7-4041-94da-25369653eba7
          content:
            application/problem+json:
              schema:
                title: Error
                type: object
                description: ''
                properties:
                  type:
                    type: string
                    description: URL to a document describing the error condition.
                  status:
                    type: integer
                    description: >-
                      Transmission of the HTTP status code so that all
                      information can be found in one place, but also to correct
                      changes in the status code due to the use of proxy
                      servers.
                  title:
                    type: string
                    description: >-
                      A short, human-readable title for the general error type;
                      the title should not change for given types.
                  detail:
                    type: string
                    description: A human-readable description of the specific error.
                  instance:
                    type: string
                    description: >-
                      This optional key may be present, with a unique URI for
                      the specific error; this will often point to an error log
                      for that specific response.
                  request_id:
                    type: string
                    description: Correlation ID for the original request.
                required:
                  - type
                  - status
                additionalProperties: false
              example:
                status: 406
                type: not_acceptable
        '429':
          description: >-
            Too Many Requests. The caller has exceeded their quota for the time
            period and has been throttled.
          headers:
            upvest-request-id:
              required: true
              schema:
                type: string
                format: uuid
                example: 169ae4c7-ebd7-4041-94da-25369653eba7
          content:
            application/problem+json:
              schema:
                title: Error
                type: object
                description: ''
                properties:
                  type:
                    type: string
                    description: URL to a document describing the error condition.
                  status:
                    type: integer
                    description: >-
                      Transmission of the HTTP status code so that all
                      information can be found in one place, but also to correct
                      changes in the status code due to the use of proxy
                      servers.
                  title:
                    type: string
                    description: >-
                      A short, human-readable title for the general error type;
                      the title should not change for given types.
                  detail:
                    type: string
                    description: A human-readable description of the specific error.
                  instance:
                    type: string
                    description: >-
                      This optional key may be present, with a unique URI for
                      the specific error; this will often point to an error log
                      for that specific response.
                  request_id:
                    type: string
                    description: Correlation ID for the original request.
                required:
                  - type
                  - status
                additionalProperties: false
              example:
                status: 429
                type: too_many_requests
        '500':
          description: Internal Server Error. The service encountered an unexpected error.
          headers:
            upvest-request-id:
              required: true
              schema:
                type: string
                format: uuid
                example: 169ae4c7-ebd7-4041-94da-25369653eba7
          content:
            application/problem+json:
              schema:
                title: Error
                type: object
                description: ''
                properties:
                  type:
                    type: string
                    description: URL to a document describing the error condition.
                  status:
                    type: integer
                    description: >-
                      Transmission of the HTTP status code so that all
                      information can be found in one place, but also to correct
                      changes in the status code due to the use of proxy
                      servers.
                  title:
                    type: string
                    description: >-
                      A short, human-readable title for the general error type;
                      the title should not change for given types.
                  detail:
                    type: string
                    description: A human-readable description of the specific error.
                  instance:
                    type: string
                    description: >-
                      This optional key may be present, with a unique URI for
                      the specific error; this will often point to an error log
                      for that specific response.
                  request_id:
                    type: string
                    description: Correlation ID for the original request.
                required:
                  - type
                  - status
                additionalProperties: false
              example:
                status: 500
                type: internal_server_error
        '503':
          description: >-
            Service Unavailable. The service handling for this request cannot be
            reached at this time.
          headers:
            upvest-request-id:
              required: true
              schema:
                type: string
                format: uuid
                example: 169ae4c7-ebd7-4041-94da-25369653eba7
          content:
            application/problem+json:
              schema:
                title: Error
                type: object
                description: ''
                properties:
                  type:
                    type: string
                    description: URL to a document describing the error condition.
                  status:
                    type: integer
                    description: >-
                      Transmission of the HTTP status code so that all
                      information can be found in one place, but also to correct
                      changes in the status code due to the use of proxy
                      servers.
                  title:
                    type: string
                    description: >-
                      A short, human-readable title for the general error type;
                      the title should not change for given types.
                  detail:
                    type: string
                    description: A human-readable description of the specific error.
                  instance:
                    type: string
                    description: >-
                      This optional key may be present, with a unique URI for
                      the specific error; this will often point to an error log
                      for that specific response.
                  request_id:
                    type: string
                    description: Correlation ID for the original request.
                required:
                  - type
                  - status
                additionalProperties: false
              example:
                status: 503
                type: method_not_allowed
        '504':
          description: >-
            Gateway Timeout. The service gateway has reached its internal
            timeout.
          headers:
            upvest-request-id:
              required: true
              schema:
                type: string
                format: uuid
                example: 169ae4c7-ebd7-4041-94da-25369653eba7
          content:
            application/problem+json:
              schema:
                title: Error
                type: object
                description: ''
                properties:
                  type:
                    type: string
                    description: URL to a document describing the error condition.
                  status:
                    type: integer
                    description: >-
                      Transmission of the HTTP status code so that all
                      information can be found in one place, but also to correct
                      changes in the status code due to the use of proxy
                      servers.
                  title:
                    type: string
                    description: >-
                      A short, human-readable title for the general error type;
                      the title should not change for given types.
                  detail:
                    type: string
                    description: A human-readable description of the specific error.
                  instance:
                    type: string
                    description: >-
                      This optional key may be present, with a unique URI for
                      the specific error; this will often point to an error log
                      for that specific response.
                  request_id:
                    type: string
                    description: Correlation ID for the original request.
                required:
                  - type
                  - status
                additionalProperties: false
              example:
                status: 504
                type: gateway_timeout
  /isa/wrappers:
    parameters:
      - name: upvest-client-id
        in: header
        description: Tenant Client ID
        required: true
        schema:
          type: string
          format: uuid
          example: ebabcf4d-61c3-4942-875c-e265a7c2d062
      - name: authorization
        in: header
        description: |
          Bearer (access) token from the OAuth flow with correct scopes.
          https://datatracker.ietf.org/doc/html/rfc6750
        required: true
        schema:
          type: string
          pattern: ^Bearer [a-zA-Z0-9\-\._~+/]*=*
          example: Bearer c2VjcmV0Cg==
      - name: signature
        in: header
        required: true
        schema:
          type: string
        description: >-
          https://tools.ietf.org/id/draft-ietf-httpbis-message-signatures-01.html#name-the-signature-http-header
      - name: signature-input
        in: header
        required: true
        schema:
          type: string
        description: >-
          https://tools.ietf.org/id/draft-ietf-httpbis-message-signatures-01.html#name-the-signature-input-http-he
      - name: upvest-api-version
        in: header
        required: false
        schema:
          type: string
          enum:
            - '1'
          default: '1'
          example: '1'
        description: 'Upvest API version (Note: Do not include quotation marks)'
    post:
      operationId: create_isa_tax_wrapper
      summary: Create a tax wrapper for ISA account
      description: Creates a tax wrapper for ISA account.
      tags:
        - Tax Wrappers
      security:
        - oauth-client-credentials:
            - taxes:admin
      parameters:
        - name: idempotency-key
          in: header
          required: true
          schema:
            type: string
            format: uuid
            pattern: >-
              ^[0-9a-fA-F]{8}-?[0-9a-fA-F]{4}-?[0-5][0-9a-fA-F]{3}-?[089abAB][0-9a-fA-F]{3}-?[0-9a-fA-F]{12}$
            example: ccb07f42-4104-44ad-8e1f-c660bb7b269c
          description: >
            A UUID to be used as an idempotency key.  This prevents a duplicate
            request from being replayed.

            https://docs.upvest.co/documentation/concepts/api_concepts/idempotency
      requestBody:
        content:
          application/json:
            schema:
              title: Tax Wrappers - Create ISA Tax Wrapper - Request
              type: object
              additionalProperties: false
              properties:
                account_group_id:
                  type: string
                  format: uuid
                  description: >-
                    The ID of the account group to which the tax wrapper
                    belongs.
                type:
                  type: string
                  description: Types of the ISA tax wrapper
                  enum:
                    - STOCKS_AND_SHARES_ISA
                  default: STOCKS_AND_SHARES_ISA
                is_flexible:
                  type: boolean
                  description: True if ISA is flexible.
              required:
                - type
                - account_group_id
                - is_flexible
            example:
              account_group_id: 0d68fea2-66e8-4ea8-b507-276e7a1eb4aa
              type: STOCKS_AND_SHARES_ISA
              is_flexible: true
      responses:
        '200':
          description: ISA tax wrapper created.
          headers:
            upvest-request-id:
              required: true
              schema:
                type: string
                format: uuid
                example: 169ae4c7-ebd7-4041-94da-25369653eba7
          content:
            application/json:
              schema:
                title: Tax Wrappers - ISA Tax Wrapper
                type: object
                additionalProperties: false
                properties:
                  id:
                    type: string
                    description: Tax wrapper unique identifier.
                    format: uuid
                  created_at:
                    type: string
                    description: The date and time the tax wrapper was created.
                    format: date-time
                  updated_at:
                    type: string
                    description: The date and time the tax wrapper was last updated.
                    format: date-time
                  account_group_id:
                    type: string
                    description: Account group unique identifier.
                    format: uuid
                  is_flexible:
                    type: boolean
                    description: True if tax wrapper is flexible.
                  status:
                    type: string
                    description: >-
                      Status of the tax wrapper

                      * NEW - The tax wrapper is newly created and not yet
                      active due to pending checks.

                      * ACTIVE - The tax wrapper is currently active and in use.

                      * INACTIVE - The tax wrapper is not currently active. New
                      subscriptions not allowed.

                      * CLOSED - The tax wrapper has been closed and is no
                      longer available.
                    enum:
                      - NEW
                      - ACTIVE
                      - INACTIVE
                      - CLOSED
                  type:
                    type: string
                    description: Types of the ISA tax wrapper
                    enum:
                      - STOCKS_AND_SHARES_ISA
                    default: STOCKS_AND_SHARES_ISA
                required:
                  - id
                  - created_at
                  - updated_at
                  - account_group_id
                  - is_flexible
                  - status
                  - type
              example:
                id: f1a57a04-1a89-4dab-ae3a-ff9b2a9377c1
                created_at: '2025-10-05T14:48:00.000Z'
                updated_at: '2025-10-05T14:48:00.000Z'
                account_group_id: 0d68fea2-66e8-4ea8-b507-276e7a1eb4aa
                is_flexible: true
                status: NEW
                type: STOCKS_AND_SHARES_ISA
        '400':
          description: Bad Request. The incoming request had a malformed parameter/object.
          headers:
            upvest-request-id:
              required: true
              schema:
                type: string
                format: uuid
                example: 169ae4c7-ebd7-4041-94da-25369653eba7
          content:
            application/problem+json:
              schema:
                title: Error
                type: object
                description: ''
                properties:
                  type:
                    type: string
                    description: URL to a document describing the error condition.
                  status:
                    type: integer
                    description: >-
                      Transmission of the HTTP status code so that all
                      information can be found in one place, but also to correct
                      changes in the status code due to the use of proxy
                      servers.
                  title:
                    type: string
                    description: >-
                      A short, human-readable title for the general error type;
                      the title should not change for given types.
                  detail:
                    type: string
                    description: A human-readable description of the specific error.
                  instance:
                    type: string
                    description: >-
                      This optional key may be present, with a unique URI for
                      the specific error; this will often point to an error log
                      for that specific response.
                  request_id:
                    type: string
                    description: Correlation ID for the original request.
                required:
                  - type
                  - status
                additionalProperties: false
              example:
                status: 400
                type: bad_request
        '401':
          description: Unauthorized. The caller has not been authenticated.
          headers:
            upvest-request-id:
              required: true
              schema:
                type: string
                format: uuid
                example: 169ae4c7-ebd7-4041-94da-25369653eba7
          content:
            application/problem+json:
              schema:
                title: Error
                type: object
                description: ''
                properties:
                  type:
                    type: string
                    description: URL to a document describing the error condition.
                  status:
                    type: integer
                    description: >-
                      Transmission of the HTTP status code so that all
                      information can be found in one place, but also to correct
                      changes in the status code due to the use of proxy
                      servers.
                  title:
                    type: string
                    description: >-
                      A short, human-readable title for the general error type;
                      the title should not change for given types.
                  detail:
                    type: string
                    description: A human-readable description of the specific error.
                  instance:
                    type: string
                    description: >-
                      This optional key may be present, with a unique URI for
                      the specific error; this will often point to an error log
                      for that specific response.
                  request_id:
                    type: string
                    description: Correlation ID for the original request.
                required:
                  - type
                  - status
                additionalProperties: false
              example:
                status: 401
                type: unauthorized
        '403':
          description: >-
            Forbidden. The caller has been authenticated but is not allowed to
            take the requested action.
          headers:
            upvest-request-id:
              required: true
              schema:
                type: string
                format: uuid
                example: 169ae4c7-ebd7-4041-94da-25369653eba7
          content:
            application/problem+json:
              schema:
                title: Error
                type: object
                description: ''
                properties:
                  type:
                    type: string
                    description: URL to a document describing the error condition.
                  status:
                    type: integer
                    description: >-
                      Transmission of the HTTP status code so that all
                      information can be found in one place, but also to correct
                      changes in the status code due to the use of proxy
                      servers.
                  title:
                    type: string
                    description: >-
                      A short, human-readable title for the general error type;
                      the title should not change for given types.
                  detail:
                    type: string
                    description: A human-readable description of the specific error.
                  instance:
                    type: string
                    description: >-
                      This optional key may be present, with a unique URI for
                      the specific error; this will often point to an error log
                      for that specific response.
                  request_id:
                    type: string
                    description: Correlation ID for the original request.
                required:
                  - type
                  - status
                additionalProperties: false
              example:
                status: 403
                type: forbidden
        '404':
          description: Not Found. The requested resource could not be found.
          headers:
            upvest-request-id:
              required: true
              schema:
                type: string
                format: uuid
                example: 169ae4c7-ebd7-4041-94da-25369653eba7
          content:
            application/problem+json:
              schema:
                title: Error
                type: object
                description: ''
                properties:
                  type:
                    type: string
                    description: URL to a document describing the error condition.
                  status:
                    type: integer
                    description: >-
                      Transmission of the HTTP status code so that all
                      information can be found in one place, but also to correct
                      changes in the status code due to the use of proxy
                      servers.
                  title:
                    type: string
                    description: >-
                      A short, human-readable title for the general error type;
                      the title should not change for given types.
                  detail:
                    type: string
                    description: A human-readable description of the specific error.
                  instance:
                    type: string
                    description: >-
                      This optional key may be present, with a unique URI for
                      the specific error; this will often point to an error log
                      for that specific response.
                  request_id:
                    type: string
                    description: Correlation ID for the original request.
                required:
                  - type
                  - status
                additionalProperties: false
              example:
                status: 404
                type: not_found
        '406':
          description: >-
            Not Acceptable. The resource does not have a current representation
            that would be acceptable to the user agent. "Accept" header defined
            unsupported value.
          headers:
            upvest-request-id:
              required: true
              schema:
                type: string
                format: uuid
                example: 169ae4c7-ebd7-4041-94da-25369653eba7
          content:
            application/problem+json:
              schema:
                title: Error
                type: object
                description: ''
                properties:
                  type:
                    type: string
                    description: URL to a document describing the error condition.
                  status:
                    type: integer
                    description: >-
                      Transmission of the HTTP status code so that all
                      information can be found in one place, but also to correct
                      changes in the status code due to the use of proxy
                      servers.
                  title:
                    type: string
                    description: >-
                      A short, human-readable title for the general error type;
                      the title should not change for given types.
                  detail:
                    type: string
                    description: A human-readable description of the specific error.
                  instance:
                    type: string
                    description: >-
                      This optional key may be present, with a unique URI for
                      the specific error; this will often point to an error log
                      for that specific response.
                  request_id:
                    type: string
                    description: Correlation ID for the original request.
                required:
                  - type
                  - status
                additionalProperties: false
              example:
                status: 406
                type: not_acceptable
        '429':
          description: >-
            Too Many Requests. The caller has exceeded their quota for the time
            period and has been throttled.
          headers:
            upvest-request-id:
              required: true
              schema:
                type: string
                format: uuid
                example: 169ae4c7-ebd7-4041-94da-25369653eba7
          content:
            application/problem+json:
              schema:
                title: Error
                type: object
                description: ''
                properties:
                  type:
                    type: string
                    description: URL to a document describing the error condition.
                  status:
                    type: integer
                    description: >-
                      Transmission of the HTTP status code so that all
                      information can be found in one place, but also to correct
                      changes in the status code due to the use of proxy
                      servers.
                  title:
                    type: string
                    description: >-
                      A short, human-readable title for the general error type;
                      the title should not change for given types.
                  detail:
                    type: string
                    description: A human-readable description of the specific error.
                  instance:
                    type: string
                    description: >-
                      This optional key may be present, with a unique URI for
                      the specific error; this will often point to an error log
                      for that specific response.
                  request_id:
                    type: string
                    description: Correlation ID for the original request.
                required:
                  - type
                  - status
                additionalProperties: false
              example:
                status: 429
                type: too_many_requests
        '500':
          description: Internal Server Error. The service encountered an unexpected error.
          headers:
            upvest-request-id:
              required: true
              schema:
                type: string
                format: uuid
                example: 169ae4c7-ebd7-4041-94da-25369653eba7
          content:
            application/problem+json:
              schema:
                title: Error
                type: object
                description: ''
                properties:
                  type:
                    type: string
                    description: URL to a document describing the error condition.
                  status:
                    type: integer
                    description: >-
                      Transmission of the HTTP status code so that all
                      information can be found in one place, but also to correct
                      changes in the status code due to the use of proxy
                      servers.
                  title:
                    type: string
                    description: >-
                      A short, human-readable title for the general error type;
                      the title should not change for given types.
                  detail:
                    type: string
                    description: A human-readable description of the specific error.
                  instance:
                    type: string
                    description: >-
                      This optional key may be present, with a unique URI for
                      the specific error; this will often point to an error log
                      for that specific response.
                  request_id:
                    type: string
                    description: Correlation ID for the original request.
                required:
                  - type
                  - status
                additionalProperties: false
              example:
                status: 500
                type: internal_server_error
        '503':
          description: >-
            Service Unavailable. The service handling for this request cannot be
            reached at this time.
          headers:
            upvest-request-id:
              required: true
              schema:
                type: string
                format: uuid
                example: 169ae4c7-ebd7-4041-94da-25369653eba7
          content:
            application/problem+json:
              schema:
                title: Error
                type: object
                description: ''
                properties:
                  type:
                    type: string
                    description: URL to a document describing the error condition.
                  status:
                    type: integer
                    description: >-
                      Transmission of the HTTP status code so that all
                      information can be found in one place, but also to correct
                      changes in the status code due to the use of proxy
                      servers.
                  title:
                    type: string
                    description: >-
                      A short, human-readable title for the general error type;
                      the title should not change for given types.
                  detail:
                    type: string
                    description: A human-readable description of the specific error.
                  instance:
                    type: string
                    description: >-
                      This optional key may be present, with a unique URI for
                      the specific error; this will often point to an error log
                      for that specific response.
                  request_id:
                    type: string
                    description: Correlation ID for the original request.
                required:
                  - type
                  - status
                additionalProperties: false
              example:
                status: 503
                type: method_not_allowed
        '504':
          description: >-
            Gateway Timeout. The service gateway has reached its internal
            timeout.
          headers:
            upvest-request-id:
              required: true
              schema:
                type: string
                format: uuid
                example: 169ae4c7-ebd7-4041-94da-25369653eba7
          content:
            application/problem+json:
              schema:
                title: Error
                type: object
                description: ''
                properties:
                  type:
                    type: string
                    description: URL to a document describing the error condition.
                  status:
                    type: integer
                    description: >-
                      Transmission of the HTTP status code so that all
                      information can be found in one place, but also to correct
                      changes in the status code due to the use of proxy
                      servers.
                  title:
                    type: string
                    description: >-
                      A short, human-readable title for the general error type;
                      the title should not change for given types.
                  detail:
                    type: string
                    description: A human-readable description of the specific error.
                  instance:
                    type: string
                    description: >-
                      This optional key may be present, with a unique URI for
                      the specific error; this will often point to an error log
                      for that specific response.
                  request_id:
                    type: string
                    description: Correlation ID for the original request.
                required:
                  - type
                  - status
                additionalProperties: false
              example:
                status: 504
                type: gateway_timeout
  /isa/wrappers/{tax_wrapper_id}/allowances:
    parameters:
      - name: tax_wrapper_id
        description: ''
        in: path
        required: true
        schema:
          title: Tax Wrapper Unique Identifier
          type: string
          description: Tax wrapper unique identifier
          format: uuid
      - name: upvest-client-id
        in: header
        description: Tenant Client ID
        required: true
        schema:
          type: string
          format: uuid
          example: ebabcf4d-61c3-4942-875c-e265a7c2d062
      - name: authorization
        in: header
        description: |
          Bearer (access) token from the OAuth flow with correct scopes.
          https://datatracker.ietf.org/doc/html/rfc6750
        required: true
        schema:
          type: string
          pattern: ^Bearer [a-zA-Z0-9\-\._~+/]*=*
          example: Bearer c2VjcmV0Cg==
      - name: signature
        in: header
        required: true
        schema:
          type: string
        description: >-
          https://tools.ietf.org/id/draft-ietf-httpbis-message-signatures-01.html#name-the-signature-http-header
      - name: signature-input
        in: header
        required: true
        schema:
          type: string
        description: >-
          https://tools.ietf.org/id/draft-ietf-httpbis-message-signatures-01.html#name-the-signature-input-http-he
      - name: upvest-api-version
        in: header
        required: false
        schema:
          type: string
          enum:
            - '1'
          default: '1'
          example: '1'
        description: 'Upvest API version (Note: Do not include quotation marks)'
    get:
      operationId: retrieve_isa_allowances
      summary: Retrieve ISA allowances
      description: Retrieves ISA allowances
      tags:
        - Tax Wrappers
      security:
        - oauth-client-credentials:
            - taxes:admin
      parameters:
        - name: tax_year
          in: query
          required: false
          description: Filter allowances by tax_year YYYY/YYYY
          schema:
            type: string
            pattern: ^[0-9]{4}\/[0-9]{4}$
      responses:
        '200':
          description: OK
          headers:
            upvest-request-id:
              required: true
              schema:
                type: string
                format: uuid
                example: 169ae4c7-ebd7-4041-94da-25369653eba7
          content:
            application/json:
              schema:
                title: Tax Wrappers - Retrieve ISA Allowances - Response
                type: object
                properties:
                  meta:
                    type: object
                    properties:
                      offset:
                        type: integer
                        description: Amount of resource to offset in the response.
                      limit:
                        type: integer
                        description: Total limit of the response.
                      count:
                        type: integer
                        description: Count of the resources returned in the response.
                      total_count:
                        type: integer
                        description: Total count of all the resources.
                      sort:
                        type: string
                        description: The field that the list is sorted by.
                      order:
                        type: string
                        description: |-
                          The ordering of the response.
                          * ASC - Ascending order
                          * DESC - Descending order
                        enum:
                          - ASC
                          - DESC
                    required:
                      - offset
                      - limit
                      - count
                      - total_count
                  data:
                    type: array
                    items:
                      title: Tax Wrappers - ISA Allowance
                      type: object
                      additionalProperties: false
                      properties:
                        id:
                          type: string
                          description: Allowance unique identifier.
                          format: uuid
                        created_at:
                          type: string
                          description: The date and time the tax wrapper was created.
                          format: date-time
                        updated_at:
                          type: string
                          description: The date and time the tax wrapper was last updated.
                          format: date-time
                        tax_wrapper_id:
                          type: string
                          description: Tax wrapper unique identifier.
                          format: uuid
                        tax_year:
                          oneOf:
                            - type: 'null'
                            - type: string
                              description: >-
                                Tax year the allowance applies to, in the format
                                'YYYY/YYYY'.
                              pattern: ^[0-9]{4}/[0-9]{4}$
                        type:
                          type: string
                          description: |-
                            Type of the allowance:
                            * ANNUAL - Allowance valid for a tax year.
                          enum:
                            - ANNUAL
                          default: ANNUAL
                        status:
                          type: string
                          description: |-
                            Status of the allowance:
                            * ACTIVE - Current allowance.
                            * EXPIRED - Allowance from previous years.
                          enum:
                            - ACTIVE
                            - EXPIRED
                        currency:
                          type: string
                          description: >-
                            Alphabetic three-letter [ISO
                            4217](https://en.wikipedia.org/wiki/ISO_4217)
                            currency code.

                            * GBP - British Pound Sterling
                          enum:
                            - GBP
                          default: GBP
                        total_amount:
                          type: string
                          pattern: ^[0-9]{1,9}(\.[0-9]{2})?$
                        used_amount:
                          type: string
                          pattern: ^[0-9]{1,9}(\.[0-9]{2})?$
                        remaining_amount:
                          type: string
                          pattern: ^[0-9]{1,9}(\.[0-9]{2})?$
                        valid_from:
                          type: string
                          description: The date from which the allowance is valid.
                          format: date-time
                        valid_to:
                          oneOf:
                            - type: 'null'
                            - type: string
                              format: date-time
                              description: The date until which the allowance is valid.
                        first_subscription_at:
                          oneOf:
                            - type: 'null'
                            - type: string
                              format: date-time
                              description: >-
                                The date of the first subscription that used
                                this allowance.
                      required:
                        - id
                        - created_at
                        - updated_at
                        - tax_wrapper_id
                        - type
                        - status
                        - currency
                        - total_amount
                        - used_amount
                        - remaining_amount
                        - valid_from
                required:
                  - meta
                  - data
                additionalProperties: false
              example:
                meta:
                  offset: 0
                  limit: 100
                  count: 1
                  total_count: 1
                  sort: valid_from
                  order: DESC
                data:
                  - id: f1a57a04-1a89-4dab-ae3a-ff9b2a9377c1
                    created_at: '2025-10-05T14:48:00.000Z'
                    updated_at: '2025-10-05T14:48:00.000Z'
                    tax_wrapper_id: 0d68fea2-66e8-4ea8-b507-276e7a1eb4aa
                    tax_year: 2025/2026
                    type: ANNUAL
                    status: ACTIVE
                    currency: GBP
                    total_amount: '20000.00'
                    used_amount: '0.00'
                    remaining_amount: '20000.00'
                    valid_from: '2025-04-06T00:00:00.000Z'
                    valid_to: '2026-04-05T23:59:59.000Z'
                    first_subscription_at: '2025-04-06T00:00:00.000Z'
        '400':
          description: Bad Request. The incoming request had a malformed parameter/object.
          headers:
            upvest-request-id:
              required: true
              schema:
                type: string
                format: uuid
                example: 169ae4c7-ebd7-4041-94da-25369653eba7
          content:
            application/problem+json:
              schema:
                title: Error
                type: object
                description: ''
                properties:
                  type:
                    type: string
                    description: URL to a document describing the error condition.
                  status:
                    type: integer
                    description: >-
                      Transmission of the HTTP status code so that all
                      information can be found in one place, but also to correct
                      changes in the status code due to the use of proxy
                      servers.
                  title:
                    type: string
                    description: >-
                      A short, human-readable title for the general error type;
                      the title should not change for given types.
                  detail:
                    type: string
                    description: A human-readable description of the specific error.
                  instance:
                    type: string
                    description: >-
                      This optional key may be present, with a unique URI for
                      the specific error; this will often point to an error log
                      for that specific response.
                  request_id:
                    type: string
                    description: Correlation ID for the original request.
                required:
                  - type
                  - status
                additionalProperties: false
              example:
                status: 400
                type: bad_request
        '401':
          description: Unauthorized. The caller has not been authenticated.
          headers:
            upvest-request-id:
              required: true
              schema:
                type: string
                format: uuid
                example: 169ae4c7-ebd7-4041-94da-25369653eba7
          content:
            application/problem+json:
              schema:
                title: Error
                type: object
                description: ''
                properties:
                  type:
                    type: string
                    description: URL to a document describing the error condition.
                  status:
                    type: integer
                    description: >-
                      Transmission of the HTTP status code so that all
                      information can be found in one place, but also to correct
                      changes in the status code due to the use of proxy
                      servers.
                  title:
                    type: string
                    description: >-
                      A short, human-readable title for the general error type;
                      the title should not change for given types.
                  detail:
                    type: string
                    description: A human-readable description of the specific error.
                  instance:
                    type: string
                    description: >-
                      This optional key may be present, with a unique URI for
                      the specific error; this will often point to an error log
                      for that specific response.
                  request_id:
                    type: string
                    description: Correlation ID for the original request.
                required:
                  - type
                  - status
                additionalProperties: false
              example:
                status: 401
                type: unauthorized
        '403':
          description: >-
            Forbidden. The caller has been authenticated but is not allowed to
            take the requested action.
          headers:
            upvest-request-id:
              required: true
              schema:
                type: string
                format: uuid
                example: 169ae4c7-ebd7-4041-94da-25369653eba7
          content:
            application/problem+json:
              schema:
                title: Error
                type: object
                description: ''
                properties:
                  type:
                    type: string
                    description: URL to a document describing the error condition.
                  status:
                    type: integer
                    description: >-
                      Transmission of the HTTP status code so that all
                      information can be found in one place, but also to correct
                      changes in the status code due to the use of proxy
                      servers.
                  title:
                    type: string
                    description: >-
                      A short, human-readable title for the general error type;
                      the title should not change for given types.
                  detail:
                    type: string
                    description: A human-readable description of the specific error.
                  instance:
                    type: string
                    description: >-
                      This optional key may be present, with a unique URI for
                      the specific error; this will often point to an error log
                      for that specific response.
                  request_id:
                    type: string
                    description: Correlation ID for the original request.
                required:
                  - type
                  - status
                additionalProperties: false
              example:
                status: 403
                type: forbidden
        '404':
          description: Not Found. The requested resource could not be found.
          headers:
            upvest-request-id:
              required: true
              schema:
                type: string
                format: uuid
                example: 169ae4c7-ebd7-4041-94da-25369653eba7
          content:
            application/problem+json:
              schema:
                title: Error
                type: object
                description: ''
                properties:
                  type:
                    type: string
                    description: URL to a document describing the error condition.
                  status:
                    type: integer
                    description: >-
                      Transmission of the HTTP status code so that all
                      information can be found in one place, but also to correct
                      changes in the status code due to the use of proxy
                      servers.
                  title:
                    type: string
                    description: >-
                      A short, human-readable title for the general error type;
                      the title should not change for given types.
                  detail:
                    type: string
                    description: A human-readable description of the specific error.
                  instance:
                    type: string
                    description: >-
                      This optional key may be present, with a unique URI for
                      the specific error; this will often point to an error log
                      for that specific response.
                  request_id:
                    type: string
                    description: Correlation ID for the original request.
                required:
                  - type
                  - status
                additionalProperties: false
              example:
                status: 404
                type: not_found
        '405':
          description: >-
            Method Not Allowed. The requested method is not allowed on the
            requested resource.
          headers:
            upvest-request-id:
              required: true
              schema:
                type: string
                format: uuid
                example: 169ae4c7-ebd7-4041-94da-25369653eba7
          content:
            application/problem+json:
              schema:
                title: Error
                type: object
                description: ''
                properties:
                  type:
                    type: string
                    description: URL to a document describing the error condition.
                  status:
                    type: integer
                    description: >-
                      Transmission of the HTTP status code so that all
                      information can be found in one place, but also to correct
                      changes in the status code due to the use of proxy
                      servers.
                  title:
                    type: string
                    description: >-
                      A short, human-readable title for the general error type;
                      the title should not change for given types.
                  detail:
                    type: string
                    description: A human-readable description of the specific error.
                  instance:
                    type: string
                    description: >-
                      This optional key may be present, with a unique URI for
                      the specific error; this will often point to an error log
                      for that specific response.
                  request_id:
                    type: string
                    description: Correlation ID for the original request.
                required:
                  - type
                  - status
                additionalProperties: false
              example:
                status: 405
                type: method_not_allowed
        '406':
          description: >-
            Not Acceptable. The resource does not have a current representation
            that would be acceptable to the user agent. "Accept" header defined
            unsupported value.
          headers:
            upvest-request-id:
              required: true
              schema:
                type: string
                format: uuid
                example: 169ae4c7-ebd7-4041-94da-25369653eba7
          content:
            application/problem+json:
              schema:
                title: Error
                type: object
                description: ''
                properties:
                  type:
                    type: string
                    description: URL to a document describing the error condition.
                  status:
                    type: integer
                    description: >-
                      Transmission of the HTTP status code so that all
                      information can be found in one place, but also to correct
                      changes in the status code due to the use of proxy
                      servers.
                  title:
                    type: string
                    description: >-
                      A short, human-readable title for the general error type;
                      the title should not change for given types.
                  detail:
                    type: string
                    description: A human-readable description of the specific error.
                  instance:
                    type: string
                    description: >-
                      This optional key may be present, with a unique URI for
                      the specific error; this will often point to an error log
                      for that specific response.
                  request_id:
                    type: string
                    description: Correlation ID for the original request.
                required:
                  - type
                  - status
                additionalProperties: false
              example:
                status: 406
                type: not_acceptable
        '429':
          description: >-
            Too Many Requests. The caller has exceeded their quota for the time
            period and has been throttled.
          headers:
            upvest-request-id:
              required: true
              schema:
                type: string
                format: uuid
                example: 169ae4c7-ebd7-4041-94da-25369653eba7
          content:
            application/problem+json:
              schema:
                title: Error
                type: object
                description: ''
                properties:
                  type:
                    type: string
                    description: URL to a document describing the error condition.
                  status:
                    type: integer
                    description: >-
                      Transmission of the HTTP status code so that all
                      information can be found in one place, but also to correct
                      changes in the status code due to the use of proxy
                      servers.
                  title:
                    type: string
                    description: >-
                      A short, human-readable title for the general error type;
                      the title should not change for given types.
                  detail:
                    type: string
                    description: A human-readable description of the specific error.
                  instance:
                    type: string
                    description: >-
                      This optional key may be present, with a unique URI for
                      the specific error; this will often point to an error log
                      for that specific response.
                  request_id:
                    type: string
                    description: Correlation ID for the original request.
                required:
                  - type
                  - status
                additionalProperties: false
              example:
                status: 429
                type: too_many_requests
        '500':
          description: Internal Server Error. The service encountered an unexpected error.
          headers:
            upvest-request-id:
              required: true
              schema:
                type: string
                format: uuid
                example: 169ae4c7-ebd7-4041-94da-25369653eba7
          content:
            application/problem+json:
              schema:
                title: Error
                type: object
                description: ''
                properties:
                  type:
                    type: string
                    description: URL to a document describing the error condition.
                  status:
                    type: integer
                    description: >-
                      Transmission of the HTTP status code so that all
                      information can be found in one place, but also to correct
                      changes in the status code due to the use of proxy
                      servers.
                  title:
                    type: string
                    description: >-
                      A short, human-readable title for the general error type;
                      the title should not change for given types.
                  detail:
                    type: string
                    description: A human-readable description of the specific error.
                  instance:
                    type: string
                    description: >-
                      This optional key may be present, with a unique URI for
                      the specific error; this will often point to an error log
                      for that specific response.
                  request_id:
                    type: string
                    description: Correlation ID for the original request.
                required:
                  - type
                  - status
                additionalProperties: false
              example:
                status: 500
                type: internal_server_error
        '503':
          description: >-
            Service Unavailable. The service handling for this request cannot be
            reached at this time.
          headers:
            upvest-request-id:
              required: true
              schema:
                type: string
                format: uuid
                example: 169ae4c7-ebd7-4041-94da-25369653eba7
          content:
            application/problem+json:
              schema:
                title: Error
                type: object
                description: ''
                properties:
                  type:
                    type: string
                    description: URL to a document describing the error condition.
                  status:
                    type: integer
                    description: >-
                      Transmission of the HTTP status code so that all
                      information can be found in one place, but also to correct
                      changes in the status code due to the use of proxy
                      servers.
                  title:
                    type: string
                    description: >-
                      A short, human-readable title for the general error type;
                      the title should not change for given types.
                  detail:
                    type: string
                    description: A human-readable description of the specific error.
                  instance:
                    type: string
                    description: >-
                      This optional key may be present, with a unique URI for
                      the specific error; this will often point to an error log
                      for that specific response.
                  request_id:
                    type: string
                    description: Correlation ID for the original request.
                required:
                  - type
                  - status
                additionalProperties: false
              example:
                status: 503
                type: method_not_allowed
        '504':
          description: >-
            Gateway Timeout. The service gateway has reached its internal
            timeout.
          headers:
            upvest-request-id:
              required: true
              schema:
                type: string
                format: uuid
                example: 169ae4c7-ebd7-4041-94da-25369653eba7
          content:
            application/problem+json:
              schema:
                title: Error
                type: object
                description: ''
                properties:
                  type:
                    type: string
                    description: URL to a document describing the error condition.
                  status:
                    type: integer
                    description: >-
                      Transmission of the HTTP status code so that all
                      information can be found in one place, but also to correct
                      changes in the status code due to the use of proxy
                      servers.
                  title:
                    type: string
                    description: >-
                      A short, human-readable title for the general error type;
                      the title should not change for given types.
                  detail:
                    type: string
                    description: A human-readable description of the specific error.
                  instance:
                    type: string
                    description: >-
                      This optional key may be present, with a unique URI for
                      the specific error; this will often point to an error log
                      for that specific response.
                  request_id:
                    type: string
                    description: Correlation ID for the original request.
                required:
                  - type
                  - status
                additionalProperties: false
              example:
                status: 504
                type: gateway_timeout
  /instruments:
    parameters:
      - name: upvest-client-id
        in: header
        description: Tenant Client ID
        required: true
        schema:
          type: string
          format: uuid
          example: ebabcf4d-61c3-4942-875c-e265a7c2d062
      - name: authorization
        in: header
        description: |
          Bearer (access) token from the OAuth flow with correct scopes.
          https://datatracker.ietf.org/doc/html/rfc6750
        required: true
        schema:
          type: string
          pattern: ^Bearer [a-zA-Z0-9\-\._~+/]*=*
          example: Bearer c2VjcmV0Cg==
      - name: signature
        in: header
        required: true
        schema:
          type: string
        description: >-
          https://tools.ietf.org/id/draft-ietf-httpbis-message-signatures-01.html#name-the-signature-http-header
      - name: signature-input
        in: header
        required: true
        schema:
          type: string
        description: >-
          https://tools.ietf.org/id/draft-ietf-httpbis-message-signatures-01.html#name-the-signature-input-http-he
      - name: upvest-api-version
        in: header
        required: false
        schema:
          type: string
          enum:
            - '1'
          default: '1'
          example: '1'
        description: 'Upvest API version (Note: Do not include quotation marks)'
    get:
      operationId: list_instruments
      summary: List instruments
      description: List instruments
      tags:
        - Instruments
      security:
        - oauth-client-credentials:
            - instruments:read
      parameters:
        - name: trading_status
          in: query
          required: false
          schema:
            title: Instrument trading status
            description: >-
              Instrument trading status

              * ACTIVE - The instrument can currently be traded on the Upvest
              platform. 

              * INACTIVE - The instrument cannot currently be traded on the
              Upvest platform.
            type: string
            enum:
              - ACTIVE
              - INACTIVE
          description: >-
            Filters the list to only show instruments with a certain status
            (e.g. only instruments that can be currently traded).
          example: ACTIVE
        - name: sort
          in: query
          required: false
          schema:
            type: string
            enum:
              - created_at
              - updated_at
            default: created_at
          description: Sort the result by `created_at` or `updated_at`.
        - name: order
          in: query
          required: false
          schema:
            type: string
            enum:
              - ASC
              - DESC
            default: ASC
          description: >-
            Sort order of the result list if the `sort` parameter is specified.
            Use `ASC` for ascending or `DESC` for descending sort order.
        - name: offset
          in: query
          schema:
            type: integer
            minimum: 0
            format: int32
          allowEmptyValue: true
          description: >-
            Use the `offset` argument to specify where in the list of results to
            start when returning items for a particular query.
        - name: limit
          in: query
          schema:
            type: integer
            format: int32
            default: 100
            minimum: 0
            maximum: 1000
          allowEmptyValue: true
          description: >-
            Use the `limit` argument to specify the maximum number of items
            returned.
      responses:
        '200':
          description: OK
          headers:
            upvest-request-id:
              required: true
              schema:
                type: string
                format: uuid
                example: 169ae4c7-ebd7-4041-94da-25369653eba7
          content:
            application/json:
              schema:
                title: Instruments - List - Response
                type: object
                properties:
                  meta:
                    type: object
                    properties:
                      offset:
                        type: integer
                        description: Amount of resource to offset in the response.
                      limit:
                        type: integer
                        description: Total limit of the response.
                      count:
                        type: integer
                        description: Count of the resources returned in the response.
                      total_count:
                        type: integer
                        description: Total count of all the resources.
                      sort:
                        type: string
                        description: The field that the list is sorted by.
                      order:
                        type: string
                        description: |-
                          The ordering of the response.
                          * ASC - Ascending order
                          * DESC - Descending order
                        enum:
                          - ASC
                          - DESC
                    required:
                      - offset
                      - limit
                      - count
                      - total_count
                  data:
                    type: array
                    items:
                      type: object
                      properties:
                        id:
                          title: Instrument unique identifier.
                          type: string
                          description: Instrument unique identifier.
                          format: uuid
                        created_at:
                          type: string
                          format: date-time
                          description: >-
                            Date and time when the resource was created. [RFC
                            3339-5](https://datatracker.ietf.org/doc/html/rfc3339#section-5.6),
                            [ISO8601
                            UTC](https://www.iso.org/iso-8601-date-and-time-format.html)
                        updated_at:
                          type: string
                          format: date-time
                          description: >-
                            Date and time when the resource was last updated.
                            [RFC
                            3339-5](https://datatracker.ietf.org/doc/html/rfc3339#section-5.6),
                            [ISO8601
                            UTC](https://www.iso.org/iso-8601-date-and-time-format.html)
                        isin:
                          title: International securities identification number
                          type: string
                          description: >-
                            International securities identification number
                            defined by [ISO
                            6166](https://en.wikipedia.org/wiki/International_Securities_Identification_Number).
                          pattern: ^[A-Z]{2}[A-Z0-9]{9}[0-9]$
                        wkn:
                          title: German securities identification code
                          type: string
                          description: >-
                            German securities identification code known as
                            [Wertpapierkennnummer](https://en.wikipedia.org/wiki/Wertpapierkennnummer).
                          pattern: ^[A-HJ-NP-Z0-9]{6}$
                        name:
                          description: Instrument name
                          type: string
                          maxLength: 100
                        fractional_trading:
                          type: boolean
                          description: >-
                            Determines whether the platform can handle
                            fractional investments within this instrument.
                        trading_status:
                          title: Instrument trading status
                          description: >-
                            Instrument trading status

                            * ACTIVE - The instrument can currently be traded on
                            the Upvest platform. 

                            * INACTIVE - The instrument cannot currently be
                            traded on the Upvest platform.
                          type: string
                          enum:
                            - ACTIVE
                            - INACTIVE
                        details:
                          title: Details
                          type: object
                          description: Details
                          properties:
                            distribution_countries:
                              title: Distribution Countries
                              description: Distribution Countries
                              type: array
                              items:
                                description: >-
                                  Country code. [ISO 3166 alpha-2
                                  Codes](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2).
                                type: string
                                pattern: ^[A-Z]{2}$
                      required:
                        - id
                        - name
                        - fractional_trading
                        - trading_status
                        - created_at
                        - updated_at
                      additionalProperties: false
                required:
                  - meta
                  - data
                additionalProperties: false
              example:
                meta:
                  offset: 0
                  limit: 100
                  count: 1
                  total_count: 10
                  sort: created_at
                  order: ASC
                data:
                  - id: 123e4567-e89b-12d3-a456-426614174000
                    created_at: '2022-08-31T17:28:00.00Z'
                    updated_at: '2022-08-31T17:28:00.00Z'
                    isin: DE0007664005
                    wkn: '766400'
                    name: Volkswagen (VW) St. Aktie.
                    fractional_trading: true
                    trading_status: ACTIVE
        '400':
          description: Bad Request. The incoming request had a malformed parameter/object.
          headers:
            upvest-request-id:
              required: true
              schema:
                type: string
                format: uuid
                example: 169ae4c7-ebd7-4041-94da-25369653eba7
          content:
            application/problem+json:
              schema:
                title: Error
                type: object
                description: ''
                properties:
                  type:
                    type: string
                    description: URL to a document describing the error condition.
                  status:
                    type: integer
                    description: >-
                      Transmission of the HTTP status code so that all
                      information can be found in one place, but also to correct
                      changes in the status code due to the use of proxy
                      servers.
                  title:
                    type: string
                    description: >-
                      A short, human-readable title for the general error type;
                      the title should not change for given types.
                  detail:
                    type: string
                    description: A human-readable description of the specific error.
                  instance:
                    type: string
                    description: >-
                      This optional key may be present, with a unique URI for
                      the specific error; this will often point to an error log
                      for that specific response.
                  request_id:
                    type: string
                    description: Correlation ID for the original request.
                required:
                  - type
                  - status
                additionalProperties: false
              example:
                status: 400
                type: bad_request
        '401':
          description: Unauthorized. The caller has not been authenticated.
          headers:
            upvest-request-id:
              required: true
              schema:
                type: string
                format: uuid
                example: 169ae4c7-ebd7-4041-94da-25369653eba7
          content:
            application/problem+json:
              schema:
                title: Error
                type: object
                description: ''
                properties:
                  type:
                    type: string
                    description: URL to a document describing the error condition.
                  status:
                    type: integer
                    description: >-
                      Transmission of the HTTP status code so that all
                      information can be found in one place, but also to correct
                      changes in the status code due to the use of proxy
                      servers.
                  title:
                    type: string
                    description: >-
                      A short, human-readable title for the general error type;
                      the title should not change for given types.
                  detail:
                    type: string
                    description: A human-readable description of the specific error.
                  instance:
                    type: string
                    description: >-
                      This optional key may be present, with a unique URI for
                      the specific error; this will often point to an error log
                      for that specific response.
                  request_id:
                    type: string
                    description: Correlation ID for the original request.
                required:
                  - type
                  - status
                additionalProperties: false
              example:
                status: 401
                type: unauthorized
        '403':
          description: >-
            Forbidden. The caller has been authenticated but is not allowed to
            take the requested action.
          headers:
            upvest-request-id:
              required: true
              schema:
                type: string
                format: uuid
                example: 169ae4c7-ebd7-4041-94da-25369653eba7
          content:
            application/problem+json:
              schema:
                title: Error
                type: object
                description: ''
                properties:
                  type:
                    type: string
                    description: URL to a document describing the error condition.
                  status:
                    type: integer
                    description: >-
                      Transmission of the HTTP status code so that all
                      information can be found in one place, but also to correct
                      changes in the status code due to the use of proxy
                      servers.
                  title:
                    type: string
                    description: >-
                      A short, human-readable title for the general error type;
                      the title should not change for given types.
                  detail:
                    type: string
                    description: A human-readable description of the specific error.
                  instance:
                    type: string
                    description: >-
                      This optional key may be present, with a unique URI for
                      the specific error; this will often point to an error log
                      for that specific response.
                  request_id:
                    type: string
                    description: Correlation ID for the original request.
                required:
                  - type
                  - status
                additionalProperties: false
              example:
                status: 403
                type: forbidden
        '406':
          description: >-
            Not Acceptable. The resource does not have a current representation
            that would be acceptable to the user agent. "Accept" header defined
            unsupported value.
          headers:
            upvest-request-id:
              required: true
              schema:
                type: string
                format: uuid
                example: 169ae4c7-ebd7-4041-94da-25369653eba7
          content:
            application/problem+json:
              schema:
                title: Error
                type: object
                description: ''
                properties:
                  type:
                    type: string
                    description: URL to a document describing the error condition.
                  status:
                    type: integer
                    description: >-
                      Transmission of the HTTP status code so that all
                      information can be found in one place, but also to correct
                      changes in the status code due to the use of proxy
                      servers.
                  title:
                    type: string
                    description: >-
                      A short, human-readable title for the general error type;
                      the title should not change for given types.
                  detail:
                    type: string
                    description: A human-readable description of the specific error.
                  instance:
                    type: string
                    description: >-
                      This optional key may be present, with a unique URI for
                      the specific error; this will often point to an error log
                      for that specific response.
                  request_id:
                    type: string
                    description: Correlation ID for the original request.
                required:
                  - type
                  - status
                additionalProperties: false
              example:
                status: 406
                type: not_acceptable
        '429':
          description: >-
            Too Many Requests. The caller has exceeded their quota for the time
            period and has been throttled.
          headers:
            upvest-request-id:
              required: true
              schema:
                type: string
                format: uuid
                example: 169ae4c7-ebd7-4041-94da-25369653eba7
          content:
            application/problem+json:
              schema:
                title: Error
                type: object
                description: ''
                properties:
                  type:
                    type: string
                    description: URL to a document describing the error condition.
                  status:
                    type: integer
                    description: >-
                      Transmission of the HTTP status code so that all
                      information can be found in one place, but also to correct
                      changes in the status code due to the use of proxy
                      servers.
                  title:
                    type: string
                    description: >-
                      A short, human-readable title for the general error type;
                      the title should not change for given types.
                  detail:
                    type: string
                    description: A human-readable description of the specific error.
                  instance:
                    type: string
                    description: >-
                      This optional key may be present, with a unique URI for
                      the specific error; this will often point to an error log
                      for that specific response.
                  request_id:
                    type: string
                    description: Correlation ID for the original request.
                required:
                  - type
                  - status
                additionalProperties: false
              example:
                status: 429
                type: too_many_requests
        '500':
          description: Internal Server Error. The service encountered an unexpected error.
          headers:
            upvest-request-id:
              required: true
              schema:
                type: string
                format: uuid
                example: 169ae4c7-ebd7-4041-94da-25369653eba7
          content:
            application/problem+json:
              schema:
                title: Error
                type: object
                description: ''
                properties:
                  type:
                    type: string
                    description: URL to a document describing the error condition.
                  status:
                    type: integer
                    description: >-
                      Transmission of the HTTP status code so that all
                      information can be found in one place, but also to correct
                      changes in the status code due to the use of proxy
                      servers.
                  title:
                    type: string
                    description: >-
                      A short, human-readable title for the general error type;
                      the title should not change for given types.
                  detail:
                    type: string
                    description: A human-readable description of the specific error.
                  instance:
                    type: string
                    description: >-
                      This optional key may be present, with a unique URI for
                      the specific error; this will often point to an error log
                      for that specific response.
                  request_id:
                    type: string
                    description: Correlation ID for the original request.
                required:
                  - type
                  - status
                additionalProperties: false
              example:
                status: 500
                type: internal_server_error
        '503':
          description: >-
            Service Unavailable. The service handling for this request cannot be
            reached at this time.
          headers:
            upvest-request-id:
              required: true
              schema:
                type: string
                format: uuid
                example: 169ae4c7-ebd7-4041-94da-25369653eba7
          content:
            application/problem+json:
              schema:
                title: Error
                type: object
                description: ''
                properties:
                  type:
                    type: string
                    description: URL to a document describing the error condition.
                  status:
                    type: integer
                    description: >-
                      Transmission of the HTTP status code so that all
                      information can be found in one place, but also to correct
                      changes in the status code due to the use of proxy
                      servers.
                  title:
                    type: string
                    description: >-
                      A short, human-readable title for the general error type;
                      the title should not change for given types.
                  detail:
                    type: string
                    description: A human-readable description of the specific error.
                  instance:
                    type: string
                    description: >-
                      This optional key may be present, with a unique URI for
                      the specific error; this will often point to an error log
                      for that specific response.
                  request_id:
                    type: string
                    description: Correlation ID for the original request.
                required:
                  - type
                  - status
                additionalProperties: false
              example:
                status: 503
                type: method_not_allowed
        '504':
          description: >-
            Gateway Timeout. The service gateway has reached its internal
            timeout.
          headers:
            upvest-request-id:
              required: true
              schema:
                type: string
                format: uuid
                example: 169ae4c7-ebd7-4041-94da-25369653eba7
          content:
            application/problem+json:
              schema:
                title: Error
                type: object
                description: ''
                properties:
                  type:
                    type: string
                    description: URL to a document describing the error condition.
                  status:
                    type: integer
                    description: >-
                      Transmission of the HTTP status code so that all
                      information can be found in one place, but also to correct
                      changes in the status code due to the use of proxy
                      servers.
                  title:
                    type: string
                    description: >-
                      A short, human-readable title for the general error type;
                      the title should not change for given types.
                  detail:
                    type: string
                    description: A human-readable description of the specific error.
                  instance:
                    type: string
                    description: >-
                      This optional key may be present, with a unique URI for
                      the specific error; this will often point to an error log
                      for that specific response.
                  request_id:
                    type: string
                    description: Correlation ID for the original request.
                required:
                  - type
                  - status
                additionalProperties: false
              example:
                status: 504
                type: gateway_timeout
  /instruments/{instrument_id}:
    parameters:
      - name: instrument_id
        in: path
        required: true
        schema:
          title: Instrument unique identifier
          description: Instrument unique identifier.
          oneOf:
            - title: >-
                International securities identification number with 'isin:' URN
                namespace
              type: string
              description: >-
                International securities identification number defined by [ISO
                6166](https://en.wikipedia.org/wiki/International_Securities_Identification_Number),
                prefixed with a 'isin:' [URN
                scheme](https://datatracker.ietf.org/doc/html/rfc8141).
              pattern: ^(urn:)?isin:[A-Z]{2}[A-Z0-9]{9}[0-9]$
            - title: Universally Unique IDentifier (UUID) with 'uuid:' URN scheme
              type: string
              description: >-
                Universally Unique IDentifier (UUID) with 'uuid:' URN namespace,
                defined by [RFC
                4122](https://datatracker.ietf.org/doc/html/rfc4122).
              pattern: >-
                ^(urn:)?uuid:[0-9a-fA-F]{8}-?[0-9a-fA-F]{4}-?[0-5][0-9a-fA-F]{3}-?[089abAB][0-9a-fA-F]{3}-?[0-9a-fA-F]{12}$
      - name: upvest-client-id
        in: header
        description: Tenant Client ID
        required: true
        schema:
          type: string
          format: uuid
          example: ebabcf4d-61c3-4942-875c-e265a7c2d062
      - name: authorization
        in: header
        description: |
          Bearer (access) token from the OAuth flow with correct scopes.
          https://datatracker.ietf.org/doc/html/rfc6750
        required: true
        schema:
          type: string
          pattern: ^Bearer [a-zA-Z0-9\-\._~+/]*=*
          example: Bearer c2VjcmV0Cg==
      - name: signature
        in: header
        required: true
        schema:
          type: string
        description: >-
          https://tools.ietf.org/id/draft-ietf-httpbis-message-signatures-01.html#name-the-signature-http-header
      - name: signature-input
        in: header
        required: true
        schema:
          type: string
        description: >-
          https://tools.ietf.org/id/draft-ietf-httpbis-message-signatures-01.html#name-the-signature-input-http-he
      - name: upvest-api-version
        in: header
        required: false
        schema:
          type: string
          enum:
            - '1'
          default: '1'
          example: '1'
        description: 'Upvest API version (Note: Do not include quotation marks)'
    get:
      operationId: retrieve_instrument
      summary: Get instrument
      description: Returns the instrument.
      tags:
        - Instruments
      security:
        - oauth-client-credentials:
            - instruments:read
      responses:
        '200':
          description: OK
          headers:
            upvest-request-id:
              required: true
              schema:
                type: string
                format: uuid
                example: 169ae4c7-ebd7-4041-94da-25369653eba7
          content:
            application/json:
              schema:
                type: object
                properties:
                  id:
                    title: Instrument unique identifier.
                    type: string
                    description: Instrument unique identifier.
                    format: uuid
                  created_at:
                    type: string
                    format: date-time
                    description: >-
                      Date and time when the resource was created. [RFC
                      3339-5](https://datatracker.ietf.org/doc/html/rfc3339#section-5.6),
                      [ISO8601
                      UTC](https://www.iso.org/iso-8601-date-and-time-format.html)
                  updated_at:
                    type: string
                    format: date-time
                    description: >-
                      Date and time when the resource was last updated. [RFC
                      3339-5](https://datatracker.ietf.org/doc/html/rfc3339#section-5.6),
                      [ISO8601
                      UTC](https://www.iso.org/iso-8601-date-and-time-format.html)
                  isin:
                    title: International securities identification number
                    type: string
                    description: >-
                      International securities identification number defined by
                      [ISO
                      6166](https://en.wikipedia.org/wiki/International_Securities_Identification_Number).
                    pattern: ^[A-Z]{2}[A-Z0-9]{9}[0-9]$
                  wkn:
                    title: German securities identification code
                    type: string
                    description: >-
                      German securities identification code known as
                      [Wertpapierkennnummer](https://en.wikipedia.org/wiki/Wertpapierkennnummer).
                    pattern: ^[A-HJ-NP-Z0-9]{6}$
                  name:
                    description: Instrument name
                    type: string
                    maxLength: 100
                  fractional_trading:
                    type: boolean
                    description: >-
                      Determines whether the platform can handle fractional
                      investments within this instrument.
                  trading_status:
                    title: Instrument trading status
                    description: >-
                      Instrument trading status

                      * ACTIVE - The instrument can currently be traded on the
                      Upvest platform. 

                      * INACTIVE - The instrument cannot currently be traded on
                      the Upvest platform.
                    type: string
                    enum:
                      - ACTIVE
                      - INACTIVE
                  details:
                    title: Details
                    type: object
                    description: Details
                    properties:
                      distribution_countries:
                        title: Distribution Countries
                        description: Distribution Countries
                        type: array
                        items:
                          description: >-
                            Country code. [ISO 3166 alpha-2
                            Codes](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2).
                          type: string
                          pattern: ^[A-Z]{2}$
                required:
                  - id
                  - name
                  - fractional_trading
                  - trading_status
                  - created_at
                  - updated_at
                additionalProperties: false
              example:
                id: 123e4567-e89b-12d3-a456-426614174000
                created_at: '2022-08-31T17:28:00.00Z'
                updated_at: '2022-08-31T17:28:00.00Z'
                isin: DE0007664005
                wkn: '766400'
                name: Volkswagen (VW) St. Aktie.
                fractional_trading: true
                trading_status: ACTIVE
        '401':
          description: Unauthorized. The caller has not been authenticated.
          headers:
            upvest-request-id:
              required: true
              schema:
                type: string
                format: uuid
                example: 169ae4c7-ebd7-4041-94da-25369653eba7
          content:
            application/problem+json:
              schema:
                title: Error
                type: object
                description: ''
                properties:
                  type:
                    type: string
                    description: URL to a document describing the error condition.
                  status:
                    type: integer
                    description: >-
                      Transmission of the HTTP status code so that all
                      information can be found in one place, but also to correct
                      changes in the status code due to the use of proxy
                      servers.
                  title:
                    type: string
                    description: >-
                      A short, human-readable title for the general error type;
                      the title should not change for given types.
                  detail:
                    type: string
                    description: A human-readable description of the specific error.
                  instance:
                    type: string
                    description: >-
                      This optional key may be present, with a unique URI for
                      the specific error; this will often point to an error log
                      for that specific response.
                  request_id:
                    type: string
                    description: Correlation ID for the original request.
                required:
                  - type
                  - status
                additionalProperties: false
              example:
                status: 401
                type: unauthorized
        '403':
          description: >-
            Forbidden. The caller has been authenticated but is not allowed to
            take the requested action.
          headers:
            upvest-request-id:
              required: true
              schema:
                type: string
                format: uuid
                example: 169ae4c7-ebd7-4041-94da-25369653eba7
          content:
            application/problem+json:
              schema:
                title: Error
                type: object
                description: ''
                properties:
                  type:
                    type: string
                    description: URL to a document describing the error condition.
                  status:
                    type: integer
                    description: >-
                      Transmission of the HTTP status code so that all
                      information can be found in one place, but also to correct
                      changes in the status code due to the use of proxy
                      servers.
                  title:
                    type: string
                    description: >-
                      A short, human-readable title for the general error type;
                      the title should not change for given types.
                  detail:
                    type: string
                    description: A human-readable description of the specific error.
                  instance:
                    type: string
                    description: >-
                      This optional key may be present, with a unique URI for
                      the specific error; this will often point to an error log
                      for that specific response.
                  request_id:
                    type: string
                    description: Correlation ID for the original request.
                required:
                  - type
                  - status
                additionalProperties: false
              example:
                status: 403
                type: forbidden
        '404':
          description: Not Found. The requested resource could not be found.
          headers:
            upvest-request-id:
              required: true
              schema:
                type: string
                format: uuid
                example: 169ae4c7-ebd7-4041-94da-25369653eba7
          content:
            application/problem+json:
              schema:
                title: Error
                type: object
                description: ''
                properties:
                  type:
                    type: string
                    description: URL to a document describing the error condition.
                  status:
                    type: integer
                    description: >-
                      Transmission of the HTTP status code so that all
                      information can be found in one place, but also to correct
                      changes in the status code due to the use of proxy
                      servers.
                  title:
                    type: string
                    description: >-
                      A short, human-readable title for the general error type;
                      the title should not change for given types.
                  detail:
                    type: string
                    description: A human-readable description of the specific error.
                  instance:
                    type: string
                    description: >-
                      This optional key may be present, with a unique URI for
                      the specific error; this will often point to an error log
                      for that specific response.
                  request_id:
                    type: string
                    description: Correlation ID for the original request.
                required:
                  - type
                  - status
                additionalProperties: false
              example:
                status: 404
                type: not_found
        '406':
          description: >-
            Not Acceptable. The resource does not have a current representation
            that would be acceptable to the user agent. "Accept" header defined
            unsupported value.
          headers:
            upvest-request-id:
              required: true
              schema:
                type: string
                format: uuid
                example: 169ae4c7-ebd7-4041-94da-25369653eba7
          content:
            application/problem+json:
              schema:
                title: Error
                type: object
                description: ''
                properties:
                  type:
                    type: string
                    description: URL to a document describing the error condition.
                  status:
                    type: integer
                    description: >-
                      Transmission of the HTTP status code so that all
                      information can be found in one place, but also to correct
                      changes in the status code due to the use of proxy
                      servers.
                  title:
                    type: string
                    description: >-
                      A short, human-readable title for the general error type;
                      the title should not change for given types.
                  detail:
                    type: string
                    description: A human-readable description of the specific error.
                  instance:
                    type: string
                    description: >-
                      This optional key may be present, with a unique URI for
                      the specific error; this will often point to an error log
                      for that specific response.
                  request_id:
                    type: string
                    description: Correlation ID for the original request.
                required:
                  - type
                  - status
                additionalProperties: false
              example:
                status: 406
                type: not_acceptable
        '429':
          description: >-
            Too Many Requests. The caller has exceeded their quota for the time
            period and has been throttled.
          headers:
            upvest-request-id:
              required: true
              schema:
                type: string
                format: uuid
                example: 169ae4c7-ebd7-4041-94da-25369653eba7
          content:
            application/problem+json:
              schema:
                title: Error
                type: object
                description: ''
                properties:
                  type:
                    type: string
                    description: URL to a document describing the error condition.
                  status:
                    type: integer
                    description: >-
                      Transmission of the HTTP status code so that all
                      information can be found in one place, but also to correct
                      changes in the status code due to the use of proxy
                      servers.
                  title:
                    type: string
                    description: >-
                      A short, human-readable title for the general error type;
                      the title should not change for given types.
                  detail:
                    type: string
                    description: A human-readable description of the specific error.
                  instance:
                    type: string
                    description: >-
                      This optional key may be present, with a unique URI for
                      the specific error; this will often point to an error log
                      for that specific response.
                  request_id:
                    type: string
                    description: Correlation ID for the original request.
                required:
                  - type
                  - status
                additionalProperties: false
              example:
                status: 429
                type: too_many_requests
        '500':
          description: Internal Server Error. The service encountered an unexpected error.
          headers:
            upvest-request-id:
              required: true
              schema:
                type: string
                format: uuid
                example: 169ae4c7-ebd7-4041-94da-25369653eba7
          content:
            application/problem+json:
              schema:
                title: Error
                type: object
                description: ''
                properties:
                  type:
                    type: string
                    description: URL to a document describing the error condition.
                  status:
                    type: integer
                    description: >-
                      Transmission of the HTTP status code so that all
                      information can be found in one place, but also to correct
                      changes in the status code due to the use of proxy
                      servers.
                  title:
                    type: string
                    description: >-
                      A short, human-readable title for the general error type;
                      the title should not change for given types.
                  detail:
                    type: string
                    description: A human-readable description of the specific error.
                  instance:
                    type: string
                    description: >-
                      This optional key may be present, with a unique URI for
                      the specific error; this will often point to an error log
                      for that specific response.
                  request_id:
                    type: string
                    description: Correlation ID for the original request.
                required:
                  - type
                  - status
                additionalProperties: false
              example:
                status: 500
                type: internal_server_error
        '503':
          description: >-
            Service Unavailable. The service handling for this request cannot be
            reached at this time.
          headers:
            upvest-request-id:
              required: true
              schema:
                type: string
                format: uuid
                example: 169ae4c7-ebd7-4041-94da-25369653eba7
          content:
            application/problem+json:
              schema:
                title: Error
                type: object
                description: ''
                properties:
                  type:
                    type: string
                    description: URL to a document describing the error condition.
                  status:
                    type: integer
                    description: >-
                      Transmission of the HTTP status code so that all
                      information can be found in one place, but also to correct
                      changes in the status code due to the use of proxy
                      servers.
                  title:
                    type: string
                    description: >-
                      A short, human-readable title for the general error type;
                      the title should not change for given types.
                  detail:
                    type: string
                    description: A human-readable description of the specific error.
                  instance:
                    type: string
                    description: >-
                      This optional key may be present, with a unique URI for
                      the specific error; this will often point to an error log
                      for that specific response.
                  request_id:
                    type: string
                    description: Correlation ID for the original request.
                required:
                  - type
                  - status
                additionalProperties: false
              example:
                status: 503
                type: method_not_allowed
        '504':
          description: >-
            Gateway Timeout. The service gateway has reached its internal
            timeout.
          headers:
            upvest-request-id:
              required: true
              schema:
                type: string
                format: uuid
                example: 169ae4c7-ebd7-4041-94da-25369653eba7
          content:
            application/problem+json:
              schema:
                title: Error
                type: object
                description: ''
                properties:
                  type:
                    type: string
                    description: URL to a document describing the error condition.
                  status:
                    type: integer
                    description: >-
                      Transmission of the HTTP status code so that all
                      information can be found in one place, but also to correct
                      changes in the status code due to the use of proxy
                      servers.
                  title:
                    type: string
                    description: >-
                      A short, human-readable title for the general error type;
                      the title should not change for given types.
                  detail:
                    type: string
                    description: A human-readable description of the specific error.
                  instance:
                    type: string
                    description: >-
                      This optional key may be present, with a unique URI for
                      the specific error; this will often point to an error log
                      for that specific response.
                  request_id:
                    type: string
                    description: Correlation ID for the original request.
                required:
                  - type
                  - status
                additionalProperties: false
              example:
                status: 504
                type: gateway_timeout
  /instruments/{instrument_id}/venues:
    parameters:
      - name: instrument_id
        in: path
        required: true
        schema:
          title: Instrument unique identifier
          description: Instrument unique identifier.
          oneOf:
            - title: >-
                International securities identification number with 'isin:' URN
                namespace
              type: string
              description: >-
                International securities identification number defined by [ISO
                6166](https://en.wikipedia.org/wiki/International_Securities_Identification_Number),
                prefixed with a 'isin:' [URN
                scheme](https://datatracker.ietf.org/doc/html/rfc8141).
              pattern: ^(urn:)?isin:[A-Z]{2}[A-Z0-9]{9}[0-9]$
            - title: Universally Unique IDentifier (UUID) with 'uuid:' URN scheme
              type: string
              description: >-
                Universally Unique IDentifier (UUID) with 'uuid:' URN namespace,
                defined by [RFC
                4122](https://datatracker.ietf.org/doc/html/rfc4122).
              pattern: >-
                ^(urn:)?uuid:[0-9a-fA-F]{8}-?[0-9a-fA-F]{4}-?[0-5][0-9a-fA-F]{3}-?[089abAB][0-9a-fA-F]{3}-?[0-9a-fA-F]{12}$
      - name: upvest-client-id
        in: header
        description: Tenant Client ID
        required: true
        schema:
          type: string
          format: uuid
          example: ebabcf4d-61c3-4942-875c-e265a7c2d062
      - name: authorization
        in: header
        description: |
          Bearer (access) token from the OAuth flow with correct scopes.
          https://datatracker.ietf.org/doc/html/rfc6750
        required: true
        schema:
          type: string
          pattern: ^Bearer [a-zA-Z0-9\-\._~+/]*=*
          example: Bearer c2VjcmV0Cg==
      - name: signature
        in: header
        required: true
        schema:
          type: string
        description: >-
          https://tools.ietf.org/id/draft-ietf-httpbis-message-signatures-01.html#name-the-signature-http-header
      - name: signature-input
        in: header
        required: true
        schema:
          type: string
        description: >-
          https://tools.ietf.org/id/draft-ietf-httpbis-message-signatures-01.html#name-the-signature-input-http-he
      - name: upvest-api-version
        in: header
        required: false
        schema:
          type: string
          enum:
            - '1'
          default: '1'
          example: '1'
        description: 'Upvest API version (Note: Do not include quotation marks)'
    get:
      operationId: retrieve_instrument_venues
      summary: Get instrument venues
      description: >-
        The venues where the instrument is traded and for which the price data
        is available.
      tags:
        - Price Data
      security:
        - oauth-client-credentials:
            - prices:read
      responses:
        '200':
          description: OK
          headers:
            upvest-request-id:
              required: true
              schema:
                type: string
                format: uuid
                example: 169ae4c7-ebd7-4041-94da-25369653eba7
          content:
            application/json:
              schema:
                type: object
                properties:
                  data:
                    type: array
                    items:
                      type: object
                      description: Venue
                      title: Venue
                      properties:
                        name:
                          description: The name of venue.
                          title: The name of venue.
                          type: string
                        id:
                          title: Venue unique identifier.
                          type: string
                          description: Venue unique identifier.
                          format: uuid
                        price_qualities:
                          type: array
                          description: The available price qualities.
                          items:
                            type: string
                            enum:
                              - EOD
                              - REALTIME
                              - DELAYED
                      required:
                        - id
                required:
                  - data
                additionalProperties: false
              example:
                data:
                  - id: 20d6024b-2df4-41ae-8d42-62e4744e455b
                    name: Tradegate
                    price_qualities:
                      - EOD
                      - REALTIME
        '401':
          description: Unauthorized. The caller has not been authenticated.
          headers:
            upvest-request-id:
              required: true
              schema:
                type: string
                format: uuid
                example: 169ae4c7-ebd7-4041-94da-25369653eba7
          content:
            application/problem+json:
              schema:
                title: Error
                type: object
                description: ''
                properties:
                  type:
                    type: string
                    description: URL to a document describing the error condition.
                  status:
                    type: integer
                    description: >-
                      Transmission of the HTTP status code so that all
                      information can be found in one place, but also to correct
                      changes in the status code due to the use of proxy
                      servers.
                  title:
                    type: string
                    description: >-
                      A short, human-readable title for the general error type;
                      the title should not change for given types.
                  detail:
                    type: string
                    description: A human-readable description of the specific error.
                  instance:
                    type: string
                    description: >-
                      This optional key may be present, with a unique URI for
                      the specific error; this will often point to an error log
                      for that specific response.
                  request_id:
                    type: string
                    description: Correlation ID for the original request.
                required:
                  - type
                  - status
                additionalProperties: false
              example:
                status: 401
                type: unauthorized
        '403':
          description: >-
            Forbidden. The caller has been authenticated but is not allowed to
            take the requested action.
          headers:
            upvest-request-id:
              required: true
              schema:
                type: string
                format: uuid
                example: 169ae4c7-ebd7-4041-94da-25369653eba7
          content:
            application/problem+json:
              schema:
                title: Error
                type: object
                description: ''
                properties:
                  type:
                    type: string
                    description: URL to a document describing the error condition.
                  status:
                    type: integer
                    description: >-
                      Transmission of the HTTP status code so that all
                      information can be found in one place, but also to correct
                      changes in the status code due to the use of proxy
                      servers.
                  title:
                    type: string
                    description: >-
                      A short, human-readable title for the general error type;
                      the title should not change for given types.
                  detail:
                    type: string
                    description: A human-readable description of the specific error.
                  instance:
                    type: string
                    description: >-
                      This optional key may be present, with a unique URI for
                      the specific error; this will often point to an error log
                      for that specific response.
                  request_id:
                    type: string
                    description: Correlation ID for the original request.
                required:
                  - type
                  - status
                additionalProperties: false
              example:
                status: 403
                type: forbidden
        '404':
          description: Not Found. The requested resource could not be found.
          headers:
            upvest-request-id:
              required: true
              schema:
                type: string
                format: uuid
                example: 169ae4c7-ebd7-4041-94da-25369653eba7
          content:
            application/problem+json:
              schema:
                title: Error
                type: object
                description: ''
                properties:
                  type:
                    type: string
                    description: URL to a document describing the error condition.
                  status:
                    type: integer
                    description: >-
                      Transmission of the HTTP status code so that all
                      information can be found in one place, but also to correct
                      changes in the status code due to the use of proxy
                      servers.
                  title:
                    type: string
                    description: >-
                      A short, human-readable title for the general error type;
                      the title should not change for given types.
                  detail:
                    type: string
                    description: A human-readable description of the specific error.
                  instance:
                    type: string
                    description: >-
                      This optional key may be present, with a unique URI for
                      the specific error; this will often point to an error log
                      for that specific response.
                  request_id:
                    type: string
                    description: Correlation ID for the original request.
                required:
                  - type
                  - status
                additionalProperties: false
              example:
                status: 404
                type: not_found
        '406':
          description: >-
            Not Acceptable. The resource does not have a current representation
            that would be acceptable to the user agent. "Accept" header defined
            unsupported value.
          headers:
            upvest-request-id:
              required: true
              schema:
                type: string
                format: uuid
                example: 169ae4c7-ebd7-4041-94da-25369653eba7
          content:
            application/problem+json:
              schema:
                title: Error
                type: object
                description: ''
                properties:
                  type:
                    type: string
                    description: URL to a document describing the error condition.
                  status:
                    type: integer
                    description: >-
                      Transmission of the HTTP status code so that all
                      information can be found in one place, but also to correct
                      changes in the status code due to the use of proxy
                      servers.
                  title:
                    type: string
                    description: >-
                      A short, human-readable title for the general error type;
                      the title should not change for given types.
                  detail:
                    type: string
                    description: A human-readable description of the specific error.
                  instance:
                    type: string
                    description: >-
                      This optional key may be present, with a unique URI for
                      the specific error; this will often point to an error log
                      for that specific response.
                  request_id:
                    type: string
                    description: Correlation ID for the original request.
                required:
                  - type
                  - status
                additionalProperties: false
              example:
                status: 406
                type: not_acceptable
        '429':
          description: >-
            Too Many Requests. The caller has exceeded their quota for the time
            period and has been throttled.
          headers:
            upvest-request-id:
              required: true
              schema:
                type: string
                format: uuid
                example: 169ae4c7-ebd7-4041-94da-25369653eba7
          content:
            application/problem+json:
              schema:
                title: Error
                type: object
                description: ''
                properties:
                  type:
                    type: string
                    description: URL to a document describing the error condition.
                  status:
                    type: integer
                    description: >-
                      Transmission of the HTTP status code so that all
                      information can be found in one place, but also to correct
                      changes in the status code due to the use of proxy
                      servers.
                  title:
                    type: string
                    description: >-
                      A short, human-readable title for the general error type;
                      the title should not change for given types.
                  detail:
                    type: string
                    description: A human-readable description of the specific error.
                  instance:
                    type: string
                    description: >-
                      This optional key may be present, with a unique URI for
                      the specific error; this will often point to an error log
                      for that specific response.
                  request_id:
                    type: string
                    description: Correlation ID for the original request.
                required:
                  - type
                  - status
                additionalProperties: false
              example:
                status: 429
                type: too_many_requests
        '500':
          description: Internal Server Error. The service encountered an unexpected error.
          headers:
            upvest-request-id:
              required: true
              schema:
                type: string
                format: uuid
                example: 169ae4c7-ebd7-4041-94da-25369653eba7
          content:
            application/problem+json:
              schema:
                title: Error
                type: object
                description: ''
                properties:
                  type:
                    type: string
                    description: URL to a document describing the error condition.
                  status:
                    type: integer
                    description: >-
                      Transmission of the HTTP status code so that all
                      information can be found in one place, but also to correct
                      changes in the status code due to the use of proxy
                      servers.
                  title:
                    type: string
                    description: >-
                      A short, human-readable title for the general error type;
                      the title should not change for given types.
                  detail:
                    type: string
                    description: A human-readable description of the specific error.
                  instance:
                    type: string
                    description: >-
                      This optional key may be present, with a unique URI for
                      the specific error; this will often point to an error log
                      for that specific response.
                  request_id:
                    type: string
                    description: Correlation ID for the original request.
                required:
                  - type
                  - status
                additionalProperties: false
              example:
                status: 500
                type: internal_server_error
        '503':
          description: >-
            Service Unavailable. The service handling for this request cannot be
            reached at this time.
          headers:
            upvest-request-id:
              required: true
              schema:
                type: string
                format: uuid
                example: 169ae4c7-ebd7-4041-94da-25369653eba7
          content:
            application/problem+json:
              schema:
                title: Error
                type: object
                description: ''
                properties:
                  type:
                    type: string
                    description: URL to a document describing the error condition.
                  status:
                    type: integer
                    description: >-
                      Transmission of the HTTP status code so that all
                      information can be found in one place, but also to correct
                      changes in the status code due to the use of proxy
                      servers.
                  title:
                    type: string
                    description: >-
                      A short, human-readable title for the general error type;
                      the title should not change for given types.
                  detail:
                    type: string
                    description: A human-readable description of the specific error.
                  instance:
                    type: string
                    description: >-
                      This optional key may be present, with a unique URI for
                      the specific error; this will often point to an error log
                      for that specific response.
                  request_id:
                    type: string
                    description: Correlation ID for the original request.
                required:
                  - type
                  - status
                additionalProperties: false
              example:
                status: 503
                type: method_not_allowed
        '504':
          description: >-
            Gateway Timeout. The service gateway has reached its internal
            timeout.
          headers:
            upvest-request-id:
              required: true
              schema:
                type: string
                format: uuid
                example: 169ae4c7-ebd7-4041-94da-25369653eba7
          content:
            application/problem+json:
              schema:
                title: Error
                type: object
                description: ''
                properties:
                  type:
                    type: string
                    description: URL to a document describing the error condition.
                  status:
                    type: integer
                    description: >-
                      Transmission of the HTTP status code so that all
                      information can be found in one place, but also to correct
                      changes in the status code due to the use of proxy
                      servers.
                  title:
                    type: string
                    description: >-
                      A short, human-readable title for the general error type;
                      the title should not change for given types.
                  detail:
                    type: string
                    description: A human-readable description of the specific error.
                  instance:
                    type: string
                    description: >-
                      This optional key may be present, with a unique URI for
                      the specific error; this will often point to an error log
                      for that specific response.
                  request_id:
                    type: string
                    description: Correlation ID for the original request.
                required:
                  - type
                  - status
                additionalProperties: false
              example:
                status: 504
                type: gateway_timeout
  /instruments/{instrument_id}/venues/{venue_id}/prices/latest:
    parameters:
      - name: instrument_id
        in: path
        required: true
        schema:
          title: Instrument unique identifier
          description: Instrument unique identifier.
          oneOf:
            - title: >-
                International securities identification number with 'isin:' URN
                namespace
              type: string
              description: >-
                International securities identification number defined by [ISO
                6166](https://en.wikipedia.org/wiki/International_Securities_Identification_Number),
                prefixed with a 'isin:' [URN
                scheme](https://datatracker.ietf.org/doc/html/rfc8141).
              pattern: ^(urn:)?isin:[A-Z]{2}[A-Z0-9]{9}[0-9]$
            - title: Universally Unique IDentifier (UUID) with 'uuid:' URN scheme
              type: string
              description: >-
                Universally Unique IDentifier (UUID) with 'uuid:' URN namespace,
                defined by [RFC
                4122](https://datatracker.ietf.org/doc/html/rfc4122).
              pattern: >-
                ^(urn:)?uuid:[0-9a-fA-F]{8}-?[0-9a-fA-F]{4}-?[0-5][0-9a-fA-F]{3}-?[089abAB][0-9a-fA-F]{3}-?[0-9a-fA-F]{12}$
      - name: upvest-client-id
        in: header
        description: Tenant Client ID
        required: true
        schema:
          type: string
          format: uuid
          example: ebabcf4d-61c3-4942-875c-e265a7c2d062
      - name: authorization
        in: header
        description: |
          Bearer (access) token from the OAuth flow with correct scopes.
          https://datatracker.ietf.org/doc/html/rfc6750
        required: true
        schema:
          type: string
          pattern: ^Bearer [a-zA-Z0-9\-\._~+/]*=*
          example: Bearer c2VjcmV0Cg==
      - name: signature
        in: header
        required: true
        schema:
          type: string
        description: >-
          https://tools.ietf.org/id/draft-ietf-httpbis-message-signatures-01.html#name-the-signature-http-header
      - name: signature-input
        in: header
        required: true
        schema:
          type: string
        description: >-
          https://tools.ietf.org/id/draft-ietf-httpbis-message-signatures-01.html#name-the-signature-input-http-he
      - name: upvest-api-version
        in: header
        required: false
        schema:
          type: string
          enum:
            - '1'
          default: '1'
          example: '1'
        description: 'Upvest API version (Note: Do not include quotation marks)'
      - name: venue_id
        in: path
        required: true
        schema:
          title: Venue unique identifier.
          type: string
          description: Venue unique identifier.
          format: uuid
    get:
      operationId: retrieve_instrument_latest_price
      summary: Get instrument latest price
      description: >-
        Returns the instrument's latest price as available at the specified
        venue.


        **NOTE**: Please note that in live mode we provide the latest prices
        that we receive from our data provider. However, it is to be expected
        that such updates will only take place on trading days.
      tags:
        - Price Data
      parameters:
        - name: price_quality
          in: query
          required: false
          schema:
            type: string
            enum:
              - HIGHEST_AVAILABLE
            default: HIGHEST_AVAILABLE
            example: HIGHEST_AVAILABLE
      security:
        - oauth-client-credentials:
            - prices:read
      responses:
        '200':
          description: OK
          headers:
            upvest-request-id:
              required: true
              schema:
                type: string
                format: uuid
                example: 169ae4c7-ebd7-4041-94da-25369653eba7
          content:
            application/json:
              schema:
                type: object
                properties:
                  price_quality:
                    description: |-
                      The retrieved price quality.
                      * REALTIME - 
                      * DELAYED - 
                    enum:
                      - REALTIME
                      - DELAYED
                  currency:
                    type: string
                    description: >-
                      Alphabetic three-letter [ISO
                      4217](https://en.wikipedia.org/wiki/ISO_4217) currency
                      code.

                      * EUR - Euro
                    enum:
                      - EUR
                    default: EUR
                  bids:
                    description: Bids for the instrument.
                    type: array
                    items:
                      type: object
                      properties:
                        time:
                          type: string
                          format: date-time
                          description: >-
                            The date and time of data capture. [RFC
                            3339-5](https://datatracker.ietf.org/doc/html/rfc3339#section-5.6),
                            [ISO8601
                            UTC](https://www.iso.org/iso-8601-date-and-time-format.html).
                        price:
                          type: string
                          pattern: ^-?[0-9]{0,63}(\.[0-9]{1,27})?$
                        size:
                          type: string
                          pattern: ^-?[0-9]{0,63}(\.[0-9]{1,27})?$
                  asks:
                    description: Asks for the instrument.
                    type: array
                    items:
                      type: object
                      properties:
                        time:
                          type: string
                          format: date-time
                          description: >-
                            The date and time of data capture. [RFC
                            3339-5](https://datatracker.ietf.org/doc/html/rfc3339#section-5.6),
                            [ISO8601
                            UTC](https://www.iso.org/iso-8601-date-and-time-format.html).
                        price:
                          type: string
                          pattern: ^-?[0-9]{0,63}(\.[0-9]{1,27})?$
                        size:
                          type: string
                          pattern: ^-?[0-9]{0,63}(\.[0-9]{1,27})?$
                  last_trade:
                    type: object
                    properties:
                      time:
                        type: string
                        format: date-time
                        description: >-
                          The date and time of data capture. [RFC
                          3339-5](https://datatracker.ietf.org/doc/html/rfc3339#section-5.6),
                          [ISO8601
                          UTC](https://www.iso.org/iso-8601-date-and-time-format.html).
                      price:
                        type: string
                        pattern: ^-?[0-9]{0,63}(\.[0-9]{1,27})?$
                      size:
                        type: string
                        pattern: ^-?[0-9]{0,63}(\.[0-9]{1,27})?$
                required:
                  - price_quality
                  - currency
                additionalProperties: false
              example:
                price_quality: REALTIME
                currency: EUR
                bids:
                  - time: '2023-01-09T13:02:15Z'
                    price: '210.01'
                    size: '100'
                asks:
                  - time: '2023-01-09T13:02:15Z'
                    price: '212.32'
                    size: '50'
                last_trade:
                  time: '2023-01-09T12:59:04Z'
                  price: '211.32'
                  size: '40'
        '400':
          description: Bad Request. The incoming request had a malformed parameter/object.
          headers:
            upvest-request-id:
              required: true
              schema:
                type: string
                format: uuid
                example: 169ae4c7-ebd7-4041-94da-25369653eba7
          content:
            application/problem+json:
              schema:
                title: Error
                type: object
                description: ''
                properties:
                  type:
                    type: string
                    description: URL to a document describing the error condition.
                  status:
                    type: integer
                    description: >-
                      Transmission of the HTTP status code so that all
                      information can be found in one place, but also to correct
                      changes in the status code due to the use of proxy
                      servers.
                  title:
                    type: string
                    description: >-
                      A short, human-readable title for the general error type;
                      the title should not change for given types.
                  detail:
                    type: string
                    description: A human-readable description of the specific error.
                  instance:
                    type: string
                    description: >-
                      This optional key may be present, with a unique URI for
                      the specific error; this will often point to an error log
                      for that specific response.
                  request_id:
                    type: string
                    description: Correlation ID for the original request.
                required:
                  - type
                  - status
                additionalProperties: false
              example:
                status: 400
                type: bad_request
        '401':
          description: Unauthorized. The caller has not been authenticated.
          headers:
            upvest-request-id:
              required: true
              schema:
                type: string
                format: uuid
                example: 169ae4c7-ebd7-4041-94da-25369653eba7
          content:
            application/problem+json:
              schema:
                title: Error
                type: object
                description: ''
                properties:
                  type:
                    type: string
                    description: URL to a document describing the error condition.
                  status:
                    type: integer
                    description: >-
                      Transmission of the HTTP status code so that all
                      information can be found in one place, but also to correct
                      changes in the status code due to the use of proxy
                      servers.
                  title:
                    type: string
                    description: >-
                      A short, human-readable title for the general error type;
                      the title should not change for given types.
                  detail:
                    type: string
                    description: A human-readable description of the specific error.
                  instance:
                    type: string
                    description: >-
                      This optional key may be present, with a unique URI for
                      the specific error; this will often point to an error log
                      for that specific response.
                  request_id:
                    type: string
                    description: Correlation ID for the original request.
                required:
                  - type
                  - status
                additionalProperties: false
              example:
                status: 401
                type: unauthorized
        '403':
          description: >-
            Forbidden. The caller has been authenticated but is not allowed to
            take the requested action.
          headers:
            upvest-request-id:
              required: true
              schema:
                type: string
                format: uuid
                example: 169ae4c7-ebd7-4041-94da-25369653eba7
          content:
            application/problem+json:
              schema:
                title: Error
                type: object
                description: ''
                properties:
                  type:
                    type: string
                    description: URL to a document describing the error condition.
                  status:
                    type: integer
                    description: >-
                      Transmission of the HTTP status code so that all
                      information can be found in one place, but also to correct
                      changes in the status code due to the use of proxy
                      servers.
                  title:
                    type: string
                    description: >-
                      A short, human-readable title for the general error type;
                      the title should not change for given types.
                  detail:
                    type: string
                    description: A human-readable description of the specific error.
                  instance:
                    type: string
                    description: >-
                      This optional key may be present, with a unique URI for
                      the specific error; this will often point to an error log
                      for that specific response.
                  request_id:
                    type: string
                    description: Correlation ID for the original request.
                required:
                  - type
                  - status
                additionalProperties: false
              example:
                status: 403
                type: forbidden
        '404':
          description: Not Found. The requested resource could not be found.
          headers:
            upvest-request-id:
              required: true
              schema:
                type: string
                format: uuid
                example: 169ae4c7-ebd7-4041-94da-25369653eba7
          content:
            application/problem+json:
              schema:
                title: Error
                type: object
                description: ''
                properties:
                  type:
                    type: string
                    description: URL to a document describing the error condition.
                  status:
                    type: integer
                    description: >-
                      Transmission of the HTTP status code so that all
                      information can be found in one place, but also to correct
                      changes in the status code due to the use of proxy
                      servers.
                  title:
                    type: string
                    description: >-
                      A short, human-readable title for the general error type;
                      the title should not change for given types.
                  detail:
                    type: string
                    description: A human-readable description of the specific error.
                  instance:
                    type: string
                    description: >-
                      This optional key may be present, with a unique URI for
                      the specific error; this will often point to an error log
                      for that specific response.
                  request_id:
                    type: string
                    description: Correlation ID for the original request.
                required:
                  - type
                  - status
                additionalProperties: false
              example:
                status: 404
                type: not_found
        '406':
          description: >-
            Not Acceptable. The resource does not have a current representation
            that would be acceptable to the user agent. "Accept" header defined
            unsupported value.
          headers:
            upvest-request-id:
              required: true
              schema:
                type: string
                format: uuid
                example: 169ae4c7-ebd7-4041-94da-25369653eba7
          content:
            application/problem+json:
              schema:
                title: Error
                type: object
                description: ''
                properties:
                  type:
                    type: string
                    description: URL to a document describing the error condition.
                  status:
                    type: integer
                    description: >-
                      Transmission of the HTTP status code so that all
                      information can be found in one place, but also to correct
                      changes in the status code due to the use of proxy
                      servers.
                  title:
                    type: string
                    description: >-
                      A short, human-readable title for the general error type;
                      the title should not change for given types.
                  detail:
                    type: string
                    description: A human-readable description of the specific error.
                  instance:
                    type: string
                    description: >-
                      This optional key may be present, with a unique URI for
                      the specific error; this will often point to an error log
                      for that specific response.
                  request_id:
                    type: string
                    description: Correlation ID for the original request.
                required:
                  - type
                  - status
                additionalProperties: false
              example:
                status: 406
                type: not_acceptable
        '429':
          description: >-
            Too Many Requests. The caller has exceeded their quota for the time
            period and has been throttled.
          headers:
            upvest-request-id:
              required: true
              schema:
                type: string
                format: uuid
                example: 169ae4c7-ebd7-4041-94da-25369653eba7
          content:
            application/problem+json:
              schema:
                title: Error
                type: object
                description: ''
                properties:
                  type:
                    type: string
                    description: URL to a document describing the error condition.
                  status:
                    type: integer
                    description: >-
                      Transmission of the HTTP status code so that all
                      information can be found in one place, but also to correct
                      changes in the status code due to the use of proxy
                      servers.
                  title:
                    type: string
                    description: >-
                      A short, human-readable title for the general error type;
                      the title should not change for given types.
                  detail:
                    type: string
                    description: A human-readable description of the specific error.
                  instance:
                    type: string
                    description: >-
                      This optional key may be present, with a unique URI for
                      the specific error; this will often point to an error log
                      for that specific response.
                  request_id:
                    type: string
                    description: Correlation ID for the original request.
                required:
                  - type
                  - status
                additionalProperties: false
              example:
                status: 429
                type: too_many_requests
        '500':
          description: Internal Server Error. The service encountered an unexpected error.
          headers:
            upvest-request-id:
              required: true
              schema:
                type: string
                format: uuid
                example: 169ae4c7-ebd7-4041-94da-25369653eba7
          content:
            application/problem+json:
              schema:
                title: Error
                type: object
                description: ''
                properties:
                  type:
                    type: string
                    description: URL to a document describing the error condition.
                  status:
                    type: integer
                    description: >-
                      Transmission of the HTTP status code so that all
                      information can be found in one place, but also to correct
                      changes in the status code due to the use of proxy
                      servers.
                  title:
                    type: string
                    description: >-
                      A short, human-readable title for the general error type;
                      the title should not change for given types.
                  detail:
                    type: string
                    description: A human-readable description of the specific error.
                  instance:
                    type: string
                    description: >-
                      This optional key may be present, with a unique URI for
                      the specific error; this will often point to an error log
                      for that specific response.
                  request_id:
                    type: string
                    description: Correlation ID for the original request.
                required:
                  - type
                  - status
                additionalProperties: false
              example:
                status: 500
                type: internal_server_error
        '503':
          description: >-
            Service Unavailable. The service handling for this request cannot be
            reached at this time.
          headers:
            upvest-request-id:
              required: true
              schema:
                type: string
                format: uuid
                example: 169ae4c7-ebd7-4041-94da-25369653eba7
          content:
            application/problem+json:
              schema:
                title: Error
                type: object
                description: ''
                properties:
                  type:
                    type: string
                    description: URL to a document describing the error condition.
                  status:
                    type: integer
                    description: >-
                      Transmission of the HTTP status code so that all
                      information can be found in one place, but also to correct
                      changes in the status code due to the use of proxy
                      servers.
                  title:
                    type: string
                    description: >-
                      A short, human-readable title for the general error type;
                      the title should not change for given types.
                  detail:
                    type: string
                    description: A human-readable description of the specific error.
                  instance:
                    type: string
                    description: >-
                      This optional key may be present, with a unique URI for
                      the specific error; this will often point to an error log
                      for that specific response.
                  request_id:
                    type: string
                    description: Correlation ID for the original request.
                required:
                  - type
                  - status
                additionalProperties: false
              example:
                status: 503
                type: method_not_allowed
        '504':
          description: >-
            Gateway Timeout. The service gateway has reached its internal
            timeout.
          headers:
            upvest-request-id:
              required: true
              schema:
                type: string
                format: uuid
                example: 169ae4c7-ebd7-4041-94da-25369653eba7
          content:
            application/problem+json:
              schema:
                title: Error
                type: object
                description: ''
                properties:
                  type:
                    type: string
                    description: URL to a document describing the error condition.
                  status:
                    type: integer
                    description: >-
                      Transmission of the HTTP status code so that all
                      information can be found in one place, but also to correct
                      changes in the status code due to the use of proxy
                      servers.
                  title:
                    type: string
                    description: >-
                      A short, human-readable title for the general error type;
                      the title should not change for given types.
                  detail:
                    type: string
                    description: A human-readable description of the specific error.
                  instance:
                    type: string
                    description: >-
                      This optional key may be present, with a unique URI for
                      the specific error; this will often point to an error log
                      for that specific response.
                  request_id:
                    type: string
                    description: Correlation ID for the original request.
                required:
                  - type
                  - status
                additionalProperties: false
              example:
                status: 504
                type: gateway_timeout
  /instruments/{instrument_id}/venues/{venue_id}/prices/ohlc:
    parameters:
      - name: instrument_id
        in: path
        required: true
        schema:
          title: Instrument unique identifier
          description: Instrument unique identifier.
          oneOf:
            - title: >-
                International securities identification number with 'isin:' URN
                namespace
              type: string
              description: >-
                International securities identification number defined by [ISO
                6166](https://en.wikipedia.org/wiki/International_Securities_Identification_Number),
                prefixed with a 'isin:' [URN
                scheme](https://datatracker.ietf.org/doc/html/rfc8141).
              pattern: ^(urn:)?isin:[A-Z]{2}[A-Z0-9]{9}[0-9]$
            - title: Universally Unique IDentifier (UUID) with 'uuid:' URN scheme
              type: string
              description: >-
                Universally Unique IDentifier (UUID) with 'uuid:' URN namespace,
                defined by [RFC
                4122](https://datatracker.ietf.org/doc/html/rfc4122).
              pattern: >-
                ^(urn:)?uuid:[0-9a-fA-F]{8}-?[0-9a-fA-F]{4}-?[0-5][0-9a-fA-F]{3}-?[089abAB][0-9a-fA-F]{3}-?[0-9a-fA-F]{12}$
      - name: upvest-client-id
        in: header
        description: Tenant Client ID
        required: true
        schema:
          type: string
          format: uuid
          example: ebabcf4d-61c3-4942-875c-e265a7c2d062
      - name: authorization
        in: header
        description: |
          Bearer (access) token from the OAuth flow with correct scopes.
          https://datatracker.ietf.org/doc/html/rfc6750
        required: true
        schema:
          type: string
          pattern: ^Bearer [a-zA-Z0-9\-\._~+/]*=*
          example: Bearer c2VjcmV0Cg==
      - name: signature
        in: header
        required: true
        schema:
          type: string
        description: >-
          https://tools.ietf.org/id/draft-ietf-httpbis-message-signatures-01.html#name-the-signature-http-header
      - name: signature-input
        in: header
        required: true
        schema:
          type: string
        description: >-
          https://tools.ietf.org/id/draft-ietf-httpbis-message-signatures-01.html#name-the-signature-input-http-he
      - name: upvest-api-version
        in: header
        required: false
        schema:
          type: string
          enum:
            - '1'
          default: '1'
          example: '1'
        description: 'Upvest API version (Note: Do not include quotation marks)'
      - name: venue_id
        in: path
        required: true
        schema:
          title: Venue unique identifier.
          type: string
          description: Venue unique identifier.
          format: uuid
    get:
      operationId: retrieve_instrument_prices_ohlc
      summary: Get instrument OHLC prices
      description: >-
        Returns OHLC prices for the instrument at the specified venue for the
        chosen time period.


        If requested interval is `1d`, then the response also includes days with
        0 volume. In these cases `open`, `high`, `low` are empty (`""`), but
        `close` is provided. If requested interval is smaller than `1d`, then
        the intervals with 0 volume are omitted from the response.


        **NOTE**: Please note that in live mode we provide the latest prices
        that we receive from our data provider. However, it is to be expected
        that such updates will only take place on trading days.
      tags:
        - Price Data
      parameters:
        - name: start_date
          in: query
          required: false
          schema:
            type: string
            format: date
            title: >-
              Date and time formatted as YYYY-MM-DD[THH:mm:ssZ]. The time part
              is optional. RFC 3339, section 5.6.
          description: >-
            Returns OHLC prices from and including this datetime (UTC). If not
            specified, OHLC prices are returned from 30 days before the
            specified `end_date`. Time part of the timestamp is optional.
          example: '2023-11-01T10:30:00Z'
        - name: end_date
          in: query
          required: false
          schema:
            type: string
            format: date
            title: >-
              Date and time formatted as YYYY-MM-DD[THH:mm:ssZ]. The time part
              is optional. RFC 3339, section 5.6.
          description: >-
            Returns OHLC prices from and including this datetime (UTC). If not
            specified, OHLC prices are returned up to yesterday. Time part of
            the timestamp is optional.
          example: '2023-11-15T13:30:00Z'
        - name: adjusted_for
          in: query
          required: false
          schema:
            type: string
            enum:
              - NONE
              - ALL
            default: ALL
          description: >-
            Indication of the desired data adjustment. Prices are adjusted for
            corporate actions such as cash dividends and stock splits. Does not
            apply if intraday prices are being requested.
          example: NONE
        - name: interval
          in: query
          required: false
          schema:
            type: string
            default: 1d
            title: >-
              Format is 1d for daily prices or any positive integer followed by
              h or m for hour or minute, respectively.
            pattern: ^1d|[1-9][0-9]*[hm]$
          description: >-
            Indicates the maximum length of the interval each OHLC price tuple
            covers. If a price did not change subsequent price tuples are
            omitted. Allowed values are `1d` for daily prices or any positive
            integer followed by `h` or `m` for hour or minute, respectively.
            Requests are limited to a maximum of 1000 data points.
          example: 4h
      security:
        - oauth-client-credentials:
            - prices:read
      responses:
        '200':
          description: OK
          headers:
            upvest-request-id:
              required: true
              schema:
                type: string
                format: uuid
                example: 169ae4c7-ebd7-4041-94da-25369653eba7
          content:
            application/json:
              schema:
                type: object
                properties:
                  data:
                    type: array
                    items:
                      type: object
                      properties:
                        currency:
                          type: string
                          description: >-
                            Alphabetic three-letter [ISO
                            4217](https://en.wikipedia.org/wiki/ISO_4217)
                            currency code.

                            * EUR - Euro
                          enum:
                            - EUR
                          default: EUR
                        time:
                          type: string
                          format: date-time
                          description: >-
                            The date and time indicating start of the interval.
                            [RFC
                            3339-5](https://datatracker.ietf.org/doc/html/rfc3339#section-5.6),
                            [ISO8601
                            UTC](https://www.iso.org/iso-8601-date-and-time-format.html)
                        open:
                          type: string
                          pattern: ^-?[0-9]{0,63}(\.[0-9]{1,27})?$
                        close:
                          type: string
                          pattern: ^-?[0-9]{0,63}(\.[0-9]{1,27})?$
                        high:
                          type: string
                          pattern: ^-?[0-9]{0,63}(\.[0-9]{1,27})?$
                        low:
                          type: string
                          pattern: ^-?[0-9]{0,63}(\.[0-9]{1,27})?$
                        volume:
                          type: string
                          pattern: ^-?[0-9]{0,63}(\.[0-9]{1,27})?$
                  meta:
                    type: object
                    properties:
                      count:
                        type: integer
                        description: Count of the resources returned in the response.
                required:
                  - data
                  - meta
                additionalProperties: false
              example:
                data:
                  - currency: EUR
                    time: '2023-01-09'
                    open: '213.32'
                    high: '215.32'
                    low: '210.32'
                    close: '213.22'
                    volume: '277973'
                  - currency: EUR
                    time: '2023-01-10'
                    open: '214.42'
                    high: '214.42'
                    low: '213.22'
                    close: '213.22'
                    volume: '260335'
                meta:
                  count: 2
        '400':
          description: Bad Request. The incoming request had a malformed parameter/object.
          headers:
            upvest-request-id:
              required: true
              schema:
                type: string
                format: uuid
                example: 169ae4c7-ebd7-4041-94da-25369653eba7
          content:
            application/problem+json:
              schema:
                title: Error
                type: object
                description: ''
                properties:
                  type:
                    type: string
                    description: URL to a document describing the error condition.
                  status:
                    type: integer
                    description: >-
                      Transmission of the HTTP status code so that all
                      information can be found in one place, but also to correct
                      changes in the status code due to the use of proxy
                      servers.
                  title:
                    type: string
                    description: >-
                      A short, human-readable title for the general error type;
                      the title should not change for given types.
                  detail:
                    type: string
                    description: A human-readable description of the specific error.
                  instance:
                    type: string
                    description: >-
                      This optional key may be present, with a unique URI for
                      the specific error; this will often point to an error log
                      for that specific response.
                  request_id:
                    type: string
                    description: Correlation ID for the original request.
                required:
                  - type
                  - status
                additionalProperties: false
              example:
                status: 400
                type: bad_request
        '401':
          description: Unauthorized. The caller has not been authenticated.
          headers:
            upvest-request-id:
              required: true
              schema:
                type: string
                format: uuid
                example: 169ae4c7-ebd7-4041-94da-25369653eba7
          content:
            application/problem+json:
              schema:
                title: Error
                type: object
                description: ''
                properties:
                  type:
                    type: string
                    description: URL to a document describing the error condition.
                  status:
                    type: integer
                    description: >-
                      Transmission of the HTTP status code so that all
                      information can be found in one place, but also to correct
                      changes in the status code due to the use of proxy
                      servers.
                  title:
                    type: string
                    description: >-
                      A short, human-readable title for the general error type;
                      the title should not change for given types.
                  detail:
                    type: string
                    description: A human-readable description of the specific error.
                  instance:
                    type: string
                    description: >-
                      This optional key may be present, with a unique URI for
                      the specific error; this will often point to an error log
                      for that specific response.
                  request_id:
                    type: string
                    description: Correlation ID for the original request.
                required:
                  - type
                  - status
                additionalProperties: false
              example:
                status: 401
                type: unauthorized
        '403':
          description: >-
            Forbidden. The caller has been authenticated but is not allowed to
            take the requested action.
          headers:
            upvest-request-id:
              required: true
              schema:
                type: string
                format: uuid
                example: 169ae4c7-ebd7-4041-94da-25369653eba7
          content:
            application/problem+json:
              schema:
                title: Error
                type: object
                description: ''
                properties:
                  type:
                    type: string
                    description: URL to a document describing the error condition.
                  status:
                    type: integer
                    description: >-
                      Transmission of the HTTP status code so that all
                      information can be found in one place, but also to correct
                      changes in the status code due to the use of proxy
                      servers.
                  title:
                    type: string
                    description: >-
                      A short, human-readable title for the general error type;
                      the title should not change for given types.
                  detail:
                    type: string
                    description: A human-readable description of the specific error.
                  instance:
                    type: string
                    description: >-
                      This optional key may be present, with a unique URI for
                      the specific error; this will often point to an error log
                      for that specific response.
                  request_id:
                    type: string
                    description: Correlation ID for the original request.
                required:
                  - type
                  - status
                additionalProperties: false
              example:
                status: 403
                type: forbidden
        '404':
          description: Not Found. The requested resource could not be found.
          headers:
            upvest-request-id:
              required: true
              schema:
                type: string
                format: uuid
                example: 169ae4c7-ebd7-4041-94da-25369653eba7
          content:
            application/problem+json:
              schema:
                title: Error
                type: object
                description: ''
                properties:
                  type:
                    type: string
                    description: URL to a document describing the error condition.
                  status:
                    type: integer
                    description: >-
                      Transmission of the HTTP status code so that all
                      information can be found in one place, but also to correct
                      changes in the status code due to the use of proxy
                      servers.
                  title:
                    type: string
                    description: >-
                      A short, human-readable title for the general error type;
                      the title should not change for given types.
                  detail:
                    type: string
                    description: A human-readable description of the specific error.
                  instance:
                    type: string
                    description: >-
                      This optional key may be present, with a unique URI for
                      the specific error; this will often point to an error log
                      for that specific response.
                  request_id:
                    type: string
                    description: Correlation ID for the original request.
                required:
                  - type
                  - status
                additionalProperties: false
              example:
                status: 404
                type: not_found
        '406':
          description: >-
            Not Acceptable. The resource does not have a current representation
            that would be acceptable to the user agent. "Accept" header defined
            unsupported value.
          headers:
            upvest-request-id:
              required: true
              schema:
                type: string
                format: uuid
                example: 169ae4c7-ebd7-4041-94da-25369653eba7
          content:
            application/problem+json:
              schema:
                title: Error
                type: object
                description: ''
                properties:
                  type:
                    type: string
                    description: URL to a document describing the error condition.
                  status:
                    type: integer
                    description: >-
                      Transmission of the HTTP status code so that all
                      information can be found in one place, but also to correct
                      changes in the status code due to the use of proxy
                      servers.
                  title:
                    type: string
                    description: >-
                      A short, human-readable title for the general error type;
                      the title should not change for given types.
                  detail:
                    type: string
                    description: A human-readable description of the specific error.
                  instance:
                    type: string
                    description: >-
                      This optional key may be present, with a unique URI for
                      the specific error; this will often point to an error log
                      for that specific response.
                  request_id:
                    type: string
                    description: Correlation ID for the original request.
                required:
                  - type
                  - status
                additionalProperties: false
              example:
                status: 406
                type: not_acceptable
        '429':
          description: >-
            Too Many Requests. The caller has exceeded their quota for the time
            period and has been throttled.
          headers:
            upvest-request-id:
              required: true
              schema:
                type: string
                format: uuid
                example: 169ae4c7-ebd7-4041-94da-25369653eba7
          content:
            application/problem+json:
              schema:
                title: Error
                type: object
                description: ''
                properties:
                  type:
                    type: string
                    description: URL to a document describing the error condition.
                  status:
                    type: integer
                    description: >-
                      Transmission of the HTTP status code so that all
                      information can be found in one place, but also to correct
                      changes in the status code due to the use of proxy
                      servers.
                  title:
                    type: string
                    description: >-
                      A short, human-readable title for the general error type;
                      the title should not change for given types.
                  detail:
                    type: string
                    description: A human-readable description of the specific error.
                  instance:
                    type: string
                    description: >-
                      This optional key may be present, with a unique URI for
                      the specific error; this will often point to an error log
                      for that specific response.
                  request_id:
                    type: string
                    description: Correlation ID for the original request.
                required:
                  - type
                  - status
                additionalProperties: false
              example:
                status: 429
                type: too_many_requests
        '500':
          description: Internal Server Error. The service encountered an unexpected error.
          headers:
            upvest-request-id:
              required: true
              schema:
                type: string
                format: uuid
                example: 169ae4c7-ebd7-4041-94da-25369653eba7
          content:
            application/problem+json:
              schema:
                title: Error
                type: object
                description: ''
                properties:
                  type:
                    type: string
                    description: URL to a document describing the error condition.
                  status:
                    type: integer
                    description: >-
                      Transmission of the HTTP status code so that all
                      information can be found in one place, but also to correct
                      changes in the status code due to the use of proxy
                      servers.
                  title:
                    type: string
                    description: >-
                      A short, human-readable title for the general error type;
                      the title should not change for given types.
                  detail:
                    type: string
                    description: A human-readable description of the specific error.
                  instance:
                    type: string
                    description: >-
                      This optional key may be present, with a unique URI for
                      the specific error; this will often point to an error log
                      for that specific response.
                  request_id:
                    type: string
                    description: Correlation ID for the original request.
                required:
                  - type
                  - status
                additionalProperties: false
              example:
                status: 500
                type: internal_server_error
        '503':
          description: >-
            Service Unavailable. The service handling for this request cannot be
            reached at this time.
          headers:
            upvest-request-id:
              required: true
              schema:
                type: string
                format: uuid
                example: 169ae4c7-ebd7-4041-94da-25369653eba7
          content:
            application/problem+json:
              schema:
                title: Error
                type: object
                description: ''
                properties:
                  type:
                    type: string
                    description: URL to a document describing the error condition.
                  status:
                    type: integer
                    description: >-
                      Transmission of the HTTP status code so that all
                      information can be found in one place, but also to correct
                      changes in the status code due to the use of proxy
                      servers.
                  title:
                    type: string
                    description: >-
                      A short, human-readable title for the general error type;
                      the title should not change for given types.
                  detail:
                    type: string
                    description: A human-readable description of the specific error.
                  instance:
                    type: string
                    description: >-
                      This optional key may be present, with a unique URI for
                      the specific error; this will often point to an error log
                      for that specific response.
                  request_id:
                    type: string
                    description: Correlation ID for the original request.
                required:
                  - type
                  - status
                additionalProperties: false
              example:
                status: 503
                type: method_not_allowed
        '504':
          description: >-
            Gateway Timeout. The service gateway has reached its internal
            timeout.
          headers:
            upvest-request-id:
              required: true
              schema:
                type: string
                format: uuid
                example: 169ae4c7-ebd7-4041-94da-25369653eba7
          content:
            application/problem+json:
              schema:
                title: Error
                type: object
                description: ''
                properties:
                  type:
                    type: string
                    description: URL to a document describing the error condition.
                  status:
                    type: integer
                    description: >-
                      Transmission of the HTTP status code so that all
                      information can be found in one place, but also to correct
                      changes in the status code due to the use of proxy
                      servers.
                  title:
                    type: string
                    description: >-
                      A short, human-readable title for the general error type;
                      the title should not change for given types.
                  detail:
                    type: string
                    description: A human-readable description of the specific error.
                  instance:
                    type: string
                    description: >-
                      This optional key may be present, with a unique URI for
                      the specific error; this will often point to an error log
                      for that specific response.
                  request_id:
                    type: string
                    description: Correlation ID for the original request.
                required:
                  - type
                  - status
                additionalProperties: false
              example:
                status: 504
                type: gateway_timeout
  /orders:
    parameters:
      - name: upvest-client-id
        in: header
        description: Tenant Client ID
        required: true
        schema:
          type: string
          format: uuid
          example: ebabcf4d-61c3-4942-875c-e265a7c2d062
      - name: authorization
        in: header
        description: |
          Bearer (access) token from the OAuth flow with correct scopes.
          https://datatracker.ietf.org/doc/html/rfc6750
        required: true
        schema:
          type: string
          pattern: ^Bearer [a-zA-Z0-9\-\._~+/]*=*
          example: Bearer c2VjcmV0Cg==
      - name: signature
        in: header
        required: true
        schema:
          type: string
        description: >-
          https://tools.ietf.org/id/draft-ietf-httpbis-message-signatures-01.html#name-the-signature-http-header
      - name: signature-input
        in: header
        required: true
        schema:
          type: string
        description: >-
          https://tools.ietf.org/id/draft-ietf-httpbis-message-signatures-01.html#name-the-signature-input-http-he
      - name: upvest-api-version
        in: header
        required: false
        schema:
          type: string
          enum:
            - '1'
          default: '1'
          example: '1'
        description: 'Upvest API version (Note: Do not include quotation marks)'
    post:
      operationId: place_order
      summary: Place an order
      description: >-
        Places a new order. After the creation request for the order is
        accepted, further processing takes place asynchronously.
      tags:
        - Orders
      security:
        - oauth-client-credentials:
            - orders:admin
      parameters:
        - name: idempotency-key
          in: header
          required: true
          schema:
            type: string
            format: uuid
            pattern: >-
              ^[0-9a-fA-F]{8}-?[0-9a-fA-F]{4}-?[0-5][0-9a-fA-F]{3}-?[089abAB][0-9a-fA-F]{3}-?[0-9a-fA-F]{12}$
            example: ccb07f42-4104-44ad-8e1f-c660bb7b269c
          description: >
            A UUID to be used as an idempotency key.  This prevents a duplicate
            request from being replayed.

            https://docs.upvest.co/documentation/concepts/api_concepts/idempotency
      requestBody:
        content:
          application/json:
            schema:
              title: Order - Place - Request
              type: object
              properties:
                user_id:
                  type: string
                  format: uuid
                  description: The ID of the user
                account_id:
                  type: string
                  format: uuid
                  description: The ID of the account that owns the order
                cash_amount:
                  allOf:
                    - type: string
                      pattern: ^[0-9]{1,9}(\.[0-9]{2})?$
                    - description: >-
                        Cash amount for a nominal order, not required if a share
                        quantity is specified.
                currency:
                  allOf:
                    - type: string
                      description: >-
                        Alphabetic three-letter [ISO
                        4217](https://en.wikipedia.org/wiki/ISO_4217) currency
                        code.

                        * EUR - Euro

                        * GBP - British Pound
                      enum:
                        - EUR
                        - GBP
                    - description: The currency for the order.
                side:
                  type: string
                  description: |-
                    Side of the order.
                    * BUY - 
                    * SELL - 
                  enum:
                    - BUY
                    - SELL
                instrument_id:
                  title: International securities identification number
                  type: string
                  description: >-
                    International securities identification number defined by
                    [ISO
                    6166](https://en.wikipedia.org/wiki/International_Securities_Identification_Number).
                  pattern: ^[A-Z]{2}[A-Z0-9]{9}[0-9]$
                instrument_id_type:
                  description: |-
                    The type of the ID used in the request.
                    * ISIN - 
                  enum:
                    - ISIN
                  default: ISIN
                  type: string
                order_type:
                  type: string
                  description: |-
                    Type of the order.
                    * MARKET - 
                    * LIMIT - 
                    * STOP - 
                  enum:
                    - MARKET
                    - LIMIT
                    - STOP
                quantity:
                  allOf:
                    - type: string
                      pattern: ^[0-9]{0,63}(\.[0-9]{1,27})?$
                    - description: >-
                        Quantity of securities for the order. Only required if
                        the cash amount is not specified.
                user_instrument_fit_acknowledgement:
                  type: boolean
                  description: >-
                    Only applicable if the user has failed the instrument fit
                    check for the instrument type being ordered. True if the
                    user has acknowledged their willingness to trade.
                limit_price:
                  allOf:
                    - type: string
                      pattern: ^[0-9]{0,63}(\.[0-9]{1,27})?$
                    - description: The limit price for orders of the type 'limit'.
                stop_price:
                  allOf:
                    - type: string
                      pattern: ^[0-9]{0,63}(\.[0-9]{1,27})?$
                    - description: The stop price for orders of the type 'stop'.
                expiry_date:
                  allOf:
                    - title: Expiry date
                      type: string
                      pattern: ^[0-9]{4}-[0-9]{2}-[0-9]{2}$
                    - description: >-
                        The order expiration date (last day the order can trade)
                        in the YYYY-MM-DD format. [RFC 3339, section
                        5.6](https://json-schema.org/draft/2020-12/json-schema-validation.html#RFC3339)
                        RFC 3339. The default value is order creation date + 200
                        years
                client_reference:
                  type: string
                  description: >-
                    Immutable reference to the API flow that initiated the
                    order. For client initiated API flows, this is a client
                    provided ID. For internal initiations, it is set to the ID
                    of the related object.
                  maxLength: 100
                execution_flow:
                  type: string
                  description: >-
                    Execution flow that the order processing goes through. If no
                    value is specified, the default value is assumed -
                    `STRAIGHT_THROUGH`.

                    * STRAIGHT_THROUGH - 

                    * BLOCK - 
                  enum:
                    - STRAIGHT_THROUGH
                    - BLOCK
                fee_configuration:
                  type: array
                  description: fee configuration
                  items:
                    title: Absolute Fee
                    type: object
                    properties:
                      type:
                        title: Fee type
                        description: |-
                          Fee type
                          * TRANSACTION_FEE_BUY - 
                          * TRANSACTION_FEE_SELL - 
                        type: string
                        enum:
                          - TRANSACTION_FEE_BUY
                          - TRANSACTION_FEE_SELL
                      value_type:
                        type: string
                        default: ABSOLUTE
                        description: The value type must be “ABSOLUTE”.
                      charge_method:
                        title: Fee charge method
                        type: string
                        description: >-
                          Indicates whether the fee will be charged by client or
                          by other methods.

                          * CHARGED_BY_CLIENT - 

                          * COLLECTED_BY_UPVEST - 
                        enum:
                          - CHARGED_BY_CLIENT
                          - COLLECTED_BY_UPVEST
                      cash_amount:
                        type: string
                        pattern: ^[0-9]{1,9}(\.[0-9]{2})?$
                      currency:
                        type: string
                        description: >-
                          Alphabetic three-letter [ISO
                          4217](https://en.wikipedia.org/wiki/ISO_4217) currency
                          code.

                          * EUR - Euro

                          * GBP - British Pound
                        enum:
                          - EUR
                          - GBP
                    required:
                      - type
                      - value_type
                      - charge_method
                      - cash_amount
                      - currency
                    additionalProperties: false
              required:
                - user_id
                - account_id
                - side
                - instrument_id
                - instrument_id_type
              additionalProperties: false
            examples:
              place_nominal_buy:
                summary: Nominal Buy Order Request
                value:
                  user_id: 2dedfeb0-58cd-44f2-ae08-0e41fe0413d9
                  account_id: debf2026-f2da-4ff0-bb84-92e45babb1e3
                  cash_amount: '1000'
                  currency: EUR
                  side: BUY
                  instrument_id: US0378331005
                  instrument_id_type: ISIN
                  order_type: MARKET
                  user_instrument_fit_acknowledgement: true
                  limit_price: ''
                  stop_price: ''
              place_nominal_buy_with_fee_configuration:
                summary: Nominal Buy Order Request with fee configuration
                value:
                  user_id: 2dedfeb0-58cd-44f2-ae08-0e41fe0413d9
                  account_id: debf2026-f2da-4ff0-bb84-92e45babb1e3
                  cash_amount: '1000'
                  currency: EUR
                  side: BUY
                  instrument_id: US0378331005
                  instrument_id_type: ISIN
                  order_type: MARKET
                  user_instrument_fit_acknowledgement: true
                  limit_price: ''
                  stop_price: ''
                  fee_configuration:
                    - cash_amount: '0.90'
                      currency: EUR
                      type: TRANSACTION_FEE_BUY
                      charge_method: CHARGED_BY_CLIENT
                      value_type: ABSOLUTE
              place_unit_sell:
                summary: Unit Sell Order Request
                value:
                  user_id: 2dedfeb0-58cd-44f2-ae08-0e41fe0413d9
                  account_id: debf2026-f2da-4ff0-bb84-92e45babb1e3
                  currency: EUR
                  side: SELL
                  instrument_id: US0378331005
                  instrument_id_type: ISIN
                  order_type: MARKET
                  quantity: '10'
                  user_instrument_fit_acknowledgement: true
                  limit_price: ''
                  stop_price: ''
              place_unit_sell_with_fee_configuration:
                summary: Unit Sell Order Request with fee configuration
                value:
                  user_id: 2dedfeb0-58cd-44f2-ae08-0e41fe0413d9
                  account_id: debf2026-f2da-4ff0-bb84-92e45babb1e3
                  currency: EUR
                  side: SELL
                  instrument_id: US0378331005
                  instrument_id_type: ISIN
                  order_type: MARKET
                  quantity: '10'
                  user_instrument_fit_acknowledgement: true
                  limit_price: ''
                  stop_price: ''
                  fee_configuration:
                    - cash_amount: '0.90'
                      currency: EUR
                      type: TRANSACTION_FEE_SELL
                      charge_method: CHARGED_BY_CLIENT
                      value_type: ABSOLUTE
      responses:
        '202':
          description: The request for the order creation has been accepted for processing.
          headers:
            upvest-request-id:
              required: true
              schema:
                type: string
                format: uuid
                example: 169ae4c7-ebd7-4041-94da-25369653eba7
          content:
            application/json:
              schema:
                title: Order
                type: object
                properties:
                  id:
                    title: Order unique identifier
                    type: string
                    format: uuid
                  created_at:
                    type: string
                    format: date-time
                    description: >-
                      Date and time when the resource was created. [RFC
                      3339-5](https://datatracker.ietf.org/doc/html/rfc3339#section-5.6),
                      [ISO8601
                      UTC](https://www.iso.org/iso-8601-date-and-time-format.html)
                  updated_at:
                    type: string
                    format: date-time
                    description: >-
                      Date and time when the resource was last updated. [RFC
                      3339-5](https://datatracker.ietf.org/doc/html/rfc3339#section-5.6),
                      [ISO8601
                      UTC](https://www.iso.org/iso-8601-date-and-time-format.html)
                  user_id:
                    type: string
                    format: uuid
                    description: The ID of the user
                  account_id:
                    type: string
                    format: uuid
                    description: The ID of the account that owns the order
                  cash_amount:
                    allOf:
                      - type: string
                        pattern: ^[0-9]{1,9}(\.[0-9]{2})?$
                      - description: >-
                          Cash amount for a nominal order, not required if a
                          share quantity is specified.
                  currency:
                    allOf:
                      - type: string
                        description: >-
                          Alphabetic three-letter [ISO
                          4217](https://en.wikipedia.org/wiki/ISO_4217) currency
                          code.

                          * EUR - Euro

                          * GBP - British Pound
                        enum:
                          - EUR
                          - GBP
                      - description: The currency for the order.
                  side:
                    type: string
                    description: |-
                      Side of the order.
                      * BUY - 
                      * SELL - 
                    enum:
                      - BUY
                      - SELL
                  instrument_id:
                    title: International securities identification number
                    type: string
                    description: >-
                      International securities identification number defined by
                      [ISO
                      6166](https://en.wikipedia.org/wiki/International_Securities_Identification_Number).
                    pattern: ^[A-Z]{2}[A-Z0-9]{9}[0-9]$
                  instrument_id_type:
                    description: |-
                      The type of the ID used in the request.
                      * ISIN - 
                    enum:
                      - ISIN
                    default: ISIN
                    type: string
                  order_type:
                    type: string
                    description: |-
                      Type of the order.
                      * MARKET - 
                      * LIMIT - 
                      * STOP - 
                    enum:
                      - MARKET
                      - LIMIT
                      - STOP
                  quantity:
                    allOf:
                      - type: string
                        pattern: ^[0-9]{0,63}(\.[0-9]{1,27})?$
                      - description: >-
                          Quantity of securities for the order. Only required if
                          the cash amount is not specified.
                  user_instrument_fit_acknowledgement:
                    type: boolean
                    description: >-
                      Only applicable if the user has failed the instrument fit
                      check for the instrument type being ordered. True if the
                      user has acknowledged their willingness to trade.
                  limit_price:
                    allOf:
                      - type: string
                        pattern: ^[0-9]{0,63}(\.[0-9]{1,27})?$
                      - description: The limit price for orders of the type 'limit'.
                  stop_price:
                    allOf:
                      - type: string
                        pattern: ^[0-9]{0,63}(\.[0-9]{1,27})?$
                      - description: The stop price for orders of the type 'stop'.
                  expiry_date:
                    allOf:
                      - title: Expiry date
                        type: string
                        pattern: ^[0-9]{4}-[0-9]{2}-[0-9]{2}$
                      - description: >-
                          The order expiration date (last day the order can
                          trade) in the YYYY-MM-DD format. [RFC 3339, section
                          5.6](https://json-schema.org/draft/2020-12/json-schema-validation.html#RFC3339)
                          RFC 3339. The default value is order creation date +
                          200 years
                  status:
                    type: string
                    description: |-
                      The execution status of the order.
                      * NEW - 
                      * PROCESSING - 
                      * FILLED - 
                      * CANCELLED - 
                    enum:
                      - NEW
                      - PROCESSING
                      - FILLED
                      - CANCELLED
                  fee:
                    type: string
                    pattern: ^[0-9]{0,63}(\.[0-9]{1,27})?$
                  cancellation_reason:
                    type: string
                    description: >-
                      Reason for Order cancellation. The field is present in
                      case the Order has a status of CANCELLED.

                      * CANCELLED_BY_CLIENT - 

                      * CANCELLED_BY_UPVEST_OPERATIONS - 

                      * CANCELLED_BY_TRADING_PARTNER - 

                      * CANCELLED_BY_UPVEST_PLATFORM - 
                    enum:
                      - CANCELLED_BY_CLIENT
                      - CANCELLED_BY_UPVEST_OPERATIONS
                      - CANCELLED_BY_TRADING_PARTNER
                      - CANCELLED_BY_UPVEST_PLATFORM
                  initiation_flow:
                    type: string
                    description: >-
                      Initiation flow used during order creation, i.e. what
                      triggered the order.

                      * API - 

                      * PORTFOLIO - 

                      * CASH_DIVIDEND_REINVESTMENT - 

                      * PORTFOLIO_REBALANCING - 

                      * SELL_TO_COVER_FEES - 

                      * SELL_TO_COVER_TAXES - 

                      * ACCOUNT_LIQUIDATION - 

                      * UPVEST_OPERATIONS - 

                      * SAVINGS_PLAN - 
                    enum:
                      - API
                      - PORTFOLIO
                      - CASH_DIVIDEND_REINVESTMENT
                      - PORTFOLIO_REBALANCING
                      - SELL_TO_COVER_FEES
                      - SELL_TO_COVER_TAXES
                      - ACCOUNT_LIQUIDATION
                      - UPVEST_OPERATIONS
                      - SAVINGS_PLAN
                  execution_flow:
                    type: string
                    description: >-
                      Execution flow that the order processing goes through. If
                      no value is specified, the default value is assumed -
                      `STRAIGHT_THROUGH`.

                      * STRAIGHT_THROUGH - 

                      * BLOCK - 
                    enum:
                      - STRAIGHT_THROUGH
                      - BLOCK
                  executions:
                    type: array
                    description: Order executions associated with this order
                    items:
                      title: Order execution
                      type: object
                      properties:
                        id:
                          title: Order execution unique identifier
                          type: string
                          format: uuid
                        cash_amount:
                          type: string
                          pattern: ^[0-9]{1,9}(\.[0-9]{2})?$
                        share_quantity:
                          type: string
                          pattern: ^[0-9]{0,63}(\.[0-9]{1,27})?$
                        price:
                          type: string
                          pattern: ^[0-9]{0,63}(\.[0-9]{1,4})?$
                        transaction_time:
                          type: string
                          format: date-time
                        taxes:
                          type: array
                          items:
                            title: Tax
                            type: object
                            properties:
                              type:
                                type: string
                                description: |-
                                  Tax type
                                  * TOTAL - 
                                default: TOTAL
                                enum:
                                  - TOTAL
                              amount:
                                type: string
                                pattern: ^[0-9]{0,63}(\.[0-9]{1,27})?$
                            required:
                              - type
                              - amount
                        order_id:
                          title: Order unique identifier
                          type: string
                          format: uuid
                        status:
                          type: string
                          description: |-
                            Execution status of the Execution.
                            * FILLED - 
                            * SETTLED - 
                            * CANCELLED - 
                          enum:
                            - FILLED
                            - SETTLED
                            - CANCELLED
                        side:
                          type: string
                          description: |-
                            Side of the execution.
                            * BUY - 
                            * SELL - 
                          enum:
                            - BUY
                            - SELL
                        currency:
                          type: string
                          description: >-
                            Alphabetic three-letter [ISO
                            4217](https://en.wikipedia.org/wiki/ISO_4217)
                            currency code.

                            * EUR - Euro

                            * GBP - British Pound
                          enum:
                            - EUR
                            - GBP
                        settlement_date:
                          allOf:
                            - title: Settlement date
                              type: string
                              pattern: ^[0-9]{4}-[0-9]{2}-[0-9]{2}$
                            - description: >-
                                Order execution settlement date in the
                                YYYY-MM-DD format. [RFC 3339, section
                                5.6](https://json-schema.org/draft/2020-12/json-schema-validation.html#RFC3339)
                                RFC 3339
                        venue_id:
                          type: string
                          format: uuid
                          description: The ID of the venue
                      required:
                        - id
                        - cash_amount
                        - share_quantity
                        - price
                        - transaction_time
                        - taxes
                        - order_id
                        - status
                        - side
                        - currency
                        - venue_id
                      additionalProperties: false
                  client_reference:
                    type: string
                    description: >-
                      Immutable reference to the API flow that initiated the
                      order. For client initiated API flows, this is a client
                      provided ID. For internal initiations, it is set to the ID
                      of the related object.
                    maxLength: 100
                  fee_configuration:
                    type: array
                    description: fee configuration
                    items:
                      title: Absolute Fee
                      type: object
                      properties:
                        type:
                          title: Fee type
                          description: |-
                            Fee type
                            * TRANSACTION_FEE_BUY - 
                            * TRANSACTION_FEE_SELL - 
                          type: string
                          enum:
                            - TRANSACTION_FEE_BUY
                            - TRANSACTION_FEE_SELL
                        value_type:
                          type: string
                          default: ABSOLUTE
                          description: The value type must be “ABSOLUTE”.
                        charge_method:
                          title: Fee charge method
                          type: string
                          description: >-
                            Indicates whether the fee will be charged by client
                            or by other methods.

                            * CHARGED_BY_CLIENT - 

                            * COLLECTED_BY_UPVEST - 
                          enum:
                            - CHARGED_BY_CLIENT
                            - COLLECTED_BY_UPVEST
                        cash_amount:
                          type: string
                          pattern: ^[0-9]{1,9}(\.[0-9]{2})?$
                        currency:
                          type: string
                          description: >-
                            Alphabetic three-letter [ISO
                            4217](https://en.wikipedia.org/wiki/ISO_4217)
                            currency code.

                            * EUR - Euro

                            * GBP - British Pound
                          enum:
                            - EUR
                            - GBP
                      required:
                        - type
                        - value_type
                        - charge_method
                        - cash_amount
                        - currency
                      additionalProperties: false
                required:
                  - id
                  - created_at
                  - updated_at
                  - user_id
                  - account_id
                  - cash_amount
                  - currency
                  - side
                  - instrument_id
                  - instrument_id_type
                  - order_type
                  - quantity
                  - status
                  - fee
                  - initiation_flow
                  - executions
                  - client_reference
                additionalProperties: false
              examples:
                place_nominal_buy:
                  summary: Nominal Buy Order Response
                  value:
                    id: eb5ba93f-5dfe-4bf1-8571-4da0caacc80c
                    created_at: '2021-07-21T14:10:00.00Z'
                    updated_at: '2021-07-21T14:10:00.00Z'
                    user_id: 2dedfeb0-58cd-44f2-ae08-0e41fe0413d9
                    account_id: debf2026-f2da-4ff0-bb84-92e45babb1e3
                    cash_amount: '1000'
                    currency: EUR
                    side: BUY
                    instrument_id: US0378331005
                    instrument_id_type: ISIN
                    order_type: MARKET
                    quantity: '0'
                    user_instrument_fit_acknowledgement: true
                    limit_price: ''
                    stop_price: ''
                    status: NEW
                    fee: '0.0'
                    executions: []
                    client_reference: ''
                    initiation_flow: API
                place_nominal_buy_with_fee_configuration:
                  summary: Nominal Buy Order Response with fee configuration
                  value:
                    id: eb5ba93f-5dfe-4bf1-8571-4da0caacc80c
                    created_at: '2021-07-21T14:10:00.00Z'
                    updated_at: '2021-07-21T14:10:00.00Z'
                    user_id: 2dedfeb0-58cd-44f2-ae08-0e41fe0413d9
                    account_id: debf2026-f2da-4ff0-bb84-92e45babb1e3
                    cash_amount: '1000'
                    currency: EUR
                    side: BUY
                    instrument_id: US0378331005
                    instrument_id_type: ISIN
                    order_type: MARKET
                    quantity: '0'
                    user_instrument_fit_acknowledgement: true
                    limit_price: ''
                    stop_price: ''
                    status: NEW
                    fee: '0.0'
                    executions: []
                    client_reference: ''
                    initiation_flow: API
                    fee_configuration:
                      - cash_amount: '0.90'
                        currency: EUR
                        type: TRANSACTION_FEE_BUY
                        charge_method: CHARGED_BY_CLIENT
                        value_type: ABSOLUTE
                place_nominal_buy_executions:
                  summary: Nominal Buy Order Response with Executions
                  value:
                    id: eb5ba93f-5dfe-4bf1-8571-4da0caacc80c
                    created_at: '2021-07-21T14:10:00.00Z'
                    updated_at: '2021-07-21T14:10:00.00Z'
                    user_id: 2dedfeb0-58cd-44f2-ae08-0e41fe0413d9
                    account_id: debf2026-f2da-4ff0-bb84-92e45babb1e3
                    cash_amount: '1000'
                    currency: EUR
                    side: BUY
                    instrument_id: US0378331005
                    instrument_id_type: ISIN
                    order_type: MARKET
                    quantity: '0'
                    user_instrument_fit_acknowledgement: true
                    limit_price: ''
                    stop_price: ''
                    status: FILLED
                    fee: '0.0'
                    executions:
                      - id: b9dc0676-8a7d-412d-802a-3b325eefd15e
                        side: BUY
                        currency: EUR
                        status: FILLED
                        order_id: eb5ba93f-5dfe-4bf1-8571-4da0caacc80c
                        cash_amount: '1000'
                        share_quantity: '11.734334663'
                        price: '85.22'
                        transaction_time: '2021-07-21T14:10:00.020Z'
                        taxes:
                          - type: TOTAL
                            amount: '0'
                        venue_id: 20d6024b-2df4-41ae-8d42-62e4744e455b
                    client_reference: ''
                    initiation_flow: API
                place_unit_sell:
                  summary: Unit Sell Order Response
                  value:
                    id: eb5ba93f-5dfe-4bf1-8571-4da0caacc80c
                    created_at: '2021-07-21T14:10:00.00Z'
                    updated_at: '2021-07-21T14:10:00.00Z'
                    user_id: 2dedfeb0-58cd-44f2-ae08-0e41fe0413d9
                    account_id: debf2026-f2da-4ff0-bb84-92e45babb1e3
                    cash_amount: '0'
                    currency: EUR
                    side: SELL
                    instrument_id: US0378331005
                    instrument_id_type: ISIN
                    order_type: MARKET
                    quantity: '10'
                    user_instrument_fit_acknowledgement: true
                    limit_price: ''
                    stop_price: ''
                    status: NEW
                    fee: '0.0'
                    executions: []
                    client_reference: ''
                    initiation_flow: API
                place_unit_sell_with_fee_configuration:
                  summary: Unit Sell Order Response with fee configuration
                  value:
                    id: eb5ba93f-5dfe-4bf1-8571-4da0caacc80c
                    created_at: '2021-07-21T14:10:00.00Z'
                    updated_at: '2021-07-21T14:10:00.00Z'
                    user_id: 2dedfeb0-58cd-44f2-ae08-0e41fe0413d9
                    account_id: debf2026-f2da-4ff0-bb84-92e45babb1e3
                    cash_amount: '0'
                    currency: EUR
                    side: SELL
                    instrument_id: US0378331005
                    instrument_id_type: ISIN
                    order_type: MARKET
                    quantity: '10'
                    user_instrument_fit_acknowledgement: true
                    limit_price: ''
                    stop_price: ''
                    status: NEW
                    fee: '0.0'
                    executions: []
                    client_reference: ''
                    initiation_flow: API
                    fee_configuration:
                      - cash_amount: '0.90'
                        currency: EUR
                        type: TRANSACTION_FEE_SELL
                        charge_method: CHARGED_BY_CLIENT
                        value_type: ABSOLUTE
                place_unit_sell_executions:
                  summary: Unit Sell Order Response with Executions
                  value:
                    id: eb5ba93f-5dfe-4bf1-8571-4da0caacc80c
                    created_at: '2021-07-21T14:10:00.00Z'
                    updated_at: '2021-07-21T14:10:00.00Z'
                    user_id: 2dedfeb0-58cd-44f2-ae08-0e41fe0413d9
                    account_id: debf2026-f2da-4ff0-bb84-92e45babb1e3
                    cash_amount: '0'
                    currency: EUR
                    side: SELL
                    instrument_id: US0378331005
                    instrument_id_type: ISIN
                    order_type: MARKET
                    quantity: '10'
                    user_instrument_fit_acknowledgement: true
                    limit_price: ''
                    stop_price: ''
                    status: FILLED
                    fee: '0.0'
                    executions:
                      - id: b9dc0676-8a7d-412d-802a-3b325eefd15e
                        side: SELL
                        currency: EUR
                        status: FILLED
                        order_id: eb5ba93f-5dfe-4bf1-8571-4da0caacc80c
                        cash_amount: '852.20'
                        share_quantity: '10'
                        price: '85.22'
                        transaction_time: '2021-07-21T14:10:00.020Z'
                        taxes:
                          - type: TOTAL
                            amount: '23.45'
                        venue_id: 20d6024b-2df4-41ae-8d42-62e4744e455b
                    client_reference: ''
                    initiation_flow: API
        '400':
          description: Bad Request. The incoming request had a malformed parameter/object.
          headers:
            upvest-request-id:
              required: true
              schema:
                type: string
                format: uuid
                example: 169ae4c7-ebd7-4041-94da-25369653eba7
          content:
            application/problem+json:
              schema:
                title: Error
                type: object
                description: ''
                properties:
                  type:
                    type: string
                    description: URL to a document describing the error condition.
                  status:
                    type: integer
                    description: >-
                      Transmission of the HTTP status code so that all
                      information can be found in one place, but also to correct
                      changes in the status code due to the use of proxy
                      servers.
                  title:
                    type: string
                    description: >-
                      A short, human-readable title for the general error type;
                      the title should not change for given types.
                  detail:
                    type: string
                    description: A human-readable description of the specific error.
                  instance:
                    type: string
                    description: >-
                      This optional key may be present, with a unique URI for
                      the specific error; this will often point to an error log
                      for that specific response.
                  request_id:
                    type: string
                    description: Correlation ID for the original request.
                required:
                  - type
                  - status
                additionalProperties: false
              example:
                status: 400
                type: bad_request
        '401':
          description: Unauthorized. The caller has not been authenticated.
          headers:
            upvest-request-id:
              required: true
              schema:
                type: string
                format: uuid
                example: 169ae4c7-ebd7-4041-94da-25369653eba7
          content:
            application/problem+json:
              schema:
                title: Error
                type: object
                description: ''
                properties:
                  type:
                    type: string
                    description: URL to a document describing the error condition.
                  status:
                    type: integer
                    description: >-
                      Transmission of the HTTP status code so that all
                      information can be found in one place, but also to correct
                      changes in the status code due to the use of proxy
                      servers.
                  title:
                    type: string
                    description: >-
                      A short, human-readable title for the general error type;
                      the title should not change for given types.
                  detail:
                    type: string
                    description: A human-readable description of the specific error.
                  instance:
                    type: string
                    description: >-
                      This optional key may be present, with a unique URI for
                      the specific error; this will often point to an error log
                      for that specific response.
                  request_id:
                    type: string
                    description: Correlation ID for the original request.
                required:
                  - type
                  - status
                additionalProperties: false
              example:
                status: 401
                type: unauthorized
        '403':
          description: >-
            Forbidden. The caller has been authenticated but is not allowed to
            take the requested action.
          headers:
            upvest-request-id:
              required: true
              schema:
                type: string
                format: uuid
                example: 169ae4c7-ebd7-4041-94da-25369653eba7
          content:
            application/problem+json:
              schema:
                title: Error
                type: object
                description: ''
                properties:
                  type:
                    type: string
                    description: URL to a document describing the error condition.
                  status:
                    type: integer
                    description: >-
                      Transmission of the HTTP status code so that all
                      information can be found in one place, but also to correct
                      changes in the status code due to the use of proxy
                      servers.
                  title:
                    type: string
                    description: >-
                      A short, human-readable title for the general error type;
                      the title should not change for given types.
                  detail:
                    type: string
                    description: A human-readable description of the specific error.
                  instance:
                    type: string
                    description: >-
                      This optional key may be present, with a unique URI for
                      the specific error; this will often point to an error log
                      for that specific response.
                  request_id:
                    type: string
                    description: Correlation ID for the original request.
                required:
                  - type
                  - status
                additionalProperties: false
              example:
                status: 403
                type: forbidden
        '406':
          description: >-
            Not Acceptable. The resource does not have a current representation
            that would be acceptable to the user agent. "Accept" header defined
            unsupported value.
          headers:
            upvest-request-id:
              required: true
              schema:
                type: string
                format: uuid
                example: 169ae4c7-ebd7-4041-94da-25369653eba7
          content:
            application/problem+json:
              schema:
                title: Error
                type: object
                description: ''
                properties:
                  type:
                    type: string
                    description: URL to a document describing the error condition.
                  status:
                    type: integer
                    description: >-
                      Transmission of the HTTP status code so that all
                      information can be found in one place, but also to correct
                      changes in the status code due to the use of proxy
                      servers.
                  title:
                    type: string
                    description: >-
                      A short, human-readable title for the general error type;
                      the title should not change for given types.
                  detail:
                    type: string
                    description: A human-readable description of the specific error.
                  instance:
                    type: string
                    description: >-
                      This optional key may be present, with a unique URI for
                      the specific error; this will often point to an error log
                      for that specific response.
                  request_id:
                    type: string
                    description: Correlation ID for the original request.
                required:
                  - type
                  - status
                additionalProperties: false
              example:
                status: 406
                type: not_acceptable
        '422':
          description: >-
            Unprocessable Entity. The syntax of request is correct but server
            can't process it due a semantic error.
          headers:
            upvest-request-id:
              required: true
              schema:
                type: string
                format: uuid
                example: 169ae4c7-ebd7-4041-94da-25369653eba7
          content:
            application/problem+json:
              schema:
                title: Error
                type: object
                description: ''
                properties:
                  type:
                    type: string
                    description: URL to a document describing the error condition.
                  status:
                    type: integer
                    description: >-
                      Transmission of the HTTP status code so that all
                      information can be found in one place, but also to correct
                      changes in the status code due to the use of proxy
                      servers.
                  title:
                    type: string
                    description: >-
                      A short, human-readable title for the general error type;
                      the title should not change for given types.
                  detail:
                    type: string
                    description: A human-readable description of the specific error.
                  instance:
                    type: string
                    description: >-
                      This optional key may be present, with a unique URI for
                      the specific error; this will often point to an error log
                      for that specific response.
                  request_id:
                    type: string
                    description: Correlation ID for the original request.
                required:
                  - type
                  - status
                additionalProperties: false
              example:
                status: 422
                type: unprocessable_entity
        '429':
          description: >-
            Too Many Requests. The caller has exceeded their quota for the time
            period and has been throttled.
          headers:
            upvest-request-id:
              required: true
              schema:
                type: string
                format: uuid
                example: 169ae4c7-ebd7-4041-94da-25369653eba7
          content:
            application/problem+json:
              schema:
                title: Error
                type: object
                description: ''
                properties:
                  type:
                    type: string
                    description: URL to a document describing the error condition.
                  status:
                    type: integer
                    description: >-
                      Transmission of the HTTP status code so that all
                      information can be found in one place, but also to correct
                      changes in the status code due to the use of proxy
                      servers.
                  title:
                    type: string
                    description: >-
                      A short, human-readable title for the general error type;
                      the title should not change for given types.
                  detail:
                    type: string
                    description: A human-readable description of the specific error.
                  instance:
                    type: string
                    description: >-
                      This optional key may be present, with a unique URI for
                      the specific error; this will often point to an error log
                      for that specific response.
                  request_id:
                    type: string
                    description: Correlation ID for the original request.
                required:
                  - type
                  - status
                additionalProperties: false
              example:
                status: 429
                type: too_many_requests
        '500':
          description: Internal Server Error. The service encountered an unexpected error.
          headers:
            upvest-request-id:
              required: true
              schema:
                type: string
                format: uuid
                example: 169ae4c7-ebd7-4041-94da-25369653eba7
          content:
            application/problem+json:
              schema:
                title: Error
                type: object
                description: ''
                properties:
                  type:
                    type: string
                    description: URL to a document describing the error condition.
                  status:
                    type: integer
                    description: >-
                      Transmission of the HTTP status code so that all
                      information can be found in one place, but also to correct
                      changes in the status code due to the use of proxy
                      servers.
                  title:
                    type: string
                    description: >-
                      A short, human-readable title for the general error type;
                      the title should not change for given types.
                  detail:
                    type: string
                    description: A human-readable description of the specific error.
                  instance:
                    type: string
                    description: >-
                      This optional key may be present, with a unique URI for
                      the specific error; this will often point to an error log
                      for that specific response.
                  request_id:
                    type: string
                    description: Correlation ID for the original request.
                required:
                  - type
                  - status
                additionalProperties: false
              example:
                status: 500
                type: internal_server_error
        '503':
          description: >-
            Service Unavailable. The service handling for this request cannot be
            reached at this time.
          headers:
            upvest-request-id:
              required: true
              schema:
                type: string
                format: uuid
                example: 169ae4c7-ebd7-4041-94da-25369653eba7
          content:
            application/problem+json:
              schema:
                title: Error
                type: object
                description: ''
                properties:
                  type:
                    type: string
                    description: URL to a document describing the error condition.
                  status:
                    type: integer
                    description: >-
                      Transmission of the HTTP status code so that all
                      information can be found in one place, but also to correct
                      changes in the status code due to the use of proxy
                      servers.
                  title:
                    type: string
                    description: >-
                      A short, human-readable title for the general error type;
                      the title should not change for given types.
                  detail:
                    type: string
                    description: A human-readable description of the specific error.
                  instance:
                    type: string
                    description: >-
                      This optional key may be present, with a unique URI for
                      the specific error; this will often point to an error log
                      for that specific response.
                  request_id:
                    type: string
                    description: Correlation ID for the original request.
                required:
                  - type
                  - status
                additionalProperties: false
              example:
                status: 503
                type: method_not_allowed
        '504':
          description: >-
            Gateway Timeout. The service gateway has reached its internal
            timeout.
          headers:
            upvest-request-id:
              required: true
              schema:
                type: string
                format: uuid
                example: 169ae4c7-ebd7-4041-94da-25369653eba7
          content:
            application/problem+json:
              schema:
                title: Error
                type: object
                description: ''
                properties:
                  type:
                    type: string
                    description: URL to a document describing the error condition.
                  status:
                    type: integer
                    description: >-
                      Transmission of the HTTP status code so that all
                      information can be found in one place, but also to correct
                      changes in the status code due to the use of proxy
                      servers.
                  title:
                    type: string
                    description: >-
                      A short, human-readable title for the general error type;
                      the title should not change for given types.
                  detail:
                    type: string
                    description: A human-readable description of the specific error.
                  instance:
                    type: string
                    description: >-
                      This optional key may be present, with a unique URI for
                      the specific error; this will often point to an error log
                      for that specific response.
                  request_id:
                    type: string
                    description: Correlation ID for the original request.
                required:
                  - type
                  - status
                additionalProperties: false
              example:
                status: 504
                type: gateway_timeout
  /orders/{order_id}:
    parameters:
      - name: order_id
        description: ''
        in: path
        required: true
        schema:
          title: Order unique identifier
          type: string
          format: uuid
      - name: upvest-client-id
        in: header
        description: Tenant Client ID
        required: true
        schema:
          type: string
          format: uuid
          example: ebabcf4d-61c3-4942-875c-e265a7c2d062
      - name: authorization
        in: header
        description: |
          Bearer (access) token from the OAuth flow with correct scopes.
          https://datatracker.ietf.org/doc/html/rfc6750
        required: true
        schema:
          type: string
          pattern: ^Bearer [a-zA-Z0-9\-\._~+/]*=*
          example: Bearer c2VjcmV0Cg==
      - name: signature
        in: header
        required: true
        schema:
          type: string
        description: >-
          https://tools.ietf.org/id/draft-ietf-httpbis-message-signatures-01.html#name-the-signature-http-header
      - name: signature-input
        in: header
        required: true
        schema:
          type: string
        description: >-
          https://tools.ietf.org/id/draft-ietf-httpbis-message-signatures-01.html#name-the-signature-input-http-he
      - name: upvest-api-version
        in: header
        required: false
        schema:
          type: string
          enum:
            - '1'
          default: '1'
          example: '1'
        description: 'Upvest API version (Note: Do not include quotation marks)'
    get:
      operationId: retrieve_order
      summary: Get an order by ID
      description: Returns the order specified by its ID.
      tags:
        - Orders
      security:
        - oauth-client-credentials:
            - orders:read
            - orders:admin
      responses:
        '200':
          description: OK
          headers:
            upvest-request-id:
              required: true
              schema:
                type: string
                format: uuid
                example: 169ae4c7-ebd7-4041-94da-25369653eba7
          content:
            application/json:
              schema:
                title: Order
                type: object
                properties:
                  id:
                    title: Order unique identifier
                    type: string
                    format: uuid
                  created_at:
                    type: string
                    format: date-time
                    description: >-
                      Date and time when the resource was created. [RFC
                      3339-5](https://datatracker.ietf.org/doc/html/rfc3339#section-5.6),
                      [ISO8601
                      UTC](https://www.iso.org/iso-8601-date-and-time-format.html)
                  updated_at:
                    type: string
                    format: date-time
                    description: >-
                      Date and time when the resource was last updated. [RFC
                      3339-5](https://datatracker.ietf.org/doc/html/rfc3339#section-5.6),
                      [ISO8601
                      UTC](https://www.iso.org/iso-8601-date-and-time-format.html)
                  user_id:
                    type: string
                    format: uuid
                    description: The ID of the user
                  account_id:
                    type: string
                    format: uuid
                    description: The ID of the account that owns the order
                  cash_amount:
                    allOf:
                      - type: string
                        pattern: ^[0-9]{1,9}(\.[0-9]{2})?$
                      - description: >-
                          Cash amount for a nominal order, not required if a
                          share quantity is specified.
                  currency:
                    allOf:
                      - type: string
                        description: >-
                          Alphabetic three-letter [ISO
                          4217](https://en.wikipedia.org/wiki/ISO_4217) currency
                          code.

                          * EUR - Euro

                          * GBP - British Pound
                        enum:
                          - EUR
                          - GBP
                      - description: The currency for the order.
                  side:
                    type: string
                    description: |-
                      Side of the order.
                      * BUY - 
                      * SELL - 
                    enum:
                      - BUY
                      - SELL
                  instrument_id:
                    title: International securities identification number
                    type: string
                    description: >-
                      International securities identification number defined by
                      [ISO
                      6166](https://en.wikipedia.org/wiki/International_Securities_Identification_Number).
                    pattern: ^[A-Z]{2}[A-Z0-9]{9}[0-9]$
                  instrument_id_type:
                    description: |-
                      The type of the ID used in the request.
                      * ISIN - 
                    enum:
                      - ISIN
                    default: ISIN
                    type: string
                  order_type:
                    type: string
                    description: |-
                      Type of the order.
                      * MARKET - 
                      * LIMIT - 
                      * STOP - 
                    enum:
                      - MARKET
                      - LIMIT
                      - STOP
                  quantity:
                    allOf:
                      - type: string
                        pattern: ^[0-9]{0,63}(\.[0-9]{1,27})?$
                      - description: >-
                          Quantity of securities for the order. Only required if
                          the cash amount is not specified.
                  user_instrument_fit_acknowledgement:
                    type: boolean
                    description: >-
                      Only applicable if the user has failed the instrument fit
                      check for the instrument type being ordered. True if the
                      user has acknowledged their willingness to trade.
                  limit_price:
                    allOf:
                      - type: string
                        pattern: ^[0-9]{0,63}(\.[0-9]{1,27})?$
                      - description: The limit price for orders of the type 'limit'.
                  stop_price:
                    allOf:
                      - type: string
                        pattern: ^[0-9]{0,63}(\.[0-9]{1,27})?$
                      - description: The stop price for orders of the type 'stop'.
                  expiry_date:
                    allOf:
                      - title: Expiry date
                        type: string
                        pattern: ^[0-9]{4}-[0-9]{2}-[0-9]{2}$
                      - description: >-
                          The order expiration date (last day the order can
                          trade) in the YYYY-MM-DD format. [RFC 3339, section
                          5.6](https://json-schema.org/draft/2020-12/json-schema-validation.html#RFC3339)
                          RFC 3339. The default value is order creation date +
                          200 years
                  status:
                    type: string
                    description: |-
                      The execution status of the order.
                      * NEW - 
                      * PROCESSING - 
                      * FILLED - 
                      * CANCELLED - 
                    enum:
                      - NEW
                      - PROCESSING
                      - FILLED
                      - CANCELLED
                  fee:
                    type: string
                    pattern: ^[0-9]{0,63}(\.[0-9]{1,27})?$
                  cancellation_reason:
                    type: string
                    description: >-
                      Reason for Order cancellation. The field is present in
                      case the Order has a status of CANCELLED.

                      * CANCELLED_BY_CLIENT - 

                      * CANCELLED_BY_UPVEST_OPERATIONS - 

                      * CANCELLED_BY_TRADING_PARTNER - 

                      * CANCELLED_BY_UPVEST_PLATFORM - 
                    enum:
                      - CANCELLED_BY_CLIENT
                      - CANCELLED_BY_UPVEST_OPERATIONS
                      - CANCELLED_BY_TRADING_PARTNER
                      - CANCELLED_BY_UPVEST_PLATFORM
                  initiation_flow:
                    type: string
                    description: >-
                      Initiation flow used during order creation, i.e. what
                      triggered the order.

                      * API - 

                      * PORTFOLIO - 

                      * CASH_DIVIDEND_REINVESTMENT - 

                      * PORTFOLIO_REBALANCING - 

                      * SELL_TO_COVER_FEES - 

                      * SELL_TO_COVER_TAXES - 

                      * ACCOUNT_LIQUIDATION - 

                      * UPVEST_OPERATIONS - 

                      * SAVINGS_PLAN - 
                    enum:
                      - API
                      - PORTFOLIO
                      - CASH_DIVIDEND_REINVESTMENT
                      - PORTFOLIO_REBALANCING
                      - SELL_TO_COVER_FEES
                      - SELL_TO_COVER_TAXES
                      - ACCOUNT_LIQUIDATION
                      - UPVEST_OPERATIONS
                      - SAVINGS_PLAN
                  execution_flow:
                    type: string
                    description: >-
                      Execution flow that the order processing goes through. If
                      no value is specified, the default value is assumed -
                      `STRAIGHT_THROUGH`.

                      * STRAIGHT_THROUGH - 

                      * BLOCK - 
                    enum:
                      - STRAIGHT_THROUGH
                      - BLOCK
                  executions:
                    type: array
                    description: Order executions associated with this order
                    items:
                      title: Order execution
                      type: object
                      properties:
                        id:
                          title: Order execution unique identifier
                          type: string
                          format: uuid
                        cash_amount:
                          type: string
                          pattern: ^[0-9]{1,9}(\.[0-9]{2})?$
                        share_quantity:
                          type: string
                          pattern: ^[0-9]{0,63}(\.[0-9]{1,27})?$
                        price:
                          type: string
                          pattern: ^[0-9]{0,63}(\.[0-9]{1,4})?$
                        transaction_time:
                          type: string
                          format: date-time
                        taxes:
                          type: array
                          items:
                            title: Tax
                            type: object
                            properties:
                              type:
                                type: string
                                description: |-
                                  Tax type
                                  * TOTAL - 
                                default: TOTAL
                                enum:
                                  - TOTAL
                              amount:
                                type: string
                                pattern: ^[0-9]{0,63}(\.[0-9]{1,27})?$
                            required:
                              - type
                              - amount
                        order_id:
                          title: Order unique identifier
                          type: string
                          format: uuid
                        status:
                          type: string
                          description: |-
                            Execution status of the Execution.
                            * FILLED - 
                            * SETTLED - 
                            * CANCELLED - 
                          enum:
                            - FILLED
                            - SETTLED
                            - CANCELLED
                        side:
                          type: string
                          description: |-
                            Side of the execution.
                            * BUY - 
                            * SELL - 
                          enum:
                            - BUY
                            - SELL
                        currency:
                          type: string
                          description: >-
                            Alphabetic three-letter [ISO
                            4217](https://en.wikipedia.org/wiki/ISO_4217)
                            currency code.

                            * EUR - Euro

                            * GBP - British Pound
                          enum:
                            - EUR
                            - GBP
                        settlement_date:
                          allOf:
                            - title: Settlement date
                              type: string
                              pattern: ^[0-9]{4}-[0-9]{2}-[0-9]{2}$
                            - description: >-
                                Order execution settlement date in the
                                YYYY-MM-DD format. [RFC 3339, section
                                5.6](https://json-schema.org/draft/2020-12/json-schema-validation.html#RFC3339)
                                RFC 3339
                        venue_id:
                          type: string
                          format: uuid
                          description: The ID of the venue
                      required:
                        - id
                        - cash_amount
                        - share_quantity
                        - price
                        - transaction_time
                        - taxes
                        - order_id
                        - status
                        - side
                        - currency
                        - venue_id
                      additionalProperties: false
                  client_reference:
                    type: string
                    description: >-
                      Immutable reference to the API flow that initiated the
                      order. For client initiated API flows, this is a client
                      provided ID. For internal initiations, it is set to the ID
                      of the related object.
                    maxLength: 100
                  fee_configuration:
                    type: array
                    description: fee configuration
                    items:
                      title: Absolute Fee
                      type: object
                      properties:
                        type:
                          title: Fee type
                          description: |-
                            Fee type
                            * TRANSACTION_FEE_BUY - 
                            * TRANSACTION_FEE_SELL - 
                          type: string
                          enum:
                            - TRANSACTION_FEE_BUY
                            - TRANSACTION_FEE_SELL
                        value_type:
                          type: string
                          default: ABSOLUTE
                          description: The value type must be “ABSOLUTE”.
                        charge_method:
                          title: Fee charge method
                          type: string
                          description: >-
                            Indicates whether the fee will be charged by client
                            or by other methods.

                            * CHARGED_BY_CLIENT - 

                            * COLLECTED_BY_UPVEST - 
                          enum:
                            - CHARGED_BY_CLIENT
                            - COLLECTED_BY_UPVEST
                        cash_amount:
                          type: string
                          pattern: ^[0-9]{1,9}(\.[0-9]{2})?$
                        currency:
                          type: string
                          description: >-
                            Alphabetic three-letter [ISO
                            4217](https://en.wikipedia.org/wiki/ISO_4217)
                            currency code.

                            * EUR - Euro

                            * GBP - British Pound
                          enum:
                            - EUR
                            - GBP
                      required:
                        - type
                        - value_type
                        - charge_method
                        - cash_amount
                        - currency
                      additionalProperties: false
                required:
                  - id
                  - created_at
                  - updated_at
                  - user_id
                  - account_id
                  - cash_amount
                  - currency
                  - side
                  - instrument_id
                  - instrument_id_type
                  - order_type
                  - quantity
                  - status
                  - fee
                  - initiation_flow
                  - executions
                  - client_reference
                additionalProperties: false
              example:
                id: eb5ba93f-5dfe-4bf1-8571-4da0caacc80c
                created_at: '2021-07-21T14:10:00.00Z'
                updated_at: '2021-07-21T14:10:00.00Z'
                user_id: 2dedfeb0-58cd-44f2-ae08-0e41fe0413d9
                account_id: debf2026-f2da-4ff0-bb84-92e45babb1e3
                cash_amount: '56.65'
                currency: EUR
                side: BUY
                instrument_id: US0378331005
                instrument_id_type: ISIN
                order_type: MARKET
                quantity: '0.05'
                user_instrument_fit_acknowledgement: true
                limit_price: ''
                stop_price: ''
                status: NEW
                fee: '0.5'
                executions: []
                client_reference: ''
                initiation_flow: API
                execution_flow: STRAIGHT_THROUGH
        '401':
          description: Unauthorized. The caller has not been authenticated.
          headers:
            upvest-request-id:
              required: true
              schema:
                type: string
                format: uuid
                example: 169ae4c7-ebd7-4041-94da-25369653eba7
          content:
            application/problem+json:
              schema:
                title: Error
                type: object
                description: ''
                properties:
                  type:
                    type: string
                    description: URL to a document describing the error condition.
                  status:
                    type: integer
                    description: >-
                      Transmission of the HTTP status code so that all
                      information can be found in one place, but also to correct
                      changes in the status code due to the use of proxy
                      servers.
                  title:
                    type: string
                    description: >-
                      A short, human-readable title for the general error type;
                      the title should not change for given types.
                  detail:
                    type: string
                    description: A human-readable description of the specific error.
                  instance:
                    type: string
                    description: >-
                      This optional key may be present, with a unique URI for
                      the specific error; this will often point to an error log
                      for that specific response.
                  request_id:
                    type: string
                    description: Correlation ID for the original request.
                required:
                  - type
                  - status
                additionalProperties: false
              example:
                status: 401
                type: unauthorized
        '403':
          description: >-
            Forbidden. The caller has been authenticated but is not allowed to
            take the requested action.
          headers:
            upvest-request-id:
              required: true
              schema:
                type: string
                format: uuid
                example: 169ae4c7-ebd7-4041-94da-25369653eba7
          content:
            application/problem+json:
              schema:
                title: Error
                type: object
                description: ''
                properties:
                  type:
                    type: string
                    description: URL to a document describing the error condition.
                  status:
                    type: integer
                    description: >-
                      Transmission of the HTTP status code so that all
                      information can be found in one place, but also to correct
                      changes in the status code due to the use of proxy
                      servers.
                  title:
                    type: string
                    description: >-
                      A short, human-readable title for the general error type;
                      the title should not change for given types.
                  detail:
                    type: string
                    description: A human-readable description of the specific error.
                  instance:
                    type: string
                    description: >-
                      This optional key may be present, with a unique URI for
                      the specific error; this will often point to an error log
                      for that specific response.
                  request_id:
                    type: string
                    description: Correlation ID for the original request.
                required:
                  - type
                  - status
                additionalProperties: false
              example:
                status: 403
                type: forbidden
        '404':
          description: Not Found. The requested resource could not be found.
          headers:
            upvest-request-id:
              required: true
              schema:
                type: string
                format: uuid
                example: 169ae4c7-ebd7-4041-94da-25369653eba7
          content:
            application/problem+json:
              schema:
                title: Error
                type: object
                description: ''
                properties:
                  type:
                    type: string
                    description: URL to a document describing the error condition.
                  status:
                    type: integer
                    description: >-
                      Transmission of the HTTP status code so that all
                      information can be found in one place, but also to correct
                      changes in the status code due to the use of proxy
                      servers.
                  title:
                    type: string
                    description: >-
                      A short, human-readable title for the general error type;
                      the title should not change for given types.
                  detail:
                    type: string
                    description: A human-readable description of the specific error.
                  instance:
                    type: string
                    description: >-
                      This optional key may be present, with a unique URI for
                      the specific error; this will often point to an error log
                      for that specific response.
                  request_id:
                    type: string
                    description: Correlation ID for the original request.
                required:
                  - type
                  - status
                additionalProperties: false
              example:
                status: 404
                type: not_found
        '406':
          description: >-
            Not Acceptable. The resource does not have a current representation
            that would be acceptable to the user agent. "Accept" header defined
            unsupported value.
          headers:
            upvest-request-id:
              required: true
              schema:
                type: string
                format: uuid
                example: 169ae4c7-ebd7-4041-94da-25369653eba7
          content:
            application/problem+json:
              schema:
                title: Error
                type: object
                description: ''
                properties:
                  type:
                    type: string
                    description: URL to a document describing the error condition.
                  status:
                    type: integer
                    description: >-
                      Transmission of the HTTP status code so that all
                      information can be found in one place, but also to correct
                      changes in the status code due to the use of proxy
                      servers.
                  title:
                    type: string
                    description: >-
                      A short, human-readable title for the general error type;
                      the title should not change for given types.
                  detail:
                    type: string
                    description: A human-readable description of the specific error.
                  instance:
                    type: string
                    description: >-
                      This optional key may be present, with a unique URI for
                      the specific error; this will often point to an error log
                      for that specific response.
                  request_id:
                    type: string
                    description: Correlation ID for the original request.
                required:
                  - type
                  - status
                additionalProperties: false
              example:
                status: 406
                type: not_acceptable
        '429':
          description: >-
            Too Many Requests. The caller has exceeded their quota for the time
            period and has been throttled.
          headers:
            upvest-request-id:
              required: true
              schema:
                type: string
                format: uuid
                example: 169ae4c7-ebd7-4041-94da-25369653eba7
          content:
            application/problem+json:
              schema:
                title: Error
                type: object
                description: ''
                properties:
                  type:
                    type: string
                    description: URL to a document describing the error condition.
                  status:
                    type: integer
                    description: >-
                      Transmission of the HTTP status code so that all
                      information can be found in one place, but also to correct
                      changes in the status code due to the use of proxy
                      servers.
                  title:
                    type: string
                    description: >-
                      A short, human-readable title for the general error type;
                      the title should not change for given types.
                  detail:
                    type: string
                    description: A human-readable description of the specific error.
                  instance:
                    type: string
                    description: >-
                      This optional key may be present, with a unique URI for
                      the specific error; this will often point to an error log
                      for that specific response.
                  request_id:
                    type: string
                    description: Correlation ID for the original request.
                required:
                  - type
                  - status
                additionalProperties: false
              example:
                status: 429
                type: too_many_requests
        '500':
          description: Internal Server Error. The service encountered an unexpected error.
          headers:
            upvest-request-id:
              required: true
              schema:
                type: string
                format: uuid
                example: 169ae4c7-ebd7-4041-94da-25369653eba7
          content:
            application/problem+json:
              schema:
                title: Error
                type: object
                description: ''
                properties:
                  type:
                    type: string
                    description: URL to a document describing the error condition.
                  status:
                    type: integer
                    description: >-
                      Transmission of the HTTP status code so that all
                      information can be found in one place, but also to correct
                      changes in the status code due to the use of proxy
                      servers.
                  title:
                    type: string
                    description: >-
                      A short, human-readable title for the general error type;
                      the title should not change for given types.
                  detail:
                    type: string
                    description: A human-readable description of the specific error.
                  instance:
                    type: string
                    description: >-
                      This optional key may be present, with a unique URI for
                      the specific error; this will often point to an error log
                      for that specific response.
                  request_id:
                    type: string
                    description: Correlation ID for the original request.
                required:
                  - type
                  - status
                additionalProperties: false
              example:
                status: 500
                type: internal_server_error
        '503':
          description: >-
            Service Unavailable. The service handling for this request cannot be
            reached at this time.
          headers:
            upvest-request-id:
              required: true
              schema:
                type: string
                format: uuid
                example: 169ae4c7-ebd7-4041-94da-25369653eba7
          content:
            application/problem+json:
              schema:
                title: Error
                type: object
                description: ''
                properties:
                  type:
                    type: string
                    description: URL to a document describing the error condition.
                  status:
                    type: integer
                    description: >-
                      Transmission of the HTTP status code so that all
                      information can be found in one place, but also to correct
                      changes in the status code due to the use of proxy
                      servers.
                  title:
                    type: string
                    description: >-
                      A short, human-readable title for the general error type;
                      the title should not change for given types.
                  detail:
                    type: string
                    description: A human-readable description of the specific error.
                  instance:
                    type: string
                    description: >-
                      This optional key may be present, with a unique URI for
                      the specific error; this will often point to an error log
                      for that specific response.
                  request_id:
                    type: string
                    description: Correlation ID for the original request.
                required:
                  - type
                  - status
                additionalProperties: false
              example:
                status: 503
                type: method_not_allowed
        '504':
          description: >-
            Gateway Timeout. The service gateway has reached its internal
            timeout.
          headers:
            upvest-request-id:
              required: true
              schema:
                type: string
                format: uuid
                example: 169ae4c7-ebd7-4041-94da-25369653eba7
          content:
            application/problem+json:
              schema:
                title: Error
                type: object
                description: ''
                properties:
                  type:
                    type: string
                    description: URL to a document describing the error condition.
                  status:
                    type: integer
                    description: >-
                      Transmission of the HTTP status code so that all
                      information can be found in one place, but also to correct
                      changes in the status code due to the use of proxy
                      servers.
                  title:
                    type: string
                    description: >-
                      A short, human-readable title for the general error type;
                      the title should not change for given types.
                  detail:
                    type: string
                    description: A human-readable description of the specific error.
                  instance:
                    type: string
                    description: >-
                      This optional key may be present, with a unique URI for
                      the specific error; this will often point to an error log
                      for that specific response.
                  request_id:
                    type: string
                    description: Correlation ID for the original request.
                required:
                  - type
                  - status
                additionalProperties: false
              example:
                status: 504
                type: gateway_timeout
    delete:
      operationId: cancel_order
      summary: Cancel an order by ID
      description: >-
        Cancels an order specified by its ID. It is possible to cancel an order
        in the `NEW` or `PROCESSING` status. Once a cancellation has been
        accepted, the further processing steps take place asynchronously and
        depending on the respective order status.
      tags:
        - Orders
      security:
        - oauth-client-credentials:
            - orders:admin
      responses:
        '202':
          description: The order cancelling request is accepted.
          headers:
            upvest-request-id:
              required: true
              schema:
                type: string
                format: uuid
                example: 169ae4c7-ebd7-4041-94da-25369653eba7
          content:
            application/json:
              schema:
                title: Order - Cancel - Response
                type: object
                description: ''
                properties:
                  id:
                    title: Order unique identifier
                    type: string
                    format: uuid
                required:
                  - id
                additionalProperties: false
              example:
                id: eb5ba93f-5dfe-4bf1-8571-4da0caacc80c
        '401':
          description: Unauthorized. The caller has not been authenticated.
          headers:
            upvest-request-id:
              required: true
              schema:
                type: string
                format: uuid
                example: 169ae4c7-ebd7-4041-94da-25369653eba7
          content:
            application/problem+json:
              schema:
                title: Error
                type: object
                description: ''
                properties:
                  type:
                    type: string
                    description: URL to a document describing the error condition.
                  status:
                    type: integer
                    description: >-
                      Transmission of the HTTP status code so that all
                      information can be found in one place, but also to correct
                      changes in the status code due to the use of proxy
                      servers.
                  title:
                    type: string
                    description: >-
                      A short, human-readable title for the general error type;
                      the title should not change for given types.
                  detail:
                    type: string
                    description: A human-readable description of the specific error.
                  instance:
                    type: string
                    description: >-
                      This optional key may be present, with a unique URI for
                      the specific error; this will often point to an error log
                      for that specific response.
                  request_id:
                    type: string
                    description: Correlation ID for the original request.
                required:
                  - type
                  - status
                additionalProperties: false
              example:
                status: 401
                type: unauthorized
        '403':
          description: >-
            Forbidden. The caller has been authenticated but is not allowed to
            take the requested action.
          headers:
            upvest-request-id:
              required: true
              schema:
                type: string
                format: uuid
                example: 169ae4c7-ebd7-4041-94da-25369653eba7
          content:
            application/problem+json:
              schema:
                title: Error
                type: object
                description: ''
                properties:
                  type:
                    type: string
                    description: URL to a document describing the error condition.
                  status:
                    type: integer
                    description: >-
                      Transmission of the HTTP status code so that all
                      information can be found in one place, but also to correct
                      changes in the status code due to the use of proxy
                      servers.
                  title:
                    type: string
                    description: >-
                      A short, human-readable title for the general error type;
                      the title should not change for given types.
                  detail:
                    type: string
                    description: A human-readable description of the specific error.
                  instance:
                    type: string
                    description: >-
                      This optional key may be present, with a unique URI for
                      the specific error; this will often point to an error log
                      for that specific response.
                  request_id:
                    type: string
                    description: Correlation ID for the original request.
                required:
                  - type
                  - status
                additionalProperties: false
              example:
                status: 403
                type: forbidden
        '404':
          description: Not Found. The requested resource could not be found.
          headers:
            upvest-request-id:
              required: true
              schema:
                type: string
                format: uuid
                example: 169ae4c7-ebd7-4041-94da-25369653eba7
          content:
            application/problem+json:
              schema:
                title: Error
                type: object
                description: ''
                properties:
                  type:
                    type: string
                    description: URL to a document describing the error condition.
                  status:
                    type: integer
                    description: >-
                      Transmission of the HTTP status code so that all
                      information can be found in one place, but also to correct
                      changes in the status code due to the use of proxy
                      servers.
                  title:
                    type: string
                    description: >-
                      A short, human-readable title for the general error type;
                      the title should not change for given types.
                  detail:
                    type: string
                    description: A human-readable description of the specific error.
                  instance:
                    type: string
                    description: >-
                      This optional key may be present, with a unique URI for
                      the specific error; this will often point to an error log
                      for that specific response.
                  request_id:
                    type: string
                    description: Correlation ID for the original request.
                required:
                  - type
                  - status
                additionalProperties: false
              example:
                status: 404
                type: not_found
        '406':
          description: >-
            Not Acceptable. The resource does not have a current representation
            that would be acceptable to the user agent. "Accept" header defined
            unsupported value.
          headers:
            upvest-request-id:
              required: true
              schema:
                type: string
                format: uuid
                example: 169ae4c7-ebd7-4041-94da-25369653eba7
          content:
            application/problem+json:
              schema:
                title: Error
                type: object
                description: ''
                properties:
                  type:
                    type: string
                    description: URL to a document describing the error condition.
                  status:
                    type: integer
                    description: >-
                      Transmission of the HTTP status code so that all
                      information can be found in one place, but also to correct
                      changes in the status code due to the use of proxy
                      servers.
                  title:
                    type: string
                    description: >-
                      A short, human-readable title for the general error type;
                      the title should not change for given types.
                  detail:
                    type: string
                    description: A human-readable description of the specific error.
                  instance:
                    type: string
                    description: >-
                      This optional key may be present, with a unique URI for
                      the specific error; this will often point to an error log
                      for that specific response.
                  request_id:
                    type: string
                    description: Correlation ID for the original request.
                required:
                  - type
                  - status
                additionalProperties: false
              example:
                status: 406
                type: not_acceptable
        '429':
          description: >-
            Too Many Requests. The caller has exceeded their quota for the time
            period and has been throttled.
          headers:
            upvest-request-id:
              required: true
              schema:
                type: string
                format: uuid
                example: 169ae4c7-ebd7-4041-94da-25369653eba7
          content:
            application/problem+json:
              schema:
                title: Error
                type: object
                description: ''
                properties:
                  type:
                    type: string
                    description: URL to a document describing the error condition.
                  status:
                    type: integer
                    description: >-
                      Transmission of the HTTP status code so that all
                      information can be found in one place, but also to correct
                      changes in the status code due to the use of proxy
                      servers.
                  title:
                    type: string
                    description: >-
                      A short, human-readable title for the general error type;
                      the title should not change for given types.
                  detail:
                    type: string
                    description: A human-readable description of the specific error.
                  instance:
                    type: string
                    description: >-
                      This optional key may be present, with a unique URI for
                      the specific error; this will often point to an error log
                      for that specific response.
                  request_id:
                    type: string
                    description: Correlation ID for the original request.
                required:
                  - type
                  - status
                additionalProperties: false
              example:
                status: 429
                type: too_many_requests
        '500':
          description: Internal Server Error. The service encountered an unexpected error.
          headers:
            upvest-request-id:
              required: true
              schema:
                type: string
                format: uuid
                example: 169ae4c7-ebd7-4041-94da-25369653eba7
          content:
            application/problem+json:
              schema:
                title: Error
                type: object
                description: ''
                properties:
                  type:
                    type: string
                    description: URL to a document describing the error condition.
                  status:
                    type: integer
                    description: >-
                      Transmission of the HTTP status code so that all
                      information can be found in one place, but also to correct
                      changes in the status code due to the use of proxy
                      servers.
                  title:
                    type: string
                    description: >-
                      A short, human-readable title for the general error type;
                      the title should not change for given types.
                  detail:
                    type: string
                    description: A human-readable description of the specific error.
                  instance:
                    type: string
                    description: >-
                      This optional key may be present, with a unique URI for
                      the specific error; this will often point to an error log
                      for that specific response.
                  request_id:
                    type: string
                    description: Correlation ID for the original request.
                required:
                  - type
                  - status
                additionalProperties: false
              example:
                status: 500
                type: internal_server_error
        '503':
          description: >-
            Service Unavailable. The service handling for this request cannot be
            reached at this time.
          headers:
            upvest-request-id:
              required: true
              schema:
                type: string
                format: uuid
                example: 169ae4c7-ebd7-4041-94da-25369653eba7
          content:
            application/problem+json:
              schema:
                title: Error
                type: object
                description: ''
                properties:
                  type:
                    type: string
                    description: URL to a document describing the error condition.
                  status:
                    type: integer
                    description: >-
                      Transmission of the HTTP status code so that all
                      information can be found in one place, but also to correct
                      changes in the status code due to the use of proxy
                      servers.
                  title:
                    type: string
                    description: >-
                      A short, human-readable title for the general error type;
                      the title should not change for given types.
                  detail:
                    type: string
                    description: A human-readable description of the specific error.
                  instance:
                    type: string
                    description: >-
                      This optional key may be present, with a unique URI for
                      the specific error; this will often point to an error log
                      for that specific response.
                  request_id:
                    type: string
                    description: Correlation ID for the original request.
                required:
                  - type
                  - status
                additionalProperties: false
              example:
                status: 503
                type: method_not_allowed
        '504':
          description: >-
            Gateway Timeout. The service gateway has reached its internal
            timeout.
          headers:
            upvest-request-id:
              required: true
              schema:
                type: string
                format: uuid
                example: 169ae4c7-ebd7-4041-94da-25369653eba7
          content:
            application/problem+json:
              schema:
                title: Error
                type: object
                description: ''
                properties:
                  type:
                    type: string
                    description: URL to a document describing the error condition.
                  status:
                    type: integer
                    description: >-
                      Transmission of the HTTP status code so that all
                      information can be found in one place, but also to correct
                      changes in the status code due to the use of proxy
                      servers.
                  title:
                    type: string
                    description: >-
                      A short, human-readable title for the general error type;
                      the title should not change for given types.
                  detail:
                    type: string
                    description: A human-readable description of the specific error.
                  instance:
                    type: string
                    description: >-
                      This optional key may be present, with a unique URI for
                      the specific error; this will often point to an error log
                      for that specific response.
                  request_id:
                    type: string
                    description: Correlation ID for the original request.
                required:
                  - type
                  - status
                additionalProperties: false
              example:
                status: 504
                type: gateway_timeout
  /orders/{order_id}/executions/{execution_id}:
    parameters:
      - name: execution_id
        description: ''
        in: path
        required: true
        schema:
          title: Order execution unique identifier
          type: string
          format: uuid
      - name: order_id
        description: ''
        in: path
        required: true
        schema:
          title: Order unique identifier
          type: string
          format: uuid
      - name: upvest-client-id
        in: header
        description: Tenant Client ID
        required: true
        schema:
          type: string
          format: uuid
          example: ebabcf4d-61c3-4942-875c-e265a7c2d062
      - name: authorization
        in: header
        description: |
          Bearer (access) token from the OAuth flow with correct scopes.
          https://datatracker.ietf.org/doc/html/rfc6750
        required: true
        schema:
          type: string
          pattern: ^Bearer [a-zA-Z0-9\-\._~+/]*=*
          example: Bearer c2VjcmV0Cg==
      - name: signature
        in: header
        required: true
        schema:
          type: string
        description: >-
          https://tools.ietf.org/id/draft-ietf-httpbis-message-signatures-01.html#name-the-signature-http-header
      - name: signature-input
        in: header
        required: true
        schema:
          type: string
        description: >-
          https://tools.ietf.org/id/draft-ietf-httpbis-message-signatures-01.html#name-the-signature-input-http-he
      - name: upvest-api-version
        in: header
        required: false
        schema:
          type: string
          enum:
            - '1'
          default: '1'
          example: '1'
        description: 'Upvest API version (Note: Do not include quotation marks)'
    get:
      operationId: retrieve_order_execution
      summary: Get an order execution by ID
      description: Returns the order execution specified by its ID.
      tags:
        - Orders
      security:
        - oauth-client-credentials:
            - orders:read
            - orders:admin
      responses:
        '200':
          description: OK
          headers:
            upvest-request-id:
              required: true
              schema:
                type: string
                format: uuid
                example: 169ae4c7-ebd7-4041-94da-25369653eba7
          content:
            application/json:
              schema:
                title: Order execution
                type: object
                properties:
                  id:
                    title: Order execution unique identifier
                    type: string
                    format: uuid
                  cash_amount:
                    type: string
                    pattern: ^[0-9]{1,9}(\.[0-9]{2})?$
                  share_quantity:
                    type: string
                    pattern: ^[0-9]{0,63}(\.[0-9]{1,27})?$
                  price:
                    type: string
                    pattern: ^[0-9]{0,63}(\.[0-9]{1,4})?$
                  transaction_time:
                    type: string
                    format: date-time
                  taxes:
                    type: array
                    items:
                      title: Tax
                      type: object
                      properties:
                        type:
                          type: string
                          description: |-
                            Tax type
                            * TOTAL - 
                          default: TOTAL
                          enum:
                            - TOTAL
                        amount:
                          type: string
                          pattern: ^[0-9]{0,63}(\.[0-9]{1,27})?$
                      required:
                        - type
                        - amount
                  order_id:
                    title: Order unique identifier
                    type: string
                    format: uuid
                  status:
                    type: string
                    description: |-
                      Execution status of the Execution.
                      * FILLED - 
                      * SETTLED - 
                      * CANCELLED - 
                    enum:
                      - FILLED
                      - SETTLED
                      - CANCELLED
                  side:
                    type: string
                    description: |-
                      Side of the execution.
                      * BUY - 
                      * SELL - 
                    enum:
                      - BUY
                      - SELL
                  currency:
                    type: string
                    description: >-
                      Alphabetic three-letter [ISO
                      4217](https://en.wikipedia.org/wiki/ISO_4217) currency
                      code.

                      * EUR - Euro

                      * GBP - British Pound
                    enum:
                      - EUR
                      - GBP
                  settlement_date:
                    allOf:
                      - title: Settlement date
                        type: string
                        pattern: ^[0-9]{4}-[0-9]{2}-[0-9]{2}$
                      - description: >-
                          Order execution settlement date in the YYYY-MM-DD
                          format. [RFC 3339, section
                          5.6](https://json-schema.org/draft/2020-12/json-schema-validation.html#RFC3339)
                          RFC 3339
                  venue_id:
                    type: string
                    format: uuid
                    description: The ID of the venue
                required:
                  - id
                  - cash_amount
                  - share_quantity
                  - price
                  - transaction_time
                  - taxes
                  - order_id
                  - status
                  - side
                  - currency
                  - venue_id
                additionalProperties: false
              example:
                id: b9dc0676-8a7d-412d-802a-3b325eefd15e
                side: BUY
                currency: EUR
                status: SETTLED
                order_id: eb5ba93f-5dfe-4bf1-8571-4da0caacc80c
                cash_amount: '56.65'
                share_quantity: '0.05'
                price: '130.65'
                transaction_time: '2021-07-21T14:10:00.00Z'
                taxes:
                  - amount: '1.3'
                    type: TOTAL
                settlement_date: '2021-07-23'
                venue_id: 20d6024b-2df4-41ae-8d42-62e4744e455b
        '401':
          description: Unauthorized. The caller has not been authenticated.
          headers:
            upvest-request-id:
              required: true
              schema:
                type: string
                format: uuid
                example: 169ae4c7-ebd7-4041-94da-25369653eba7
          content:
            application/problem+json:
              schema:
                title: Error
                type: object
                description: ''
                properties:
                  type:
                    type: string
                    description: URL to a document describing the error condition.
                  status:
                    type: integer
                    description: >-
                      Transmission of the HTTP status code so that all
                      information can be found in one place, but also to correct
                      changes in the status code due to the use of proxy
                      servers.
                  title:
                    type: string
                    description: >-
                      A short, human-readable title for the general error type;
                      the title should not change for given types.
                  detail:
                    type: string
                    description: A human-readable description of the specific error.
                  instance:
                    type: string
                    description: >-
                      This optional key may be present, with a unique URI for
                      the specific error; this will often point to an error log
                      for that specific response.
                  request_id:
                    type: string
                    description: Correlation ID for the original request.
                required:
                  - type
                  - status
                additionalProperties: false
              example:
                status: 401
                type: unauthorized
        '403':
          description: >-
            Forbidden. The caller has been authenticated but is not allowed to
            take the requested action.
          headers:
            upvest-request-id:
              required: true
              schema:
                type: string
                format: uuid
                example: 169ae4c7-ebd7-4041-94da-25369653eba7
          content:
            application/problem+json:
              schema:
                title: Error
                type: object
                description: ''
                properties:
                  type:
                    type: string
                    description: URL to a document describing the error condition.
                  status:
                    type: integer
                    description: >-
                      Transmission of the HTTP status code so that all
                      information can be found in one place, but also to correct
                      changes in the status code due to the use of proxy
                      servers.
                  title:
                    type: string
                    description: >-
                      A short, human-readable title for the general error type;
                      the title should not change for given types.
                  detail:
                    type: string
                    description: A human-readable description of the specific error.
                  instance:
                    type: string
                    description: >-
                      This optional key may be present, with a unique URI for
                      the specific error; this will often point to an error log
                      for that specific response.
                  request_id:
                    type: string
                    description: Correlation ID for the original request.
                required:
                  - type
                  - status
                additionalProperties: false
              example:
                status: 403
                type: forbidden
        '404':
          description: Not Found. The requested resource could not be found.
          headers:
            upvest-request-id:
              required: true
              schema:
                type: string
                format: uuid
                example: 169ae4c7-ebd7-4041-94da-25369653eba7
          content:
            application/problem+json:
              schema:
                title: Error
                type: object
                description: ''
                properties:
                  type:
                    type: string
                    description: URL to a document describing the error condition.
                  status:
                    type: integer
                    description: >-
                      Transmission of the HTTP status code so that all
                      information can be found in one place, but also to correct
                      changes in the status code due to the use of proxy
                      servers.
                  title:
                    type: string
                    description: >-
                      A short, human-readable title for the general error type;
                      the title should not change for given types.
                  detail:
                    type: string
                    description: A human-readable description of the specific error.
                  instance:
                    type: string
                    description: >-
                      This optional key may be present, with a unique URI for
                      the specific error; this will often point to an error log
                      for that specific response.
                  request_id:
                    type: string
                    description: Correlation ID for the original request.
                required:
                  - type
                  - status
                additionalProperties: false
              example:
                status: 404
                type: not_found
        '406':
          description: >-
            Not Acceptable. The resource does not have a current representation
            that would be acceptable to the user agent. "Accept" header defined
            unsupported value.
          headers:
            upvest-request-id:
              required: true
              schema:
                type: string
                format: uuid
                example: 169ae4c7-ebd7-4041-94da-25369653eba7
          content:
            application/problem+json:
              schema:
                title: Error
                type: object
                description: ''
                properties:
                  type:
                    type: string
                    description: URL to a document describing the error condition.
                  status:
                    type: integer
                    description: >-
                      Transmission of the HTTP status code so that all
                      information can be found in one place, but also to correct
                      changes in the status code due to the use of proxy
                      servers.
                  title:
                    type: string
                    description: >-
                      A short, human-readable title for the general error type;
                      the title should not change for given types.
                  detail:
                    type: string
                    description: A human-readable description of the specific error.
                  instance:
                    type: string
                    description: >-
                      This optional key may be present, with a unique URI for
                      the specific error; this will often point to an error log
                      for that specific response.
                  request_id:
                    type: string
                    description: Correlation ID for the original request.
                required:
                  - type
                  - status
                additionalProperties: false
              example:
                status: 406
                type: not_acceptable
        '429':
          description: >-
            Too Many Requests. The caller has exceeded their quota for the time
            period and has been throttled.
          headers:
            upvest-request-id:
              required: true
              schema:
                type: string
                format: uuid
                example: 169ae4c7-ebd7-4041-94da-25369653eba7
          content:
            application/problem+json:
              schema:
                title: Error
                type: object
                description: ''
                properties:
                  type:
                    type: string
                    description: URL to a document describing the error condition.
                  status:
                    type: integer
                    description: >-
                      Transmission of the HTTP status code so that all
                      information can be found in one place, but also to correct
                      changes in the status code due to the use of proxy
                      servers.
                  title:
                    type: string
                    description: >-
                      A short, human-readable title for the general error type;
                      the title should not change for given types.
                  detail:
                    type: string
                    description: A human-readable description of the specific error.
                  instance:
                    type: string
                    description: >-
                      This optional key may be present, with a unique URI for
                      the specific error; this will often point to an error log
                      for that specific response.
                  request_id:
                    type: string
                    description: Correlation ID for the original request.
                required:
                  - type
                  - status
                additionalProperties: false
              example:
                status: 429
                type: too_many_requests
        '500':
          description: Internal Server Error. The service encountered an unexpected error.
          headers:
            upvest-request-id:
              required: true
              schema:
                type: string
                format: uuid
                example: 169ae4c7-ebd7-4041-94da-25369653eba7
          content:
            application/problem+json:
              schema:
                title: Error
                type: object
                description: ''
                properties:
                  type:
                    type: string
                    description: URL to a document describing the error condition.
                  status:
                    type: integer
                    description: >-
                      Transmission of the HTTP status code so that all
                      information can be found in one place, but also to correct
                      changes in the status code due to the use of proxy
                      servers.
                  title:
                    type: string
                    description: >-
                      A short, human-readable title for the general error type;
                      the title should not change for given types.
                  detail:
                    type: string
                    description: A human-readable description of the specific error.
                  instance:
                    type: string
                    description: >-
                      This optional key may be present, with a unique URI for
                      the specific error; this will often point to an error log
                      for that specific response.
                  request_id:
                    type: string
                    description: Correlation ID for the original request.
                required:
                  - type
                  - status
                additionalProperties: false
              example:
                status: 500
                type: internal_server_error
        '503':
          description: >-
            Service Unavailable. The service handling for this request cannot be
            reached at this time.
          headers:
            upvest-request-id:
              required: true
              schema:
                type: string
                format: uuid
                example: 169ae4c7-ebd7-4041-94da-25369653eba7
          content:
            application/problem+json:
              schema:
                title: Error
                type: object
                description: ''
                properties:
                  type:
                    type: string
                    description: URL to a document describing the error condition.
                  status:
                    type: integer
                    description: >-
                      Transmission of the HTTP status code so that all
                      information can be found in one place, but also to correct
                      changes in the status code due to the use of proxy
                      servers.
                  title:
                    type: string
                    description: >-
                      A short, human-readable title for the general error type;
                      the title should not change for given types.
                  detail:
                    type: string
                    description: A human-readable description of the specific error.
                  instance:
                    type: string
                    description: >-
                      This optional key may be present, with a unique URI for
                      the specific error; this will often point to an error log
                      for that specific response.
                  request_id:
                    type: string
                    description: Correlation ID for the original request.
                required:
                  - type
                  - status
                additionalProperties: false
              example:
                status: 503
                type: method_not_allowed
        '504':
          description: >-
            Gateway Timeout. The service gateway has reached its internal
            timeout.
          headers:
            upvest-request-id:
              required: true
              schema:
                type: string
                format: uuid
                example: 169ae4c7-ebd7-4041-94da-25369653eba7
          content:
            application/problem+json:
              schema:
                title: Error
                type: object
                description: ''
                properties:
                  type:
                    type: string
                    description: URL to a document describing the error condition.
                  status:
                    type: integer
                    description: >-
                      Transmission of the HTTP status code so that all
                      information can be found in one place, but also to correct
                      changes in the status code due to the use of proxy
                      servers.
                  title:
                    type: string
                    description: >-
                      A short, human-readable title for the general error type;
                      the title should not change for given types.
                  detail:
                    type: string
                    description: A human-readable description of the specific error.
                  instance:
                    type: string
                    description: >-
                      This optional key may be present, with a unique URI for
                      the specific error; this will often point to an error log
                      for that specific response.
                  request_id:
                    type: string
                    description: Correlation ID for the original request.
                required:
                  - type
                  - status
                additionalProperties: false
              example:
                status: 504
                type: gateway_timeout
  /users/{user_id}/reports:
    parameters:
      - name: user_id
        in: path
        required: true
        schema:
          title: User unique identifier.
          type: string
          description: User unique identifier.
          format: uuid
      - name: upvest-client-id
        in: header
        description: Tenant Client ID
        required: true
        schema:
          type: string
          format: uuid
          example: ebabcf4d-61c3-4942-875c-e265a7c2d062
      - name: authorization
        in: header
        description: |
          Bearer (access) token from the OAuth flow with correct scopes.
          https://datatracker.ietf.org/doc/html/rfc6750
        required: true
        schema:
          type: string
          pattern: ^Bearer [a-zA-Z0-9\-\._~+/]*=*
          example: Bearer c2VjcmV0Cg==
      - name: signature
        in: header
        required: true
        schema:
          type: string
        description: >-
          https://tools.ietf.org/id/draft-ietf-httpbis-message-signatures-01.html#name-the-signature-http-header
      - name: signature-input
        in: header
        required: true
        schema:
          type: string
        description: >-
          https://tools.ietf.org/id/draft-ietf-httpbis-message-signatures-01.html#name-the-signature-input-http-he
      - name: upvest-api-version
        in: header
        required: false
        schema:
          type: string
          enum:
            - '1'
          default: '1'
          example: '1'
        description: 'Upvest API version (Note: Do not include quotation marks)'
    get:
      operationId: list_reports
      summary: List user reports
      description: List user reports
      tags:
        - Reports
      security:
        - oauth-client-credentials:
            - reports:read
            - reports:admin
      parameters:
        - name: type
          in: query
          required: false
          schema:
            title: Report type
            oneOf:
              - title: Report type
                description: >-
                  Report type

                  * ACCOUNT_CLOSING - Securities account closure

                  * ACCOUNT_OPENING - Securities account opening

                  * AD_HOC_ACCOUNT_STATEMENT - Ad hoc account statement

                  * ANNUAL_ACCOUNT_STATEMENT - Annual account statement

                  * ANNUAL_INCOME_STATEMENT - Annual tax income statement
                  ("Erträgnisaufstellung")

                  * ANNUAL_TAX_STATEMENT - Annual tax reporting

                  * BANK_ACCOUNT_CONNECTED - Connect reference bank account

                  * BUY_ORDER - Buy order

                  * CANCELLED_ORDER - Cancelled buy or sell order (not yet
                  executed, user cancels or trading venue cancelled)

                  * CORPORATE_ACTION_CASH_TRANSACTION - cash transaction
                  document (after corporate action)

                  * CORPORATE_ACTION_SECURITY_TRANSACTION - security transaction
                  document (after corporate action)

                  * DIRECT_DEBIT_MANDATE - Creation of SEPA direct debit mandate

                  * EX_POST_COST - Ex-post cost report

                  * FUND_COMMUNICATION - Generic fund communication

                  * GENERAL_MEETING_NOTIFICATION - General meeting notification

                  * GENERIC_COMMUNICATION - Generic communication

                  * INCOME_DISTRIBUTION - Income distribution report

                  * INCOME_REINVESTMENT - Reinvestment billing report
                  (accumulating funds)

                  * MONTHLY_BILLING_STATEMENT - Monthly billing activities
                  statement

                  * QUARTERLY_ACCOUNT_STATEMENT - Quarterly account statement

                  * REVOKED_ORDER - Revoked buy or sell order ("Storno")

                  * SECURITIES_TRANSFER_INCOMING - Securities are transferred in

                  * SECURITIES_TRANSFER_OUTGOING - Securities are being
                  transferred out

                  * SELL_ORDER - Sell order

                  * TAX_EXEMPTION_CREATION - Creation of exemption order
                  ("Freistellungsauftrag")

                  * TAX_PAYMENT - Tax payment document

                  * TAX_PREPAYMENT_DE - German tax prepayment (Vorabpauschale)

                  * TAX_REFUND - Tax refund document (after tax optimization)
                type: string
                enum:
                  - ACCOUNT_CLOSING
                  - ACCOUNT_OPENING
                  - AD_HOC_ACCOUNT_STATEMENT
                  - ANNUAL_ACCOUNT_STATEMENT
                  - ANNUAL_INCOME_STATEMENT
                  - ANNUAL_TAX_STATEMENT
                  - BANK_ACCOUNT_CONNECTED
                  - BUY_ORDER
                  - CANCELLED_ORDER
                  - CORPORATE_ACTION_CASH_TRANSACTION
                  - CORPORATE_ACTION_SECURITY_TRANSACTION
                  - DIRECT_DEBIT_MANDATE
                  - EX_POST_COST
                  - FUND_COMMUNICATION
                  - GENERAL_MEETING_NOTIFICATION
                  - GENERIC_COMMUNICATION
                  - INCOME_DISTRIBUTION
                  - INCOME_REINVESTMENT
                  - MONTHLY_BILLING_STATEMENT
                  - QUARTERLY_ACCOUNT_STATEMENT
                  - REVOKED_ORDER
                  - SECURITIES_TRANSFER_INCOMING
                  - SECURITIES_TRANSFER_OUTGOING
                  - SELL_ORDER
                  - TAX_EXEMPTION_CREATION
                  - TAX_PAYMENT
                  - TAX_PREPAYMENT_DE
                  - TAX_REFUND
              - type: string
                default: ORDER_EX_ANTE_COST
                description: The type of report must be “ORDER_EX_ANTE_COST”.
          description: >-
            Filters the list to only show reports of a certain type (e.g. only
            buy order confirmations)
          example: BUY_ORDER
        - name: instrument
          in: query
          required: false
          schema:
            oneOf:
              - title: >-
                  International securities identification number, prefixed with
                  string 'isin:'
                type: string
                description: >-
                  International securities identification number, prefixed with
                  string 'isin:'
                pattern: ^isin:[A-Z]{2}[A-Z0-9]{9}[0-9]$
              - title: Unique identifier, prefixed with string 'uuid:'
                type: string
                description: Unique identifier, prefixed with string 'uuid:'
                pattern: >-
                  ^uuid:[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$
            example: uuid:ebabcf4d-61c3-4942-875c-e265a7c2d062
          description: >-
            Filters the list to only include reports concerning specified
            instrument
        - name: start_date
          in: query
          required: false
          schema:
            type: string
            format: date
            title: Date in YYYY-MM-DD format. RFC 3339, section 5.6
            description: >-
              Returns reports generated starting from and including this date
              (UTC)
          example: '2020-08-21'
        - name: end_date
          in: query
          required: false
          schema:
            type: string
            format: date
            title: Date in YYYY-MM-DD format. RFC 3339, section 5.6
            description: Returns reports generated up until this date (UTC)
          example: '2020-09-25'
        - name: sort
          in: query
          required: false
          schema:
            type: string
            enum:
              - id
              - type
              - created_at
            default: created_at
          description: Field of resource to sort by
          example: id
        - name: order
          in: query
          required: false
          schema:
            type: string
            enum:
              - ASC
              - DESC
            default: ASC
          description: >-
            Sort order of the result list if the `sort` parameter is specified.
            Use `ASC` for ascending or `DESC` for descending sort order.
        - name: limit
          in: query
          schema:
            type: integer
            format: int32
            default: 100
            minimum: 0
            maximum: 1000
          allowEmptyValue: true
          description: >-
            Use the `limit` argument to specify the maximum number of items
            returned.
        - name: offset
          in: query
          schema:
            type: integer
            minimum: 0
            format: int32
          allowEmptyValue: true
          description: >-
            Use the `offset` argument to specify where in the list of results to
            start when returning items for a particular query.
      responses:
        '200':
          description: Reports list
          headers:
            upvest-request-id:
              required: true
              schema:
                type: string
                format: uuid
                example: 169ae4c7-ebd7-4041-94da-25369653eba7
          content:
            application/json:
              schema:
                title: Reports - List - Response
                type: object
                properties:
                  meta:
                    type: object
                    properties:
                      offset:
                        type: integer
                        description: Amount of resource to offset in the response.
                      limit:
                        type: integer
                        description: Total limit of the response.
                      count:
                        type: integer
                        description: Count of the resources returned in the response.
                      total_count:
                        type: integer
                        description: Total count of all the resources.
                      sort:
                        type: string
                        description: The field that the list is sorted by.
                      order:
                        type: string
                        description: |-
                          The ordering of the response.
                          * ASC - Ascending order
                          * DESC - Descending order
                        enum:
                          - ASC
                          - DESC
                    required:
                      - offset
                      - limit
                      - count
                      - total_count
                      - sort
                      - order
                  data:
                    type: array
                    items:
                      title: Report
                      anyOf:
                        - title: Report
                          type: object
                          properties:
                            id:
                              title: Report unique identifier.
                              type: string
                              description: Report unique identifier.
                              format: uuid
                            created_at:
                              type: string
                              format: date-time
                              description: >-
                                Date and time when the resource was created.
                                [RFC
                                3339-5](https://datatracker.ietf.org/doc/html/rfc3339#section-5.6),
                                [ISO8601
                                UTC](https://www.iso.org/iso-8601-date-and-time-format.html)
                            user_id:
                              title: User unique identifier.
                              type: string
                              description: User unique identifier.
                              format: uuid
                            type:
                              title: Report type
                              description: >-
                                Report type

                                * ACCOUNT_CLOSING - Securities account closure

                                * ACCOUNT_OPENING - Securities account opening

                                * AD_HOC_ACCOUNT_STATEMENT - Ad hoc account
                                statement

                                * ANNUAL_ACCOUNT_STATEMENT - Annual account
                                statement

                                * ANNUAL_INCOME_STATEMENT - Annual tax income
                                statement ("Erträgnisaufstellung")

                                * ANNUAL_TAX_STATEMENT - Annual tax reporting

                                * BANK_ACCOUNT_CONNECTED - Connect reference
                                bank account

                                * BUY_ORDER - Buy order

                                * CANCELLED_ORDER - Cancelled buy or sell order
                                (not yet executed, user cancels or trading venue
                                cancelled)

                                * CORPORATE_ACTION_CASH_TRANSACTION - cash
                                transaction document (after corporate action)

                                * CORPORATE_ACTION_SECURITY_TRANSACTION -
                                security transaction document (after corporate
                                action)

                                * DIRECT_DEBIT_MANDATE - Creation of SEPA direct
                                debit mandate

                                * EX_POST_COST - Ex-post cost report

                                * FUND_COMMUNICATION - Generic fund
                                communication

                                * GENERAL_MEETING_NOTIFICATION - General meeting
                                notification

                                * GENERIC_COMMUNICATION - Generic communication

                                * INCOME_DISTRIBUTION - Income distribution
                                report

                                * INCOME_REINVESTMENT - Reinvestment billing
                                report (accumulating funds)

                                * MONTHLY_BILLING_STATEMENT - Monthly billing
                                activities statement

                                * QUARTERLY_ACCOUNT_STATEMENT - Quarterly
                                account statement

                                * REVOKED_ORDER - Revoked buy or sell order
                                ("Storno")

                                * SECURITIES_TRANSFER_INCOMING - Securities are
                                transferred in

                                * SECURITIES_TRANSFER_OUTGOING - Securities are
                                being transferred out

                                * SELL_ORDER - Sell order

                                * TAX_EXEMPTION_CREATION - Creation of exemption
                                order ("Freistellungsauftrag")

                                * TAX_PAYMENT - Tax payment document

                                * TAX_PREPAYMENT_DE - German tax prepayment
                                (Vorabpauschale)

                                * TAX_REFUND - Tax refund document (after tax
                                optimization)
                              type: string
                              enum:
                                - ACCOUNT_CLOSING
                                - ACCOUNT_OPENING
                                - AD_HOC_ACCOUNT_STATEMENT
                                - ANNUAL_ACCOUNT_STATEMENT
                                - ANNUAL_INCOME_STATEMENT
                                - ANNUAL_TAX_STATEMENT
                                - BANK_ACCOUNT_CONNECTED
                                - BUY_ORDER
                                - CANCELLED_ORDER
                                - CORPORATE_ACTION_CASH_TRANSACTION
                                - CORPORATE_ACTION_SECURITY_TRANSACTION
                                - DIRECT_DEBIT_MANDATE
                                - EX_POST_COST
                                - FUND_COMMUNICATION
                                - GENERAL_MEETING_NOTIFICATION
                                - GENERIC_COMMUNICATION
                                - INCOME_DISTRIBUTION
                                - INCOME_REINVESTMENT
                                - MONTHLY_BILLING_STATEMENT
                                - QUARTERLY_ACCOUNT_STATEMENT
                                - REVOKED_ORDER
                                - SECURITIES_TRANSFER_INCOMING
                                - SECURITIES_TRANSFER_OUTGOING
                                - SELL_ORDER
                                - TAX_EXEMPTION_CREATION
                                - TAX_PAYMENT
                                - TAX_PREPAYMENT_DE
                                - TAX_REFUND
                            substituted_report_id:
                              oneOf:
                                - type: 'null'
                                - title: Substituted Report unique identifier.
                                  type: string
                                  description: >-
                                    References report that has been replaced by
                                    this one.
                                  format: uuid
                            data:
                              title: Report Data
                              type: object
                              description: Contents of the report.
                              properties:
                                account:
                                  type: object
                                  title: Account.
                                  description: Account information.
                                  properties:
                                    id:
                                      title: Account unique identifier.
                                      type: string
                                      description: Account unique identifier.
                                      format: uuid
                                references:
                                  type: array
                                  title: References.
                                  items:
                                    title: Report reference data
                                    type: object
                                    description: Reference data for a report
                                    properties:
                                      id:
                                        type: string
                                        format: uuid
                                      type:
                                        title: Report reference type
                                        description: >-
                                          Report reference type

                                          * CORPORATE_ACTION_TRANSACTION_ID -
                                          Corporate action transaction identifier

                                          * ACCOUNT_GROUP_ID - Account group
                                          identifier

                                          * ACCOUNT_ID - Account identifier

                                          * ORDER_ID - Order identifier
                                        type: string
                                        enum:
                                          - CORPORATE_ACTION_TRANSACTION_ID
                                          - ACCOUNT_GROUP_ID
                                          - ACCOUNT_ID
                                          - ORDER_ID
                          required:
                            - id
                            - user_id
                            - created_at
                            - type
                            - substituted_report_id
                          additionalProperties: false
                        - title: Report - Order ex-ante cost
                          type: object
                          properties:
                            id:
                              title: Report unique identifier.
                              type: string
                              description: Report unique identifier.
                              format: uuid
                            created_at:
                              type: string
                              format: date-time
                              description: >-
                                Date and time when the resource was created.
                                [RFC
                                3339-5](https://datatracker.ietf.org/doc/html/rfc3339#section-5.6),
                                [ISO8601
                                UTC](https://www.iso.org/iso-8601-date-and-time-format.html)
                            user_id:
                              title: User unique identifier.
                              type: string
                              description: User unique identifier.
                              format: uuid
                            type:
                              type: string
                              default: ORDER_EX_ANTE_COST
                              description: The type of report must be “ORDER_EX_ANTE_COST”.
                            substituted_report_id:
                              oneOf:
                                - type: 'null'
                                - title: Substituted Report unique identifier.
                                  type: string
                                  description: >-
                                    References report that has been replaced by
                                    this one.
                                  format: uuid
                            data:
                              title: Report Data - Order ex-ante cost
                              type: object
                              description: Contents of the order ex-ante cost report.
                              properties:
                                holding_period:
                                  type: object
                                  description: Holding period.
                                  properties:
                                    unit:
                                      type: string
                                      description: |-
                                        Unit of time. 
                                        * YEAR - 
                                      enum:
                                        - YEAR
                                      default: YEAR
                                    quantity:
                                      description: Quantity of time units.
                                      type: integer
                                instrument:
                                  type: object
                                  description: Instrument details.
                                  properties:
                                    isin:
                                      title: >-
                                        International securities identification
                                        number
                                      type: string
                                      description: >-
                                        International securities identification
                                        number defined by [ISO
                                        6166](https://en.wikipedia.org/wiki/International_Securities_Identification_Number).
                                      pattern: ^[A-Z]{2}[A-Z0-9]{9}[0-9]$
                                    short_name:
                                      description: Instrument short name.
                                      type: string
                                      maxLength: 100
                                venue:
                                  type: object
                                  description: Venue details.
                                  properties:
                                    name:
                                      description: Venue name.
                                      type: string
                                      maxLength: 100
                                account:
                                  type: object
                                  description: Account details.
                                  properties:
                                    id:
                                      title: Account unique identifier.
                                      type: string
                                      description: Account unique identifier.
                                      format: uuid
                                    account_number:
                                      type: integer
                                      description: >-
                                        The serial account number of the account
                                        in the account group.
                                      minimum: 1
                                account_group:
                                  type: object
                                  description: Account group details.
                                  properties:
                                    id:
                                      title: Account group unique identifier.
                                      type: string
                                      description: Account group unique identifier.
                                      format: uuid
                                    securities_account_number:
                                      type: string
                                      description: Securities account number.
                                      pattern: ^[0-9]{9}$
                                user:
                                  type: object
                                  description: User details.
                                  properties:
                                    first_name:
                                      type: string
                                      maxLength: 100
                                      minLength: 2
                                      description: First name of the user.
                                    last_name:
                                      type: string
                                      maxLength: 100
                                      minLength: 2
                                      description: Last name of the user.
                                    salutation:
                                      type: string
                                      description: >-
                                        Salutation of the user used in reports
                                        and statements.

                                        * (empty string) - 

                                        * SALUTATION_MALE - 

                                        * SALUTATION_FEMALE - 

                                        * SALUTATION_FEMALE_MARRIED - 

                                        * SALUTATION_DIVERSE - 
                                      enum:
                                        - ''
                                        - SALUTATION_MALE
                                        - SALUTATION_FEMALE
                                        - SALUTATION_FEMALE_MARRIED
                                        - SALUTATION_DIVERSE
                                      default: ''
                                    title:
                                      type: string
                                      description: >-
                                        Title of the user used in reports and
                                        statements.

                                        * (empty string) - 

                                        * DR - Doctor

                                        * PROF - Professor

                                        * PROF_DR - 

                                        * DIPL_ING - Graduate engineer
                                        (Diplom-Ingenieur)

                                        * MAGISTER - 
                                      enum:
                                        - ''
                                        - DR
                                        - PROF
                                        - PROF_DR
                                        - DIPL_ING
                                        - MAGISTER
                                      default: ''
                                    address:
                                      type: object
                                      description: User residential address.
                                      properties:
                                        address_line1:
                                          type: string
                                          description: First address line of the address.
                                          maxLength: 100
                                        address_line2:
                                          type: string
                                          description: Second address line of the address.
                                          maxLength: 100
                                        postcode:
                                          title: Postal code
                                          type: string
                                          description: Postal code (postcode, PIN or ZIP code)
                                          pattern: >-
                                            ^[a-zA-Z0-9][a-zA-Z0-9\s\-]{0,8}[a-zA-Z0-9]?$
                                        country:
                                          description: >-
                                            Country code. [ISO 3166 alpha-2
                                            Codes](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2).
                                          type: string
                                          pattern: ^[A-Z]{2}$
                                        state:
                                          description: >-
                                            State, province, county. [ISO 3166
                                            alpha-2
                                            Codes](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2).
                                          type: string
                                          maxLength: 50
                                        city:
                                          title: City name
                                          type: string
                                          minLength: 1
                                          maxLength: 85
                                order:
                                  type: object
                                  description: Order details.
                                  properties:
                                    user_id:
                                      type: string
                                      format: uuid
                                      description: The ID of the user.
                                    account_id:
                                      type: string
                                      format: uuid
                                      description: >-
                                        The ID of the account that owns the
                                        order.
                                    cash_amount:
                                      allOf:
                                        - type: string
                                          pattern: ^[0-9]{1,9}(\.[0-9]{2})?$
                                        - description: Cash amount for a nominal order.
                                    currency:
                                      allOf:
                                        - type: string
                                          description: >-
                                            Alphabetic three-letter [ISO
                                            4217](https://en.wikipedia.org/wiki/ISO_4217)
                                            currency code.

                                            * EUR - Euro
                                          enum:
                                            - EUR
                                          default: EUR
                                        - description: The currency for the order.
                                    side:
                                      type: string
                                      description: |-
                                        Side of the order.
                                        * BUY - 
                                        * SELL - 
                                      enum:
                                        - BUY
                                        - SELL
                                    instrument_id:
                                      title: >-
                                        International securities identification
                                        number
                                      type: string
                                      description: >-
                                        International securities identification
                                        number defined by [ISO
                                        6166](https://en.wikipedia.org/wiki/International_Securities_Identification_Number).
                                      pattern: ^[A-Z]{2}[A-Z0-9]{9}[0-9]$
                                    instrument_id_type:
                                      description: |-
                                        The type of the ID used in the request.
                                        * ISIN - 
                                      enum:
                                        - ISIN
                                      default: ISIN
                                      type: string
                                    order_type:
                                      type: string
                                      description: |-
                                        Type of the order.
                                        * MARKET - 
                                        * LIMIT - 
                                        * STOP - 
                                      enum:
                                        - MARKET
                                        - LIMIT
                                        - STOP
                                    quantity:
                                      allOf:
                                        - type: string
                                          pattern: ^[0-9]{0,63}(\.[0-9]{1,27})?$
                                        - description: Quantity of securities for the order.
                                    limit_price:
                                      allOf:
                                        - type: string
                                          pattern: ^[0-9]{0,63}(\.[0-9]{1,27})?$
                                        - description: >-
                                            The limit price for orders of the type
                                            'limit'.
                                    stop_price:
                                      allOf:
                                        - type: string
                                          pattern: ^[0-9]{0,63}(\.[0-9]{1,27})?$
                                        - description: >-
                                            The stop price for orders of the type
                                            'stop'.
                                    price:
                                      allOf:
                                        - type: string
                                          pattern: ^[0-9]{0,63}(\.[0-9]{1,27})?$
                                        - description: >-
                                            The estimated price for the order. In
                                            case of LIMIT or STOP order provided
                                            'limit'/'stop' price will be used.
                                return_impact:
                                  type: object
                                  description: Return impact.
                                  properties:
                                    year_one:
                                      title: Cost
                                      type: object
                                      properties:
                                        cash_amount:
                                          type: string
                                          pattern: ^[0-9]{1,9}(\.[0-9]{2})?$
                                        currency:
                                          type: string
                                          description: >-
                                            Alphabetic three-letter [ISO
                                            4217](https://en.wikipedia.org/wiki/ISO_4217)
                                            currency code.

                                            * EUR - Euro
                                          enum:
                                            - EUR
                                          default: EUR
                                        as_percentage:
                                          allOf:
                                            - type: string
                                              pattern: ^-?[0-9]{0,63}(\.[0-9]{1,27})?$
                                            - description: >-
                                                The cost value represented as a
                                                percentage.
                                      additionalProperties: false
                                    year_two:
                                      title: Cost
                                      type: object
                                      properties:
                                        cash_amount:
                                          type: string
                                          pattern: ^[0-9]{1,9}(\.[0-9]{2})?$
                                        currency:
                                          type: string
                                          description: >-
                                            Alphabetic three-letter [ISO
                                            4217](https://en.wikipedia.org/wiki/ISO_4217)
                                            currency code.

                                            * EUR - Euro
                                          enum:
                                            - EUR
                                          default: EUR
                                        as_percentage:
                                          allOf:
                                            - type: string
                                              pattern: ^-?[0-9]{0,63}(\.[0-9]{1,27})?$
                                            - description: >-
                                                The cost value represented as a
                                                percentage.
                                      additionalProperties: false
                                    year_three:
                                      title: Cost
                                      type: object
                                      properties:
                                        cash_amount:
                                          type: string
                                          pattern: ^[0-9]{1,9}(\.[0-9]{2})?$
                                        currency:
                                          type: string
                                          description: >-
                                            Alphabetic three-letter [ISO
                                            4217](https://en.wikipedia.org/wiki/ISO_4217)
                                            currency code.

                                            * EUR - Euro
                                          enum:
                                            - EUR
                                          default: EUR
                                        as_percentage:
                                          allOf:
                                            - type: string
                                              pattern: ^-?[0-9]{0,63}(\.[0-9]{1,27})?$
                                            - description: >-
                                                The cost value represented as a
                                                percentage.
                                      additionalProperties: false
                                total_cost:
                                  title: Order ex-ante aggregated cost
                                  type: object
                                  description: >-
                                    Aggregated totals of product costs, service
                                    costs and third party payments.
                                  properties:
                                    product:
                                      title: Cost
                                      type: object
                                      properties:
                                        cash_amount:
                                          type: string
                                          pattern: ^[0-9]{1,9}(\.[0-9]{2})?$
                                        currency:
                                          type: string
                                          description: >-
                                            Alphabetic three-letter [ISO
                                            4217](https://en.wikipedia.org/wiki/ISO_4217)
                                            currency code.

                                            * EUR - Euro
                                          enum:
                                            - EUR
                                          default: EUR
                                        as_percentage:
                                          allOf:
                                            - type: string
                                              pattern: ^-?[0-9]{0,63}(\.[0-9]{1,27})?$
                                            - description: >-
                                                The cost value represented as a
                                                percentage.
                                      additionalProperties: false
                                    service:
                                      title: Cost
                                      type: object
                                      properties:
                                        cash_amount:
                                          type: string
                                          pattern: ^[0-9]{1,9}(\.[0-9]{2})?$
                                        currency:
                                          type: string
                                          description: >-
                                            Alphabetic three-letter [ISO
                                            4217](https://en.wikipedia.org/wiki/ISO_4217)
                                            currency code.

                                            * EUR - Euro
                                          enum:
                                            - EUR
                                          default: EUR
                                        as_percentage:
                                          allOf:
                                            - type: string
                                              pattern: ^-?[0-9]{0,63}(\.[0-9]{1,27})?$
                                            - description: >-
                                                The cost value represented as a
                                                percentage.
                                      additionalProperties: false
                                    third_party:
                                      title: Cost
                                      type: object
                                      properties:
                                        cash_amount:
                                          type: string
                                          pattern: ^[0-9]{1,9}(\.[0-9]{2})?$
                                        currency:
                                          type: string
                                          description: >-
                                            Alphabetic three-letter [ISO
                                            4217](https://en.wikipedia.org/wiki/ISO_4217)
                                            currency code.

                                            * EUR - Euro
                                          enum:
                                            - EUR
                                          default: EUR
                                        as_percentage:
                                          allOf:
                                            - type: string
                                              pattern: ^-?[0-9]{0,63}(\.[0-9]{1,27})?$
                                            - description: >-
                                                The cost value represented as a
                                                percentage.
                                      additionalProperties: false
                                    total:
                                      title: Cost
                                      type: object
                                      properties:
                                        cash_amount:
                                          type: string
                                          pattern: ^[0-9]{1,9}(\.[0-9]{2})?$
                                        currency:
                                          type: string
                                          description: >-
                                            Alphabetic three-letter [ISO
                                            4217](https://en.wikipedia.org/wiki/ISO_4217)
                                            currency code.

                                            * EUR - Euro
                                          enum:
                                            - EUR
                                          default: EUR
                                        as_percentage:
                                          allOf:
                                            - type: string
                                              pattern: ^-?[0-9]{0,63}(\.[0-9]{1,27})?$
                                            - description: >-
                                                The cost value represented as a
                                                percentage.
                                      additionalProperties: false
                                  additionalProperties: false
                                product_cost:
                                  title: Order ex-ante product cost
                                  type: object
                                  description: >-
                                    All costs and associated charges related to
                                    the financial instrument.
                                  properties:
                                    one_off:
                                      title: Cost
                                      type: object
                                      properties:
                                        cash_amount:
                                          type: string
                                          pattern: ^[0-9]{1,9}(\.[0-9]{2})?$
                                        currency:
                                          type: string
                                          description: >-
                                            Alphabetic three-letter [ISO
                                            4217](https://en.wikipedia.org/wiki/ISO_4217)
                                            currency code.

                                            * EUR - Euro
                                          enum:
                                            - EUR
                                          default: EUR
                                        as_percentage:
                                          allOf:
                                            - type: string
                                              pattern: ^-?[0-9]{0,63}(\.[0-9]{1,27})?$
                                            - description: >-
                                                The cost value represented as a
                                                percentage.
                                      additionalProperties: false
                                    ongoing:
                                      title: Cost
                                      type: object
                                      properties:
                                        cash_amount:
                                          type: string
                                          pattern: ^[0-9]{1,9}(\.[0-9]{2})?$
                                        currency:
                                          type: string
                                          description: >-
                                            Alphabetic three-letter [ISO
                                            4217](https://en.wikipedia.org/wiki/ISO_4217)
                                            currency code.

                                            * EUR - Euro
                                          enum:
                                            - EUR
                                          default: EUR
                                        as_percentage:
                                          allOf:
                                            - type: string
                                              pattern: ^-?[0-9]{0,63}(\.[0-9]{1,27})?$
                                            - description: >-
                                                The cost value represented as a
                                                percentage.
                                      additionalProperties: false
                                    transaction:
                                      title: Cost
                                      type: object
                                      properties:
                                        cash_amount:
                                          type: string
                                          pattern: ^[0-9]{1,9}(\.[0-9]{2})?$
                                        currency:
                                          type: string
                                          description: >-
                                            Alphabetic three-letter [ISO
                                            4217](https://en.wikipedia.org/wiki/ISO_4217)
                                            currency code.

                                            * EUR - Euro
                                          enum:
                                            - EUR
                                          default: EUR
                                        as_percentage:
                                          allOf:
                                            - type: string
                                              pattern: ^-?[0-9]{0,63}(\.[0-9]{1,27})?$
                                            - description: >-
                                                The cost value represented as a
                                                percentage.
                                      additionalProperties: false
                                    incidental:
                                      title: Cost
                                      type: object
                                      properties:
                                        cash_amount:
                                          type: string
                                          pattern: ^[0-9]{1,9}(\.[0-9]{2})?$
                                        currency:
                                          type: string
                                          description: >-
                                            Alphabetic three-letter [ISO
                                            4217](https://en.wikipedia.org/wiki/ISO_4217)
                                            currency code.

                                            * EUR - Euro
                                          enum:
                                            - EUR
                                          default: EUR
                                        as_percentage:
                                          allOf:
                                            - type: string
                                              pattern: ^-?[0-9]{0,63}(\.[0-9]{1,27})?$
                                            - description: >-
                                                The cost value represented as a
                                                percentage.
                                      additionalProperties: false
                                    total:
                                      title: Cost
                                      type: object
                                      properties:
                                        cash_amount:
                                          type: string
                                          pattern: ^[0-9]{1,9}(\.[0-9]{2})?$
                                        currency:
                                          type: string
                                          description: >-
                                            Alphabetic three-letter [ISO
                                            4217](https://en.wikipedia.org/wiki/ISO_4217)
                                            currency code.

                                            * EUR - Euro
                                          enum:
                                            - EUR
                                          default: EUR
                                        as_percentage:
                                          allOf:
                                            - type: string
                                              pattern: ^-?[0-9]{0,63}(\.[0-9]{1,27})?$
                                            - description: >-
                                                The cost value represented as a
                                                percentage.
                                      additionalProperties: false
                                  additionalProperties: false
                                service_cost:
                                  title: Order ex-ante service cost
                                  type: object
                                  description: >-
                                    All costs and associated charges related to
                                    the investment service(s) and/or ancillary
                                    services.
                                  properties:
                                    one_off:
                                      title: Cost
                                      type: object
                                      properties:
                                        cash_amount:
                                          type: string
                                          pattern: ^[0-9]{1,9}(\.[0-9]{2})?$
                                        currency:
                                          type: string
                                          description: >-
                                            Alphabetic three-letter [ISO
                                            4217](https://en.wikipedia.org/wiki/ISO_4217)
                                            currency code.

                                            * EUR - Euro
                                          enum:
                                            - EUR
                                          default: EUR
                                        as_percentage:
                                          allOf:
                                            - type: string
                                              pattern: ^-?[0-9]{0,63}(\.[0-9]{1,27})?$
                                            - description: >-
                                                The cost value represented as a
                                                percentage.
                                      additionalProperties: false
                                    ongoing:
                                      title: Cost
                                      type: object
                                      properties:
                                        cash_amount:
                                          type: string
                                          pattern: ^[0-9]{1,9}(\.[0-9]{2})?$
                                        currency:
                                          type: string
                                          description: >-
                                            Alphabetic three-letter [ISO
                                            4217](https://en.wikipedia.org/wiki/ISO_4217)
                                            currency code.

                                            * EUR - Euro
                                          enum:
                                            - EUR
                                          default: EUR
                                        as_percentage:
                                          allOf:
                                            - type: string
                                              pattern: ^-?[0-9]{0,63}(\.[0-9]{1,27})?$
                                            - description: >-
                                                The cost value represented as a
                                                percentage.
                                      additionalProperties: false
                                    transaction:
                                      title: Cost
                                      type: object
                                      properties:
                                        cash_amount:
                                          type: string
                                          pattern: ^[0-9]{1,9}(\.[0-9]{2})?$
                                        currency:
                                          type: string
                                          description: >-
                                            Alphabetic three-letter [ISO
                                            4217](https://en.wikipedia.org/wiki/ISO_4217)
                                            currency code.

                                            * EUR - Euro
                                          enum:
                                            - EUR
                                          default: EUR
                                        as_percentage:
                                          allOf:
                                            - type: string
                                              pattern: ^-?[0-9]{0,63}(\.[0-9]{1,27})?$
                                            - description: >-
                                                The cost value represented as a
                                                percentage.
                                      additionalProperties: false
                                    ancillary:
                                      title: Cost
                                      type: object
                                      properties:
                                        cash_amount:
                                          type: string
                                          pattern: ^[0-9]{1,9}(\.[0-9]{2})?$
                                        currency:
                                          type: string
                                          description: >-
                                            Alphabetic three-letter [ISO
                                            4217](https://en.wikipedia.org/wiki/ISO_4217)
                                            currency code.

                                            * EUR - Euro
                                          enum:
                                            - EUR
                                          default: EUR
                                        as_percentage:
                                          allOf:
                                            - type: string
                                              pattern: ^-?[0-9]{0,63}(\.[0-9]{1,27})?$
                                            - description: >-
                                                The cost value represented as a
                                                percentage.
                                      additionalProperties: false
                                    incidental:
                                      title: Cost
                                      type: object
                                      properties:
                                        cash_amount:
                                          type: string
                                          pattern: ^[0-9]{1,9}(\.[0-9]{2})?$
                                        currency:
                                          type: string
                                          description: >-
                                            Alphabetic three-letter [ISO
                                            4217](https://en.wikipedia.org/wiki/ISO_4217)
                                            currency code.

                                            * EUR - Euro
                                          enum:
                                            - EUR
                                          default: EUR
                                        as_percentage:
                                          allOf:
                                            - type: string
                                              pattern: ^-?[0-9]{0,63}(\.[0-9]{1,27})?$
                                            - description: >-
                                                The cost value represented as a
                                                percentage.
                                      additionalProperties: false
                                    total:
                                      title: Cost
                                      type: object
                                      properties:
                                        cash_amount:
                                          type: string
                                          pattern: ^[0-9]{1,9}(\.[0-9]{2})?$
                                        currency:
                                          type: string
                                          description: >-
                                            Alphabetic three-letter [ISO
                                            4217](https://en.wikipedia.org/wiki/ISO_4217)
                                            currency code.

                                            * EUR - Euro
                                          enum:
                                            - EUR
                                          default: EUR
                                        as_percentage:
                                          allOf:
                                            - type: string
                                              pattern: ^-?[0-9]{0,63}(\.[0-9]{1,27})?$
                                            - description: >-
                                                The cost value represented as a
                                                percentage.
                                      additionalProperties: false
                                  additionalProperties: false
                                third_party_payments:
                                  type: object
                                  description: >-
                                    Third party payments associated with the
                                    investment service.
                                  properties:
                                    total:
                                      title: Cost
                                      type: object
                                      properties:
                                        cash_amount:
                                          type: string
                                          pattern: ^[0-9]{1,9}(\.[0-9]{2})?$
                                        currency:
                                          type: string
                                          description: >-
                                            Alphabetic three-letter [ISO
                                            4217](https://en.wikipedia.org/wiki/ISO_4217)
                                            currency code.

                                            * EUR - Euro
                                          enum:
                                            - EUR
                                          default: EUR
                                        as_percentage:
                                          allOf:
                                            - type: string
                                              pattern: ^-?[0-9]{0,63}(\.[0-9]{1,27})?$
                                            - description: >-
                                                The cost value represented as a
                                                percentage.
                                      additionalProperties: false
                                    received_by_client:
                                      title: Cost
                                      type: object
                                      properties:
                                        cash_amount:
                                          type: string
                                          pattern: ^[0-9]{1,9}(\.[0-9]{2})?$
                                        currency:
                                          type: string
                                          description: >-
                                            Alphabetic three-letter [ISO
                                            4217](https://en.wikipedia.org/wiki/ISO_4217)
                                            currency code.

                                            * EUR - Euro
                                          enum:
                                            - EUR
                                          default: EUR
                                        as_percentage:
                                          allOf:
                                            - type: string
                                              pattern: ^-?[0-9]{0,63}(\.[0-9]{1,27})?$
                                            - description: >-
                                                The cost value represented as a
                                                percentage.
                                      additionalProperties: false
                                    received_by_upvest:
                                      title: Cost
                                      type: object
                                      properties:
                                        cash_amount:
                                          type: string
                                          pattern: ^[0-9]{1,9}(\.[0-9]{2})?$
                                        currency:
                                          type: string
                                          description: >-
                                            Alphabetic three-letter [ISO
                                            4217](https://en.wikipedia.org/wiki/ISO_4217)
                                            currency code.

                                            * EUR - Euro
                                          enum:
                                            - EUR
                                          default: EUR
                                        as_percentage:
                                          allOf:
                                            - type: string
                                              pattern: ^-?[0-9]{0,63}(\.[0-9]{1,27})?$
                                            - description: >-
                                                The cost value represented as a
                                                percentage.
                                      additionalProperties: false
                                  additionalProperties: false
                              additionalProperties: false
                          required:
                            - id
                            - user_id
                            - created_at
                            - type
                            - substituted_report_id
                          additionalProperties: false
                required:
                  - meta
                  - data
                additionalProperties: false
              example:
                meta:
                  offset: 0
                  limit: 100
                  count: 1
                  total_count: 1
                  sort: id
                  order: ASC
                data:
                  - id: b96b1ee7-d491-43eb-b5e4-4833af9c9c2f
                    created_at: '2020-08-24T14:15:22Z'
                    user_id: d1a4be99-8bb6-4e78-b897-8168f6823ab5
                    type: CORPORATE_ACTION_CASH_TRANSACTION
                    substituted_report_id: null
                    data:
                      account:
                        id: a9a4ad54-6dd1-419a-a98d-ab48f9f23bc8
                      references:
                        - id: b96b1ee7-d491-43eb-b5e4-4833af9c9c2f
                          type: CORPORATE_ACTION_TRANSACTION_ID
        '400':
          description: Bad Request. The incoming request had a malformed parameter/object.
          headers:
            upvest-request-id:
              required: true
              schema:
                type: string
                format: uuid
                example: 169ae4c7-ebd7-4041-94da-25369653eba7
          content:
            application/problem+json:
              schema:
                title: Error
                type: object
                description: ''
                properties:
                  type:
                    type: string
                    description: URL to a document describing the error condition.
                  status:
                    type: integer
                    description: >-
                      Transmission of the HTTP status code so that all
                      information can be found in one place, but also to correct
                      changes in the status code due to the use of proxy
                      servers.
                  title:
                    type: string
                    description: >-
                      A short, human-readable title for the general error type;
                      the title should not change for given types.
                  detail:
                    type: string
                    description: A human-readable description of the specific error.
                  instance:
                    type: string
                    description: >-
                      This optional key may be present, with a unique URI for
                      the specific error; this will often point to an error log
                      for that specific response.
                  request_id:
                    type: string
                    description: Correlation ID for the original request.
                required:
                  - type
                  - status
                additionalProperties: false
              example:
                status: 400
                type: bad_request
        '401':
          description: Unauthorized. The caller has not been authenticated.
          headers:
            upvest-request-id:
              required: true
              schema:
                type: string
                format: uuid
                example: 169ae4c7-ebd7-4041-94da-25369653eba7
          content:
            application/problem+json:
              schema:
                title: Error
                type: object
                description: ''
                properties:
                  type:
                    type: string
                    description: URL to a document describing the error condition.
                  status:
                    type: integer
                    description: >-
                      Transmission of the HTTP status code so that all
                      information can be found in one place, but also to correct
                      changes in the status code due to the use of proxy
                      servers.
                  title:
                    type: string
                    description: >-
                      A short, human-readable title for the general error type;
                      the title should not change for given types.
                  detail:
                    type: string
                    description: A human-readable description of the specific error.
                  instance:
                    type: string
                    description: >-
                      This optional key may be present, with a unique URI for
                      the specific error; this will often point to an error log
                      for that specific response.
                  request_id:
                    type: string
                    description: Correlation ID for the original request.
                required:
                  - type
                  - status
                additionalProperties: false
              example:
                status: 401
                type: unauthorized
        '403':
          description: >-
            Forbidden. The caller has been authenticated but is not allowed to
            take the requested action.
          headers:
            upvest-request-id:
              required: true
              schema:
                type: string
                format: uuid
                example: 169ae4c7-ebd7-4041-94da-25369653eba7
          content:
            application/problem+json:
              schema:
                title: Error
                type: object
                description: ''
                properties:
                  type:
                    type: string
                    description: URL to a document describing the error condition.
                  status:
                    type: integer
                    description: >-
                      Transmission of the HTTP status code so that all
                      information can be found in one place, but also to correct
                      changes in the status code due to the use of proxy
                      servers.
                  title:
                    type: string
                    description: >-
                      A short, human-readable title for the general error type;
                      the title should not change for given types.
                  detail:
                    type: string
                    description: A human-readable description of the specific error.
                  instance:
                    type: string
                    description: >-
                      This optional key may be present, with a unique URI for
                      the specific error; this will often point to an error log
                      for that specific response.
                  request_id:
                    type: string
                    description: Correlation ID for the original request.
                required:
                  - type
                  - status
                additionalProperties: false
              example:
                status: 403
                type: forbidden
        '404':
          description: Not Found. The requested resource could not be found.
          headers:
            upvest-request-id:
              required: true
              schema:
                type: string
                format: uuid
                example: 169ae4c7-ebd7-4041-94da-25369653eba7
          content:
            application/problem+json:
              schema:
                title: Error
                type: object
                description: ''
                properties:
                  type:
                    type: string
                    description: URL to a document describing the error condition.
                  status:
                    type: integer
                    description: >-
                      Transmission of the HTTP status code so that all
                      information can be found in one place, but also to correct
                      changes in the status code due to the use of proxy
                      servers.
                  title:
                    type: string
                    description: >-
                      A short, human-readable title for the general error type;
                      the title should not change for given types.
                  detail:
                    type: string
                    description: A human-readable description of the specific error.
                  instance:
                    type: string
                    description: >-
                      This optional key may be present, with a unique URI for
                      the specific error; this will often point to an error log
                      for that specific response.
                  request_id:
                    type: string
                    description: Correlation ID for the original request.
                required:
                  - type
                  - status
                additionalProperties: false
              example:
                status: 404
                type: not_found
        '406':
          description: >-
            Not Acceptable. The resource does not have a current representation
            that would be acceptable to the user agent. "Accept" header defined
            unsupported value.
          headers:
            upvest-request-id:
              required: true
              schema:
                type: string
                format: uuid
                example: 169ae4c7-ebd7-4041-94da-25369653eba7
          content:
            application/problem+json:
              schema:
                title: Error
                type: object
                description: ''
                properties:
                  type:
                    type: string
                    description: URL to a document describing the error condition.
                  status:
                    type: integer
                    description: >-
                      Transmission of the HTTP status code so that all
                      information can be found in one place, but also to correct
                      changes in the status code due to the use of proxy
                      servers.
                  title:
                    type: string
                    description: >-
                      A short, human-readable title for the general error type;
                      the title should not change for given types.
                  detail:
                    type: string
                    description: A human-readable description of the specific error.
                  instance:
                    type: string
                    description: >-
                      This optional key may be present, with a unique URI for
                      the specific error; this will often point to an error log
                      for that specific response.
                  request_id:
                    type: string
                    description: Correlation ID for the original request.
                required:
                  - type
                  - status
                additionalProperties: false
              example:
                status: 406
                type: not_acceptable
        '429':
          description: >-
            Too Many Requests. The caller has exceeded their quota for the time
            period and has been throttled.
          headers:
            upvest-request-id:
              required: true
              schema:
                type: string
                format: uuid
                example: 169ae4c7-ebd7-4041-94da-25369653eba7
          content:
            application/problem+json:
              schema:
                title: Error
                type: object
                description: ''
                properties:
                  type:
                    type: string
                    description: URL to a document describing the error condition.
                  status:
                    type: integer
                    description: >-
                      Transmission of the HTTP status code so that all
                      information can be found in one place, but also to correct
                      changes in the status code due to the use of proxy
                      servers.
                  title:
                    type: string
                    description: >-
                      A short, human-readable title for the general error type;
                      the title should not change for given types.
                  detail:
                    type: string
                    description: A human-readable description of the specific error.
                  instance:
                    type: string
                    description: >-
                      This optional key may be present, with a unique URI for
                      the specific error; this will often point to an error log
                      for that specific response.
                  request_id:
                    type: string
                    description: Correlation ID for the original request.
                required:
                  - type
                  - status
                additionalProperties: false
              example:
                status: 429
                type: too_many_requests
        '500':
          description: Internal Server Error. The service encountered an unexpected error.
          headers:
            upvest-request-id:
              required: true
              schema:
                type: string
                format: uuid
                example: 169ae4c7-ebd7-4041-94da-25369653eba7
          content:
            application/problem+json:
              schema:
                title: Error
                type: object
                description: ''
                properties:
                  type:
                    type: string
                    description: URL to a document describing the error condition.
                  status:
                    type: integer
                    description: >-
                      Transmission of the HTTP status code so that all
                      information can be found in one place, but also to correct
                      changes in the status code due to the use of proxy
                      servers.
                  title:
                    type: string
                    description: >-
                      A short, human-readable title for the general error type;
                      the title should not change for given types.
                  detail:
                    type: string
                    description: A human-readable description of the specific error.
                  instance:
                    type: string
                    description: >-
                      This optional key may be present, with a unique URI for
                      the specific error; this will often point to an error log
                      for that specific response.
                  request_id:
                    type: string
                    description: Correlation ID for the original request.
                required:
                  - type
                  - status
                additionalProperties: false
              example:
                status: 500
                type: internal_server_error
        '503':
          description: >-
            Service Unavailable. The service handling for this request cannot be
            reached at this time.
          headers:
            upvest-request-id:
              required: true
              schema:
                type: string
                format: uuid
                example: 169ae4c7-ebd7-4041-94da-25369653eba7
          content:
            application/problem+json:
              schema:
                title: Error
                type: object
                description: ''
                properties:
                  type:
                    type: string
                    description: URL to a document describing the error condition.
                  status:
                    type: integer
                    description: >-
                      Transmission of the HTTP status code so that all
                      information can be found in one place, but also to correct
                      changes in the status code due to the use of proxy
                      servers.
                  title:
                    type: string
                    description: >-
                      A short, human-readable title for the general error type;
                      the title should not change for given types.
                  detail:
                    type: string
                    description: A human-readable description of the specific error.
                  instance:
                    type: string
                    description: >-
                      This optional key may be present, with a unique URI for
                      the specific error; this will often point to an error log
                      for that specific response.
                  request_id:
                    type: string
                    description: Correlation ID for the original request.
                required:
                  - type
                  - status
                additionalProperties: false
              example:
                status: 503
                type: method_not_allowed
        '504':
          description: >-
            Gateway Timeout. The service gateway has reached its internal
            timeout.
          headers:
            upvest-request-id:
              required: true
              schema:
                type: string
                format: uuid
                example: 169ae4c7-ebd7-4041-94da-25369653eba7
          content:
            application/problem+json:
              schema:
                title: Error
                type: object
                description: ''
                properties:
                  type:
                    type: string
                    description: URL to a document describing the error condition.
                  status:
                    type: integer
                    description: >-
                      Transmission of the HTTP status code so that all
                      information can be found in one place, but also to correct
                      changes in the status code due to the use of proxy
                      servers.
                  title:
                    type: string
                    description: >-
                      A short, human-readable title for the general error type;
                      the title should not change for given types.
                  detail:
                    type: string
                    description: A human-readable description of the specific error.
                  instance:
                    type: string
                    description: >-
                      This optional key may be present, with a unique URI for
                      the specific error; this will often point to an error log
                      for that specific response.
                  request_id:
                    type: string
                    description: Correlation ID for the original request.
                required:
                  - type
                  - status
                additionalProperties: false
              example:
                status: 504
                type: gateway_timeout
  /reports:
    parameters:
      - name: upvest-client-id
        in: header
        description: Tenant Client ID
        required: true
        schema:
          type: string
          format: uuid
          example: ebabcf4d-61c3-4942-875c-e265a7c2d062
      - name: authorization
        in: header
        description: |
          Bearer (access) token from the OAuth flow with correct scopes.
          https://datatracker.ietf.org/doc/html/rfc6750
        required: true
        schema:
          type: string
          pattern: ^Bearer [a-zA-Z0-9\-\._~+/]*=*
          example: Bearer c2VjcmV0Cg==
      - name: signature
        in: header
        required: true
        schema:
          type: string
        description: >-
          https://tools.ietf.org/id/draft-ietf-httpbis-message-signatures-01.html#name-the-signature-http-header
      - name: signature-input
        in: header
        required: true
        schema:
          type: string
        description: >-
          https://tools.ietf.org/id/draft-ietf-httpbis-message-signatures-01.html#name-the-signature-input-http-he
      - name: upvest-api-version
        in: header
        required: false
        schema:
          type: string
          enum:
            - '1'
          default: '1'
          example: '1'
        description: 'Upvest API version (Note: Do not include quotation marks)'
    post:
      operationId: create_report
      summary: Create a user report
      description: Create a user report
      tags:
        - Reports
      security:
        - oauth-client-credentials:
            - reports:admin
      requestBody:
        content:
          application/json:
            schema:
              title: Report - Order ex-ante cost - Create - Request
              type: object
              description: >-
                The order ex-ante cost report is generated by the client sharing
                the valid and relevant input data for the order.
              properties:
                type:
                  type: string
                  default: ORDER_EX_ANTE_COST
                  description: The type of report must be “ORDER_EX_ANTE_COST”.
                order:
                  type: object
                  description: Order details.
                  properties:
                    user_id:
                      type: string
                      format: uuid
                      description: The ID of the user.
                    account_id:
                      type: string
                      format: uuid
                      description: The ID of the account that owns the order.
                    cash_amount:
                      allOf:
                        - type: string
                          pattern: ^[0-9]{1,9}(\.[0-9]{2})?$
                        - description: Cash amount for a nominal order.
                    currency:
                      allOf:
                        - type: string
                          description: >-
                            Alphabetic three-letter [ISO
                            4217](https://en.wikipedia.org/wiki/ISO_4217)
                            currency code.

                            * EUR - Euro
                          enum:
                            - EUR
                          default: EUR
                        - description: The currency for the order.
                    side:
                      type: string
                      description: |-
                        Side of the order.
                        * BUY - 
                        * SELL - 
                      enum:
                        - BUY
                        - SELL
                    instrument_id:
                      title: International securities identification number
                      type: string
                      description: >-
                        International securities identification number defined
                        by [ISO
                        6166](https://en.wikipedia.org/wiki/International_Securities_Identification_Number).
                      pattern: ^[A-Z]{2}[A-Z0-9]{9}[0-9]$
                    instrument_id_type:
                      description: |-
                        The type of the ID used in the request.
                        * ISIN - 
                      enum:
                        - ISIN
                      default: ISIN
                      type: string
                    order_type:
                      type: string
                      description: |-
                        Type of the order.
                        * MARKET - 
                        * LIMIT - 
                        * STOP - 
                      enum:
                        - MARKET
                        - LIMIT
                        - STOP
                    quantity:
                      allOf:
                        - type: string
                          pattern: ^[0-9]{0,63}(\.[0-9]{1,27})?$
                        - description: Quantity of securities for the order.
                    limit_price:
                      allOf:
                        - type: string
                          pattern: ^[0-9]{0,63}(\.[0-9]{1,27})?$
                        - description: The limit price for orders of the type 'limit'.
                    stop_price:
                      allOf:
                        - type: string
                          pattern: ^[0-9]{0,63}(\.[0-9]{1,27})?$
                        - description: The stop price for orders of the type 'stop'.
                  required:
                    - instrument_id
                    - instrument_id_type
                    - account_id
                    - user_id
                    - currency
                    - order_type
                    - side
                fees:
                  type: array
                  description: Client fees.
                  items:
                    title: Fee
                    oneOf:
                      - title: Absolute Fee
                        type: object
                        properties:
                          type:
                            title: Fee type
                            description: |-
                              Fee type
                              * TRANSACTION_FEE_BUY - 
                              * TRANSACTION_FEE_SELL - 
                              * ANNUAL_AUM_BASED_FEE - 
                            type: string
                            enum:
                              - TRANSACTION_FEE_BUY
                              - TRANSACTION_FEE_SELL
                              - ANNUAL_AUM_BASED_FEE
                          value_type:
                            type: string
                            default: ABSOLUTE
                            description: The type of fee value must be “ABSOLUTE”.
                          cash_amount:
                            type: string
                            pattern: ^[0-9]{1,9}(\.[0-9]{2})?$
                          currency:
                            type: string
                            description: >-
                              Alphabetic three-letter [ISO
                              4217](https://en.wikipedia.org/wiki/ISO_4217)
                              currency code.

                              * EUR - Euro
                            enum:
                              - EUR
                            default: EUR
                        required:
                          - type
                          - value_type
                          - cash_amount
                          - currency
                        additionalProperties: false
                      - title: Relative Fee
                        type: object
                        properties:
                          type:
                            title: Fee type
                            description: |-
                              Fee type
                              * TRANSACTION_FEE_BUY - 
                              * TRANSACTION_FEE_SELL - 
                              * ANNUAL_AUM_BASED_FEE - 
                            type: string
                            enum:
                              - TRANSACTION_FEE_BUY
                              - TRANSACTION_FEE_SELL
                              - ANNUAL_AUM_BASED_FEE
                          value_type:
                            type: string
                            default: RELATIVE
                            description: The type of fee value must be “RELATIVE”.
                          bps:
                            allOf:
                              - type: string
                                pattern: ^-?[0-9]{0,63}(\.[0-9]{1,27})?$
                              - description: >-
                                  A fee is charged based on transaction amount
                                  and is represented in basis points.
                        required:
                          - type
                          - value_type
                          - bps
                        additionalProperties: false
                inducements:
                  type: array
                  description: Client inducements.
                  items:
                    title: Inducement
                    type: object
                    properties:
                      value_type:
                        type: string
                        default: ABSOLUTE
                        description: The type of inducement value must be “ABSOLUTE”.
                      cash_amount:
                        type: string
                        pattern: ^-?[0-9]{1,9}(\.[0-9]{2})?$
                      currency:
                        type: string
                        description: >-
                          Alphabetic three-letter [ISO
                          4217](https://en.wikipedia.org/wiki/ISO_4217) currency
                          code.

                          * EUR - Euro
                        enum:
                          - EUR
                        default: EUR
                    required:
                      - value_type
                      - cash_amount
                      - currency
                    additionalProperties: false
              required:
                - type
                - order
              additionalProperties: false
            examples:
              unit-buy-order-ex-ante-cost:
                summary: Unit buy order ex-ante cost report
                value:
                  type: ORDER_EX_ANTE_COST
                  order:
                    user_id: d1a4be99-8bb6-4e78-b897-8168f6823ab5
                    account_id: c5034305-c441-4711-adbf-93cfbc13a695
                    order_type: MARKET
                    side: BUY
                    instrument_id: LU0274208692
                    instrument_id_type: ISIN
                    currency: EUR
                    quantity: '15'
                  fees:
                    - type: TRANSACTION_FEE_BUY
                      value_type: ABSOLUTE
                      cash_amount: '0.80'
                      currency: EUR
                    - type: TRANSACTION_FEE_SELL
                      value_type: ABSOLUTE
                      cash_amount: '0.95'
                      currency: EUR
                    - type: ANNUAL_AUM_BASED_FEE
                      value_type: RELATIVE
                      bps: '37'
                  inducements:
                    - value_type: ABSOLUTE
                      cash_amount: '0.10'
                      currency: EUR
              nominal-sell-order-ex-ante-cost:
                summary: Nominal sell order ex-ante cost report
                value:
                  type: ORDER_EX_ANTE_COST
                  order:
                    user_id: d1a4be99-8bb6-4e78-b897-8168f6823ab5
                    account_id: c5034305-c441-4711-adbf-93cfbc13a695
                    order_type: MARKET
                    side: SELL
                    instrument_id: LU0274208692
                    instrument_id_type: ISIN
                    currency: EUR
                    cash_amount: '1000.00'
                  fees:
                    - type: TRANSACTION_FEE_BUY
                      value_type: ABSOLUTE
                      cash_amount: '1.00'
                      currency: EUR
                    - type: TRANSACTION_FEE_SELL
                      value_type: ABSOLUTE
                      cash_amount: '0.90'
                      currency: EUR
                    - type: ANNUAL_AUM_BASED_FEE
                      value_type: RELATIVE
                      bps: '10'
      responses:
        '200':
          description: Report
          headers:
            upvest-request-id:
              required: true
              schema:
                type: string
                format: uuid
                example: 169ae4c7-ebd7-4041-94da-25369653eba7
          content:
            application/json:
              schema:
                title: Report - Order ex-ante cost
                type: object
                properties:
                  id:
                    title: Report unique identifier.
                    type: string
                    description: Report unique identifier.
                    format: uuid
                  created_at:
                    type: string
                    format: date-time
                    description: >-
                      Date and time when the resource was created. [RFC
                      3339-5](https://datatracker.ietf.org/doc/html/rfc3339#section-5.6),
                      [ISO8601
                      UTC](https://www.iso.org/iso-8601-date-and-time-format.html)
                  user_id:
                    title: User unique identifier.
                    type: string
                    description: User unique identifier.
                    format: uuid
                  type:
                    type: string
                    default: ORDER_EX_ANTE_COST
                    description: The type of report must be “ORDER_EX_ANTE_COST”.
                  substituted_report_id:
                    oneOf:
                      - type: 'null'
                      - title: Substituted Report unique identifier.
                        type: string
                        description: References report that has been replaced by this one.
                        format: uuid
                  data:
                    title: Report Data - Order ex-ante cost
                    type: object
                    description: Contents of the order ex-ante cost report.
                    properties:
                      holding_period:
                        type: object
                        description: Holding period.
                        properties:
                          unit:
                            type: string
                            description: |-
                              Unit of time. 
                              * YEAR - 
                            enum:
                              - YEAR
                            default: YEAR
                          quantity:
                            description: Quantity of time units.
                            type: integer
                      instrument:
                        type: object
                        description: Instrument details.
                        properties:
                          isin:
                            title: International securities identification number
                            type: string
                            description: >-
                              International securities identification number
                              defined by [ISO
                              6166](https://en.wikipedia.org/wiki/International_Securities_Identification_Number).
                            pattern: ^[A-Z]{2}[A-Z0-9]{9}[0-9]$
                          short_name:
                            description: Instrument short name.
                            type: string
                            maxLength: 100
                      venue:
                        type: object
                        description: Venue details.
                        properties:
                          name:
                            description: Venue name.
                            type: string
                            maxLength: 100
                      account:
                        type: object
                        description: Account details.
                        properties:
                          id:
                            title: Account unique identifier.
                            type: string
                            description: Account unique identifier.
                            format: uuid
                          account_number:
                            type: integer
                            description: >-
                              The serial account number of the account in the
                              account group.
                            minimum: 1
                      account_group:
                        type: object
                        description: Account group details.
                        properties:
                          id:
                            title: Account group unique identifier.
                            type: string
                            description: Account group unique identifier.
                            format: uuid
                          securities_account_number:
                            type: string
                            description: Securities account number.
                            pattern: ^[0-9]{9}$
                      user:
                        type: object
                        description: User details.
                        properties:
                          first_name:
                            type: string
                            maxLength: 100
                            minLength: 2
                            description: First name of the user.
                          last_name:
                            type: string
                            maxLength: 100
                            minLength: 2
                            description: Last name of the user.
                          salutation:
                            type: string
                            description: >-
                              Salutation of the user used in reports and
                              statements.

                              * (empty string) - 

                              * SALUTATION_MALE - 

                              * SALUTATION_FEMALE - 

                              * SALUTATION_FEMALE_MARRIED - 

                              * SALUTATION_DIVERSE - 
                            enum:
                              - ''
                              - SALUTATION_MALE
                              - SALUTATION_FEMALE
                              - SALUTATION_FEMALE_MARRIED
                              - SALUTATION_DIVERSE
                            default: ''
                          title:
                            type: string
                            description: |-
                              Title of the user used in reports and statements.
                              * (empty string) - 
                              * DR - Doctor
                              * PROF - Professor
                              * PROF_DR - 
                              * DIPL_ING - Graduate engineer (Diplom-Ingenieur)
                              * MAGISTER - 
                            enum:
                              - ''
                              - DR
                              - PROF
                              - PROF_DR
                              - DIPL_ING
                              - MAGISTER
                            default: ''
                          address:
                            type: object
                            description: User residential address.
                            properties:
                              address_line1:
                                type: string
                                description: First address line of the address.
                                maxLength: 100
                              address_line2:
                                type: string
                                description: Second address line of the address.
                                maxLength: 100
                              postcode:
                                title: Postal code
                                type: string
                                description: Postal code (postcode, PIN or ZIP code)
                                pattern: ^[a-zA-Z0-9][a-zA-Z0-9\s\-]{0,8}[a-zA-Z0-9]?$
                              country:
                                description: >-
                                  Country code. [ISO 3166 alpha-2
                                  Codes](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2).
                                type: string
                                pattern: ^[A-Z]{2}$
                              state:
                                description: >-
                                  State, province, county. [ISO 3166 alpha-2
                                  Codes](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2).
                                type: string
                                maxLength: 50
                              city:
                                title: City name
                                type: string
                                minLength: 1
                                maxLength: 85
                      order:
                        type: object
                        description: Order details.
                        properties:
                          user_id:
                            type: string
                            format: uuid
                            description: The ID of the user.
                          account_id:
                            type: string
                            format: uuid
                            description: The ID of the account that owns the order.
                          cash_amount:
                            allOf:
                              - type: string
                                pattern: ^[0-9]{1,9}(\.[0-9]{2})?$
                              - description: Cash amount for a nominal order.
                          currency:
                            allOf:
                              - type: string
                                description: >-
                                  Alphabetic three-letter [ISO
                                  4217](https://en.wikipedia.org/wiki/ISO_4217)
                                  currency code.

                                  * EUR - Euro
                                enum:
                                  - EUR
                                default: EUR
                              - description: The currency for the order.
                          side:
                            type: string
                            description: |-
                              Side of the order.
                              * BUY - 
                              * SELL - 
                            enum:
                              - BUY
                              - SELL
                          instrument_id:
                            title: International securities identification number
                            type: string
                            description: >-
                              International securities identification number
                              defined by [ISO
                              6166](https://en.wikipedia.org/wiki/International_Securities_Identification_Number).
                            pattern: ^[A-Z]{2}[A-Z0-9]{9}[0-9]$
                          instrument_id_type:
                            description: |-
                              The type of the ID used in the request.
                              * ISIN - 
                            enum:
                              - ISIN
                            default: ISIN
                            type: string
                          order_type:
                            type: string
                            description: |-
                              Type of the order.
                              * MARKET - 
                              * LIMIT - 
                              * STOP - 
                            enum:
                              - MARKET
                              - LIMIT
                              - STOP
                          quantity:
                            allOf:
                              - type: string
                                pattern: ^[0-9]{0,63}(\.[0-9]{1,27})?$
                              - description: Quantity of securities for the order.
                          limit_price:
                            allOf:
                              - type: string
                                pattern: ^[0-9]{0,63}(\.[0-9]{1,27})?$
                              - description: >-
                                  The limit price for orders of the type
                                  'limit'.
                          stop_price:
                            allOf:
                              - type: string
                                pattern: ^[0-9]{0,63}(\.[0-9]{1,27})?$
                              - description: The stop price for orders of the type 'stop'.
                          price:
                            allOf:
                              - type: string
                                pattern: ^[0-9]{0,63}(\.[0-9]{1,27})?$
                              - description: >-
                                  The estimated price for the order. In case of
                                  LIMIT or STOP order provided 'limit'/'stop'
                                  price will be used.
                      return_impact:
                        type: object
                        description: Return impact.
                        properties:
                          year_one:
                            title: Cost
                            type: object
                            properties:
                              cash_amount:
                                type: string
                                pattern: ^[0-9]{1,9}(\.[0-9]{2})?$
                              currency:
                                type: string
                                description: >-
                                  Alphabetic three-letter [ISO
                                  4217](https://en.wikipedia.org/wiki/ISO_4217)
                                  currency code.

                                  * EUR - Euro
                                enum:
                                  - EUR
                                default: EUR
                              as_percentage:
                                allOf:
                                  - type: string
                                    pattern: ^-?[0-9]{0,63}(\.[0-9]{1,27})?$
                                  - description: >-
                                      The cost value represented as a
                                      percentage.
                            additionalProperties: false
                          year_two:
                            title: Cost
                            type: object
                            properties:
                              cash_amount:
                                type: string
                                pattern: ^[0-9]{1,9}(\.[0-9]{2})?$
                              currency:
                                type: string
                                description: >-
                                  Alphabetic three-letter [ISO
                                  4217](https://en.wikipedia.org/wiki/ISO_4217)
                                  currency code.

                                  * EUR - Euro
                                enum:
                                  - EUR
                                default: EUR
                              as_percentage:
                                allOf:
                                  - type: string
                                    pattern: ^-?[0-9]{0,63}(\.[0-9]{1,27})?$
                                  - description: >-
                                      The cost value represented as a
                                      percentage.
                            additionalProperties: false
                          year_three:
                            title: Cost
                            type: object
                            properties:
                              cash_amount:
                                type: string
                                pattern: ^[0-9]{1,9}(\.[0-9]{2})?$
                              currency:
                                type: string
                                description: >-
                                  Alphabetic three-letter [ISO
                                  4217](https://en.wikipedia.org/wiki/ISO_4217)
                                  currency code.

                                  * EUR - Euro
                                enum:
                                  - EUR
                                default: EUR
                              as_percentage:
                                allOf:
                                  - type: string
                                    pattern: ^-?[0-9]{0,63}(\.[0-9]{1,27})?$
                                  - description: >-
                                      The cost value represented as a
                                      percentage.
                            additionalProperties: false
                      total_cost:
                        title: Order ex-ante aggregated cost
                        type: object
                        description: >-
                          Aggregated totals of product costs, service costs and
                          third party payments.
                        properties:
                          product:
                            title: Cost
                            type: object
                            properties:
                              cash_amount:
                                type: string
                                pattern: ^[0-9]{1,9}(\.[0-9]{2})?$
                              currency:
                                type: string
                                description: >-
                                  Alphabetic three-letter [ISO
                                  4217](https://en.wikipedia.org/wiki/ISO_4217)
                                  currency code.

                                  * EUR - Euro
                                enum:
                                  - EUR
                                default: EUR
                              as_percentage:
                                allOf:
                                  - type: string
                                    pattern: ^-?[0-9]{0,63}(\.[0-9]{1,27})?$
                                  - description: >-
                                      The cost value represented as a
                                      percentage.
                            additionalProperties: false
                          service:
                            title: Cost
                            type: object
                            properties:
                              cash_amount:
                                type: string
                                pattern: ^[0-9]{1,9}(\.[0-9]{2})?$
                              currency:
                                type: string
                                description: >-
                                  Alphabetic three-letter [ISO
                                  4217](https://en.wikipedia.org/wiki/ISO_4217)
                                  currency code.

                                  * EUR - Euro
                                enum:
                                  - EUR
                                default: EUR
                              as_percentage:
                                allOf:
                                  - type: string
                                    pattern: ^-?[0-9]{0,63}(\.[0-9]{1,27})?$
                                  - description: >-
                                      The cost value represented as a
                                      percentage.
                            additionalProperties: false
                          third_party:
                            title: Cost
                            type: object
                            properties:
                              cash_amount:
                                type: string
                                pattern: ^[0-9]{1,9}(\.[0-9]{2})?$
                              currency:
                                type: string
                                description: >-
                                  Alphabetic three-letter [ISO
                                  4217](https://en.wikipedia.org/wiki/ISO_4217)
                                  currency code.

                                  * EUR - Euro
                                enum:
                                  - EUR
                                default: EUR
                              as_percentage:
                                allOf:
                                  - type: string
                                    pattern: ^-?[0-9]{0,63}(\.[0-9]{1,27})?$
                                  - description: >-
                                      The cost value represented as a
                                      percentage.
                            additionalProperties: false
                          total:
                            title: Cost
                            type: object
                            properties:
                              cash_amount:
                                type: string
                                pattern: ^[0-9]{1,9}(\.[0-9]{2})?$
                              currency:
                                type: string
                                description: >-
                                  Alphabetic three-letter [ISO
                                  4217](https://en.wikipedia.org/wiki/ISO_4217)
                                  currency code.

                                  * EUR - Euro
                                enum:
                                  - EUR
                                default: EUR
                              as_percentage:
                                allOf:
                                  - type: string
                                    pattern: ^-?[0-9]{0,63}(\.[0-9]{1,27})?$
                                  - description: >-
                                      The cost value represented as a
                                      percentage.
                            additionalProperties: false
                        additionalProperties: false
                      product_cost:
                        title: Order ex-ante product cost
                        type: object
                        description: >-
                          All costs and associated charges related to the
                          financial instrument.
                        properties:
                          one_off:
                            title: Cost
                            type: object
                            properties:
                              cash_amount:
                                type: string
                                pattern: ^[0-9]{1,9}(\.[0-9]{2})?$
                              currency:
                                type: string
                                description: >-
                                  Alphabetic three-letter [ISO
                                  4217](https://en.wikipedia.org/wiki/ISO_4217)
                                  currency code.

                                  * EUR - Euro
                                enum:
                                  - EUR
                                default: EUR
                              as_percentage:
                                allOf:
                                  - type: string
                                    pattern: ^-?[0-9]{0,63}(\.[0-9]{1,27})?$
                                  - description: >-
                                      The cost value represented as a
                                      percentage.
                            additionalProperties: false
                          ongoing:
                            title: Cost
                            type: object
                            properties:
                              cash_amount:
                                type: string
                                pattern: ^[0-9]{1,9}(\.[0-9]{2})?$
                              currency:
                                type: string
                                description: >-
                                  Alphabetic three-letter [ISO
                                  4217](https://en.wikipedia.org/wiki/ISO_4217)
                                  currency code.

                                  * EUR - Euro
                                enum:
                                  - EUR
                                default: EUR
                              as_percentage:
                                allOf:
                                  - type: string
                                    pattern: ^-?[0-9]{0,63}(\.[0-9]{1,27})?$
                                  - description: >-
                                      The cost value represented as a
                                      percentage.
                            additionalProperties: false
                          transaction:
                            title: Cost
                            type: object
                            properties:
                              cash_amount:
                                type: string
                                pattern: ^[0-9]{1,9}(\.[0-9]{2})?$
                              currency:
                                type: string
                                description: >-
                                  Alphabetic three-letter [ISO
                                  4217](https://en.wikipedia.org/wiki/ISO_4217)
                                  currency code.

                                  * EUR - Euro
                                enum:
                                  - EUR
                                default: EUR
                              as_percentage:
                                allOf:
                                  - type: string
                                    pattern: ^-?[0-9]{0,63}(\.[0-9]{1,27})?$
                                  - description: >-
                                      The cost value represented as a
                                      percentage.
                            additionalProperties: false
                          incidental:
                            title: Cost
                            type: object
                            properties:
                              cash_amount:
                                type: string
                                pattern: ^[0-9]{1,9}(\.[0-9]{2})?$
                              currency:
                                type: string
                                description: >-
                                  Alphabetic three-letter [ISO
                                  4217](https://en.wikipedia.org/wiki/ISO_4217)
                                  currency code.

                                  * EUR - Euro
                                enum:
                                  - EUR
                                default: EUR
                              as_percentage:
                                allOf:
                                  - type: string
                                    pattern: ^-?[0-9]{0,63}(\.[0-9]{1,27})?$
                                  - description: >-
                                      The cost value represented as a
                                      percentage.
                            additionalProperties: false
                          total:
                            title: Cost
                            type: object
                            properties:
                              cash_amount:
                                type: string
                                pattern: ^[0-9]{1,9}(\.[0-9]{2})?$
                              currency:
                                type: string
                                description: >-
                                  Alphabetic three-letter [ISO
                                  4217](https://en.wikipedia.org/wiki/ISO_4217)
                                  currency code.

                                  * EUR - Euro
                                enum:
                                  - EUR
                                default: EUR
                              as_percentage:
                                allOf:
                                  - type: string
                                    pattern: ^-?[0-9]{0,63}(\.[0-9]{1,27})?$
                                  - description: >-
                                      The cost value represented as a
                                      percentage.
                            additionalProperties: false
                        additionalProperties: false
                      service_cost:
                        title: Order ex-ante service cost
                        type: object
                        description: >-
                          All costs and associated charges related to the
                          investment service(s) and/or ancillary services.
                        properties:
                          one_off:
                            title: Cost
                            type: object
                            properties:
                              cash_amount:
                                type: string
                                pattern: ^[0-9]{1,9}(\.[0-9]{2})?$
                              currency:
                                type: string
                                description: >-
                                  Alphabetic three-letter [ISO
                                  4217](https://en.wikipedia.org/wiki/ISO_4217)
                                  currency code.

                                  * EUR - Euro
                                enum:
                                  - EUR
                                default: EUR
                              as_percentage:
                                allOf:
                                  - type: string
                                    pattern: ^-?[0-9]{0,63}(\.[0-9]{1,27})?$
                                  - description: >-
                                      The cost value represented as a
                                      percentage.
                            additionalProperties: false
                          ongoing:
                            title: Cost
                            type: object
                            properties:
                              cash_amount:
                                type: string
                                pattern: ^[0-9]{1,9}(\.[0-9]{2})?$
                              currency:
                                type: string
                                description: >-
                                  Alphabetic three-letter [ISO
                                  4217](https://en.wikipedia.org/wiki/ISO_4217)
                                  currency code.

                                  * EUR - Euro
                                enum:
                                  - EUR
                                default: EUR
                              as_percentage:
                                allOf:
                                  - type: string
                                    pattern: ^-?[0-9]{0,63}(\.[0-9]{1,27})?$
                                  - description: >-
                                      The cost value represented as a
                                      percentage.
                            additionalProperties: false
                          transaction:
                            title: Cost
                            type: object
                            properties:
                              cash_amount:
                                type: string
                                pattern: ^[0-9]{1,9}(\.[0-9]{2})?$
                              currency:
                                type: string
                                description: >-
                                  Alphabetic three-letter [ISO
                                  4217](https://en.wikipedia.org/wiki/ISO_4217)
                                  currency code.

                                  * EUR - Euro
                                enum:
                                  - EUR
                                default: EUR
                              as_percentage:
                                allOf:
                                  - type: string
                                    pattern: ^-?[0-9]{0,63}(\.[0-9]{1,27})?$
                                  - description: >-
                                      The cost value represented as a
                                      percentage.
                            additionalProperties: false
                          ancillary:
                            title: Cost
                            type: object
                            properties:
                              cash_amount:
                                type: string
                                pattern: ^[0-9]{1,9}(\.[0-9]{2})?$
                              currency:
                                type: string
                                description: >-
                                  Alphabetic three-letter [ISO
                                  4217](https://en.wikipedia.org/wiki/ISO_4217)
                                  currency code.

                                  * EUR - Euro
                                enum:
                                  - EUR
                                default: EUR
                              as_percentage:
                                allOf:
                                  - type: string
                                    pattern: ^-?[0-9]{0,63}(\.[0-9]{1,27})?$
                                  - description: >-
                                      The cost value represented as a
                                      percentage.
                            additionalProperties: false
                          incidental:
                            title: Cost
                            type: object
                            properties:
                              cash_amount:
                                type: string
                                pattern: ^[0-9]{1,9}(\.[0-9]{2})?$
                              currency:
                                type: string
                                description: >-
                                  Alphabetic three-letter [ISO
                                  4217](https://en.wikipedia.org/wiki/ISO_4217)
                                  currency code.

                                  * EUR - Euro
                                enum:
                                  - EUR
                                default: EUR
                              as_percentage:
                                allOf:
                                  - type: string
                                    pattern: ^-?[0-9]{0,63}(\.[0-9]{1,27})?$
                                  - description: >-
                                      The cost value represented as a
                                      percentage.
                            additionalProperties: false
                          total:
                            title: Cost
                            type: object
                            properties:
                              cash_amount:
                                type: string
                                pattern: ^[0-9]{1,9}(\.[0-9]{2})?$
                              currency:
                                type: string
                                description: >-
                                  Alphabetic three-letter [ISO
                                  4217](https://en.wikipedia.org/wiki/ISO_4217)
                                  currency code.

                                  * EUR - Euro
                                enum:
                                  - EUR
                                default: EUR
                              as_percentage:
                                allOf:
                                  - type: string
                                    pattern: ^-?[0-9]{0,63}(\.[0-9]{1,27})?$
                                  - description: >-
                                      The cost value represented as a
                                      percentage.
                            additionalProperties: false
                        additionalProperties: false
                      third_party_payments:
                        type: object
                        description: >-
                          Third party payments associated with the investment
                          service.
                        properties:
                          total:
                            title: Cost
                            type: object
                            properties:
                              cash_amount:
                                type: string
                                pattern: ^[0-9]{1,9}(\.[0-9]{2})?$
                              currency:
                                type: string
                                description: >-
                                  Alphabetic three-letter [ISO
                                  4217](https://en.wikipedia.org/wiki/ISO_4217)
                                  currency code.

                                  * EUR - Euro
                                enum:
                                  - EUR
                                default: EUR
                              as_percentage:
                                allOf:
                                  - type: string
                                    pattern: ^-?[0-9]{0,63}(\.[0-9]{1,27})?$
                                  - description: >-
                                      The cost value represented as a
                                      percentage.
                            additionalProperties: false
                          received_by_client:
                            title: Cost
                            type: object
                            properties:
                              cash_amount:
                                type: string
                                pattern: ^[0-9]{1,9}(\.[0-9]{2})?$
                              currency:
                                type: string
                                description: >-
                                  Alphabetic three-letter [ISO
                                  4217](https://en.wikipedia.org/wiki/ISO_4217)
                                  currency code.

                                  * EUR - Euro
                                enum:
                                  - EUR
                                default: EUR
                              as_percentage:
                                allOf:
                                  - type: string
                                    pattern: ^-?[0-9]{0,63}(\.[0-9]{1,27})?$
                                  - description: >-
                                      The cost value represented as a
                                      percentage.
                            additionalProperties: false
                          received_by_upvest:
                            title: Cost
                            type: object
                            properties:
                              cash_amount:
                                type: string
                                pattern: ^[0-9]{1,9}(\.[0-9]{2})?$
                              currency:
                                type: string
                                description: >-
                                  Alphabetic three-letter [ISO
                                  4217](https://en.wikipedia.org/wiki/ISO_4217)
                                  currency code.

                                  * EUR - Euro
                                enum:
                                  - EUR
                                default: EUR
                              as_percentage:
                                allOf:
                                  - type: string
                                    pattern: ^-?[0-9]{0,63}(\.[0-9]{1,27})?$
                                  - description: >-
                                      The cost value represented as a
                                      percentage.
                            additionalProperties: false
                        additionalProperties: false
                    additionalProperties: false
                required:
                  - id
                  - user_id
                  - created_at
                  - type
                  - substituted_report_id
                additionalProperties: false
              examples:
                order-ex-ante-cost:
                  summary: Order ex-ante cost report
                  value:
                    id: b96b1ee7-d491-43eb-b5e4-4833af9c9c2f
                    created_at: '2023-08-24T14:15:22Z'
                    user_id: d1a4be99-8bb6-4e78-b897-8168f6823ab5
                    type: ORDER_EX_ANTE_COST
                    substituted_report_id: null
                    data:
                      account:
                        id: c5034305-c441-4711-adbf-93cfbc13a695
                        account_number: 1
                      account_group:
                        id: 9d95820d-4333-46b6-98de-04ab7512e76f
                        securities_account_number: '123456789'
                      user:
                        salutation: SALUTATION_MALE
                        title: DR
                        first_name: Karl
                        last_name: Schmidt
                        address:
                          address_line1: Rosenweg 221
                          address_line2: apt. 33
                          postcode: '45678'
                          city: Berlin
                          country: DE
                      instrument:
                        isin: LU0274208692
                        short_name: XTR.MSCI WORLD SWAP 1C
                      venue:
                        name: Tradegate
                      order:
                        user_id: d1a4be99-8bb6-4e78-b897-8168f6823ab5
                        instrument_id: LU0274208692
                        instrument_id_type: ISIN
                        account_id: c5034305-c441-4711-adbf-93cfbc13a695
                        order_type: MARKET
                        side: BUY
                        quantity: '15'
                        cash_amount: '1220.85'
                        currency: EUR
                        price: '81.39'
                      holding_period:
                        unit: YEAR
                        quantity: 3
                      total_cost:
                        product:
                          cash_amount: '17.48'
                          currency: EUR
                          as_percentage: '1.43'
                        service:
                          cash_amount: '6.88'
                          currency: EUR
                          as_percentage: '0.56'
                        third_party:
                          cash_amount: '0.70'
                          currency: EUR
                          as_percentage: '0.06'
                        total:
                          cash_amount: '25.06'
                          currency: EUR
                          as_percentage: '2.05'
                      product_cost:
                        one_off:
                          cash_amount: '0.20'
                          currency: EUR
                          as_percentage: '0.02'
                        ongoing:
                          cash_amount: '16.48'
                          currency: EUR
                          as_percentage: '1.35'
                        transaction:
                          cash_amount: '0.80'
                          currency: EUR
                          as_percentage: '0.07'
                        incidental:
                          cash_amount: '0.00'
                          currency: EUR
                          as_percentage: '0.00'
                        total:
                          cash_amount: '17.48'
                          currency: EUR
                          as_percentage: '1.43'
                      service_cost:
                        one_off:
                          cash_amount: '0.49'
                          currency: EUR
                          as_percentage: '0.04'
                        ongoing:
                          cash_amount: '4.39'
                          currency: EUR
                          as_percentage: '0.36'
                        transaction:
                          cash_amount: '2.00'
                          currency: EUR
                          as_percentage: '0.16'
                        ancillary:
                          cash_amount: '0.00'
                          currency: EUR
                          as_percentage: '0.00'
                        incidental:
                          cash_amount: '0.00'
                          currency: EUR
                          as_percentage: '0.00'
                        total:
                          cash_amount: '6.88'
                          currency: EUR
                          as_percentage: '0.56'
                      third_party_payments:
                        total:
                          cash_amount: '0.70'
                          currency: EUR
                          as_percentage: '0.06'
                        received_by_client:
                          cash_amount: '0.35'
                          currency: EUR
                          as_percentage: '0.03'
                        received_by_upvest:
                          cash_amount: '0.35'
                          currency: EUR
                          as_percentage: '0.03'
                      return_impact:
                        year_one:
                          cash_amount: '9.05'
                          currency: EUR
                          as_percentage: '0.74'
                        year_two:
                          cash_amount: '6.96'
                          currency: EUR
                          as_percentage: '0.57'
                        year_three:
                          cash_amount: '8.36'
                          currency: EUR
                          as_percentage: '0.68'
        '400':
          description: Bad Request. The incoming request had a malformed parameter/object.
          headers:
            upvest-request-id:
              required: true
              schema:
                type: string
                format: uuid
                example: 169ae4c7-ebd7-4041-94da-25369653eba7
          content:
            application/problem+json:
              schema:
                title: Error
                type: object
                description: ''
                properties:
                  type:
                    type: string
                    description: URL to a document describing the error condition.
                  status:
                    type: integer
                    description: >-
                      Transmission of the HTTP status code so that all
                      information can be found in one place, but also to correct
                      changes in the status code due to the use of proxy
                      servers.
                  title:
                    type: string
                    description: >-
                      A short, human-readable title for the general error type;
                      the title should not change for given types.
                  detail:
                    type: string
                    description: A human-readable description of the specific error.
                  instance:
                    type: string
                    description: >-
                      This optional key may be present, with a unique URI for
                      the specific error; this will often point to an error log
                      for that specific response.
                  request_id:
                    type: string
                    description: Correlation ID for the original request.
                required:
                  - type
                  - status
                additionalProperties: false
              example:
                status: 400
                type: bad_request
        '401':
          description: Unauthorized. The caller has not been authenticated.
          headers:
            upvest-request-id:
              required: true
              schema:
                type: string
                format: uuid
                example: 169ae4c7-ebd7-4041-94da-25369653eba7
          content:
            application/problem+json:
              schema:
                title: Error
                type: object
                description: ''
                properties:
                  type:
                    type: string
                    description: URL to a document describing the error condition.
                  status:
                    type: integer
                    description: >-
                      Transmission of the HTTP status code so that all
                      information can be found in one place, but also to correct
                      changes in the status code due to the use of proxy
                      servers.
                  title:
                    type: string
                    description: >-
                      A short, human-readable title for the general error type;
                      the title should not change for given types.
                  detail:
                    type: string
                    description: A human-readable description of the specific error.
                  instance:
                    type: string
                    description: >-
                      This optional key may be present, with a unique URI for
                      the specific error; this will often point to an error log
                      for that specific response.
                  request_id:
                    type: string
                    description: Correlation ID for the original request.
                required:
                  - type
                  - status
                additionalProperties: false
              example:
                status: 401
                type: unauthorized
        '403':
          description: >-
            Forbidden. The caller has been authenticated but is not allowed to
            take the requested action.
          headers:
            upvest-request-id:
              required: true
              schema:
                type: string
                format: uuid
                example: 169ae4c7-ebd7-4041-94da-25369653eba7
          content:
            application/problem+json:
              schema:
                title: Error
                type: object
                description: ''
                properties:
                  type:
                    type: string
                    description: URL to a document describing the error condition.
                  status:
                    type: integer
                    description: >-
                      Transmission of the HTTP status code so that all
                      information can be found in one place, but also to correct
                      changes in the status code due to the use of proxy
                      servers.
                  title:
                    type: string
                    description: >-
                      A short, human-readable title for the general error type;
                      the title should not change for given types.
                  detail:
                    type: string
                    description: A human-readable description of the specific error.
                  instance:
                    type: string
                    description: >-
                      This optional key may be present, with a unique URI for
                      the specific error; this will often point to an error log
                      for that specific response.
                  request_id:
                    type: string
                    description: Correlation ID for the original request.
                required:
                  - type
                  - status
                additionalProperties: false
              example:
                status: 403
                type: forbidden
        '404':
          description: Not Found. The requested resource could not be found.
          headers:
            upvest-request-id:
              required: true
              schema:
                type: string
                format: uuid
                example: 169ae4c7-ebd7-4041-94da-25369653eba7
          content:
            application/problem+json:
              schema:
                title: Error
                type: object
                description: ''
                properties:
                  type:
                    type: string
                    description: URL to a document describing the error condition.
                  status:
                    type: integer
                    description: >-
                      Transmission of the HTTP status code so that all
                      information can be found in one place, but also to correct
                      changes in the status code due to the use of proxy
                      servers.
                  title:
                    type: string
                    description: >-
                      A short, human-readable title for the general error type;
                      the title should not change for given types.
                  detail:
                    type: string
                    description: A human-readable description of the specific error.
                  instance:
                    type: string
                    description: >-
                      This optional key may be present, with a unique URI for
                      the specific error; this will often point to an error log
                      for that specific response.
                  request_id:
                    type: string
                    description: Correlation ID for the original request.
                required:
                  - type
                  - status
                additionalProperties: false
              example:
                status: 404
                type: not_found
        '406':
          description: >-
            Not Acceptable. The resource does not have a current representation
            that would be acceptable to the user agent. "Accept" header defined
            unsupported value.
          headers:
            upvest-request-id:
              required: true
              schema:
                type: string
                format: uuid
                example: 169ae4c7-ebd7-4041-94da-25369653eba7
          content:
            application/problem+json:
              schema:
                title: Error
                type: object
                description: ''
                properties:
                  type:
                    type: string
                    description: URL to a document describing the error condition.
                  status:
                    type: integer
                    description: >-
                      Transmission of the HTTP status code so that all
                      information can be found in one place, but also to correct
                      changes in the status code due to the use of proxy
                      servers.
                  title:
                    type: string
                    description: >-
                      A short, human-readable title for the general error type;
                      the title should not change for given types.
                  detail:
                    type: string
                    description: A human-readable description of the specific error.
                  instance:
                    type: string
                    description: >-
                      This optional key may be present, with a unique URI for
                      the specific error; this will often point to an error log
                      for that specific response.
                  request_id:
                    type: string
                    description: Correlation ID for the original request.
                required:
                  - type
                  - status
                additionalProperties: false
              example:
                status: 406
                type: not_acceptable
        '429':
          description: >-
            Too Many Requests. The caller has exceeded their quota for the time
            period and has been throttled.
          headers:
            upvest-request-id:
              required: true
              schema:
                type: string
                format: uuid
                example: 169ae4c7-ebd7-4041-94da-25369653eba7
          content:
            application/problem+json:
              schema:
                title: Error
                type: object
                description: ''
                properties:
                  type:
                    type: string
                    description: URL to a document describing the error condition.
                  status:
                    type: integer
                    description: >-
                      Transmission of the HTTP status code so that all
                      information can be found in one place, but also to correct
                      changes in the status code due to the use of proxy
                      servers.
                  title:
                    type: string
                    description: >-
                      A short, human-readable title for the general error type;
                      the title should not change for given types.
                  detail:
                    type: string
                    description: A human-readable description of the specific error.
                  instance:
                    type: string
                    description: >-
                      This optional key may be present, with a unique URI for
                      the specific error; this will often point to an error log
                      for that specific response.
                  request_id:
                    type: string
                    description: Correlation ID for the original request.
                required:
                  - type
                  - status
                additionalProperties: false
              example:
                status: 429
                type: too_many_requests
        '500':
          description: Internal Server Error. The service encountered an unexpected error.
          headers:
            upvest-request-id:
              required: true
              schema:
                type: string
                format: uuid
                example: 169ae4c7-ebd7-4041-94da-25369653eba7
          content:
            application/problem+json:
              schema:
                title: Error
                type: object
                description: ''
                properties:
                  type:
                    type: string
                    description: URL to a document describing the error condition.
                  status:
                    type: integer
                    description: >-
                      Transmission of the HTTP status code so that all
                      information can be found in one place, but also to correct
                      changes in the status code due to the use of proxy
                      servers.
                  title:
                    type: string
                    description: >-
                      A short, human-readable title for the general error type;
                      the title should not change for given types.
                  detail:
                    type: string
                    description: A human-readable description of the specific error.
                  instance:
                    type: string
                    description: >-
                      This optional key may be present, with a unique URI for
                      the specific error; this will often point to an error log
                      for that specific response.
                  request_id:
                    type: string
                    description: Correlation ID for the original request.
                required:
                  - type
                  - status
                additionalProperties: false
              example:
                status: 500
                type: internal_server_error
        '503':
          description: >-
            Service Unavailable. The service handling for this request cannot be
            reached at this time.
          headers:
            upvest-request-id:
              required: true
              schema:
                type: string
                format: uuid
                example: 169ae4c7-ebd7-4041-94da-25369653eba7
          content:
            application/problem+json:
              schema:
                title: Error
                type: object
                description: ''
                properties:
                  type:
                    type: string
                    description: URL to a document describing the error condition.
                  status:
                    type: integer
                    description: >-
                      Transmission of the HTTP status code so that all
                      information can be found in one place, but also to correct
                      changes in the status code due to the use of proxy
                      servers.
                  title:
                    type: string
                    description: >-
                      A short, human-readable title for the general error type;
                      the title should not change for given types.
                  detail:
                    type: string
                    description: A human-readable description of the specific error.
                  instance:
                    type: string
                    description: >-
                      This optional key may be present, with a unique URI for
                      the specific error; this will often point to an error log
                      for that specific response.
                  request_id:
                    type: string
                    description: Correlation ID for the original request.
                required:
                  - type
                  - status
                additionalProperties: false
              example:
                status: 503
                type: method_not_allowed
        '504':
          description: >-
            Gateway Timeout. The service gateway has reached its internal
            timeout.
          headers:
            upvest-request-id:
              required: true
              schema:
                type: string
                format: uuid
                example: 169ae4c7-ebd7-4041-94da-25369653eba7
          content:
            application/problem+json:
              schema:
                title: Error
                type: object
                description: ''
                properties:
                  type:
                    type: string
                    description: URL to a document describing the error condition.
                  status:
                    type: integer
                    description: >-
                      Transmission of the HTTP status code so that all
                      information can be found in one place, but also to correct
                      changes in the status code due to the use of proxy
                      servers.
                  title:
                    type: string
                    description: >-
                      A short, human-readable title for the general error type;
                      the title should not change for given types.
                  detail:
                    type: string
                    description: A human-readable description of the specific error.
                  instance:
                    type: string
                    description: >-
                      This optional key may be present, with a unique URI for
                      the specific error; this will often point to an error log
                      for that specific response.
                  request_id:
                    type: string
                    description: Correlation ID for the original request.
                required:
                  - type
                  - status
                additionalProperties: false
              example:
                status: 504
                type: gateway_timeout
  /reports/{report_id}:
    parameters:
      - name: report_id
        in: path
        required: true
        schema:
          title: Report unique identifier.
          type: string
          description: Report unique identifier.
          format: uuid
      - name: upvest-client-id
        in: header
        description: Tenant Client ID
        required: true
        schema:
          type: string
          format: uuid
          example: ebabcf4d-61c3-4942-875c-e265a7c2d062
      - name: authorization
        in: header
        description: |
          Bearer (access) token from the OAuth flow with correct scopes.
          https://datatracker.ietf.org/doc/html/rfc6750
        required: true
        schema:
          type: string
          pattern: ^Bearer [a-zA-Z0-9\-\._~+/]*=*
          example: Bearer c2VjcmV0Cg==
      - name: signature
        in: header
        required: true
        schema:
          type: string
        description: >-
          https://tools.ietf.org/id/draft-ietf-httpbis-message-signatures-01.html#name-the-signature-http-header
      - name: signature-input
        in: header
        required: true
        schema:
          type: string
        description: >-
          https://tools.ietf.org/id/draft-ietf-httpbis-message-signatures-01.html#name-the-signature-input-http-he
      - name: upvest-api-version
        in: header
        required: false
        schema:
          type: string
          enum:
            - '1'
          default: '1'
          example: '1'
        description: 'Upvest API version (Note: Do not include quotation marks)'
    get:
      operationId: retrieve_report
      summary: Retrieve a user report
      description: Retrieve a user report
      tags:
        - Reports
      security:
        - oauth-client-credentials:
            - reports:read
            - reports:admin
      parameters:
        - name: accept
          in: header
          required: false
          schema:
            type: string
            enum:
              - application/json
              - application/pdf
            description: Report format
            default: application/json
          description: Report format
      responses:
        '200':
          description: Report
          headers:
            upvest-request-id:
              required: true
              schema:
                type: string
                format: uuid
                example: 169ae4c7-ebd7-4041-94da-25369653eba7
          content:
            application/json:
              schema:
                title: Report
                anyOf:
                  - title: Report
                    type: object
                    properties:
                      id:
                        title: Report unique identifier.
                        type: string
                        description: Report unique identifier.
                        format: uuid
                      created_at:
                        type: string
                        format: date-time
                        description: >-
                          Date and time when the resource was created. [RFC
                          3339-5](https://datatracker.ietf.org/doc/html/rfc3339#section-5.6),
                          [ISO8601
                          UTC](https://www.iso.org/iso-8601-date-and-time-format.html)
                      user_id:
                        title: User unique identifier.
                        type: string
                        description: User unique identifier.
                        format: uuid
                      type:
                        title: Report type
                        description: >-
                          Report type

                          * ACCOUNT_CLOSING - Securities account closure

                          * ACCOUNT_OPENING - Securities account opening

                          * AD_HOC_ACCOUNT_STATEMENT - Ad hoc account statement

                          * ANNUAL_ACCOUNT_STATEMENT - Annual account statement

                          * ANNUAL_INCOME_STATEMENT - Annual tax income
                          statement ("Erträgnisaufstellung")

                          * ANNUAL_TAX_STATEMENT - Annual tax reporting

                          * BANK_ACCOUNT_CONNECTED - Connect reference bank
                          account

                          * BUY_ORDER - Buy order

                          * CANCELLED_ORDER - Cancelled buy or sell order (not
                          yet executed, user cancels or trading venue cancelled)

                          * CORPORATE_ACTION_CASH_TRANSACTION - cash transaction
                          document (after corporate action)

                          * CORPORATE_ACTION_SECURITY_TRANSACTION - security
                          transaction document (after corporate action)

                          * DIRECT_DEBIT_MANDATE - Creation of SEPA direct debit
                          mandate

                          * EX_POST_COST - Ex-post cost report

                          * FUND_COMMUNICATION - Generic fund communication

                          * GENERAL_MEETING_NOTIFICATION - General meeting
                          notification

                          * GENERIC_COMMUNICATION - Generic communication

                          * INCOME_DISTRIBUTION - Income distribution report

                          * INCOME_REINVESTMENT - Reinvestment billing report
                          (accumulating funds)

                          * MONTHLY_BILLING_STATEMENT - Monthly billing
                          activities statement

                          * QUARTERLY_ACCOUNT_STATEMENT - Quarterly account
                          statement

                          * REVOKED_ORDER - Revoked buy or sell order ("Storno")

                          * SECURITIES_TRANSFER_INCOMING - Securities are
                          transferred in

                          * SECURITIES_TRANSFER_OUTGOING - Securities are being
                          transferred out

                          * SELL_ORDER - Sell order

                          * TAX_EXEMPTION_CREATION - Creation of exemption order
                          ("Freistellungsauftrag")

                          * TAX_PAYMENT - Tax payment document

                          * TAX_PREPAYMENT_DE - German tax prepayment
                          (Vorabpauschale)

                          * TAX_REFUND - Tax refund document (after tax
                          optimization)
                        type: string
                        enum:
                          - ACCOUNT_CLOSING
                          - ACCOUNT_OPENING
                          - AD_HOC_ACCOUNT_STATEMENT
                          - ANNUAL_ACCOUNT_STATEMENT
                          - ANNUAL_INCOME_STATEMENT
                          - ANNUAL_TAX_STATEMENT
                          - BANK_ACCOUNT_CONNECTED
                          - BUY_ORDER
                          - CANCELLED_ORDER
                          - CORPORATE_ACTION_CASH_TRANSACTION
                          - CORPORATE_ACTION_SECURITY_TRANSACTION
                          - DIRECT_DEBIT_MANDATE
                          - EX_POST_COST
                          - FUND_COMMUNICATION
                          - GENERAL_MEETING_NOTIFICATION
                          - GENERIC_COMMUNICATION
                          - INCOME_DISTRIBUTION
                          - INCOME_REINVESTMENT
                          - MONTHLY_BILLING_STATEMENT
                          - QUARTERLY_ACCOUNT_STATEMENT
                          - REVOKED_ORDER
                          - SECURITIES_TRANSFER_INCOMING
                          - SECURITIES_TRANSFER_OUTGOING
                          - SELL_ORDER
                          - TAX_EXEMPTION_CREATION
                          - TAX_PAYMENT
                          - TAX_PREPAYMENT_DE
                          - TAX_REFUND
                      substituted_report_id:
                        oneOf:
                          - type: 'null'
                          - title: Substituted Report unique identifier.
                            type: string
                            description: >-
                              References report that has been replaced by this
                              one.
                            format: uuid
                      data:
                        title: Report Data
                        type: object
                        description: Contents of the report.
                        properties:
                          account:
                            type: object
                            title: Account.
                            description: Account information.
                            properties:
                              id:
                                title: Account unique identifier.
                                type: string
                                description: Account unique identifier.
                                format: uuid
                          references:
                            type: array
                            title: References.
                            items:
                              title: Report reference data
                              type: object
                              description: Reference data for a report
                              properties:
                                id:
                                  type: string
                                  format: uuid
                                type:
                                  title: Report reference type
                                  description: >-
                                    Report reference type

                                    * CORPORATE_ACTION_TRANSACTION_ID -
                                    Corporate action transaction identifier

                                    * ACCOUNT_GROUP_ID - Account group
                                    identifier

                                    * ACCOUNT_ID - Account identifier

                                    * ORDER_ID - Order identifier
                                  type: string
                                  enum:
                                    - CORPORATE_ACTION_TRANSACTION_ID
                                    - ACCOUNT_GROUP_ID
                                    - ACCOUNT_ID
                                    - ORDER_ID
                    required:
                      - id
                      - user_id
                      - created_at
                      - type
                      - substituted_report_id
                    additionalProperties: false
                  - title: Report - Order ex-ante cost
                    type: object
                    properties:
                      id:
                        title: Report unique identifier.
                        type: string
                        description: Report unique identifier.
                        format: uuid
                      created_at:
                        type: string
                        format: date-time
                        description: >-
                          Date and time when the resource was created. [RFC
                          3339-5](https://datatracker.ietf.org/doc/html/rfc3339#section-5.6),
                          [ISO8601
                          UTC](https://www.iso.org/iso-8601-date-and-time-format.html)
                      user_id:
                        title: User unique identifier.
                        type: string
                        description: User unique identifier.
                        format: uuid
                      type:
                        type: string
                        default: ORDER_EX_ANTE_COST
                        description: The type of report must be “ORDER_EX_ANTE_COST”.
                      substituted_report_id:
                        oneOf:
                          - type: 'null'
                          - title: Substituted Report unique identifier.
                            type: string
                            description: >-
                              References report that has been replaced by this
                              one.
                            format: uuid
                      data:
                        title: Report Data - Order ex-ante cost
                        type: object
                        description: Contents of the order ex-ante cost report.
                        properties:
                          holding_period:
                            type: object
                            description: Holding period.
                            properties:
                              unit:
                                type: string
                                description: |-
                                  Unit of time. 
                                  * YEAR - 
                                enum:
                                  - YEAR
                                default: YEAR
                              quantity:
                                description: Quantity of time units.
                                type: integer
                          instrument:
                            type: object
                            description: Instrument details.
                            properties:
                              isin:
                                title: International securities identification number
                                type: string
                                description: >-
                                  International securities identification number
                                  defined by [ISO
                                  6166](https://en.wikipedia.org/wiki/International_Securities_Identification_Number).
                                pattern: ^[A-Z]{2}[A-Z0-9]{9}[0-9]$
                              short_name:
                                description: Instrument short name.
                                type: string
                                maxLength: 100
                          venue:
                            type: object
                            description: Venue details.
                            properties:
                              name:
                                description: Venue name.
                                type: string
                                maxLength: 100
                          account:
                            type: object
                            description: Account details.
                            properties:
                              id:
                                title: Account unique identifier.
                                type: string
                                description: Account unique identifier.
                                format: uuid
                              account_number:
                                type: integer
                                description: >-
                                  The serial account number of the account in
                                  the account group.
                                minimum: 1
                          account_group:
                            type: object
                            description: Account group details.
                            properties:
                              id:
                                title: Account group unique identifier.
                                type: string
                                description: Account group unique identifier.
                                format: uuid
                              securities_account_number:
                                type: string
                                description: Securities account number.
                                pattern: ^[0-9]{9}$
                          user:
                            type: object
                            description: User details.
                            properties:
                              first_name:
                                type: string
                                maxLength: 100
                                minLength: 2
                                description: First name of the user.
                              last_name:
                                type: string
                                maxLength: 100
                                minLength: 2
                                description: Last name of the user.
                              salutation:
                                type: string
                                description: >-
                                  Salutation of the user used in reports and
                                  statements.

                                  * (empty string) - 

                                  * SALUTATION_MALE - 

                                  * SALUTATION_FEMALE - 

                                  * SALUTATION_FEMALE_MARRIED - 

                                  * SALUTATION_DIVERSE - 
                                enum:
                                  - ''
                                  - SALUTATION_MALE
                                  - SALUTATION_FEMALE
                                  - SALUTATION_FEMALE_MARRIED
                                  - SALUTATION_DIVERSE
                                default: ''
                              title:
                                type: string
                                description: >-
                                  Title of the user used in reports and
                                  statements.

                                  * (empty string) - 

                                  * DR - Doctor

                                  * PROF - Professor

                                  * PROF_DR - 

                                  * DIPL_ING - Graduate engineer
                                  (Diplom-Ingenieur)

                                  * MAGISTER - 
                                enum:
                                  - ''
                                  - DR
                                  - PROF
                                  - PROF_DR
                                  - DIPL_ING
                                  - MAGISTER
                                default: ''
                              address:
                                type: object
                                description: User residential address.
                                properties:
                                  address_line1:
                                    type: string
                                    description: First address line of the address.
                                    maxLength: 100
                                  address_line2:
                                    type: string
                                    description: Second address line of the address.
                                    maxLength: 100
                                  postcode:
                                    title: Postal code
                                    type: string
                                    description: Postal code (postcode, PIN or ZIP code)
                                    pattern: >-
                                      ^[a-zA-Z0-9][a-zA-Z0-9\s\-]{0,8}[a-zA-Z0-9]?$
                                  country:
                                    description: >-
                                      Country code. [ISO 3166 alpha-2
                                      Codes](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2).
                                    type: string
                                    pattern: ^[A-Z]{2}$
                                  state:
                                    description: >-
                                      State, province, county. [ISO 3166 alpha-2
                                      Codes](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2).
                                    type: string
                                    maxLength: 50
                                  city:
                                    title: City name
                                    type: string
                                    minLength: 1
                                    maxLength: 85
                          order:
                            type: object
                            description: Order details.
                            properties:
                              user_id:
                                type: string
                                format: uuid
                                description: The ID of the user.
                              account_id:
                                type: string
                                format: uuid
                                description: The ID of the account that owns the order.
                              cash_amount:
                                allOf:
                                  - type: string
                                    pattern: ^[0-9]{1,9}(\.[0-9]{2})?$
                                  - description: Cash amount for a nominal order.
                              currency:
                                allOf:
                                  - type: string
                                    description: >-
                                      Alphabetic three-letter [ISO
                                      4217](https://en.wikipedia.org/wiki/ISO_4217)
                                      currency code.

                                      * EUR - Euro
                                    enum:
                                      - EUR
                                    default: EUR
                                  - description: The currency for the order.
                              side:
                                type: string
                                description: |-
                                  Side of the order.
                                  * BUY - 
                                  * SELL - 
                                enum:
                                  - BUY
                                  - SELL
                              instrument_id:
                                title: International securities identification number
                                type: string
                                description: >-
                                  International securities identification number
                                  defined by [ISO
                                  6166](https://en.wikipedia.org/wiki/International_Securities_Identification_Number).
                                pattern: ^[A-Z]{2}[A-Z0-9]{9}[0-9]$
                              instrument_id_type:
                                description: |-
                                  The type of the ID used in the request.
                                  * ISIN - 
                                enum:
                                  - ISIN
                                default: ISIN
                                type: string
                              order_type:
                                type: string
                                description: |-
                                  Type of the order.
                                  * MARKET - 
                                  * LIMIT - 
                                  * STOP - 
                                enum:
                                  - MARKET
                                  - LIMIT
                                  - STOP
                              quantity:
                                allOf:
                                  - type: string
                                    pattern: ^[0-9]{0,63}(\.[0-9]{1,27})?$
                                  - description: Quantity of securities for the order.
                              limit_price:
                                allOf:
                                  - type: string
                                    pattern: ^[0-9]{0,63}(\.[0-9]{1,27})?$
                                  - description: >-
                                      The limit price for orders of the type
                                      'limit'.
                              stop_price:
                                allOf:
                                  - type: string
                                    pattern: ^[0-9]{0,63}(\.[0-9]{1,27})?$
                                  - description: >-
                                      The stop price for orders of the type
                                      'stop'.
                              price:
                                allOf:
                                  - type: string
                                    pattern: ^[0-9]{0,63}(\.[0-9]{1,27})?$
                                  - description: >-
                                      The estimated price for the order. In case
                                      of LIMIT or STOP order provided
                                      'limit'/'stop' price will be used.
                          return_impact:
                            type: object
                            description: Return impact.
                            properties:
                              year_one:
                                title: Cost
                                type: object
                                properties:
                                  cash_amount:
                                    type: string
                                    pattern: ^[0-9]{1,9}(\.[0-9]{2})?$
                                  currency:
                                    type: string
                                    description: >-
                                      Alphabetic three-letter [ISO
                                      4217](https://en.wikipedia.org/wiki/ISO_4217)
                                      currency code.

                                      * EUR - Euro
                                    enum:
                                      - EUR
                                    default: EUR
                                  as_percentage:
                                    allOf:
                                      - type: string
                                        pattern: ^-?[0-9]{0,63}(\.[0-9]{1,27})?$
                                      - description: >-
                                          The cost value represented as a
                                          percentage.
                                additionalProperties: false
                              year_two:
                                title: Cost
                                type: object
                                properties:
                                  cash_amount:
                                    type: string
                                    pattern: ^[0-9]{1,9}(\.[0-9]{2})?$
                                  currency:
                                    type: string
                                    description: >-
                                      Alphabetic three-letter [ISO
                                      4217](https://en.wikipedia.org/wiki/ISO_4217)
                                      currency code.

                                      * EUR - Euro
                                    enum:
                                      - EUR
                                    default: EUR
                                  as_percentage:
                                    allOf:
                                      - type: string
                                        pattern: ^-?[0-9]{0,63}(\.[0-9]{1,27})?$
                                      - description: >-
                                          The cost value represented as a
                                          percentage.
                                additionalProperties: false
                              year_three:
                                title: Cost
                                type: object
                                properties:
                                  cash_amount:
                                    type: string
                                    pattern: ^[0-9]{1,9}(\.[0-9]{2})?$
                                  currency:
                                    type: string
                                    description: >-
                                      Alphabetic three-letter [ISO
                                      4217](https://en.wikipedia.org/wiki/ISO_4217)
                                      currency code.

                                      * EUR - Euro
                                    enum:
                                      - EUR
                                    default: EUR
                                  as_percentage:
                                    allOf:
                                      - type: string
                                        pattern: ^-?[0-9]{0,63}(\.[0-9]{1,27})?$
                                      - description: >-
                                          The cost value represented as a
                                          percentage.
                                additionalProperties: false
                          total_cost:
                            title: Order ex-ante aggregated cost
                            type: object
                            description: >-
                              Aggregated totals of product costs, service costs
                              and third party payments.
                            properties:
                              product:
                                title: Cost
                                type: object
                                properties:
                                  cash_amount:
                                    type: string
                                    pattern: ^[0-9]{1,9}(\.[0-9]{2})?$
                                  currency:
                                    type: string
                                    description: >-
                                      Alphabetic three-letter [ISO
                                      4217](https://en.wikipedia.org/wiki/ISO_4217)
                                      currency code.

                                      * EUR - Euro
                                    enum:
                                      - EUR
                                    default: EUR
                                  as_percentage:
                                    allOf:
                                      - type: string
                                        pattern: ^-?[0-9]{0,63}(\.[0-9]{1,27})?$
                                      - description: >-
                                          The cost value represented as a
                                          percentage.
                                additionalProperties: false
                              service:
                                title: Cost
                                type: object
                                properties:
                                  cash_amount:
                                    type: string
                                    pattern: ^[0-9]{1,9}(\.[0-9]{2})?$
                                  currency:
                                    type: string
                                    description: >-
                                      Alphabetic three-letter [ISO
                                      4217](https://en.wikipedia.org/wiki/ISO_4217)
                                      currency code.

                                      * EUR - Euro
                                    enum:
                                      - EUR
                                    default: EUR
                                  as_percentage:
                                    allOf:
                                      - type: string
                                        pattern: ^-?[0-9]{0,63}(\.[0-9]{1,27})?$
                                      - description: >-
                                          The cost value represented as a
                                          percentage.
                                additionalProperties: false
                              third_party:
                                title: Cost
                                type: object
                                properties:
                                  cash_amount:
                                    type: string
                                    pattern: ^[0-9]{1,9}(\.[0-9]{2})?$
                                  currency:
                                    type: string
                                    description: >-
                                      Alphabetic three-letter [ISO
                                      4217](https://en.wikipedia.org/wiki/ISO_4217)
                                      currency code.

                                      * EUR - Euro
                                    enum:
                                      - EUR
                                    default: EUR
                                  as_percentage:
                                    allOf:
                                      - type: string
                                        pattern: ^-?[0-9]{0,63}(\.[0-9]{1,27})?$
                                      - description: >-
                                          The cost value represented as a
                                          percentage.
                                additionalProperties: false
                              total:
                                title: Cost
                                type: object
                                properties:
                                  cash_amount:
                                    type: string
                                    pattern: ^[0-9]{1,9}(\.[0-9]{2})?$
                                  currency:
                                    type: string
                                    description: >-
                                      Alphabetic three-letter [ISO
                                      4217](https://en.wikipedia.org/wiki/ISO_4217)
                                      currency code.

                                      * EUR - Euro
                                    enum:
                                      - EUR
                                    default: EUR
                                  as_percentage:
                                    allOf:
                                      - type: string
                                        pattern: ^-?[0-9]{0,63}(\.[0-9]{1,27})?$
                                      - description: >-
                                          The cost value represented as a
                                          percentage.
                                additionalProperties: false
                            additionalProperties: false
                          product_cost:
                            title: Order ex-ante product cost
                            type: object
                            description: >-
                              All costs and associated charges related to the
                              financial instrument.
                            properties:
                              one_off:
                                title: Cost
                                type: object
                                properties:
                                  cash_amount:
                                    type: string
                                    pattern: ^[0-9]{1,9}(\.[0-9]{2})?$
                                  currency:
                                    type: string
                                    description: >-
                                      Alphabetic three-letter [ISO
                                      4217](https://en.wikipedia.org/wiki/ISO_4217)
                                      currency code.

                                      * EUR - Euro
                                    enum:
                                      - EUR
                                    default: EUR
                                  as_percentage:
                                    allOf:
                                      - type: string
                                        pattern: ^-?[0-9]{0,63}(\.[0-9]{1,27})?$
                                      - description: >-
                                          The cost value represented as a
                                          percentage.
                                additionalProperties: false
                              ongoing:
                                title: Cost
                                type: object
                                properties:
                                  cash_amount:
                                    type: string
                                    pattern: ^[0-9]{1,9}(\.[0-9]{2})?$
                                  currency:
                                    type: string
                                    description: >-
                                      Alphabetic three-letter [ISO
                                      4217](https://en.wikipedia.org/wiki/ISO_4217)
                                      currency code.

                                      * EUR - Euro
                                    enum:
                                      - EUR
                                    default: EUR
                                  as_percentage:
                                    allOf:
                                      - type: string
                                        pattern: ^-?[0-9]{0,63}(\.[0-9]{1,27})?$
                                      - description: >-
                                          The cost value represented as a
                                          percentage.
                                additionalProperties: false
                              transaction:
                                title: Cost
                                type: object
                                properties:
                                  cash_amount:
                                    type: string
                                    pattern: ^[0-9]{1,9}(\.[0-9]{2})?$
                                  currency:
                                    type: string
                                    description: >-
                                      Alphabetic three-letter [ISO
                                      4217](https://en.wikipedia.org/wiki/ISO_4217)
                                      currency code.

                                      * EUR - Euro
                                    enum:
                                      - EUR
                                    default: EUR
                                  as_percentage:
                                    allOf:
                                      - type: string
                                        pattern: ^-?[0-9]{0,63}(\.[0-9]{1,27})?$
                                      - description: >-
                                          The cost value represented as a
                                          percentage.
                                additionalProperties: false
                              incidental:
                                title: Cost
                                type: object
                                properties:
                                  cash_amount:
                                    type: string
                                    pattern: ^[0-9]{1,9}(\.[0-9]{2})?$
                                  currency:
                                    type: string
                                    description: >-
                                      Alphabetic three-letter [ISO
                                      4217](https://en.wikipedia.org/wiki/ISO_4217)
                                      currency code.

                                      * EUR - Euro
                                    enum:
                                      - EUR
                                    default: EUR
                                  as_percentage:
                                    allOf:
                                      - type: string
                                        pattern: ^-?[0-9]{0,63}(\.[0-9]{1,27})?$
                                      - description: >-
                                          The cost value represented as a
                                          percentage.
                                additionalProperties: false
                              total:
                                title: Cost
                                type: object
                                properties:
                                  cash_amount:
                                    type: string
                                    pattern: ^[0-9]{1,9}(\.[0-9]{2})?$
                                  currency:
                                    type: string
                                    description: >-
                                      Alphabetic three-letter [ISO
                                      4217](https://en.wikipedia.org/wiki/ISO_4217)
                                      currency code.

                                      * EUR - Euro
                                    enum:
                                      - EUR
                                    default: EUR
                                  as_percentage:
                                    allOf:
                                      - type: string
                                        pattern: ^-?[0-9]{0,63}(\.[0-9]{1,27})?$
                                      - description: >-
                                          The cost value represented as a
                                          percentage.
                                additionalProperties: false
                            additionalProperties: false
                          service_cost:
                            title: Order ex-ante service cost
                            type: object
                            description: >-
                              All costs and associated charges related to the
                              investment service(s) and/or ancillary services.
                            properties:
                              one_off:
                                title: Cost
                                type: object
                                properties:
                                  cash_amount:
                                    type: string
                                    pattern: ^[0-9]{1,9}(\.[0-9]{2})?$
                                  currency:
                                    type: string
                                    description: >-
                                      Alphabetic three-letter [ISO
                                      4217](https://en.wikipedia.org/wiki/ISO_4217)
                                      currency code.

                                      * EUR - Euro
                                    enum:
                                      - EUR
                                    default: EUR
                                  as_percentage:
                                    allOf:
                                      - type: string
                                        pattern: ^-?[0-9]{0,63}(\.[0-9]{1,27})?$
                                      - description: >-
                                          The cost value represented as a
                                          percentage.
                                additionalProperties: false
                              ongoing:
                                title: Cost
                                type: object
                                properties:
                                  cash_amount:
                                    type: string
                                    pattern: ^[0-9]{1,9}(\.[0-9]{2})?$
                                  currency:
                                    type: string
                                    description: >-
                                      Alphabetic three-letter [ISO
                                      4217](https://en.wikipedia.org/wiki/ISO_4217)
                                      currency code.

                                      * EUR - Euro
                                    enum:
                                      - EUR
                                    default: EUR
                                  as_percentage:
                                    allOf:
                                      - type: string
                                        pattern: ^-?[0-9]{0,63}(\.[0-9]{1,27})?$
                                      - description: >-
                                          The cost value represented as a
                                          percentage.
                                additionalProperties: false
                              transaction:
                                title: Cost
                                type: object
                                properties:
                                  cash_amount:
                                    type: string
                                    pattern: ^[0-9]{1,9}(\.[0-9]{2})?$
                                  currency:
                                    type: string
                                    description: >-
                                      Alphabetic three-letter [ISO
                                      4217](https://en.wikipedia.org/wiki/ISO_4217)
                                      currency code.

                                      * EUR - Euro
                                    enum:
                                      - EUR
                                    default: EUR
                                  as_percentage:
                                    allOf:
                                      - type: string
                                        pattern: ^-?[0-9]{0,63}(\.[0-9]{1,27})?$
                                      - description: >-
                                          The cost value represented as a
                                          percentage.
                                additionalProperties: false
                              ancillary:
                                title: Cost
                                type: object
                                properties:
                                  cash_amount:
                                    type: string
                                    pattern: ^[0-9]{1,9}(\.[0-9]{2})?$
                                  currency:
                                    type: string
                                    description: >-
                                      Alphabetic three-letter [ISO
                                      4217](https://en.wikipedia.org/wiki/ISO_4217)
                                      currency code.

                                      * EUR - Euro
                                    enum:
                                      - EUR
                                    default: EUR
                                  as_percentage:
                                    allOf:
                                      - type: string
                                        pattern: ^-?[0-9]{0,63}(\.[0-9]{1,27})?$
                                      - description: >-
                                          The cost value represented as a
                                          percentage.
                                additionalProperties: false
                              incidental:
                                title: Cost
                                type: object
                                properties:
                                  cash_amount:
                                    type: string
                                    pattern: ^[0-9]{1,9}(\.[0-9]{2})?$
                                  currency:
                                    type: string
                                    description: >-
                                      Alphabetic three-letter [ISO
                                      4217](https://en.wikipedia.org/wiki/ISO_4217)
                                      currency code.

                                      * EUR - Euro
                                    enum:
                                      - EUR
                                    default: EUR
                                  as_percentage:
                                    allOf:
                                      - type: string
                                        pattern: ^-?[0-9]{0,63}(\.[0-9]{1,27})?$
                                      - description: >-
                                          The cost value represented as a
                                          percentage.
                                additionalProperties: false
                              total:
                                title: Cost
                                type: object
                                properties:
                                  cash_amount:
                                    type: string
                                    pattern: ^[0-9]{1,9}(\.[0-9]{2})?$
                                  currency:
                                    type: string
                                    description: >-
                                      Alphabetic three-letter [ISO
                                      4217](https://en.wikipedia.org/wiki/ISO_4217)
                                      currency code.

                                      * EUR - Euro
                                    enum:
                                      - EUR
                                    default: EUR
                                  as_percentage:
                                    allOf:
                                      - type: string
                                        pattern: ^-?[0-9]{0,63}(\.[0-9]{1,27})?$
                                      - description: >-
                                          The cost value represented as a
                                          percentage.
                                additionalProperties: false
                            additionalProperties: false
                          third_party_payments:
                            type: object
                            description: >-
                              Third party payments associated with the
                              investment service.
                            properties:
                              total:
                                title: Cost
                                type: object
                                properties:
                                  cash_amount:
                                    type: string
                                    pattern: ^[0-9]{1,9}(\.[0-9]{2})?$
                                  currency:
                                    type: string
                                    description: >-
                                      Alphabetic three-letter [ISO
                                      4217](https://en.wikipedia.org/wiki/ISO_4217)
                                      currency code.

                                      * EUR - Euro
                                    enum:
                                      - EUR
                                    default: EUR
                                  as_percentage:
                                    allOf:
                                      - type: string
                                        pattern: ^-?[0-9]{0,63}(\.[0-9]{1,27})?$
                                      - description: >-
                                          The cost value represented as a
                                          percentage.
                                additionalProperties: false
                              received_by_client:
                                title: Cost
                                type: object
                                properties:
                                  cash_amount:
                                    type: string
                                    pattern: ^[0-9]{1,9}(\.[0-9]{2})?$
                                  currency:
                                    type: string
                                    description: >-
                                      Alphabetic three-letter [ISO
                                      4217](https://en.wikipedia.org/wiki/ISO_4217)
                                      currency code.

                                      * EUR - Euro
                                    enum:
                                      - EUR
                                    default: EUR
                                  as_percentage:
                                    allOf:
                                      - type: string
                                        pattern: ^-?[0-9]{0,63}(\.[0-9]{1,27})?$
                                      - description: >-
                                          The cost value represented as a
                                          percentage.
                                additionalProperties: false
                              received_by_upvest:
                                title: Cost
                                type: object
                                properties:
                                  cash_amount:
                                    type: string
                                    pattern: ^[0-9]{1,9}(\.[0-9]{2})?$
                                  currency:
                                    type: string
                                    description: >-
                                      Alphabetic three-letter [ISO
                                      4217](https://en.wikipedia.org/wiki/ISO_4217)
                                      currency code.

                                      * EUR - Euro
                                    enum:
                                      - EUR
                                    default: EUR
                                  as_percentage:
                                    allOf:
                                      - type: string
                                        pattern: ^-?[0-9]{0,63}(\.[0-9]{1,27})?$
                                      - description: >-
                                          The cost value represented as a
                                          percentage.
                                additionalProperties: false
                            additionalProperties: false
                        additionalProperties: false
                    required:
                      - id
                      - user_id
                      - created_at
                      - type
                      - substituted_report_id
                    additionalProperties: false
              examples:
                report:
                  summary: Report
                  value:
                    id: b96b1ee7-d491-43eb-b5e4-4833af9c9c2f
                    created_at: '2020-08-24T14:15:22Z'
                    user_id: d1a4be99-8bb6-4e78-b897-8168f6823ab5
                    type: BUY_ORDER
                    substituted_report_id: null
                    data:
                      account:
                        id: a9a4ad54-6dd1-419a-a98d-ab48f9f23bc8
                order-ex-ante-cost:
                  summary: Order ex-ante cost report
                  value:
                    id: b96b1ee7-d491-43eb-b5e4-4833af9c9c2f
                    created_at: '2023-08-24T14:15:22Z'
                    user_id: d1a4be99-8bb6-4e78-b897-8168f6823ab5
                    type: ORDER_EX_ANTE_COST
                    substituted_report_id: null
                    data:
                      account:
                        id: c5034305-c441-4711-adbf-93cfbc13a695
                        account_number: 1
                      account_group:
                        id: 9d95820d-4333-46b6-98de-04ab7512e76f
                        securities_account_number: '123456789'
                      user:
                        salutation: SALUTATION_MALE
                        title: DR
                        first_name: Karl
                        last_name: Schmidt
                        address:
                          address_line1: Rosenweg 221
                          address_line2: apt. 33
                          postcode: '45678'
                          city: Berlin
                          country: DE
                      instrument:
                        isin: LU0274208692
                        short_name: XTR.MSCI WORLD SWAP 1C
                      venue:
                        name: Tradegate
                      order:
                        user_id: d1a4be99-8bb6-4e78-b897-8168f6823ab5
                        instrument_id: LU0274208692
                        instrument_id_type: ISIN
                        account_id: c5034305-c441-4711-adbf-93cfbc13a695
                        order_type: MARKET
                        side: BUY
                        quantity: '15'
                        cash_amount: '1220.85'
                        currency: EUR
                        price: '81.39'
                      holding_period:
                        unit: YEAR
                        quantity: 3
                      total_cost:
                        product:
                          cash_amount: '17.48'
                          currency: EUR
                          as_percentage: '1.43'
                        service:
                          cash_amount: '6.88'
                          currency: EUR
                          as_percentage: '0.56'
                        third_party:
                          cash_amount: '0.70'
                          currency: EUR
                          as_percentage: '0.06'
                        total:
                          cash_amount: '25.06'
                          currency: EUR
                          as_percentage: '2.05'
                      product_cost:
                        one_off:
                          cash_amount: '0.20'
                          currency: EUR
                          as_percentage: '0.02'
                        ongoing:
                          cash_amount: '16.48'
                          currency: EUR
                          as_percentage: '1.35'
                        transaction:
                          cash_amount: '0.80'
                          currency: EUR
                          as_percentage: '0.07'
                        incidental:
                          cash_amount: '0.00'
                          currency: EUR
                          as_percentage: '0.00'
                        total:
                          cash_amount: '17.48'
                          currency: EUR
                          as_percentage: '1.43'
                      service_cost:
                        one_off:
                          cash_amount: '0.49'
                          currency: EUR
                          as_percentage: '0.04'
                        ongoing:
                          cash_amount: '4.39'
                          currency: EUR
                          as_percentage: '0.36'
                        transaction:
                          cash_amount: '2.00'
                          currency: EUR
                          as_percentage: '0.16'
                        ancillary:
                          cash_amount: '0.00'
                          currency: EUR
                          as_percentage: '0.00'
                        incidental:
                          cash_amount: '0.00'
                          currency: EUR
                          as_percentage: '0.00'
                        total:
                          cash_amount: '6.88'
                          currency: EUR
                          as_percentage: '0.56'
                      third_party_payments:
                        total:
                          cash_amount: '0.70'
                          currency: EUR
                          as_percentage: '0.06'
                        received_by_client:
                          cash_amount: '0.35'
                          currency: EUR
                          as_percentage: '0.03'
                        received_by_upvest:
                          cash_amount: '0.35'
                          currency: EUR
                          as_percentage: '0.03'
                      return_impact:
                        year_one:
                          cash_amount: '9.05'
                          currency: EUR
                          as_percentage: '0.74'
                        year_two:
                          cash_amount: '6.96'
                          currency: EUR
                          as_percentage: '0.57'
                        year_three:
                          cash_amount: '8.36'
                          currency: EUR
                          as_percentage: '0.68'
            application/pdf:
              schema:
                title: Report
        '401':
          description: Unauthorized. The caller has not been authenticated.
          headers:
            upvest-request-id:
              required: true
              schema:
                type: string
                format: uuid
                example: 169ae4c7-ebd7-4041-94da-25369653eba7
          content:
            application/problem+json:
              schema:
                title: Error
                type: object
                description: ''
                properties:
                  type:
                    type: string
                    description: URL to a document describing the error condition.
                  status:
                    type: integer
                    description: >-
                      Transmission of the HTTP status code so that all
                      information can be found in one place, but also to correct
                      changes in the status code due to the use of proxy
                      servers.
                  title:
                    type: string
                    description: >-
                      A short, human-readable title for the general error type;
                      the title should not change for given types.
                  detail:
                    type: string
                    description: A human-readable description of the specific error.
                  instance:
                    type: string
                    description: >-
                      This optional key may be present, with a unique URI for
                      the specific error; this will often point to an error log
                      for that specific response.
                  request_id:
                    type: string
                    description: Correlation ID for the original request.
                required:
                  - type
                  - status
                additionalProperties: false
              example:
                status: 401
                type: unauthorized
        '403':
          description: >-
            Forbidden. The caller has been authenticated but is not allowed to
            take the requested action.
          headers:
            upvest-request-id:
              required: true
              schema:
                type: string
                format: uuid
                example: 169ae4c7-ebd7-4041-94da-25369653eba7
          content:
            application/problem+json:
              schema:
                title: Error
                type: object
                description: ''
                properties:
                  type:
                    type: string
                    description: URL to a document describing the error condition.
                  status:
                    type: integer
                    description: >-
                      Transmission of the HTTP status code so that all
                      information can be found in one place, but also to correct
                      changes in the status code due to the use of proxy
                      servers.
                  title:
                    type: string
                    description: >-
                      A short, human-readable title for the general error type;
                      the title should not change for given types.
                  detail:
                    type: string
                    description: A human-readable description of the specific error.
                  instance:
                    type: string
                    description: >-
                      This optional key may be present, with a unique URI for
                      the specific error; this will often point to an error log
                      for that specific response.
                  request_id:
                    type: string
                    description: Correlation ID for the original request.
                required:
                  - type
                  - status
                additionalProperties: false
              example:
                status: 403
                type: forbidden
        '404':
          description: Not Found. The requested resource could not be found.
          headers:
            upvest-request-id:
              required: true
              schema:
                type: string
                format: uuid
                example: 169ae4c7-ebd7-4041-94da-25369653eba7
          content:
            application/problem+json:
              schema:
                title: Error
                type: object
                description: ''
                properties:
                  type:
                    type: string
                    description: URL to a document describing the error condition.
                  status:
                    type: integer
                    description: >-
                      Transmission of the HTTP status code so that all
                      information can be found in one place, but also to correct
                      changes in the status code due to the use of proxy
                      servers.
                  title:
                    type: string
                    description: >-
                      A short, human-readable title for the general error type;
                      the title should not change for given types.
                  detail:
                    type: string
                    description: A human-readable description of the specific error.
                  instance:
                    type: string
                    description: >-
                      This optional key may be present, with a unique URI for
                      the specific error; this will often point to an error log
                      for that specific response.
                  request_id:
                    type: string
                    description: Correlation ID for the original request.
                required:
                  - type
                  - status
                additionalProperties: false
              example:
                status: 404
                type: not_found
        '406':
          description: >-
            Not Acceptable. The resource does not have a current representation
            that would be acceptable to the user agent. "Accept" header defined
            unsupported value.
          headers:
            upvest-request-id:
              required: true
              schema:
                type: string
                format: uuid
                example: 169ae4c7-ebd7-4041-94da-25369653eba7
          content:
            application/problem+json:
              schema:
                title: Error
                type: object
                description: ''
                properties:
                  type:
                    type: string
                    description: URL to a document describing the error condition.
                  status:
                    type: integer
                    description: >-
                      Transmission of the HTTP status code so that all
                      information can be found in one place, but also to correct
                      changes in the status code due to the use of proxy
                      servers.
                  title:
                    type: string
                    description: >-
                      A short, human-readable title for the general error type;
                      the title should not change for given types.
                  detail:
                    type: string
                    description: A human-readable description of the specific error.
                  instance:
                    type: string
                    description: >-
                      This optional key may be present, with a unique URI for
                      the specific error; this will often point to an error log
                      for that specific response.
                  request_id:
                    type: string
                    description: Correlation ID for the original request.
                required:
                  - type
                  - status
                additionalProperties: false
              example:
                status: 406
                type: not_acceptable
        '429':
          description: >-
            Too Many Requests. The caller has exceeded their quota for the time
            period and has been throttled.
          headers:
            upvest-request-id:
              required: true
              schema:
                type: string
                format: uuid
                example: 169ae4c7-ebd7-4041-94da-25369653eba7
          content:
            application/problem+json:
              schema:
                title: Error
                type: object
                description: ''
                properties:
                  type:
                    type: string
                    description: URL to a document describing the error condition.
                  status:
                    type: integer
                    description: >-
                      Transmission of the HTTP status code so that all
                      information can be found in one place, but also to correct
                      changes in the status code due to the use of proxy
                      servers.
                  title:
                    type: string
                    description: >-
                      A short, human-readable title for the general error type;
                      the title should not change for given types.
                  detail:
                    type: string
                    description: A human-readable description of the specific error.
                  instance:
                    type: string
                    description: >-
                      This optional key may be present, with a unique URI for
                      the specific error; this will often point to an error log
                      for that specific response.
                  request_id:
                    type: string
                    description: Correlation ID for the original request.
                required:
                  - type
                  - status
                additionalProperties: false
              example:
                status: 429
                type: too_many_requests
        '500':
          description: Internal Server Error. The service encountered an unexpected error.
          headers:
            upvest-request-id:
              required: true
              schema:
                type: string
                format: uuid
                example: 169ae4c7-ebd7-4041-94da-25369653eba7
          content:
            application/problem+json:
              schema:
                title: Error
                type: object
                description: ''
                properties:
                  type:
                    type: string
                    description: URL to a document describing the error condition.
                  status:
                    type: integer
                    description: >-
                      Transmission of the HTTP status code so that all
                      information can be found in one place, but also to correct
                      changes in the status code due to the use of proxy
                      servers.
                  title:
                    type: string
                    description: >-
                      A short, human-readable title for the general error type;
                      the title should not change for given types.
                  detail:
                    type: string
                    description: A human-readable description of the specific error.
                  instance:
                    type: string
                    description: >-
                      This optional key may be present, with a unique URI for
                      the specific error; this will often point to an error log
                      for that specific response.
                  request_id:
                    type: string
                    description: Correlation ID for the original request.
                required:
                  - type
                  - status
                additionalProperties: false
              example:
                status: 500
                type: internal_server_error
        '503':
          description: >-
            Service Unavailable. The service handling for this request cannot be
            reached at this time.
          headers:
            upvest-request-id:
              required: true
              schema:
                type: string
                format: uuid
                example: 169ae4c7-ebd7-4041-94da-25369653eba7
          content:
            application/problem+json:
              schema:
                title: Error
                type: object
                description: ''
                properties:
                  type:
                    type: string
                    description: URL to a document describing the error condition.
                  status:
                    type: integer
                    description: >-
                      Transmission of the HTTP status code so that all
                      information can be found in one place, but also to correct
                      changes in the status code due to the use of proxy
                      servers.
                  title:
                    type: string
                    description: >-
                      A short, human-readable title for the general error type;
                      the title should not change for given types.
                  detail:
                    type: string
                    description: A human-readable description of the specific error.
                  instance:
                    type: string
                    description: >-
                      This optional key may be present, with a unique URI for
                      the specific error; this will often point to an error log
                      for that specific response.
                  request_id:
                    type: string
                    description: Correlation ID for the original request.
                required:
                  - type
                  - status
                additionalProperties: false
              example:
                status: 503
                type: method_not_allowed
        '504':
          description: >-
            Gateway Timeout. The service gateway has reached its internal
            timeout.
          headers:
            upvest-request-id:
              required: true
              schema:
                type: string
                format: uuid
                example: 169ae4c7-ebd7-4041-94da-25369653eba7
          content:
            application/problem+json:
              schema:
                title: Error
                type: object
                description: ''
                properties:
                  type:
                    type: string
                    description: URL to a document describing the error condition.
                  status:
                    type: integer
                    description: >-
                      Transmission of the HTTP status code so that all
                      information can be found in one place, but also to correct
                      changes in the status code due to the use of proxy
                      servers.
                  title:
                    type: string
                    description: >-
                      A short, human-readable title for the general error type;
                      the title should not change for given types.
                  detail:
                    type: string
                    description: A human-readable description of the specific error.
                  instance:
                    type: string
                    description: >-
                      This optional key may be present, with a unique URI for
                      the specific error; this will often point to an error log
                      for that specific response.
                  request_id:
                    type: string
                    description: Correlation ID for the original request.
                required:
                  - type
                  - status
                additionalProperties: false
              example:
                status: 504
                type: gateway_timeout
  /users/{user_id}/tax_residencies:
    parameters:
      - name: user_id
        in: path
        required: true
        schema:
          title: User unique identifier.
          type: string
          description: User unique identifier.
          format: uuid
      - name: upvest-client-id
        in: header
        description: Tenant Client ID
        required: true
        schema:
          type: string
          format: uuid
          example: ebabcf4d-61c3-4942-875c-e265a7c2d062
      - name: authorization
        in: header
        description: |
          Bearer (access) token from the OAuth flow with correct scopes.
          https://datatracker.ietf.org/doc/html/rfc6750
        required: true
        schema:
          type: string
          pattern: ^Bearer [a-zA-Z0-9\-\._~+/]*=*
          example: Bearer c2VjcmV0Cg==
      - name: signature
        in: header
        required: true
        schema:
          type: string
        description: >-
          https://tools.ietf.org/id/draft-ietf-httpbis-message-signatures-01.html#name-the-signature-http-header
      - name: signature-input
        in: header
        required: true
        schema:
          type: string
        description: >-
          https://tools.ietf.org/id/draft-ietf-httpbis-message-signatures-01.html#name-the-signature-input-http-he
      - name: upvest-api-version
        in: header
        required: false
        schema:
          type: string
          enum:
            - '1'
          default: '1'
          example: '1'
        description: 'Upvest API version (Note: Do not include quotation marks)'
    get:
      operationId: retrieve_tax_residencies
      summary: Retrieve tax residencies
      description: Retrieve tax residencies
      tags:
        - Tax Residencies
      security:
        - oauth-client-credentials:
            - taxes:read
            - taxes:admin
      responses:
        '200':
          description: User tax residencies
          headers:
            upvest-request-id:
              required: true
              schema:
                type: string
                format: uuid
                example: 169ae4c7-ebd7-4041-94da-25369653eba7
          content:
            application/json:
              schema:
                title: Tax residency Record
                type: object
                properties:
                  created_at:
                    type: string
                    format: date-time
                    description: >-
                      Date and time when the resource was created. [RFC
                      3339-5](https://datatracker.ietf.org/doc/html/rfc3339#section-5.6),
                      [ISO8601
                      UTC](https://www.iso.org/iso-8601-date-and-time-format.html)
                  updated_at:
                    type: string
                    format: date-time
                    description: >-
                      Date and time when the resource was last updated. [RFC
                      3339-5](https://datatracker.ietf.org/doc/html/rfc3339#section-5.6),
                      [ISO8601
                      UTC](https://www.iso.org/iso-8601-date-and-time-format.html)
                  tax_residencies:
                    type: array
                    items:
                      title: Tax residency
                      oneOf:
                        - type: object
                          title: With tax identifier number
                          properties:
                            country:
                              description: >-
                                Accepted country code. [ISO 3166-1 alpha-2
                                codes](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2).
                              type: string
                              enum:
                                - AD
                                - AE
                                - AF
                                - AG
                                - AI
                                - AL
                                - AM
                                - AO
                                - AQ
                                - AR
                                - AS
                                - AT
                                - AU
                                - AW
                                - AX
                                - AZ
                                - BA
                                - BB
                                - BD
                                - BE
                                - BF
                                - BG
                                - BH
                                - BI
                                - BJ
                                - BL
                                - BM
                                - BN
                                - BO
                                - BQ
                                - BR
                                - BS
                                - BT
                                - BV
                                - BW
                                - BY
                                - BZ
                                - CA
                                - CC
                                - CD
                                - CF
                                - CG
                                - CH
                                - CI
                                - CK
                                - CL
                                - CM
                                - CN
                                - CO
                                - CR
                                - CU
                                - CV
                                - CW
                                - CX
                                - CY
                                - CZ
                                - DE
                                - DJ
                                - DK
                                - DM
                                - DO
                                - DZ
                                - EC
                                - EE
                                - EG
                                - EH
                                - ER
                                - ES
                                - ET
                                - FI
                                - FJ
                                - FK
                                - FM
                                - FO
                                - FR
                                - GA
                                - GB
                                - GD
                                - GE
                                - GF
                                - GG
                                - GH
                                - GI
                                - GL
                                - GM
                                - GN
                                - GP
                                - GQ
                                - GR
                                - GS
                                - GT
                                - GU
                                - GW
                                - GY
                                - HK
                                - HM
                                - HN
                                - HR
                                - HT
                                - HU
                                - ID
                                - IE
                                - IL
                                - IM
                                - IN
                                - IO
                                - IQ
                                - IR
                                - IS
                                - IT
                                - JE
                                - JM
                                - JO
                                - JP
                                - KE
                                - KG
                                - KH
                                - KI
                                - KM
                                - KN
                                - KP
                                - KR
                                - KW
                                - KY
                                - KZ
                                - LA
                                - LB
                                - LC
                                - LI
                                - LK
                                - LR
                                - LS
                                - LT
                                - LU
                                - LV
                                - LY
                                - MA
                                - MC
                                - MD
                                - ME
                                - MF
                                - MG
                                - MH
                                - MK
                                - ML
                                - MM
                                - MN
                                - MO
                                - MP
                                - MQ
                                - MR
                                - MS
                                - MT
                                - MU
                                - MV
                                - MW
                                - MX
                                - MY
                                - MZ
                                - NA
                                - NC
                                - NE
                                - NF
                                - NG
                                - NI
                                - NL
                                - 'NO'
                                - NP
                                - NR
                                - NU
                                - NZ
                                - OM
                                - PA
                                - PE
                                - PF
                                - PG
                                - PH
                                - PK
                                - PL
                                - PM
                                - PN
                                - PR
                                - PS
                                - PT
                                - PW
                                - PY
                                - QA
                                - RE
                                - RO
                                - RS
                                - RU
                                - RW
                                - SA
                                - SB
                                - SC
                                - SD
                                - SE
                                - SG
                                - SH
                                - SI
                                - SJ
                                - SK
                                - SL
                                - SM
                                - SN
                                - SO
                                - SR
                                - SS
                                - ST
                                - SV
                                - SX
                                - SY
                                - SZ
                                - TC
                                - TD
                                - TF
                                - TG
                                - TH
                                - TJ
                                - TK
                                - TL
                                - TM
                                - TN
                                - TO
                                - TR
                                - TT
                                - TV
                                - TW
                                - TZ
                                - UA
                                - UG
                                - UM
                                - US
                                - UY
                                - UZ
                                - VA
                                - VC
                                - VE
                                - VG
                                - VI
                                - VN
                                - VU
                                - WF
                                - WS
                                - XK
                                - YE
                                - YT
                                - ZA
                                - ZM
                                - ZW
                            tax_identifier_number:
                              type: string
                              maxLength: 20
                              minLength: 1
                              description: Tax identifier number
                          required:
                            - country
                            - tax_identifier_number
                        - type: object
                          title: Without tax identifier number
                          properties:
                            country:
                              description: >-
                                Accepted country code. [ISO 3166-1 alpha-2
                                codes](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2).
                              type: string
                              enum:
                                - AD
                                - AE
                                - AF
                                - AG
                                - AI
                                - AL
                                - AM
                                - AO
                                - AQ
                                - AR
                                - AS
                                - AT
                                - AU
                                - AW
                                - AX
                                - AZ
                                - BA
                                - BB
                                - BD
                                - BE
                                - BF
                                - BG
                                - BH
                                - BI
                                - BJ
                                - BL
                                - BM
                                - BN
                                - BO
                                - BQ
                                - BR
                                - BS
                                - BT
                                - BV
                                - BW
                                - BY
                                - BZ
                                - CA
                                - CC
                                - CD
                                - CF
                                - CG
                                - CH
                                - CI
                                - CK
                                - CL
                                - CM
                                - CN
                                - CO
                                - CR
                                - CU
                                - CV
                                - CW
                                - CX
                                - CY
                                - CZ
                                - DE
                                - DJ
                                - DK
                                - DM
                                - DO
                                - DZ
                                - EC
                                - EE
                                - EG
                                - EH
                                - ER
                                - ES
                                - ET
                                - FI
                                - FJ
                                - FK
                                - FM
                                - FO
                                - FR
                                - GA
                                - GB
                                - GD
                                - GE
                                - GF
                                - GG
                                - GH
                                - GI
                                - GL
                                - GM
                                - GN
                                - GP
                                - GQ
                                - GR
                                - GS
                                - GT
                                - GU
                                - GW
                                - GY
                                - HK
                                - HM
                                - HN
                                - HR
                                - HT
                                - HU
                                - ID
                                - IE
                                - IL
                                - IM
                                - IN
                                - IO
                                - IQ
                                - IR
                                - IS
                                - IT
                                - JE
                                - JM
                                - JO
                                - JP
                                - KE
                                - KG
                                - KH
                                - KI
                                - KM
                                - KN
                                - KP
                                - KR
                                - KW
                                - KY
                                - KZ
                                - LA
                                - LB
                                - LC
                                - LI
                                - LK
                                - LR
                                - LS
                                - LT
                                - LU
                                - LV
                                - LY
                                - MA
                                - MC
                                - MD
                                - ME
                                - MF
                                - MG
                                - MH
                                - MK
                                - ML
                                - MM
                                - MN
                                - MO
                                - MP
                                - MQ
                                - MR
                                - MS
                                - MT
                                - MU
                                - MV
                                - MW
                                - MX
                                - MY
                                - MZ
                                - NA
                                - NC
                                - NE
                                - NF
                                - NG
                                - NI
                                - NL
                                - 'NO'
                                - NP
                                - NR
                                - NU
                                - NZ
                                - OM
                                - PA
                                - PE
                                - PF
                                - PG
                                - PH
                                - PK
                                - PL
                                - PM
                                - PN
                                - PR
                                - PS
                                - PT
                                - PW
                                - PY
                                - QA
                                - RE
                                - RO
                                - RS
                                - RU
                                - RW
                                - SA
                                - SB
                                - SC
                                - SD
                                - SE
                                - SG
                                - SH
                                - SI
                                - SJ
                                - SK
                                - SL
                                - SM
                                - SN
                                - SO
                                - SR
                                - SS
                                - ST
                                - SV
                                - SX
                                - SY
                                - SZ
                                - TC
                                - TD
                                - TF
                                - TG
                                - TH
                                - TJ
                                - TK
                                - TL
                                - TM
                                - TN
                                - TO
                                - TR
                                - TT
                                - TV
                                - TW
                                - TZ
                                - UA
                                - UG
                                - UM
                                - US
                                - UY
                                - UZ
                                - VA
                                - VC
                                - VE
                                - VG
                                - VI
                                - VN
                                - VU
                                - WF
                                - WS
                                - XK
                                - YE
                                - YT
                                - ZA
                                - ZM
                                - ZW
                            missing_tin_reason:
                              type: string
                              enum:
                                - TIN_NOT_YET_ASSIGNED
                                - COUNTRY_HAS_NO_TIN
                                - OTHER_REASONS
                              description: >-
                                Reason why TIN is missing

                                * TIN_NOT_YET_ASSIGNED - Indicates that the tax
                                identification number has not yet been assigned
                                by the tax authorities. A common example is,
                                that a user has moved to a country and thus
                                became taxable, but that the tax authorities
                                have not yet assigned the TIN to this user.

                                * COUNTRY_HAS_NO_TIN - Indicates that the
                                specific country does not provide a TIN.

                                * OTHER_REASONS - Applies in case of other
                                reasons - i.e. when a user does not have the TIN
                                at hand. Note this may cause additional
                                inquiries by our customer service team.
                          required:
                            - country
                            - missing_tin_reason
                  status:
                    type: string
                    enum:
                      - PENDING
                      - ACTIVE
                    description: >-
                      Tax residency status

                      * PENDING - It indicates that the tax residency records
                      are not yet processed by Upvest.

                      * ACTIVE - It indicates that tax residency records are
                      processed, and the tax residency record is the one in use.
                required:
                  - updated_at
                  - created_at
                  - tax_residencies
                  - status
                additionalProperties: false
              example:
                created_at: '2021-07-21T14:10:00.00Z'
                updated_at: '2021-07-21T14:10:00.00Z'
                status: ACTIVE
                tax_residencies:
                  - country: IT
                    tax_identifier_number: LLLLLL99L99L999L
                  - country: FR
                    missing_tin_reason: COUNTRY_HAS_NO_TIN
                  - country: DE
                    tax_identifier_number: '12345678901'
        '401':
          description: Unauthorized. The caller has not been authenticated.
          headers:
            upvest-request-id:
              required: true
              schema:
                type: string
                format: uuid
                example: 169ae4c7-ebd7-4041-94da-25369653eba7
          content:
            application/problem+json:
              schema:
                title: Error
                type: object
                description: ''
                properties:
                  type:
                    type: string
                    description: URL to a document describing the error condition.
                  status:
                    type: integer
                    description: >-
                      Transmission of the HTTP status code so that all
                      information can be found in one place, but also to correct
                      changes in the status code due to the use of proxy
                      servers.
                  title:
                    type: string
                    description: >-
                      A short, human-readable title for the general error type;
                      the title should not change for given types.
                  detail:
                    type: string
                    description: A human-readable description of the specific error.
                  instance:
                    type: string
                    description: >-
                      This optional key may be present, with a unique URI for
                      the specific error; this will often point to an error log
                      for that specific response.
                  request_id:
                    type: string
                    description: Correlation ID for the original request.
                required:
                  - type
                  - status
                additionalProperties: false
              example:
                status: 401
                type: unauthorized
        '403':
          description: >-
            Forbidden. The caller has been authenticated but is not allowed to
            take the requested action.
          headers:
            upvest-request-id:
              required: true
              schema:
                type: string
                format: uuid
                example: 169ae4c7-ebd7-4041-94da-25369653eba7
          content:
            application/problem+json:
              schema:
                title: Error
                type: object
                description: ''
                properties:
                  type:
                    type: string
                    description: URL to a document describing the error condition.
                  status:
                    type: integer
                    description: >-
                      Transmission of the HTTP status code so that all
                      information can be found in one place, but also to correct
                      changes in the status code due to the use of proxy
                      servers.
                  title:
                    type: string
                    description: >-
                      A short, human-readable title for the general error type;
                      the title should not change for given types.
                  detail:
                    type: string
                    description: A human-readable description of the specific error.
                  instance:
                    type: string
                    description: >-
                      This optional key may be present, with a unique URI for
                      the specific error; this will often point to an error log
                      for that specific response.
                  request_id:
                    type: string
                    description: Correlation ID for the original request.
                required:
                  - type
                  - status
                additionalProperties: false
              example:
                status: 403
                type: forbidden
        '404':
          description: Not Found. The requested resource could not be found.
          headers:
            upvest-request-id:
              required: true
              schema:
                type: string
                format: uuid
                example: 169ae4c7-ebd7-4041-94da-25369653eba7
          content:
            application/problem+json:
              schema:
                title: Error
                type: object
                description: ''
                properties:
                  type:
                    type: string
                    description: URL to a document describing the error condition.
                  status:
                    type: integer
                    description: >-
                      Transmission of the HTTP status code so that all
                      information can be found in one place, but also to correct
                      changes in the status code due to the use of proxy
                      servers.
                  title:
                    type: string
                    description: >-
                      A short, human-readable title for the general error type;
                      the title should not change for given types.
                  detail:
                    type: string
                    description: A human-readable description of the specific error.
                  instance:
                    type: string
                    description: >-
                      This optional key may be present, with a unique URI for
                      the specific error; this will often point to an error log
                      for that specific response.
                  request_id:
                    type: string
                    description: Correlation ID for the original request.
                required:
                  - type
                  - status
                additionalProperties: false
              example:
                status: 404
                type: not_found
        '405':
          description: >-
            Method Not Allowed. The requested method is not allowed on the
            requested resource.
          headers:
            upvest-request-id:
              required: true
              schema:
                type: string
                format: uuid
                example: 169ae4c7-ebd7-4041-94da-25369653eba7
          content:
            application/problem+json:
              schema:
                title: Error
                type: object
                description: ''
                properties:
                  type:
                    type: string
                    description: URL to a document describing the error condition.
                  status:
                    type: integer
                    description: >-
                      Transmission of the HTTP status code so that all
                      information can be found in one place, but also to correct
                      changes in the status code due to the use of proxy
                      servers.
                  title:
                    type: string
                    description: >-
                      A short, human-readable title for the general error type;
                      the title should not change for given types.
                  detail:
                    type: string
                    description: A human-readable description of the specific error.
                  instance:
                    type: string
                    description: >-
                      This optional key may be present, with a unique URI for
                      the specific error; this will often point to an error log
                      for that specific response.
                  request_id:
                    type: string
                    description: Correlation ID for the original request.
                required:
                  - type
                  - status
                additionalProperties: false
              example:
                status: 405
                type: method_not_allowed
        '406':
          description: >-
            Not Acceptable. The resource does not have a current representation
            that would be acceptable to the user agent. "Accept" header defined
            unsupported value.
          headers:
            upvest-request-id:
              required: true
              schema:
                type: string
                format: uuid
                example: 169ae4c7-ebd7-4041-94da-25369653eba7
          content:
            application/problem+json:
              schema:
                title: Error
                type: object
                description: ''
                properties:
                  type:
                    type: string
                    description: URL to a document describing the error condition.
                  status:
                    type: integer
                    description: >-
                      Transmission of the HTTP status code so that all
                      information can be found in one place, but also to correct
                      changes in the status code due to the use of proxy
                      servers.
                  title:
                    type: string
                    description: >-
                      A short, human-readable title for the general error type;
                      the title should not change for given types.
                  detail:
                    type: string
                    description: A human-readable description of the specific error.
                  instance:
                    type: string
                    description: >-
                      This optional key may be present, with a unique URI for
                      the specific error; this will often point to an error log
                      for that specific response.
                  request_id:
                    type: string
                    description: Correlation ID for the original request.
                required:
                  - type
                  - status
                additionalProperties: false
              example:
                status: 406
                type: not_acceptable
        '429':
          description: >-
            Too Many Requests. The caller has exceeded their quota for the time
            period and has been throttled.
          headers:
            upvest-request-id:
              required: true
              schema:
                type: string
                format: uuid
                example: 169ae4c7-ebd7-4041-94da-25369653eba7
          content:
            application/problem+json:
              schema:
                title: Error
                type: object
                description: ''
                properties:
                  type:
                    type: string
                    description: URL to a document describing the error condition.
                  status:
                    type: integer
                    description: >-
                      Transmission of the HTTP status code so that all
                      information can be found in one place, but also to correct
                      changes in the status code due to the use of proxy
                      servers.
                  title:
                    type: string
                    description: >-
                      A short, human-readable title for the general error type;
                      the title should not change for given types.
                  detail:
                    type: string
                    description: A human-readable description of the specific error.
                  instance:
                    type: string
                    description: >-
                      This optional key may be present, with a unique URI for
                      the specific error; this will often point to an error log
                      for that specific response.
                  request_id:
                    type: string
                    description: Correlation ID for the original request.
                required:
                  - type
                  - status
                additionalProperties: false
              example:
                status: 429
                type: too_many_requests
        '500':
          description: Internal Server Error. The service encountered an unexpected error.
          headers:
            upvest-request-id:
              required: true
              schema:
                type: string
                format: uuid
                example: 169ae4c7-ebd7-4041-94da-25369653eba7
          content:
            application/problem+json:
              schema:
                title: Error
                type: object
                description: ''
                properties:
                  type:
                    type: string
                    description: URL to a document describing the error condition.
                  status:
                    type: integer
                    description: >-
                      Transmission of the HTTP status code so that all
                      information can be found in one place, but also to correct
                      changes in the status code due to the use of proxy
                      servers.
                  title:
                    type: string
                    description: >-
                      A short, human-readable title for the general error type;
                      the title should not change for given types.
                  detail:
                    type: string
                    description: A human-readable description of the specific error.
                  instance:
                    type: string
                    description: >-
                      This optional key may be present, with a unique URI for
                      the specific error; this will often point to an error log
                      for that specific response.
                  request_id:
                    type: string
                    description: Correlation ID for the original request.
                required:
                  - type
                  - status
                additionalProperties: false
              example:
                status: 500
                type: internal_server_error
        '503':
          description: >-
            Service Unavailable. The service handling for this request cannot be
            reached at this time.
          headers:
            upvest-request-id:
              required: true
              schema:
                type: string
                format: uuid
                example: 169ae4c7-ebd7-4041-94da-25369653eba7
          content:
            application/problem+json:
              schema:
                title: Error
                type: object
                description: ''
                properties:
                  type:
                    type: string
                    description: URL to a document describing the error condition.
                  status:
                    type: integer
                    description: >-
                      Transmission of the HTTP status code so that all
                      information can be found in one place, but also to correct
                      changes in the status code due to the use of proxy
                      servers.
                  title:
                    type: string
                    description: >-
                      A short, human-readable title for the general error type;
                      the title should not change for given types.
                  detail:
                    type: string
                    description: A human-readable description of the specific error.
                  instance:
                    type: string
                    description: >-
                      This optional key may be present, with a unique URI for
                      the specific error; this will often point to an error log
                      for that specific response.
                  request_id:
                    type: string
                    description: Correlation ID for the original request.
                required:
                  - type
                  - status
                additionalProperties: false
              example:
                status: 503
                type: method_not_allowed
        '504':
          description: >-
            Gateway Timeout. The service gateway has reached its internal
            timeout.
          headers:
            upvest-request-id:
              required: true
              schema:
                type: string
                format: uuid
                example: 169ae4c7-ebd7-4041-94da-25369653eba7
          content:
            application/problem+json:
              schema:
                title: Error
                type: object
                description: ''
                properties:
                  type:
                    type: string
                    description: URL to a document describing the error condition.
                  status:
                    type: integer
                    description: >-
                      Transmission of the HTTP status code so that all
                      information can be found in one place, but also to correct
                      changes in the status code due to the use of proxy
                      servers.
                  title:
                    type: string
                    description: >-
                      A short, human-readable title for the general error type;
                      the title should not change for given types.
                  detail:
                    type: string
                    description: A human-readable description of the specific error.
                  instance:
                    type: string
                    description: >-
                      This optional key may be present, with a unique URI for
                      the specific error; this will often point to an error log
                      for that specific response.
                  request_id:
                    type: string
                    description: Correlation ID for the original request.
                required:
                  - type
                  - status
                additionalProperties: false
              example:
                status: 504
                type: gateway_timeout
    post:
      operationId: set_tax_residencies
      summary: Update tax residencies
      description: Update tax residencies
      tags:
        - Tax Residencies
      security:
        - oauth-client-credentials:
            - taxes:admin
      parameters:
        - name: idempotency-key
          in: header
          required: true
          schema:
            type: string
            format: uuid
            pattern: >-
              ^[0-9a-fA-F]{8}-?[0-9a-fA-F]{4}-?[0-5][0-9a-fA-F]{3}-?[089abAB][0-9a-fA-F]{3}-?[0-9a-fA-F]{12}$
            example: ccb07f42-4104-44ad-8e1f-c660bb7b269c
          description: >
            A UUID to be used as an idempotency key.  This prevents a duplicate
            request from being replayed.

            https://docs.upvest.co/documentation/concepts/api_concepts/idempotency
      requestBody:
        content:
          application/json:
            schema:
              title: Tax Residencies - Set - Request
              type: object
              properties:
                tax_residencies:
                  type: array
                  minItems: 1
                  items:
                    title: Tax residency for Create Request
                    oneOf:
                      - type: object
                        title: With tax identifier number
                        properties:
                          country:
                            description: >-
                              Accepted country code. [ISO 3166-1 alpha-2
                              codes](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2).
                            type: string
                            enum:
                              - AD
                              - AE
                              - AF
                              - AG
                              - AI
                              - AL
                              - AM
                              - AO
                              - AQ
                              - AR
                              - AS
                              - AT
                              - AU
                              - AW
                              - AX
                              - AZ
                              - BA
                              - BB
                              - BD
                              - BE
                              - BF
                              - BG
                              - BH
                              - BI
                              - BJ
                              - BL
                              - BM
                              - BN
                              - BO
                              - BQ
                              - BR
                              - BS
                              - BT
                              - BV
                              - BW
                              - BY
                              - BZ
                              - CA
                              - CC
                              - CD
                              - CF
                              - CG
                              - CH
                              - CI
                              - CK
                              - CL
                              - CM
                              - CN
                              - CO
                              - CR
                              - CU
                              - CV
                              - CW
                              - CX
                              - CY
                              - CZ
                              - DE
                              - DJ
                              - DK
                              - DM
                              - DO
                              - DZ
                              - EC
                              - EE
                              - EG
                              - EH
                              - ER
                              - ES
                              - ET
                              - FI
                              - FJ
                              - FK
                              - FM
                              - FO
                              - FR
                              - GA
                              - GB
                              - GD
                              - GE
                              - GF
                              - GG
                              - GH
                              - GI
                              - GL
                              - GM
                              - GN
                              - GP
                              - GQ
                              - GR
                              - GS
                              - GT
                              - GU
                              - GW
                              - GY
                              - HK
                              - HM
                              - HN
                              - HR
                              - HT
                              - HU
                              - ID
                              - IE
                              - IL
                              - IM
                              - IN
                              - IO
                              - IQ
                              - IR
                              - IS
                              - IT
                              - JE
                              - JM
                              - JO
                              - JP
                              - KE
                              - KG
                              - KH
                              - KI
                              - KM
                              - KN
                              - KP
                              - KR
                              - KW
                              - KY
                              - KZ
                              - LA
                              - LB
                              - LC
                              - LI
                              - LK
                              - LR
                              - LS
                              - LT
                              - LU
                              - LV
                              - LY
                              - MA
                              - MC
                              - MD
                              - ME
                              - MF
                              - MG
                              - MH
                              - MK
                              - ML
                              - MM
                              - MN
                              - MO
                              - MP
                              - MQ
                              - MR
                              - MS
                              - MT
                              - MU
                              - MV
                              - MW
                              - MX
                              - MY
                              - MZ
                              - NA
                              - NC
                              - NE
                              - NF
                              - NG
                              - NI
                              - NL
                              - 'NO'
                              - NP
                              - NR
                              - NU
                              - NZ
                              - OM
                              - PA
                              - PE
                              - PF
                              - PG
                              - PH
                              - PK
                              - PL
                              - PM
                              - PN
                              - PR
                              - PS
                              - PT
                              - PW
                              - PY
                              - QA
                              - RE
                              - RO
                              - RS
                              - RU
                              - RW
                              - SA
                              - SB
                              - SC
                              - SD
                              - SE
                              - SG
                              - SH
                              - SI
                              - SJ
                              - SK
                              - SL
                              - SM
                              - SN
                              - SO
                              - SR
                              - SS
                              - ST
                              - SV
                              - SX
                              - SY
                              - SZ
                              - TC
                              - TD
                              - TF
                              - TG
                              - TH
                              - TJ
                              - TK
                              - TL
                              - TM
                              - TN
                              - TO
                              - TR
                              - TT
                              - TV
                              - TW
                              - TZ
                              - UA
                              - UG
                              - UM
                              - US
                              - UY
                              - UZ
                              - VA
                              - VC
                              - VE
                              - VG
                              - VI
                              - VN
                              - VU
                              - WF
                              - WS
                              - XK
                              - YE
                              - YT
                              - ZA
                              - ZM
                              - ZW
                          tax_identifier_number:
                            type: string
                            maxLength: 20
                            minLength: 1
                            description: Tax identifier number
                        required:
                          - country
                          - tax_identifier_number
                      - type: object
                        title: Without tax identifier number
                        properties:
                          country:
                            description: >-
                              Accepted country code. [ISO 3166-1 alpha-2
                              codes](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2).
                            type: string
                            enum:
                              - AD
                              - AE
                              - AF
                              - AG
                              - AI
                              - AL
                              - AM
                              - AO
                              - AQ
                              - AR
                              - AS
                              - AT
                              - AU
                              - AW
                              - AX
                              - AZ
                              - BA
                              - BB
                              - BD
                              - BE
                              - BF
                              - BG
                              - BH
                              - BI
                              - BJ
                              - BL
                              - BM
                              - BN
                              - BO
                              - BQ
                              - BR
                              - BS
                              - BT
                              - BV
                              - BW
                              - BY
                              - BZ
                              - CA
                              - CC
                              - CD
                              - CF
                              - CG
                              - CH
                              - CI
                              - CK
                              - CL
                              - CM
                              - CN
                              - CO
                              - CR
                              - CU
                              - CV
                              - CW
                              - CX
                              - CY
                              - CZ
                              - DE
                              - DJ
                              - DK
                              - DM
                              - DO
                              - DZ
                              - EC
                              - EE
                              - EG
                              - EH
                              - ER
                              - ES
                              - ET
                              - FI
                              - FJ
                              - FK
                              - FM
                              - FO
                              - FR
                              - GA
                              - GB
                              - GD
                              - GE
                              - GF
                              - GG
                              - GH
                              - GI
                              - GL
                              - GM
                              - GN
                              - GP
                              - GQ
                              - GR
                              - GS
                              - GT
                              - GU
                              - GW
                              - GY
                              - HK
                              - HM
                              - HN
                              - HR
                              - HT
                              - HU
                              - ID
                              - IE
                              - IL
                              - IM
                              - IN
                              - IO
                              - IQ
                              - IR
                              - IS
                              - IT
                              - JE
                              - JM
                              - JO
                              - JP
                              - KE
                              - KG
                              - KH
                              - KI
                              - KM
                              - KN
                              - KP
                              - KR
                              - KW
                              - KY
                              - KZ
                              - LA
                              - LB
                              - LC
                              - LI
                              - LK
                              - LR
                              - LS
                              - LT
                              - LU
                              - LV
                              - LY
                              - MA
                              - MC
                              - MD
                              - ME
                              - MF
                              - MG
                              - MH
                              - MK
                              - ML
                              - MM
                              - MN
                              - MO
                              - MP
                              - MQ
                              - MR
                              - MS
                              - MT
                              - MU
                              - MV
                              - MW
                              - MX
                              - MY
                              - MZ
                              - NA
                              - NC
                              - NE
                              - NF
                              - NG
                              - NI
                              - NL
                              - 'NO'
                              - NP
                              - NR
                              - NU
                              - NZ
                              - OM
                              - PA
                              - PE
                              - PF
                              - PG
                              - PH
                              - PK
                              - PL
                              - PM
                              - PN
                              - PR
                              - PS
                              - PT
                              - PW
                              - PY
                              - QA
                              - RE
                              - RO
                              - RS
                              - RU
                              - RW
                              - SA
                              - SB
                              - SC
                              - SD
                              - SE
                              - SG
                              - SH
                              - SI
                              - SJ
                              - SK
                              - SL
                              - SM
                              - SN
                              - SO
                              - SR
                              - SS
                              - ST
                              - SV
                              - SX
                              - SY
                              - SZ
                              - TC
                              - TD
                              - TF
                              - TG
                              - TH
                              - TJ
                              - TK
                              - TL
                              - TM
                              - TN
                              - TO
                              - TR
                              - TT
                              - TV
                              - TW
                              - TZ
                              - UA
                              - UG
                              - UM
                              - US
                              - UY
                              - UZ
                              - VA
                              - VC
                              - VE
                              - VG
                              - VI
                              - VN
                              - VU
                              - WF
                              - WS
                              - XK
                              - YE
                              - YT
                              - ZA
                              - ZM
                              - ZW
                          missing_tin_reason:
                            type: string
                            enum:
                              - TIN_NOT_YET_ASSIGNED
                              - COUNTRY_HAS_NO_TIN
                              - OTHER_REASONS
                            description: >-
                              Reason why TIN is missing

                              * TIN_NOT_YET_ASSIGNED - Indicates that the tax
                              identification number has not yet been assigned by
                              the tax authorities. A common example is, that a
                              user has moved to a country and thus became
                              taxable, but that the tax authorities have not yet
                              assigned the TIN to this user.

                              * COUNTRY_HAS_NO_TIN - Indicates that the specific
                              country does not provide a TIN.

                              * OTHER_REASONS - Applies in case of other reasons
                              - i.e. when a user does not have the TIN at hand.
                              Note this may cause additional inquiries by our
                              customer service team.
                        required:
                          - country
                          - missing_tin_reason
              required:
                - tax_residencies
              additionalProperties: false
            examples:
              one:
                summary: One residency
                value:
                  tax_residencies:
                    - country: DE
                      tax_identifier_number: '12345678901'
              multiple:
                summary: Multiple residencies
                value:
                  tax_residencies:
                    - country: IT
                      tax_identifier_number: ABCDEF12G34H567I
                    - country: FR
                      missing_tin_reason: TIN_NOT_YET_ASSIGNED
                    - country: DE
                      tax_identifier_number: '12345678901'
      responses:
        '200':
          description: User tax residencies
          headers:
            upvest-request-id:
              required: true
              schema:
                type: string
                format: uuid
                example: 169ae4c7-ebd7-4041-94da-25369653eba7
          content:
            application/json:
              schema:
                title: Tax residency Record
                type: object
                properties:
                  created_at:
                    type: string
                    format: date-time
                    description: >-
                      Date and time when the resource was created. [RFC
                      3339-5](https://datatracker.ietf.org/doc/html/rfc3339#section-5.6),
                      [ISO8601
                      UTC](https://www.iso.org/iso-8601-date-and-time-format.html)
                  updated_at:
                    type: string
                    format: date-time
                    description: >-
                      Date and time when the resource was last updated. [RFC
                      3339-5](https://datatracker.ietf.org/doc/html/rfc3339#section-5.6),
                      [ISO8601
                      UTC](https://www.iso.org/iso-8601-date-and-time-format.html)
                  tax_residencies:
                    type: array
                    items:
                      title: Tax residency
                      oneOf:
                        - type: object
                          title: With tax identifier number
                          properties:
                            country:
                              description: >-
                                Accepted country code. [ISO 3166-1 alpha-2
                                codes](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2).
                              type: string
                              enum:
                                - AD
                                - AE
                                - AF
                                - AG
                                - AI
                                - AL
                                - AM
                                - AO
                                - AQ
                                - AR
                                - AS
                                - AT
                                - AU
                                - AW
                                - AX
                                - AZ
                                - BA
                                - BB
                                - BD
                                - BE
                                - BF
                                - BG
                                - BH
                                - BI
                                - BJ
                                - BL
                                - BM
                                - BN
                                - BO
                                - BQ
                                - BR
                                - BS
                                - BT
                                - BV
                                - BW
                                - BY
                                - BZ
                                - CA
                                - CC
                                - CD
                                - CF
                                - CG
                                - CH
                                - CI
                                - CK
                                - CL
                                - CM
                                - CN
                                - CO
                                - CR
                                - CU
                                - CV
                                - CW
                                - CX
                                - CY
                                - CZ
                                - DE
                                - DJ
                                - DK
                                - DM
                                - DO
                                - DZ
                                - EC
                                - EE
                                - EG
                                - EH
                                - ER
                                - ES
                                - ET
                                - FI
                                - FJ
                                - FK
                                - FM
                                - FO
                                - FR
                                - GA
                                - GB
                                - GD
                                - GE
                                - GF
                                - GG
                                - GH
                                - GI
                                - GL
                                - GM
                                - GN
                                - GP
                                - GQ
                                - GR
                                - GS
                                - GT
                                - GU
                                - GW
                                - GY
                                - HK
                                - HM
                                - HN
                                - HR
                                - HT
                                - HU
                                - ID
                                - IE
                                - IL
                                - IM
                                - IN
                                - IO
                                - IQ
                                - IR
                                - IS
                                - IT
                                - JE
                                - JM
                                - JO
                                - JP
                                - KE
                                - KG
                                - KH
                                - KI
                                - KM
                                - KN
                                - KP
                                - KR
                                - KW
                                - KY
                                - KZ
                                - LA
                                - LB
                                - LC
                                - LI
                                - LK
                                - LR
                                - LS
                                - LT
                                - LU
                                - LV
                                - LY
                                - MA
                                - MC
                                - MD
                                - ME
                                - MF
                                - MG
                                - MH
                                - MK
                                - ML
                                - MM
                                - MN
                                - MO
                                - MP
                                - MQ
                                - MR
                                - MS
                                - MT
                                - MU
                                - MV
                                - MW
                                - MX
                                - MY
                                - MZ
                                - NA
                                - NC
                                - NE
                                - NF
                                - NG
                                - NI
                                - NL
                                - 'NO'
                                - NP
                                - NR
                                - NU
                                - NZ
                                - OM
                                - PA
                                - PE
                                - PF
                                - PG
                                - PH
                                - PK
                                - PL
                                - PM
                                - PN
                                - PR
                                - PS
                                - PT
                                - PW
                                - PY
                                - QA
                                - RE
                                - RO
                                - RS
                                - RU
                                - RW
                                - SA
                                - SB
                                - SC
                                - SD
                                - SE
                                - SG
                                - SH
                                - SI
                                - SJ
                                - SK
                                - SL
                                - SM
                                - SN
                                - SO
                                - SR
                                - SS
                                - ST
                                - SV
                                - SX
                                - SY
                                - SZ
                                - TC
                                - TD
                                - TF
                                - TG
                                - TH
                                - TJ
                                - TK
                                - TL
                                - TM
                                - TN
                                - TO
                                - TR
                                - TT
                                - TV
                                - TW
                                - TZ
                                - UA
                                - UG
                                - UM
                                - US
                                - UY
                                - UZ
                                - VA
                                - VC
                                - VE
                                - VG
                                - VI
                                - VN
                                - VU
                                - WF
                                - WS
                                - XK
                                - YE
                                - YT
                                - ZA
                                - ZM
                                - ZW
                            tax_identifier_number:
                              type: string
                              maxLength: 20
                              minLength: 1
                              description: Tax identifier number
                          required:
                            - country
                            - tax_identifier_number
                        - type: object
                          title: Without tax identifier number
                          properties:
                            country:
                              description: >-
                                Accepted country code. [ISO 3166-1 alpha-2
                                codes](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2).
                              type: string
                              enum:
                                - AD
                                - AE
                                - AF
                                - AG
                                - AI
                                - AL
                                - AM
                                - AO
                                - AQ
                                - AR
                                - AS
                                - AT
                                - AU
                                - AW
                                - AX
                                - AZ
                                - BA
                                - BB
                                - BD
                                - BE
                                - BF
                                - BG
                                - BH
                                - BI
                                - BJ
                                - BL
                                - BM
                                - BN
                                - BO
                                - BQ
                                - BR
                                - BS
                                - BT
                                - BV
                                - BW
                                - BY
                                - BZ
                                - CA
                                - CC
                                - CD
                                - CF
                                - CG
                                - CH
                                - CI
                                - CK
                                - CL
                                - CM
                                - CN
                                - CO
                                - CR
                                - CU
                                - CV
                                - CW
                                - CX
                                - CY
                                - CZ
                                - DE
                                - DJ
                                - DK
                                - DM
                                - DO
                                - DZ
                                - EC
                                - EE
                                - EG
                                - EH
                                - ER
                                - ES
                                - ET
                                - FI
                                - FJ
                                - FK
                                - FM
                                - FO
                                - FR
                                - GA
                                - GB
                                - GD
                                - GE
                                - GF
                                - GG
                                - GH
                                - GI
                                - GL
                                - GM
                                - GN
                                - GP
                                - GQ
                                - GR
                                - GS
                                - GT
                                - GU
                                - GW
                                - GY
                                - HK
                                - HM
                                - HN
                                - HR
                                - HT
                                - HU
                                - ID
                                - IE
                                - IL
                                - IM
                                - IN
                                - IO
                                - IQ
                                - IR
                                - IS
                                - IT
                                - JE
                                - JM
                                - JO
                                - JP
                                - KE
                                - KG
                                - KH
                                - KI
                                - KM
                                - KN
                                - KP
                                - KR
                                - KW
                                - KY
                                - KZ
                                - LA
                                - LB
                                - LC
                                - LI
                                - LK
                                - LR
                                - LS
                                - LT
                                - LU
                                - LV
                                - LY
                                - MA
                                - MC
                                - MD
                                - ME
                                - MF
                                - MG
                                - MH
                                - MK
                                - ML
                                - MM
                                - MN
                                - MO
                                - MP
                                - MQ
                                - MR
                                - MS
                                - MT
                                - MU
                                - MV
                                - MW
                                - MX
                                - MY
                                - MZ
                                - NA
                                - NC
                                - NE
                                - NF
                                - NG
                                - NI
                                - NL
                                - 'NO'
                                - NP
                                - NR
                                - NU
                                - NZ
                                - OM
                                - PA
                                - PE
                                - PF
                                - PG
                                - PH
                                - PK
                                - PL
                                - PM
                                - PN
                                - PR
                                - PS
                                - PT
                                - PW
                                - PY
                                - QA
                                - RE
                                - RO
                                - RS
                                - RU
                                - RW
                                - SA
                                - SB
                                - SC
                                - SD
                                - SE
                                - SG
                                - SH
                                - SI
                                - SJ
                                - SK
                                - SL
                                - SM
                                - SN
                                - SO
                                - SR
                                - SS
                                - ST
                                - SV
                                - SX
                                - SY
                                - SZ
                                - TC
                                - TD
                                - TF
                                - TG
                                - TH
                                - TJ
                                - TK
                                - TL
                                - TM
                                - TN
                                - TO
                                - TR
                                - TT
                                - TV
                                - TW
                                - TZ
                                - UA
                                - UG
                                - UM
                                - US
                                - UY
                                - UZ
                                - VA
                                - VC
                                - VE
                                - VG
                                - VI
                                - VN
                                - VU
                                - WF
                                - WS
                                - XK
                                - YE
                                - YT
                                - ZA
                                - ZM
                                - ZW
                            missing_tin_reason:
                              type: string
                              enum:
                                - TIN_NOT_YET_ASSIGNED
                                - COUNTRY_HAS_NO_TIN
                                - OTHER_REASONS
                              description: >-
                                Reason why TIN is missing

                                * TIN_NOT_YET_ASSIGNED - Indicates that the tax
                                identification number has not yet been assigned
                                by the tax authorities. A common example is,
                                that a user has moved to a country and thus
                                became taxable, but that the tax authorities
                                have not yet assigned the TIN to this user.

                                * COUNTRY_HAS_NO_TIN - Indicates that the
                                specific country does not provide a TIN.

                                * OTHER_REASONS - Applies in case of other
                                reasons - i.e. when a user does not have the TIN
                                at hand. Note this may cause additional
                                inquiries by our customer service team.
                          required:
                            - country
                            - missing_tin_reason
                  status:
                    type: string
                    enum:
                      - PENDING
                      - ACTIVE
                    description: >-
                      Tax residency status

                      * PENDING - It indicates that the tax residency records
                      are not yet processed by Upvest.

                      * ACTIVE - It indicates that tax residency records are
                      processed, and the tax residency record is the one in use.
                required:
                  - updated_at
                  - created_at
                  - tax_residencies
                  - status
                additionalProperties: false
              example:
                created_at: '2021-07-21T14:10:00.00Z'
                updated_at: '2021-07-21T14:10:00.00Z'
                tax_residencies:
                  - country: AT
                    missing_tin_reason: TIN_NOT_YET_ASSIGNED
                  - country: DE
                    tax_identifier_number: '12345678901'
                status: ACTIVE
        '400':
          description: Bad Request. The incoming request had a malformed parameter/object.
          headers:
            upvest-request-id:
              required: true
              schema:
                type: string
                format: uuid
                example: 169ae4c7-ebd7-4041-94da-25369653eba7
          content:
            application/problem+json:
              schema:
                title: Error
                type: object
                description: ''
                properties:
                  type:
                    type: string
                    description: URL to a document describing the error condition.
                  status:
                    type: integer
                    description: >-
                      Transmission of the HTTP status code so that all
                      information can be found in one place, but also to correct
                      changes in the status code due to the use of proxy
                      servers.
                  title:
                    type: string
                    description: >-
                      A short, human-readable title for the general error type;
                      the title should not change for given types.
                  detail:
                    type: string
                    description: A human-readable description of the specific error.
                  instance:
                    type: string
                    description: >-
                      This optional key may be present, with a unique URI for
                      the specific error; this will often point to an error log
                      for that specific response.
                  request_id:
                    type: string
                    description: Correlation ID for the original request.
                required:
                  - type
                  - status
                additionalProperties: false
              example:
                status: 400
                type: bad_request
        '401':
          description: Unauthorized. The caller has not been authenticated.
          headers:
            upvest-request-id:
              required: true
              schema:
                type: string
                format: uuid
                example: 169ae4c7-ebd7-4041-94da-25369653eba7
          content:
            application/problem+json:
              schema:
                title: Error
                type: object
                description: ''
                properties:
                  type:
                    type: string
                    description: URL to a document describing the error condition.
                  status:
                    type: integer
                    description: >-
                      Transmission of the HTTP status code so that all
                      information can be found in one place, but also to correct
                      changes in the status code due to the use of proxy
                      servers.
                  title:
                    type: string
                    description: >-
                      A short, human-readable title for the general error type;
                      the title should not change for given types.
                  detail:
                    type: string
                    description: A human-readable description of the specific error.
                  instance:
                    type: string
                    description: >-
                      This optional key may be present, with a unique URI for
                      the specific error; this will often point to an error log
                      for that specific response.
                  request_id:
                    type: string
                    description: Correlation ID for the original request.
                required:
                  - type
                  - status
                additionalProperties: false
              example:
                status: 401
                type: unauthorized
        '403':
          description: >-
            Forbidden. The caller has been authenticated but is not allowed to
            take the requested action.
          headers:
            upvest-request-id:
              required: true
              schema:
                type: string
                format: uuid
                example: 169ae4c7-ebd7-4041-94da-25369653eba7
          content:
            application/problem+json:
              schema:
                title: Error
                type: object
                description: ''
                properties:
                  type:
                    type: string
                    description: URL to a document describing the error condition.
                  status:
                    type: integer
                    description: >-
                      Transmission of the HTTP status code so that all
                      information can be found in one place, but also to correct
                      changes in the status code due to the use of proxy
                      servers.
                  title:
                    type: string
                    description: >-
                      A short, human-readable title for the general error type;
                      the title should not change for given types.
                  detail:
                    type: string
                    description: A human-readable description of the specific error.
                  instance:
                    type: string
                    description: >-
                      This optional key may be present, with a unique URI for
                      the specific error; this will often point to an error log
                      for that specific response.
                  request_id:
                    type: string
                    description: Correlation ID for the original request.
                required:
                  - type
                  - status
                additionalProperties: false
              example:
                status: 403
                type: forbidden
        '404':
          description: Not Found. The requested resource could not be found.
          headers:
            upvest-request-id:
              required: true
              schema:
                type: string
                format: uuid
                example: 169ae4c7-ebd7-4041-94da-25369653eba7
          content:
            application/problem+json:
              schema:
                title: Error
                type: object
                description: ''
                properties:
                  type:
                    type: string
                    description: URL to a document describing the error condition.
                  status:
                    type: integer
                    description: >-
                      Transmission of the HTTP status code so that all
                      information can be found in one place, but also to correct
                      changes in the status code due to the use of proxy
                      servers.
                  title:
                    type: string
                    description: >-
                      A short, human-readable title for the general error type;
                      the title should not change for given types.
                  detail:
                    type: string
                    description: A human-readable description of the specific error.
                  instance:
                    type: string
                    description: >-
                      This optional key may be present, with a unique URI for
                      the specific error; this will often point to an error log
                      for that specific response.
                  request_id:
                    type: string
                    description: Correlation ID for the original request.
                required:
                  - type
                  - status
                additionalProperties: false
              example:
                status: 404
                type: not_found
        '406':
          description: >-
            Not Acceptable. The resource does not have a current representation
            that would be acceptable to the user agent. "Accept" header defined
            unsupported value.
          headers:
            upvest-request-id:
              required: true
              schema:
                type: string
                format: uuid
                example: 169ae4c7-ebd7-4041-94da-25369653eba7
          content:
            application/problem+json:
              schema:
                title: Error
                type: object
                description: ''
                properties:
                  type:
                    type: string
                    description: URL to a document describing the error condition.
                  status:
                    type: integer
                    description: >-
                      Transmission of the HTTP status code so that all
                      information can be found in one place, but also to correct
                      changes in the status code due to the use of proxy
                      servers.
                  title:
                    type: string
                    description: >-
                      A short, human-readable title for the general error type;
                      the title should not change for given types.
                  detail:
                    type: string
                    description: A human-readable description of the specific error.
                  instance:
                    type: string
                    description: >-
                      This optional key may be present, with a unique URI for
                      the specific error; this will often point to an error log
                      for that specific response.
                  request_id:
                    type: string
                    description: Correlation ID for the original request.
                required:
                  - type
                  - status
                additionalProperties: false
              example:
                status: 406
                type: not_acceptable
        '429':
          description: >-
            Too Many Requests. The caller has exceeded their quota for the time
            period and has been throttled.
          headers:
            upvest-request-id:
              required: true
              schema:
                type: string
                format: uuid
                example: 169ae4c7-ebd7-4041-94da-25369653eba7
          content:
            application/problem+json:
              schema:
                title: Error
                type: object
                description: ''
                properties:
                  type:
                    type: string
                    description: URL to a document describing the error condition.
                  status:
                    type: integer
                    description: >-
                      Transmission of the HTTP status code so that all
                      information can be found in one place, but also to correct
                      changes in the status code due to the use of proxy
                      servers.
                  title:
                    type: string
                    description: >-
                      A short, human-readable title for the general error type;
                      the title should not change for given types.
                  detail:
                    type: string
                    description: A human-readable description of the specific error.
                  instance:
                    type: string
                    description: >-
                      This optional key may be present, with a unique URI for
                      the specific error; this will often point to an error log
                      for that specific response.
                  request_id:
                    type: string
                    description: Correlation ID for the original request.
                required:
                  - type
                  - status
                additionalProperties: false
              example:
                status: 429
                type: too_many_requests
        '500':
          description: Internal Server Error. The service encountered an unexpected error.
          headers:
            upvest-request-id:
              required: true
              schema:
                type: string
                format: uuid
                example: 169ae4c7-ebd7-4041-94da-25369653eba7
          content:
            application/problem+json:
              schema:
                title: Error
                type: object
                description: ''
                properties:
                  type:
                    type: string
                    description: URL to a document describing the error condition.
                  status:
                    type: integer
                    description: >-
                      Transmission of the HTTP status code so that all
                      information can be found in one place, but also to correct
                      changes in the status code due to the use of proxy
                      servers.
                  title:
                    type: string
                    description: >-
                      A short, human-readable title for the general error type;
                      the title should not change for given types.
                  detail:
                    type: string
                    description: A human-readable description of the specific error.
                  instance:
                    type: string
                    description: >-
                      This optional key may be present, with a unique URI for
                      the specific error; this will often point to an error log
                      for that specific response.
                  request_id:
                    type: string
                    description: Correlation ID for the original request.
                required:
                  - type
                  - status
                additionalProperties: false
              example:
                status: 500
                type: internal_server_error
        '503':
          description: >-
            Service Unavailable. The service handling for this request cannot be
            reached at this time.
          headers:
            upvest-request-id:
              required: true
              schema:
                type: string
                format: uuid
                example: 169ae4c7-ebd7-4041-94da-25369653eba7
          content:
            application/problem+json:
              schema:
                title: Error
                type: object
                description: ''
                properties:
                  type:
                    type: string
                    description: URL to a document describing the error condition.
                  status:
                    type: integer
                    description: >-
                      Transmission of the HTTP status code so that all
                      information can be found in one place, but also to correct
                      changes in the status code due to the use of proxy
                      servers.
                  title:
                    type: string
                    description: >-
                      A short, human-readable title for the general error type;
                      the title should not change for given types.
                  detail:
                    type: string
                    description: A human-readable description of the specific error.
                  instance:
                    type: string
                    description: >-
                      This optional key may be present, with a unique URI for
                      the specific error; this will often point to an error log
                      for that specific response.
                  request_id:
                    type: string
                    description: Correlation ID for the original request.
                required:
                  - type
                  - status
                additionalProperties: false
              example:
                status: 503
                type: method_not_allowed
        '504':
          description: >-
            Gateway Timeout. The service gateway has reached its internal
            timeout.
          headers:
            upvest-request-id:
              required: true
              schema:
                type: string
                format: uuid
                example: 169ae4c7-ebd7-4041-94da-25369653eba7
          content:
            application/problem+json:
              schema:
                title: Error
                type: object
                description: ''
                properties:
                  type:
                    type: string
                    description: URL to a document describing the error condition.
                  status:
                    type: integer
                    description: >-
                      Transmission of the HTTP status code so that all
                      information can be found in one place, but also to correct
                      changes in the status code due to the use of proxy
                      servers.
                  title:
                    type: string
                    description: >-
                      A short, human-readable title for the general error type;
                      the title should not change for given types.
                  detail:
                    type: string
                    description: A human-readable description of the specific error.
                  instance:
                    type: string
                    description: >-
                      This optional key may be present, with a unique URI for
                      the specific error; this will often point to an error log
                      for that specific response.
                  request_id:
                    type: string
                    description: Correlation ID for the original request.
                required:
                  - type
                  - status
                additionalProperties: false
              example:
                status: 504
                type: gateway_timeout
  /portfolios/allocations:
    parameters:
      - name: upvest-client-id
        in: header
        description: Tenant Client ID
        required: true
        schema:
          type: string
          format: uuid
          example: ebabcf4d-61c3-4942-875c-e265a7c2d062
      - name: authorization
        in: header
        description: |
          Bearer (access) token from the OAuth flow with correct scopes.
          https://datatracker.ietf.org/doc/html/rfc6750
        required: true
        schema:
          type: string
          pattern: ^Bearer [a-zA-Z0-9\-\._~+/]*=*
          example: Bearer c2VjcmV0Cg==
      - name: signature
        in: header
        required: true
        schema:
          type: string
        description: >-
          https://tools.ietf.org/id/draft-ietf-httpbis-message-signatures-01.html#name-the-signature-http-header
      - name: signature-input
        in: header
        required: true
        schema:
          type: string
        description: >-
          https://tools.ietf.org/id/draft-ietf-httpbis-message-signatures-01.html#name-the-signature-input-http-he
      - name: upvest-api-version
        in: header
        required: false
        schema:
          type: string
          enum:
            - '1'
          default: '1'
          example: '1'
        description: 'Upvest API version (Note: Do not include quotation marks)'
    get:
      operationId: list_portfolios_allocations
      summary: List portfolios allocations
      description: List portfolios allocations
      tags:
        - Portfolios
      security:
        - oauth-client-credentials:
            - portfolios:read
            - portfolios:admin
      parameters:
        - name: sort
          in: query
          required: false
          schema:
            type: string
            enum:
              - id
            default: id
          description: Sort the result by `id`.
        - name: order
          in: query
          required: false
          schema:
            type: string
            enum:
              - ASC
            default: ASC
          description: >-
            Sort order of the result list if the `sort` parameter is specified.
            By default, only ASC for ascending sort.
        - name: offset
          in: query
          schema:
            type: integer
            minimum: 0
            format: int32
          allowEmptyValue: true
          description: >-
            Use the `offset` argument to specify where in the list of results to
            start when returning items for a particular query.
        - name: limit
          in: query
          schema:
            type: integer
            format: int32
            default: 100
            minimum: 0
            maximum: 1000
          allowEmptyValue: true
          description: >-
            Use the `limit` argument to specify the maximum number of items
            returned.
        - name: start_date
          in: query
          required: false
          schema:
            type: string
            title: Date in YYYY-MM-DD format. RFC 3339, section 5.6
          description: >-
            Returns portfolio allocations with dates starting from and including
            this date (UTC)
          example: '2022-10-14T10:10:10Z'
        - name: end_date
          in: query
          required: false
          schema:
            type: string
            title: Date in YYYY-MM-DD format. RFC 3339, section 5.6
          description: Returns portfolio allocations with dates up until this date (UTC)
          example: '2022-10-14T10:10:10Z'
        - name: instrument_ids
          in: query
          required: false
          schema:
            type: string
          description: Filters portfolio allocations containing the instruments ID's
          example: >-
            bf72bdc1-b342-494f-9739-b27ae9011b86,dcbe2cf4-4f37-4fe5-9393-4fb52bb87fab
      responses:
        '200':
          description: Portfolios allocations
          headers:
            upvest-request-id:
              required: true
              schema:
                type: string
                format: uuid
                example: 169ae4c7-ebd7-4041-94da-25369653eba7
          content:
            application/json:
              schema:
                title: Portfolios allocations - List - Response
                type: object
                properties:
                  meta:
                    type: object
                    properties:
                      offset:
                        type: integer
                        description: Amount of resource to offset in the response.
                      limit:
                        type: integer
                        description: Total limit of the response.
                      count:
                        type: integer
                        description: Count of the resources returned in the response.
                      total_count:
                        type: integer
                        description: Total count of all the resources.
                      sort:
                        type: string
                        description: The field that the list is sorted by.
                      order:
                        type: string
                        description: |-
                          The ordering of the response.
                          * ASC - Ascending order
                          * DESC - Descending order
                        enum:
                          - ASC
                          - DESC
                    required:
                      - offset
                      - limit
                      - count
                      - total_count
                  data:
                    type: array
                    items:
                      title: Portfolios allocation
                      type: object
                      properties:
                        id:
                          title: Portfolio allocation unique identifier
                          type: string
                          format: uuid
                        created_at:
                          type: string
                          format: date-time
                          description: >-
                            Date and time when the resource was created. [RFC
                            3339-5](https://datatracker.ietf.org/doc/html/rfc3339#section-5.6),
                            [ISO8601
                            UTC](https://www.iso.org/iso-8601-date-and-time-format.html)
                        updated_at:
                          type: string
                          format: date-time
                          description: >-
                            Date and time when the resource was last updated.
                            [RFC
                            3339-5](https://datatracker.ietf.org/doc/html/rfc3339#section-5.6),
                            [ISO8601
                            UTC](https://www.iso.org/iso-8601-date-and-time-format.html)
                        name:
                          description: Allocation name
                          type: string
                        allocation:
                          description: List of portfolios allocations
                          type: array
                          items:
                            type: object
                            properties:
                              instrument_id:
                                oneOf:
                                  - title: >-
                                      International securities identification
                                      number
                                    type: string
                                    description: >-
                                      International securities identification
                                      number defined by [ISO
                                      6166](https://en.wikipedia.org/wiki/International_Securities_Identification_Number).
                                    pattern: ^[A-Z]{2}[A-Z0-9]{9}[0-9]$
                                  - title: Unique identifier
                                    description: UPVEST instrument identifier
                                    type: string
                                    format: uuid
                                    pattern: >-
                                      ^[0-9a-fA-F]{8}-?[0-9a-fA-F]{4}-?[0-5][0-9a-fA-F]{3}-?[089abAB][0-9a-fA-F]{3}-?[0-9a-fA-F]{12}$
                              instrument_id_type:
                                description: >-
                                  The type of the ID used in the request.

                                  * ISIN - International Securities
                                  Identification Number

                                  * UPVEST - UPVEST's unique instrument
                                  identifier
                                enum:
                                  - ISIN
                                  - UPVEST
                                default: ISIN
                                type: string
                              weight:
                                description: Instrument allocation weight
                                type: string
                                pattern: ^(100|[0-9]{1,2}(\.[0-9]{1,5})?)$
                            required:
                              - instrument_id
                              - instrument_id_type
                              - weight
                            additionalProperties: false
                      required:
                        - id
                        - created_at
                        - updated_at
                        - name
                        - allocation
                      additionalProperties: false
                required:
                  - meta
                  - data
                additionalProperties: false
              example:
                meta:
                  offset: 0
                  limit: 100
                  count: 1
                  total_count: 1
                  sort: id
                  order: ASC
                data:
                  - id: c27c1fdc-b129-4d7a-95ac-c8a4f05d2804
                    created_at: '2021-07-21T14:10:00.00Z'
                    updated_at: '2021-07-21T14:10:00.00Z'
                    name: Allocation 1
                    allocation:
                      - instrument_id: IE00B0M62Q58
                        instrument_id_type: ISIN
                        weight: '0.7'
                      - instrument_id: US0378331005
                        instrument_id_type: ISIN
                        weight: '0.3'
        '400':
          description: Bad Request. The incoming request had a malformed parameter/object.
          headers:
            upvest-request-id:
              required: true
              schema:
                type: string
                format: uuid
                example: 169ae4c7-ebd7-4041-94da-25369653eba7
          content:
            application/problem+json:
              schema:
                title: Error
                type: object
                description: ''
                properties:
                  type:
                    type: string
                    description: URL to a document describing the error condition.
                  status:
                    type: integer
                    description: >-
                      Transmission of the HTTP status code so that all
                      information can be found in one place, but also to correct
                      changes in the status code due to the use of proxy
                      servers.
                  title:
                    type: string
                    description: >-
                      A short, human-readable title for the general error type;
                      the title should not change for given types.
                  detail:
                    type: string
                    description: A human-readable description of the specific error.
                  instance:
                    type: string
                    description: >-
                      This optional key may be present, with a unique URI for
                      the specific error; this will often point to an error log
                      for that specific response.
                  request_id:
                    type: string
                    description: Correlation ID for the original request.
                required:
                  - type
                  - status
                additionalProperties: false
              example:
                status: 400
                type: bad_request
        '401':
          description: Unauthorized. The caller has not been authenticated.
          headers:
            upvest-request-id:
              required: true
              schema:
                type: string
                format: uuid
                example: 169ae4c7-ebd7-4041-94da-25369653eba7
          content:
            application/problem+json:
              schema:
                title: Error
                type: object
                description: ''
                properties:
                  type:
                    type: string
                    description: URL to a document describing the error condition.
                  status:
                    type: integer
                    description: >-
                      Transmission of the HTTP status code so that all
                      information can be found in one place, but also to correct
                      changes in the status code due to the use of proxy
                      servers.
                  title:
                    type: string
                    description: >-
                      A short, human-readable title for the general error type;
                      the title should not change for given types.
                  detail:
                    type: string
                    description: A human-readable description of the specific error.
                  instance:
                    type: string
                    description: >-
                      This optional key may be present, with a unique URI for
                      the specific error; this will often point to an error log
                      for that specific response.
                  request_id:
                    type: string
                    description: Correlation ID for the original request.
                required:
                  - type
                  - status
                additionalProperties: false
              example:
                status: 401
                type: unauthorized
        '403':
          description: >-
            Forbidden. The caller has been authenticated but is not allowed to
            take the requested action.
          headers:
            upvest-request-id:
              required: true
              schema:
                type: string
                format: uuid
                example: 169ae4c7-ebd7-4041-94da-25369653eba7
          content:
            application/problem+json:
              schema:
                title: Error
                type: object
                description: ''
                properties:
                  type:
                    type: string
                    description: URL to a document describing the error condition.
                  status:
                    type: integer
                    description: >-
                      Transmission of the HTTP status code so that all
                      information can be found in one place, but also to correct
                      changes in the status code due to the use of proxy
                      servers.
                  title:
                    type: string
                    description: >-
                      A short, human-readable title for the general error type;
                      the title should not change for given types.
                  detail:
                    type: string
                    description: A human-readable description of the specific error.
                  instance:
                    type: string
                    description: >-
                      This optional key may be present, with a unique URI for
                      the specific error; this will often point to an error log
                      for that specific response.
                  request_id:
                    type: string
                    description: Correlation ID for the original request.
                required:
                  - type
                  - status
                additionalProperties: false
              example:
                status: 403
                type: forbidden
        '404':
          description: Not Found. The requested resource could not be found.
          headers:
            upvest-request-id:
              required: true
              schema:
                type: string
                format: uuid
                example: 169ae4c7-ebd7-4041-94da-25369653eba7
          content:
            application/problem+json:
              schema:
                title: Error
                type: object
                description: ''
                properties:
                  type:
                    type: string
                    description: URL to a document describing the error condition.
                  status:
                    type: integer
                    description: >-
                      Transmission of the HTTP status code so that all
                      information can be found in one place, but also to correct
                      changes in the status code due to the use of proxy
                      servers.
                  title:
                    type: string
                    description: >-
                      A short, human-readable title for the general error type;
                      the title should not change for given types.
                  detail:
                    type: string
                    description: A human-readable description of the specific error.
                  instance:
                    type: string
                    description: >-
                      This optional key may be present, with a unique URI for
                      the specific error; this will often point to an error log
                      for that specific response.
                  request_id:
                    type: string
                    description: Correlation ID for the original request.
                required:
                  - type
                  - status
                additionalProperties: false
              example:
                status: 404
                type: not_found
        '405':
          description: >-
            Method Not Allowed. The requested method is not allowed on the
            requested resource.
          headers:
            upvest-request-id:
              required: true
              schema:
                type: string
                format: uuid
                example: 169ae4c7-ebd7-4041-94da-25369653eba7
          content:
            application/problem+json:
              schema:
                title: Error
                type: object
                description: ''
                properties:
                  type:
                    type: string
                    description: URL to a document describing the error condition.
                  status:
                    type: integer
                    description: >-
                      Transmission of the HTTP status code so that all
                      information can be found in one place, but also to correct
                      changes in the status code due to the use of proxy
                      servers.
                  title:
                    type: string
                    description: >-
                      A short, human-readable title for the general error type;
                      the title should not change for given types.
                  detail:
                    type: string
                    description: A human-readable description of the specific error.
                  instance:
                    type: string
                    description: >-
                      This optional key may be present, with a unique URI for
                      the specific error; this will often point to an error log
                      for that specific response.
                  request_id:
                    type: string
                    description: Correlation ID for the original request.
                required:
                  - type
                  - status
                additionalProperties: false
              example:
                status: 405
                type: method_not_allowed
        '406':
          description: >-
            Not Acceptable. The resource does not have a current representation
            that would be acceptable to the user agent. "Accept" header defined
            unsupported value.
          headers:
            upvest-request-id:
              required: true
              schema:
                type: string
                format: uuid
                example: 169ae4c7-ebd7-4041-94da-25369653eba7
          content:
            application/problem+json:
              schema:
                title: Error
                type: object
                description: ''
                properties:
                  type:
                    type: string
                    description: URL to a document describing the error condition.
                  status:
                    type: integer
                    description: >-
                      Transmission of the HTTP status code so that all
                      information can be found in one place, but also to correct
                      changes in the status code due to the use of proxy
                      servers.
                  title:
                    type: string
                    description: >-
                      A short, human-readable title for the general error type;
                      the title should not change for given types.
                  detail:
                    type: string
                    description: A human-readable description of the specific error.
                  instance:
                    type: string
                    description: >-
                      This optional key may be present, with a unique URI for
                      the specific error; this will often point to an error log
                      for that specific response.
                  request_id:
                    type: string
                    description: Correlation ID for the original request.
                required:
                  - type
                  - status
                additionalProperties: false
              example:
                status: 406
                type: not_acceptable
        '429':
          description: >-
            Too Many Requests. The caller has exceeded their quota for the time
            period and has been throttled.
          headers:
            upvest-request-id:
              required: true
              schema:
                type: string
                format: uuid
                example: 169ae4c7-ebd7-4041-94da-25369653eba7
          content:
            application/problem+json:
              schema:
                title: Error
                type: object
                description: ''
                properties:
                  type:
                    type: string
                    description: URL to a document describing the error condition.
                  status:
                    type: integer
                    description: >-
                      Transmission of the HTTP status code so that all
                      information can be found in one place, but also to correct
                      changes in the status code due to the use of proxy
                      servers.
                  title:
                    type: string
                    description: >-
                      A short, human-readable title for the general error type;
                      the title should not change for given types.
                  detail:
                    type: string
                    description: A human-readable description of the specific error.
                  instance:
                    type: string
                    description: >-
                      This optional key may be present, with a unique URI for
                      the specific error; this will often point to an error log
                      for that specific response.
                  request_id:
                    type: string
                    description: Correlation ID for the original request.
                required:
                  - type
                  - status
                additionalProperties: false
              example:
                status: 429
                type: too_many_requests
        '500':
          description: Internal Server Error. The service encountered an unexpected error.
          headers:
            upvest-request-id:
              required: true
              schema:
                type: string
                format: uuid
                example: 169ae4c7-ebd7-4041-94da-25369653eba7
          content:
            application/problem+json:
              schema:
                title: Error
                type: object
                description: ''
                properties:
                  type:
                    type: string
                    description: URL to a document describing the error condition.
                  status:
                    type: integer
                    description: >-
                      Transmission of the HTTP status code so that all
                      information can be found in one place, but also to correct
                      changes in the status code due to the use of proxy
                      servers.
                  title:
                    type: string
                    description: >-
                      A short, human-readable title for the general error type;
                      the title should not change for given types.
                  detail:
                    type: string
                    description: A human-readable description of the specific error.
                  instance:
                    type: string
                    description: >-
                      This optional key may be present, with a unique URI for
                      the specific error; this will often point to an error log
                      for that specific response.
                  request_id:
                    type: string
                    description: Correlation ID for the original request.
                required:
                  - type
                  - status
                additionalProperties: false
              example:
                status: 500
                type: internal_server_error
        '503':
          description: >-
            Service Unavailable. The service handling for this request cannot be
            reached at this time.
          headers:
            upvest-request-id:
              required: true
              schema:
                type: string
                format: uuid
                example: 169ae4c7-ebd7-4041-94da-25369653eba7
          content:
            application/problem+json:
              schema:
                title: Error
                type: object
                description: ''
                properties:
                  type:
                    type: string
                    description: URL to a document describing the error condition.
                  status:
                    type: integer
                    description: >-
                      Transmission of the HTTP status code so that all
                      information can be found in one place, but also to correct
                      changes in the status code due to the use of proxy
                      servers.
                  title:
                    type: string
                    description: >-
                      A short, human-readable title for the general error type;
                      the title should not change for given types.
                  detail:
                    type: string
                    description: A human-readable description of the specific error.
                  instance:
                    type: string
                    description: >-
                      This optional key may be present, with a unique URI for
                      the specific error; this will often point to an error log
                      for that specific response.
                  request_id:
                    type: string
                    description: Correlation ID for the original request.
                required:
                  - type
                  - status
                additionalProperties: false
              example:
                status: 503
                type: method_not_allowed
        '504':
          description: >-
            Gateway Timeout. The service gateway has reached its internal
            timeout.
          headers:
            upvest-request-id:
              required: true
              schema:
                type: string
                format: uuid
                example: 169ae4c7-ebd7-4041-94da-25369653eba7
          content:
            application/problem+json:
              schema:
                title: Error
                type: object
                description: ''
                properties:
                  type:
                    type: string
                    description: URL to a document describing the error condition.
                  status:
                    type: integer
                    description: >-
                      Transmission of the HTTP status code so that all
                      information can be found in one place, but also to correct
                      changes in the status code due to the use of proxy
                      servers.
                  title:
                    type: string
                    description: >-
                      A short, human-readable title for the general error type;
                      the title should not change for given types.
                  detail:
                    type: string
                    description: A human-readable description of the specific error.
                  instance:
                    type: string
                    description: >-
                      This optional key may be present, with a unique URI for
                      the specific error; this will often point to an error log
                      for that specific response.
                  request_id:
                    type: string
                    description: Correlation ID for the original request.
                required:
                  - type
                  - status
                additionalProperties: false
              example:
                status: 504
                type: gateway_timeout
    post:
      operationId: create_portfolios_allocation
      summary: Create portfolios allocation
      description: Create portfolios allocation
      tags:
        - Portfolios
      security:
        - oauth-client-credentials:
            - portfolios:admin
      parameters:
        - name: idempotency-key
          in: header
          required: true
          schema:
            type: string
            format: uuid
            pattern: >-
              ^[0-9a-fA-F]{8}-?[0-9a-fA-F]{4}-?[0-5][0-9a-fA-F]{3}-?[089abAB][0-9a-fA-F]{3}-?[0-9a-fA-F]{12}$
            example: ccb07f42-4104-44ad-8e1f-c660bb7b269c
          description: >
            A UUID to be used as an idempotency key.  This prevents a duplicate
            request from being replayed.

            https://docs.upvest.co/documentation/concepts/api_concepts/idempotency
      requestBody:
        content:
          application/json:
            schema:
              title: Portfolios allocation - Create - Request
              type: object
              properties:
                name:
                  description: Allocation name
                  type: string
                allocation:
                  description: List of portfolios allocations
                  type: array
                  items:
                    type: object
                    properties:
                      instrument_id:
                        oneOf:
                          - title: International securities identification number
                            type: string
                            description: >-
                              International securities identification number
                              defined by [ISO
                              6166](https://en.wikipedia.org/wiki/International_Securities_Identification_Number).
                            pattern: ^[A-Z]{2}[A-Z0-9]{9}[0-9]$
                          - title: Unique identifier
                            description: UPVEST instrument identifier
                            type: string
                            format: uuid
                            pattern: >-
                              ^[0-9a-fA-F]{8}-?[0-9a-fA-F]{4}-?[0-5][0-9a-fA-F]{3}-?[089abAB][0-9a-fA-F]{3}-?[0-9a-fA-F]{12}$
                      instrument_id_type:
                        description: >-
                          The type of the ID used in the request.

                          * ISIN - International Securities Identification
                          Number

                          * UPVEST - UPVEST's unique instrument identifier
                        enum:
                          - ISIN
                          - UPVEST
                        default: ISIN
                        type: string
                      weight:
                        description: Instrument allocation weight
                        type: string
                        pattern: ^(100|[0-9]{1,2}(\.[0-9]{1,5})?)$
                    required:
                      - instrument_id
                      - instrument_id_type
                      - weight
                    additionalProperties: false
              required:
                - allocation
              additionalProperties: false
            example:
              name: Allocation 1
              allocation:
                - instrument_id: IE00B0M62Q58
                  instrument_id_type: ISIN
                  weight: '0.7'
                - instrument_id: US0378331005
                  instrument_id_type: ISIN
                  weight: '0.3'
      responses:
        '200':
          description: Portfolios allocation
          headers:
            upvest-request-id:
              required: true
              schema:
                type: string
                format: uuid
                example: 169ae4c7-ebd7-4041-94da-25369653eba7
          content:
            application/json:
              schema:
                title: Portfolios allocation
                type: object
                properties:
                  id:
                    title: Portfolio allocation unique identifier
                    type: string
                    format: uuid
                  created_at:
                    type: string
                    format: date-time
                    description: >-
                      Date and time when the resource was created. [RFC
                      3339-5](https://datatracker.ietf.org/doc/html/rfc3339#section-5.6),
                      [ISO8601
                      UTC](https://www.iso.org/iso-8601-date-and-time-format.html)
                  updated_at:
                    type: string
                    format: date-time
                    description: >-
                      Date and time when the resource was last updated. [RFC
                      3339-5](https://datatracker.ietf.org/doc/html/rfc3339#section-5.6),
                      [ISO8601
                      UTC](https://www.iso.org/iso-8601-date-and-time-format.html)
                  name:
                    description: Allocation name
                    type: string
                  allocation:
                    description: List of portfolios allocations
                    type: array
                    items:
                      type: object
                      properties:
                        instrument_id:
                          oneOf:
                            - title: International securities identification number
                              type: string
                              description: >-
                                International securities identification number
                                defined by [ISO
                                6166](https://en.wikipedia.org/wiki/International_Securities_Identification_Number).
                              pattern: ^[A-Z]{2}[A-Z0-9]{9}[0-9]$
                            - title: Unique identifier
                              description: UPVEST instrument identifier
                              type: string
                              format: uuid
                              pattern: >-
                                ^[0-9a-fA-F]{8}-?[0-9a-fA-F]{4}-?[0-5][0-9a-fA-F]{3}-?[089abAB][0-9a-fA-F]{3}-?[0-9a-fA-F]{12}$
                        instrument_id_type:
                          description: >-
                            The type of the ID used in the request.

                            * ISIN - International Securities Identification
                            Number

                            * UPVEST - UPVEST's unique instrument identifier
                          enum:
                            - ISIN
                            - UPVEST
                          default: ISIN
                          type: string
                        weight:
                          description: Instrument allocation weight
                          type: string
                          pattern: ^(100|[0-9]{1,2}(\.[0-9]{1,5})?)$
                      required:
                        - instrument_id
                        - instrument_id_type
                        - weight
                      additionalProperties: false
                required:
                  - id
                  - created_at
                  - updated_at
                  - name
                  - allocation
                additionalProperties: false
              example:
                id: 436244bb-4afd-4002-b53b-b1d7a3bca032
                created_at: '2021-07-21T14:10:00.00Z'
                updated_at: '2021-07-21T14:10:00.00Z'
                name: Allocation 1
                allocation:
                  - instrument_id: IE00B0M62Q58
                    instrument_id_type: ISIN
                    weight: '0.7'
                  - instrument_id: US0378331005
                    instrument_id_type: ISIN
                    weight: '0.3'
        '400':
          description: Bad Request. The incoming request had a malformed parameter/object.
          headers:
            upvest-request-id:
              required: true
              schema:
                type: string
                format: uuid
                example: 169ae4c7-ebd7-4041-94da-25369653eba7
          content:
            application/problem+json:
              schema:
                title: Error
                type: object
                description: ''
                properties:
                  type:
                    type: string
                    description: URL to a document describing the error condition.
                  status:
                    type: integer
                    description: >-
                      Transmission of the HTTP status code so that all
                      information can be found in one place, but also to correct
                      changes in the status code due to the use of proxy
                      servers.
                  title:
                    type: string
                    description: >-
                      A short, human-readable title for the general error type;
                      the title should not change for given types.
                  detail:
                    type: string
                    description: A human-readable description of the specific error.
                  instance:
                    type: string
                    description: >-
                      This optional key may be present, with a unique URI for
                      the specific error; this will often point to an error log
                      for that specific response.
                  request_id:
                    type: string
                    description: Correlation ID for the original request.
                required:
                  - type
                  - status
                additionalProperties: false
              example:
                status: 400
                type: bad_request
        '401':
          description: Unauthorized. The caller has not been authenticated.
          headers:
            upvest-request-id:
              required: true
              schema:
                type: string
                format: uuid
                example: 169ae4c7-ebd7-4041-94da-25369653eba7
          content:
            application/problem+json:
              schema:
                title: Error
                type: object
                description: ''
                properties:
                  type:
                    type: string
                    description: URL to a document describing the error condition.
                  status:
                    type: integer
                    description: >-
                      Transmission of the HTTP status code so that all
                      information can be found in one place, but also to correct
                      changes in the status code due to the use of proxy
                      servers.
                  title:
                    type: string
                    description: >-
                      A short, human-readable title for the general error type;
                      the title should not change for given types.
                  detail:
                    type: string
                    description: A human-readable description of the specific error.
                  instance:
                    type: string
                    description: >-
                      This optional key may be present, with a unique URI for
                      the specific error; this will often point to an error log
                      for that specific response.
                  request_id:
                    type: string
                    description: Correlation ID for the original request.
                required:
                  - type
                  - status
                additionalProperties: false
              example:
                status: 401
                type: unauthorized
        '403':
          description: >-
            Forbidden. The caller has been authenticated but is not allowed to
            take the requested action.
          headers:
            upvest-request-id:
              required: true
              schema:
                type: string
                format: uuid
                example: 169ae4c7-ebd7-4041-94da-25369653eba7
          content:
            application/problem+json:
              schema:
                title: Error
                type: object
                description: ''
                properties:
                  type:
                    type: string
                    description: URL to a document describing the error condition.
                  status:
                    type: integer
                    description: >-
                      Transmission of the HTTP status code so that all
                      information can be found in one place, but also to correct
                      changes in the status code due to the use of proxy
                      servers.
                  title:
                    type: string
                    description: >-
                      A short, human-readable title for the general error type;
                      the title should not change for given types.
                  detail:
                    type: string
                    description: A human-readable description of the specific error.
                  instance:
                    type: string
                    description: >-
                      This optional key may be present, with a unique URI for
                      the specific error; this will often point to an error log
                      for that specific response.
                  request_id:
                    type: string
                    description: Correlation ID for the original request.
                required:
                  - type
                  - status
                additionalProperties: false
              example:
                status: 403
                type: forbidden
        '404':
          description: Not Found. The requested resource could not be found.
          headers:
            upvest-request-id:
              required: true
              schema:
                type: string
                format: uuid
                example: 169ae4c7-ebd7-4041-94da-25369653eba7
          content:
            application/problem+json:
              schema:
                title: Error
                type: object
                description: ''
                properties:
                  type:
                    type: string
                    description: URL to a document describing the error condition.
                  status:
                    type: integer
                    description: >-
                      Transmission of the HTTP status code so that all
                      information can be found in one place, but also to correct
                      changes in the status code due to the use of proxy
                      servers.
                  title:
                    type: string
                    description: >-
                      A short, human-readable title for the general error type;
                      the title should not change for given types.
                  detail:
                    type: string
                    description: A human-readable description of the specific error.
                  instance:
                    type: string
                    description: >-
                      This optional key may be present, with a unique URI for
                      the specific error; this will often point to an error log
                      for that specific response.
                  request_id:
                    type: string
                    description: Correlation ID for the original request.
                required:
                  - type
                  - status
                additionalProperties: false
              example:
                status: 404
                type: not_found
        '406':
          description: >-
            Not Acceptable. The resource does not have a current representation
            that would be acceptable to the user agent. "Accept" header defined
            unsupported value.
          headers:
            upvest-request-id:
              required: true
              schema:
                type: string
                format: uuid
                example: 169ae4c7-ebd7-4041-94da-25369653eba7
          content:
            application/problem+json:
              schema:
                title: Error
                type: object
                description: ''
                properties:
                  type:
                    type: string
                    description: URL to a document describing the error condition.
                  status:
                    type: integer
                    description: >-
                      Transmission of the HTTP status code so that all
                      information can be found in one place, but also to correct
                      changes in the status code due to the use of proxy
                      servers.
                  title:
                    type: string
                    description: >-
                      A short, human-readable title for the general error type;
                      the title should not change for given types.
                  detail:
                    type: string
                    description: A human-readable description of the specific error.
                  instance:
                    type: string
                    description: >-
                      This optional key may be present, with a unique URI for
                      the specific error; this will often point to an error log
                      for that specific response.
                  request_id:
                    type: string
                    description: Correlation ID for the original request.
                required:
                  - type
                  - status
                additionalProperties: false
              example:
                status: 406
                type: not_acceptable
        '429':
          description: >-
            Too Many Requests. The caller has exceeded their quota for the time
            period and has been throttled.
          headers:
            upvest-request-id:
              required: true
              schema:
                type: string
                format: uuid
                example: 169ae4c7-ebd7-4041-94da-25369653eba7
          content:
            application/problem+json:
              schema:
                title: Error
                type: object
                description: ''
                properties:
                  type:
                    type: string
                    description: URL to a document describing the error condition.
                  status:
                    type: integer
                    description: >-
                      Transmission of the HTTP status code so that all
                      information can be found in one place, but also to correct
                      changes in the status code due to the use of proxy
                      servers.
                  title:
                    type: string
                    description: >-
                      A short, human-readable title for the general error type;
                      the title should not change for given types.
                  detail:
                    type: string
                    description: A human-readable description of the specific error.
                  instance:
                    type: string
                    description: >-
                      This optional key may be present, with a unique URI for
                      the specific error; this will often point to an error log
                      for that specific response.
                  request_id:
                    type: string
                    description: Correlation ID for the original request.
                required:
                  - type
                  - status
                additionalProperties: false
              example:
                status: 429
                type: too_many_requests
        '500':
          description: Internal Server Error. The service encountered an unexpected error.
          headers:
            upvest-request-id:
              required: true
              schema:
                type: string
                format: uuid
                example: 169ae4c7-ebd7-4041-94da-25369653eba7
          content:
            application/problem+json:
              schema:
                title: Error
                type: object
                description: ''
                properties:
                  type:
                    type: string
                    description: URL to a document describing the error condition.
                  status:
                    type: integer
                    description: >-
                      Transmission of the HTTP status code so that all
                      information can be found in one place, but also to correct
                      changes in the status code due to the use of proxy
                      servers.
                  title:
                    type: string
                    description: >-
                      A short, human-readable title for the general error type;
                      the title should not change for given types.
                  detail:
                    type: string
                    description: A human-readable description of the specific error.
                  instance:
                    type: string
                    description: >-
                      This optional key may be present, with a unique URI for
                      the specific error; this will often point to an error log
                      for that specific response.
                  request_id:
                    type: string
                    description: Correlation ID for the original request.
                required:
                  - type
                  - status
                additionalProperties: false
              example:
                status: 500
                type: internal_server_error
        '503':
          description: >-
            Service Unavailable. The service handling for this request cannot be
            reached at this time.
          headers:
            upvest-request-id:
              required: true
              schema:
                type: string
                format: uuid
                example: 169ae4c7-ebd7-4041-94da-25369653eba7
          content:
            application/problem+json:
              schema:
                title: Error
                type: object
                description: ''
                properties:
                  type:
                    type: string
                    description: URL to a document describing the error condition.
                  status:
                    type: integer
                    description: >-
                      Transmission of the HTTP status code so that all
                      information can be found in one place, but also to correct
                      changes in the status code due to the use of proxy
                      servers.
                  title:
                    type: string
                    description: >-
                      A short, human-readable title for the general error type;
                      the title should not change for given types.
                  detail:
                    type: string
                    description: A human-readable description of the specific error.
                  instance:
                    type: string
                    description: >-
                      This optional key may be present, with a unique URI for
                      the specific error; this will often point to an error log
                      for that specific response.
                  request_id:
                    type: string
                    description: Correlation ID for the original request.
                required:
                  - type
                  - status
                additionalProperties: false
              example:
                status: 503
                type: method_not_allowed
        '504':
          description: >-
            Gateway Timeout. The service gateway has reached its internal
            timeout.
          headers:
            upvest-request-id:
              required: true
              schema:
                type: string
                format: uuid
                example: 169ae4c7-ebd7-4041-94da-25369653eba7
          content:
            application/problem+json:
              schema:
                title: Error
                type: object
                description: ''
                properties:
                  type:
                    type: string
                    description: URL to a document describing the error condition.
                  status:
                    type: integer
                    description: >-
                      Transmission of the HTTP status code so that all
                      information can be found in one place, but also to correct
                      changes in the status code due to the use of proxy
                      servers.
                  title:
                    type: string
                    description: >-
                      A short, human-readable title for the general error type;
                      the title should not change for given types.
                  detail:
                    type: string
                    description: A human-readable description of the specific error.
                  instance:
                    type: string
                    description: >-
                      This optional key may be present, with a unique URI for
                      the specific error; this will often point to an error log
                      for that specific response.
                  request_id:
                    type: string
                    description: Correlation ID for the original request.
                required:
                  - type
                  - status
                additionalProperties: false
              example:
                status: 504
                type: gateway_timeout
  /portfolios/allocations/{allocation_id}:
    parameters:
      - name: allocation_id
        in: path
        required: true
        schema:
          title: Portfolio allocation unique identifier
          type: string
          format: uuid
      - name: upvest-client-id
        in: header
        description: Tenant Client ID
        required: true
        schema:
          type: string
          format: uuid
          example: ebabcf4d-61c3-4942-875c-e265a7c2d062
      - name: authorization
        in: header
        description: |
          Bearer (access) token from the OAuth flow with correct scopes.
          https://datatracker.ietf.org/doc/html/rfc6750
        required: true
        schema:
          type: string
          pattern: ^Bearer [a-zA-Z0-9\-\._~+/]*=*
          example: Bearer c2VjcmV0Cg==
      - name: signature
        in: header
        required: true
        schema:
          type: string
        description: >-
          https://tools.ietf.org/id/draft-ietf-httpbis-message-signatures-01.html#name-the-signature-http-header
      - name: signature-input
        in: header
        required: true
        schema:
          type: string
        description: >-
          https://tools.ietf.org/id/draft-ietf-httpbis-message-signatures-01.html#name-the-signature-input-http-he
      - name: upvest-api-version
        in: header
        required: false
        schema:
          type: string
          enum:
            - '1'
          default: '1'
          example: '1'
        description: 'Upvest API version (Note: Do not include quotation marks)'
    get:
      operationId: retrieve_portfolios_allocation
      summary: Retrieve portfolios allocation
      description: Retrieve portfolios allocation
      tags:
        - Portfolios
      security:
        - oauth-client-credentials:
            - portfolios:read
            - portfolios:admin
      responses:
        '200':
          description: Portfolios allocation
          headers:
            upvest-request-id:
              required: true
              schema:
                type: string
                format: uuid
                example: 169ae4c7-ebd7-4041-94da-25369653eba7
          content:
            application/json:
              schema:
                title: Portfolios allocation
                type: object
                properties:
                  id:
                    title: Portfolio allocation unique identifier
                    type: string
                    format: uuid
                  created_at:
                    type: string
                    format: date-time
                    description: >-
                      Date and time when the resource was created. [RFC
                      3339-5](https://datatracker.ietf.org/doc/html/rfc3339#section-5.6),
                      [ISO8601
                      UTC](https://www.iso.org/iso-8601-date-and-time-format.html)
                  updated_at:
                    type: string
                    format: date-time
                    description: >-
                      Date and time when the resource was last updated. [RFC
                      3339-5](https://datatracker.ietf.org/doc/html/rfc3339#section-5.6),
                      [ISO8601
                      UTC](https://www.iso.org/iso-8601-date-and-time-format.html)
                  name:
                    description: Allocation name
                    type: string
                  allocation:
                    description: List of portfolios allocations
                    type: array
                    items:
                      type: object
                      properties:
                        instrument_id:
                          oneOf:
                            - title: International securities identification number
                              type: string
                              description: >-
                                International securities identification number
                                defined by [ISO
                                6166](https://en.wikipedia.org/wiki/International_Securities_Identification_Number).
                              pattern: ^[A-Z]{2}[A-Z0-9]{9}[0-9]$
                            - title: Unique identifier
                              description: UPVEST instrument identifier
                              type: string
                              format: uuid
                              pattern: >-
                                ^[0-9a-fA-F]{8}-?[0-9a-fA-F]{4}-?[0-5][0-9a-fA-F]{3}-?[089abAB][0-9a-fA-F]{3}-?[0-9a-fA-F]{12}$
                        instrument_id_type:
                          description: >-
                            The type of the ID used in the request.

                            * ISIN - International Securities Identification
                            Number

                            * UPVEST - UPVEST's unique instrument identifier
                          enum:
                            - ISIN
                            - UPVEST
                          default: ISIN
                          type: string
                        weight:
                          description: Instrument allocation weight
                          type: string
                          pattern: ^(100|[0-9]{1,2}(\.[0-9]{1,5})?)$
                      required:
                        - instrument_id
                        - instrument_id_type
                        - weight
                      additionalProperties: false
                required:
                  - id
                  - created_at
                  - updated_at
                  - name
                  - allocation
                additionalProperties: false
              example:
                id: bf5f2676-4535-403d-bc66-06ec38cc70af
                created_at: '2021-07-21T14:10:00.00Z'
                updated_at: '2021-07-21T14:10:00.00Z'
                name: Allocation 1
                allocation:
                  - instrument_id: IE00B0M62Q58
                    instrument_id_type: ISIN
                    weight: '0.7'
                  - instrument_id: US0378331005
                    instrument_id_type: ISIN
                    weight: '0.3'
        '401':
          description: Unauthorized. The caller has not been authenticated.
          headers:
            upvest-request-id:
              required: true
              schema:
                type: string
                format: uuid
                example: 169ae4c7-ebd7-4041-94da-25369653eba7
          content:
            application/problem+json:
              schema:
                title: Error
                type: object
                description: ''
                properties:
                  type:
                    type: string
                    description: URL to a document describing the error condition.
                  status:
                    type: integer
                    description: >-
                      Transmission of the HTTP status code so that all
                      information can be found in one place, but also to correct
                      changes in the status code due to the use of proxy
                      servers.
                  title:
                    type: string
                    description: >-
                      A short, human-readable title for the general error type;
                      the title should not change for given types.
                  detail:
                    type: string
                    description: A human-readable description of the specific error.
                  instance:
                    type: string
                    description: >-
                      This optional key may be present, with a unique URI for
                      the specific error; this will often point to an error log
                      for that specific response.
                  request_id:
                    type: string
                    description: Correlation ID for the original request.
                required:
                  - type
                  - status
                additionalProperties: false
              example:
                status: 401
                type: unauthorized
        '403':
          description: >-
            Forbidden. The caller has been authenticated but is not allowed to
            take the requested action.
          headers:
            upvest-request-id:
              required: true
              schema:
                type: string
                format: uuid
                example: 169ae4c7-ebd7-4041-94da-25369653eba7
          content:
            application/problem+json:
              schema:
                title: Error
                type: object
                description: ''
                properties:
                  type:
                    type: string
                    description: URL to a document describing the error condition.
                  status:
                    type: integer
                    description: >-
                      Transmission of the HTTP status code so that all
                      information can be found in one place, but also to correct
                      changes in the status code due to the use of proxy
                      servers.
                  title:
                    type: string
                    description: >-
                      A short, human-readable title for the general error type;
                      the title should not change for given types.
                  detail:
                    type: string
                    description: A human-readable description of the specific error.
                  instance:
                    type: string
                    description: >-
                      This optional key may be present, with a unique URI for
                      the specific error; this will often point to an error log
                      for that specific response.
                  request_id:
                    type: string
                    description: Correlation ID for the original request.
                required:
                  - type
                  - status
                additionalProperties: false
              example:
                status: 403
                type: forbidden
        '404':
          description: Not Found. The requested resource could not be found.
          headers:
            upvest-request-id:
              required: true
              schema:
                type: string
                format: uuid
                example: 169ae4c7-ebd7-4041-94da-25369653eba7
          content:
            application/problem+json:
              schema:
                title: Error
                type: object
                description: ''
                properties:
                  type:
                    type: string
                    description: URL to a document describing the error condition.
                  status:
                    type: integer
                    description: >-
                      Transmission of the HTTP status code so that all
                      information can be found in one place, but also to correct
                      changes in the status code due to the use of proxy
                      servers.
                  title:
                    type: string
                    description: >-
                      A short, human-readable title for the general error type;
                      the title should not change for given types.
                  detail:
                    type: string
                    description: A human-readable description of the specific error.
                  instance:
                    type: string
                    description: >-
                      This optional key may be present, with a unique URI for
                      the specific error; this will often point to an error log
                      for that specific response.
                  request_id:
                    type: string
                    description: Correlation ID for the original request.
                required:
                  - type
                  - status
                additionalProperties: false
              example:
                status: 404
                type: not_found
        '406':
          description: >-
            Not Acceptable. The resource does not have a current representation
            that would be acceptable to the user agent. "Accept" header defined
            unsupported value.
          headers:
            upvest-request-id:
              required: true
              schema:
                type: string
                format: uuid
                example: 169ae4c7-ebd7-4041-94da-25369653eba7
          content:
            application/problem+json:
              schema:
                title: Error
                type: object
                description: ''
                properties:
                  type:
                    type: string
                    description: URL to a document describing the error condition.
                  status:
                    type: integer
                    description: >-
                      Transmission of the HTTP status code so that all
                      information can be found in one place, but also to correct
                      changes in the status code due to the use of proxy
                      servers.
                  title:
                    type: string
                    description: >-
                      A short, human-readable title for the general error type;
                      the title should not change for given types.
                  detail:
                    type: string
                    description: A human-readable description of the specific error.
                  instance:
                    type: string
                    description: >-
                      This optional key may be present, with a unique URI for
                      the specific error; this will often point to an error log
                      for that specific response.
                  request_id:
                    type: string
                    description: Correlation ID for the original request.
                required:
                  - type
                  - status
                additionalProperties: false
              example:
                status: 406
                type: not_acceptable
        '429':
          description: >-
            Too Many Requests. The caller has exceeded their quota for the time
            period and has been throttled.
          headers:
            upvest-request-id:
              required: true
              schema:
                type: string
                format: uuid
                example: 169ae4c7-ebd7-4041-94da-25369653eba7
          content:
            application/problem+json:
              schema:
                title: Error
                type: object
                description: ''
                properties:
                  type:
                    type: string
                    description: URL to a document describing the error condition.
                  status:
                    type: integer
                    description: >-
                      Transmission of the HTTP status code so that all
                      information can be found in one place, but also to correct
                      changes in the status code due to the use of proxy
                      servers.
                  title:
                    type: string
                    description: >-
                      A short, human-readable title for the general error type;
                      the title should not change for given types.
                  detail:
                    type: string
                    description: A human-readable description of the specific error.
                  instance:
                    type: string
                    description: >-
                      This optional key may be present, with a unique URI for
                      the specific error; this will often point to an error log
                      for that specific response.
                  request_id:
                    type: string
                    description: Correlation ID for the original request.
                required:
                  - type
                  - status
                additionalProperties: false
              example:
                status: 429
                type: too_many_requests
        '500':
          description: Internal Server Error. The service encountered an unexpected error.
          headers:
            upvest-request-id:
              required: true
              schema:
                type: string
                format: uuid
                example: 169ae4c7-ebd7-4041-94da-25369653eba7
          content:
            application/problem+json:
              schema:
                title: Error
                type: object
                description: ''
                properties:
                  type:
                    type: string
                    description: URL to a document describing the error condition.
                  status:
                    type: integer
                    description: >-
                      Transmission of the HTTP status code so that all
                      information can be found in one place, but also to correct
                      changes in the status code due to the use of proxy
                      servers.
                  title:
                    type: string
                    description: >-
                      A short, human-readable title for the general error type;
                      the title should not change for given types.
                  detail:
                    type: string
                    description: A human-readable description of the specific error.
                  instance:
                    type: string
                    description: >-
                      This optional key may be present, with a unique URI for
                      the specific error; this will often point to an error log
                      for that specific response.
                  request_id:
                    type: string
                    description: Correlation ID for the original request.
                required:
                  - type
                  - status
                additionalProperties: false
              example:
                status: 500
                type: internal_server_error
        '503':
          description: >-
            Service Unavailable. The service handling for this request cannot be
            reached at this time.
          headers:
            upvest-request-id:
              required: true
              schema:
                type: string
                format: uuid
                example: 169ae4c7-ebd7-4041-94da-25369653eba7
          content:
            application/problem+json:
              schema:
                title: Error
                type: object
                description: ''
                properties:
                  type:
                    type: string
                    description: URL to a document describing the error condition.
                  status:
                    type: integer
                    description: >-
                      Transmission of the HTTP status code so that all
                      information can be found in one place, but also to correct
                      changes in the status code due to the use of proxy
                      servers.
                  title:
                    type: string
                    description: >-
                      A short, human-readable title for the general error type;
                      the title should not change for given types.
                  detail:
                    type: string
                    description: A human-readable description of the specific error.
                  instance:
                    type: string
                    description: >-
                      This optional key may be present, with a unique URI for
                      the specific error; this will often point to an error log
                      for that specific response.
                  request_id:
                    type: string
                    description: Correlation ID for the original request.
                required:
                  - type
                  - status
                additionalProperties: false
              example:
                status: 503
                type: method_not_allowed
        '504':
          description: >-
            Gateway Timeout. The service gateway has reached its internal
            timeout.
          headers:
            upvest-request-id:
              required: true
              schema:
                type: string
                format: uuid
                example: 169ae4c7-ebd7-4041-94da-25369653eba7
          content:
            application/problem+json:
              schema:
                title: Error
                type: object
                description: ''
                properties:
                  type:
                    type: string
                    description: URL to a document describing the error condition.
                  status:
                    type: integer
                    description: >-
                      Transmission of the HTTP status code so that all
                      information can be found in one place, but also to correct
                      changes in the status code due to the use of proxy
                      servers.
                  title:
                    type: string
                    description: >-
                      A short, human-readable title for the general error type;
                      the title should not change for given types.
                  detail:
                    type: string
                    description: A human-readable description of the specific error.
                  instance:
                    type: string
                    description: >-
                      This optional key may be present, with a unique URI for
                      the specific error; this will often point to an error log
                      for that specific response.
                  request_id:
                    type: string
                    description: Correlation ID for the original request.
                required:
                  - type
                  - status
                additionalProperties: false
              example:
                status: 504
                type: gateway_timeout
    put:
      operationId: update_portfolios_allocation
      summary: Update portfolios allocation
      description: Update portfolios allocation
      tags:
        - Portfolios
      security:
        - oauth-client-credentials:
            - portfolios:admin
      requestBody:
        content:
          application/json:
            schema:
              title: Portfolios allocation - Update - Request
              type: object
              properties:
                name:
                  description: Allocation name
                  type: string
                allocation:
                  description: List of portfolios allocations
                  type: array
                  items:
                    type: object
                    properties:
                      instrument_id:
                        oneOf:
                          - title: International securities identification number
                            type: string
                            description: >-
                              International securities identification number
                              defined by [ISO
                              6166](https://en.wikipedia.org/wiki/International_Securities_Identification_Number).
                            pattern: ^[A-Z]{2}[A-Z0-9]{9}[0-9]$
                          - title: Unique identifier
                            description: UPVEST instrument identifier
                            type: string
                            format: uuid
                            pattern: >-
                              ^[0-9a-fA-F]{8}-?[0-9a-fA-F]{4}-?[0-5][0-9a-fA-F]{3}-?[089abAB][0-9a-fA-F]{3}-?[0-9a-fA-F]{12}$
                      instrument_id_type:
                        description: >-
                          The type of the ID used in the request.

                          * ISIN - International Securities Identification
                          Number

                          * UPVEST - UPVEST's unique instrument identifier
                        enum:
                          - ISIN
                          - UPVEST
                        default: ISIN
                        type: string
                      weight:
                        description: Instrument allocation weight
                        type: string
                        pattern: ^(100|[0-9]{1,2}(\.[0-9]{1,5})?)$
                    required:
                      - instrument_id
                      - instrument_id_type
                      - weight
                    additionalProperties: false
              required:
                - allocation
              additionalProperties: false
            examples:
              ordinary:
                summary: Generic instruments
                value:
                  allocation:
                    - instrument_id: IE00B0M62Q58
                      instrument_id_type: ISIN
                      weight: '0.6'
                    - instrument_id: US0378331005
                      instrument_id_type: ISIN
                      weight: '0.4'
              upvest:
                summary: Including Upvest-specific instruments
                value:
                  allocation:
                    - instrument_id: IE00B0M62Q58
                      instrument_id_type: ISIN
                      weight: '0.5'
                    - instrument_id: US0378331005
                      instrument_id_type: ISIN
                      weight: '0.25'
                    - instrument_id: c2721bc0-9f65-474b-a846-b237eb17fb05
                      instrument_id_type: UPVEST
                      weight: '0.25'
      responses:
        '200':
          description: Portfolios allocation
          headers:
            upvest-request-id:
              required: true
              schema:
                type: string
                format: uuid
                example: 169ae4c7-ebd7-4041-94da-25369653eba7
          content:
            application/json:
              schema:
                title: Portfolios allocation
                type: object
                properties:
                  id:
                    title: Portfolio allocation unique identifier
                    type: string
                    format: uuid
                  created_at:
                    type: string
                    format: date-time
                    description: >-
                      Date and time when the resource was created. [RFC
                      3339-5](https://datatracker.ietf.org/doc/html/rfc3339#section-5.6),
                      [ISO8601
                      UTC](https://www.iso.org/iso-8601-date-and-time-format.html)
                  updated_at:
                    type: string
                    format: date-time
                    description: >-
                      Date and time when the resource was last updated. [RFC
                      3339-5](https://datatracker.ietf.org/doc/html/rfc3339#section-5.6),
                      [ISO8601
                      UTC](https://www.iso.org/iso-8601-date-and-time-format.html)
                  name:
                    description: Allocation name
                    type: string
                  allocation:
                    description: List of portfolios allocations
                    type: array
                    items:
                      type: object
                      properties:
                        instrument_id:
                          oneOf:
                            - title: International securities identification number
                              type: string
                              description: >-
                                International securities identification number
                                defined by [ISO
                                6166](https://en.wikipedia.org/wiki/International_Securities_Identification_Number).
                              pattern: ^[A-Z]{2}[A-Z0-9]{9}[0-9]$
                            - title: Unique identifier
                              description: UPVEST instrument identifier
                              type: string
                              format: uuid
                              pattern: >-
                                ^[0-9a-fA-F]{8}-?[0-9a-fA-F]{4}-?[0-5][0-9a-fA-F]{3}-?[089abAB][0-9a-fA-F]{3}-?[0-9a-fA-F]{12}$
                        instrument_id_type:
                          description: >-
                            The type of the ID used in the request.

                            * ISIN - International Securities Identification
                            Number

                            * UPVEST - UPVEST's unique instrument identifier
                          enum:
                            - ISIN
                            - UPVEST
                          default: ISIN
                          type: string
                        weight:
                          description: Instrument allocation weight
                          type: string
                          pattern: ^(100|[0-9]{1,2}(\.[0-9]{1,5})?)$
                      required:
                        - instrument_id
                        - instrument_id_type
                        - weight
                      additionalProperties: false
                required:
                  - id
                  - created_at
                  - updated_at
                  - name
                  - allocation
                additionalProperties: false
              example:
                id: 436244bb-4afd-4002-b53b-b1d7a3bca032
                created_at: '2021-07-21T14:10:00.00Z'
                updated_at: '2021-07-22T15:10:00.00Z'
                name: Allocation 1
                allocation:
                  - instrument_id: IE00B0M62Q58
                    instrument_id_type: ISIN
                    weight: '0.6'
                  - instrument_id: US0378331005
                    instrument_id_type: ISIN
                    weight: '0.4'
        '400':
          description: Bad Request. The incoming request had a malformed parameter/object.
          headers:
            upvest-request-id:
              required: true
              schema:
                type: string
                format: uuid
                example: 169ae4c7-ebd7-4041-94da-25369653eba7
          content:
            application/problem+json:
              schema:
                title: Error
                type: object
                description: ''
                properties:
                  type:
                    type: string
                    description: URL to a document describing the error condition.
                  status:
                    type: integer
                    description: >-
                      Transmission of the HTTP status code so that all
                      information can be found in one place, but also to correct
                      changes in the status code due to the use of proxy
                      servers.
                  title:
                    type: string
                    description: >-
                      A short, human-readable title for the general error type;
                      the title should not change for given types.
                  detail:
                    type: string
                    description: A human-readable description of the specific error.
                  instance:
                    type: string
                    description: >-
                      This optional key may be present, with a unique URI for
                      the specific error; this will often point to an error log
                      for that specific response.
                  request_id:
                    type: string
                    description: Correlation ID for the original request.
                required:
                  - type
                  - status
                additionalProperties: false
              example:
                status: 400
                type: bad_request
        '401':
          description: Unauthorized. The caller has not been authenticated.
          headers:
            upvest-request-id:
              required: true
              schema:
                type: string
                format: uuid
                example: 169ae4c7-ebd7-4041-94da-25369653eba7
          content:
            application/problem+json:
              schema:
                title: Error
                type: object
                description: ''
                properties:
                  type:
                    type: string
                    description: URL to a document describing the error condition.
                  status:
                    type: integer
                    description: >-
                      Transmission of the HTTP status code so that all
                      information can be found in one place, but also to correct
                      changes in the status code due to the use of proxy
                      servers.
                  title:
                    type: string
                    description: >-
                      A short, human-readable title for the general error type;
                      the title should not change for given types.
                  detail:
                    type: string
                    description: A human-readable description of the specific error.
                  instance:
                    type: string
                    description: >-
                      This optional key may be present, with a unique URI for
                      the specific error; this will often point to an error log
                      for that specific response.
                  request_id:
                    type: string
                    description: Correlation ID for the original request.
                required:
                  - type
                  - status
                additionalProperties: false
              example:
                status: 401
                type: unauthorized
        '403':
          description: >-
            Forbidden. The caller has been authenticated but is not allowed to
            take the requested action.
          headers:
            upvest-request-id:
              required: true
              schema:
                type: string
                format: uuid
                example: 169ae4c7-ebd7-4041-94da-25369653eba7
          content:
            application/problem+json:
              schema:
                title: Error
                type: object
                description: ''
                properties:
                  type:
                    type: string
                    description: URL to a document describing the error condition.
                  status:
                    type: integer
                    description: >-
                      Transmission of the HTTP status code so that all
                      information can be found in one place, but also to correct
                      changes in the status code due to the use of proxy
                      servers.
                  title:
                    type: string
                    description: >-
                      A short, human-readable title for the general error type;
                      the title should not change for given types.
                  detail:
                    type: string
                    description: A human-readable description of the specific error.
                  instance:
                    type: string
                    description: >-
                      This optional key may be present, with a unique URI for
                      the specific error; this will often point to an error log
                      for that specific response.
                  request_id:
                    type: string
                    description: Correlation ID for the original request.
                required:
                  - type
                  - status
                additionalProperties: false
              example:
                status: 403
                type: forbidden
        '404':
          description: Not Found. The requested resource could not be found.
          headers:
            upvest-request-id:
              required: true
              schema:
                type: string
                format: uuid
                example: 169ae4c7-ebd7-4041-94da-25369653eba7
          content:
            application/problem+json:
              schema:
                title: Error
                type: object
                description: ''
                properties:
                  type:
                    type: string
                    description: URL to a document describing the error condition.
                  status:
                    type: integer
                    description: >-
                      Transmission of the HTTP status code so that all
                      information can be found in one place, but also to correct
                      changes in the status code due to the use of proxy
                      servers.
                  title:
                    type: string
                    description: >-
                      A short, human-readable title for the general error type;
                      the title should not change for given types.
                  detail:
                    type: string
                    description: A human-readable description of the specific error.
                  instance:
                    type: string
                    description: >-
                      This optional key may be present, with a unique URI for
                      the specific error; this will often point to an error log
                      for that specific response.
                  request_id:
                    type: string
                    description: Correlation ID for the original request.
                required:
                  - type
                  - status
                additionalProperties: false
              example:
                status: 404
                type: not_found
        '406':
          description: >-
            Not Acceptable. The resource does not have a current representation
            that would be acceptable to the user agent. "Accept" header defined
            unsupported value.
          headers:
            upvest-request-id:
              required: true
              schema:
                type: string
                format: uuid
                example: 169ae4c7-ebd7-4041-94da-25369653eba7
          content:
            application/problem+json:
              schema:
                title: Error
                type: object
                description: ''
                properties:
                  type:
                    type: string
                    description: URL to a document describing the error condition.
                  status:
                    type: integer
                    description: >-
                      Transmission of the HTTP status code so that all
                      information can be found in one place, but also to correct
                      changes in the status code due to the use of proxy
                      servers.
                  title:
                    type: string
                    description: >-
                      A short, human-readable title for the general error type;
                      the title should not change for given types.
                  detail:
                    type: string
                    description: A human-readable description of the specific error.
                  instance:
                    type: string
                    description: >-
                      This optional key may be present, with a unique URI for
                      the specific error; this will often point to an error log
                      for that specific response.
                  request_id:
                    type: string
                    description: Correlation ID for the original request.
                required:
                  - type
                  - status
                additionalProperties: false
              example:
                status: 406
                type: not_acceptable
        '429':
          description: >-
            Too Many Requests. The caller has exceeded their quota for the time
            period and has been throttled.
          headers:
            upvest-request-id:
              required: true
              schema:
                type: string
                format: uuid
                example: 169ae4c7-ebd7-4041-94da-25369653eba7
          content:
            application/problem+json:
              schema:
                title: Error
                type: object
                description: ''
                properties:
                  type:
                    type: string
                    description: URL to a document describing the error condition.
                  status:
                    type: integer
                    description: >-
                      Transmission of the HTTP status code so that all
                      information can be found in one place, but also to correct
                      changes in the status code due to the use of proxy
                      servers.
                  title:
                    type: string
                    description: >-
                      A short, human-readable title for the general error type;
                      the title should not change for given types.
                  detail:
                    type: string
                    description: A human-readable description of the specific error.
                  instance:
                    type: string
                    description: >-
                      This optional key may be present, with a unique URI for
                      the specific error; this will often point to an error log
                      for that specific response.
                  request_id:
                    type: string
                    description: Correlation ID for the original request.
                required:
                  - type
                  - status
                additionalProperties: false
              example:
                status: 429
                type: too_many_requests
        '500':
          description: Internal Server Error. The service encountered an unexpected error.
          headers:
            upvest-request-id:
              required: true
              schema:
                type: string
                format: uuid
                example: 169ae4c7-ebd7-4041-94da-25369653eba7
          content:
            application/problem+json:
              schema:
                title: Error
                type: object
                description: ''
                properties:
                  type:
                    type: string
                    description: URL to a document describing the error condition.
                  status:
                    type: integer
                    description: >-
                      Transmission of the HTTP status code so that all
                      information can be found in one place, but also to correct
                      changes in the status code due to the use of proxy
                      servers.
                  title:
                    type: string
                    description: >-
                      A short, human-readable title for the general error type;
                      the title should not change for given types.
                  detail:
                    type: string
                    description: A human-readable description of the specific error.
                  instance:
                    type: string
                    description: >-
                      This optional key may be present, with a unique URI for
                      the specific error; this will often point to an error log
                      for that specific response.
                  request_id:
                    type: string
                    description: Correlation ID for the original request.
                required:
                  - type
                  - status
                additionalProperties: false
              example:
                status: 500
                type: internal_server_error
        '503':
          description: >-
            Service Unavailable. The service handling for this request cannot be
            reached at this time.
          headers:
            upvest-request-id:
              required: true
              schema:
                type: string
                format: uuid
                example: 169ae4c7-ebd7-4041-94da-25369653eba7
          content:
            application/problem+json:
              schema:
                title: Error
                type: object
                description: ''
                properties:
                  type:
                    type: string
                    description: URL to a document describing the error condition.
                  status:
                    type: integer
                    description: >-
                      Transmission of the HTTP status code so that all
                      information can be found in one place, but also to correct
                      changes in the status code due to the use of proxy
                      servers.
                  title:
                    type: string
                    description: >-
                      A short, human-readable title for the general error type;
                      the title should not change for given types.
                  detail:
                    type: string
                    description: A human-readable description of the specific error.
                  instance:
                    type: string
                    description: >-
                      This optional key may be present, with a unique URI for
                      the specific error; this will often point to an error log
                      for that specific response.
                  request_id:
                    type: string
                    description: Correlation ID for the original request.
                required:
                  - type
                  - status
                additionalProperties: false
              example:
                status: 503
                type: method_not_allowed
        '504':
          description: >-
            Gateway Timeout. The service gateway has reached its internal
            timeout.
          headers:
            upvest-request-id:
              required: true
              schema:
                type: string
                format: uuid
                example: 169ae4c7-ebd7-4041-94da-25369653eba7
          content:
            application/problem+json:
              schema:
                title: Error
                type: object
                description: ''
                properties:
                  type:
                    type: string
                    description: URL to a document describing the error condition.
                  status:
                    type: integer
                    description: >-
                      Transmission of the HTTP status code so that all
                      information can be found in one place, but also to correct
                      changes in the status code due to the use of proxy
                      servers.
                  title:
                    type: string
                    description: >-
                      A short, human-readable title for the general error type;
                      the title should not change for given types.
                  detail:
                    type: string
                    description: A human-readable description of the specific error.
                  instance:
                    type: string
                    description: >-
                      This optional key may be present, with a unique URI for
                      the specific error; this will often point to an error log
                      for that specific response.
                  request_id:
                    type: string
                    description: Correlation ID for the original request.
                required:
                  - type
                  - status
                additionalProperties: false
              example:
                status: 504
                type: gateway_timeout
  /portfolios/configurations:
    parameters:
      - name: upvest-client-id
        in: header
        description: Tenant Client ID
        required: true
        schema:
          type: string
          format: uuid
          example: ebabcf4d-61c3-4942-875c-e265a7c2d062
      - name: authorization
        in: header
        description: |
          Bearer (access) token from the OAuth flow with correct scopes.
          https://datatracker.ietf.org/doc/html/rfc6750
        required: true
        schema:
          type: string
          pattern: ^Bearer [a-zA-Z0-9\-\._~+/]*=*
          example: Bearer c2VjcmV0Cg==
      - name: signature
        in: header
        required: true
        schema:
          type: string
        description: >-
          https://tools.ietf.org/id/draft-ietf-httpbis-message-signatures-01.html#name-the-signature-http-header
      - name: signature-input
        in: header
        required: true
        schema:
          type: string
        description: >-
          https://tools.ietf.org/id/draft-ietf-httpbis-message-signatures-01.html#name-the-signature-input-http-he
      - name: upvest-api-version
        in: header
        required: false
        schema:
          type: string
          enum:
            - '1'
          default: '1'
          example: '1'
        description: 'Upvest API version (Note: Do not include quotation marks)'
    get:
      operationId: list_portfolios_configurations
      summary: List portfolios configurations
      description: List portfolios configurations
      tags:
        - Portfolios
      security:
        - oauth-client-credentials:
            - portfolios:read
            - portfolios:admin
      parameters:
        - name: sort
          in: query
          required: false
          schema:
            type: string
            enum:
              - account_id
            default: account_id
          description: Sort the result by `account_id`.
        - name: order
          in: query
          required: false
          schema:
            type: string
            enum:
              - ASC
            default: ASC
          description: >-
            Sort order of the result list if the `sort` parameter is specified.
            By default, only ASC for ascending sort.
        - name: offset
          in: query
          schema:
            type: integer
            minimum: 0
            format: int32
          allowEmptyValue: true
          description: >-
            Use the `offset` argument to specify where in the list of results to
            start when returning items for a particular query.
        - name: limit
          in: query
          schema:
            type: integer
            format: int32
            default: 100
            minimum: 0
            maximum: 1000
          allowEmptyValue: true
          description: >-
            Use the `limit` argument to specify the maximum number of items
            returned.
        - name: start_date
          in: query
          required: false
          schema:
            type: string
            title: Date in YYYY-MM-DD format. RFC 3339, section 5.6
          description: >-
            Returns portfolio configurations with dates starting from and
            including this date (UTC)
          example: '2022-10-14T10:10:10Z'
        - name: end_date
          in: query
          required: false
          schema:
            type: string
            title: Date in YYYY-MM-DD format. RFC 3339, section 5.6
          description: Returns portfolio configurations with dates up until this date (UTC)
          example: '2022-10-14T10:10:10Z'
        - name: account_id
          in: query
          required: false
          schema:
            type: string
          description: Filters portfolio configurations by account ID
          example: 3ada8e9e-82c4-4c78-a43d-a691b1636509
        - name: allocation_id
          in: query
          required: false
          schema:
            type: string
          description: Filters portfolio configurations by allocation ID
          example: f6c2b02a-3214-4a40-82ae-6c76df50bc8c
      responses:
        '200':
          description: Portfolios configurations
          headers:
            upvest-request-id:
              required: true
              schema:
                type: string
                format: uuid
                example: 169ae4c7-ebd7-4041-94da-25369653eba7
          content:
            application/json:
              schema:
                title: Portfolios configurations - List - Response
                type: object
                properties:
                  meta:
                    type: object
                    properties:
                      offset:
                        type: integer
                        description: Amount of resource to offset in the response.
                      limit:
                        type: integer
                        description: Total limit of the response.
                      count:
                        type: integer
                        description: Count of the resources returned in the response.
                      total_count:
                        type: integer
                        description: Total count of all the resources.
                      sort:
                        type: string
                        description: The field that the list is sorted by.
                      order:
                        type: string
                        description: |-
                          The ordering of the response.
                          * ASC - Ascending order
                          * DESC - Descending order
                        enum:
                          - ASC
                          - DESC
                    required:
                      - offset
                      - limit
                      - count
                      - total_count
                  data:
                    type: array
                    items:
                      title: Portfolios configuration
                      type: object
                      properties:
                        created_at:
                          type: string
                          format: date-time
                          description: >-
                            Date and time when the resource was created. [RFC
                            3339-5](https://datatracker.ietf.org/doc/html/rfc3339#section-5.6),
                            [ISO8601
                            UTC](https://www.iso.org/iso-8601-date-and-time-format.html)
                        updated_at:
                          type: string
                          format: date-time
                          description: >-
                            Date and time when the resource was last updated.
                            [RFC
                            3339-5](https://datatracker.ietf.org/doc/html/rfc3339#section-5.6),
                            [ISO8601
                            UTC](https://www.iso.org/iso-8601-date-and-time-format.html)
                        account_id:
                          title: Account unique identifier.
                          type: string
                          description: Account unique identifier.
                          format: uuid
                        allocation_id:
                          title: Portfolio allocation unique identifier
                          type: string
                          format: uuid
                        rebalancing_strategy_ids:
                          description: List of rebalancing strategy ids
                          type: array
                          items:
                            title: Portfolio rebalancing strategy unique identifier
                            type: string
                            format: uuid
                      required:
                        - created_at
                        - updated_at
                        - account_id
                        - allocation_id
                      additionalProperties: false
                required:
                  - meta
                  - data
                additionalProperties: false
              example:
                meta:
                  offset: 0
                  limit: 100
                  count: 1
                  total_count: 1
                  sort: account_id
                  order: ASC
                data:
                  - created_at: '2021-07-21T14:10:00.00Z'
                    updated_at: '2021-07-21T14:10:00.00Z'
                    account_id: 4ca934ae-66b2-4494-86f9-df6ab89351f1
                    allocation_id: 65c69f95-c7b9-4c93-9943-a8c7fe4f7aef
                    rebalancing_strategy_ids:
                      - 7a7322f5-b45d-4aba-aae4-c12797938c93
                      - d7b4291b-5a26-40c2-a8dd-235bd904a2ed
                  - created_at: '2021-07-21T14:10:00.00Z'
                    updated_at: '2021-07-21T14:10:00.00Z'
                    account_id: a46c4531-ec90-4ac3-ac6b-356d743a3859
                    allocation_id: a4117e26-7c31-43ad-af47-0784a4957da9
                    rebalancing_strategy_ids:
                      - 7a7322f5-b45d-4aba-aae4-c12797938c93
                      - 692e318a-d6d0-43ac-999a-b84a82dbe304
        '400':
          description: Bad Request. The incoming request had a malformed parameter/object.
          headers:
            upvest-request-id:
              required: true
              schema:
                type: string
                format: uuid
                example: 169ae4c7-ebd7-4041-94da-25369653eba7
          content:
            application/problem+json:
              schema:
                title: Error
                type: object
                description: ''
                properties:
                  type:
                    type: string
                    description: URL to a document describing the error condition.
                  status:
                    type: integer
                    description: >-
                      Transmission of the HTTP status code so that all
                      information can be found in one place, but also to correct
                      changes in the status code due to the use of proxy
                      servers.
                  title:
                    type: string
                    description: >-
                      A short, human-readable title for the general error type;
                      the title should not change for given types.
                  detail:
                    type: string
                    description: A human-readable description of the specific error.
                  instance:
                    type: string
                    description: >-
                      This optional key may be present, with a unique URI for
                      the specific error; this will often point to an error log
                      for that specific response.
                  request_id:
                    type: string
                    description: Correlation ID for the original request.
                required:
                  - type
                  - status
                additionalProperties: false
              example:
                status: 400
                type: bad_request
        '401':
          description: Unauthorized. The caller has not been authenticated.
          headers:
            upvest-request-id:
              required: true
              schema:
                type: string
                format: uuid
                example: 169ae4c7-ebd7-4041-94da-25369653eba7
          content:
            application/problem+json:
              schema:
                title: Error
                type: object
                description: ''
                properties:
                  type:
                    type: string
                    description: URL to a document describing the error condition.
                  status:
                    type: integer
                    description: >-
                      Transmission of the HTTP status code so that all
                      information can be found in one place, but also to correct
                      changes in the status code due to the use of proxy
                      servers.
                  title:
                    type: string
                    description: >-
                      A short, human-readable title for the general error type;
                      the title should not change for given types.
                  detail:
                    type: string
                    description: A human-readable description of the specific error.
                  instance:
                    type: string
                    description: >-
                      This optional key may be present, with a unique URI for
                      the specific error; this will often point to an error log
                      for that specific response.
                  request_id:
                    type: string
                    description: Correlation ID for the original request.
                required:
                  - type
                  - status
                additionalProperties: false
              example:
                status: 401
                type: unauthorized
        '403':
          description: >-
            Forbidden. The caller has been authenticated but is not allowed to
            take the requested action.
          headers:
            upvest-request-id:
              required: true
              schema:
                type: string
                format: uuid
                example: 169ae4c7-ebd7-4041-94da-25369653eba7
          content:
            application/problem+json:
              schema:
                title: Error
                type: object
                description: ''
                properties:
                  type:
                    type: string
                    description: URL to a document describing the error condition.
                  status:
                    type: integer
                    description: >-
                      Transmission of the HTTP status code so that all
                      information can be found in one place, but also to correct
                      changes in the status code due to the use of proxy
                      servers.
                  title:
                    type: string
                    description: >-
                      A short, human-readable title for the general error type;
                      the title should not change for given types.
                  detail:
                    type: string
                    description: A human-readable description of the specific error.
                  instance:
                    type: string
                    description: >-
                      This optional key may be present, with a unique URI for
                      the specific error; this will often point to an error log
                      for that specific response.
                  request_id:
                    type: string
                    description: Correlation ID for the original request.
                required:
                  - type
                  - status
                additionalProperties: false
              example:
                status: 403
                type: forbidden
        '404':
          description: Not Found. The requested resource could not be found.
          headers:
            upvest-request-id:
              required: true
              schema:
                type: string
                format: uuid
                example: 169ae4c7-ebd7-4041-94da-25369653eba7
          content:
            application/problem+json:
              schema:
                title: Error
                type: object
                description: ''
                properties:
                  type:
                    type: string
                    description: URL to a document describing the error condition.
                  status:
                    type: integer
                    description: >-
                      Transmission of the HTTP status code so that all
                      information can be found in one place, but also to correct
                      changes in the status code due to the use of proxy
                      servers.
                  title:
                    type: string
                    description: >-
                      A short, human-readable title for the general error type;
                      the title should not change for given types.
                  detail:
                    type: string
                    description: A human-readable description of the specific error.
                  instance:
                    type: string
                    description: >-
                      This optional key may be present, with a unique URI for
                      the specific error; this will often point to an error log
                      for that specific response.
                  request_id:
                    type: string
                    description: Correlation ID for the original request.
                required:
                  - type
                  - status
                additionalProperties: false
              example:
                status: 404
                type: not_found
        '405':
          description: >-
            Method Not Allowed. The requested method is not allowed on the
            requested resource.
          headers:
            upvest-request-id:
              required: true
              schema:
                type: string
                format: uuid
                example: 169ae4c7-ebd7-4041-94da-25369653eba7
          content:
            application/problem+json:
              schema:
                title: Error
                type: object
                description: ''
                properties:
                  type:
                    type: string
                    description: URL to a document describing the error condition.
                  status:
                    type: integer
                    description: >-
                      Transmission of the HTTP status code so that all
                      information can be found in one place, but also to correct
                      changes in the status code due to the use of proxy
                      servers.
                  title:
                    type: string
                    description: >-
                      A short, human-readable title for the general error type;
                      the title should not change for given types.
                  detail:
                    type: string
                    description: A human-readable description of the specific error.
                  instance:
                    type: string
                    description: >-
                      This optional key may be present, with a unique URI for
                      the specific error; this will often point to an error log
                      for that specific response.
                  request_id:
                    type: string
                    description: Correlation ID for the original request.
                required:
                  - type
                  - status
                additionalProperties: false
              example:
                status: 405
                type: method_not_allowed
        '406':
          description: >-
            Not Acceptable. The resource does not have a current representation
            that would be acceptable to the user agent. "Accept" header defined
            unsupported value.
          headers:
            upvest-request-id:
              required: true
              schema:
                type: string
                format: uuid
                example: 169ae4c7-ebd7-4041-94da-25369653eba7
          content:
            application/problem+json:
              schema:
                title: Error
                type: object
                description: ''
                properties:
                  type:
                    type: string
                    description: URL to a document describing the error condition.
                  status:
                    type: integer
                    description: >-
                      Transmission of the HTTP status code so that all
                      information can be found in one place, but also to correct
                      changes in the status code due to the use of proxy
                      servers.
                  title:
                    type: string
                    description: >-
                      A short, human-readable title for the general error type;
                      the title should not change for given types.
                  detail:
                    type: string
                    description: A human-readable description of the specific error.
                  instance:
                    type: string
                    description: >-
                      This optional key may be present, with a unique URI for
                      the specific error; this will often point to an error log
                      for that specific response.
                  request_id:
                    type: string
                    description: Correlation ID for the original request.
                required:
                  - type
                  - status
                additionalProperties: false
              example:
                status: 406
                type: not_acceptable
        '429':
          description: >-
            Too Many Requests. The caller has exceeded their quota for the time
            period and has been throttled.
          headers:
            upvest-request-id:
              required: true
              schema:
                type: string
                format: uuid
                example: 169ae4c7-ebd7-4041-94da-25369653eba7
          content:
            application/problem+json:
              schema:
                title: Error
                type: object
                description: ''
                properties:
                  type:
                    type: string
                    description: URL to a document describing the error condition.
                  status:
                    type: integer
                    description: >-
                      Transmission of the HTTP status code so that all
                      information can be found in one place, but also to correct
                      changes in the status code due to the use of proxy
                      servers.
                  title:
                    type: string
                    description: >-
                      A short, human-readable title for the general error type;
                      the title should not change for given types.
                  detail:
                    type: string
                    description: A human-readable description of the specific error.
                  instance:
                    type: string
                    description: >-
                      This optional key may be present, with a unique URI for
                      the specific error; this will often point to an error log
                      for that specific response.
                  request_id:
                    type: string
                    description: Correlation ID for the original request.
                required:
                  - type
                  - status
                additionalProperties: false
              example:
                status: 429
                type: too_many_requests
        '500':
          description: Internal Server Error. The service encountered an unexpected error.
          headers:
            upvest-request-id:
              required: true
              schema:
                type: string
                format: uuid
                example: 169ae4c7-ebd7-4041-94da-25369653eba7
          content:
            application/problem+json:
              schema:
                title: Error
                type: object
                description: ''
                properties:
                  type:
                    type: string
                    description: URL to a document describing the error condition.
                  status:
                    type: integer
                    description: >-
                      Transmission of the HTTP status code so that all
                      information can be found in one place, but also to correct
                      changes in the status code due to the use of proxy
                      servers.
                  title:
                    type: string
                    description: >-
                      A short, human-readable title for the general error type;
                      the title should not change for given types.
                  detail:
                    type: string
                    description: A human-readable description of the specific error.
                  instance:
                    type: string
                    description: >-
                      This optional key may be present, with a unique URI for
                      the specific error; this will often point to an error log
                      for that specific response.
                  request_id:
                    type: string
                    description: Correlation ID for the original request.
                required:
                  - type
                  - status
                additionalProperties: false
              example:
                status: 500
                type: internal_server_error
        '503':
          description: >-
            Service Unavailable. The service handling for this request cannot be
            reached at this time.
          headers:
            upvest-request-id:
              required: true
              schema:
                type: string
                format: uuid
                example: 169ae4c7-ebd7-4041-94da-25369653eba7
          content:
            application/problem+json:
              schema:
                title: Error
                type: object
                description: ''
                properties:
                  type:
                    type: string
                    description: URL to a document describing the error condition.
                  status:
                    type: integer
                    description: >-
                      Transmission of the HTTP status code so that all
                      information can be found in one place, but also to correct
                      changes in the status code due to the use of proxy
                      servers.
                  title:
                    type: string
                    description: >-
                      A short, human-readable title for the general error type;
                      the title should not change for given types.
                  detail:
                    type: string
                    description: A human-readable description of the specific error.
                  instance:
                    type: string
                    description: >-
                      This optional key may be present, with a unique URI for
                      the specific error; this will often point to an error log
                      for that specific response.
                  request_id:
                    type: string
                    description: Correlation ID for the original request.
                required:
                  - type
                  - status
                additionalProperties: false
              example:
                status: 503
                type: method_not_allowed
        '504':
          description: >-
            Gateway Timeout. The service gateway has reached its internal
            timeout.
          headers:
            upvest-request-id:
              required: true
              schema:
                type: string
                format: uuid
                example: 169ae4c7-ebd7-4041-94da-25369653eba7
          content:
            application/problem+json:
              schema:
                title: Error
                type: object
                description: ''
                properties:
                  type:
                    type: string
                    description: URL to a document describing the error condition.
                  status:
                    type: integer
                    description: >-
                      Transmission of the HTTP status code so that all
                      information can be found in one place, but also to correct
                      changes in the status code due to the use of proxy
                      servers.
                  title:
                    type: string
                    description: >-
                      A short, human-readable title for the general error type;
                      the title should not change for given types.
                  detail:
                    type: string
                    description: A human-readable description of the specific error.
                  instance:
                    type: string
                    description: >-
                      This optional key may be present, with a unique URI for
                      the specific error; this will often point to an error log
                      for that specific response.
                  request_id:
                    type: string
                    description: Correlation ID for the original request.
                required:
                  - type
                  - status
                additionalProperties: false
              example:
                status: 504
                type: gateway_timeout
    post:
      operationId: create_portfolios_configuration
      summary: Create portfolios configuration
      description: Create portfolios configuration
      tags:
        - Portfolios
      security:
        - oauth-client-credentials:
            - portfolios:admin
      parameters:
        - name: idempotency-key
          in: header
          required: true
          schema:
            type: string
            format: uuid
            pattern: >-
              ^[0-9a-fA-F]{8}-?[0-9a-fA-F]{4}-?[0-5][0-9a-fA-F]{3}-?[089abAB][0-9a-fA-F]{3}-?[0-9a-fA-F]{12}$
            example: ccb07f42-4104-44ad-8e1f-c660bb7b269c
          description: >
            A UUID to be used as an idempotency key.  This prevents a duplicate
            request from being replayed.

            https://docs.upvest.co/documentation/concepts/api_concepts/idempotency
      requestBody:
        content:
          application/json:
            schema:
              title: Portfolios configuration - Create - Request
              type: object
              properties:
                account_id:
                  title: Account unique identifier.
                  type: string
                  description: Account unique identifier.
                  format: uuid
                allocation_id:
                  title: Portfolio allocation unique identifier
                  type: string
                  format: uuid
                rebalancing_strategy_ids:
                  description: List of rebalancing strategy ids
                  type: array
                  items:
                    title: Portfolio rebalancing strategy unique identifier
                    type: string
                    format: uuid
              required:
                - account_id
                - allocation_id
              additionalProperties: false
            examples:
              with-strategy:
                summary: with strategy
                value:
                  account_id: f2f7d2c7-d79b-4de2-ae9b-d01646259f9e
                  allocation_id: eb68abce-29f4-483f-a384-7f243e77851f
                  rebalancing_strategy_ids:
                    - 7a7322f5-b45d-4aba-aae4-c12797938c93
                    - fd8e5363-a89c-4a2f-b3c6-5f857721625f
              no-strategy:
                summary: without strategy
                value:
                  account_id: f2f7d2c7-d79b-4de2-ae9b-d01646259f9e
                  allocation_id: eb68abce-29f4-483f-a384-7f243e77851f
      responses:
        '200':
          description: Portfolios configuration
          headers:
            upvest-request-id:
              required: true
              schema:
                type: string
                format: uuid
                example: 169ae4c7-ebd7-4041-94da-25369653eba7
          content:
            application/json:
              schema:
                title: Portfolios configuration
                type: object
                properties:
                  created_at:
                    type: string
                    format: date-time
                    description: >-
                      Date and time when the resource was created. [RFC
                      3339-5](https://datatracker.ietf.org/doc/html/rfc3339#section-5.6),
                      [ISO8601
                      UTC](https://www.iso.org/iso-8601-date-and-time-format.html)
                  updated_at:
                    type: string
                    format: date-time
                    description: >-
                      Date and time when the resource was last updated. [RFC
                      3339-5](https://datatracker.ietf.org/doc/html/rfc3339#section-5.6),
                      [ISO8601
                      UTC](https://www.iso.org/iso-8601-date-and-time-format.html)
                  account_id:
                    title: Account unique identifier.
                    type: string
                    description: Account unique identifier.
                    format: uuid
                  allocation_id:
                    title: Portfolio allocation unique identifier
                    type: string
                    format: uuid
                  rebalancing_strategy_ids:
                    description: List of rebalancing strategy ids
                    type: array
                    items:
                      title: Portfolio rebalancing strategy unique identifier
                      type: string
                      format: uuid
                required:
                  - created_at
                  - updated_at
                  - account_id
                  - allocation_id
                additionalProperties: false
              example:
                created_at: '2021-07-21T14:10:00.00Z'
                updated_at: '2021-07-21T14:10:00.00Z'
                account_id: f2f7d2c7-d79b-4de2-ae9b-d01646259f9e
                allocation_id: eb68abce-29f4-483f-a384-7f243e77851f
                rebalancing_strategy_ids:
                  - 7a7322f5-b45d-4aba-aae4-c12797938c93
                  - fd8e5363-a89c-4a2f-b3c6-5f857721625f
        '400':
          description: Bad Request. The incoming request had a malformed parameter/object.
          headers:
            upvest-request-id:
              required: true
              schema:
                type: string
                format: uuid
                example: 169ae4c7-ebd7-4041-94da-25369653eba7
          content:
            application/problem+json:
              schema:
                title: Error
                type: object
                description: ''
                properties:
                  type:
                    type: string
                    description: URL to a document describing the error condition.
                  status:
                    type: integer
                    description: >-
                      Transmission of the HTTP status code so that all
                      information can be found in one place, but also to correct
                      changes in the status code due to the use of proxy
                      servers.
                  title:
                    type: string
                    description: >-
                      A short, human-readable title for the general error type;
                      the title should not change for given types.
                  detail:
                    type: string
                    description: A human-readable description of the specific error.
                  instance:
                    type: string
                    description: >-
                      This optional key may be present, with a unique URI for
                      the specific error; this will often point to an error log
                      for that specific response.
                  request_id:
                    type: string
                    description: Correlation ID for the original request.
                required:
                  - type
                  - status
                additionalProperties: false
              example:
                status: 400
                type: bad_request
        '401':
          description: Unauthorized. The caller has not been authenticated.
          headers:
            upvest-request-id:
              required: true
              schema:
                type: string
                format: uuid
                example: 169ae4c7-ebd7-4041-94da-25369653eba7
          content:
            application/problem+json:
              schema:
                title: Error
                type: object
                description: ''
                properties:
                  type:
                    type: string
                    description: URL to a document describing the error condition.
                  status:
                    type: integer
                    description: >-
                      Transmission of the HTTP status code so that all
                      information can be found in one place, but also to correct
                      changes in the status code due to the use of proxy
                      servers.
                  title:
                    type: string
                    description: >-
                      A short, human-readable title for the general error type;
                      the title should not change for given types.
                  detail:
                    type: string
                    description: A human-readable description of the specific error.
                  instance:
                    type: string
                    description: >-
                      This optional key may be present, with a unique URI for
                      the specific error; this will often point to an error log
                      for that specific response.
                  request_id:
                    type: string
                    description: Correlation ID for the original request.
                required:
                  - type
                  - status
                additionalProperties: false
              example:
                status: 401
                type: unauthorized
        '403':
          description: >-
            Forbidden. The caller has been authenticated but is not allowed to
            take the requested action.
          headers:
            upvest-request-id:
              required: true
              schema:
                type: string
                format: uuid
                example: 169ae4c7-ebd7-4041-94da-25369653eba7
          content:
            application/problem+json:
              schema:
                title: Error
                type: object
                description: ''
                properties:
                  type:
                    type: string
                    description: URL to a document describing the error condition.
                  status:
                    type: integer
                    description: >-
                      Transmission of the HTTP status code so that all
                      information can be found in one place, but also to correct
                      changes in the status code due to the use of proxy
                      servers.
                  title:
                    type: string
                    description: >-
                      A short, human-readable title for the general error type;
                      the title should not change for given types.
                  detail:
                    type: string
                    description: A human-readable description of the specific error.
                  instance:
                    type: string
                    description: >-
                      This optional key may be present, with a unique URI for
                      the specific error; this will often point to an error log
                      for that specific response.
                  request_id:
                    type: string
                    description: Correlation ID for the original request.
                required:
                  - type
                  - status
                additionalProperties: false
              example:
                status: 403
                type: forbidden
        '404':
          description: Not Found. The requested resource could not be found.
          headers:
            upvest-request-id:
              required: true
              schema:
                type: string
                format: uuid
                example: 169ae4c7-ebd7-4041-94da-25369653eba7
          content:
            application/problem+json:
              schema:
                title: Error
                type: object
                description: ''
                properties:
                  type:
                    type: string
                    description: URL to a document describing the error condition.
                  status:
                    type: integer
                    description: >-
                      Transmission of the HTTP status code so that all
                      information can be found in one place, but also to correct
                      changes in the status code due to the use of proxy
                      servers.
                  title:
                    type: string
                    description: >-
                      A short, human-readable title for the general error type;
                      the title should not change for given types.
                  detail:
                    type: string
                    description: A human-readable description of the specific error.
                  instance:
                    type: string
                    description: >-
                      This optional key may be present, with a unique URI for
                      the specific error; this will often point to an error log
                      for that specific response.
                  request_id:
                    type: string
                    description: Correlation ID for the original request.
                required:
                  - type
                  - status
                additionalProperties: false
              example:
                status: 404
                type: not_found
        '406':
          description: >-
            Not Acceptable. The resource does not have a current representation
            that would be acceptable to the user agent. "Accept" header defined
            unsupported value.
          headers:
            upvest-request-id:
              required: true
              schema:
                type: string
                format: uuid
                example: 169ae4c7-ebd7-4041-94da-25369653eba7
          content:
            application/problem+json:
              schema:
                title: Error
                type: object
                description: ''
                properties:
                  type:
                    type: string
                    description: URL to a document describing the error condition.
                  status:
                    type: integer
                    description: >-
                      Transmission of the HTTP status code so that all
                      information can be found in one place, but also to correct
                      changes in the status code due to the use of proxy
                      servers.
                  title:
                    type: string
                    description: >-
                      A short, human-readable title for the general error type;
                      the title should not change for given types.
                  detail:
                    type: string
                    description: A human-readable description of the specific error.
                  instance:
                    type: string
                    description: >-
                      This optional key may be present, with a unique URI for
                      the specific error; this will often point to an error log
                      for that specific response.
                  request_id:
                    type: string
                    description: Correlation ID for the original request.
                required:
                  - type
                  - status
                additionalProperties: false
              example:
                status: 406
                type: not_acceptable
        '429':
          description: >-
            Too Many Requests. The caller has exceeded their quota for the time
            period and has been throttled.
          headers:
            upvest-request-id:
              required: true
              schema:
                type: string
                format: uuid
                example: 169ae4c7-ebd7-4041-94da-25369653eba7
          content:
            application/problem+json:
              schema:
                title: Error
                type: object
                description: ''
                properties:
                  type:
                    type: string
                    description: URL to a document describing the error condition.
                  status:
                    type: integer
                    description: >-
                      Transmission of the HTTP status code so that all
                      information can be found in one place, but also to correct
                      changes in the status code due to the use of proxy
                      servers.
                  title:
                    type: string
                    description: >-
                      A short, human-readable title for the general error type;
                      the title should not change for given types.
                  detail:
                    type: string
                    description: A human-readable description of the specific error.
                  instance:
                    type: string
                    description: >-
                      This optional key may be present, with a unique URI for
                      the specific error; this will often point to an error log
                      for that specific response.
                  request_id:
                    type: string
                    description: Correlation ID for the original request.
                required:
                  - type
                  - status
                additionalProperties: false
              example:
                status: 429
                type: too_many_requests
        '500':
          description: Internal Server Error. The service encountered an unexpected error.
          headers:
            upvest-request-id:
              required: true
              schema:
                type: string
                format: uuid
                example: 169ae4c7-ebd7-4041-94da-25369653eba7
          content:
            application/problem+json:
              schema:
                title: Error
                type: object
                description: ''
                properties:
                  type:
                    type: string
                    description: URL to a document describing the error condition.
                  status:
                    type: integer
                    description: >-
                      Transmission of the HTTP status code so that all
                      information can be found in one place, but also to correct
                      changes in the status code due to the use of proxy
                      servers.
                  title:
                    type: string
                    description: >-
                      A short, human-readable title for the general error type;
                      the title should not change for given types.
                  detail:
                    type: string
                    description: A human-readable description of the specific error.
                  instance:
                    type: string
                    description: >-
                      This optional key may be present, with a unique URI for
                      the specific error; this will often point to an error log
                      for that specific response.
                  request_id:
                    type: string
                    description: Correlation ID for the original request.
                required:
                  - type
                  - status
                additionalProperties: false
              example:
                status: 500
                type: internal_server_error
        '503':
          description: >-
            Service Unavailable. The service handling for this request cannot be
            reached at this time.
          headers:
            upvest-request-id:
              required: true
              schema:
                type: string
                format: uuid
                example: 169ae4c7-ebd7-4041-94da-25369653eba7
          content:
            application/problem+json:
              schema:
                title: Error
                type: object
                description: ''
                properties:
                  type:
                    type: string
                    description: URL to a document describing the error condition.
                  status:
                    type: integer
                    description: >-
                      Transmission of the HTTP status code so that all
                      information can be found in one place, but also to correct
                      changes in the status code due to the use of proxy
                      servers.
                  title:
                    type: string
                    description: >-
                      A short, human-readable title for the general error type;
                      the title should not change for given types.
                  detail:
                    type: string
                    description: A human-readable description of the specific error.
                  instance:
                    type: string
                    description: >-
                      This optional key may be present, with a unique URI for
                      the specific error; this will often point to an error log
                      for that specific response.
                  request_id:
                    type: string
                    description: Correlation ID for the original request.
                required:
                  - type
                  - status
                additionalProperties: false
              example:
                status: 503
                type: method_not_allowed
        '504':
          description: >-
            Gateway Timeout. The service gateway has reached its internal
            timeout.
          headers:
            upvest-request-id:
              required: true
              schema:
                type: string
                format: uuid
                example: 169ae4c7-ebd7-4041-94da-25369653eba7
          content:
            application/problem+json:
              schema:
                title: Error
                type: object
                description: ''
                properties:
                  type:
                    type: string
                    description: URL to a document describing the error condition.
                  status:
                    type: integer
                    description: >-
                      Transmission of the HTTP status code so that all
                      information can be found in one place, but also to correct
                      changes in the status code due to the use of proxy
                      servers.
                  title:
                    type: string
                    description: >-
                      A short, human-readable title for the general error type;
                      the title should not change for given types.
                  detail:
                    type: string
                    description: A human-readable description of the specific error.
                  instance:
                    type: string
                    description: >-
                      This optional key may be present, with a unique URI for
                      the specific error; this will often point to an error log
                      for that specific response.
                  request_id:
                    type: string
                    description: Correlation ID for the original request.
                required:
                  - type
                  - status
                additionalProperties: false
              example:
                status: 504
                type: gateway_timeout
  /portfolios/configurations/{account_id}:
    parameters:
      - name: account_id
        in: path
        required: true
        schema:
          title: Account unique identifier.
          type: string
          description: Account unique identifier.
          format: uuid
      - name: upvest-client-id
        in: header
        description: Tenant Client ID
        required: true
        schema:
          type: string
          format: uuid
          example: ebabcf4d-61c3-4942-875c-e265a7c2d062
      - name: authorization
        in: header
        description: |
          Bearer (access) token from the OAuth flow with correct scopes.
          https://datatracker.ietf.org/doc/html/rfc6750
        required: true
        schema:
          type: string
          pattern: ^Bearer [a-zA-Z0-9\-\._~+/]*=*
          example: Bearer c2VjcmV0Cg==
      - name: signature
        in: header
        required: true
        schema:
          type: string
        description: >-
          https://tools.ietf.org/id/draft-ietf-httpbis-message-signatures-01.html#name-the-signature-http-header
      - name: signature-input
        in: header
        required: true
        schema:
          type: string
        description: >-
          https://tools.ietf.org/id/draft-ietf-httpbis-message-signatures-01.html#name-the-signature-input-http-he
      - name: upvest-api-version
        in: header
        required: false
        schema:
          type: string
          enum:
            - '1'
          default: '1'
          example: '1'
        description: 'Upvest API version (Note: Do not include quotation marks)'
    get:
      operationId: retrieve_portfolios_configuration
      summary: Retrieve portfolios configuration
      description: Retrieve portfolios configuration
      tags:
        - Portfolios
      security:
        - oauth-client-credentials:
            - portfolios:read
            - portfolios:admin
      responses:
        '200':
          description: Portfolios
          headers:
            upvest-request-id:
              required: true
              schema:
                type: string
                format: uuid
                example: 169ae4c7-ebd7-4041-94da-25369653eba7
          content:
            application/json:
              schema:
                title: Portfolios configuration
                type: object
                properties:
                  created_at:
                    type: string
                    format: date-time
                    description: >-
                      Date and time when the resource was created. [RFC
                      3339-5](https://datatracker.ietf.org/doc/html/rfc3339#section-5.6),
                      [ISO8601
                      UTC](https://www.iso.org/iso-8601-date-and-time-format.html)
                  updated_at:
                    type: string
                    format: date-time
                    description: >-
                      Date and time when the resource was last updated. [RFC
                      3339-5](https://datatracker.ietf.org/doc/html/rfc3339#section-5.6),
                      [ISO8601
                      UTC](https://www.iso.org/iso-8601-date-and-time-format.html)
                  account_id:
                    title: Account unique identifier.
                    type: string
                    description: Account unique identifier.
                    format: uuid
                  allocation_id:
                    title: Portfolio allocation unique identifier
                    type: string
                    format: uuid
                  rebalancing_strategy_ids:
                    description: List of rebalancing strategy ids
                    type: array
                    items:
                      title: Portfolio rebalancing strategy unique identifier
                      type: string
                      format: uuid
                required:
                  - created_at
                  - updated_at
                  - account_id
                  - allocation_id
                additionalProperties: false
              example:
                created_at: '2021-07-21T14:10:00.00Z'
                updated_at: '2021-07-21T14:10:00.00Z'
                account_id: f2f7d2c7-d79b-4de2-ae9b-d01646259f9e
                allocation_id: eb68abce-29f4-483f-a384-7f243e77851f
                rebalancing_strategy_ids:
                  - 7a7322f5-b45d-4aba-aae4-c12797938c93
                  - fd8e5363-a89c-4a2f-b3c6-5f857721625f
        '401':
          description: Unauthorized. The caller has not been authenticated.
          headers:
            upvest-request-id:
              required: true
              schema:
                type: string
                format: uuid
                example: 169ae4c7-ebd7-4041-94da-25369653eba7
          content:
            application/problem+json:
              schema:
                title: Error
                type: object
                description: ''
                properties:
                  type:
                    type: string
                    description: URL to a document describing the error condition.
                  status:
                    type: integer
                    description: >-
                      Transmission of the HTTP status code so that all
                      information can be found in one place, but also to correct
                      changes in the status code due to the use of proxy
                      servers.
                  title:
                    type: string
                    description: >-
                      A short, human-readable title for the general error type;
                      the title should not change for given types.
                  detail:
                    type: string
                    description: A human-readable description of the specific error.
                  instance:
                    type: string
                    description: >-
                      This optional key may be present, with a unique URI for
                      the specific error; this will often point to an error log
                      for that specific response.
                  request_id:
                    type: string
                    description: Correlation ID for the original request.
                required:
                  - type
                  - status
                additionalProperties: false
              example:
                status: 401
                type: unauthorized
        '403':
          description: >-
            Forbidden. The caller has been authenticated but is not allowed to
            take the requested action.
          headers:
            upvest-request-id:
              required: true
              schema:
                type: string
                format: uuid
                example: 169ae4c7-ebd7-4041-94da-25369653eba7
          content:
            application/problem+json:
              schema:
                title: Error
                type: object
                description: ''
                properties:
                  type:
                    type: string
                    description: URL to a document describing the error condition.
                  status:
                    type: integer
                    description: >-
                      Transmission of the HTTP status code so that all
                      information can be found in one place, but also to correct
                      changes in the status code due to the use of proxy
                      servers.
                  title:
                    type: string
                    description: >-
                      A short, human-readable title for the general error type;
                      the title should not change for given types.
                  detail:
                    type: string
                    description: A human-readable description of the specific error.
                  instance:
                    type: string
                    description: >-
                      This optional key may be present, with a unique URI for
                      the specific error; this will often point to an error log
                      for that specific response.
                  request_id:
                    type: string
                    description: Correlation ID for the original request.
                required:
                  - type
                  - status
                additionalProperties: false
              example:
                status: 403
                type: forbidden
        '404':
          description: Not Found. The requested resource could not be found.
          headers:
            upvest-request-id:
              required: true
              schema:
                type: string
                format: uuid
                example: 169ae4c7-ebd7-4041-94da-25369653eba7
          content:
            application/problem+json:
              schema:
                title: Error
                type: object
                description: ''
                properties:
                  type:
                    type: string
                    description: URL to a document describing the error condition.
                  status:
                    type: integer
                    description: >-
                      Transmission of the HTTP status code so that all
                      information can be found in one place, but also to correct
                      changes in the status code due to the use of proxy
                      servers.
                  title:
                    type: string
                    description: >-
                      A short, human-readable title for the general error type;
                      the title should not change for given types.
                  detail:
                    type: string
                    description: A human-readable description of the specific error.
                  instance:
                    type: string
                    description: >-
                      This optional key may be present, with a unique URI for
                      the specific error; this will often point to an error log
                      for that specific response.
                  request_id:
                    type: string
                    description: Correlation ID for the original request.
                required:
                  - type
                  - status
                additionalProperties: false
              example:
                status: 404
                type: not_found
        '405':
          description: >-
            Method Not Allowed. The requested method is not allowed on the
            requested resource.
          headers:
            upvest-request-id:
              required: true
              schema:
                type: string
                format: uuid
                example: 169ae4c7-ebd7-4041-94da-25369653eba7
          content:
            application/problem+json:
              schema:
                title: Error
                type: object
                description: ''
                properties:
                  type:
                    type: string
                    description: URL to a document describing the error condition.
                  status:
                    type: integer
                    description: >-
                      Transmission of the HTTP status code so that all
                      information can be found in one place, but also to correct
                      changes in the status code due to the use of proxy
                      servers.
                  title:
                    type: string
                    description: >-
                      A short, human-readable title for the general error type;
                      the title should not change for given types.
                  detail:
                    type: string
                    description: A human-readable description of the specific error.
                  instance:
                    type: string
                    description: >-
                      This optional key may be present, with a unique URI for
                      the specific error; this will often point to an error log
                      for that specific response.
                  request_id:
                    type: string
                    description: Correlation ID for the original request.
                required:
                  - type
                  - status
                additionalProperties: false
              example:
                status: 405
                type: method_not_allowed
        '406':
          description: >-
            Not Acceptable. The resource does not have a current representation
            that would be acceptable to the user agent. "Accept" header defined
            unsupported value.
          headers:
            upvest-request-id:
              required: true
              schema:
                type: string
                format: uuid
                example: 169ae4c7-ebd7-4041-94da-25369653eba7
          content:
            application/problem+json:
              schema:
                title: Error
                type: object
                description: ''
                properties:
                  type:
                    type: string
                    description: URL to a document describing the error condition.
                  status:
                    type: integer
                    description: >-
                      Transmission of the HTTP status code so that all
                      information can be found in one place, but also to correct
                      changes in the status code due to the use of proxy
                      servers.
                  title:
                    type: string
                    description: >-
                      A short, human-readable title for the general error type;
                      the title should not change for given types.
                  detail:
                    type: string
                    description: A human-readable description of the specific error.
                  instance:
                    type: string
                    description: >-
                      This optional key may be present, with a unique URI for
                      the specific error; this will often point to an error log
                      for that specific response.
                  request_id:
                    type: string
                    description: Correlation ID for the original request.
                required:
                  - type
                  - status
                additionalProperties: false
              example:
                status: 406
                type: not_acceptable
        '429':
          description: >-
            Too Many Requests. The caller has exceeded their quota for the time
            period and has been throttled.
          headers:
            upvest-request-id:
              required: true
              schema:
                type: string
                format: uuid
                example: 169ae4c7-ebd7-4041-94da-25369653eba7
          content:
            application/problem+json:
              schema:
                title: Error
                type: object
                description: ''
                properties:
                  type:
                    type: string
                    description: URL to a document describing the error condition.
                  status:
                    type: integer
                    description: >-
                      Transmission of the HTTP status code so that all
                      information can be found in one place, but also to correct
                      changes in the status code due to the use of proxy
                      servers.
                  title:
                    type: string
                    description: >-
                      A short, human-readable title for the general error type;
                      the title should not change for given types.
                  detail:
                    type: string
                    description: A human-readable description of the specific error.
                  instance:
                    type: string
                    description: >-
                      This optional key may be present, with a unique URI for
                      the specific error; this will often point to an error log
                      for that specific response.
                  request_id:
                    type: string
                    description: Correlation ID for the original request.
                required:
                  - type
                  - status
                additionalProperties: false
              example:
                status: 429
                type: too_many_requests
        '500':
          description: Internal Server Error. The service encountered an unexpected error.
          headers:
            upvest-request-id:
              required: true
              schema:
                type: string
                format: uuid
                example: 169ae4c7-ebd7-4041-94da-25369653eba7
          content:
            application/problem+json:
              schema:
                title: Error
                type: object
                description: ''
                properties:
                  type:
                    type: string
                    description: URL to a document describing the error condition.
                  status:
                    type: integer
                    description: >-
                      Transmission of the HTTP status code so that all
                      information can be found in one place, but also to correct
                      changes in the status code due to the use of proxy
                      servers.
                  title:
                    type: string
                    description: >-
                      A short, human-readable title for the general error type;
                      the title should not change for given types.
                  detail:
                    type: string
                    description: A human-readable description of the specific error.
                  instance:
                    type: string
                    description: >-
                      This optional key may be present, with a unique URI for
                      the specific error; this will often point to an error log
                      for that specific response.
                  request_id:
                    type: string
                    description: Correlation ID for the original request.
                required:
                  - type
                  - status
                additionalProperties: false
              example:
                status: 500
                type: internal_server_error
        '503':
          description: >-
            Service Unavailable. The service handling for this request cannot be
            reached at this time.
          headers:
            upvest-request-id:
              required: true
              schema:
                type: string
                format: uuid
                example: 169ae4c7-ebd7-4041-94da-25369653eba7
          content:
            application/problem+json:
              schema:
                title: Error
                type: object
                description: ''
                properties:
                  type:
                    type: string
                    description: URL to a document describing the error condition.
                  status:
                    type: integer
                    description: >-
                      Transmission of the HTTP status code so that all
                      information can be found in one place, but also to correct
                      changes in the status code due to the use of proxy
                      servers.
                  title:
                    type: string
                    description: >-
                      A short, human-readable title for the general error type;
                      the title should not change for given types.
                  detail:
                    type: string
                    description: A human-readable description of the specific error.
                  instance:
                    type: string
                    description: >-
                      This optional key may be present, with a unique URI for
                      the specific error; this will often point to an error log
                      for that specific response.
                  request_id:
                    type: string
                    description: Correlation ID for the original request.
                required:
                  - type
                  - status
                additionalProperties: false
              example:
                status: 503
                type: method_not_allowed
        '504':
          description: >-
            Gateway Timeout. The service gateway has reached its internal
            timeout.
          headers:
            upvest-request-id:
              required: true
              schema:
                type: string
                format: uuid
                example: 169ae4c7-ebd7-4041-94da-25369653eba7
          content:
            application/problem+json:
              schema:
                title: Error
                type: object
                description: ''
                properties:
                  type:
                    type: string
                    description: URL to a document describing the error condition.
                  status:
                    type: integer
                    description: >-
                      Transmission of the HTTP status code so that all
                      information can be found in one place, but also to correct
                      changes in the status code due to the use of proxy
                      servers.
                  title:
                    type: string
                    description: >-
                      A short, human-readable title for the general error type;
                      the title should not change for given types.
                  detail:
                    type: string
                    description: A human-readable description of the specific error.
                  instance:
                    type: string
                    description: >-
                      This optional key may be present, with a unique URI for
                      the specific error; this will often point to an error log
                      for that specific response.
                  request_id:
                    type: string
                    description: Correlation ID for the original request.
                required:
                  - type
                  - status
                additionalProperties: false
              example:
                status: 504
                type: gateway_timeout
    patch:
      operationId: update_portfolios_configuration
      summary: Update portfolios configuration
      description: Update portfolios configuration
      tags:
        - Portfolios
      security:
        - oauth-client-credentials:
            - portfolios:admin
      parameters:
        - name: idempotency-key
          in: header
          required: true
          schema:
            type: string
            format: uuid
            pattern: >-
              ^[0-9a-fA-F]{8}-?[0-9a-fA-F]{4}-?[0-5][0-9a-fA-F]{3}-?[089abAB][0-9a-fA-F]{3}-?[0-9a-fA-F]{12}$
            example: ccb07f42-4104-44ad-8e1f-c660bb7b269c
          description: >
            A UUID to be used as an idempotency key.  This prevents a duplicate
            request from being replayed.

            https://docs.upvest.co/documentation/concepts/api_concepts/idempotency
      requestBody:
        content:
          application/json:
            schema:
              title: Portfolios configuration - Update - Request
              type: object
              properties:
                allocation_id:
                  title: Portfolio allocation unique identifier
                  type: string
                  format: uuid
                rebalancing_strategy_ids:
                  description: List of rebalancing strategy ids
                  type: array
                  items:
                    title: Portfolio rebalancing strategy unique identifier
                    type: string
                    format: uuid
              additionalProperties: false
            example:
              allocation_id: 359e9c9e-b91c-4853-8674-e6657af609fc
      responses:
        '200':
          description: Portfolio
          headers:
            upvest-request-id:
              required: true
              schema:
                type: string
                format: uuid
                example: 169ae4c7-ebd7-4041-94da-25369653eba7
          content:
            application/json:
              schema:
                title: Portfolios configuration
                type: object
                properties:
                  created_at:
                    type: string
                    format: date-time
                    description: >-
                      Date and time when the resource was created. [RFC
                      3339-5](https://datatracker.ietf.org/doc/html/rfc3339#section-5.6),
                      [ISO8601
                      UTC](https://www.iso.org/iso-8601-date-and-time-format.html)
                  updated_at:
                    type: string
                    format: date-time
                    description: >-
                      Date and time when the resource was last updated. [RFC
                      3339-5](https://datatracker.ietf.org/doc/html/rfc3339#section-5.6),
                      [ISO8601
                      UTC](https://www.iso.org/iso-8601-date-and-time-format.html)
                  account_id:
                    title: Account unique identifier.
                    type: string
                    description: Account unique identifier.
                    format: uuid
                  allocation_id:
                    title: Portfolio allocation unique identifier
                    type: string
                    format: uuid
                  rebalancing_strategy_ids:
                    description: List of rebalancing strategy ids
                    type: array
                    items:
                      title: Portfolio rebalancing strategy unique identifier
                      type: string
                      format: uuid
                required:
                  - created_at
                  - updated_at
                  - account_id
                  - allocation_id
                additionalProperties: false
              example:
                created_at: '2021-07-21T14:10:00.00Z'
                updated_at: '2021-07-22T15:10:00.00Z'
                account_id: f2f7d2c7-d79b-4de2-ae9b-d01646259f9e
                allocation_id: 359e9c9e-b91c-4853-8674-e6657af609fc
                rebalancing_strategy_ids:
                  - 7a7322f5-b45d-4aba-aae4-c12797938c93
                  - fd8e5363-a89c-4a2f-b3c6-5f857721625f
        '400':
          description: Bad Request. The incoming request had a malformed parameter/object.
          headers:
            upvest-request-id:
              required: true
              schema:
                type: string
                format: uuid
                example: 169ae4c7-ebd7-4041-94da-25369653eba7
          content:
            application/problem+json:
              schema:
                title: Error
                type: object
                description: ''
                properties:
                  type:
                    type: string
                    description: URL to a document describing the error condition.
                  status:
                    type: integer
                    description: >-
                      Transmission of the HTTP status code so that all
                      information can be found in one place, but also to correct
                      changes in the status code due to the use of proxy
                      servers.
                  title:
                    type: string
                    description: >-
                      A short, human-readable title for the general error type;
                      the title should not change for given types.
                  detail:
                    type: string
                    description: A human-readable description of the specific error.
                  instance:
                    type: string
                    description: >-
                      This optional key may be present, with a unique URI for
                      the specific error; this will often point to an error log
                      for that specific response.
                  request_id:
                    type: string
                    description: Correlation ID for the original request.
                required:
                  - type
                  - status
                additionalProperties: false
              example:
                status: 400
                type: bad_request
        '401':
          description: Unauthorized. The caller has not been authenticated.
          headers:
            upvest-request-id:
              required: true
              schema:
                type: string
                format: uuid
                example: 169ae4c7-ebd7-4041-94da-25369653eba7
          content:
            application/problem+json:
              schema:
                title: Error
                type: object
                description: ''
                properties:
                  type:
                    type: string
                    description: URL to a document describing the error condition.
                  status:
                    type: integer
                    description: >-
                      Transmission of the HTTP status code so that all
                      information can be found in one place, but also to correct
                      changes in the status code due to the use of proxy
                      servers.
                  title:
                    type: string
                    description: >-
                      A short, human-readable title for the general error type;
                      the title should not change for given types.
                  detail:
                    type: string
                    description: A human-readable description of the specific error.
                  instance:
                    type: string
                    description: >-
                      This optional key may be present, with a unique URI for
                      the specific error; this will often point to an error log
                      for that specific response.
                  request_id:
                    type: string
                    description: Correlation ID for the original request.
                required:
                  - type
                  - status
                additionalProperties: false
              example:
                status: 401
                type: unauthorized
        '403':
          description: >-
            Forbidden. The caller has been authenticated but is not allowed to
            take the requested action.
          headers:
            upvest-request-id:
              required: true
              schema:
                type: string
                format: uuid
                example: 169ae4c7-ebd7-4041-94da-25369653eba7
          content:
            application/problem+json:
              schema:
                title: Error
                type: object
                description: ''
                properties:
                  type:
                    type: string
                    description: URL to a document describing the error condition.
                  status:
                    type: integer
                    description: >-
                      Transmission of the HTTP status code so that all
                      information can be found in one place, but also to correct
                      changes in the status code due to the use of proxy
                      servers.
                  title:
                    type: string
                    description: >-
                      A short, human-readable title for the general error type;
                      the title should not change for given types.
                  detail:
                    type: string
                    description: A human-readable description of the specific error.
                  instance:
                    type: string
                    description: >-
                      This optional key may be present, with a unique URI for
                      the specific error; this will often point to an error log
                      for that specific response.
                  request_id:
                    type: string
                    description: Correlation ID for the original request.
                required:
                  - type
                  - status
                additionalProperties: false
              example:
                status: 403
                type: forbidden
        '404':
          description: Not Found. The requested resource could not be found.
          headers:
            upvest-request-id:
              required: true
              schema:
                type: string
                format: uuid
                example: 169ae4c7-ebd7-4041-94da-25369653eba7
          content:
            application/problem+json:
              schema:
                title: Error
                type: object
                description: ''
                properties:
                  type:
                    type: string
                    description: URL to a document describing the error condition.
                  status:
                    type: integer
                    description: >-
                      Transmission of the HTTP status code so that all
                      information can be found in one place, but also to correct
                      changes in the status code due to the use of proxy
                      servers.
                  title:
                    type: string
                    description: >-
                      A short, human-readable title for the general error type;
                      the title should not change for given types.
                  detail:
                    type: string
                    description: A human-readable description of the specific error.
                  instance:
                    type: string
                    description: >-
                      This optional key may be present, with a unique URI for
                      the specific error; this will often point to an error log
                      for that specific response.
                  request_id:
                    type: string
                    description: Correlation ID for the original request.
                required:
                  - type
                  - status
                additionalProperties: false
              example:
                status: 404
                type: not_found
        '406':
          description: >-
            Not Acceptable. The resource does not have a current representation
            that would be acceptable to the user agent. "Accept" header defined
            unsupported value.
          headers:
            upvest-request-id:
              required: true
              schema:
                type: string
                format: uuid
                example: 169ae4c7-ebd7-4041-94da-25369653eba7
          content:
            application/problem+json:
              schema:
                title: Error
                type: object
                description: ''
                properties:
                  type:
                    type: string
                    description: URL to a document describing the error condition.
                  status:
                    type: integer
                    description: >-
                      Transmission of the HTTP status code so that all
                      information can be found in one place, but also to correct
                      changes in the status code due to the use of proxy
                      servers.
                  title:
                    type: string
                    description: >-
                      A short, human-readable title for the general error type;
                      the title should not change for given types.
                  detail:
                    type: string
                    description: A human-readable description of the specific error.
                  instance:
                    type: string
                    description: >-
                      This optional key may be present, with a unique URI for
                      the specific error; this will often point to an error log
                      for that specific response.
                  request_id:
                    type: string
                    description: Correlation ID for the original request.
                required:
                  - type
                  - status
                additionalProperties: false
              example:
                status: 406
                type: not_acceptable
        '429':
          description: >-
            Too Many Requests. The caller has exceeded their quota for the time
            period and has been throttled.
          headers:
            upvest-request-id:
              required: true
              schema:
                type: string
                format: uuid
                example: 169ae4c7-ebd7-4041-94da-25369653eba7
          content:
            application/problem+json:
              schema:
                title: Error
                type: object
                description: ''
                properties:
                  type:
                    type: string
                    description: URL to a document describing the error condition.
                  status:
                    type: integer
                    description: >-
                      Transmission of the HTTP status code so that all
                      information can be found in one place, but also to correct
                      changes in the status code due to the use of proxy
                      servers.
                  title:
                    type: string
                    description: >-
                      A short, human-readable title for the general error type;
                      the title should not change for given types.
                  detail:
                    type: string
                    description: A human-readable description of the specific error.
                  instance:
                    type: string
                    description: >-
                      This optional key may be present, with a unique URI for
                      the specific error; this will often point to an error log
                      for that specific response.
                  request_id:
                    type: string
                    description: Correlation ID for the original request.
                required:
                  - type
                  - status
                additionalProperties: false
              example:
                status: 429
                type: too_many_requests
        '500':
          description: Internal Server Error. The service encountered an unexpected error.
          headers:
            upvest-request-id:
              required: true
              schema:
                type: string
                format: uuid
                example: 169ae4c7-ebd7-4041-94da-25369653eba7
          content:
            application/problem+json:
              schema:
                title: Error
                type: object
                description: ''
                properties:
                  type:
                    type: string
                    description: URL to a document describing the error condition.
                  status:
                    type: integer
                    description: >-
                      Transmission of the HTTP status code so that all
                      information can be found in one place, but also to correct
                      changes in the status code due to the use of proxy
                      servers.
                  title:
                    type: string
                    description: >-
                      A short, human-readable title for the general error type;
                      the title should not change for given types.
                  detail:
                    type: string
                    description: A human-readable description of the specific error.
                  instance:
                    type: string
                    description: >-
                      This optional key may be present, with a unique URI for
                      the specific error; this will often point to an error log
                      for that specific response.
                  request_id:
                    type: string
                    description: Correlation ID for the original request.
                required:
                  - type
                  - status
                additionalProperties: false
              example:
                status: 500
                type: internal_server_error
        '503':
          description: >-
            Service Unavailable. The service handling for this request cannot be
            reached at this time.
          headers:
            upvest-request-id:
              required: true
              schema:
                type: string
                format: uuid
                example: 169ae4c7-ebd7-4041-94da-25369653eba7
          content:
            application/problem+json:
              schema:
                title: Error
                type: object
                description: ''
                properties:
                  type:
                    type: string
                    description: URL to a document describing the error condition.
                  status:
                    type: integer
                    description: >-
                      Transmission of the HTTP status code so that all
                      information can be found in one place, but also to correct
                      changes in the status code due to the use of proxy
                      servers.
                  title:
                    type: string
                    description: >-
                      A short, human-readable title for the general error type;
                      the title should not change for given types.
                  detail:
                    type: string
                    description: A human-readable description of the specific error.
                  instance:
                    type: string
                    description: >-
                      This optional key may be present, with a unique URI for
                      the specific error; this will often point to an error log
                      for that specific response.
                  request_id:
                    type: string
                    description: Correlation ID for the original request.
                required:
                  - type
                  - status
                additionalProperties: false
              example:
                status: 503
                type: method_not_allowed
        '504':
          description: >-
            Gateway Timeout. The service gateway has reached its internal
            timeout.
          headers:
            upvest-request-id:
              required: true
              schema:
                type: string
                format: uuid
                example: 169ae4c7-ebd7-4041-94da-25369653eba7
          content:
            application/problem+json:
              schema:
                title: Error
                type: object
                description: ''
                properties:
                  type:
                    type: string
                    description: URL to a document describing the error condition.
                  status:
                    type: integer
                    description: >-
                      Transmission of the HTTP status code so that all
                      information can be found in one place, but also to correct
                      changes in the status code due to the use of proxy
                      servers.
                  title:
                    type: string
                    description: >-
                      A short, human-readable title for the general error type;
                      the title should not change for given types.
                  detail:
                    type: string
                    description: A human-readable description of the specific error.
                  instance:
                    type: string
                    description: >-
                      This optional key may be present, with a unique URI for
                      the specific error; this will often point to an error log
                      for that specific response.
                  request_id:
                    type: string
                    description: Correlation ID for the original request.
                required:
                  - type
                  - status
                additionalProperties: false
              example:
                status: 504
                type: gateway_timeout
  /portfolios/orders:
    parameters:
      - name: upvest-client-id
        in: header
        description: Tenant Client ID
        required: true
        schema:
          type: string
          format: uuid
          example: ebabcf4d-61c3-4942-875c-e265a7c2d062
      - name: authorization
        in: header
        description: |
          Bearer (access) token from the OAuth flow with correct scopes.
          https://datatracker.ietf.org/doc/html/rfc6750
        required: true
        schema:
          type: string
          pattern: ^Bearer [a-zA-Z0-9\-\._~+/]*=*
          example: Bearer c2VjcmV0Cg==
      - name: signature
        in: header
        required: true
        schema:
          type: string
        description: >-
          https://tools.ietf.org/id/draft-ietf-httpbis-message-signatures-01.html#name-the-signature-http-header
      - name: signature-input
        in: header
        required: true
        schema:
          type: string
        description: >-
          https://tools.ietf.org/id/draft-ietf-httpbis-message-signatures-01.html#name-the-signature-input-http-he
      - name: upvest-api-version
        in: header
        required: false
        schema:
          type: string
          enum:
            - '1'
          default: '1'
          example: '1'
        description: 'Upvest API version (Note: Do not include quotation marks)'
    get:
      operationId: list_portfolios_orders
      summary: List portfolios orders
      description: List portfolios orders
      tags:
        - Portfolios
      security:
        - oauth-client-credentials:
            - portfolios:read
            - portfolios:admin
      parameters:
        - name: sort
          in: query
          required: false
          schema:
            type: string
            enum:
              - id
            default: id
          description: Sort the result by `id`.
        - name: order
          in: query
          required: false
          schema:
            type: string
            enum:
              - ASC
            default: ASC
          description: >-
            Sort order of the result list if the `sort` parameter is specified.
            By default, only ASC for ascending sort.
        - name: offset
          in: query
          schema:
            type: integer
            minimum: 0
            format: int32
          allowEmptyValue: true
          description: >-
            Use the `offset` argument to specify where in the list of results to
            start when returning items for a particular query.
        - name: limit
          in: query
          schema:
            type: integer
            format: int32
            default: 100
            minimum: 0
            maximum: 1000
          allowEmptyValue: true
          description: >-
            Use the `limit` argument to specify the maximum number of items
            returned.
        - name: start_date
          in: query
          required: false
          schema:
            type: string
            title: Date in YYYY-MM-DD format. RFC 3339, section 5.6
          description: >-
            Returns portfolio orders with dates starting from and including this
            date (UTC)
          example: '2022-10-14T10:10:10Z'
        - name: end_date
          in: query
          required: false
          schema:
            type: string
            title: Date in YYYY-MM-DD format. RFC 3339, section 5.6
          description: Returns portfolio orders with dates up until this date (UTC)
          example: '2022-10-14T10:10:10Z'
        - name: allocation_id
          in: query
          required: false
          schema:
            title: Portfolio allocation unique identifier
            type: string
            format: uuid
          example: f96eaefd-b4c6-477a-9bbe-c744bf26172f
          description: Filters portfolio orders containing the allocation id
        - name: account_id
          in: query
          required: false
          schema:
            title: Account unique identifier.
            type: string
            description: Account unique identifier.
            format: uuid
          example: 2c865aab-6737-4b0e-9154-69a4622b2727
          description: Filters portfolio orders containing the account id
      responses:
        '200':
          description: Portfolios orders
          headers:
            upvest-request-id:
              required: true
              schema:
                type: string
                format: uuid
                example: 169ae4c7-ebd7-4041-94da-25369653eba7
          content:
            application/json:
              schema:
                title: Portfolios orders - List - Response
                type: object
                properties:
                  meta:
                    type: object
                    properties:
                      offset:
                        type: integer
                        description: Amount of resource to offset in the response.
                      limit:
                        type: integer
                        description: Total limit of the response.
                      count:
                        type: integer
                        description: Count of the resources returned in the response.
                      total_count:
                        type: integer
                        description: Total count of all the resources.
                      sort:
                        type: string
                        description: The field that the list is sorted by.
                      order:
                        type: string
                        description: |-
                          The ordering of the response.
                          * ASC - Ascending order
                          * DESC - Descending order
                        enum:
                          - ASC
                          - DESC
                    required:
                      - offset
                      - limit
                      - count
                      - total_count
                  data:
                    type: array
                    items:
                      title: Portfolios order
                      type: object
                      properties:
                        id:
                          title: Portfolios order unique identifier
                          type: string
                          format: uuid
                        created_at:
                          type: string
                          format: date-time
                          description: >-
                            Date and time when the resource was created. [RFC
                            3339-5](https://datatracker.ietf.org/doc/html/rfc3339#section-5.6),
                            [ISO8601
                            UTC](https://www.iso.org/iso-8601-date-and-time-format.html)
                        updated_at:
                          type: string
                          format: date-time
                          description: >-
                            Date and time when the resource was last updated.
                            [RFC
                            3339-5](https://datatracker.ietf.org/doc/html/rfc3339#section-5.6),
                            [ISO8601
                            UTC](https://www.iso.org/iso-8601-date-and-time-format.html)
                        user_id:
                          title: User unique identifier.
                          type: string
                          description: User unique identifier.
                          format: uuid
                        account_id:
                          title: Account unique identifier.
                          type: string
                          description: Account unique identifier.
                          format: uuid
                        allocation_id:
                          title: Portfolio allocation unique identifier
                          type: string
                          format: uuid
                        cash_amount:
                          type: string
                          pattern: ^[0-9]{0,63}(\.[0-9]{1,27})?$
                        currency:
                          type: string
                          description: >-
                            Alphabetic three-letter [ISO
                            4217](https://en.wikipedia.org/wiki/ISO_4217)
                            currency code.

                            * EUR - Euro
                          enum:
                            - EUR
                          default: EUR
                        status:
                          type: string
                          description: |-
                            Execution status of the Portfolio Order.
                            * NEW - 
                            * PROCESSING - 
                            * FILLED - 
                            * SETTLED - 
                            * CANCELLED - 
                          enum:
                            - NEW
                            - PROCESSING
                            - FILLED
                            - SETTLED
                            - CANCELLED
                        type:
                          type: string
                          description: |-
                            Type of the Portfolio Order.
                            * BUY - 
                            * SELL - 
                            * REBALANCING - 
                          enum:
                            - BUY
                            - SELL
                            - REBALANCING
                        post_tax:
                          type: boolean
                          description: Cash amount is post-tax value
                          default: false
                        orders:
                          type: array
                          description: Orders associated with this portfolio order
                          items:
                            title: Portfolios order
                            type: object
                            properties:
                              id:
                                title: Order unique identifier
                                type: string
                                format: uuid
                              side:
                                type: string
                                description: |-
                                  Side of the portfolio order.
                                  * BUY - 
                                  * SELL - 
                                enum:
                                  - BUY
                                  - SELL
                              status:
                                type: string
                                description: |-
                                  The execution status of the order.
                                  * NEW - 
                                  * PROCESSING - 
                                  * FILLED - 
                                  * CANCELLED - 
                                enum:
                                  - NEW
                                  - PROCESSING
                                  - FILLED
                                  - CANCELLED
                            required:
                              - id
                              - side
                              - status
                            additionalProperties: false
                        client_reference:
                          title: An ID provided by the client
                          type: string
                        initiation_flow:
                          title: Initiation flow used during order creation
                          description: |-
                            What triggered the order creation .
                            * API - 
                            * SAVINGS_PLAN -  
                          type: string
                          enum:
                            - API
                            - SAVINGS_PLAN
                        cancellation_reason:
                          title: Cancellation reason code
                          description: |-
                            Explains the reason why the order was cancelled .
                            * ACCOUNT_IS_EMPTY - 
                            * CANCELLED_BY_CLIENT - 
                            * CANCELLED_BY_UPVEST - 
                            * PORTFOLIO_IS_BALANCED - 
                            * SELL_LIMIT_EXCEEDED - 
                          type: string
                          enum:
                            - ACCOUNT_IS_EMPTY
                            - CANCELLED_BY_CLIENT
                            - CANCELLED_BY_UPVEST
                            - PORTFOLIO_IS_BALANCED
                            - SELL_LIMIT_EXCEEDED
                        cancellation_details:
                          type: string
                      required:
                        - id
                        - created_at
                        - updated_at
                        - account_id
                        - cash_amount
                        - currency
                        - status
                        - post_tax
                        - client_reference
                        - initiation_flow
                        - orders
                      additionalProperties: false
                required:
                  - meta
                  - data
                additionalProperties: false
              example:
                meta:
                  offset: 0
                  limit: 100
                  count: 1
                  total_count: 1
                  sort: id
                  order: ASC
                data:
                  - id: eb5ba93f-5dfe-4bf1-8571-4da0caacc80c
                    created_at: '2021-07-21T14:10:00.000Z'
                    updated_at: '2021-07-21T14:10:00.000Z'
                    account_id: debf2026-f2da-4ff0-bb84-92e45babb1e3
                    allocation_id: eb68abce-29f4-483f-a384-7f243e77851f
                    cash_amount: '1000'
                    currency: EUR
                    status: PROCESSING
                    type: SELL
                    post_tax: false
                    client_reference: ''
                    initiation_flow: API
                    orders:
                      - id: b291d8a4-21f5-4c52-8590-4f90ce54d0b1
                        side: SELL
                        status: NEW
                      - id: 81d02bd9-7b9d-443d-bbfa-31df4d543f7d
                        side: SELL
                        status: PROCESSING
                      - id: e97fb564-ebb4-4f37-930a-bda49c09a2e4
                        side: SELL
                        status: FILLED
        '400':
          description: Bad Request. The incoming request had a malformed parameter/object.
          headers:
            upvest-request-id:
              required: true
              schema:
                type: string
                format: uuid
                example: 169ae4c7-ebd7-4041-94da-25369653eba7
          content:
            application/problem+json:
              schema:
                title: Error
                type: object
                description: ''
                properties:
                  type:
                    type: string
                    description: URL to a document describing the error condition.
                  status:
                    type: integer
                    description: >-
                      Transmission of the HTTP status code so that all
                      information can be found in one place, but also to correct
                      changes in the status code due to the use of proxy
                      servers.
                  title:
                    type: string
                    description: >-
                      A short, human-readable title for the general error type;
                      the title should not change for given types.
                  detail:
                    type: string
                    description: A human-readable description of the specific error.
                  instance:
                    type: string
                    description: >-
                      This optional key may be present, with a unique URI for
                      the specific error; this will often point to an error log
                      for that specific response.
                  request_id:
                    type: string
                    description: Correlation ID for the original request.
                required:
                  - type
                  - status
                additionalProperties: false
              example:
                status: 400
                type: bad_request
        '401':
          description: Unauthorized. The caller has not been authenticated.
          headers:
            upvest-request-id:
              required: true
              schema:
                type: string
                format: uuid
                example: 169ae4c7-ebd7-4041-94da-25369653eba7
          content:
            application/problem+json:
              schema:
                title: Error
                type: object
                description: ''
                properties:
                  type:
                    type: string
                    description: URL to a document describing the error condition.
                  status:
                    type: integer
                    description: >-
                      Transmission of the HTTP status code so that all
                      information can be found in one place, but also to correct
                      changes in the status code due to the use of proxy
                      servers.
                  title:
                    type: string
                    description: >-
                      A short, human-readable title for the general error type;
                      the title should not change for given types.
                  detail:
                    type: string
                    description: A human-readable description of the specific error.
                  instance:
                    type: string
                    description: >-
                      This optional key may be present, with a unique URI for
                      the specific error; this will often point to an error log
                      for that specific response.
                  request_id:
                    type: string
                    description: Correlation ID for the original request.
                required:
                  - type
                  - status
                additionalProperties: false
              example:
                status: 401
                type: unauthorized
        '403':
          description: >-
            Forbidden. The caller has been authenticated but is not allowed to
            take the requested action.
          headers:
            upvest-request-id:
              required: true
              schema:
                type: string
                format: uuid
                example: 169ae4c7-ebd7-4041-94da-25369653eba7
          content:
            application/problem+json:
              schema:
                title: Error
                type: object
                description: ''
                properties:
                  type:
                    type: string
                    description: URL to a document describing the error condition.
                  status:
                    type: integer
                    description: >-
                      Transmission of the HTTP status code so that all
                      information can be found in one place, but also to correct
                      changes in the status code due to the use of proxy
                      servers.
                  title:
                    type: string
                    description: >-
                      A short, human-readable title for the general error type;
                      the title should not change for given types.
                  detail:
                    type: string
                    description: A human-readable description of the specific error.
                  instance:
                    type: string
                    description: >-
                      This optional key may be present, with a unique URI for
                      the specific error; this will often point to an error log
                      for that specific response.
                  request_id:
                    type: string
                    description: Correlation ID for the original request.
                required:
                  - type
                  - status
                additionalProperties: false
              example:
                status: 403
                type: forbidden
        '404':
          description: Not Found. The requested resource could not be found.
          headers:
            upvest-request-id:
              required: true
              schema:
                type: string
                format: uuid
                example: 169ae4c7-ebd7-4041-94da-25369653eba7
          content:
            application/problem+json:
              schema:
                title: Error
                type: object
                description: ''
                properties:
                  type:
                    type: string
                    description: URL to a document describing the error condition.
                  status:
                    type: integer
                    description: >-
                      Transmission of the HTTP status code so that all
                      information can be found in one place, but also to correct
                      changes in the status code due to the use of proxy
                      servers.
                  title:
                    type: string
                    description: >-
                      A short, human-readable title for the general error type;
                      the title should not change for given types.
                  detail:
                    type: string
                    description: A human-readable description of the specific error.
                  instance:
                    type: string
                    description: >-
                      This optional key may be present, with a unique URI for
                      the specific error; this will often point to an error log
                      for that specific response.
                  request_id:
                    type: string
                    description: Correlation ID for the original request.
                required:
                  - type
                  - status
                additionalProperties: false
              example:
                status: 404
                type: not_found
        '405':
          description: >-
            Method Not Allowed. The requested method is not allowed on the
            requested resource.
          headers:
            upvest-request-id:
              required: true
              schema:
                type: string
                format: uuid
                example: 169ae4c7-ebd7-4041-94da-25369653eba7
          content:
            application/problem+json:
              schema:
                title: Error
                type: object
                description: ''
                properties:
                  type:
                    type: string
                    description: URL to a document describing the error condition.
                  status:
                    type: integer
                    description: >-
                      Transmission of the HTTP status code so that all
                      information can be found in one place, but also to correct
                      changes in the status code due to the use of proxy
                      servers.
                  title:
                    type: string
                    description: >-
                      A short, human-readable title for the general error type;
                      the title should not change for given types.
                  detail:
                    type: string
                    description: A human-readable description of the specific error.
                  instance:
                    type: string
                    description: >-
                      This optional key may be present, with a unique URI for
                      the specific error; this will often point to an error log
                      for that specific response.
                  request_id:
                    type: string
                    description: Correlation ID for the original request.
                required:
                  - type
                  - status
                additionalProperties: false
              example:
                status: 405
                type: method_not_allowed
        '406':
          description: >-
            Not Acceptable. The resource does not have a current representation
            that would be acceptable to the user agent. "Accept" header defined
            unsupported value.
          headers:
            upvest-request-id:
              required: true
              schema:
                type: string
                format: uuid
                example: 169ae4c7-ebd7-4041-94da-25369653eba7
          content:
            application/problem+json:
              schema:
                title: Error
                type: object
                description: ''
                properties:
                  type:
                    type: string
                    description: URL to a document describing the error condition.
                  status:
                    type: integer
                    description: >-
                      Transmission of the HTTP status code so that all
                      information can be found in one place, but also to correct
                      changes in the status code due to the use of proxy
                      servers.
                  title:
                    type: string
                    description: >-
                      A short, human-readable title for the general error type;
                      the title should not change for given types.
                  detail:
                    type: string
                    description: A human-readable description of the specific error.
                  instance:
                    type: string
                    description: >-
                      This optional key may be present, with a unique URI for
                      the specific error; this will often point to an error log
                      for that specific response.
                  request_id:
                    type: string
                    description: Correlation ID for the original request.
                required:
                  - type
                  - status
                additionalProperties: false
              example:
                status: 406
                type: not_acceptable
        '429':
          description: >-
            Too Many Requests. The caller has exceeded their quota for the time
            period and has been throttled.
          headers:
            upvest-request-id:
              required: true
              schema:
                type: string
                format: uuid
                example: 169ae4c7-ebd7-4041-94da-25369653eba7
          content:
            application/problem+json:
              schema:
                title: Error
                type: object
                description: ''
                properties:
                  type:
                    type: string
                    description: URL to a document describing the error condition.
                  status:
                    type: integer
                    description: >-
                      Transmission of the HTTP status code so that all
                      information can be found in one place, but also to correct
                      changes in the status code due to the use of proxy
                      servers.
                  title:
                    type: string
                    description: >-
                      A short, human-readable title for the general error type;
                      the title should not change for given types.
                  detail:
                    type: string
                    description: A human-readable description of the specific error.
                  instance:
                    type: string
                    description: >-
                      This optional key may be present, with a unique URI for
                      the specific error; this will often point to an error log
                      for that specific response.
                  request_id:
                    type: string
                    description: Correlation ID for the original request.
                required:
                  - type
                  - status
                additionalProperties: false
              example:
                status: 429
                type: too_many_requests
        '500':
          description: Internal Server Error. The service encountered an unexpected error.
          headers:
            upvest-request-id:
              required: true
              schema:
                type: string
                format: uuid
                example: 169ae4c7-ebd7-4041-94da-25369653eba7
          content:
            application/problem+json:
              schema:
                title: Error
                type: object
                description: ''
                properties:
                  type:
                    type: string
                    description: URL to a document describing the error condition.
                  status:
                    type: integer
                    description: >-
                      Transmission of the HTTP status code so that all
                      information can be found in one place, but also to correct
                      changes in the status code due to the use of proxy
                      servers.
                  title:
                    type: string
                    description: >-
                      A short, human-readable title for the general error type;
                      the title should not change for given types.
                  detail:
                    type: string
                    description: A human-readable description of the specific error.
                  instance:
                    type: string
                    description: >-
                      This optional key may be present, with a unique URI for
                      the specific error; this will often point to an error log
                      for that specific response.
                  request_id:
                    type: string
                    description: Correlation ID for the original request.
                required:
                  - type
                  - status
                additionalProperties: false
              example:
                status: 500
                type: internal_server_error
        '503':
          description: >-
            Service Unavailable. The service handling for this request cannot be
            reached at this time.
          headers:
            upvest-request-id:
              required: true
              schema:
                type: string
                format: uuid
                example: 169ae4c7-ebd7-4041-94da-25369653eba7
          content:
            application/problem+json:
              schema:
                title: Error
                type: object
                description: ''
                properties:
                  type:
                    type: string
                    description: URL to a document describing the error condition.
                  status:
                    type: integer
                    description: >-
                      Transmission of the HTTP status code so that all
                      information can be found in one place, but also to correct
                      changes in the status code due to the use of proxy
                      servers.
                  title:
                    type: string
                    description: >-
                      A short, human-readable title for the general error type;
                      the title should not change for given types.
                  detail:
                    type: string
                    description: A human-readable description of the specific error.
                  instance:
                    type: string
                    description: >-
                      This optional key may be present, with a unique URI for
                      the specific error; this will often point to an error log
                      for that specific response.
                  request_id:
                    type: string
                    description: Correlation ID for the original request.
                required:
                  - type
                  - status
                additionalProperties: false
              example:
                status: 503
                type: method_not_allowed
        '504':
          description: >-
            Gateway Timeout. The service gateway has reached its internal
            timeout.
          headers:
            upvest-request-id:
              required: true
              schema:
                type: string
                format: uuid
                example: 169ae4c7-ebd7-4041-94da-25369653eba7
          content:
            application/problem+json:
              schema:
                title: Error
                type: object
                description: ''
                properties:
                  type:
                    type: string
                    description: URL to a document describing the error condition.
                  status:
                    type: integer
                    description: >-
                      Transmission of the HTTP status code so that all
                      information can be found in one place, but also to correct
                      changes in the status code due to the use of proxy
                      servers.
                  title:
                    type: string
                    description: >-
                      A short, human-readable title for the general error type;
                      the title should not change for given types.
                  detail:
                    type: string
                    description: A human-readable description of the specific error.
                  instance:
                    type: string
                    description: >-
                      This optional key may be present, with a unique URI for
                      the specific error; this will often point to an error log
                      for that specific response.
                  request_id:
                    type: string
                    description: Correlation ID for the original request.
                required:
                  - type
                  - status
                additionalProperties: false
              example:
                status: 504
                type: gateway_timeout
    post:
      operationId: create_portfolios_order
      summary: Create portfolios order
      description: Create portfolios order
      tags:
        - Portfolios
      security:
        - oauth-client-credentials:
            - portfolios:admin
      parameters:
        - name: idempotency-key
          in: header
          required: true
          schema:
            type: string
            format: uuid
            pattern: >-
              ^[0-9a-fA-F]{8}-?[0-9a-fA-F]{4}-?[0-5][0-9a-fA-F]{3}-?[089abAB][0-9a-fA-F]{3}-?[0-9a-fA-F]{12}$
            example: ccb07f42-4104-44ad-8e1f-c660bb7b269c
          description: >
            A UUID to be used as an idempotency key.  This prevents a duplicate
            request from being replayed.

            https://docs.upvest.co/documentation/concepts/api_concepts/idempotency
      requestBody:
        content:
          application/json:
            schema:
              title: Portfolios order - Place - Request
              type: object
              properties:
                user_id:
                  title: User unique identifier.
                  type: string
                  description: User unique identifier.
                  format: uuid
                account_id:
                  title: Account unique identifier.
                  type: string
                  description: Account unique identifier.
                  format: uuid
                cash_amount:
                  type: string
                  pattern: ^[0-9]{0,63}(\.[0-9]{1,27})?$
                currency:
                  type: string
                  description: >-
                    Alphabetic three-letter [ISO
                    4217](https://en.wikipedia.org/wiki/ISO_4217) currency code.

                    * EUR - Euro
                  enum:
                    - EUR
                  default: EUR
                side:
                  type: string
                  description: |-
                    Side of the portfolio order.
                    * BUY - 
                    * SELL - 
                  enum:
                    - BUY
                    - SELL
                post_tax:
                  type: boolean
                  description: Cash amount is post-tax value
                  default: false
              required:
                - user_id
                - account_id
                - side
                - cash_amount
                - currency
              additionalProperties: false
            examples:
              buy:
                summary: Buy
                value:
                  user_id: 4b9732bd-7496-4e91-8a5f-6360479d7fed
                  account_id: 00ef0be8-d564-43af-b3c7-11b7a2188030
                  cash_amount: '100.00'
                  currency: EUR
                  side: BUY
              sell:
                summary: Sell
                value:
                  user_id: 4b9732bd-7496-4e91-8a5f-6360479d7fed
                  account_id: 00ef0be8-d564-43af-b3c7-11b7a2188030
                  cash_amount: '1000.00'
                  currency: EUR
                  side: SELL
      responses:
        '200':
          description: Portfolios order
          headers:
            upvest-request-id:
              required: true
              schema:
                type: string
                format: uuid
                example: 169ae4c7-ebd7-4041-94da-25369653eba7
          content:
            application/json:
              schema:
                title: Portfolios order
                type: object
                properties:
                  id:
                    title: Portfolios order unique identifier
                    type: string
                    format: uuid
                  created_at:
                    type: string
                    format: date-time
                    description: >-
                      Date and time when the resource was created. [RFC
                      3339-5](https://datatracker.ietf.org/doc/html/rfc3339#section-5.6),
                      [ISO8601
                      UTC](https://www.iso.org/iso-8601-date-and-time-format.html)
                  updated_at:
                    type: string
                    format: date-time
                    description: >-
                      Date and time when the resource was last updated. [RFC
                      3339-5](https://datatracker.ietf.org/doc/html/rfc3339#section-5.6),
                      [ISO8601
                      UTC](https://www.iso.org/iso-8601-date-and-time-format.html)
                  user_id:
                    title: User unique identifier.
                    type: string
                    description: User unique identifier.
                    format: uuid
                  account_id:
                    title: Account unique identifier.
                    type: string
                    description: Account unique identifier.
                    format: uuid
                  allocation_id:
                    title: Portfolio allocation unique identifier
                    type: string
                    format: uuid
                  cash_amount:
                    type: string
                    pattern: ^[0-9]{0,63}(\.[0-9]{1,27})?$
                  currency:
                    type: string
                    description: >-
                      Alphabetic three-letter [ISO
                      4217](https://en.wikipedia.org/wiki/ISO_4217) currency
                      code.

                      * EUR - Euro
                    enum:
                      - EUR
                    default: EUR
                  status:
                    type: string
                    description: |-
                      Execution status of the Portfolio Order.
                      * NEW - 
                      * PROCESSING - 
                      * FILLED - 
                      * SETTLED - 
                      * CANCELLED - 
                    enum:
                      - NEW
                      - PROCESSING
                      - FILLED
                      - SETTLED
                      - CANCELLED
                  type:
                    type: string
                    description: |-
                      Type of the Portfolio Order.
                      * BUY - 
                      * SELL - 
                      * REBALANCING - 
                    enum:
                      - BUY
                      - SELL
                      - REBALANCING
                  post_tax:
                    type: boolean
                    description: Cash amount is post-tax value
                    default: false
                  orders:
                    type: array
                    description: Orders associated with this portfolio order
                    items:
                      title: Portfolios order
                      type: object
                      properties:
                        id:
                          title: Order unique identifier
                          type: string
                          format: uuid
                        side:
                          type: string
                          description: |-
                            Side of the portfolio order.
                            * BUY - 
                            * SELL - 
                          enum:
                            - BUY
                            - SELL
                        status:
                          type: string
                          description: |-
                            The execution status of the order.
                            * NEW - 
                            * PROCESSING - 
                            * FILLED - 
                            * CANCELLED - 
                          enum:
                            - NEW
                            - PROCESSING
                            - FILLED
                            - CANCELLED
                      required:
                        - id
                        - side
                        - status
                      additionalProperties: false
                  client_reference:
                    title: An ID provided by the client
                    type: string
                  initiation_flow:
                    title: Initiation flow used during order creation
                    description: |-
                      What triggered the order creation .
                      * API - 
                      * SAVINGS_PLAN -  
                    type: string
                    enum:
                      - API
                      - SAVINGS_PLAN
                  cancellation_reason:
                    title: Cancellation reason code
                    description: |-
                      Explains the reason why the order was cancelled .
                      * ACCOUNT_IS_EMPTY - 
                      * CANCELLED_BY_CLIENT - 
                      * CANCELLED_BY_UPVEST - 
                      * PORTFOLIO_IS_BALANCED - 
                      * SELL_LIMIT_EXCEEDED - 
                    type: string
                    enum:
                      - ACCOUNT_IS_EMPTY
                      - CANCELLED_BY_CLIENT
                      - CANCELLED_BY_UPVEST
                      - PORTFOLIO_IS_BALANCED
                      - SELL_LIMIT_EXCEEDED
                  cancellation_details:
                    type: string
                required:
                  - id
                  - created_at
                  - updated_at
                  - account_id
                  - cash_amount
                  - currency
                  - status
                  - post_tax
                  - client_reference
                  - initiation_flow
                  - orders
                additionalProperties: false
              example:
                id: eb5ba93f-5dfe-4bf1-8571-4da0caacc80c
                created_at: '2021-07-21T14:10:00.000Z'
                updated_at: '2021-07-21T14:10:00.000Z'
                account_id: debf2026-f2da-4ff0-bb84-92e45babb1e3
                allocation_id: eb68abce-29f4-483f-a384-7f243e77851f
                cash_amount: '1000'
                currency: EUR
                status: NEW
                type: BUY
                post_tax: false
                client_reference: ''
                initiation_flow: API
                orders: []
        '400':
          description: Bad Request. The incoming request had a malformed parameter/object.
          headers:
            upvest-request-id:
              required: true
              schema:
                type: string
                format: uuid
                example: 169ae4c7-ebd7-4041-94da-25369653eba7
          content:
            application/problem+json:
              schema:
                title: Error
                type: object
                description: ''
                properties:
                  type:
                    type: string
                    description: URL to a document describing the error condition.
                  status:
                    type: integer
                    description: >-
                      Transmission of the HTTP status code so that all
                      information can be found in one place, but also to correct
                      changes in the status code due to the use of proxy
                      servers.
                  title:
                    type: string
                    description: >-
                      A short, human-readable title for the general error type;
                      the title should not change for given types.
                  detail:
                    type: string
                    description: A human-readable description of the specific error.
                  instance:
                    type: string
                    description: >-
                      This optional key may be present, with a unique URI for
                      the specific error; this will often point to an error log
                      for that specific response.
                  request_id:
                    type: string
                    description: Correlation ID for the original request.
                required:
                  - type
                  - status
                additionalProperties: false
              example:
                status: 400
                type: bad_request
        '401':
          description: Unauthorized. The caller has not been authenticated.
          headers:
            upvest-request-id:
              required: true
              schema:
                type: string
                format: uuid
                example: 169ae4c7-ebd7-4041-94da-25369653eba7
          content:
            application/problem+json:
              schema:
                title: Error
                type: object
                description: ''
                properties:
                  type:
                    type: string
                    description: URL to a document describing the error condition.
                  status:
                    type: integer
                    description: >-
                      Transmission of the HTTP status code so that all
                      information can be found in one place, but also to correct
                      changes in the status code due to the use of proxy
                      servers.
                  title:
                    type: string
                    description: >-
                      A short, human-readable title for the general error type;
                      the title should not change for given types.
                  detail:
                    type: string
                    description: A human-readable description of the specific error.
                  instance:
                    type: string
                    description: >-
                      This optional key may be present, with a unique URI for
                      the specific error; this will often point to an error log
                      for that specific response.
                  request_id:
                    type: string
                    description: Correlation ID for the original request.
                required:
                  - type
                  - status
                additionalProperties: false
              example:
                status: 401
                type: unauthorized
        '403':
          description: >-
            Forbidden. The caller has been authenticated but is not allowed to
            take the requested action.
          headers:
            upvest-request-id:
              required: true
              schema:
                type: string
                format: uuid
                example: 169ae4c7-ebd7-4041-94da-25369653eba7
          content:
            application/problem+json:
              schema:
                title: Error
                type: object
                description: ''
                properties:
                  type:
                    type: string
                    description: URL to a document describing the error condition.
                  status:
                    type: integer
                    description: >-
                      Transmission of the HTTP status code so that all
                      information can be found in one place, but also to correct
                      changes in the status code due to the use of proxy
                      servers.
                  title:
                    type: string
                    description: >-
                      A short, human-readable title for the general error type;
                      the title should not change for given types.
                  detail:
                    type: string
                    description: A human-readable description of the specific error.
                  instance:
                    type: string
                    description: >-
                      This optional key may be present, with a unique URI for
                      the specific error; this will often point to an error log
                      for that specific response.
                  request_id:
                    type: string
                    description: Correlation ID for the original request.
                required:
                  - type
                  - status
                additionalProperties: false
              example:
                status: 403
                type: forbidden
        '404':
          description: Not Found. The requested resource could not be found.
          headers:
            upvest-request-id:
              required: true
              schema:
                type: string
                format: uuid
                example: 169ae4c7-ebd7-4041-94da-25369653eba7
          content:
            application/problem+json:
              schema:
                title: Error
                type: object
                description: ''
                properties:
                  type:
                    type: string
                    description: URL to a document describing the error condition.
                  status:
                    type: integer
                    description: >-
                      Transmission of the HTTP status code so that all
                      information can be found in one place, but also to correct
                      changes in the status code due to the use of proxy
                      servers.
                  title:
                    type: string
                    description: >-
                      A short, human-readable title for the general error type;
                      the title should not change for given types.
                  detail:
                    type: string
                    description: A human-readable description of the specific error.
                  instance:
                    type: string
                    description: >-
                      This optional key may be present, with a unique URI for
                      the specific error; this will often point to an error log
                      for that specific response.
                  request_id:
                    type: string
                    description: Correlation ID for the original request.
                required:
                  - type
                  - status
                additionalProperties: false
              example:
                status: 404
                type: not_found
        '406':
          description: >-
            Not Acceptable. The resource does not have a current representation
            that would be acceptable to the user agent. "Accept" header defined
            unsupported value.
          headers:
            upvest-request-id:
              required: true
              schema:
                type: string
                format: uuid
                example: 169ae4c7-ebd7-4041-94da-25369653eba7
          content:
            application/problem+json:
              schema:
                title: Error
                type: object
                description: ''
                properties:
                  type:
                    type: string
                    description: URL to a document describing the error condition.
                  status:
                    type: integer
                    description: >-
                      Transmission of the HTTP status code so that all
                      information can be found in one place, but also to correct
                      changes in the status code due to the use of proxy
                      servers.
                  title:
                    type: string
                    description: >-
                      A short, human-readable title for the general error type;
                      the title should not change for given types.
                  detail:
                    type: string
                    description: A human-readable description of the specific error.
                  instance:
                    type: string
                    description: >-
                      This optional key may be present, with a unique URI for
                      the specific error; this will often point to an error log
                      for that specific response.
                  request_id:
                    type: string
                    description: Correlation ID for the original request.
                required:
                  - type
                  - status
                additionalProperties: false
              example:
                status: 406
                type: not_acceptable
        '429':
          description: >-
            Too Many Requests. The caller has exceeded their quota for the time
            period and has been throttled.
          headers:
            upvest-request-id:
              required: true
              schema:
                type: string
                format: uuid
                example: 169ae4c7-ebd7-4041-94da-25369653eba7
          content:
            application/problem+json:
              schema:
                title: Error
                type: object
                description: ''
                properties:
                  type:
                    type: string
                    description: URL to a document describing the error condition.
                  status:
                    type: integer
                    description: >-
                      Transmission of the HTTP status code so that all
                      information can be found in one place, but also to correct
                      changes in the status code due to the use of proxy
                      servers.
                  title:
                    type: string
                    description: >-
                      A short, human-readable title for the general error type;
                      the title should not change for given types.
                  detail:
                    type: string
                    description: A human-readable description of the specific error.
                  instance:
                    type: string
                    description: >-
                      This optional key may be present, with a unique URI for
                      the specific error; this will often point to an error log
                      for that specific response.
                  request_id:
                    type: string
                    description: Correlation ID for the original request.
                required:
                  - type
                  - status
                additionalProperties: false
              example:
                status: 429
                type: too_many_requests
        '500':
          description: Internal Server Error. The service encountered an unexpected error.
          headers:
            upvest-request-id:
              required: true
              schema:
                type: string
                format: uuid
                example: 169ae4c7-ebd7-4041-94da-25369653eba7
          content:
            application/problem+json:
              schema:
                title: Error
                type: object
                description: ''
                properties:
                  type:
                    type: string
                    description: URL to a document describing the error condition.
                  status:
                    type: integer
                    description: >-
                      Transmission of the HTTP status code so that all
                      information can be found in one place, but also to correct
                      changes in the status code due to the use of proxy
                      servers.
                  title:
                    type: string
                    description: >-
                      A short, human-readable title for the general error type;
                      the title should not change for given types.
                  detail:
                    type: string
                    description: A human-readable description of the specific error.
                  instance:
                    type: string
                    description: >-
                      This optional key may be present, with a unique URI for
                      the specific error; this will often point to an error log
                      for that specific response.
                  request_id:
                    type: string
                    description: Correlation ID for the original request.
                required:
                  - type
                  - status
                additionalProperties: false
              example:
                status: 500
                type: internal_server_error
        '503':
          description: >-
            Service Unavailable. The service handling for this request cannot be
            reached at this time.
          headers:
            upvest-request-id:
              required: true
              schema:
                type: string
                format: uuid
                example: 169ae4c7-ebd7-4041-94da-25369653eba7
          content:
            application/problem+json:
              schema:
                title: Error
                type: object
                description: ''
                properties:
                  type:
                    type: string
                    description: URL to a document describing the error condition.
                  status:
                    type: integer
                    description: >-
                      Transmission of the HTTP status code so that all
                      information can be found in one place, but also to correct
                      changes in the status code due to the use of proxy
                      servers.
                  title:
                    type: string
                    description: >-
                      A short, human-readable title for the general error type;
                      the title should not change for given types.
                  detail:
                    type: string
                    description: A human-readable description of the specific error.
                  instance:
                    type: string
                    description: >-
                      This optional key may be present, with a unique URI for
                      the specific error; this will often point to an error log
                      for that specific response.
                  request_id:
                    type: string
                    description: Correlation ID for the original request.
                required:
                  - type
                  - status
                additionalProperties: false
              example:
                status: 503
                type: method_not_allowed
        '504':
          description: >-
            Gateway Timeout. The service gateway has reached its internal
            timeout.
          headers:
            upvest-request-id:
              required: true
              schema:
                type: string
                format: uuid
                example: 169ae4c7-ebd7-4041-94da-25369653eba7
          content:
            application/problem+json:
              schema:
                title: Error
                type: object
                description: ''
                properties:
                  type:
                    type: string
                    description: URL to a document describing the error condition.
                  status:
                    type: integer
                    description: >-
                      Transmission of the HTTP status code so that all
                      information can be found in one place, but also to correct
                      changes in the status code due to the use of proxy
                      servers.
                  title:
                    type: string
                    description: >-
                      A short, human-readable title for the general error type;
                      the title should not change for given types.
                  detail:
                    type: string
                    description: A human-readable description of the specific error.
                  instance:
                    type: string
                    description: >-
                      This optional key may be present, with a unique URI for
                      the specific error; this will often point to an error log
                      for that specific response.
                  request_id:
                    type: string
                    description: Correlation ID for the original request.
                required:
                  - type
                  - status
                additionalProperties: false
              example:
                status: 504
                type: gateway_timeout
  /portfolios/orders/{portfolio_order_id}:
    parameters:
      - name: portfolio_order_id
        in: path
        required: true
        schema:
          title: Portfolios order unique identifier
          type: string
          format: uuid
      - name: upvest-client-id
        in: header
        description: Tenant Client ID
        required: true
        schema:
          type: string
          format: uuid
          example: ebabcf4d-61c3-4942-875c-e265a7c2d062
      - name: authorization
        in: header
        description: |
          Bearer (access) token from the OAuth flow with correct scopes.
          https://datatracker.ietf.org/doc/html/rfc6750
        required: true
        schema:
          type: string
          pattern: ^Bearer [a-zA-Z0-9\-\._~+/]*=*
          example: Bearer c2VjcmV0Cg==
      - name: signature
        in: header
        required: true
        schema:
          type: string
        description: >-
          https://tools.ietf.org/id/draft-ietf-httpbis-message-signatures-01.html#name-the-signature-http-header
      - name: signature-input
        in: header
        required: true
        schema:
          type: string
        description: >-
          https://tools.ietf.org/id/draft-ietf-httpbis-message-signatures-01.html#name-the-signature-input-http-he
      - name: upvest-api-version
        in: header
        required: false
        schema:
          type: string
          enum:
            - '1'
          default: '1'
          example: '1'
        description: 'Upvest API version (Note: Do not include quotation marks)'
    get:
      operationId: retrieve_portfolios_order
      summary: Retrieve portfolios order
      description: Retrieve portfolios order
      tags:
        - Portfolios
      security:
        - oauth-client-credentials:
            - portfolios:read
            - portfolios:admin
      responses:
        '200':
          description: Portfolios order
          headers:
            upvest-request-id:
              required: true
              schema:
                type: string
                format: uuid
                example: 169ae4c7-ebd7-4041-94da-25369653eba7
          content:
            application/json:
              schema:
                title: Portfolios order
                type: object
                properties:
                  id:
                    title: Portfolios order unique identifier
                    type: string
                    format: uuid
                  created_at:
                    type: string
                    format: date-time
                    description: >-
                      Date and time when the resource was created. [RFC
                      3339-5](https://datatracker.ietf.org/doc/html/rfc3339#section-5.6),
                      [ISO8601
                      UTC](https://www.iso.org/iso-8601-date-and-time-format.html)
                  updated_at:
                    type: string
                    format: date-time
                    description: >-
                      Date and time when the resource was last updated. [RFC
                      3339-5](https://datatracker.ietf.org/doc/html/rfc3339#section-5.6),
                      [ISO8601
                      UTC](https://www.iso.org/iso-8601-date-and-time-format.html)
                  user_id:
                    title: User unique identifier.
                    type: string
                    description: User unique identifier.
                    format: uuid
                  account_id:
                    title: Account unique identifier.
                    type: string
                    description: Account unique identifier.
                    format: uuid
                  allocation_id:
                    title: Portfolio allocation unique identifier
                    type: string
                    format: uuid
                  cash_amount:
                    type: string
                    pattern: ^[0-9]{0,63}(\.[0-9]{1,27})?$
                  currency:
                    type: string
                    description: >-
                      Alphabetic three-letter [ISO
                      4217](https://en.wikipedia.org/wiki/ISO_4217) currency
                      code.

                      * EUR - Euro
                    enum:
                      - EUR
                    default: EUR
                  status:
                    type: string
                    description: |-
                      Execution status of the Portfolio Order.
                      * NEW - 
                      * PROCESSING - 
                      * FILLED - 
                      * SETTLED - 
                      * CANCELLED - 
                    enum:
                      - NEW
                      - PROCESSING
                      - FILLED
                      - SETTLED
                      - CANCELLED
                  type:
                    type: string
                    description: |-
                      Type of the Portfolio Order.
                      * BUY - 
                      * SELL - 
                      * REBALANCING - 
                    enum:
                      - BUY
                      - SELL
                      - REBALANCING
                  post_tax:
                    type: boolean
                    description: Cash amount is post-tax value
                    default: false
                  orders:
                    type: array
                    description: Orders associated with this portfolio order
                    items:
                      title: Portfolios order
                      type: object
                      properties:
                        id:
                          title: Order unique identifier
                          type: string
                          format: uuid
                        side:
                          type: string
                          description: |-
                            Side of the portfolio order.
                            * BUY - 
                            * SELL - 
                          enum:
                            - BUY
                            - SELL
                        status:
                          type: string
                          description: |-
                            The execution status of the order.
                            * NEW - 
                            * PROCESSING - 
                            * FILLED - 
                            * CANCELLED - 
                          enum:
                            - NEW
                            - PROCESSING
                            - FILLED
                            - CANCELLED
                      required:
                        - id
                        - side
                        - status
                      additionalProperties: false
                  client_reference:
                    title: An ID provided by the client
                    type: string
                  initiation_flow:
                    title: Initiation flow used during order creation
                    description: |-
                      What triggered the order creation .
                      * API - 
                      * SAVINGS_PLAN -  
                    type: string
                    enum:
                      - API
                      - SAVINGS_PLAN
                  cancellation_reason:
                    title: Cancellation reason code
                    description: |-
                      Explains the reason why the order was cancelled .
                      * ACCOUNT_IS_EMPTY - 
                      * CANCELLED_BY_CLIENT - 
                      * CANCELLED_BY_UPVEST - 
                      * PORTFOLIO_IS_BALANCED - 
                      * SELL_LIMIT_EXCEEDED - 
                    type: string
                    enum:
                      - ACCOUNT_IS_EMPTY
                      - CANCELLED_BY_CLIENT
                      - CANCELLED_BY_UPVEST
                      - PORTFOLIO_IS_BALANCED
                      - SELL_LIMIT_EXCEEDED
                  cancellation_details:
                    type: string
                required:
                  - id
                  - created_at
                  - updated_at
                  - account_id
                  - cash_amount
                  - currency
                  - status
                  - post_tax
                  - client_reference
                  - initiation_flow
                  - orders
                additionalProperties: false
              examples:
                ordinary:
                  summary: Ordinary
                  value:
                    id: 29bc9a26-a6ee-47a3-b609-47d30a737afc
                    created_at: '2021-07-21T14:10:00.00Z'
                    updated_at: '2021-07-21T14:10:00.00Z'
                    user_id: 4b9732bd-7496-4e91-8a5f-6360479d7fed
                    account_id: f2f7d2c7-d79b-4de2-ae9b-d01646259f9e
                    allocation_id: 19a902ac-1c01-4c45-bd5d-62fd496805c8
                    cash_amount: '100.00'
                    currency: EUR
                    status: PROCESSING
                    type: BUY
                    client_reference: fd1ae99e-772a-11ee-b962-0242ac120002
                    initiation_flow: SAVINGS_PLAN
                    post_tax: false
                    orders:
                      - id: 79f2c816-13ed-4588-85e6-f3398b0b5825
                        side: BUY
                        status: NEW
                      - id: 44f50a4e-7ce8-4eae-a078-f4b3d8ab4708
                        side: BUY
                        status: NEW
                rebalancing:
                  summary: Rebalancing
                  value:
                    id: eb5ba93f-5dfe-4bf1-8571-4da0caacc80c
                    created_at: '2021-07-21T14:10:00.000Z'
                    updated_at: '2021-07-21T14:10:00.000Z'
                    account_id: debf2026-f2da-4ff0-bb84-92e45babb1e3
                    allocation_id: debf2026-f2da-4ff0-bb84-92e45babb1e3
                    cash_amount: '0'
                    currency: EUR
                    status: PROCESSING
                    type: REBALANCING
                    client_reference: ''
                    initiation_flow: API
                    post_tax: false
                    orders:
                      - id: e7aecb80-5e84-4bf7-984b-b39ab77eb0a8
                        side: SELL
                        status: NEW
                      - id: eb5ba93f-5dfe-4bf1-8571-4da0caacc80c
                        side: SELL
                        status: PROCESSING
                      - id: d8a85120-2941-4ed6-8d57-e80401a4779c
                        side: SELL
                        status: FILLED
                cancelled:
                  summary: Cancelled
                  value:
                    id: 29bc9a26-a6ee-47a3-b609-47d30a737afc
                    created_at: '2021-07-21T14:10:00.000Z'
                    updated_at: '2021-07-21T14:10:00.000Z'
                    user_id: 4b9732bd-7496-4e91-8a5f-6360479d7fed
                    account_id: f2f7d2c7-d79b-4de2-ae9b-d01646259f9e
                    allocation_id: 19a902ac-1c01-4c45-bd5d-62fd496805c8
                    cash_amount: '100.00'
                    currency: EUR
                    status: CANCELLED
                    type: BUY
                    client_reference: fd1ae99e-772a-11ee-b962-0242ac120002
                    initiation_flow: API
                    post_tax: false
                    cancellation_reason: CANCELLED_BY_CLIENT
                    cancellation_details: Cancelled as a result of client's request.
                    orders: []
        '401':
          description: Unauthorized. The caller has not been authenticated.
          headers:
            upvest-request-id:
              required: true
              schema:
                type: string
                format: uuid
                example: 169ae4c7-ebd7-4041-94da-25369653eba7
          content:
            application/problem+json:
              schema:
                title: Error
                type: object
                description: ''
                properties:
                  type:
                    type: string
                    description: URL to a document describing the error condition.
                  status:
                    type: integer
                    description: >-
                      Transmission of the HTTP status code so that all
                      information can be found in one place, but also to correct
                      changes in the status code due to the use of proxy
                      servers.
                  title:
                    type: string
                    description: >-
                      A short, human-readable title for the general error type;
                      the title should not change for given types.
                  detail:
                    type: string
                    description: A human-readable description of the specific error.
                  instance:
                    type: string
                    description: >-
                      This optional key may be present, with a unique URI for
                      the specific error; this will often point to an error log
                      for that specific response.
                  request_id:
                    type: string
                    description: Correlation ID for the original request.
                required:
                  - type
                  - status
                additionalProperties: false
              example:
                status: 401
                type: unauthorized
        '403':
          description: >-
            Forbidden. The caller has been authenticated but is not allowed to
            take the requested action.
          headers:
            upvest-request-id:
              required: true
              schema:
                type: string
                format: uuid
                example: 169ae4c7-ebd7-4041-94da-25369653eba7
          content:
            application/problem+json:
              schema:
                title: Error
                type: object
                description: ''
                properties:
                  type:
                    type: string
                    description: URL to a document describing the error condition.
                  status:
                    type: integer
                    description: >-
                      Transmission of the HTTP status code so that all
                      information can be found in one place, but also to correct
                      changes in the status code due to the use of proxy
                      servers.
                  title:
                    type: string
                    description: >-
                      A short, human-readable title for the general error type;
                      the title should not change for given types.
                  detail:
                    type: string
                    description: A human-readable description of the specific error.
                  instance:
                    type: string
                    description: >-
                      This optional key may be present, with a unique URI for
                      the specific error; this will often point to an error log
                      for that specific response.
                  request_id:
                    type: string
                    description: Correlation ID for the original request.
                required:
                  - type
                  - status
                additionalProperties: false
              example:
                status: 403
                type: forbidden
        '404':
          description: Not Found. The requested resource could not be found.
          headers:
            upvest-request-id:
              required: true
              schema:
                type: string
                format: uuid
                example: 169ae4c7-ebd7-4041-94da-25369653eba7
          content:
            application/problem+json:
              schema:
                title: Error
                type: object
                description: ''
                properties:
                  type:
                    type: string
                    description: URL to a document describing the error condition.
                  status:
                    type: integer
                    description: >-
                      Transmission of the HTTP status code so that all
                      information can be found in one place, but also to correct
                      changes in the status code due to the use of proxy
                      servers.
                  title:
                    type: string
                    description: >-
                      A short, human-readable title for the general error type;
                      the title should not change for given types.
                  detail:
                    type: string
                    description: A human-readable description of the specific error.
                  instance:
                    type: string
                    description: >-
                      This optional key may be present, with a unique URI for
                      the specific error; this will often point to an error log
                      for that specific response.
                  request_id:
                    type: string
                    description: Correlation ID for the original request.
                required:
                  - type
                  - status
                additionalProperties: false
              example:
                status: 404
                type: not_found
        '406':
          description: >-
            Not Acceptable. The resource does not have a current representation
            that would be acceptable to the user agent. "Accept" header defined
            unsupported value.
          headers:
            upvest-request-id:
              required: true
              schema:
                type: string
                format: uuid
                example: 169ae4c7-ebd7-4041-94da-25369653eba7
          content:
            application/problem+json:
              schema:
                title: Error
                type: object
                description: ''
                properties:
                  type:
                    type: string
                    description: URL to a document describing the error condition.
                  status:
                    type: integer
                    description: >-
                      Transmission of the HTTP status code so that all
                      information can be found in one place, but also to correct
                      changes in the status code due to the use of proxy
                      servers.
                  title:
                    type: string
                    description: >-
                      A short, human-readable title for the general error type;
                      the title should not change for given types.
                  detail:
                    type: string
                    description: A human-readable description of the specific error.
                  instance:
                    type: string
                    description: >-
                      This optional key may be present, with a unique URI for
                      the specific error; this will often point to an error log
                      for that specific response.
                  request_id:
                    type: string
                    description: Correlation ID for the original request.
                required:
                  - type
                  - status
                additionalProperties: false
              example:
                status: 406
                type: not_acceptable
        '429':
          description: >-
            Too Many Requests. The caller has exceeded their quota for the time
            period and has been throttled.
          headers:
            upvest-request-id:
              required: true
              schema:
                type: string
                format: uuid
                example: 169ae4c7-ebd7-4041-94da-25369653eba7
          content:
            application/problem+json:
              schema:
                title: Error
                type: object
                description: ''
                properties:
                  type:
                    type: string
                    description: URL to a document describing the error condition.
                  status:
                    type: integer
                    description: >-
                      Transmission of the HTTP status code so that all
                      information can be found in one place, but also to correct
                      changes in the status code due to the use of proxy
                      servers.
                  title:
                    type: string
                    description: >-
                      A short, human-readable title for the general error type;
                      the title should not change for given types.
                  detail:
                    type: string
                    description: A human-readable description of the specific error.
                  instance:
                    type: string
                    description: >-
                      This optional key may be present, with a unique URI for
                      the specific error; this will often point to an error log
                      for that specific response.
                  request_id:
                    type: string
                    description: Correlation ID for the original request.
                required:
                  - type
                  - status
                additionalProperties: false
              example:
                status: 429
                type: too_many_requests
        '500':
          description: Internal Server Error. The service encountered an unexpected error.
          headers:
            upvest-request-id:
              required: true
              schema:
                type: string
                format: uuid
                example: 169ae4c7-ebd7-4041-94da-25369653eba7
          content:
            application/problem+json:
              schema:
                title: Error
                type: object
                description: ''
                properties:
                  type:
                    type: string
                    description: URL to a document describing the error condition.
                  status:
                    type: integer
                    description: >-
                      Transmission of the HTTP status code so that all
                      information can be found in one place, but also to correct
                      changes in the status code due to the use of proxy
                      servers.
                  title:
                    type: string
                    description: >-
                      A short, human-readable title for the general error type;
                      the title should not change for given types.
                  detail:
                    type: string
                    description: A human-readable description of the specific error.
                  instance:
                    type: string
                    description: >-
                      This optional key may be present, with a unique URI for
                      the specific error; this will often point to an error log
                      for that specific response.
                  request_id:
                    type: string
                    description: Correlation ID for the original request.
                required:
                  - type
                  - status
                additionalProperties: false
              example:
                status: 500
                type: internal_server_error
        '503':
          description: >-
            Service Unavailable. The service handling for this request cannot be
            reached at this time.
          headers:
            upvest-request-id:
              required: true
              schema:
                type: string
                format: uuid
                example: 169ae4c7-ebd7-4041-94da-25369653eba7
          content:
            application/problem+json:
              schema:
                title: Error
                type: object
                description: ''
                properties:
                  type:
                    type: string
                    description: URL to a document describing the error condition.
                  status:
                    type: integer
                    description: >-
                      Transmission of the HTTP status code so that all
                      information can be found in one place, but also to correct
                      changes in the status code due to the use of proxy
                      servers.
                  title:
                    type: string
                    description: >-
                      A short, human-readable title for the general error type;
                      the title should not change for given types.
                  detail:
                    type: string
                    description: A human-readable description of the specific error.
                  instance:
                    type: string
                    description: >-
                      This optional key may be present, with a unique URI for
                      the specific error; this will often point to an error log
                      for that specific response.
                  request_id:
                    type: string
                    description: Correlation ID for the original request.
                required:
                  - type
                  - status
                additionalProperties: false
              example:
                status: 503
                type: method_not_allowed
        '504':
          description: >-
            Gateway Timeout. The service gateway has reached its internal
            timeout.
          headers:
            upvest-request-id:
              required: true
              schema:
                type: string
                format: uuid
                example: 169ae4c7-ebd7-4041-94da-25369653eba7
          content:
            application/problem+json:
              schema:
                title: Error
                type: object
                description: ''
                properties:
                  type:
                    type: string
                    description: URL to a document describing the error condition.
                  status:
                    type: integer
                    description: >-
                      Transmission of the HTTP status code so that all
                      information can be found in one place, but also to correct
                      changes in the status code due to the use of proxy
                      servers.
                  title:
                    type: string
                    description: >-
                      A short, human-readable title for the general error type;
                      the title should not change for given types.
                  detail:
                    type: string
                    description: A human-readable description of the specific error.
                  instance:
                    type: string
                    description: >-
                      This optional key may be present, with a unique URI for
                      the specific error; this will often point to an error log
                      for that specific response.
                  request_id:
                    type: string
                    description: Correlation ID for the original request.
                required:
                  - type
                  - status
                additionalProperties: false
              example:
                status: 504
                type: gateway_timeout
    delete:
      operationId: cancel_portfolios_order
      summary: Cancel portfolios order
      description: >-
        Cancel portfolios order. Cancellations may not be possible - in rare
        situations, some individual orders within portfolios order may already
        have been filled. In this case, cancellation could result in a mix of
        cancelled and filled orders.
      tags:
        - Portfolios
      security:
        - oauth-client-credentials:
            - portfolios:admin
      responses:
        '202':
          description: >-
            The request has been successfully accepted and will be processed
            asynchronously.
          headers:
            upvest-request-id:
              required: true
              schema:
                type: string
                format: uuid
                example: 169ae4c7-ebd7-4041-94da-25369653eba7
        '401':
          description: Unauthorized. The caller has not been authenticated.
          headers:
            upvest-request-id:
              required: true
              schema:
                type: string
                format: uuid
                example: 169ae4c7-ebd7-4041-94da-25369653eba7
          content:
            application/problem+json:
              schema:
                title: Error
                type: object
                description: ''
                properties:
                  type:
                    type: string
                    description: URL to a document describing the error condition.
                  status:
                    type: integer
                    description: >-
                      Transmission of the HTTP status code so that all
                      information can be found in one place, but also to correct
                      changes in the status code due to the use of proxy
                      servers.
                  title:
                    type: string
                    description: >-
                      A short, human-readable title for the general error type;
                      the title should not change for given types.
                  detail:
                    type: string
                    description: A human-readable description of the specific error.
                  instance:
                    type: string
                    description: >-
                      This optional key may be present, with a unique URI for
                      the specific error; this will often point to an error log
                      for that specific response.
                  request_id:
                    type: string
                    description: Correlation ID for the original request.
                required:
                  - type
                  - status
                additionalProperties: false
              example:
                status: 401
                type: unauthorized
        '403':
          description: >-
            Forbidden. The caller has been authenticated but is not allowed to
            take the requested action.
          headers:
            upvest-request-id:
              required: true
              schema:
                type: string
                format: uuid
                example: 169ae4c7-ebd7-4041-94da-25369653eba7
          content:
            application/problem+json:
              schema:
                title: Error
                type: object
                description: ''
                properties:
                  type:
                    type: string
                    description: URL to a document describing the error condition.
                  status:
                    type: integer
                    description: >-
                      Transmission of the HTTP status code so that all
                      information can be found in one place, but also to correct
                      changes in the status code due to the use of proxy
                      servers.
                  title:
                    type: string
                    description: >-
                      A short, human-readable title for the general error type;
                      the title should not change for given types.
                  detail:
                    type: string
                    description: A human-readable description of the specific error.
                  instance:
                    type: string
                    description: >-
                      This optional key may be present, with a unique URI for
                      the specific error; this will often point to an error log
                      for that specific response.
                  request_id:
                    type: string
                    description: Correlation ID for the original request.
                required:
                  - type
                  - status
                additionalProperties: false
              example:
                status: 403
                type: forbidden
        '404':
          description: Not Found. The requested resource could not be found.
          headers:
            upvest-request-id:
              required: true
              schema:
                type: string
                format: uuid
                example: 169ae4c7-ebd7-4041-94da-25369653eba7
          content:
            application/problem+json:
              schema:
                title: Error
                type: object
                description: ''
                properties:
                  type:
                    type: string
                    description: URL to a document describing the error condition.
                  status:
                    type: integer
                    description: >-
                      Transmission of the HTTP status code so that all
                      information can be found in one place, but also to correct
                      changes in the status code due to the use of proxy
                      servers.
                  title:
                    type: string
                    description: >-
                      A short, human-readable title for the general error type;
                      the title should not change for given types.
                  detail:
                    type: string
                    description: A human-readable description of the specific error.
                  instance:
                    type: string
                    description: >-
                      This optional key may be present, with a unique URI for
                      the specific error; this will often point to an error log
                      for that specific response.
                  request_id:
                    type: string
                    description: Correlation ID for the original request.
                required:
                  - type
                  - status
                additionalProperties: false
              example:
                status: 404
                type: not_found
        '406':
          description: >-
            Not Acceptable. The resource does not have a current representation
            that would be acceptable to the user agent. "Accept" header defined
            unsupported value.
          headers:
            upvest-request-id:
              required: true
              schema:
                type: string
                format: uuid
                example: 169ae4c7-ebd7-4041-94da-25369653eba7
          content:
            application/problem+json:
              schema:
                title: Error
                type: object
                description: ''
                properties:
                  type:
                    type: string
                    description: URL to a document describing the error condition.
                  status:
                    type: integer
                    description: >-
                      Transmission of the HTTP status code so that all
                      information can be found in one place, but also to correct
                      changes in the status code due to the use of proxy
                      servers.
                  title:
                    type: string
                    description: >-
                      A short, human-readable title for the general error type;
                      the title should not change for given types.
                  detail:
                    type: string
                    description: A human-readable description of the specific error.
                  instance:
                    type: string
                    description: >-
                      This optional key may be present, with a unique URI for
                      the specific error; this will often point to an error log
                      for that specific response.
                  request_id:
                    type: string
                    description: Correlation ID for the original request.
                required:
                  - type
                  - status
                additionalProperties: false
              example:
                status: 406
                type: not_acceptable
        '429':
          description: >-
            Too Many Requests. The caller has exceeded their quota for the time
            period and has been throttled.
          headers:
            upvest-request-id:
              required: true
              schema:
                type: string
                format: uuid
                example: 169ae4c7-ebd7-4041-94da-25369653eba7
          content:
            application/problem+json:
              schema:
                title: Error
                type: object
                description: ''
                properties:
                  type:
                    type: string
                    description: URL to a document describing the error condition.
                  status:
                    type: integer
                    description: >-
                      Transmission of the HTTP status code so that all
                      information can be found in one place, but also to correct
                      changes in the status code due to the use of proxy
                      servers.
                  title:
                    type: string
                    description: >-
                      A short, human-readable title for the general error type;
                      the title should not change for given types.
                  detail:
                    type: string
                    description: A human-readable description of the specific error.
                  instance:
                    type: string
                    description: >-
                      This optional key may be present, with a unique URI for
                      the specific error; this will often point to an error log
                      for that specific response.
                  request_id:
                    type: string
                    description: Correlation ID for the original request.
                required:
                  - type
                  - status
                additionalProperties: false
              example:
                status: 429
                type: too_many_requests
        '500':
          description: Internal Server Error. The service encountered an unexpected error.
          headers:
            upvest-request-id:
              required: true
              schema:
                type: string
                format: uuid
                example: 169ae4c7-ebd7-4041-94da-25369653eba7
          content:
            application/problem+json:
              schema:
                title: Error
                type: object
                description: ''
                properties:
                  type:
                    type: string
                    description: URL to a document describing the error condition.
                  status:
                    type: integer
                    description: >-
                      Transmission of the HTTP status code so that all
                      information can be found in one place, but also to correct
                      changes in the status code due to the use of proxy
                      servers.
                  title:
                    type: string
                    description: >-
                      A short, human-readable title for the general error type;
                      the title should not change for given types.
                  detail:
                    type: string
                    description: A human-readable description of the specific error.
                  instance:
                    type: string
                    description: >-
                      This optional key may be present, with a unique URI for
                      the specific error; this will often point to an error log
                      for that specific response.
                  request_id:
                    type: string
                    description: Correlation ID for the original request.
                required:
                  - type
                  - status
                additionalProperties: false
              example:
                status: 500
                type: internal_server_error
        '503':
          description: >-
            Service Unavailable. The service handling for this request cannot be
            reached at this time.
          headers:
            upvest-request-id:
              required: true
              schema:
                type: string
                format: uuid
                example: 169ae4c7-ebd7-4041-94da-25369653eba7
          content:
            application/problem+json:
              schema:
                title: Error
                type: object
                description: ''
                properties:
                  type:
                    type: string
                    description: URL to a document describing the error condition.
                  status:
                    type: integer
                    description: >-
                      Transmission of the HTTP status code so that all
                      information can be found in one place, but also to correct
                      changes in the status code due to the use of proxy
                      servers.
                  title:
                    type: string
                    description: >-
                      A short, human-readable title for the general error type;
                      the title should not change for given types.
                  detail:
                    type: string
                    description: A human-readable description of the specific error.
                  instance:
                    type: string
                    description: >-
                      This optional key may be present, with a unique URI for
                      the specific error; this will often point to an error log
                      for that specific response.
                  request_id:
                    type: string
                    description: Correlation ID for the original request.
                required:
                  - type
                  - status
                additionalProperties: false
              example:
                status: 503
                type: method_not_allowed
        '504':
          description: >-
            Gateway Timeout. The service gateway has reached its internal
            timeout.
          headers:
            upvest-request-id:
              required: true
              schema:
                type: string
                format: uuid
                example: 169ae4c7-ebd7-4041-94da-25369653eba7
          content:
            application/problem+json:
              schema:
                title: Error
                type: object
                description: ''
                properties:
                  type:
                    type: string
                    description: URL to a document describing the error condition.
                  status:
                    type: integer
                    description: >-
                      Transmission of the HTTP status code so that all
                      information can be found in one place, but also to correct
                      changes in the status code due to the use of proxy
                      servers.
                  title:
                    type: string
                    description: >-
                      A short, human-readable title for the general error type;
                      the title should not change for given types.
                  detail:
                    type: string
                    description: A human-readable description of the specific error.
                  instance:
                    type: string
                    description: >-
                      This optional key may be present, with a unique URI for
                      the specific error; this will often point to an error log
                      for that specific response.
                  request_id:
                    type: string
                    description: Correlation ID for the original request.
                required:
                  - type
                  - status
                additionalProperties: false
              example:
                status: 504
                type: gateway_timeout
  /portfolios/rebalancings/executions:
    parameters:
      - name: upvest-client-id
        in: header
        description: Tenant Client ID
        required: true
        schema:
          type: string
          format: uuid
          example: ebabcf4d-61c3-4942-875c-e265a7c2d062
      - name: authorization
        in: header
        description: |
          Bearer (access) token from the OAuth flow with correct scopes.
          https://datatracker.ietf.org/doc/html/rfc6750
        required: true
        schema:
          type: string
          pattern: ^Bearer [a-zA-Z0-9\-\._~+/]*=*
          example: Bearer c2VjcmV0Cg==
      - name: signature
        in: header
        required: true
        schema:
          type: string
        description: >-
          https://tools.ietf.org/id/draft-ietf-httpbis-message-signatures-01.html#name-the-signature-http-header
      - name: signature-input
        in: header
        required: true
        schema:
          type: string
        description: >-
          https://tools.ietf.org/id/draft-ietf-httpbis-message-signatures-01.html#name-the-signature-input-http-he
      - name: upvest-api-version
        in: header
        required: false
        schema:
          type: string
          enum:
            - '1'
          default: '1'
          example: '1'
        description: 'Upvest API version (Note: Do not include quotation marks)'
    post:
      operationId: trigger_portfolio_rebalancing
      summary: Trigger portfolio rebalancing
      description: Trigger portfolio rebalancing
      tags:
        - Portfolios Rebalancing
      security:
        - oauth-client-credentials:
            - portfolios:admin
      parameters:
        - name: idempotency-key
          in: header
          required: true
          schema:
            type: string
            format: uuid
            pattern: >-
              ^[0-9a-fA-F]{8}-?[0-9a-fA-F]{4}-?[0-5][0-9a-fA-F]{3}-?[089abAB][0-9a-fA-F]{3}-?[0-9a-fA-F]{12}$
            example: ccb07f42-4104-44ad-8e1f-c660bb7b269c
          description: >
            A UUID to be used as an idempotency key.  This prevents a duplicate
            request from being replayed.

            https://docs.upvest.co/documentation/concepts/api_concepts/idempotency
      requestBody:
        content:
          application/json:
            schema:
              title: Trigger portfolio rebalancing - Request
              oneOf:
                - title: Accounts
                  type: object
                  properties:
                    accounts:
                      type: array
                      description: List of accounts
                      items:
                        title: Account unique identifier.
                        type: string
                        description: Account unique identifier.
                        format: uuid
                  required:
                    - accounts
                  additionalProperties: false
                - title: Allocations
                  type: object
                  properties:
                    allocations:
                      type: array
                      description: List of allocations
                      items:
                        title: Portfolio allocation unique identifier
                        type: string
                        format: uuid
                  required:
                    - allocations
                  additionalProperties: false
            examples:
              accounts:
                summary: Accounts
                value:
                  accounts:
                    - 43801b85-bbcf-41c7-8389-b018082a5ec5
                    - 20151679-c159-4f16-b8a2-267b3d968c6f
              allocations:
                summary: Allocations
                value:
                  allocations:
                    - eafa39e3-7837-476f-8af1-49fa604e3f49
      responses:
        '200':
          description: Portfolio
          headers:
            upvest-request-id:
              required: true
              schema:
                type: string
                format: uuid
                example: 169ae4c7-ebd7-4041-94da-25369653eba7
          content:
            application/json:
              schema:
                title: Trigger portfolio rebalancing - Response
                type: object
                properties:
                  id:
                    title: Portfolio rebalancing execution unique identifier
                    type: string
                    format: uuid
                required:
                  - id
                additionalProperties: false
              example:
                id: 735381ce-8380-4b07-9e42-97e2b6d3643e
        '400':
          description: Bad Request. The incoming request had a malformed parameter/object.
          headers:
            upvest-request-id:
              required: true
              schema:
                type: string
                format: uuid
                example: 169ae4c7-ebd7-4041-94da-25369653eba7
          content:
            application/problem+json:
              schema:
                title: Error
                type: object
                description: ''
                properties:
                  type:
                    type: string
                    description: URL to a document describing the error condition.
                  status:
                    type: integer
                    description: >-
                      Transmission of the HTTP status code so that all
                      information can be found in one place, but also to correct
                      changes in the status code due to the use of proxy
                      servers.
                  title:
                    type: string
                    description: >-
                      A short, human-readable title for the general error type;
                      the title should not change for given types.
                  detail:
                    type: string
                    description: A human-readable description of the specific error.
                  instance:
                    type: string
                    description: >-
                      This optional key may be present, with a unique URI for
                      the specific error; this will often point to an error log
                      for that specific response.
                  request_id:
                    type: string
                    description: Correlation ID for the original request.
                required:
                  - type
                  - status
                additionalProperties: false
              example:
                status: 400
                type: bad_request
        '401':
          description: Unauthorized. The caller has not been authenticated.
          headers:
            upvest-request-id:
              required: true
              schema:
                type: string
                format: uuid
                example: 169ae4c7-ebd7-4041-94da-25369653eba7
          content:
            application/problem+json:
              schema:
                title: Error
                type: object
                description: ''
                properties:
                  type:
                    type: string
                    description: URL to a document describing the error condition.
                  status:
                    type: integer
                    description: >-
                      Transmission of the HTTP status code so that all
                      information can be found in one place, but also to correct
                      changes in the status code due to the use of proxy
                      servers.
                  title:
                    type: string
                    description: >-
                      A short, human-readable title for the general error type;
                      the title should not change for given types.
                  detail:
                    type: string
                    description: A human-readable description of the specific error.
                  instance:
                    type: string
                    description: >-
                      This optional key may be present, with a unique URI for
                      the specific error; this will often point to an error log
                      for that specific response.
                  request_id:
                    type: string
                    description: Correlation ID for the original request.
                required:
                  - type
                  - status
                additionalProperties: false
              example:
                status: 401
                type: unauthorized
        '403':
          description: >-
            Forbidden. The caller has been authenticated but is not allowed to
            take the requested action.
          headers:
            upvest-request-id:
              required: true
              schema:
                type: string
                format: uuid
                example: 169ae4c7-ebd7-4041-94da-25369653eba7
          content:
            application/problem+json:
              schema:
                title: Error
                type: object
                description: ''
                properties:
                  type:
                    type: string
                    description: URL to a document describing the error condition.
                  status:
                    type: integer
                    description: >-
                      Transmission of the HTTP status code so that all
                      information can be found in one place, but also to correct
                      changes in the status code due to the use of proxy
                      servers.
                  title:
                    type: string
                    description: >-
                      A short, human-readable title for the general error type;
                      the title should not change for given types.
                  detail:
                    type: string
                    description: A human-readable description of the specific error.
                  instance:
                    type: string
                    description: >-
                      This optional key may be present, with a unique URI for
                      the specific error; this will often point to an error log
                      for that specific response.
                  request_id:
                    type: string
                    description: Correlation ID for the original request.
                required:
                  - type
                  - status
                additionalProperties: false
              example:
                status: 403
                type: forbidden
        '404':
          description: Not Found. The requested resource could not be found.
          headers:
            upvest-request-id:
              required: true
              schema:
                type: string
                format: uuid
                example: 169ae4c7-ebd7-4041-94da-25369653eba7
          content:
            application/problem+json:
              schema:
                title: Error
                type: object
                description: ''
                properties:
                  type:
                    type: string
                    description: URL to a document describing the error condition.
                  status:
                    type: integer
                    description: >-
                      Transmission of the HTTP status code so that all
                      information can be found in one place, but also to correct
                      changes in the status code due to the use of proxy
                      servers.
                  title:
                    type: string
                    description: >-
                      A short, human-readable title for the general error type;
                      the title should not change for given types.
                  detail:
                    type: string
                    description: A human-readable description of the specific error.
                  instance:
                    type: string
                    description: >-
                      This optional key may be present, with a unique URI for
                      the specific error; this will often point to an error log
                      for that specific response.
                  request_id:
                    type: string
                    description: Correlation ID for the original request.
                required:
                  - type
                  - status
                additionalProperties: false
              example:
                status: 404
                type: not_found
        '406':
          description: >-
            Not Acceptable. The resource does not have a current representation
            that would be acceptable to the user agent. "Accept" header defined
            unsupported value.
          headers:
            upvest-request-id:
              required: true
              schema:
                type: string
                format: uuid
                example: 169ae4c7-ebd7-4041-94da-25369653eba7
          content:
            application/problem+json:
              schema:
                title: Error
                type: object
                description: ''
                properties:
                  type:
                    type: string
                    description: URL to a document describing the error condition.
                  status:
                    type: integer
                    description: >-
                      Transmission of the HTTP status code so that all
                      information can be found in one place, but also to correct
                      changes in the status code due to the use of proxy
                      servers.
                  title:
                    type: string
                    description: >-
                      A short, human-readable title for the general error type;
                      the title should not change for given types.
                  detail:
                    type: string
                    description: A human-readable description of the specific error.
                  instance:
                    type: string
                    description: >-
                      This optional key may be present, with a unique URI for
                      the specific error; this will often point to an error log
                      for that specific response.
                  request_id:
                    type: string
                    description: Correlation ID for the original request.
                required:
                  - type
                  - status
                additionalProperties: false
              example:
                status: 406
                type: not_acceptable
        '429':
          description: >-
            Too Many Requests. The caller has exceeded their quota for the time
            period and has been throttled.
          headers:
            upvest-request-id:
              required: true
              schema:
                type: string
                format: uuid
                example: 169ae4c7-ebd7-4041-94da-25369653eba7
          content:
            application/problem+json:
              schema:
                title: Error
                type: object
                description: ''
                properties:
                  type:
                    type: string
                    description: URL to a document describing the error condition.
                  status:
                    type: integer
                    description: >-
                      Transmission of the HTTP status code so that all
                      information can be found in one place, but also to correct
                      changes in the status code due to the use of proxy
                      servers.
                  title:
                    type: string
                    description: >-
                      A short, human-readable title for the general error type;
                      the title should not change for given types.
                  detail:
                    type: string
                    description: A human-readable description of the specific error.
                  instance:
                    type: string
                    description: >-
                      This optional key may be present, with a unique URI for
                      the specific error; this will often point to an error log
                      for that specific response.
                  request_id:
                    type: string
                    description: Correlation ID for the original request.
                required:
                  - type
                  - status
                additionalProperties: false
              example:
                status: 429
                type: too_many_requests
        '500':
          description: Internal Server Error. The service encountered an unexpected error.
          headers:
            upvest-request-id:
              required: true
              schema:
                type: string
                format: uuid
                example: 169ae4c7-ebd7-4041-94da-25369653eba7
          content:
            application/problem+json:
              schema:
                title: Error
                type: object
                description: ''
                properties:
                  type:
                    type: string
                    description: URL to a document describing the error condition.
                  status:
                    type: integer
                    description: >-
                      Transmission of the HTTP status code so that all
                      information can be found in one place, but also to correct
                      changes in the status code due to the use of proxy
                      servers.
                  title:
                    type: string
                    description: >-
                      A short, human-readable title for the general error type;
                      the title should not change for given types.
                  detail:
                    type: string
                    description: A human-readable description of the specific error.
                  instance:
                    type: string
                    description: >-
                      This optional key may be present, with a unique URI for
                      the specific error; this will often point to an error log
                      for that specific response.
                  request_id:
                    type: string
                    description: Correlation ID for the original request.
                required:
                  - type
                  - status
                additionalProperties: false
              example:
                status: 500
                type: internal_server_error
        '503':
          description: >-
            Service Unavailable. The service handling for this request cannot be
            reached at this time.
          headers:
            upvest-request-id:
              required: true
              schema:
                type: string
                format: uuid
                example: 169ae4c7-ebd7-4041-94da-25369653eba7
          content:
            application/problem+json:
              schema:
                title: Error
                type: object
                description: ''
                properties:
                  type:
                    type: string
                    description: URL to a document describing the error condition.
                  status:
                    type: integer
                    description: >-
                      Transmission of the HTTP status code so that all
                      information can be found in one place, but also to correct
                      changes in the status code due to the use of proxy
                      servers.
                  title:
                    type: string
                    description: >-
                      A short, human-readable title for the general error type;
                      the title should not change for given types.
                  detail:
                    type: string
                    description: A human-readable description of the specific error.
                  instance:
                    type: string
                    description: >-
                      This optional key may be present, with a unique URI for
                      the specific error; this will often point to an error log
                      for that specific response.
                  request_id:
                    type: string
                    description: Correlation ID for the original request.
                required:
                  - type
                  - status
                additionalProperties: false
              example:
                status: 503
                type: method_not_allowed
        '504':
          description: >-
            Gateway Timeout. The service gateway has reached its internal
            timeout.
          headers:
            upvest-request-id:
              required: true
              schema:
                type: string
                format: uuid
                example: 169ae4c7-ebd7-4041-94da-25369653eba7
          content:
            application/problem+json:
              schema:
                title: Error
                type: object
                description: ''
                properties:
                  type:
                    type: string
                    description: URL to a document describing the error condition.
                  status:
                    type: integer
                    description: >-
                      Transmission of the HTTP status code so that all
                      information can be found in one place, but also to correct
                      changes in the status code due to the use of proxy
                      servers.
                  title:
                    type: string
                    description: >-
                      A short, human-readable title for the general error type;
                      the title should not change for given types.
                  detail:
                    type: string
                    description: A human-readable description of the specific error.
                  instance:
                    type: string
                    description: >-
                      This optional key may be present, with a unique URI for
                      the specific error; this will often point to an error log
                      for that specific response.
                  request_id:
                    type: string
                    description: Correlation ID for the original request.
                required:
                  - type
                  - status
                additionalProperties: false
              example:
                status: 504
                type: gateway_timeout
  /portfolios/rebalancings/executions/{execution_id}:
    parameters:
      - name: execution_id
        description: ''
        in: path
        required: true
        schema:
          title: Order execution unique identifier
          type: string
          format: uuid
      - name: upvest-client-id
        in: header
        description: Tenant Client ID
        required: true
        schema:
          type: string
          format: uuid
          example: ebabcf4d-61c3-4942-875c-e265a7c2d062
      - name: authorization
        in: header
        description: |
          Bearer (access) token from the OAuth flow with correct scopes.
          https://datatracker.ietf.org/doc/html/rfc6750
        required: true
        schema:
          type: string
          pattern: ^Bearer [a-zA-Z0-9\-\._~+/]*=*
          example: Bearer c2VjcmV0Cg==
      - name: signature
        in: header
        required: true
        schema:
          type: string
        description: >-
          https://tools.ietf.org/id/draft-ietf-httpbis-message-signatures-01.html#name-the-signature-http-header
      - name: signature-input
        in: header
        required: true
        schema:
          type: string
        description: >-
          https://tools.ietf.org/id/draft-ietf-httpbis-message-signatures-01.html#name-the-signature-input-http-he
      - name: upvest-api-version
        in: header
        required: false
        schema:
          type: string
          enum:
            - '1'
          default: '1'
          example: '1'
        description: 'Upvest API version (Note: Do not include quotation marks)'
    get:
      operationId: retrieve_portfolios_rebalancing_execution
      summary: Retrieve portfolios rebalancing execution
      description: Retrieve portfolios rebalancing execution
      tags:
        - Portfolios Rebalancing
      security:
        - oauth-client-credentials:
            - portfolios:read
            - portfolios:admin
      responses:
        '200':
          description: Portfolios
          headers:
            upvest-request-id:
              required: true
              schema:
                type: string
                format: uuid
                example: 169ae4c7-ebd7-4041-94da-25369653eba7
          content:
            application/json:
              schema:
                title: Portfolios rebalancing execution
                type: object
                properties:
                  id:
                    title: Portfolios order unique identifier
                    type: string
                    format: uuid
                  created_at:
                    type: string
                    format: date-time
                    description: >-
                      Date and time when the resource was created. [RFC
                      3339-5](https://datatracker.ietf.org/doc/html/rfc3339#section-5.6),
                      [ISO8601
                      UTC](https://www.iso.org/iso-8601-date-and-time-format.html)
                  updated_at:
                    type: string
                    format: date-time
                    description: >-
                      Date and time when the resource was last updated. [RFC
                      3339-5](https://datatracker.ietf.org/doc/html/rfc3339#section-5.6),
                      [ISO8601
                      UTC](https://www.iso.org/iso-8601-date-and-time-format.html)
                  accounts:
                    type: array
                    description: Accounts associated with this rebalancing execution
                    items:
                      title: Account unique identifier.
                      type: string
                      description: Account unique identifier.
                      format: uuid
                  allocations:
                    type: array
                    description: Allocations associated with this rebalancing execution
                    items:
                      title: Portfolio allocation unique identifier
                      type: string
                      format: uuid
                required:
                  - id
                  - created_at
                  - updated_at
                additionalProperties: false
              example:
                id: 735381ce-8380-4b07-9e42-97e2b6d3643e
                created_at: '2021-07-21T14:10:00.00Z'
                updated_at: '2021-07-21T14:10:00.00Z'
                accounts:
                  - 43801b85-bbcf-41c7-8389-b018082a5ec5
                  - 20151679-c159-4f16-b8a2-267b3d968c6f
                allocations: []
        '401':
          description: Unauthorized. The caller has not been authenticated.
          headers:
            upvest-request-id:
              required: true
              schema:
                type: string
                format: uuid
                example: 169ae4c7-ebd7-4041-94da-25369653eba7
          content:
            application/problem+json:
              schema:
                title: Error
                type: object
                description: ''
                properties:
                  type:
                    type: string
                    description: URL to a document describing the error condition.
                  status:
                    type: integer
                    description: >-
                      Transmission of the HTTP status code so that all
                      information can be found in one place, but also to correct
                      changes in the status code due to the use of proxy
                      servers.
                  title:
                    type: string
                    description: >-
                      A short, human-readable title for the general error type;
                      the title should not change for given types.
                  detail:
                    type: string
                    description: A human-readable description of the specific error.
                  instance:
                    type: string
                    description: >-
                      This optional key may be present, with a unique URI for
                      the specific error; this will often point to an error log
                      for that specific response.
                  request_id:
                    type: string
                    description: Correlation ID for the original request.
                required:
                  - type
                  - status
                additionalProperties: false
              example:
                status: 401
                type: unauthorized
        '403':
          description: >-
            Forbidden. The caller has been authenticated but is not allowed to
            take the requested action.
          headers:
            upvest-request-id:
              required: true
              schema:
                type: string
                format: uuid
                example: 169ae4c7-ebd7-4041-94da-25369653eba7
          content:
            application/problem+json:
              schema:
                title: Error
                type: object
                description: ''
                properties:
                  type:
                    type: string
                    description: URL to a document describing the error condition.
                  status:
                    type: integer
                    description: >-
                      Transmission of the HTTP status code so that all
                      information can be found in one place, but also to correct
                      changes in the status code due to the use of proxy
                      servers.
                  title:
                    type: string
                    description: >-
                      A short, human-readable title for the general error type;
                      the title should not change for given types.
                  detail:
                    type: string
                    description: A human-readable description of the specific error.
                  instance:
                    type: string
                    description: >-
                      This optional key may be present, with a unique URI for
                      the specific error; this will often point to an error log
                      for that specific response.
                  request_id:
                    type: string
                    description: Correlation ID for the original request.
                required:
                  - type
                  - status
                additionalProperties: false
              example:
                status: 403
                type: forbidden
        '404':
          description: Not Found. The requested resource could not be found.
          headers:
            upvest-request-id:
              required: true
              schema:
                type: string
                format: uuid
                example: 169ae4c7-ebd7-4041-94da-25369653eba7
          content:
            application/problem+json:
              schema:
                title: Error
                type: object
                description: ''
                properties:
                  type:
                    type: string
                    description: URL to a document describing the error condition.
                  status:
                    type: integer
                    description: >-
                      Transmission of the HTTP status code so that all
                      information can be found in one place, but also to correct
                      changes in the status code due to the use of proxy
                      servers.
                  title:
                    type: string
                    description: >-
                      A short, human-readable title for the general error type;
                      the title should not change for given types.
                  detail:
                    type: string
                    description: A human-readable description of the specific error.
                  instance:
                    type: string
                    description: >-
                      This optional key may be present, with a unique URI for
                      the specific error; this will often point to an error log
                      for that specific response.
                  request_id:
                    type: string
                    description: Correlation ID for the original request.
                required:
                  - type
                  - status
                additionalProperties: false
              example:
                status: 404
                type: not_found
        '405':
          description: >-
            Method Not Allowed. The requested method is not allowed on the
            requested resource.
          headers:
            upvest-request-id:
              required: true
              schema:
                type: string
                format: uuid
                example: 169ae4c7-ebd7-4041-94da-25369653eba7
          content:
            application/problem+json:
              schema:
                title: Error
                type: object
                description: ''
                properties:
                  type:
                    type: string
                    description: URL to a document describing the error condition.
                  status:
                    type: integer
                    description: >-
                      Transmission of the HTTP status code so that all
                      information can be found in one place, but also to correct
                      changes in the status code due to the use of proxy
                      servers.
                  title:
                    type: string
                    description: >-
                      A short, human-readable title for the general error type;
                      the title should not change for given types.
                  detail:
                    type: string
                    description: A human-readable description of the specific error.
                  instance:
                    type: string
                    description: >-
                      This optional key may be present, with a unique URI for
                      the specific error; this will often point to an error log
                      for that specific response.
                  request_id:
                    type: string
                    description: Correlation ID for the original request.
                required:
                  - type
                  - status
                additionalProperties: false
              example:
                status: 405
                type: method_not_allowed
        '406':
          description: >-
            Not Acceptable. The resource does not have a current representation
            that would be acceptable to the user agent. "Accept" header defined
            unsupported value.
          headers:
            upvest-request-id:
              required: true
              schema:
                type: string
                format: uuid
                example: 169ae4c7-ebd7-4041-94da-25369653eba7
          content:
            application/problem+json:
              schema:
                title: Error
                type: object
                description: ''
                properties:
                  type:
                    type: string
                    description: URL to a document describing the error condition.
                  status:
                    type: integer
                    description: >-
                      Transmission of the HTTP status code so that all
                      information can be found in one place, but also to correct
                      changes in the status code due to the use of proxy
                      servers.
                  title:
                    type: string
                    description: >-
                      A short, human-readable title for the general error type;
                      the title should not change for given types.
                  detail:
                    type: string
                    description: A human-readable description of the specific error.
                  instance:
                    type: string
                    description: >-
                      This optional key may be present, with a unique URI for
                      the specific error; this will often point to an error log
                      for that specific response.
                  request_id:
                    type: string
                    description: Correlation ID for the original request.
                required:
                  - type
                  - status
                additionalProperties: false
              example:
                status: 406
                type: not_acceptable
        '429':
          description: >-
            Too Many Requests. The caller has exceeded their quota for the time
            period and has been throttled.
          headers:
            upvest-request-id:
              required: true
              schema:
                type: string
                format: uuid
                example: 169ae4c7-ebd7-4041-94da-25369653eba7
          content:
            application/problem+json:
              schema:
                title: Error
                type: object
                description: ''
                properties:
                  type:
                    type: string
                    description: URL to a document describing the error condition.
                  status:
                    type: integer
                    description: >-
                      Transmission of the HTTP status code so that all
                      information can be found in one place, but also to correct
                      changes in the status code due to the use of proxy
                      servers.
                  title:
                    type: string
                    description: >-
                      A short, human-readable title for the general error type;
                      the title should not change for given types.
                  detail:
                    type: string
                    description: A human-readable description of the specific error.
                  instance:
                    type: string
                    description: >-
                      This optional key may be present, with a unique URI for
                      the specific error; this will often point to an error log
                      for that specific response.
                  request_id:
                    type: string
                    description: Correlation ID for the original request.
                required:
                  - type
                  - status
                additionalProperties: false
              example:
                status: 429
                type: too_many_requests
        '500':
          description: Internal Server Error. The service encountered an unexpected error.
          headers:
            upvest-request-id:
              required: true
              schema:
                type: string
                format: uuid
                example: 169ae4c7-ebd7-4041-94da-25369653eba7
          content:
            application/problem+json:
              schema:
                title: Error
                type: object
                description: ''
                properties:
                  type:
                    type: string
                    description: URL to a document describing the error condition.
                  status:
                    type: integer
                    description: >-
                      Transmission of the HTTP status code so that all
                      information can be found in one place, but also to correct
                      changes in the status code due to the use of proxy
                      servers.
                  title:
                    type: string
                    description: >-
                      A short, human-readable title for the general error type;
                      the title should not change for given types.
                  detail:
                    type: string
                    description: A human-readable description of the specific error.
                  instance:
                    type: string
                    description: >-
                      This optional key may be present, with a unique URI for
                      the specific error; this will often point to an error log
                      for that specific response.
                  request_id:
                    type: string
                    description: Correlation ID for the original request.
                required:
                  - type
                  - status
                additionalProperties: false
              example:
                status: 500
                type: internal_server_error
        '503':
          description: >-
            Service Unavailable. The service handling for this request cannot be
            reached at this time.
          headers:
            upvest-request-id:
              required: true
              schema:
                type: string
                format: uuid
                example: 169ae4c7-ebd7-4041-94da-25369653eba7
          content:
            application/problem+json:
              schema:
                title: Error
                type: object
                description: ''
                properties:
                  type:
                    type: string
                    description: URL to a document describing the error condition.
                  status:
                    type: integer
                    description: >-
                      Transmission of the HTTP status code so that all
                      information can be found in one place, but also to correct
                      changes in the status code due to the use of proxy
                      servers.
                  title:
                    type: string
                    description: >-
                      A short, human-readable title for the general error type;
                      the title should not change for given types.
                  detail:
                    type: string
                    description: A human-readable description of the specific error.
                  instance:
                    type: string
                    description: >-
                      This optional key may be present, with a unique URI for
                      the specific error; this will often point to an error log
                      for that specific response.
                  request_id:
                    type: string
                    description: Correlation ID for the original request.
                required:
                  - type
                  - status
                additionalProperties: false
              example:
                status: 503
                type: method_not_allowed
        '504':
          description: >-
            Gateway Timeout. The service gateway has reached its internal
            timeout.
          headers:
            upvest-request-id:
              required: true
              schema:
                type: string
                format: uuid
                example: 169ae4c7-ebd7-4041-94da-25369653eba7
          content:
            application/problem+json:
              schema:
                title: Error
                type: object
                description: ''
                properties:
                  type:
                    type: string
                    description: URL to a document describing the error condition.
                  status:
                    type: integer
                    description: >-
                      Transmission of the HTTP status code so that all
                      information can be found in one place, but also to correct
                      changes in the status code due to the use of proxy
                      servers.
                  title:
                    type: string
                    description: >-
                      A short, human-readable title for the general error type;
                      the title should not change for given types.
                  detail:
                    type: string
                    description: A human-readable description of the specific error.
                  instance:
                    type: string
                    description: >-
                      This optional key may be present, with a unique URI for
                      the specific error; this will often point to an error log
                      for that specific response.
                  request_id:
                    type: string
                    description: Correlation ID for the original request.
                required:
                  - type
                  - status
                additionalProperties: false
              example:
                status: 504
                type: gateway_timeout
  /portfolios/rebalancings/executions/{execution_id}/orders:
    parameters:
      - name: execution_id
        description: ''
        in: path
        required: true
        schema:
          title: Order execution unique identifier
          type: string
          format: uuid
      - name: upvest-client-id
        in: header
        description: Tenant Client ID
        required: true
        schema:
          type: string
          format: uuid
          example: ebabcf4d-61c3-4942-875c-e265a7c2d062
      - name: authorization
        in: header
        description: |
          Bearer (access) token from the OAuth flow with correct scopes.
          https://datatracker.ietf.org/doc/html/rfc6750
        required: true
        schema:
          type: string
          pattern: ^Bearer [a-zA-Z0-9\-\._~+/]*=*
          example: Bearer c2VjcmV0Cg==
      - name: signature
        in: header
        required: true
        schema:
          type: string
        description: >-
          https://tools.ietf.org/id/draft-ietf-httpbis-message-signatures-01.html#name-the-signature-http-header
      - name: signature-input
        in: header
        required: true
        schema:
          type: string
        description: >-
          https://tools.ietf.org/id/draft-ietf-httpbis-message-signatures-01.html#name-the-signature-input-http-he
      - name: upvest-api-version
        in: header
        required: false
        schema:
          type: string
          enum:
            - '1'
          default: '1'
          example: '1'
        description: 'Upvest API version (Note: Do not include quotation marks)'
    get:
      operationId: list_portfolio_rebalancing_execution_orders
      summary: List portfolio rebalancing execution orders
      description: List portfolio rebalancing execution orders
      tags:
        - Portfolios Rebalancing
      security:
        - oauth-client-credentials:
            - portfolios:read
            - portfolios:admin
      parameters:
        - name: sort
          in: query
          required: false
          schema:
            type: string
            enum:
              - status
            default: status
          description: Sort the result by `status`.
        - name: order
          in: query
          required: false
          schema:
            type: string
            enum:
              - ASC
            default: ASC
          description: >-
            Sort order of the result list if the `sort` parameter is specified.
            By default, only ASC for ascending sort.
        - name: offset
          in: query
          schema:
            type: integer
            minimum: 0
            format: int32
          allowEmptyValue: true
          description: >-
            Use the `offset` argument to specify where in the list of results to
            start when returning items for a particular query.
        - name: limit
          in: query
          schema:
            type: integer
            format: int32
            default: 100
            minimum: 0
            maximum: 1000
          allowEmptyValue: true
          description: >-
            Use the `limit` argument to specify the maximum number of items
            returned.
        - name: start_date
          in: query
          required: false
          schema:
            type: string
            title: Date in YYYY-MM-DD format. RFC 3339, section 5.6
          description: >-
            Returns rebalancing orders with dates starting from and including
            this date (UTC)
          example: '2022-10-14T10:10:10Z'
        - name: end_date
          in: query
          required: false
          schema:
            type: string
            title: Date in YYYY-MM-DD format. RFC 3339, section 5.6
          description: Returns rebalancing orders with dates up until this date (UTC)
          example: '2022-10-14T10:10:10Z'
      responses:
        '200':
          description: Portfolios
          headers:
            upvest-request-id:
              required: true
              schema:
                type: string
                format: uuid
                example: 169ae4c7-ebd7-4041-94da-25369653eba7
          content:
            application/json:
              schema:
                title: Portfolios rebalancing execution order - List - Response
                type: object
                properties:
                  meta:
                    type: object
                    properties:
                      offset:
                        type: integer
                        description: Amount of resource to offset in the response.
                      limit:
                        type: integer
                        description: Total limit of the response.
                      count:
                        type: integer
                        description: Count of the resources returned in the response.
                      total_count:
                        type: integer
                        description: Total count of all the resources.
                      sort:
                        type: string
                        description: The field that the list is sorted by.
                      order:
                        type: string
                        description: |-
                          The ordering of the response.
                          * ASC - Ascending order
                          * DESC - Descending order
                        enum:
                          - ASC
                          - DESC
                    required:
                      - offset
                      - limit
                      - count
                      - total_count
                  data:
                    type: array
                    items:
                      title: Portfolios rebalancing execution order
                      type: object
                      properties:
                        id:
                          title: Rebalancing execution order unique identifier
                          type: string
                          format: uuid
                        execution_id:
                          title: Portfolio rebalancing execution unique identifier
                          type: string
                          format: uuid
                        account_id:
                          title: Account unique identifier.
                          type: string
                          description: Account unique identifier.
                          format: uuid
                        portfolio_order_id:
                          oneOf:
                            - title: Portfolios order unique identifier
                              type: string
                              format: uuid
                            - type: 'null'
                        status:
                          type: string
                          description: |-
                            Status of the Rebalancing Execution Order.
                            * NEW - 
                            * PROCESSING - 
                            * FILLED - 
                            * CANCELLED - 
                          enum:
                            - NEW
                            - PROCESSING
                            - FILLED
                            - CANCELLED
                        created_at:
                          type: string
                          format: date-time
                          description: >-
                            Date and time when the resource was created. [RFC
                            3339-5](https://datatracker.ietf.org/doc/html/rfc3339#section-5.6),
                            [ISO8601
                            UTC](https://www.iso.org/iso-8601-date-and-time-format.html)
                        updated_at:
                          type: string
                          format: date-time
                          description: >-
                            Date and time when the resource was last updated.
                            [RFC
                            3339-5](https://datatracker.ietf.org/doc/html/rfc3339#section-5.6),
                            [ISO8601
                            UTC](https://www.iso.org/iso-8601-date-and-time-format.html)
                        cancellation_reason:
                          type: string
                          description: >-
                            Reason for Rebalancing Execution Order Cancellation.
                            The field is present in case the Order has a status
                            of CANCELLED.

                            * ACCOUNT_IS_EMPTY - 

                            * ACCOUNT_NOT_FOUND - 

                            * CANCELLED_BY_CLIENT - 

                            * CANCELLED_BY_UPVEST - 

                            * CONFIGURATION_IS_MISSING - 

                            * INVALID_ACCOUNT_TYPE - 

                            * PORTFOLIO_IS_BALANCED - 

                            * UNKNOWN - 
                          enum:
                            - ACCOUNT_IS_EMPTY
                            - ACCOUNT_NOT_FOUND
                            - CANCELLED_BY_CLIENT
                            - CANCELLED_BY_UPVEST
                            - CONFIGURATION_IS_MISSING
                            - INVALID_ACCOUNT_TYPE
                            - PORTFOLIO_IS_BALANCED
                            - UNKNOWN
                        cancellation_details:
                          type: string
                      required:
                        - id
                        - execution_id
                        - account_id
                        - portfolio_order_id
                        - status
                        - created_at
                        - updated_at
                      additionalProperties: false
                required:
                  - meta
                  - data
                additionalProperties: false
              example:
                meta:
                  count: 2
                  limit: 10
                  offset: 0
                  order: ASC
                  sort: state
                  total_count: 2
                data:
                  - id: adf706aa-4fac-4e1d-878b-5b225f7b7354
                    created_at: '2022-09-28T09:14:02Z'
                    updated_at: '2022-09-28T09:14:02Z'
                    execution_id: edc74b48-a377-4b93-84fb-543b1137de05
                    account_id: 100bb408-149c-4e6f-8697-837c2a144a29
                    portfolio_order_id: b31723e0-8c8c-4bd0-a962-8bd26c5aee4d
                    status: FILLED
                  - id: 1dd8cede-a326-43b3-a54c-9d2d0e80edb5
                    created_at: '2022-09-28T09:14:02Z'
                    updated_at: '2022-09-28T09:14:02Z'
                    execution_id: f678fe2b-ffd8-4b99-844f-a8f78a67e528
                    account_id: 98b21a45-5ea0-481f-bb1e-880aab0d154d
                    portfolio_order_id: 411c625e-b2f4-4af4-ac21-e17846fb6bcc
                    status: PROCESSING
                  - id: 1bf46252-ad90-4e22-8717-9586d2b86327
                    created_at: '2022-09-28T09:14:02Z'
                    updated_at: '2022-09-28T09:14:02Z'
                    execution_id: 9275e08d-012f-40bd-80b7-58037bdc7ab6
                    portfolio_order_id: null
                    account_id: 98b21a45-5ea0-481f-bb1e-880aab0d154d
                    status: NEW
                  - id: 1bf46252-ad90-4e22-8717-9586d2b86327
                    created_at: '2022-09-28T09:14:02Z'
                    updated_at: '2022-09-28T09:14:02Z'
                    execution_id: 9275e08d-012f-40bd-80b7-58037bdc7ab6
                    portfolio_order_id: null
                    account_id: 98b21a45-5ea0-481f-bb1e-880aab0d154d
                    status: CANCELLED
                    cancellation_reason: PORTFOLIO_IS_BALANCED
                    cancellation_details: Portfolio is balanced, no need to rebalance.
        '400':
          description: Bad Request. The incoming request had a malformed parameter/object.
          headers:
            upvest-request-id:
              required: true
              schema:
                type: string
                format: uuid
                example: 169ae4c7-ebd7-4041-94da-25369653eba7
          content:
            application/problem+json:
              schema:
                title: Error
                type: object
                description: ''
                properties:
                  type:
                    type: string
                    description: URL to a document describing the error condition.
                  status:
                    type: integer
                    description: >-
                      Transmission of the HTTP status code so that all
                      information can be found in one place, but also to correct
                      changes in the status code due to the use of proxy
                      servers.
                  title:
                    type: string
                    description: >-
                      A short, human-readable title for the general error type;
                      the title should not change for given types.
                  detail:
                    type: string
                    description: A human-readable description of the specific error.
                  instance:
                    type: string
                    description: >-
                      This optional key may be present, with a unique URI for
                      the specific error; this will often point to an error log
                      for that specific response.
                  request_id:
                    type: string
                    description: Correlation ID for the original request.
                required:
                  - type
                  - status
                additionalProperties: false
              example:
                status: 400
                type: bad_request
        '401':
          description: Unauthorized. The caller has not been authenticated.
          headers:
            upvest-request-id:
              required: true
              schema:
                type: string
                format: uuid
                example: 169ae4c7-ebd7-4041-94da-25369653eba7
          content:
            application/problem+json:
              schema:
                title: Error
                type: object
                description: ''
                properties:
                  type:
                    type: string
                    description: URL to a document describing the error condition.
                  status:
                    type: integer
                    description: >-
                      Transmission of the HTTP status code so that all
                      information can be found in one place, but also to correct
                      changes in the status code due to the use of proxy
                      servers.
                  title:
                    type: string
                    description: >-
                      A short, human-readable title for the general error type;
                      the title should not change for given types.
                  detail:
                    type: string
                    description: A human-readable description of the specific error.
                  instance:
                    type: string
                    description: >-
                      This optional key may be present, with a unique URI for
                      the specific error; this will often point to an error log
                      for that specific response.
                  request_id:
                    type: string
                    description: Correlation ID for the original request.
                required:
                  - type
                  - status
                additionalProperties: false
              example:
                status: 401
                type: unauthorized
        '403':
          description: >-
            Forbidden. The caller has been authenticated but is not allowed to
            take the requested action.
          headers:
            upvest-request-id:
              required: true
              schema:
                type: string
                format: uuid
                example: 169ae4c7-ebd7-4041-94da-25369653eba7
          content:
            application/problem+json:
              schema:
                title: Error
                type: object
                description: ''
                properties:
                  type:
                    type: string
                    description: URL to a document describing the error condition.
                  status:
                    type: integer
                    description: >-
                      Transmission of the HTTP status code so that all
                      information can be found in one place, but also to correct
                      changes in the status code due to the use of proxy
                      servers.
                  title:
                    type: string
                    description: >-
                      A short, human-readable title for the general error type;
                      the title should not change for given types.
                  detail:
                    type: string
                    description: A human-readable description of the specific error.
                  instance:
                    type: string
                    description: >-
                      This optional key may be present, with a unique URI for
                      the specific error; this will often point to an error log
                      for that specific response.
                  request_id:
                    type: string
                    description: Correlation ID for the original request.
                required:
                  - type
                  - status
                additionalProperties: false
              example:
                status: 403
                type: forbidden
        '404':
          description: Not Found. The requested resource could not be found.
          headers:
            upvest-request-id:
              required: true
              schema:
                type: string
                format: uuid
                example: 169ae4c7-ebd7-4041-94da-25369653eba7
          content:
            application/problem+json:
              schema:
                title: Error
                type: object
                description: ''
                properties:
                  type:
                    type: string
                    description: URL to a document describing the error condition.
                  status:
                    type: integer
                    description: >-
                      Transmission of the HTTP status code so that all
                      information can be found in one place, but also to correct
                      changes in the status code due to the use of proxy
                      servers.
                  title:
                    type: string
                    description: >-
                      A short, human-readable title for the general error type;
                      the title should not change for given types.
                  detail:
                    type: string
                    description: A human-readable description of the specific error.
                  instance:
                    type: string
                    description: >-
                      This optional key may be present, with a unique URI for
                      the specific error; this will often point to an error log
                      for that specific response.
                  request_id:
                    type: string
                    description: Correlation ID for the original request.
                required:
                  - type
                  - status
                additionalProperties: false
              example:
                status: 404
                type: not_found
        '405':
          description: >-
            Method Not Allowed. The requested method is not allowed on the
            requested resource.
          headers:
            upvest-request-id:
              required: true
              schema:
                type: string
                format: uuid
                example: 169ae4c7-ebd7-4041-94da-25369653eba7
          content:
            application/problem+json:
              schema:
                title: Error
                type: object
                description: ''
                properties:
                  type:
                    type: string
                    description: URL to a document describing the error condition.
                  status:
                    type: integer
                    description: >-
                      Transmission of the HTTP status code so that all
                      information can be found in one place, but also to correct
                      changes in the status code due to the use of proxy
                      servers.
                  title:
                    type: string
                    description: >-
                      A short, human-readable title for the general error type;
                      the title should not change for given types.
                  detail:
                    type: string
                    description: A human-readable description of the specific error.
                  instance:
                    type: string
                    description: >-
                      This optional key may be present, with a unique URI for
                      the specific error; this will often point to an error log
                      for that specific response.
                  request_id:
                    type: string
                    description: Correlation ID for the original request.
                required:
                  - type
                  - status
                additionalProperties: false
              example:
                status: 405
                type: method_not_allowed
        '406':
          description: >-
            Not Acceptable. The resource does not have a current representation
            that would be acceptable to the user agent. "Accept" header defined
            unsupported value.
          headers:
            upvest-request-id:
              required: true
              schema:
                type: string
                format: uuid
                example: 169ae4c7-ebd7-4041-94da-25369653eba7
          content:
            application/problem+json:
              schema:
                title: Error
                type: object
                description: ''
                properties:
                  type:
                    type: string
                    description: URL to a document describing the error condition.
                  status:
                    type: integer
                    description: >-
                      Transmission of the HTTP status code so that all
                      information can be found in one place, but also to correct
                      changes in the status code due to the use of proxy
                      servers.
                  title:
                    type: string
                    description: >-
                      A short, human-readable title for the general error type;
                      the title should not change for given types.
                  detail:
                    type: string
                    description: A human-readable description of the specific error.
                  instance:
                    type: string
                    description: >-
                      This optional key may be present, with a unique URI for
                      the specific error; this will often point to an error log
                      for that specific response.
                  request_id:
                    type: string
                    description: Correlation ID for the original request.
                required:
                  - type
                  - status
                additionalProperties: false
              example:
                status: 406
                type: not_acceptable
        '429':
          description: >-
            Too Many Requests. The caller has exceeded their quota for the time
            period and has been throttled.
          headers:
            upvest-request-id:
              required: true
              schema:
                type: string
                format: uuid
                example: 169ae4c7-ebd7-4041-94da-25369653eba7
          content:
            application/problem+json:
              schema:
                title: Error
                type: object
                description: ''
                properties:
                  type:
                    type: string
                    description: URL to a document describing the error condition.
                  status:
                    type: integer
                    description: >-
                      Transmission of the HTTP status code so that all
                      information can be found in one place, but also to correct
                      changes in the status code due to the use of proxy
                      servers.
                  title:
                    type: string
                    description: >-
                      A short, human-readable title for the general error type;
                      the title should not change for given types.
                  detail:
                    type: string
                    description: A human-readable description of the specific error.
                  instance:
                    type: string
                    description: >-
                      This optional key may be present, with a unique URI for
                      the specific error; this will often point to an error log
                      for that specific response.
                  request_id:
                    type: string
                    description: Correlation ID for the original request.
                required:
                  - type
                  - status
                additionalProperties: false
              example:
                status: 429
                type: too_many_requests
        '500':
          description: Internal Server Error. The service encountered an unexpected error.
          headers:
            upvest-request-id:
              required: true
              schema:
                type: string
                format: uuid
                example: 169ae4c7-ebd7-4041-94da-25369653eba7
          content:
            application/problem+json:
              schema:
                title: Error
                type: object
                description: ''
                properties:
                  type:
                    type: string
                    description: URL to a document describing the error condition.
                  status:
                    type: integer
                    description: >-
                      Transmission of the HTTP status code so that all
                      information can be found in one place, but also to correct
                      changes in the status code due to the use of proxy
                      servers.
                  title:
                    type: string
                    description: >-
                      A short, human-readable title for the general error type;
                      the title should not change for given types.
                  detail:
                    type: string
                    description: A human-readable description of the specific error.
                  instance:
                    type: string
                    description: >-
                      This optional key may be present, with a unique URI for
                      the specific error; this will often point to an error log
                      for that specific response.
                  request_id:
                    type: string
                    description: Correlation ID for the original request.
                required:
                  - type
                  - status
                additionalProperties: false
              example:
                status: 500
                type: internal_server_error
        '503':
          description: >-
            Service Unavailable. The service handling for this request cannot be
            reached at this time.
          headers:
            upvest-request-id:
              required: true
              schema:
                type: string
                format: uuid
                example: 169ae4c7-ebd7-4041-94da-25369653eba7
          content:
            application/problem+json:
              schema:
                title: Error
                type: object
                description: ''
                properties:
                  type:
                    type: string
                    description: URL to a document describing the error condition.
                  status:
                    type: integer
                    description: >-
                      Transmission of the HTTP status code so that all
                      information can be found in one place, but also to correct
                      changes in the status code due to the use of proxy
                      servers.
                  title:
                    type: string
                    description: >-
                      A short, human-readable title for the general error type;
                      the title should not change for given types.
                  detail:
                    type: string
                    description: A human-readable description of the specific error.
                  instance:
                    type: string
                    description: >-
                      This optional key may be present, with a unique URI for
                      the specific error; this will often point to an error log
                      for that specific response.
                  request_id:
                    type: string
                    description: Correlation ID for the original request.
                required:
                  - type
                  - status
                additionalProperties: false
              example:
                status: 503
                type: method_not_allowed
        '504':
          description: >-
            Gateway Timeout. The service gateway has reached its internal
            timeout.
          headers:
            upvest-request-id:
              required: true
              schema:
                type: string
                format: uuid
                example: 169ae4c7-ebd7-4041-94da-25369653eba7
          content:
            application/problem+json:
              schema:
                title: Error
                type: object
                description: ''
                properties:
                  type:
                    type: string
                    description: URL to a document describing the error condition.
                  status:
                    type: integer
                    description: >-
                      Transmission of the HTTP status code so that all
                      information can be found in one place, but also to correct
                      changes in the status code due to the use of proxy
                      servers.
                  title:
                    type: string
                    description: >-
                      A short, human-readable title for the general error type;
                      the title should not change for given types.
                  detail:
                    type: string
                    description: A human-readable description of the specific error.
                  instance:
                    type: string
                    description: >-
                      This optional key may be present, with a unique URI for
                      the specific error; this will often point to an error log
                      for that specific response.
                  request_id:
                    type: string
                    description: Correlation ID for the original request.
                required:
                  - type
                  - status
                additionalProperties: false
              example:
                status: 504
                type: gateway_timeout
  /portfolios/allocations/{allocation_id}/accounts:
    parameters:
      - name: allocation_id
        in: path
        required: true
        schema:
          title: Portfolio allocation unique identifier
          type: string
          format: uuid
      - name: upvest-client-id
        in: header
        description: Tenant Client ID
        required: true
        schema:
          type: string
          format: uuid
          example: ebabcf4d-61c3-4942-875c-e265a7c2d062
      - name: authorization
        in: header
        description: |
          Bearer (access) token from the OAuth flow with correct scopes.
          https://datatracker.ietf.org/doc/html/rfc6750
        required: true
        schema:
          type: string
          pattern: ^Bearer [a-zA-Z0-9\-\._~+/]*=*
          example: Bearer c2VjcmV0Cg==
      - name: signature
        in: header
        required: true
        schema:
          type: string
        description: >-
          https://tools.ietf.org/id/draft-ietf-httpbis-message-signatures-01.html#name-the-signature-http-header
      - name: signature-input
        in: header
        required: true
        schema:
          type: string
        description: >-
          https://tools.ietf.org/id/draft-ietf-httpbis-message-signatures-01.html#name-the-signature-input-http-he
      - name: upvest-api-version
        in: header
        required: false
        schema:
          type: string
          enum:
            - '1'
          default: '1'
          example: '1'
        description: 'Upvest API version (Note: Do not include quotation marks)'
    get:
      operationId: list_portfolios_allocation_accounts
      summary: List portfolios allocation accounts
      description: List portfolios allocation accounts
      tags:
        - Portfolios
      security:
        - oauth-client-credentials:
            - portfolios:read
            - portfolios:admin
      parameters:
        - name: sort
          in: query
          required: false
          schema:
            type: string
            enum:
              - id
            default: id
          description: Sort the result by `id`.
        - name: order
          in: query
          required: false
          schema:
            type: string
            enum:
              - ASC
            default: ASC
          description: >-
            Sort order of the result list if the `sort` parameter is specified.
            By default, only ASC for ascending sort.
        - name: offset
          in: query
          schema:
            type: integer
            minimum: 0
            format: int32
          allowEmptyValue: true
          description: >-
            Use the `offset` argument to specify where in the list of results to
            start when returning items for a particular query.
        - name: limit
          in: query
          schema:
            type: integer
            format: int32
            default: 100
            minimum: 0
            maximum: 1000
          allowEmptyValue: true
          description: >-
            Use the `limit` argument to specify the maximum number of items
            returned.
      responses:
        '200':
          description: Portfolios allocation accounts
          headers:
            upvest-request-id:
              required: true
              schema:
                type: string
                format: uuid
                example: 169ae4c7-ebd7-4041-94da-25369653eba7
          content:
            application/json:
              schema:
                title: Portfolios allocation accounts - List - Response
                type: object
                properties:
                  meta:
                    type: object
                    properties:
                      offset:
                        type: integer
                        description: Amount of resource to offset in the response.
                      limit:
                        type: integer
                        description: Total limit of the response.
                      count:
                        type: integer
                        description: Count of the resources returned in the response.
                      total_count:
                        type: integer
                        description: Total count of all the resources.
                      sort:
                        type: string
                        description: The field that the list is sorted by.
                      order:
                        type: string
                        description: |-
                          The ordering of the response.
                          * ASC - Ascending order
                          * DESC - Descending order
                        enum:
                          - ASC
                          - DESC
                    required:
                      - offset
                      - limit
                      - count
                      - total_count
                  data:
                    type: array
                    items:
                      title: Portfolios allocation account
                      type: object
                      properties:
                        id:
                          title: Account unique identifier.
                          type: string
                          description: Account unique identifier.
                          format: uuid
                      required:
                        - id
                      additionalProperties: false
                required:
                  - meta
                  - data
                additionalProperties: false
              example:
                meta:
                  offset: 0
                  limit: 100
                  count: 1
                  total_count: 1
                  sort: id
                  order: ASC
                data:
                  - id: 81d6e710-37e6-4a5a-9877-ef5bb6d717e3
        '400':
          description: Bad Request. The incoming request had a malformed parameter/object.
          headers:
            upvest-request-id:
              required: true
              schema:
                type: string
                format: uuid
                example: 169ae4c7-ebd7-4041-94da-25369653eba7
          content:
            application/problem+json:
              schema:
                title: Error
                type: object
                description: ''
                properties:
                  type:
                    type: string
                    description: URL to a document describing the error condition.
                  status:
                    type: integer
                    description: >-
                      Transmission of the HTTP status code so that all
                      information can be found in one place, but also to correct
                      changes in the status code due to the use of proxy
                      servers.
                  title:
                    type: string
                    description: >-
                      A short, human-readable title for the general error type;
                      the title should not change for given types.
                  detail:
                    type: string
                    description: A human-readable description of the specific error.
                  instance:
                    type: string
                    description: >-
                      This optional key may be present, with a unique URI for
                      the specific error; this will often point to an error log
                      for that specific response.
                  request_id:
                    type: string
                    description: Correlation ID for the original request.
                required:
                  - type
                  - status
                additionalProperties: false
              example:
                status: 400
                type: bad_request
        '401':
          description: Unauthorized. The caller has not been authenticated.
          headers:
            upvest-request-id:
              required: true
              schema:
                type: string
                format: uuid
                example: 169ae4c7-ebd7-4041-94da-25369653eba7
          content:
            application/problem+json:
              schema:
                title: Error
                type: object
                description: ''
                properties:
                  type:
                    type: string
                    description: URL to a document describing the error condition.
                  status:
                    type: integer
                    description: >-
                      Transmission of the HTTP status code so that all
                      information can be found in one place, but also to correct
                      changes in the status code due to the use of proxy
                      servers.
                  title:
                    type: string
                    description: >-
                      A short, human-readable title for the general error type;
                      the title should not change for given types.
                  detail:
                    type: string
                    description: A human-readable description of the specific error.
                  instance:
                    type: string
                    description: >-
                      This optional key may be present, with a unique URI for
                      the specific error; this will often point to an error log
                      for that specific response.
                  request_id:
                    type: string
                    description: Correlation ID for the original request.
                required:
                  - type
                  - status
                additionalProperties: false
              example:
                status: 401
                type: unauthorized
        '403':
          description: >-
            Forbidden. The caller has been authenticated but is not allowed to
            take the requested action.
          headers:
            upvest-request-id:
              required: true
              schema:
                type: string
                format: uuid
                example: 169ae4c7-ebd7-4041-94da-25369653eba7
          content:
            application/problem+json:
              schema:
                title: Error
                type: object
                description: ''
                properties:
                  type:
                    type: string
                    description: URL to a document describing the error condition.
                  status:
                    type: integer
                    description: >-
                      Transmission of the HTTP status code so that all
                      information can be found in one place, but also to correct
                      changes in the status code due to the use of proxy
                      servers.
                  title:
                    type: string
                    description: >-
                      A short, human-readable title for the general error type;
                      the title should not change for given types.
                  detail:
                    type: string
                    description: A human-readable description of the specific error.
                  instance:
                    type: string
                    description: >-
                      This optional key may be present, with a unique URI for
                      the specific error; this will often point to an error log
                      for that specific response.
                  request_id:
                    type: string
                    description: Correlation ID for the original request.
                required:
                  - type
                  - status
                additionalProperties: false
              example:
                status: 403
                type: forbidden
        '404':
          description: Not Found. The requested resource could not be found.
          headers:
            upvest-request-id:
              required: true
              schema:
                type: string
                format: uuid
                example: 169ae4c7-ebd7-4041-94da-25369653eba7
          content:
            application/problem+json:
              schema:
                title: Error
                type: object
                description: ''
                properties:
                  type:
                    type: string
                    description: URL to a document describing the error condition.
                  status:
                    type: integer
                    description: >-
                      Transmission of the HTTP status code so that all
                      information can be found in one place, but also to correct
                      changes in the status code due to the use of proxy
                      servers.
                  title:
                    type: string
                    description: >-
                      A short, human-readable title for the general error type;
                      the title should not change for given types.
                  detail:
                    type: string
                    description: A human-readable description of the specific error.
                  instance:
                    type: string
                    description: >-
                      This optional key may be present, with a unique URI for
                      the specific error; this will often point to an error log
                      for that specific response.
                  request_id:
                    type: string
                    description: Correlation ID for the original request.
                required:
                  - type
                  - status
                additionalProperties: false
              example:
                status: 404
                type: not_found
        '405':
          description: >-
            Method Not Allowed. The requested method is not allowed on the
            requested resource.
          headers:
            upvest-request-id:
              required: true
              schema:
                type: string
                format: uuid
                example: 169ae4c7-ebd7-4041-94da-25369653eba7
          content:
            application/problem+json:
              schema:
                title: Error
                type: object
                description: ''
                properties:
                  type:
                    type: string
                    description: URL to a document describing the error condition.
                  status:
                    type: integer
                    description: >-
                      Transmission of the HTTP status code so that all
                      information can be found in one place, but also to correct
                      changes in the status code due to the use of proxy
                      servers.
                  title:
                    type: string
                    description: >-
                      A short, human-readable title for the general error type;
                      the title should not change for given types.
                  detail:
                    type: string
                    description: A human-readable description of the specific error.
                  instance:
                    type: string
                    description: >-
                      This optional key may be present, with a unique URI for
                      the specific error; this will often point to an error log
                      for that specific response.
                  request_id:
                    type: string
                    description: Correlation ID for the original request.
                required:
                  - type
                  - status
                additionalProperties: false
              example:
                status: 405
                type: method_not_allowed
        '406':
          description: >-
            Not Acceptable. The resource does not have a current representation
            that would be acceptable to the user agent. "Accept" header defined
            unsupported value.
          headers:
            upvest-request-id:
              required: true
              schema:
                type: string
                format: uuid
                example: 169ae4c7-ebd7-4041-94da-25369653eba7
          content:
            application/problem+json:
              schema:
                title: Error
                type: object
                description: ''
                properties:
                  type:
                    type: string
                    description: URL to a document describing the error condition.
                  status:
                    type: integer
                    description: >-
                      Transmission of the HTTP status code so that all
                      information can be found in one place, but also to correct
                      changes in the status code due to the use of proxy
                      servers.
                  title:
                    type: string
                    description: >-
                      A short, human-readable title for the general error type;
                      the title should not change for given types.
                  detail:
                    type: string
                    description: A human-readable description of the specific error.
                  instance:
                    type: string
                    description: >-
                      This optional key may be present, with a unique URI for
                      the specific error; this will often point to an error log
                      for that specific response.
                  request_id:
                    type: string
                    description: Correlation ID for the original request.
                required:
                  - type
                  - status
                additionalProperties: false
              example:
                status: 406
                type: not_acceptable
        '429':
          description: >-
            Too Many Requests. The caller has exceeded their quota for the time
            period and has been throttled.
          headers:
            upvest-request-id:
              required: true
              schema:
                type: string
                format: uuid
                example: 169ae4c7-ebd7-4041-94da-25369653eba7
          content:
            application/problem+json:
              schema:
                title: Error
                type: object
                description: ''
                properties:
                  type:
                    type: string
                    description: URL to a document describing the error condition.
                  status:
                    type: integer
                    description: >-
                      Transmission of the HTTP status code so that all
                      information can be found in one place, but also to correct
                      changes in the status code due to the use of proxy
                      servers.
                  title:
                    type: string
                    description: >-
                      A short, human-readable title for the general error type;
                      the title should not change for given types.
                  detail:
                    type: string
                    description: A human-readable description of the specific error.
                  instance:
                    type: string
                    description: >-
                      This optional key may be present, with a unique URI for
                      the specific error; this will often point to an error log
                      for that specific response.
                  request_id:
                    type: string
                    description: Correlation ID for the original request.
                required:
                  - type
                  - status
                additionalProperties: false
              example:
                status: 429
                type: too_many_requests
        '500':
          description: Internal Server Error. The service encountered an unexpected error.
          headers:
            upvest-request-id:
              required: true
              schema:
                type: string
                format: uuid
                example: 169ae4c7-ebd7-4041-94da-25369653eba7
          content:
            application/problem+json:
              schema:
                title: Error
                type: object
                description: ''
                properties:
                  type:
                    type: string
                    description: URL to a document describing the error condition.
                  status:
                    type: integer
                    description: >-
                      Transmission of the HTTP status code so that all
                      information can be found in one place, but also to correct
                      changes in the status code due to the use of proxy
                      servers.
                  title:
                    type: string
                    description: >-
                      A short, human-readable title for the general error type;
                      the title should not change for given types.
                  detail:
                    type: string
                    description: A human-readable description of the specific error.
                  instance:
                    type: string
                    description: >-
                      This optional key may be present, with a unique URI for
                      the specific error; this will often point to an error log
                      for that specific response.
                  request_id:
                    type: string
                    description: Correlation ID for the original request.
                required:
                  - type
                  - status
                additionalProperties: false
              example:
                status: 500
                type: internal_server_error
        '503':
          description: >-
            Service Unavailable. The service handling for this request cannot be
            reached at this time.
          headers:
            upvest-request-id:
              required: true
              schema:
                type: string
                format: uuid
                example: 169ae4c7-ebd7-4041-94da-25369653eba7
          content:
            application/problem+json:
              schema:
                title: Error
                type: object
                description: ''
                properties:
                  type:
                    type: string
                    description: URL to a document describing the error condition.
                  status:
                    type: integer
                    description: >-
                      Transmission of the HTTP status code so that all
                      information can be found in one place, but also to correct
                      changes in the status code due to the use of proxy
                      servers.
                  title:
                    type: string
                    description: >-
                      A short, human-readable title for the general error type;
                      the title should not change for given types.
                  detail:
                    type: string
                    description: A human-readable description of the specific error.
                  instance:
                    type: string
                    description: >-
                      This optional key may be present, with a unique URI for
                      the specific error; this will often point to an error log
                      for that specific response.
                  request_id:
                    type: string
                    description: Correlation ID for the original request.
                required:
                  - type
                  - status
                additionalProperties: false
              example:
                status: 503
                type: method_not_allowed
        '504':
          description: >-
            Gateway Timeout. The service gateway has reached its internal
            timeout.
          headers:
            upvest-request-id:
              required: true
              schema:
                type: string
                format: uuid
                example: 169ae4c7-ebd7-4041-94da-25369653eba7
          content:
            application/problem+json:
              schema:
                title: Error
                type: object
                description: ''
                properties:
                  type:
                    type: string
                    description: URL to a document describing the error condition.
                  status:
                    type: integer
                    description: >-
                      Transmission of the HTTP status code so that all
                      information can be found in one place, but also to correct
                      changes in the status code due to the use of proxy
                      servers.
                  title:
                    type: string
                    description: >-
                      A short, human-readable title for the general error type;
                      the title should not change for given types.
                  detail:
                    type: string
                    description: A human-readable description of the specific error.
                  instance:
                    type: string
                    description: >-
                      This optional key may be present, with a unique URI for
                      the specific error; this will often point to an error log
                      for that specific response.
                  request_id:
                    type: string
                    description: Correlation ID for the original request.
                required:
                  - type
                  - status
                additionalProperties: false
              example:
                status: 504
                type: gateway_timeout
  /accounts/{account_id}/valuations/current:
    parameters:
      - name: account_id
        in: path
        required: true
        schema:
          title: Account unique identifier.
          type: string
          description: Account unique identifier.
          format: uuid
      - name: upvest-client-id
        in: header
        description: Tenant Client ID
        required: true
        schema:
          type: string
          format: uuid
          example: ebabcf4d-61c3-4942-875c-e265a7c2d062
      - name: authorization
        in: header
        description: |
          Bearer (access) token from the OAuth flow with correct scopes.
          https://datatracker.ietf.org/doc/html/rfc6750
        required: true
        schema:
          type: string
          pattern: ^Bearer [a-zA-Z0-9\-\._~+/]*=*
          example: Bearer c2VjcmV0Cg==
      - name: signature
        in: header
        required: true
        schema:
          type: string
        description: >-
          https://tools.ietf.org/id/draft-ietf-httpbis-message-signatures-01.html#name-the-signature-http-header
      - name: signature-input
        in: header
        required: true
        schema:
          type: string
        description: >-
          https://tools.ietf.org/id/draft-ietf-httpbis-message-signatures-01.html#name-the-signature-input-http-he
      - name: upvest-api-version
        in: header
        required: false
        schema:
          type: string
          enum:
            - '1'
          default: '1'
          example: '1'
        description: 'Upvest API version (Note: Do not include quotation marks)'
    get:
      operationId: get_account_valuation
      summary: Get current valuation for an account
      description: Get current valuation for an account
      tags:
        - Valuations
      security:
        - oauth-client-credentials:
            - valuations:read
      parameters:
        - name: price_quality
          in: query
          required: true
          schema:
            type: string
            enum:
              - EOD
              - HIGHEST_AVAILABLE
            description: Defines the quality of the price used in the valuation.
      responses:
        '200':
          description: Valuations
          headers:
            upvest-request-id:
              required: true
              schema:
                type: string
                format: uuid
                example: 169ae4c7-ebd7-4041-94da-25369653eba7
          content:
            application/json:
              schema:
                title: Account Valuation
                type: object
                properties:
                  id:
                    title: Account valuation unique identifier
                    description: Account valuation unique identifier.
                    type: string
                    format: uuid
                  created_at:
                    type: string
                    format: date-time
                    description: >-
                      Date and time when the resource was created. [RFC
                      3339-5](https://datatracker.ietf.org/doc/html/rfc3339#section-5.6),
                      [ISO8601
                      UTC](https://www.iso.org/iso-8601-date-and-time-format.html)
                  updated_at:
                    type: string
                    format: date-time
                    description: >-
                      Date and time when the resource was last updated. [RFC
                      3339-5](https://datatracker.ietf.org/doc/html/rfc3339#section-5.6),
                      [ISO8601
                      UTC](https://www.iso.org/iso-8601-date-and-time-format.html)
                  account_id:
                    title: Account unique identifier.
                    type: string
                    description: Account unique identifier.
                    format: uuid
                  total_security_value:
                    title: Total security value
                    description: >-
                      Entity representing the monetary value by amount and
                      currency.
                    type: object
                    properties:
                      amount:
                        type: string
                        pattern: ^[0-9]{0,63}(\.[0-9]{1,2})?$
                      currency:
                        type: string
                        description: >-
                          Alphabetic three-letter [ISO
                          4217](https://en.wikipedia.org/wiki/ISO_4217) currency
                          code.

                          * EUR - Euro
                        enum:
                          - EUR
                        default: EUR
                    required:
                      - amount
                      - currency
                    additionalProperties: false
                  price_quality:
                    type: string
                    description: |-
                      The requested price quality.
                      * EOD - End of day prices
                      * HIGHEST_AVAILABLE - The most recent available prices
                    enum:
                      - EOD
                      - HIGHEST_AVAILABLE
                  security_positions:
                    type: array
                    description: Positions associated with this account valuation.
                    items:
                      title: Account valuation security position
                      type: object
                      properties:
                        instrument:
                          title: Instrument
                          description: Entity representing the financial instrument.
                          type: object
                          properties:
                            uuid:
                              description: >-
                                String representing the instrument internal
                                identifier.
                              type: string
                              format: uuid
                            isin:
                              title: International securities identification number
                              type: string
                              description: >-
                                International securities identification number
                                defined by [ISO
                                6166](https://en.wikipedia.org/wiki/International_Securities_Identification_Number).
                              pattern: ^[A-Z]{2}[A-Z0-9]{9}[0-9]$
                          required:
                            - uuid
                          additionalProperties: false
                        quantity:
                          allOf:
                            - type: string
                              pattern: ^-?[0-9]{0,63}(\.[0-9]{1,10})?$
                            - description: >-
                                Total quantity of the instrument (10 decimal
                                places).
                        value:
                          nullable: true
                          allOf:
                            - title: Security position value
                              description: >-
                                Entity representing the monetary value by amount
                                and currency, and the time of the price used.
                              type: object
                              properties:
                                amount:
                                  type: string
                                  pattern: ^[0-9]{0,63}(\.[0-9]{1,2})?$
                                currency:
                                  type: string
                                  description: >-
                                    Alphabetic three-letter [ISO
                                    4217](https://en.wikipedia.org/wiki/ISO_4217)
                                    currency code.

                                    * EUR - Euro
                                  enum:
                                    - EUR
                                  default: EUR
                                price_time:
                                  type: string
                                  format: date-time
                                  description: >-
                                    The date and time of the price used for the
                                    calculation. [RFC
                                    3339-5](https://datatracker.ietf.org/doc/html/rfc3339#section-5.6),
                                    [ISO8601
                                    UTC](https://www.iso.org/iso-8601-date-and-time-format.html)
                              required:
                                - amount
                                - currency
                                - price_time
                              additionalProperties: false
                            - nullable: true
                        weight:
                          nullable: true
                          allOf:
                            - type: string
                              pattern: ^-?[0-9]{0,63}(\.[0-9]{1,10})?$
                            - description: >-
                                Total weight of the instrument (10 decimal
                                places).
                        price_quality:
                          type: string
                          description: >-
                            The price quality used for the calculation of the
                            value of the position.

                            * EOD - end of day price

                            * REALTIME - realtime price

                            * DELAYED - delayed price

                            * NA - no available price
                          enum:
                            - EOD
                            - REALTIME
                            - DELAYED
                            - NA
                      required:
                        - instrument
                        - quantity
                        - value
                        - weight
                      additionalProperties: false
                  valuation_time:
                    type: string
                    format: date-time
                    description: >-
                      Date and time as of which the value was calculated. [RFC
                      3339-5](https://datatracker.ietf.org/doc/html/rfc3339#section-5.6),
                      [ISO8601
                      UTC](https://www.iso.org/iso-8601-date-and-time-format.html)
                required:
                  - id
                  - account_id
                  - created_at
                  - updated_at
                  - valuation_time
                  - total_security_value
                  - price_quality
                additionalProperties: false
              example:
                id: 404b170a-9042-11ed-9a51-2eabd0c03f8a
                created_at: '2023-01-10T14:15:22Z'
                updated_at: '2023-01-10T14:15:22Z'
                valuation_time: '2023-01-10T14:15:22Z'
                account_id: 51cdc0cc-9042-11ed-b017-2eabd0c03f8a
                price_quality: EOD
                total_security_value:
                  amount: '142.29'
                  currency: EUR
                security_positions:
                  - instrument:
                      uuid: 123e4567-e89b-12d3-a456-426614174000
                      isin: DE0007664005
                    value:
                      amount: '104.81'
                      currency: EUR
                      price_time: '2023-01-09'
                    quantity: '0.65'
                    weight: '0.736595'
                    price_quality: EOD
                  - instrument:
                      uuid: 48b798b7-3a62-4f30-8307-ee94d35b21b7
                      isin: FR0010524777
                    value:
                      amount: '37.48'
                      currency: EUR
                      price_time: '2023-01-09'
                    quantity: '1.00'
                    weight: '0.263405'
                    price_quality: EOD
                  - instrument:
                      uuid: 7499ccf8-6fa5-43ef-af9e-dd062e10ab59
                      isin: SE0019889775
                    quantity: '5.00'
                    value: null
                    weight: null
                    price_quality: NA
        '400':
          description: Bad Request. The incoming request had a malformed parameter/object.
          headers:
            upvest-request-id:
              required: true
              schema:
                type: string
                format: uuid
                example: 169ae4c7-ebd7-4041-94da-25369653eba7
          content:
            application/problem+json:
              schema:
                title: Error
                type: object
                description: ''
                properties:
                  type:
                    type: string
                    description: URL to a document describing the error condition.
                  status:
                    type: integer
                    description: >-
                      Transmission of the HTTP status code so that all
                      information can be found in one place, but also to correct
                      changes in the status code due to the use of proxy
                      servers.
                  title:
                    type: string
                    description: >-
                      A short, human-readable title for the general error type;
                      the title should not change for given types.
                  detail:
                    type: string
                    description: A human-readable description of the specific error.
                  instance:
                    type: string
                    description: >-
                      This optional key may be present, with a unique URI for
                      the specific error; this will often point to an error log
                      for that specific response.
                  request_id:
                    type: string
                    description: Correlation ID for the original request.
                required:
                  - type
                  - status
                additionalProperties: false
              example:
                status: 400
                type: bad_request
        '401':
          description: Unauthorized. The caller has not been authenticated.
          headers:
            upvest-request-id:
              required: true
              schema:
                type: string
                format: uuid
                example: 169ae4c7-ebd7-4041-94da-25369653eba7
          content:
            application/problem+json:
              schema:
                title: Error
                type: object
                description: ''
                properties:
                  type:
                    type: string
                    description: URL to a document describing the error condition.
                  status:
                    type: integer
                    description: >-
                      Transmission of the HTTP status code so that all
                      information can be found in one place, but also to correct
                      changes in the status code due to the use of proxy
                      servers.
                  title:
                    type: string
                    description: >-
                      A short, human-readable title for the general error type;
                      the title should not change for given types.
                  detail:
                    type: string
                    description: A human-readable description of the specific error.
                  instance:
                    type: string
                    description: >-
                      This optional key may be present, with a unique URI for
                      the specific error; this will often point to an error log
                      for that specific response.
                  request_id:
                    type: string
                    description: Correlation ID for the original request.
                required:
                  - type
                  - status
                additionalProperties: false
              example:
                status: 401
                type: unauthorized
        '403':
          description: >-
            Forbidden. The caller has been authenticated but is not allowed to
            take the requested action.
          headers:
            upvest-request-id:
              required: true
              schema:
                type: string
                format: uuid
                example: 169ae4c7-ebd7-4041-94da-25369653eba7
          content:
            application/problem+json:
              schema:
                title: Error
                type: object
                description: ''
                properties:
                  type:
                    type: string
                    description: URL to a document describing the error condition.
                  status:
                    type: integer
                    description: >-
                      Transmission of the HTTP status code so that all
                      information can be found in one place, but also to correct
                      changes in the status code due to the use of proxy
                      servers.
                  title:
                    type: string
                    description: >-
                      A short, human-readable title for the general error type;
                      the title should not change for given types.
                  detail:
                    type: string
                    description: A human-readable description of the specific error.
                  instance:
                    type: string
                    description: >-
                      This optional key may be present, with a unique URI for
                      the specific error; this will often point to an error log
                      for that specific response.
                  request_id:
                    type: string
                    description: Correlation ID for the original request.
                required:
                  - type
                  - status
                additionalProperties: false
              example:
                status: 403
                type: forbidden
        '404':
          description: Not Found. The requested resource could not be found.
          headers:
            upvest-request-id:
              required: true
              schema:
                type: string
                format: uuid
                example: 169ae4c7-ebd7-4041-94da-25369653eba7
          content:
            application/problem+json:
              schema:
                title: Error
                type: object
                description: ''
                properties:
                  type:
                    type: string
                    description: URL to a document describing the error condition.
                  status:
                    type: integer
                    description: >-
                      Transmission of the HTTP status code so that all
                      information can be found in one place, but also to correct
                      changes in the status code due to the use of proxy
                      servers.
                  title:
                    type: string
                    description: >-
                      A short, human-readable title for the general error type;
                      the title should not change for given types.
                  detail:
                    type: string
                    description: A human-readable description of the specific error.
                  instance:
                    type: string
                    description: >-
                      This optional key may be present, with a unique URI for
                      the specific error; this will often point to an error log
                      for that specific response.
                  request_id:
                    type: string
                    description: Correlation ID for the original request.
                required:
                  - type
                  - status
                additionalProperties: false
              example:
                status: 404
                type: not_found
        '406':
          description: >-
            Not Acceptable. The resource does not have a current representation
            that would be acceptable to the user agent. "Accept" header defined
            unsupported value.
          headers:
            upvest-request-id:
              required: true
              schema:
                type: string
                format: uuid
                example: 169ae4c7-ebd7-4041-94da-25369653eba7
          content:
            application/problem+json:
              schema:
                title: Error
                type: object
                description: ''
                properties:
                  type:
                    type: string
                    description: URL to a document describing the error condition.
                  status:
                    type: integer
                    description: >-
                      Transmission of the HTTP status code so that all
                      information can be found in one place, but also to correct
                      changes in the status code due to the use of proxy
                      servers.
                  title:
                    type: string
                    description: >-
                      A short, human-readable title for the general error type;
                      the title should not change for given types.
                  detail:
                    type: string
                    description: A human-readable description of the specific error.
                  instance:
                    type: string
                    description: >-
                      This optional key may be present, with a unique URI for
                      the specific error; this will often point to an error log
                      for that specific response.
                  request_id:
                    type: string
                    description: Correlation ID for the original request.
                required:
                  - type
                  - status
                additionalProperties: false
              example:
                status: 406
                type: not_acceptable
        '429':
          description: >-
            Too Many Requests. The caller has exceeded their quota for the time
            period and has been throttled.
          headers:
            upvest-request-id:
              required: true
              schema:
                type: string
                format: uuid
                example: 169ae4c7-ebd7-4041-94da-25369653eba7
          content:
            application/problem+json:
              schema:
                title: Error
                type: object
                description: ''
                properties:
                  type:
                    type: string
                    description: URL to a document describing the error condition.
                  status:
                    type: integer
                    description: >-
                      Transmission of the HTTP status code so that all
                      information can be found in one place, but also to correct
                      changes in the status code due to the use of proxy
                      servers.
                  title:
                    type: string
                    description: >-
                      A short, human-readable title for the general error type;
                      the title should not change for given types.
                  detail:
                    type: string
                    description: A human-readable description of the specific error.
                  instance:
                    type: string
                    description: >-
                      This optional key may be present, with a unique URI for
                      the specific error; this will often point to an error log
                      for that specific response.
                  request_id:
                    type: string
                    description: Correlation ID for the original request.
                required:
                  - type
                  - status
                additionalProperties: false
              example:
                status: 429
                type: too_many_requests
        '500':
          description: Internal Server Error. The service encountered an unexpected error.
          headers:
            upvest-request-id:
              required: true
              schema:
                type: string
                format: uuid
                example: 169ae4c7-ebd7-4041-94da-25369653eba7
          content:
            application/problem+json:
              schema:
                title: Error
                type: object
                description: ''
                properties:
                  type:
                    type: string
                    description: URL to a document describing the error condition.
                  status:
                    type: integer
                    description: >-
                      Transmission of the HTTP status code so that all
                      information can be found in one place, but also to correct
                      changes in the status code due to the use of proxy
                      servers.
                  title:
                    type: string
                    description: >-
                      A short, human-readable title for the general error type;
                      the title should not change for given types.
                  detail:
                    type: string
                    description: A human-readable description of the specific error.
                  instance:
                    type: string
                    description: >-
                      This optional key may be present, with a unique URI for
                      the specific error; this will often point to an error log
                      for that specific response.
                  request_id:
                    type: string
                    description: Correlation ID for the original request.
                required:
                  - type
                  - status
                additionalProperties: false
              example:
                status: 500
                type: internal_server_error
        '503':
          description: >-
            Service Unavailable. The service handling for this request cannot be
            reached at this time.
          headers:
            upvest-request-id:
              required: true
              schema:
                type: string
                format: uuid
                example: 169ae4c7-ebd7-4041-94da-25369653eba7
          content:
            application/problem+json:
              schema:
                title: Error
                type: object
                description: ''
                properties:
                  type:
                    type: string
                    description: URL to a document describing the error condition.
                  status:
                    type: integer
                    description: >-
                      Transmission of the HTTP status code so that all
                      information can be found in one place, but also to correct
                      changes in the status code due to the use of proxy
                      servers.
                  title:
                    type: string
                    description: >-
                      A short, human-readable title for the general error type;
                      the title should not change for given types.
                  detail:
                    type: string
                    description: A human-readable description of the specific error.
                  instance:
                    type: string
                    description: >-
                      This optional key may be present, with a unique URI for
                      the specific error; this will often point to an error log
                      for that specific response.
                  request_id:
                    type: string
                    description: Correlation ID for the original request.
                required:
                  - type
                  - status
                additionalProperties: false
              example:
                status: 503
                type: method_not_allowed
        '504':
          description: >-
            Gateway Timeout. The service gateway has reached its internal
            timeout.
          headers:
            upvest-request-id:
              required: true
              schema:
                type: string
                format: uuid
                example: 169ae4c7-ebd7-4041-94da-25369653eba7
          content:
            application/problem+json:
              schema:
                title: Error
                type: object
                description: ''
                properties:
                  type:
                    type: string
                    description: URL to a document describing the error condition.
                  status:
                    type: integer
                    description: >-
                      Transmission of the HTTP status code so that all
                      information can be found in one place, but also to correct
                      changes in the status code due to the use of proxy
                      servers.
                  title:
                    type: string
                    description: >-
                      A short, human-readable title for the general error type;
                      the title should not change for given types.
                  detail:
                    type: string
                    description: A human-readable description of the specific error.
                  instance:
                    type: string
                    description: >-
                      This optional key may be present, with a unique URI for
                      the specific error; this will often point to an error log
                      for that specific response.
                  request_id:
                    type: string
                    description: Correlation ID for the original request.
                required:
                  - type
                  - status
                additionalProperties: false
              example:
                status: 504
                type: gateway_timeout
  /accounts/{account_id}/valuations:
    parameters:
      - name: account_id
        in: path
        required: true
        schema:
          title: Account unique identifier.
          type: string
          description: Account unique identifier.
          format: uuid
      - name: upvest-client-id
        in: header
        description: Tenant Client ID
        required: true
        schema:
          type: string
          format: uuid
          example: ebabcf4d-61c3-4942-875c-e265a7c2d062
      - name: authorization
        in: header
        description: |
          Bearer (access) token from the OAuth flow with correct scopes.
          https://datatracker.ietf.org/doc/html/rfc6750
        required: true
        schema:
          type: string
          pattern: ^Bearer [a-zA-Z0-9\-\._~+/]*=*
          example: Bearer c2VjcmV0Cg==
      - name: signature
        in: header
        required: true
        schema:
          type: string
        description: >-
          https://tools.ietf.org/id/draft-ietf-httpbis-message-signatures-01.html#name-the-signature-http-header
      - name: signature-input
        in: header
        required: true
        schema:
          type: string
        description: >-
          https://tools.ietf.org/id/draft-ietf-httpbis-message-signatures-01.html#name-the-signature-input-http-he
      - name: upvest-api-version
        in: header
        required: false
        schema:
          type: string
          enum:
            - '1'
          default: '1'
          example: '1'
        description: 'Upvest API version (Note: Do not include quotation marks)'
    get:
      operationId: list_account_valuation_history
      summary: List valuation history for an account
      description: List valuation history for an account
      tags:
        - Valuations
      security:
        - oauth-client-credentials:
            - valuations:read
      parameters:
        - name: start_date
          in: query
          required: false
          schema:
            type: string
            format: date
            title: Date in YYYY-MM-DD format. RFC 3339, section 5.6
            description: >-
              Returns account valuations starting from and including this date
              (UTC)
          example: '2023-01-03'
        - name: end_date
          in: query
          required: false
          schema:
            type: string
            format: date
            title: Date in YYYY-MM-DD format. RFC 3339, section 5.6
            description: Returns account valuations up until this date (UTC)
          example: '2023-01-11'
        - name: sort
          in: query
          required: false
          schema:
            type: string
            enum:
              - valuation_time
            default: valuation_time
          description: Sort the result by `valuation_time`.
        - name: order
          in: query
          required: false
          schema:
            type: string
            enum:
              - ASC
              - DESC
            default: ASC
          description: >-
            Sort order of the result list if the `sort` parameter is specified.
            Use `ASC` for ascending or `DESC` for descending sort order.
        - name: offset
          in: query
          schema:
            type: integer
            minimum: 0
            format: int32
          allowEmptyValue: true
          description: >-
            Use the `offset` argument to specify where in the list of results to
            start when returning items for a particular query.
        - name: limit
          in: query
          schema:
            type: integer
            format: int32
            default: 100
            minimum: 0
            maximum: 1000
          allowEmptyValue: true
          description: >-
            Use the `limit` argument to specify the maximum number of items
            returned.
      responses:
        '200':
          description: Valuations
          headers:
            upvest-request-id:
              required: true
              schema:
                type: string
                format: uuid
                example: 169ae4c7-ebd7-4041-94da-25369653eba7
          content:
            application/json:
              schema:
                title: Account Valuation - List - Response
                type: object
                properties:
                  meta:
                    type: object
                    properties:
                      offset:
                        type: integer
                        description: Amount of resource to offset in the response.
                      limit:
                        type: integer
                        description: Total limit of the response.
                      count:
                        type: integer
                        description: Count of the resources returned in the response.
                      total_count:
                        type: integer
                        description: Total count of all the resources.
                      sort:
                        type: string
                        description: The field that the list is sorted by.
                      order:
                        type: string
                        description: |-
                          The ordering of the response.
                          * ASC - Ascending order
                          * DESC - Descending order
                        enum:
                          - ASC
                          - DESC
                    required:
                      - offset
                      - limit
                      - count
                      - total_count
                  data:
                    type: array
                    items:
                      title: Account Valuation
                      type: object
                      properties:
                        id:
                          title: Account valuation unique identifier
                          description: Account valuation unique identifier.
                          type: string
                          format: uuid
                        created_at:
                          type: string
                          format: date-time
                          description: >-
                            Date and time when the resource was created. [RFC
                            3339-5](https://datatracker.ietf.org/doc/html/rfc3339#section-5.6),
                            [ISO8601
                            UTC](https://www.iso.org/iso-8601-date-and-time-format.html)
                        updated_at:
                          type: string
                          format: date-time
                          description: >-
                            Date and time when the resource was last updated.
                            [RFC
                            3339-5](https://datatracker.ietf.org/doc/html/rfc3339#section-5.6),
                            [ISO8601
                            UTC](https://www.iso.org/iso-8601-date-and-time-format.html)
                        account_id:
                          title: Account unique identifier.
                          type: string
                          description: Account unique identifier.
                          format: uuid
                        total_security_value:
                          title: Total security value
                          description: >-
                            Entity representing the monetary value by amount and
                            currency.
                          type: object
                          properties:
                            amount:
                              type: string
                              pattern: ^[0-9]{0,63}(\.[0-9]{1,2})?$
                            currency:
                              type: string
                              description: >-
                                Alphabetic three-letter [ISO
                                4217](https://en.wikipedia.org/wiki/ISO_4217)
                                currency code.

                                * EUR - Euro
                              enum:
                                - EUR
                              default: EUR
                          required:
                            - amount
                            - currency
                          additionalProperties: false
                        price_quality:
                          type: string
                          description: >-
                            The requested price quality.

                            * EOD - End of day prices

                            * HIGHEST_AVAILABLE - The most recent available
                            prices
                          enum:
                            - EOD
                            - HIGHEST_AVAILABLE
                        security_positions:
                          type: array
                          description: Positions associated with this account valuation.
                          items:
                            title: Account valuation security position
                            type: object
                            properties:
                              instrument:
                                title: Instrument
                                description: Entity representing the financial instrument.
                                type: object
                                properties:
                                  uuid:
                                    description: >-
                                      String representing the instrument
                                      internal identifier.
                                    type: string
                                    format: uuid
                                  isin:
                                    title: >-
                                      International securities identification
                                      number
                                    type: string
                                    description: >-
                                      International securities identification
                                      number defined by [ISO
                                      6166](https://en.wikipedia.org/wiki/International_Securities_Identification_Number).
                                    pattern: ^[A-Z]{2}[A-Z0-9]{9}[0-9]$
                                required:
                                  - uuid
                                additionalProperties: false
                              quantity:
                                allOf:
                                  - type: string
                                    pattern: ^-?[0-9]{0,63}(\.[0-9]{1,10})?$
                                  - description: >-
                                      Total quantity of the instrument (10
                                      decimal places).
                              value:
                                nullable: true
                                allOf:
                                  - title: Security position value
                                    description: >-
                                      Entity representing the monetary value by
                                      amount and currency, and the time of the
                                      price used.
                                    type: object
                                    properties:
                                      amount:
                                        type: string
                                        pattern: ^[0-9]{0,63}(\.[0-9]{1,2})?$
                                      currency:
                                        type: string
                                        description: >-
                                          Alphabetic three-letter [ISO
                                          4217](https://en.wikipedia.org/wiki/ISO_4217)
                                          currency code.

                                          * EUR - Euro
                                        enum:
                                          - EUR
                                        default: EUR
                                      price_time:
                                        type: string
                                        format: date-time
                                        description: >-
                                          The date and time of the price used for
                                          the calculation. [RFC
                                          3339-5](https://datatracker.ietf.org/doc/html/rfc3339#section-5.6),
                                          [ISO8601
                                          UTC](https://www.iso.org/iso-8601-date-and-time-format.html)
                                    required:
                                      - amount
                                      - currency
                                      - price_time
                                    additionalProperties: false
                                  - nullable: true
                              weight:
                                nullable: true
                                allOf:
                                  - type: string
                                    pattern: ^-?[0-9]{0,63}(\.[0-9]{1,10})?$
                                  - description: >-
                                      Total weight of the instrument (10 decimal
                                      places).
                              price_quality:
                                type: string
                                description: >-
                                  The price quality used for the calculation of
                                  the value of the position.

                                  * EOD - end of day price

                                  * REALTIME - realtime price

                                  * DELAYED - delayed price

                                  * NA - no available price
                                enum:
                                  - EOD
                                  - REALTIME
                                  - DELAYED
                                  - NA
                            required:
                              - instrument
                              - quantity
                              - value
                              - weight
                            additionalProperties: false
                        valuation_time:
                          type: string
                          format: date-time
                          description: >-
                            Date and time as of which the value was calculated.
                            [RFC
                            3339-5](https://datatracker.ietf.org/doc/html/rfc3339#section-5.6),
                            [ISO8601
                            UTC](https://www.iso.org/iso-8601-date-and-time-format.html)
                      required:
                        - id
                        - account_id
                        - created_at
                        - updated_at
                        - valuation_time
                        - total_security_value
                        - price_quality
                      additionalProperties: false
                required:
                  - meta
                  - data
                additionalProperties: false
              example:
                meta:
                  offset: 0
                  limit: 100
                  count: 3
                  total_count: 3
                  sort: created_at
                  order: ASC
                data:
                  - id: 404b170a-9042-11ed-9a51-2eabd0c03f8a
                    created_at: '2023-01-10T14:15:22Z'
                    updated_at: '2023-01-10T14:15:22Z'
                    valuation_time: '2023-01-10T14:15:22Z'
                    account_id: 51cdc0cc-9042-11ed-b017-2eabd0c03f8a
                    price_quality: EOD
                    total_security_value:
                      amount: '142.29'
                      currency: EUR
                    security_positions:
                      - instrument:
                          uuid: 123e4567-e89b-12d3-a456-426614174000
                          isin: DE0007664005
                        value:
                          amount: '104.81'
                          currency: EUR
                          price_time: '2023-01-09'
                        quantity: '0.65'
                        weight: '0.736595'
                      - instrument:
                          uuid: 48b798b7-3a62-4f30-8307-ee94d35b21b7
                          isin: FR0010524777
                        value:
                          amount: '37.48'
                          currency: EUR
                          price_time: '2023-01-09'
                        quantity: '1.00'
                        weight: '0.263405'
                      - instrument:
                          uuid: 7499ccf8-6fa5-43ef-af9e-dd062e10ab59
                          isin: SE0019889775
                        quantity: '5.00'
                        value: null
                        weight: null
                  - id: adfbf024-3d31-11ef-b99b-2eabd0c03f8a
                    created_at: '2023-01-11T14:15:22Z'
                    updated_at: '2023-01-11T14:15:22Z'
                    valuation_time: '2023-01-11T14:15:22Z'
                    account_id: 51cdc0cc-9042-11ed-b017-2eabd0c03f8a
                    price_quality: EOD
                    total_security_value:
                      amount: '104.81'
                      currency: EUR
                    security_positions:
                      - instrument:
                          uuid: 123e4567-e89b-12d3-a456-426614174000
                          isin: DE0007664005
                        value:
                          amount: '104.81'
                          currency: EUR
                          price_time: '2023-01-10'
                        quantity: '0.65'
                        weight: '1'
                  - id: be38000e-3d31-11ef-ac4e-2eabd0c03f8a
                    created_at: '2023-01-12T14:15:22Z'
                    updated_at: '2023-01-12T14:15:22Z'
                    valuation_time: '2023-01-12T14:15:22Z'
                    account_id: 51cdc0cc-9042-11ed-b017-2eabd0c03f8a
                    price_quality: EOD
                    total_security_value:
                      amount: '0'
                      currency: EUR
                    security_positions: []
        '400':
          description: Bad Request. The incoming request had a malformed parameter/object.
          headers:
            upvest-request-id:
              required: true
              schema:
                type: string
                format: uuid
                example: 169ae4c7-ebd7-4041-94da-25369653eba7
          content:
            application/problem+json:
              schema:
                title: Error
                type: object
                description: ''
                properties:
                  type:
                    type: string
                    description: URL to a document describing the error condition.
                  status:
                    type: integer
                    description: >-
                      Transmission of the HTTP status code so that all
                      information can be found in one place, but also to correct
                      changes in the status code due to the use of proxy
                      servers.
                  title:
                    type: string
                    description: >-
                      A short, human-readable title for the general error type;
                      the title should not change for given types.
                  detail:
                    type: string
                    description: A human-readable description of the specific error.
                  instance:
                    type: string
                    description: >-
                      This optional key may be present, with a unique URI for
                      the specific error; this will often point to an error log
                      for that specific response.
                  request_id:
                    type: string
                    description: Correlation ID for the original request.
                required:
                  - type
                  - status
                additionalProperties: false
              example:
                status: 400
                type: bad_request
        '401':
          description: Unauthorized. The caller has not been authenticated.
          headers:
            upvest-request-id:
              required: true
              schema:
                type: string
                format: uuid
                example: 169ae4c7-ebd7-4041-94da-25369653eba7
          content:
            application/problem+json:
              schema:
                title: Error
                type: object
                description: ''
                properties:
                  type:
                    type: string
                    description: URL to a document describing the error condition.
                  status:
                    type: integer
                    description: >-
                      Transmission of the HTTP status code so that all
                      information can be found in one place, but also to correct
                      changes in the status code due to the use of proxy
                      servers.
                  title:
                    type: string
                    description: >-
                      A short, human-readable title for the general error type;
                      the title should not change for given types.
                  detail:
                    type: string
                    description: A human-readable description of the specific error.
                  instance:
                    type: string
                    description: >-
                      This optional key may be present, with a unique URI for
                      the specific error; this will often point to an error log
                      for that specific response.
                  request_id:
                    type: string
                    description: Correlation ID for the original request.
                required:
                  - type
                  - status
                additionalProperties: false
              example:
                status: 401
                type: unauthorized
        '403':
          description: >-
            Forbidden. The caller has been authenticated but is not allowed to
            take the requested action.
          headers:
            upvest-request-id:
              required: true
              schema:
                type: string
                format: uuid
                example: 169ae4c7-ebd7-4041-94da-25369653eba7
          content:
            application/problem+json:
              schema:
                title: Error
                type: object
                description: ''
                properties:
                  type:
                    type: string
                    description: URL to a document describing the error condition.
                  status:
                    type: integer
                    description: >-
                      Transmission of the HTTP status code so that all
                      information can be found in one place, but also to correct
                      changes in the status code due to the use of proxy
                      servers.
                  title:
                    type: string
                    description: >-
                      A short, human-readable title for the general error type;
                      the title should not change for given types.
                  detail:
                    type: string
                    description: A human-readable description of the specific error.
                  instance:
                    type: string
                    description: >-
                      This optional key may be present, with a unique URI for
                      the specific error; this will often point to an error log
                      for that specific response.
                  request_id:
                    type: string
                    description: Correlation ID for the original request.
                required:
                  - type
                  - status
                additionalProperties: false
              example:
                status: 403
                type: forbidden
        '404':
          description: Not Found. The requested resource could not be found.
          headers:
            upvest-request-id:
              required: true
              schema:
                type: string
                format: uuid
                example: 169ae4c7-ebd7-4041-94da-25369653eba7
          content:
            application/problem+json:
              schema:
                title: Error
                type: object
                description: ''
                properties:
                  type:
                    type: string
                    description: URL to a document describing the error condition.
                  status:
                    type: integer
                    description: >-
                      Transmission of the HTTP status code so that all
                      information can be found in one place, but also to correct
                      changes in the status code due to the use of proxy
                      servers.
                  title:
                    type: string
                    description: >-
                      A short, human-readable title for the general error type;
                      the title should not change for given types.
                  detail:
                    type: string
                    description: A human-readable description of the specific error.
                  instance:
                    type: string
                    description: >-
                      This optional key may be present, with a unique URI for
                      the specific error; this will often point to an error log
                      for that specific response.
                  request_id:
                    type: string
                    description: Correlation ID for the original request.
                required:
                  - type
                  - status
                additionalProperties: false
              example:
                status: 404
                type: not_found
        '405':
          description: >-
            Method Not Allowed. The requested method is not allowed on the
            requested resource.
          headers:
            upvest-request-id:
              required: true
              schema:
                type: string
                format: uuid
                example: 169ae4c7-ebd7-4041-94da-25369653eba7
          content:
            application/problem+json:
              schema:
                title: Error
                type: object
                description: ''
                properties:
                  type:
                    type: string
                    description: URL to a document describing the error condition.
                  status:
                    type: integer
                    description: >-
                      Transmission of the HTTP status code so that all
                      information can be found in one place, but also to correct
                      changes in the status code due to the use of proxy
                      servers.
                  title:
                    type: string
                    description: >-
                      A short, human-readable title for the general error type;
                      the title should not change for given types.
                  detail:
                    type: string
                    description: A human-readable description of the specific error.
                  instance:
                    type: string
                    description: >-
                      This optional key may be present, with a unique URI for
                      the specific error; this will often point to an error log
                      for that specific response.
                  request_id:
                    type: string
                    description: Correlation ID for the original request.
                required:
                  - type
                  - status
                additionalProperties: false
              example:
                status: 405
                type: method_not_allowed
        '406':
          description: >-
            Not Acceptable. The resource does not have a current representation
            that would be acceptable to the user agent. "Accept" header defined
            unsupported value.
          headers:
            upvest-request-id:
              required: true
              schema:
                type: string
                format: uuid
                example: 169ae4c7-ebd7-4041-94da-25369653eba7
          content:
            application/problem+json:
              schema:
                title: Error
                type: object
                description: ''
                properties:
                  type:
                    type: string
                    description: URL to a document describing the error condition.
                  status:
                    type: integer
                    description: >-
                      Transmission of the HTTP status code so that all
                      information can be found in one place, but also to correct
                      changes in the status code due to the use of proxy
                      servers.
                  title:
                    type: string
                    description: >-
                      A short, human-readable title for the general error type;
                      the title should not change for given types.
                  detail:
                    type: string
                    description: A human-readable description of the specific error.
                  instance:
                    type: string
                    description: >-
                      This optional key may be present, with a unique URI for
                      the specific error; this will often point to an error log
                      for that specific response.
                  request_id:
                    type: string
                    description: Correlation ID for the original request.
                required:
                  - type
                  - status
                additionalProperties: false
              example:
                status: 406
                type: not_acceptable
        '429':
          description: >-
            Too Many Requests. The caller has exceeded their quota for the time
            period and has been throttled.
          headers:
            upvest-request-id:
              required: true
              schema:
                type: string
                format: uuid
                example: 169ae4c7-ebd7-4041-94da-25369653eba7
          content:
            application/problem+json:
              schema:
                title: Error
                type: object
                description: ''
                properties:
                  type:
                    type: string
                    description: URL to a document describing the error condition.
                  status:
                    type: integer
                    description: >-
                      Transmission of the HTTP status code so that all
                      information can be found in one place, but also to correct
                      changes in the status code due to the use of proxy
                      servers.
                  title:
                    type: string
                    description: >-
                      A short, human-readable title for the general error type;
                      the title should not change for given types.
                  detail:
                    type: string
                    description: A human-readable description of the specific error.
                  instance:
                    type: string
                    description: >-
                      This optional key may be present, with a unique URI for
                      the specific error; this will often point to an error log
                      for that specific response.
                  request_id:
                    type: string
                    description: Correlation ID for the original request.
                required:
                  - type
                  - status
                additionalProperties: false
              example:
                status: 429
                type: too_many_requests
        '500':
          description: Internal Server Error. The service encountered an unexpected error.
          headers:
            upvest-request-id:
              required: true
              schema:
                type: string
                format: uuid
                example: 169ae4c7-ebd7-4041-94da-25369653eba7
          content:
            application/problem+json:
              schema:
                title: Error
                type: object
                description: ''
                properties:
                  type:
                    type: string
                    description: URL to a document describing the error condition.
                  status:
                    type: integer
                    description: >-
                      Transmission of the HTTP status code so that all
                      information can be found in one place, but also to correct
                      changes in the status code due to the use of proxy
                      servers.
                  title:
                    type: string
                    description: >-
                      A short, human-readable title for the general error type;
                      the title should not change for given types.
                  detail:
                    type: string
                    description: A human-readable description of the specific error.
                  instance:
                    type: string
                    description: >-
                      This optional key may be present, with a unique URI for
                      the specific error; this will often point to an error log
                      for that specific response.
                  request_id:
                    type: string
                    description: Correlation ID for the original request.
                required:
                  - type
                  - status
                additionalProperties: false
              example:
                status: 500
                type: internal_server_error
        '503':
          description: >-
            Service Unavailable. The service handling for this request cannot be
            reached at this time.
          headers:
            upvest-request-id:
              required: true
              schema:
                type: string
                format: uuid
                example: 169ae4c7-ebd7-4041-94da-25369653eba7
          content:
            application/problem+json:
              schema:
                title: Error
                type: object
                description: ''
                properties:
                  type:
                    type: string
                    description: URL to a document describing the error condition.
                  status:
                    type: integer
                    description: >-
                      Transmission of the HTTP status code so that all
                      information can be found in one place, but also to correct
                      changes in the status code due to the use of proxy
                      servers.
                  title:
                    type: string
                    description: >-
                      A short, human-readable title for the general error type;
                      the title should not change for given types.
                  detail:
                    type: string
                    description: A human-readable description of the specific error.
                  instance:
                    type: string
                    description: >-
                      This optional key may be present, with a unique URI for
                      the specific error; this will often point to an error log
                      for that specific response.
                  request_id:
                    type: string
                    description: Correlation ID for the original request.
                required:
                  - type
                  - status
                additionalProperties: false
              example:
                status: 503
                type: method_not_allowed
        '504':
          description: >-
            Gateway Timeout. The service gateway has reached its internal
            timeout.
          headers:
            upvest-request-id:
              required: true
              schema:
                type: string
                format: uuid
                example: 169ae4c7-ebd7-4041-94da-25369653eba7
          content:
            application/problem+json:
              schema:
                title: Error
                type: object
                description: ''
                properties:
                  type:
                    type: string
                    description: URL to a document describing the error condition.
                  status:
                    type: integer
                    description: >-
                      Transmission of the HTTP status code so that all
                      information can be found in one place, but also to correct
                      changes in the status code due to the use of proxy
                      servers.
                  title:
                    type: string
                    description: >-
                      A short, human-readable title for the general error type;
                      the title should not change for given types.
                  detail:
                    type: string
                    description: A human-readable description of the specific error.
                  instance:
                    type: string
                    description: >-
                      This optional key may be present, with a unique URI for
                      the specific error; this will often point to an error log
                      for that specific response.
                  request_id:
                    type: string
                    description: Correlation ID for the original request.
                required:
                  - type
                  - status
                additionalProperties: false
              example:
                status: 504
                type: gateway_timeout
  /transactions/cash:
    parameters:
      - name: upvest-client-id
        in: header
        description: Tenant Client ID
        required: true
        schema:
          type: string
          format: uuid
          example: ebabcf4d-61c3-4942-875c-e265a7c2d062
      - name: authorization
        in: header
        description: |
          Bearer (access) token from the OAuth flow with correct scopes.
          https://datatracker.ietf.org/doc/html/rfc6750
        required: true
        schema:
          type: string
          pattern: ^Bearer [a-zA-Z0-9\-\._~+/]*=*
          example: Bearer c2VjcmV0Cg==
      - name: signature
        in: header
        required: true
        schema:
          type: string
        description: >-
          https://tools.ietf.org/id/draft-ietf-httpbis-message-signatures-01.html#name-the-signature-http-header
      - name: signature-input
        in: header
        required: true
        schema:
          type: string
        description: >-
          https://tools.ietf.org/id/draft-ietf-httpbis-message-signatures-01.html#name-the-signature-input-http-he
      - name: upvest-api-version
        in: header
        required: false
        schema:
          type: string
          enum:
            - '1'
          default: '1'
          example: '1'
        description: 'Upvest API version (Note: Do not include quotation marks)'
    get:
      operationId: list_cash_transactions
      summary: List cash transactions
      description: List cash transactions
      tags:
        - Transactions
      security:
        - oauth-client-credentials:
            - transactions:read
      parameters:
        - name: account_group_id
          in: query
          required: false
          schema:
            title: Account group unique identifier.
            type: string
            description: Account group unique identifier.
            format: uuid
          description: >-
            Filters the list to show only transactions associated with a certain
            account group ID.
          example: 413715f2-5401-4b97-8055-034a6b879f8c
        - name: start_date
          in: query
          required: false
          schema:
            type: string
            format: date
            title: Date in YYYY-MM-DD format. RFC 3339, section 5.6
            description: Returns transactions starting from and including this date (UTC).
            example: '2023-01-03'
        - name: end_date
          in: query
          required: false
          schema:
            type: string
            format: date
            title: Date in YYYY-MM-DD format. RFC 3339, section 5.6
            description: Returns transactions up until this date (UTC)
            example: '2023-01-11'
        - name: sort
          in: query
          required: false
          schema:
            type: string
            enum:
              - booking_date
            default: booking_date
          description: Sort the result by `booking_date`.
        - name: order
          in: query
          required: false
          schema:
            type: string
            enum:
              - ASC
              - DESC
            default: ASC
          description: >-
            Sort order of the result list if the `sort` parameter is specified.
            Use `ASC` for ascending or `DESC` for descending sort order.
        - name: offset
          in: query
          schema:
            type: integer
            minimum: 0
            format: int32
          allowEmptyValue: true
          description: >-
            Use the `offset` argument to specify where in the list of results to
            start when returning items for a particular query.
        - name: limit
          in: query
          schema:
            type: integer
            format: int32
            default: 100
            minimum: 0
            maximum: 1000
          allowEmptyValue: true
          description: >-
            Use the `limit` argument to specify the maximum number of items
            returned.
      responses:
        '200':
          description: Cash Transactions
          headers:
            upvest-request-id:
              required: true
              schema:
                type: string
                format: uuid
                example: 169ae4c7-ebd7-4041-94da-25369653eba7
          content:
            application/json:
              schema:
                title: Cash transaction - List - Response
                type: object
                properties:
                  meta:
                    type: object
                    properties:
                      offset:
                        type: integer
                        description: Amount of resource to offset in the response.
                      limit:
                        type: integer
                        description: Total limit of the response.
                      count:
                        type: integer
                        description: Count of the resources returned in the response.
                      total_count:
                        type: integer
                        description: Total count of all the resources.
                      sort:
                        type: string
                        description: The field that the list is sorted by.
                      order:
                        type: string
                        description: |-
                          The ordering of the response.
                          * ASC - Ascending order
                          * DESC - Descending order
                        enum:
                          - ASC
                          - DESC
                    required:
                      - offset
                      - limit
                      - count
                      - total_count
                  data:
                    type: array
                    items:
                      title: Cash Transaction
                      type: object
                      properties:
                        account_group_id:
                          title: Account group unique identifier.
                          type: string
                          description: Account group unique identifier.
                          format: uuid
                        booking_date:
                          title: ' Transaction booking date'
                          type: string
                          description: ' Transaction booking date and time. [RFC 3339-5](https://datatracker.ietf.org/doc/html/rfc3339#section-5.6), [ISO8601 UTC](https://www.iso.org/iso-8601-date-and-time-format.html)'
                          format: date-time
                        created_at:
                          type: string
                          format: date-time
                          description: >-
                            Date and time when the resource was created. [RFC
                            3339-5](https://datatracker.ietf.org/doc/html/rfc3339#section-5.6),
                            [ISO8601
                            UTC](https://www.iso.org/iso-8601-date-and-time-format.html)
                        delta:
                          title: Cash transaction delta
                          description: Entity representing cash transaction delta.
                          type: object
                          properties:
                            amount:
                              type: string
                              pattern: ^-?[0-9]{1,9}(\.[0-9]{2})?$
                            currency:
                              type: string
                              description: >-
                                Alphabetic three-letter [ISO
                                4217](https://en.wikipedia.org/wiki/ISO_4217)
                                currency code.

                                * EUR - Euro
                              enum:
                                - EUR
                              default: EUR
                          required:
                            - amount
                            - currency
                          additionalProperties: false
                        id:
                          title: Cash transaction unique identifier
                          type: string
                          description: Cash transaction unique identifier.
                          format: uuid
                        instrument:
                          title: Instrument
                          description: Entity representing instrument.
                          type: object
                          properties:
                            uuid:
                              description: Internal instrument identifier.
                              type: string
                              format: uuid
                            isin:
                              title: International securities identification number
                              type: string
                              description: >-
                                International securities identification number
                                defined by [ISO
                                6166](https://en.wikipedia.org/wiki/International_Securities_Identification_Number).
                              pattern: ^[A-Z]{2}[A-Z0-9]{9}[0-9]$
                          required:
                            - uuid
                          additionalProperties: false
                        account_id:
                          title: Account unique identifier.
                          type: string
                          description: Account unique identifier.
                          format: uuid
                        taxes:
                          type: array
                          items:
                            title: Transaction tax
                            description: Entity representing the transaction tax.
                            type: object
                            properties:
                              amount:
                                type: string
                                pattern: ^-?[0-9]{1,9}(\.[0-9]{2})?$
                              currency:
                                type: string
                                description: >-
                                  Alphabetic three-letter [ISO
                                  4217](https://en.wikipedia.org/wiki/ISO_4217)
                                  currency code.

                                  * EUR - Euro
                                enum:
                                  - EUR
                                default: EUR
                              type:
                                type: string
                                description: |-
                                  Type of the tax.
                                  * TOTAL - Total taxes
                                enum:
                                  - TOTAL
                                default: TOTAL
                            required:
                              - amount
                              - currency
                              - type
                            additionalProperties: false
                        fees:
                          type: array
                          items:
                            title: Transaction fee
                            description: Entity representing the transaction fee.
                            type: object
                            properties:
                              amount:
                                type: string
                                pattern: ^-?[0-9]{1,9}(\.[0-9]{2})?$
                              currency:
                                type: string
                                description: >-
                                  Alphabetic three-letter [ISO
                                  4217](https://en.wikipedia.org/wiki/ISO_4217)
                                  currency code.

                                  * EUR - Euro
                                enum:
                                  - EUR
                                default: EUR
                              type:
                                type: string
                                description: |-
                                  Type of the fee.
                                  * TOTAL - Total fees
                                enum:
                                  - TOTAL
                                default: TOTAL
                              charge_method:
                                type: string
                                description: >-
                                  Indicates whether the fee was charged by
                                  client or by other methods.

                                  * CHARGED_BY_CLIENT - Charged by client

                                  * COLLECTED_BY_UPVEST - Charged by client and
                                  collected by Upvest
                                enum:
                                  - CHARGED_BY_CLIENT
                                  - COLLECTED_BY_UPVEST
                            required:
                              - amount
                              - currency
                              - type
                              - charge_method
                            additionalProperties: false
                        references:
                          type: array
                          items:
                            title: Cash transaction reference
                            description: Entity representing cash transaction reference.
                            type: object
                            properties:
                              id:
                                title: Unique identifier for a resource of given type
                                type: string
                                description: >-
                                  Unique identifier for a resource of given
                                  type.
                                format: uuid
                              type:
                                type: string
                                description: >-
                                  Type of the reference.

                                  * CORPORATE_ACTION - Corporate action

                                  * CORPORATE_ACTION_TRANSACTION_ID - Corporate
                                  action transaction ID

                                  * CREDIT_FUNDING - Credit Funding

                                  * DIRECT_DEBIT - Direct debit funding request

                                  * FEE_COLLECTION - Fee collection

                                  * ORDER - Order

                                  * ORDER_EXECUTION - Order execution

                                  * TAX_TRANSACTION - Tax transaction

                                  * TOPUP - Cash top up

                                  * TRANSACTION_FEE_EXECUTION - Transaction fee
                                  execution

                                  * VIRTUAL_CASH_DECREASE - Virtual cash
                                  decreased

                                  * VIRTUAL_CASH_INCREASE - Virtual cash
                                  increased

                                  * WITHDRAWAL - Cash withdrawal
                                enum:
                                  - CORPORATE_ACTION
                                  - CORPORATE_ACTION_TRANSACTION_ID
                                  - CREDIT_FUNDING
                                  - DIRECT_DEBIT
                                  - FEE_COLLECTION
                                  - ORDER
                                  - ORDER_EXECUTION
                                  - TAX_TRANSACTION
                                  - TOPUP
                                  - TRANSACTION_FEE_EXECUTION
                                  - VIRTUAL_CASH_DECREASE
                                  - VIRTUAL_CASH_INCREASE
                                  - WITHDRAWAL
                            required:
                              - id
                              - type
                            additionalProperties: false
                        type:
                          title: Transaction type
                          description: >-
                            Transaction type

                            * ACCUMULATION - Accumulation

                            * ACCUMULATION_CANCELLATION - Accumulation
                            cancellation

                            * ANNUAL_GENERAL_MEETING - Annual general meeting

                            * ANNUAL_GENERAL_MEETING_CANCELLATION - Annual
                            general meeting cancellation

                            * ATTACHMENT - Attachment

                            * ATTACHMENT_CANCELLATION - Attachment cancellation

                            * BALANCE_CORRECTION - Balance correction

                            * BALANCE_CORRECTION_CANCELLATION - Balance
                            correction cancellation

                            * BANKRUPTCY - Bankruptcy

                            * BANKRUPTCY_CANCELLATION - Bankruptcy cancellation

                            * BOND_DEFAULT - Bond default

                            * BOND_DEFAULT_CANCELLATION - Bond default
                            cancellation

                            * BOND_HOLDER_MEETING - Bond holder meeting

                            * BOND_HOLDER_MEETING_CANCELLATION - Bond holder
                            meeting cancellation

                            * BONUS_ISSUE - Bonus Issue/Capitalisation Issue

                            * BONUS_ISSUE_CANCELLATION - Bonus
                            Issue/Capitalisation Issue, Cancellation

                            * CALL_ON_INTERMEDIATE_SECURITIES - Call on
                            Intermediate Securities

                            * CALL_ON_INTERMEDIATE_SECURITIES_CANCELLATION -
                            Call on Intermediate Securities cancellation

                            * CAPITAL_DISTRIBUTION - Capital distribution

                            * CAPITAL_DISTRIBUTION_CANCELLATION - Capital
                            distribution cancellation

                            * CAPITAL_GAINS_DISTRIBUTION - Capital gains
                            distribution

                            * CAPITAL_GAINS_DISTRIBUTION_CANCELLATION - Capital
                            gains distribution cancellation

                            * CAPITALISATION - Capitalisation

                            * CAPITALISATION_CANCELLATION - Capitalisation
                            cancellation

                            *
                            CASH_DISTRIBUTION_FROM_NON_ELIGIBLE_SECURITIES_SALES
                            - Cash distribution from non eligible securities
                            sales

                            *
                            CASH_DISTRIBUTION_FROM_NON_ELIGIBLE_SECURITIES_SALES_CANCELLATION
                            - Cash distribution from non eligible securities
                            sales cancellation

                            * CASH_DIVIDEND - Cash dividend

                            * CASH_DIVIDEND_CANCELLATION - Cash dividend
                            cancellation

                            * CHANGE - Change

                            * CHANGE_CANCELLATION - Change, Cancellation

                            * CLASS_ACTION - Class action

                            * CLASS_ACTION_CANCELLATION - Class action
                            cancellation

                            * COMPANY_OPTION - Company option

                            * COMPANY_OPTION_CANCELLATION - Company option
                            cancellation

                            * CONSENT - Consent

                            * CONSENT_CANCELLATION - Consent cancellation

                            * CONVERSION - Conversion

                            * CONVERSION_CANCELLATION - Conversion cancellation

                            * COURT_MEETING - Court meeting

                            * COURT_MEETING_CANCELLATION - Court meeting
                            cancellation

                            * CREDIT_EVENT - Credit event

                            * CREDIT_EVENT_CANCELLATION - Credit event
                            cancellation

                            * CREDIT_FUNDING - Credit funding

                            * CREDIT_FUNDING_CHARGE_BACK - Credit funding charge
                            back

                            * DD_REFUND_REJECT_FEE - DD refund reject fee

                            * DD_REFUND_REJECT_FEE_CANCELLATION - DD refund
                            reject fee cancellation

                            * DECREASE_IN_VALUE - Decrease in Value

                            * DECREASE_IN_VALUE_CANCELLATION - Decrease in
                            Value, Cancellation

                            * DETACHMENT - Detachment

                            * DETACHMENT_CANCELLATION - Detachment cancellation

                            * DISCLOSURE - Disclosure

                            * DISCLOSURE_CANCELLATION - Disclosure cancellation

                            * DIVIDEND_OPTION - Dividend Option

                            * DIVIDEND_OPTION_CANCELLATION - Dividend Option,
                            Cancellation

                            * DIVIDEND_REINVESTMENT - Dividend Reinvestment

                            * DIVIDEND_REINVESTMENT_CANCELLATION - Dividend
                            Reinvestment, Cancellation

                            * DRAWING - Drawing

                            * DRAWING_CANCELLATION - Drawing cancellation

                            * DUTCH_AUCTION - Dutch Auction

                            * DUTCH_AUCTION_CANCELLATION - Dutch Auction,
                            Cancellation

                            * EXCHANGE - Exchange

                            * EXCHANGE_CANCELLATION - Exchange cancellation

                            * EXTRAORDINARY_OR_SPECIAL_GENERAL_MEETING -
                            Extraordinary or special general meeting

                            *
                            EXTRAORDINARY_OR_SPECIAL_GENERAL_MEETING_CANCELLATION
                            - Extraordinary or special general meeting
                            cancellation

                            * FEE_COLLECTION - Fee collection

                            * FEE_COLLECTION_CANCELLATION - Fee collection
                            cancellation

                            * FINAL_MATURITY - Final maturity

                            * FINAL_MATURITY_CANCELLATION - Final maturity
                            cancellation

                            * FULL_CALL - Full call

                            * FULL_CALL_CANCELLATION - Full call cancellation

                            * INCREASE_IN_VALUE - Increase in Value

                            * INCREASE_IN_VALUE_CANCELLATION - Increase in
                            Value, Cancellation

                            * INFORMATION - Information

                            * INFORMATION_CANCELLATION - Information
                            cancellation

                            * INSTALMENT_CALL - Instalment call

                            * INSTALMENT_CALL_CANCELLATION - Instalment call
                            cancellation

                            * INTEREST_PAYMENT - Interest payment

                            * INTEREST_PAYMENT_CANCELLATION - Interest payment
                            cancellation

                            * INTERMEDIATE_SECURITIES_DISTRIBUTION -
                            Intermediate Securities Distribution

                            * INTERMEDIATE_SECURITIES_DISTRIBUTION_CANCELLATION
                            - Intermediate Securities Distribution, Cancellation

                            * LIQUIDATION_PAYMENT - Liquidation
                            Dividend/Liquidation Payment

                            * LIQUIDATION_PAYMENT_CANCELLATION - Liquidation
                            Dividend/Liquidation Payment, Cancellation

                            * MATURITY_EXTENSION - Maturity extension

                            * MATURITY_EXTENSION_CANCELLATION - Maturity
                            extension cancellation

                            * MERGER - Merger

                            * MERGER_CANCELLATION - Merger, Cancellation

                            * NON_OFFICIAL_OFFER - Non-Official Offer

                            * NON_OFFICIAL_OFFER_CANCELLATION - Non-Official
                            Offer, Cancellation

                            * NON_US_TEFRA_D_CERTIFICATION - Non us tefra d
                            certification

                            * NON_US_TEFRA_D_CERTIFICATION_CANCELLATION - Non us
                            tefra d certification cancellation

                            * ODD_LOT_SALE - Odd Lot Sale/Purchase

                            * ODD_LOT_SALE_CANCELLATION - Odd Lot Sale/Purchase,
                            Cancellation

                            * ORDER_EXECUTION - Order execution

                            * ORDER_EXECUTION_CANCELLATION - Order execution
                            cancellation

                            * ORDINARY_GENERAL_MEETING - Ordinary general
                            meeting

                            * ORDINARY_GENERAL_MEETING_CANCELLATION - Ordinary
                            general meeting cancellation

                            * OTHER_EVENT - Other Event

                            * OTHER_EVENT_CANCELLATION - Other Event,
                            Cancellation

                            * PARI_PASSU - Pari passu

                            * PARI_PASSU_CANCELLATION - Pari passu cancellation

                            * PARTIAL_DEFEASANCE - Partial defeasance

                            * PARTIAL_DEFEASANCE_CANCELLATION - Partial
                            defeasance cancellation

                            * PARTIAL_REDEMPTION_WITH_POOL_FACTOR_REDUCTION -
                            Partial redemption with pool factor reduction

                            *
                            PARTIAL_REDEMPTION_WITH_POOL_FACTOR_REDUCTION_CANCELLATION
                            - Partial redemption with pool factor reduction
                            cancellation

                            * PARTIAL_REDEMPTION_WITHOUT_POOL_FACTOR_REDUCTION -
                            Partial redemption without pool factor reduction

                            *
                            PARTIAL_REDEMPTION_WITHOUT_POOL_FACTOR_REDUCTION_CANCELLATION
                            - Partial redemption without pool factor reduction
                            cancellation

                            * PAY_IN_KIND - Pay in kind

                            * PAY_IN_KIND_CANCELLATION - Pay in kind
                            cancellation

                            * PEAK_FRACTION_COMPENSATION - Peak fraction
                            compensation

                            * PEAK_ORDER_ADJUSTMENT - Peak order adjustment

                            * PLACE_OF_INCORPORATION - Place of incorporation

                            * PLACE_OF_INCORPORATION_CANCELLATION - Place of
                            incorporation cancellation

                            * PRIORITY_ISSUE - Priority Issue

                            * PRIORITY_ISSUE_CANCELLATION - Priority Issue,
                            Cancellation

                            * PUT_REDEMPTION - Put redemption

                            * PUT_REDEMPTION_CANCELLATION - Put redemption
                            cancellation

                            * REDENOMINATION - Redenomination

                            * REDENOMINATION_CANCELLATION - Redenomination
                            cancellation

                            * REMARKETING_AGREEMENT - Remarketing agreement

                            * REMARKETING_AGREEMENT_CANCELLATION - Remarketing
                            agreement cancellation

                            * REPURCHASE_OFFER - Repurchase Offer/Issuer
                            Bid/Reverse Rights

                            * REPURCHASE_OFFER_CANCELLATION - Repurchase
                            Offer/Issuer Bid/Reverse Rights, Cancellation

                            * REVERSE_STOCK_SPLIT - Reverse Stock Split/Change
                            in Nominal Value

                            * REVERSE_STOCK_SPLIT_CANCELLATION - Reverse Stock
                            Split/Change in Nominal Value, Cancellation

                            * RIGHTS_ISSUE - Rights Issue/Subscription
                            Rights/Rights Offer

                            * RIGHTS_ISSUE_CANCELLATION - Rights
                            Issue/Subscription Rights/Rights Offer, Cancellation

                            * SCRIP_DIVIDEND - Scrip dividend

                            * SCRIP_DIVIDEND_CANCELLATION - Scrip dividend
                            cancellation

                            * SEPA_DIRECT_DEBIT - Sepa direct debit

                            * SEPA_DIRECT_DEBIT_CHARGE_BACK - Sepa direct debit
                            charge back

                            * SHARES_PREMIUM_DIVIDEND - Shares Premium Dividend

                            * SHARES_PREMIUM_DIVIDEND_CANCELLATION - Shares
                            Premium Dividend, Cancellation

                            * SMALLEST_NEGOTIABLE_UNIT - Smallest negotiable
                            unit

                            * SMALLEST_NEGOTIABLE_UNIT_CANCELLATION - Smallest
                            negotiable unit cancellation

                            * SPIN_OFF - Spin-Off

                            * SPIN_OFF_CANCELLATION - Spin-Off, Cancellation

                            * STOCK_DIVIDEND - Stock Dividend

                            * STOCK_DIVIDEND_CANCELLATION - Stock Dividend,
                            Cancellation

                            * STOCK_SPLIT - Stock Split/Change in Nominal
                            Value/Subdivision

                            * STOCK_SPLIT_CANCELLATION - Stock Split/Change in
                            Nominal Value/Subdivision, Cancellation

                            * TAX_ON_NON_DISTRIBUTED_PROCEEDS - Tax on non
                            distributed proceeds

                            * TAX_ON_NON_DISTRIBUTED_PROCEEDS_CANCELLATION - Tax
                            on non distributed proceeds cancellation

                            * TAX_OPTIMISATION - Tax optimisation

                            * TAX_PAYMENT - Tax payment

                            * TAX_PREPAYMENT_DE - German tax prepayment
                            (Vorabpauschale)

                            * TAX_RECLAIM - Tax reclaim

                            * TAX_RECLAIM_CANCELLATION - Tax reclaim
                            cancellation

                            * TAX_REFUND - Tax refund

                            * TENDER - Tender/Acquisition/Takeover/Purchase
                            Offer

                            * TENDER_CANCELLATION -
                            Tender/Acquisition/Takeover/Purchase Offer,
                            Cancellation

                            * TOPUP - Cash top up

                            * TOPUP_CANCELLATION - Top up cancellation

                            * TRADING_STATUS_ACTIVE - Trading status active

                            * TRADING_STATUS_ACTIVE_CANCELLATION - Trading
                            status active cancellation

                            * TRADING_STATUS_DELISTED - Trading status delisted

                            * TRADING_STATUS_DELISTED_CANCELLATION - Trading
                            status delisted cancellation

                            * TRADING_STATUS_SUSPENDED - Trading status
                            suspended

                            * TRADING_STATUS_SUSPENDED_CANCELLATION - Trading
                            status suspended cancellation

                            * TREASURY_PAYMENT - Treasury payment

                            * VIRTUAL_CASH_CORRECTION - Virtual cash correction

                            * VIRTUAL_CASH_CORRECTION_CANCELLATION - Virtual
                            cash correction cancellation

                            * VIRTUAL_CASH_DECREASE - Virtual cash decreased

                            * VIRTUAL_CASH_INCREASE - Virtual cash increased

                            * WARRANT_EXERCISE - Warrant exercise

                            * WARRANT_EXERCISE_CANCELLATION - Warrant exercise
                            cancellation

                            * WITHDRAWAL - Withdrawal

                            * WITHDRAWAL_CANCELLATION - Withdrawal cancellation

                            * WORTHLESS - Worthless

                            * WORTHLESS_CANCELLATION - Worthless, Cancellation

                            * WITHHOLDING_TAX_RELIEF_CERTIFICATION - Withholding
                            tax relief certification

                            * WITHHOLDING_TAX_RELIEF_CERTIFICATION_CANCELLATION
                            - Withholding tax relief certification cancellation
                          type: string
                          enum:
                            - ACCUMULATION
                            - ACCUMULATION_CANCELLATION
                            - ANNUAL_GENERAL_MEETING
                            - ANNUAL_GENERAL_MEETING_CANCELLATION
                            - ATTACHMENT
                            - ATTACHMENT_CANCELLATION
                            - BALANCE_CORRECTION
                            - BALANCE_CORRECTION_CANCELLATION
                            - BANKRUPTCY
                            - BANKRUPTCY_CANCELLATION
                            - BOND_DEFAULT
                            - BOND_DEFAULT_CANCELLATION
                            - BOND_HOLDER_MEETING
                            - BOND_HOLDER_MEETING_CANCELLATION
                            - BONUS_ISSUE
                            - BONUS_ISSUE_CANCELLATION
                            - CALL_ON_INTERMEDIATE_SECURITIES
                            - CALL_ON_INTERMEDIATE_SECURITIES_CANCELLATION
                            - CAPITAL_DISTRIBUTION
                            - CAPITAL_DISTRIBUTION_CANCELLATION
                            - CAPITAL_GAINS_DISTRIBUTION
                            - CAPITAL_GAINS_DISTRIBUTION_CANCELLATION
                            - CAPITALISATION
                            - CAPITALISATION_CANCELLATION
                            - >-
                              CASH_DISTRIBUTION_FROM_NON_ELIGIBLE_SECURITIES_SALES
                            - >-
                              CASH_DISTRIBUTION_FROM_NON_ELIGIBLE_SECURITIES_SALES_CANCELLATION
                            - CASH_DIVIDEND
                            - CASH_DIVIDEND_CANCELLATION
                            - CHANGE
                            - CHANGE_CANCELLATION
                            - CLASS_ACTION
                            - CLASS_ACTION_CANCELLATION
                            - COMPANY_OPTION
                            - COMPANY_OPTION_CANCELLATION
                            - CONSENT
                            - CONSENT_CANCELLATION
                            - CONVERSION
                            - CONVERSION_CANCELLATION
                            - COURT_MEETING
                            - COURT_MEETING_CANCELLATION
                            - CREDIT_EVENT
                            - CREDIT_EVENT_CANCELLATION
                            - CREDIT_FUNDING
                            - CREDIT_FUNDING_CHARGE_BACK
                            - DD_REFUND_REJECT_FEE
                            - DD_REFUND_REJECT_FEE_CANCELLATION
                            - DECREASE_IN_VALUE
                            - DECREASE_IN_VALUE_CANCELLATION
                            - DETACHMENT
                            - DETACHMENT_CANCELLATION
                            - DISCLOSURE
                            - DISCLOSURE_CANCELLATION
                            - DIVIDEND_OPTION
                            - DIVIDEND_OPTION_CANCELLATION
                            - DIVIDEND_REINVESTMENT
                            - DIVIDEND_REINVESTMENT_CANCELLATION
                            - DRAWING
                            - DRAWING_CANCELLATION
                            - DUTCH_AUCTION
                            - DUTCH_AUCTION_CANCELLATION
                            - EXCHANGE
                            - EXCHANGE_CANCELLATION
                            - EXTRAORDINARY_OR_SPECIAL_GENERAL_MEETING
                            - >-
                              EXTRAORDINARY_OR_SPECIAL_GENERAL_MEETING_CANCELLATION
                            - FEE_COLLECTION
                            - FEE_COLLECTION_CANCELLATION
                            - FINAL_MATURITY
                            - FINAL_MATURITY_CANCELLATION
                            - FULL_CALL
                            - FULL_CALL_CANCELLATION
                            - INCREASE_IN_VALUE
                            - INCREASE_IN_VALUE_CANCELLATION
                            - INFORMATION
                            - INFORMATION_CANCELLATION
                            - INSTALMENT_CALL
                            - INSTALMENT_CALL_CANCELLATION
                            - INTEREST_PAYMENT
                            - INTEREST_PAYMENT_CANCELLATION
                            - INTERMEDIATE_SECURITIES_DISTRIBUTION
                            - INTERMEDIATE_SECURITIES_DISTRIBUTION_CANCELLATION
                            - LIQUIDATION_PAYMENT
                            - LIQUIDATION_PAYMENT_CANCELLATION
                            - MATURITY_EXTENSION
                            - MATURITY_EXTENSION_CANCELLATION
                            - MERGER
                            - MERGER_CANCELLATION
                            - NON_OFFICIAL_OFFER
                            - NON_OFFICIAL_OFFER_CANCELLATION
                            - NON_US_TEFRA_D_CERTIFICATION
                            - NON_US_TEFRA_D_CERTIFICATION_CANCELLATION
                            - ODD_LOT_SALE
                            - ODD_LOT_SALE_CANCELLATION
                            - ORDER_EXECUTION
                            - ORDER_EXECUTION_CANCELLATION
                            - ORDINARY_GENERAL_MEETING
                            - ORDINARY_GENERAL_MEETING_CANCELLATION
                            - OTHER_EVENT
                            - OTHER_EVENT_CANCELLATION
                            - PARI_PASSU
                            - PARI_PASSU_CANCELLATION
                            - PARTIAL_DEFEASANCE
                            - PARTIAL_DEFEASANCE_CANCELLATION
                            - PARTIAL_REDEMPTION_WITH_POOL_FACTOR_REDUCTION
                            - >-
                              PARTIAL_REDEMPTION_WITH_POOL_FACTOR_REDUCTION_CANCELLATION
                            - PARTIAL_REDEMPTION_WITHOUT_POOL_FACTOR_REDUCTION
                            - >-
                              PARTIAL_REDEMPTION_WITHOUT_POOL_FACTOR_REDUCTION_CANCELLATION
                            - PAY_IN_KIND
                            - PAY_IN_KIND_CANCELLATION
                            - PEAK_FRACTION_COMPENSATION
                            - PEAK_ORDER_ADJUSTMENT
                            - PLACE_OF_INCORPORATION
                            - PLACE_OF_INCORPORATION_CANCELLATION
                            - PRIORITY_ISSUE
                            - PRIORITY_ISSUE_CANCELLATION
                            - PUT_REDEMPTION
                            - PUT_REDEMPTION_CANCELLATION
                            - REDENOMINATION
                            - REDENOMINATION_CANCELLATION
                            - REMARKETING_AGREEMENT
                            - REMARKETING_AGREEMENT_CANCELLATION
                            - REPURCHASE_OFFER
                            - REPURCHASE_OFFER_CANCELLATION
                            - REVERSE_STOCK_SPLIT
                            - REVERSE_STOCK_SPLIT_CANCELLATION
                            - RIGHTS_ISSUE
                            - RIGHTS_ISSUE_CANCELLATION
                            - SCRIP_DIVIDEND
                            - SCRIP_DIVIDEND_CANCELLATION
                            - SEPA_DIRECT_DEBIT
                            - SEPA_DIRECT_DEBIT_CHARGE_BACK
                            - SHARES_PREMIUM_DIVIDEND
                            - SHARES_PREMIUM_DIVIDEND_CANCELLATION
                            - SMALLEST_NEGOTIABLE_UNIT
                            - SMALLEST_NEGOTIABLE_UNIT_CANCELLATION
                            - SPIN_OFF
                            - SPIN_OFF_CANCELLATION
                            - STOCK_DIVIDEND
                            - STOCK_DIVIDEND_CANCELLATION
                            - STOCK_SPLIT
                            - STOCK_SPLIT_CANCELLATION
                            - TAX_ON_NON_DISTRIBUTED_PROCEEDS
                            - TAX_ON_NON_DISTRIBUTED_PROCEEDS_CANCELLATION
                            - TAX_OPTIMISATION
                            - TAX_PAYMENT
                            - TAX_PREPAYMENT_DE
                            - TAX_RECLAIM
                            - TAX_RECLAIM_CANCELLATION
                            - TAX_REFUND
                            - TENDER
                            - TENDER_CANCELLATION
                            - TOPUP
                            - TOPUP_CANCELLATION
                            - TRADING_STATUS_ACTIVE
                            - TRADING_STATUS_ACTIVE_CANCELLATION
                            - TRADING_STATUS_DELISTED
                            - TRADING_STATUS_DELISTED_CANCELLATION
                            - TRADING_STATUS_SUSPENDED
                            - TRADING_STATUS_SUSPENDED_CANCELLATION
                            - TREASURY_PAYMENT
                            - VIRTUAL_CASH_CORRECTION
                            - VIRTUAL_CASH_CORRECTION_CANCELLATION
                            - VIRTUAL_CASH_DECREASE
                            - VIRTUAL_CASH_INCREASE
                            - WARRANT_EXERCISE
                            - WARRANT_EXERCISE_CANCELLATION
                            - WITHDRAWAL
                            - WITHDRAWAL_CANCELLATION
                            - WORTHLESS
                            - WORTHLESS_CANCELLATION
                            - WITHHOLDING_TAX_RELIEF_CERTIFICATION
                            - WITHHOLDING_TAX_RELIEF_CERTIFICATION_CANCELLATION
                        updated_at:
                          type: string
                          format: date-time
                          description: >-
                            Date and time when the resource was last updated.
                            [RFC
                            3339-5](https://datatracker.ietf.org/doc/html/rfc3339#section-5.6),
                            [ISO8601
                            UTC](https://www.iso.org/iso-8601-date-and-time-format.html)
                        value_date:
                          title: Transaction value date
                          type: string
                          description: >-
                            Transaction value date and time. [RFC
                            3339-5](https://datatracker.ietf.org/doc/html/rfc3339#section-5.6),
                            [ISO8601
                            UTC](https://www.iso.org/iso-8601-date-and-time-format.html)
                          format: date-time
                      required:
                        - id
                        - type
                        - account_group_id
                        - delta
                        - taxes
                        - references
                        - booking_date
                        - value_date
                        - created_at
                        - updated_at
                      additionalProperties: true
                required:
                  - meta
                  - data
                additionalProperties: false
              example:
                meta:
                  offset: 0
                  limit: 100
                  count: 2
                  total_count: 2
                  sort: booking_date
                  order: ASC
                data:
                  - id: 6dc9fbca-8835-11ed-a217-2eabd0c03f8a
                    created_at: '2023-01-01T00:00:00.000Z'
                    updated_at: '2023-01-01T00:00:00.000Z'
                    type: ORDER_EXECUTION
                    account_group_id: 6409e3f2-8835-11ed-96a4-2eabd0c03f8a
                    delta:
                      amount: '-305.00'
                      currency: EUR
                    taxes:
                      - amount: '5.00'
                        currency: EUR
                        type: TOTAL
                    references:
                      - id: 7579a672-8835-11ed-9455-2eabd0c03f8a
                        type: ORDER_EXECUTION
                      - id: 1f5758d3-1ef7-4b4c-96ec-6b3da2bf1a8a
                        type: ORDER
                    booking_date: '2023-01-01T00:00:00.000Z'
                    value_date: '2023-01-01T00:00:00.000Z'
                  - id: 9e7a3188-eff8-11ed-a05b-0242ac120003
                    created_at: '2023-01-01T00:00:00.000Z'
                    updated_at: '2023-01-01T00:00:00.000Z'
                    type: SEPA_DIRECT_DEBIT
                    account_group_id: 6409e3f2-8835-11ed-96a4-2eabd0c03f8a
                    delta:
                      amount: '100.00'
                      currency: EUR
                    taxes: []
                    references:
                      - id: 98f01200-eff8-11ed-a05b-0242ac120003
                        type: DIRECT_DEBIT
                    booking_date: '2023-01-01T00:00:00.000Z'
                    value_date: '2023-01-01T00:00:00.000Z'
        '400':
          description: Bad Request. The incoming request had a malformed parameter/object.
          headers:
            upvest-request-id:
              required: true
              schema:
                type: string
                format: uuid
                example: 169ae4c7-ebd7-4041-94da-25369653eba7
          content:
            application/problem+json:
              schema:
                title: Error
                type: object
                description: ''
                properties:
                  type:
                    type: string
                    description: URL to a document describing the error condition.
                  status:
                    type: integer
                    description: >-
                      Transmission of the HTTP status code so that all
                      information can be found in one place, but also to correct
                      changes in the status code due to the use of proxy
                      servers.
                  title:
                    type: string
                    description: >-
                      A short, human-readable title for the general error type;
                      the title should not change for given types.
                  detail:
                    type: string
                    description: A human-readable description of the specific error.
                  instance:
                    type: string
                    description: >-
                      This optional key may be present, with a unique URI for
                      the specific error; this will often point to an error log
                      for that specific response.
                  request_id:
                    type: string
                    description: Correlation ID for the original request.
                required:
                  - type
                  - status
                additionalProperties: false
              example:
                status: 400
                type: bad_request
        '401':
          description: Unauthorized. The caller has not been authenticated.
          headers:
            upvest-request-id:
              required: true
              schema:
                type: string
                format: uuid
                example: 169ae4c7-ebd7-4041-94da-25369653eba7
          content:
            application/problem+json:
              schema:
                title: Error
                type: object
                description: ''
                properties:
                  type:
                    type: string
                    description: URL to a document describing the error condition.
                  status:
                    type: integer
                    description: >-
                      Transmission of the HTTP status code so that all
                      information can be found in one place, but also to correct
                      changes in the status code due to the use of proxy
                      servers.
                  title:
                    type: string
                    description: >-
                      A short, human-readable title for the general error type;
                      the title should not change for given types.
                  detail:
                    type: string
                    description: A human-readable description of the specific error.
                  instance:
                    type: string
                    description: >-
                      This optional key may be present, with a unique URI for
                      the specific error; this will often point to an error log
                      for that specific response.
                  request_id:
                    type: string
                    description: Correlation ID for the original request.
                required:
                  - type
                  - status
                additionalProperties: false
              example:
                status: 401
                type: unauthorized
        '403':
          description: >-
            Forbidden. The caller has been authenticated but is not allowed to
            take the requested action.
          headers:
            upvest-request-id:
              required: true
              schema:
                type: string
                format: uuid
                example: 169ae4c7-ebd7-4041-94da-25369653eba7
          content:
            application/problem+json:
              schema:
                title: Error
                type: object
                description: ''
                properties:
                  type:
                    type: string
                    description: URL to a document describing the error condition.
                  status:
                    type: integer
                    description: >-
                      Transmission of the HTTP status code so that all
                      information can be found in one place, but also to correct
                      changes in the status code due to the use of proxy
                      servers.
                  title:
                    type: string
                    description: >-
                      A short, human-readable title for the general error type;
                      the title should not change for given types.
                  detail:
                    type: string
                    description: A human-readable description of the specific error.
                  instance:
                    type: string
                    description: >-
                      This optional key may be present, with a unique URI for
                      the specific error; this will often point to an error log
                      for that specific response.
                  request_id:
                    type: string
                    description: Correlation ID for the original request.
                required:
                  - type
                  - status
                additionalProperties: false
              example:
                status: 403
                type: forbidden
        '404':
          description: Not Found. The requested resource could not be found.
          headers:
            upvest-request-id:
              required: true
              schema:
                type: string
                format: uuid
                example: 169ae4c7-ebd7-4041-94da-25369653eba7
          content:
            application/problem+json:
              schema:
                title: Error
                type: object
                description: ''
                properties:
                  type:
                    type: string
                    description: URL to a document describing the error condition.
                  status:
                    type: integer
                    description: >-
                      Transmission of the HTTP status code so that all
                      information can be found in one place, but also to correct
                      changes in the status code due to the use of proxy
                      servers.
                  title:
                    type: string
                    description: >-
                      A short, human-readable title for the general error type;
                      the title should not change for given types.
                  detail:
                    type: string
                    description: A human-readable description of the specific error.
                  instance:
                    type: string
                    description: >-
                      This optional key may be present, with a unique URI for
                      the specific error; this will often point to an error log
                      for that specific response.
                  request_id:
                    type: string
                    description: Correlation ID for the original request.
                required:
                  - type
                  - status
                additionalProperties: false
              example:
                status: 404
                type: not_found
        '405':
          description: >-
            Method Not Allowed. The requested method is not allowed on the
            requested resource.
          headers:
            upvest-request-id:
              required: true
              schema:
                type: string
                format: uuid
                example: 169ae4c7-ebd7-4041-94da-25369653eba7
          content:
            application/problem+json:
              schema:
                title: Error
                type: object
                description: ''
                properties:
                  type:
                    type: string
                    description: URL to a document describing the error condition.
                  status:
                    type: integer
                    description: >-
                      Transmission of the HTTP status code so that all
                      information can be found in one place, but also to correct
                      changes in the status code due to the use of proxy
                      servers.
                  title:
                    type: string
                    description: >-
                      A short, human-readable title for the general error type;
                      the title should not change for given types.
                  detail:
                    type: string
                    description: A human-readable description of the specific error.
                  instance:
                    type: string
                    description: >-
                      This optional key may be present, with a unique URI for
                      the specific error; this will often point to an error log
                      for that specific response.
                  request_id:
                    type: string
                    description: Correlation ID for the original request.
                required:
                  - type
                  - status
                additionalProperties: false
              example:
                status: 405
                type: method_not_allowed
        '406':
          description: >-
            Not Acceptable. The resource does not have a current representation
            that would be acceptable to the user agent. "Accept" header defined
            unsupported value.
          headers:
            upvest-request-id:
              required: true
              schema:
                type: string
                format: uuid
                example: 169ae4c7-ebd7-4041-94da-25369653eba7
          content:
            application/problem+json:
              schema:
                title: Error
                type: object
                description: ''
                properties:
                  type:
                    type: string
                    description: URL to a document describing the error condition.
                  status:
                    type: integer
                    description: >-
                      Transmission of the HTTP status code so that all
                      information can be found in one place, but also to correct
                      changes in the status code due to the use of proxy
                      servers.
                  title:
                    type: string
                    description: >-
                      A short, human-readable title for the general error type;
                      the title should not change for given types.
                  detail:
                    type: string
                    description: A human-readable description of the specific error.
                  instance:
                    type: string
                    description: >-
                      This optional key may be present, with a unique URI for
                      the specific error; this will often point to an error log
                      for that specific response.
                  request_id:
                    type: string
                    description: Correlation ID for the original request.
                required:
                  - type
                  - status
                additionalProperties: false
              example:
                status: 406
                type: not_acceptable
        '429':
          description: >-
            Too Many Requests. The caller has exceeded their quota for the time
            period and has been throttled.
          headers:
            upvest-request-id:
              required: true
              schema:
                type: string
                format: uuid
                example: 169ae4c7-ebd7-4041-94da-25369653eba7
          content:
            application/problem+json:
              schema:
                title: Error
                type: object
                description: ''
                properties:
                  type:
                    type: string
                    description: URL to a document describing the error condition.
                  status:
                    type: integer
                    description: >-
                      Transmission of the HTTP status code so that all
                      information can be found in one place, but also to correct
                      changes in the status code due to the use of proxy
                      servers.
                  title:
                    type: string
                    description: >-
                      A short, human-readable title for the general error type;
                      the title should not change for given types.
                  detail:
                    type: string
                    description: A human-readable description of the specific error.
                  instance:
                    type: string
                    description: >-
                      This optional key may be present, with a unique URI for
                      the specific error; this will often point to an error log
                      for that specific response.
                  request_id:
                    type: string
                    description: Correlation ID for the original request.
                required:
                  - type
                  - status
                additionalProperties: false
              example:
                status: 429
                type: too_many_requests
        '500':
          description: Internal Server Error. The service encountered an unexpected error.
          headers:
            upvest-request-id:
              required: true
              schema:
                type: string
                format: uuid
                example: 169ae4c7-ebd7-4041-94da-25369653eba7
          content:
            application/problem+json:
              schema:
                title: Error
                type: object
                description: ''
                properties:
                  type:
                    type: string
                    description: URL to a document describing the error condition.
                  status:
                    type: integer
                    description: >-
                      Transmission of the HTTP status code so that all
                      information can be found in one place, but also to correct
                      changes in the status code due to the use of proxy
                      servers.
                  title:
                    type: string
                    description: >-
                      A short, human-readable title for the general error type;
                      the title should not change for given types.
                  detail:
                    type: string
                    description: A human-readable description of the specific error.
                  instance:
                    type: string
                    description: >-
                      This optional key may be present, with a unique URI for
                      the specific error; this will often point to an error log
                      for that specific response.
                  request_id:
                    type: string
                    description: Correlation ID for the original request.
                required:
                  - type
                  - status
                additionalProperties: false
              example:
                status: 500
                type: internal_server_error
        '503':
          description: >-
            Service Unavailable. The service handling for this request cannot be
            reached at this time.
          headers:
            upvest-request-id:
              required: true
              schema:
                type: string
                format: uuid
                example: 169ae4c7-ebd7-4041-94da-25369653eba7
          content:
            application/problem+json:
              schema:
                title: Error
                type: object
                description: ''
                properties:
                  type:
                    type: string
                    description: URL to a document describing the error condition.
                  status:
                    type: integer
                    description: >-
                      Transmission of the HTTP status code so that all
                      information can be found in one place, but also to correct
                      changes in the status code due to the use of proxy
                      servers.
                  title:
                    type: string
                    description: >-
                      A short, human-readable title for the general error type;
                      the title should not change for given types.
                  detail:
                    type: string
                    description: A human-readable description of the specific error.
                  instance:
                    type: string
                    description: >-
                      This optional key may be present, with a unique URI for
                      the specific error; this will often point to an error log
                      for that specific response.
                  request_id:
                    type: string
                    description: Correlation ID for the original request.
                required:
                  - type
                  - status
                additionalProperties: false
              example:
                status: 503
                type: method_not_allowed
        '504':
          description: >-
            Gateway Timeout. The service gateway has reached its internal
            timeout.
          headers:
            upvest-request-id:
              required: true
              schema:
                type: string
                format: uuid
                example: 169ae4c7-ebd7-4041-94da-25369653eba7
          content:
            application/problem+json:
              schema:
                title: Error
                type: object
                description: ''
                properties:
                  type:
                    type: string
                    description: URL to a document describing the error condition.
                  status:
                    type: integer
                    description: >-
                      Transmission of the HTTP status code so that all
                      information can be found in one place, but also to correct
                      changes in the status code due to the use of proxy
                      servers.
                  title:
                    type: string
                    description: >-
                      A short, human-readable title for the general error type;
                      the title should not change for given types.
                  detail:
                    type: string
                    description: A human-readable description of the specific error.
                  instance:
                    type: string
                    description: >-
                      This optional key may be present, with a unique URI for
                      the specific error; this will often point to an error log
                      for that specific response.
                  request_id:
                    type: string
                    description: Correlation ID for the original request.
                required:
                  - type
                  - status
                additionalProperties: false
              example:
                status: 504
                type: gateway_timeout
  /transactions/securities:
    parameters:
      - name: upvest-client-id
        in: header
        description: Tenant Client ID
        required: true
        schema:
          type: string
          format: uuid
          example: ebabcf4d-61c3-4942-875c-e265a7c2d062
      - name: authorization
        in: header
        description: |
          Bearer (access) token from the OAuth flow with correct scopes.
          https://datatracker.ietf.org/doc/html/rfc6750
        required: true
        schema:
          type: string
          pattern: ^Bearer [a-zA-Z0-9\-\._~+/]*=*
          example: Bearer c2VjcmV0Cg==
      - name: signature
        in: header
        required: true
        schema:
          type: string
        description: >-
          https://tools.ietf.org/id/draft-ietf-httpbis-message-signatures-01.html#name-the-signature-http-header
      - name: signature-input
        in: header
        required: true
        schema:
          type: string
        description: >-
          https://tools.ietf.org/id/draft-ietf-httpbis-message-signatures-01.html#name-the-signature-input-http-he
      - name: upvest-api-version
        in: header
        required: false
        schema:
          type: string
          enum:
            - '1'
          default: '1'
          example: '1'
        description: 'Upvest API version (Note: Do not include quotation marks)'
    get:
      operationId: list_securities_transactions
      summary: List securities transactions
      description: List securities transactions
      tags:
        - Transactions
      security:
        - oauth-client-credentials:
            - transactions:read
      parameters:
        - name: account_group_id
          in: query
          required: false
          schema:
            title: Account group unique identifier.
            type: string
            description: Account group unique identifier.
            format: uuid
          description: >-
            Filters the list to only show transactions associated with a certain
            account group ID.
          example: 413715f2-5401-4b97-8055-034a6b879f8c
        - name: account_id
          in: query
          required: false
          schema:
            title: Account unique identifier.
            type: string
            description: Account unique identifier.
            format: uuid
          description: >-
            Filters the list to only show transactions associated with a certain
            account ID.
          example: 413715f2-5401-4b97-8055-034a6b879f8c
        - name: start_date
          in: query
          required: false
          schema:
            type: string
            format: date
            title: Date in YYYY-MM-DD format. RFC 3339, section 5.6
            description: Returns transactions starting from and including this date (UTC)
          example: '2023-01-03'
        - name: end_date
          in: query
          required: false
          schema:
            type: string
            format: date
            title: Date in YYYY-MM-DD format. RFC 3339, section 5.6
            description: Returns transactions up until this date (UTC)
            example: '2023-01-11'
        - name: sort
          in: query
          required: false
          schema:
            type: string
            enum:
              - booking_date
            default: booking_date
          description: Sort the result by `booking_date`.
        - name: order
          in: query
          required: false
          schema:
            type: string
            enum:
              - ASC
              - DESC
            default: ASC
          description: >-
            Sort order of the result list if the `sort` parameter is specified.
            Use `ASC` for ascending or `DESC` for descending sort order.
        - name: offset
          in: query
          schema:
            type: integer
            minimum: 0
            format: int32
          allowEmptyValue: true
          description: >-
            Use the `offset` argument to specify where in the list of results to
            start when returning items for a particular query.
        - name: limit
          in: query
          schema:
            type: integer
            format: int32
            default: 100
            minimum: 0
            maximum: 1000
          allowEmptyValue: true
          description: >-
            Use the `limit` argument to specify the maximum number of items
            returned.
      responses:
        '200':
          description: Securities Transactions
          headers:
            upvest-request-id:
              required: true
              schema:
                type: string
                format: uuid
                example: 169ae4c7-ebd7-4041-94da-25369653eba7
          content:
            application/json:
              schema:
                title: Security transaction - List - Response
                type: object
                properties:
                  meta:
                    type: object
                    properties:
                      offset:
                        type: integer
                        description: Amount of resource to offset in the response.
                      limit:
                        type: integer
                        description: Total limit of the response.
                      count:
                        type: integer
                        description: Count of the resources returned in the response.
                      total_count:
                        type: integer
                        description: Total count of all the resources.
                      sort:
                        type: string
                        description: The field that the list is sorted by.
                      order:
                        type: string
                        description: |-
                          The ordering of the response.
                          * ASC - Ascending order
                          * DESC - Descending order
                        enum:
                          - ASC
                          - DESC
                    required:
                      - offset
                      - limit
                      - count
                      - total_count
                  data:
                    type: array
                    items:
                      title: Security Transaction
                      type: object
                      properties:
                        account_group_id:
                          title: Account group unique identifier.
                          type: string
                          description: Account group unique identifier.
                          format: uuid
                        account_id:
                          title: Account unique identifier.
                          type: string
                          description: Account unique identifier.
                          format: uuid
                        booking_date:
                          title: ' Transaction booking date'
                          type: string
                          description: ' Transaction booking date and time. [RFC 3339-5](https://datatracker.ietf.org/doc/html/rfc3339#section-5.6), [ISO8601 UTC](https://www.iso.org/iso-8601-date-and-time-format.html)'
                          format: date-time
                        created_at:
                          type: string
                          format: date-time
                          description: >-
                            Date and time when the resource was created. [RFC
                            3339-5](https://datatracker.ietf.org/doc/html/rfc3339#section-5.6),
                            [ISO8601
                            UTC](https://www.iso.org/iso-8601-date-and-time-format.html)
                        delta:
                          title: Security transaction delta
                          description: Entity representing the security transaction delta.
                          type: object
                          properties:
                            amount:
                              type: string
                              pattern: ^-?[0-9]{0,63}(\.[0-9]{1,27})?$
                          required:
                            - amount
                          additionalProperties: true
                        id:
                          title: Security transaction unique identifier
                          type: string
                          description: Security transaction unique identifier.
                          format: uuid
                        instrument:
                          title: Instrument
                          description: Entity representing instrument.
                          type: object
                          properties:
                            uuid:
                              description: Internal instrument identifier.
                              type: string
                              format: uuid
                            isin:
                              title: International securities identification number
                              type: string
                              description: >-
                                International securities identification number
                                defined by [ISO
                                6166](https://en.wikipedia.org/wiki/International_Securities_Identification_Number).
                              pattern: ^[A-Z]{2}[A-Z0-9]{9}[0-9]$
                          required:
                            - uuid
                          additionalProperties: false
                        type:
                          title: Transaction type
                          description: >-
                            Transaction type

                            * ACCUMULATION - Accumulation

                            * ACCUMULATION_CANCELLATION - Accumulation
                            cancellation

                            * ANNUAL_GENERAL_MEETING - Annual general meeting

                            * ANNUAL_GENERAL_MEETING_CANCELLATION - Annual
                            general meeting cancellation

                            * ATTACHMENT - Attachment

                            * ATTACHMENT_CANCELLATION - Attachment cancellation

                            * BALANCE_CORRECTION - Balance correction

                            * BALANCE_CORRECTION_CANCELLATION - Balance
                            correction cancellation

                            * BANKRUPTCY - Bankruptcy

                            * BANKRUPTCY_CANCELLATION - Bankruptcy cancellation

                            * BOND_DEFAULT - Bond default

                            * BOND_DEFAULT_CANCELLATION - Bond default
                            cancellation

                            * BOND_HOLDER_MEETING - Bond holder meeting

                            * BOND_HOLDER_MEETING_CANCELLATION - Bond holder
                            meeting cancellation

                            * BONUS_ISSUE - Bonus Issue/Capitalisation Issue

                            * BONUS_ISSUE_CANCELLATION - Bonus
                            Issue/Capitalisation Issue, Cancellation

                            * CALL_ON_INTERMEDIATE_SECURITIES - Call on
                            Intermediate Securities

                            * CALL_ON_INTERMEDIATE_SECURITIES_CANCELLATION -
                            Call on Intermediate Securities, Cancellation

                            * CAPITAL_DISTRIBUTION - Capital distribution

                            * CAPITAL_DISTRIBUTION_CANCELLATION - Capital
                            distribution cancellation

                            * CAPITAL_GAINS_DISTRIBUTION - Capital gains
                            distribution

                            * CAPITAL_GAINS_DISTRIBUTION_CANCELLATION - Capital
                            gains distribution cancellation

                            * CAPITALISATION - Capitalisation

                            * CAPITALISATION_CANCELLATION - Capitalisation
                            cancellation

                            *
                            CASH_DISTRIBUTION_FROM_NON_ELIGIBLE_SECURITIES_SALES
                            - Cash distribution from non eligible securities
                            sales

                            *
                            CASH_DISTRIBUTION_FROM_NON_ELIGIBLE_SECURITIES_SALES_CANCELLATION
                            - Cash distribution from non eligible securities
                            sales cancellation

                            * CASH_DIVIDEND - Cash dividend

                            * CASH_DIVIDEND_CANCELLATION - Cash dividend
                            cancellation

                            * CHANGE - Change

                            * CHANGE_CANCELLATION - Change, Cancellation

                            * CLASS_ACTION - Class action

                            * CLASS_ACTION_CANCELLATION - Class action
                            cancellation

                            * COMPANY_OPTION - Company option

                            * COMPANY_OPTION_CANCELLATION - Company option
                            cancellation

                            * CONSENT - Consent

                            * CONSENT_CANCELLATION - Consent cancellation

                            * CONVERSION - Conversion

                            * CONVERSION_CANCELLATION - Conversion cancellation

                            * COURT_MEETING - Court meeting

                            * COURT_MEETING_CANCELLATION - Court meeting
                            cancellation

                            * CREDIT_EVENT - Credit event

                            * CREDIT_EVENT_CANCELLATION - Credit event
                            cancellation

                            * DECREASE_IN_VALUE - Decrease in value

                            * DECREASE_IN_VALUE_CANCELLATION - Decrease in value
                            cancellation

                            * DETACHMENT - Detachment

                            * DETACHMENT_CANCELLATION - Detachment cancellation

                            * DISCLOSURE - Disclosure

                            * DISCLOSURE_CANCELLATION - Disclosure cancellation

                            * DIVIDEND_OPTION - Dividend Option

                            * DIVIDEND_OPTION_CANCELLATION - Dividend Option,
                            Cancellation

                            * DIVIDEND_REINVESTMENT - Dividend Reinvestment

                            * DIVIDEND_REINVESTMENT_CANCELLATION - Dividend
                            Reinvestment, Cancellation

                            * DRAWING - Drawing

                            * DRAWING_CANCELLATION - Drawing cancellation

                            * DUST_CLEANUP - Dust Cleanup

                            * DUTCH_AUCTION - Dutch Auction

                            * DUTCH_AUCTION_CANCELLATION - Dutch Auction,
                            Cancellation

                            * EXCHANGE - Exchange

                            * EXCHANGE_CANCELLATION - Exchange cancellation

                            * EXTRAORDINARY_OR_SPECIAL_GENERAL_MEETING -
                            Extraordinary or special general meeting

                            *
                            EXTRAORDINARY_OR_SPECIAL_GENERAL_MEETING_CANCELLATION
                            - Extraordinary or special general meeting
                            cancellation

                            * FINAL_MATURITY - Final maturity

                            * FINAL_MATURITY_CANCELLATION - Final maturity
                            cancellation

                            * FULL_CALL - Full call

                            * FULL_CALL_CANCELLATION - Full call cancellation

                            * INCREASE_IN_VALUE - Increase in value

                            * INCREASE_IN_VALUE_CANCELLATION - Increase in value
                            cancellation

                            * INFORMATION - Information

                            * INFORMATION_CANCELLATION - Information
                            cancellation

                            * INSTALMENT_CALL - Instalment call

                            * INSTALMENT_CALL_CANCELLATION - Instalment call
                            cancellation

                            * INTEREST_PAYMENT - Interest payment

                            * INTEREST_PAYMENT_CANCELLATION - Interest payment
                            cancellation

                            * INTERMEDIATE_SECURITIES_DISTRIBUTION -
                            Intermediate Securities Distribution

                            * INTERMEDIATE_SECURITIES_DISTRIBUTION_CANCELLATION
                            - Intermediate Securities Distribution, Cancellation

                            * LIQUIDATION_PAYMENT - Liquidation
                            Dividend/Liquidation Payment

                            * LIQUIDATION_PAYMENT_CANCELLATION - Liquidation
                            Dividend/Liquidation Payment, Cancellation

                            * MATURITY_EXTENSION - Maturity extension

                            * MATURITY_EXTENSION_CANCELLATION - Maturity
                            extension cancellation

                            * MERGER - Merger

                            * MERGER_CANCELLATION - Merger, Cancellation

                            * NON_OFFICIAL_OFFER - Non-Official Offer

                            * NON_OFFICIAL_OFFER_CANCELLATION - Non-Official
                            Offer, Cancellation

                            * NON_US_TEFRA_D_CERTIFICATION - Non us tefra d
                            certification

                            * NON_US_TEFRA_D_CERTIFICATION_CANCELLATION - Non us
                            tefra d certification cancellation

                            * ODD_LOT_SALE - Odd Lot Sale/Purchase

                            * ODD_LOT_SALE_CANCELLATION - Odd Lot Sale/Purchase,
                            Cancellation

                            * ORDER_EXECUTION - Order execution

                            * ORDER_EXECUTION_CANCELLATION - Order execution
                            cancellation

                            * ORDINARY_GENERAL_MEETING - Ordinary general
                            meeting

                            * ORDINARY_GENERAL_MEETING_CANCELLATION - Ordinary
                            general meeting cancellation

                            * OTHER_EVENT - Other Event

                            * OTHER_EVENT_CANCELLATION - Other Event
                            cancellation

                            * PARI_PASSU - Pari passu

                            * PARI_PASSU_CANCELLATION - Pari passu cancellation

                            * PARTIAL_DEFEASANCE - Partial defeasance

                            * PARTIAL_DEFEASANCE_CANCELLATION - Partial
                            defeasance cancellation

                            * PARTIAL_REDEMPTION_WITH_POOL_FACTOR_REDUCTION -
                            Partial redemption with pool factor reduction

                            *
                            PARTIAL_REDEMPTION_WITH_POOL_FACTOR_REDUCTION_CANCELLATION
                            - Partial redemption with pool factor reduction
                            cancellation

                            * PARTIAL_REDEMPTION_WITHOUT_POOL_FACTOR_REDUCTION -
                            Partial redemption without pool factor reduction

                            *
                            PARTIAL_REDEMPTION_WITHOUT_POOL_FACTOR_REDUCTION_CANCELLATION
                            - Partial redemption without pool factor reduction
                            cancellation

                            * PAY_IN_KIND - Pay in kind

                            * PAY_IN_KIND_CANCELLATION - Pay in kind
                            cancellation

                            * PEAK_FRACTION_COMPENSATION - Peak fraction
                            compensation

                            * PEAK_ORDER_ADJUSTMENT - Peak order adjustment

                            * PLACE_OF_INCORPORATION - Place of incorporation

                            * PLACE_OF_INCORPORATION_CANCELLATION - Place of
                            incorporation cancellation

                            * PRIORITY_ISSUE - Priority Issue

                            * PRIORITY_ISSUE_CANCELLATION - Priority Issue,
                            Cancellation

                            * PUT_REDEMPTION - Put redemption

                            * PUT_REDEMPTION_CANCELLATION - Put redemption
                            cancellation

                            * REDENOMINATION - Redenomination

                            * REDENOMINATION_CANCELLATION - Redenomination
                            cancellation

                            * REMARKETING_AGREEMENT - Remarketing agreement

                            * REMARKETING_AGREEMENT_CANCELLATION - Remarketing
                            agreement cancellation

                            * REPURCHASE_OFFER - Repurchase Offer/Issuer
                            Bid/Reverse Rights

                            * REPURCHASE_OFFER_CANCELLATION - Repurchase
                            Offer/Issuer Bid/Reverse Rights, Cancellation

                            * REVERSE_STOCK_SPLIT - Reverse Stock Split/Change
                            in Nominal Value

                            * REVERSE_STOCK_SPLIT_CANCELLATION - Reverse Stock
                            Split/Change in Nominal Value, Cancellation

                            * RIGHTS_ISSUE - Rights Issue/Subscription
                            Rights/Rights Offer

                            * RIGHTS_ISSUE_CANCELLATION - Rights
                            Issue/Subscription Rights/Rights Offer, Cancellation

                            * SCRIP_DIVIDEND - Scrip dividend

                            * SCRIP_DIVIDEND_CANCELLATION - Scrip dividend
                            cancellation

                            * SECURITIES_TRANSFER - Securities transfer

                            * SECURITIES_TRANSFER_CANCELLATION - Securities
                            transfer cancellation

                            * SHARES_PREMIUM_DIVIDEND - Shares premium dividend

                            * SHARES_PREMIUM_DIVIDEND_CANCELLATION - Shares
                            premium dividend cancellation

                            * SMALLEST_NEGOTIABLE_UNIT - Smallest negotiable
                            unit

                            * SMALLEST_NEGOTIABLE_UNIT_CANCELLATION - Smallest
                            negotiable unit cancellation

                            * SPIN_OFF - Spin-Off

                            * SPIN_OFF_CANCELLATION - Spin-Off, Cancellation

                            * STOCK_DIVIDEND - Stock Dividend

                            * STOCK_DIVIDEND_CANCELLATION - Stock Dividend,
                            Cancellation

                            * STOCK_SPLIT - Stock Split/Change in Nominal
                            Value/Subdivision

                            * STOCK_SPLIT_CANCELLATION - Stock Split/Change in
                            Nominal Value/Subdivision, Cancellation

                            * TAX_ON_NON_DISTRIBUTED_PROCEEDS - Tax on non
                            distributed proceeds

                            * TAX_ON_NON_DISTRIBUTED_PROCEEDS_CANCELLATION - Tax
                            on non distributed proceeds cancellation

                            * TAX_OPTIMISATION - Tax optimisation

                            * TAX_RECLAIM - Tax reclaim

                            * TAX_RECLAIM_CANCELLATION - Tax reclaim
                            cancellation

                            * TENDER - Tender/Acquisition/Takeover/Purchase
                            Offer

                            * TENDER_CANCELLATION -
                            Tender/Acquisition/Takeover/Purchase Offer,
                            Cancellation

                            * TRADING_STATUS_ACTIVE - Trading status active

                            * TRADING_STATUS_ACTIVE_CANCELLATION - Trading
                            status active cancellation

                            * TRADING_STATUS_DELISTED - Trading status delisted

                            * TRADING_STATUS_DELISTED_CANCELLATION - Trading
                            status delisted cancellation

                            * TRADING_STATUS_SUSPENDED - Trading status
                            suspended

                            * TRADING_STATUS_SUSPENDED_CANCELLATION - Trading
                            status suspended cancellation

                            * VIRTUAL_CASH_CORRECTION_CANCELLATION - Virtual
                            cash correction cancellation

                            * WARRANT_EXERCISE - Warrant exercise

                            * WARRANT_EXERCISE_CANCELLATION - Warrant exercise
                            cancellation

                            * WITHHOLDING_TAX_RELIEF_CERTIFICATION - Withholding
                            tax relief certification

                            * WITHHOLDING_TAX_RELIEF_CERTIFICATION_CANCELLATION
                            - Withholding tax relief certification cancellation

                            * WORTHLESS - Worthless

                            * WORTHLESS_CANCELLATION - Worthless, Cancellation
                          type: string
                          enum:
                            - ACCUMULATION
                            - ACCUMULATION_CANCELLATION
                            - ANNUAL_GENERAL_MEETING
                            - ANNUAL_GENERAL_MEETING_CANCELLATION
                            - ATTACHMENT
                            - ATTACHMENT_CANCELLATION
                            - BALANCE_CORRECTION
                            - BALANCE_CORRECTION_CANCELLATION
                            - BANKRUPTCY
                            - BANKRUPTCY_CANCELLATION
                            - BOND_DEFAULT
                            - BOND_DEFAULT_CANCELLATION
                            - BOND_HOLDER_MEETING
                            - BOND_HOLDER_MEETING_CANCELLATION
                            - BONUS_ISSUE
                            - BONUS_ISSUE_CANCELLATION
                            - CALL_ON_INTERMEDIATE_SECURITIES
                            - CALL_ON_INTERMEDIATE_SECURITIES_CANCELLATION
                            - CAPITAL_DISTRIBUTION
                            - CAPITAL_DISTRIBUTION_CANCELLATION
                            - CAPITAL_GAINS_DISTRIBUTION
                            - CAPITAL_GAINS_DISTRIBUTION_CANCELLATION
                            - CAPITALISATION
                            - CAPITALISATION_CANCELLATION
                            - >-
                              CASH_DISTRIBUTION_FROM_NON_ELIGIBLE_SECURITIES_SALES
                            - >-
                              CASH_DISTRIBUTION_FROM_NON_ELIGIBLE_SECURITIES_SALES_CANCELLATION
                            - CASH_DIVIDEND
                            - CASH_DIVIDEND_CANCELLATION
                            - CHANGE
                            - CHANGE_CANCELLATION
                            - CLASS_ACTION
                            - CLASS_ACTION_CANCELLATION
                            - COMPANY_OPTION
                            - COMPANY_OPTION_CANCELLATION
                            - CONSENT
                            - CONSENT_CANCELLATION
                            - CONVERSION
                            - CONVERSION_CANCELLATION
                            - COURT_MEETING
                            - COURT_MEETING_CANCELLATION
                            - CREDIT_EVENT
                            - CREDIT_EVENT_CANCELLATION
                            - DECREASE_IN_VALUE
                            - DECREASE_IN_VALUE_CANCELLATION
                            - DETACHMENT
                            - DETACHMENT_CANCELLATION
                            - DISCLOSURE
                            - DISCLOSURE_CANCELLATION
                            - DIVIDEND_OPTION
                            - DIVIDEND_OPTION_CANCELLATION
                            - DIVIDEND_REINVESTMENT
                            - DIVIDEND_REINVESTMENT_CANCELLATION
                            - DRAWING
                            - DRAWING_CANCELLATION
                            - DUST_CLEANUP
                            - DUTCH_AUCTION
                            - DUTCH_AUCTION_CANCELLATION
                            - EXCHANGE
                            - EXCHANGE_CANCELLATION
                            - EXTRAORDINARY_OR_SPECIAL_GENERAL_MEETING
                            - >-
                              EXTRAORDINARY_OR_SPECIAL_GENERAL_MEETING_CANCELLATION
                            - FINAL_MATURITY
                            - FINAL_MATURITY_CANCELLATION
                            - FULL_CALL
                            - FULL_CALL_CANCELLATION
                            - INCREASE_IN_VALUE
                            - INCREASE_IN_VALUE_CANCELLATION
                            - INFORMATION
                            - INFORMATION_CANCELLATION
                            - INSTALMENT_CALL
                            - INSTALMENT_CALL_CANCELLATION
                            - INTEREST_PAYMENT
                            - INTEREST_PAYMENT_CANCELLATION
                            - INTERMEDIATE_SECURITIES_DISTRIBUTION
                            - INTERMEDIATE_SECURITIES_DISTRIBUTION_CANCELLATION
                            - LIQUIDATION_PAYMENT
                            - LIQUIDATION_PAYMENT_CANCELLATION
                            - MATURITY_EXTENSION
                            - MATURITY_EXTENSION_CANCELLATION
                            - MERGER
                            - MERGER_CANCELLATION
                            - NON_OFFICIAL_OFFER
                            - NON_OFFICIAL_OFFER_CANCELLATION
                            - NON_US_TEFRA_D_CERTIFICATION
                            - NON_US_TEFRA_D_CERTIFICATION_CANCELLATION
                            - ODD_LOT_SALE
                            - ODD_LOT_SALE_CANCELLATION
                            - ORDER_EXECUTION
                            - ORDER_EXECUTION_CANCELLATION
                            - ORDINARY_GENERAL_MEETING
                            - ORDINARY_GENERAL_MEETING_CANCELLATION
                            - OTHER_EVENT
                            - OTHER_EVENT_CANCELLATION
                            - PARI_PASSU
                            - PARI_PASSU_CANCELLATION
                            - PARTIAL_DEFEASANCE
                            - PARTIAL_DEFEASANCE_CANCELLATION
                            - PARTIAL_REDEMPTION_WITH_POOL_FACTOR_REDUCTION
                            - >-
                              PARTIAL_REDEMPTION_WITH_POOL_FACTOR_REDUCTION_CANCELLATION
                            - PARTIAL_REDEMPTION_WITHOUT_POOL_FACTOR_REDUCTION
                            - >-
                              PARTIAL_REDEMPTION_WITHOUT_POOL_FACTOR_REDUCTION_CANCELLATION
                            - PAY_IN_KIND
                            - PAY_IN_KIND_CANCELLATION
                            - PEAK_FRACTION_COMPENSATION
                            - PEAK_ORDER_ADJUSTMENT
                            - PLACE_OF_INCORPORATION
                            - PLACE_OF_INCORPORATION_CANCELLATION
                            - PRIORITY_ISSUE
                            - PRIORITY_ISSUE_CANCELLATION
                            - PUT_REDEMPTION
                            - PUT_REDEMPTION_CANCELLATION
                            - REDENOMINATION
                            - REDENOMINATION_CANCELLATION
                            - REMARKETING_AGREEMENT
                            - REMARKETING_AGREEMENT_CANCELLATION
                            - REPURCHASE_OFFER
                            - REPURCHASE_OFFER_CANCELLATION
                            - REVERSE_STOCK_SPLIT
                            - REVERSE_STOCK_SPLIT_CANCELLATION
                            - RIGHTS_ISSUE
                            - RIGHTS_ISSUE_CANCELLATION
                            - SCRIP_DIVIDEND
                            - SCRIP_DIVIDEND_CANCELLATION
                            - SECURITIES_TRANSFER
                            - SECURITIES_TRANSFER_CANCELLATION
                            - SHARES_PREMIUM_DIVIDEND
                            - SHARES_PREMIUM_DIVIDEND_CANCELLATION
                            - SMALLEST_NEGOTIABLE_UNIT
                            - SMALLEST_NEGOTIABLE_UNIT_CANCELLATION
                            - SPIN_OFF
                            - SPIN_OFF_CANCELLATION
                            - STOCK_DIVIDEND
                            - STOCK_DIVIDEND_CANCELLATION
                            - STOCK_SPLIT
                            - STOCK_SPLIT_CANCELLATION
                            - TAX_ON_NON_DISTRIBUTED_PROCEEDS
                            - TAX_ON_NON_DISTRIBUTED_PROCEEDS_CANCELLATION
                            - TAX_OPTIMISATION
                            - TAX_RECLAIM
                            - TAX_RECLAIM_CANCELLATION
                            - TENDER
                            - TENDER_CANCELLATION
                            - TRADING_STATUS_ACTIVE
                            - TRADING_STATUS_ACTIVE_CANCELLATION
                            - TRADING_STATUS_DELISTED
                            - TRADING_STATUS_DELISTED_CANCELLATION
                            - TRADING_STATUS_SUSPENDED
                            - TRADING_STATUS_SUSPENDED_CANCELLATION
                            - VIRTUAL_CASH_CORRECTION_CANCELLATION
                            - WARRANT_EXERCISE
                            - WARRANT_EXERCISE_CANCELLATION
                            - WITHHOLDING_TAX_RELIEF_CERTIFICATION
                            - WITHHOLDING_TAX_RELIEF_CERTIFICATION_CANCELLATION
                            - WORTHLESS
                            - WORTHLESS_CANCELLATION
                        references:
                          type: array
                          items:
                            title: Security transaction reference
                            description: >-
                              Entity representing security transaction
                              reference.
                            type: object
                            properties:
                              id:
                                title: Unique identifier for a resource of given type
                                type: string
                                description: >-
                                  Unique identifier for a resource of given
                                  type.
                                format: uuid
                              type:
                                type: string
                                description: >-
                                  Type of the reference.

                                  * ORDER - Order

                                  * ORDER_EXECUTION - Order execution

                                  * CORPORATE_ACTION - Corporate action

                                  * CORPORATE_ACTION_TRANSACTION_ID - Corporate
                                  action transaction ID
                                enum:
                                  - ORDER
                                  - ORDER_EXECUTION
                                  - CORPORATE_ACTION
                                  - CORPORATE_ACTION_TRANSACTION_ID
                            required:
                              - id
                              - type
                            additionalProperties: false
                        updated_at:
                          type: string
                          format: date-time
                          description: >-
                            Date and time when the resource was last updated.
                            [RFC
                            3339-5](https://datatracker.ietf.org/doc/html/rfc3339#section-5.6),
                            [ISO8601
                            UTC](https://www.iso.org/iso-8601-date-and-time-format.html)
                        value_date:
                          title: Transaction value date
                          type: string
                          description: >-
                            Transaction value date and time. [RFC
                            3339-5](https://datatracker.ietf.org/doc/html/rfc3339#section-5.6),
                            [ISO8601
                            UTC](https://www.iso.org/iso-8601-date-and-time-format.html)
                          format: date-time
                      required:
                        - id
                        - type
                        - account_id
                        - account_group_id
                        - instrument
                        - delta
                        - references
                        - value_date
                        - booking_date
                        - created_at
                        - updated_at
                      additionalProperties: true
                required:
                  - meta
                  - data
                additionalProperties: false
              example:
                meta:
                  offset: 0
                  limit: 100
                  count: 2
                  total_count: 2
                  sort: booking_date
                  order: ASC
                data:
                  - id: 6dc9fbca-8835-11ed-a217-2eabd0c03f8a
                    created_at: '2023-01-01T00:00:00.000Z'
                    updated_at: '2023-01-01T00:00:00.000Z'
                    type: ORDER_EXECUTION
                    account_id: db6290bb-1491-45bf-aafe-262dad59d497
                    account_group_id: 6409e3f2-8835-11ed-96a4-2eabd0c03f8a
                    instrument:
                      isin: US0378331005
                      uuid: ccb86937-8a39-4160-8d33-85bf9e902321
                    delta:
                      amount: '-2.5234543879'
                    references:
                      - id: 7579a672-8835-11ed-9455-2eabd0c03f8a
                        type: ORDER_EXECUTION
                      - id: 1f5758d3-1ef7-4b4c-96ec-6b3da2bf1a8a
                        type: ORDER
                    booking_date: '2023-01-01T00:00:00.000Z'
                    value_date: '2023-01-01T00:00:00.000Z'
                  - id: 6dc9fbca-8835-11ed-a217-2eabd0c03f8a
                    created_at: '2023-01-01T00:00:00.000Z'
                    updated_at: '2023-01-01T00:00:00.000Z'
                    type: ORDER_EXECUTION_CANCELLATION
                    account_id: db6290bb-1491-45bf-aafe-262dad59d497
                    account_group_id: 6409e3f2-8835-11ed-96a4-2eabd0c03f8a
                    instrument:
                      isin: US0378331005
                      uuid: ccb86937-8a39-4160-8d33-85bf9e902321
                    delta:
                      amount: '2.5234543879'
                    references:
                      - id: 7579a672-8835-11ed-9455-2eabd0c03f8a
                        type: ORDER_EXECUTION
                      - id: 1f5758d3-1ef7-4b4c-96ec-6b3da2bf1a8a
                        type: ORDER
                    booking_date: '2023-01-01T00:00:00.000Z'
                    value_date: '2023-01-01T00:00:00.000Z'
        '400':
          description: Bad Request. The incoming request had a malformed parameter/object.
          headers:
            upvest-request-id:
              required: true
              schema:
                type: string
                format: uuid
                example: 169ae4c7-ebd7-4041-94da-25369653eba7
          content:
            application/problem+json:
              schema:
                title: Error
                type: object
                description: ''
                properties:
                  type:
                    type: string
                    description: URL to a document describing the error condition.
                  status:
                    type: integer
                    description: >-
                      Transmission of the HTTP status code so that all
                      information can be found in one place, but also to correct
                      changes in the status code due to the use of proxy
                      servers.
                  title:
                    type: string
                    description: >-
                      A short, human-readable title for the general error type;
                      the title should not change for given types.
                  detail:
                    type: string
                    description: A human-readable description of the specific error.
                  instance:
                    type: string
                    description: >-
                      This optional key may be present, with a unique URI for
                      the specific error; this will often point to an error log
                      for that specific response.
                  request_id:
                    type: string
                    description: Correlation ID for the original request.
                required:
                  - type
                  - status
                additionalProperties: false
              example:
                status: 400
                type: bad_request
        '401':
          description: Unauthorized. The caller has not been authenticated.
          headers:
            upvest-request-id:
              required: true
              schema:
                type: string
                format: uuid
                example: 169ae4c7-ebd7-4041-94da-25369653eba7
          content:
            application/problem+json:
              schema:
                title: Error
                type: object
                description: ''
                properties:
                  type:
                    type: string
                    description: URL to a document describing the error condition.
                  status:
                    type: integer
                    description: >-
                      Transmission of the HTTP status code so that all
                      information can be found in one place, but also to correct
                      changes in the status code due to the use of proxy
                      servers.
                  title:
                    type: string
                    description: >-
                      A short, human-readable title for the general error type;
                      the title should not change for given types.
                  detail:
                    type: string
                    description: A human-readable description of the specific error.
                  instance:
                    type: string
                    description: >-
                      This optional key may be present, with a unique URI for
                      the specific error; this will often point to an error log
                      for that specific response.
                  request_id:
                    type: string
                    description: Correlation ID for the original request.
                required:
                  - type
                  - status
                additionalProperties: false
              example:
                status: 401
                type: unauthorized
        '403':
          description: >-
            Forbidden. The caller has been authenticated but is not allowed to
            take the requested action.
          headers:
            upvest-request-id:
              required: true
              schema:
                type: string
                format: uuid
                example: 169ae4c7-ebd7-4041-94da-25369653eba7
          content:
            application/problem+json:
              schema:
                title: Error
                type: object
                description: ''
                properties:
                  type:
                    type: string
                    description: URL to a document describing the error condition.
                  status:
                    type: integer
                    description: >-
                      Transmission of the HTTP status code so that all
                      information can be found in one place, but also to correct
                      changes in the status code due to the use of proxy
                      servers.
                  title:
                    type: string
                    description: >-
                      A short, human-readable title for the general error type;
                      the title should not change for given types.
                  detail:
                    type: string
                    description: A human-readable description of the specific error.
                  instance:
                    type: string
                    description: >-
                      This optional key may be present, with a unique URI for
                      the specific error; this will often point to an error log
                      for that specific response.
                  request_id:
                    type: string
                    description: Correlation ID for the original request.
                required:
                  - type
                  - status
                additionalProperties: false
              example:
                status: 403
                type: forbidden
        '404':
          description: Not Found. The requested resource could not be found.
          headers:
            upvest-request-id:
              required: true
              schema:
                type: string
                format: uuid
                example: 169ae4c7-ebd7-4041-94da-25369653eba7
          content:
            application/problem+json:
              schema:
                title: Error
                type: object
                description: ''
                properties:
                  type:
                    type: string
                    description: URL to a document describing the error condition.
                  status:
                    type: integer
                    description: >-
                      Transmission of the HTTP status code so that all
                      information can be found in one place, but also to correct
                      changes in the status code due to the use of proxy
                      servers.
                  title:
                    type: string
                    description: >-
                      A short, human-readable title for the general error type;
                      the title should not change for given types.
                  detail:
                    type: string
                    description: A human-readable description of the specific error.
                  instance:
                    type: string
                    description: >-
                      This optional key may be present, with a unique URI for
                      the specific error; this will often point to an error log
                      for that specific response.
                  request_id:
                    type: string
                    description: Correlation ID for the original request.
                required:
                  - type
                  - status
                additionalProperties: false
              example:
                status: 404
                type: not_found
        '405':
          description: >-
            Method Not Allowed. The requested method is not allowed on the
            requested resource.
          headers:
            upvest-request-id:
              required: true
              schema:
                type: string
                format: uuid
                example: 169ae4c7-ebd7-4041-94da-25369653eba7
          content:
            application/problem+json:
              schema:
                title: Error
                type: object
                description: ''
                properties:
                  type:
                    type: string
                    description: URL to a document describing the error condition.
                  status:
                    type: integer
                    description: >-
                      Transmission of the HTTP status code so that all
                      information can be found in one place, but also to correct
                      changes in the status code due to the use of proxy
                      servers.
                  title:
                    type: string
                    description: >-
                      A short, human-readable title for the general error type;
                      the title should not change for given types.
                  detail:
                    type: string
                    description: A human-readable description of the specific error.
                  instance:
                    type: string
                    description: >-
                      This optional key may be present, with a unique URI for
                      the specific error; this will often point to an error log
                      for that specific response.
                  request_id:
                    type: string
                    description: Correlation ID for the original request.
                required:
                  - type
                  - status
                additionalProperties: false
              example:
                status: 405
                type: method_not_allowed
        '406':
          description: >-
            Not Acceptable. The resource does not have a current representation
            that would be acceptable to the user agent. "Accept" header defined
            unsupported value.
          headers:
            upvest-request-id:
              required: true
              schema:
                type: string
                format: uuid
                example: 169ae4c7-ebd7-4041-94da-25369653eba7
          content:
            application/problem+json:
              schema:
                title: Error
                type: object
                description: ''
                properties:
                  type:
                    type: string
                    description: URL to a document describing the error condition.
                  status:
                    type: integer
                    description: >-
                      Transmission of the HTTP status code so that all
                      information can be found in one place, but also to correct
                      changes in the status code due to the use of proxy
                      servers.
                  title:
                    type: string
                    description: >-
                      A short, human-readable title for the general error type;
                      the title should not change for given types.
                  detail:
                    type: string
                    description: A human-readable description of the specific error.
                  instance:
                    type: string
                    description: >-
                      This optional key may be present, with a unique URI for
                      the specific error; this will often point to an error log
                      for that specific response.
                  request_id:
                    type: string
                    description: Correlation ID for the original request.
                required:
                  - type
                  - status
                additionalProperties: false
              example:
                status: 406
                type: not_acceptable
        '429':
          description: >-
            Too Many Requests. The caller has exceeded their quota for the time
            period and has been throttled.
          headers:
            upvest-request-id:
              required: true
              schema:
                type: string
                format: uuid
                example: 169ae4c7-ebd7-4041-94da-25369653eba7
          content:
            application/problem+json:
              schema:
                title: Error
                type: object
                description: ''
                properties:
                  type:
                    type: string
                    description: URL to a document describing the error condition.
                  status:
                    type: integer
                    description: >-
                      Transmission of the HTTP status code so that all
                      information can be found in one place, but also to correct
                      changes in the status code due to the use of proxy
                      servers.
                  title:
                    type: string
                    description: >-
                      A short, human-readable title for the general error type;
                      the title should not change for given types.
                  detail:
                    type: string
                    description: A human-readable description of the specific error.
                  instance:
                    type: string
                    description: >-
                      This optional key may be present, with a unique URI for
                      the specific error; this will often point to an error log
                      for that specific response.
                  request_id:
                    type: string
                    description: Correlation ID for the original request.
                required:
                  - type
                  - status
                additionalProperties: false
              example:
                status: 429
                type: too_many_requests
        '500':
          description: Internal Server Error. The service encountered an unexpected error.
          headers:
            upvest-request-id:
              required: true
              schema:
                type: string
                format: uuid
                example: 169ae4c7-ebd7-4041-94da-25369653eba7
          content:
            application/problem+json:
              schema:
                title: Error
                type: object
                description: ''
                properties:
                  type:
                    type: string
                    description: URL to a document describing the error condition.
                  status:
                    type: integer
                    description: >-
                      Transmission of the HTTP status code so that all
                      information can be found in one place, but also to correct
                      changes in the status code due to the use of proxy
                      servers.
                  title:
                    type: string
                    description: >-
                      A short, human-readable title for the general error type;
                      the title should not change for given types.
                  detail:
                    type: string
                    description: A human-readable description of the specific error.
                  instance:
                    type: string
                    description: >-
                      This optional key may be present, with a unique URI for
                      the specific error; this will often point to an error log
                      for that specific response.
                  request_id:
                    type: string
                    description: Correlation ID for the original request.
                required:
                  - type
                  - status
                additionalProperties: false
              example:
                status: 500
                type: internal_server_error
        '503':
          description: >-
            Service Unavailable. The service handling for this request cannot be
            reached at this time.
          headers:
            upvest-request-id:
              required: true
              schema:
                type: string
                format: uuid
                example: 169ae4c7-ebd7-4041-94da-25369653eba7
          content:
            application/problem+json:
              schema:
                title: Error
                type: object
                description: ''
                properties:
                  type:
                    type: string
                    description: URL to a document describing the error condition.
                  status:
                    type: integer
                    description: >-
                      Transmission of the HTTP status code so that all
                      information can be found in one place, but also to correct
                      changes in the status code due to the use of proxy
                      servers.
                  title:
                    type: string
                    description: >-
                      A short, human-readable title for the general error type;
                      the title should not change for given types.
                  detail:
                    type: string
                    description: A human-readable description of the specific error.
                  instance:
                    type: string
                    description: >-
                      This optional key may be present, with a unique URI for
                      the specific error; this will often point to an error log
                      for that specific response.
                  request_id:
                    type: string
                    description: Correlation ID for the original request.
                required:
                  - type
                  - status
                additionalProperties: false
              example:
                status: 503
                type: method_not_allowed
        '504':
          description: >-
            Gateway Timeout. The service gateway has reached its internal
            timeout.
          headers:
            upvest-request-id:
              required: true
              schema:
                type: string
                format: uuid
                example: 169ae4c7-ebd7-4041-94da-25369653eba7
          content:
            application/problem+json:
              schema:
                title: Error
                type: object
                description: ''
                properties:
                  type:
                    type: string
                    description: URL to a document describing the error condition.
                  status:
                    type: integer
                    description: >-
                      Transmission of the HTTP status code so that all
                      information can be found in one place, but also to correct
                      changes in the status code due to the use of proxy
                      servers.
                  title:
                    type: string
                    description: >-
                      A short, human-readable title for the general error type;
                      the title should not change for given types.
                  detail:
                    type: string
                    description: A human-readable description of the specific error.
                  instance:
                    type: string
                    description: >-
                      This optional key may be present, with a unique URI for
                      the specific error; this will often point to an error log
                      for that specific response.
                  request_id:
                    type: string
                    description: Correlation ID for the original request.
                required:
                  - type
                  - status
                additionalProperties: false
              example:
                status: 504
                type: gateway_timeout
  /accounts/{account_id}/liquidations:
    parameters:
      - name: account_id
        in: path
        required: true
        schema:
          title: Account unique identifier.
          type: string
          description: Account unique identifier.
          format: uuid
      - name: upvest-client-id
        in: header
        description: Tenant Client ID
        required: true
        schema:
          type: string
          format: uuid
          example: ebabcf4d-61c3-4942-875c-e265a7c2d062
      - name: authorization
        in: header
        description: |
          Bearer (access) token from the OAuth flow with correct scopes.
          https://datatracker.ietf.org/doc/html/rfc6750
        required: true
        schema:
          type: string
          pattern: ^Bearer [a-zA-Z0-9\-\._~+/]*=*
          example: Bearer c2VjcmV0Cg==
      - name: signature
        in: header
        required: true
        schema:
          type: string
        description: >-
          https://tools.ietf.org/id/draft-ietf-httpbis-message-signatures-01.html#name-the-signature-http-header
      - name: signature-input
        in: header
        required: true
        schema:
          type: string
        description: >-
          https://tools.ietf.org/id/draft-ietf-httpbis-message-signatures-01.html#name-the-signature-input-http-he
      - name: upvest-api-version
        in: header
        required: false
        schema:
          type: string
          enum:
            - '1'
          default: '1'
          example: '1'
        description: 'Upvest API version (Note: Do not include quotation marks)'
    get:
      operationId: list_accounts_liquidations
      summary: List accounts liquidations
      description: List accounts liquidations
      tags:
        - Liquidations
      security:
        - oauth-client-credentials:
            - account_liquidations:read
            - account_liquidations:admin
      parameters:
        - name: sort
          in: query
          required: false
          schema:
            type: string
            enum:
              - id
            default: id
          description: Sort the result by `id`.
        - name: order
          in: query
          required: false
          schema:
            type: string
            enum:
              - ASC
            default: ASC
          description: >-
            Sort order of the result list if the `sort` parameter is specified.
            By default, only ASC for ascending sort.
        - name: offset
          in: query
          schema:
            type: integer
            minimum: 0
            format: int32
          allowEmptyValue: true
          description: >-
            Use the `offset` argument to specify where in the list of results to
            start when returning items for a particular query.
        - name: limit
          in: query
          schema:
            type: integer
            format: int32
            default: 100
            minimum: 0
            maximum: 1000
          allowEmptyValue: true
          description: >-
            Use the `limit` argument to specify the maximum number of items
            returned.
        - name: start_date
          in: query
          required: false
          schema:
            type: string
            title: Date in YYYY-MM-DD format. RFC 3339, section 5.6
          description: >-
            Returns accounts liquidations created starting from and including
            this date (UTC)
          example: '2022-10-14T10:10:10Z'
        - name: end_date
          in: query
          required: false
          schema:
            type: string
            title: Date in YYYY-MM-DD format. RFC 3339, section 5.6
          description: Returns accounts liquidations created up until this date (UTC)
          example: '2022-10-14T10:10:10Z'
      responses:
        '200':
          description: Accounts liquidations
          headers:
            upvest-request-id:
              required: true
              schema:
                type: string
                format: uuid
                example: 169ae4c7-ebd7-4041-94da-25369653eba7
          content:
            application/json:
              schema:
                title: Portfolios orders - List - Response
                type: object
                properties:
                  meta:
                    type: object
                    properties:
                      offset:
                        type: integer
                        description: Amount of resource to offset in the response.
                      limit:
                        type: integer
                        description: Total limit of the response.
                      count:
                        type: integer
                        description: Count of the resources returned in the response.
                      total_count:
                        type: integer
                        description: Total count of all the resources.
                      sort:
                        type: string
                        description: The field that the list is sorted by.
                      order:
                        type: string
                        description: |-
                          The ordering of the response.
                          * ASC - Ascending order
                          * DESC - Descending order
                        enum:
                          - ASC
                          - DESC
                    required:
                      - offset
                      - limit
                      - count
                      - total_count
                  data:
                    type: array
                    items:
                      title: Account liquidation
                      type: object
                      properties:
                        id:
                          title: Account liquidation unique identifier
                          type: string
                          format: uuid
                        created_at:
                          type: string
                          format: date-time
                          description: >-
                            Date and time when the resource was created. [RFC
                            3339-5](https://datatracker.ietf.org/doc/html/rfc3339#section-5.6),
                            [ISO8601
                            UTC](https://www.iso.org/iso-8601-date-and-time-format.html)
                        updated_at:
                          type: string
                          format: date-time
                          description: >-
                            Date and time when the resource was last updated.
                            [RFC
                            3339-5](https://datatracker.ietf.org/doc/html/rfc3339#section-5.6),
                            [ISO8601
                            UTC](https://www.iso.org/iso-8601-date-and-time-format.html)
                        user_id:
                          title: User unique identifier.
                          type: string
                          description: User unique identifier.
                          format: uuid
                        account_id:
                          title: Account unique identifier.
                          type: string
                          description: Account unique identifier.
                          format: uuid
                        cash_amount:
                          type: string
                          pattern: ^[0-9]{0,63}(\.[0-9]{1,27})?$
                        currency:
                          type: string
                          description: >-
                            Alphabetic three-letter [ISO
                            4217](https://en.wikipedia.org/wiki/ISO_4217)
                            currency code.

                            * EUR - Euro

                            * GBP - British Pound
                          enum:
                            - EUR
                            - GBP
                        status:
                          type: string
                          description: |-
                            Execution status of the Account liquidation.
                            * NEW - 
                            * PROCESSING - 
                            * FILLED - 
                            * CANCELLED - 
                            * SETTLED - 
                          enum:
                            - NEW
                            - PROCESSING
                            - FILLED
                            - CANCELLED
                            - SETTLED
                        orders:
                          type: array
                          description: >-
                            Position liquidation orders associated with this
                            account liquidation
                          items:
                            title: Account liquidation
                            type: object
                            properties:
                              id:
                                title: Account liquidation order unique identifier
                                type: string
                                format: uuid
                              side:
                                type: string
                                description: |-
                                  Side of the order.
                                  * SELL - 
                                default: SELL
                              status:
                                type: string
                                description: >-
                                  Execution status of the Account liquidation
                                  order.

                                  * NEW - 

                                  * PROCESSING - 

                                  * FILLED - 

                                  * CANCELLED - 
                                enum:
                                  - NEW
                                  - PROCESSING
                                  - FILLED
                                  - CANCELLED
                            required:
                              - id
                              - side
                              - status
                            additionalProperties: false
                      required:
                        - id
                        - created_at
                        - updated_at
                        - account_id
                        - cash_amount
                        - currency
                        - status
                        - orders
                      additionalProperties: false
                required:
                  - meta
                  - data
                additionalProperties: false
              example:
                meta:
                  offset: 0
                  limit: 100
                  count: 1
                  total_count: 1
                  sort: id
                  order: ASC
                data:
                  - id: c5869b0c-e107-4e68-a89a-57ad43253dd6
                    created_at: '2021-07-21T14:10:00.000Z'
                    updated_at: '2021-07-21T14:10:00.000Z'
                    account_id: debf2026-f2da-4ff0-bb84-92e45babb1e3
                    cash_amount: '1000'
                    currency: EUR
                    status: PROCESSING
                    orders:
                      - id: b291d8a4-21f5-4c52-8590-4f90ce54d0b1
                        side: SELL
                        status: NEW
                      - id: 81d02bd9-7b9d-443d-bbfa-31df4d543f7d
                        side: SELL
                        status: PROCESSING
                      - id: e97fb564-ebb4-4f37-930a-bda49c09a2e4
                        side: SELL
                        status: FILLED
        '400':
          description: Bad Request. The incoming request had a malformed parameter/object.
          headers:
            upvest-request-id:
              required: true
              schema:
                type: string
                format: uuid
                example: 169ae4c7-ebd7-4041-94da-25369653eba7
          content:
            application/problem+json:
              schema:
                title: Error
                type: object
                description: ''
                properties:
                  type:
                    type: string
                    description: URL to a document describing the error condition.
                  status:
                    type: integer
                    description: >-
                      Transmission of the HTTP status code so that all
                      information can be found in one place, but also to correct
                      changes in the status code due to the use of proxy
                      servers.
                  title:
                    type: string
                    description: >-
                      A short, human-readable title for the general error type;
                      the title should not change for given types.
                  detail:
                    type: string
                    description: A human-readable description of the specific error.
                  instance:
                    type: string
                    description: >-
                      This optional key may be present, with a unique URI for
                      the specific error; this will often point to an error log
                      for that specific response.
                  request_id:
                    type: string
                    description: Correlation ID for the original request.
                required:
                  - type
                  - status
                additionalProperties: false
              example:
                status: 400
                type: bad_request
        '401':
          description: Unauthorized. The caller has not been authenticated.
          headers:
            upvest-request-id:
              required: true
              schema:
                type: string
                format: uuid
                example: 169ae4c7-ebd7-4041-94da-25369653eba7
          content:
            application/problem+json:
              schema:
                title: Error
                type: object
                description: ''
                properties:
                  type:
                    type: string
                    description: URL to a document describing the error condition.
                  status:
                    type: integer
                    description: >-
                      Transmission of the HTTP status code so that all
                      information can be found in one place, but also to correct
                      changes in the status code due to the use of proxy
                      servers.
                  title:
                    type: string
                    description: >-
                      A short, human-readable title for the general error type;
                      the title should not change for given types.
                  detail:
                    type: string
                    description: A human-readable description of the specific error.
                  instance:
                    type: string
                    description: >-
                      This optional key may be present, with a unique URI for
                      the specific error; this will often point to an error log
                      for that specific response.
                  request_id:
                    type: string
                    description: Correlation ID for the original request.
                required:
                  - type
                  - status
                additionalProperties: false
              example:
                status: 401
                type: unauthorized
        '403':
          description: >-
            Forbidden. The caller has been authenticated but is not allowed to
            take the requested action.
          headers:
            upvest-request-id:
              required: true
              schema:
                type: string
                format: uuid
                example: 169ae4c7-ebd7-4041-94da-25369653eba7
          content:
            application/problem+json:
              schema:
                title: Error
                type: object
                description: ''
                properties:
                  type:
                    type: string
                    description: URL to a document describing the error condition.
                  status:
                    type: integer
                    description: >-
                      Transmission of the HTTP status code so that all
                      information can be found in one place, but also to correct
                      changes in the status code due to the use of proxy
                      servers.
                  title:
                    type: string
                    description: >-
                      A short, human-readable title for the general error type;
                      the title should not change for given types.
                  detail:
                    type: string
                    description: A human-readable description of the specific error.
                  instance:
                    type: string
                    description: >-
                      This optional key may be present, with a unique URI for
                      the specific error; this will often point to an error log
                      for that specific response.
                  request_id:
                    type: string
                    description: Correlation ID for the original request.
                required:
                  - type
                  - status
                additionalProperties: false
              example:
                status: 403
                type: forbidden
        '404':
          description: Not Found. The requested resource could not be found.
          headers:
            upvest-request-id:
              required: true
              schema:
                type: string
                format: uuid
                example: 169ae4c7-ebd7-4041-94da-25369653eba7
          content:
            application/problem+json:
              schema:
                title: Error
                type: object
                description: ''
                properties:
                  type:
                    type: string
                    description: URL to a document describing the error condition.
                  status:
                    type: integer
                    description: >-
                      Transmission of the HTTP status code so that all
                      information can be found in one place, but also to correct
                      changes in the status code due to the use of proxy
                      servers.
                  title:
                    type: string
                    description: >-
                      A short, human-readable title for the general error type;
                      the title should not change for given types.
                  detail:
                    type: string
                    description: A human-readable description of the specific error.
                  instance:
                    type: string
                    description: >-
                      This optional key may be present, with a unique URI for
                      the specific error; this will often point to an error log
                      for that specific response.
                  request_id:
                    type: string
                    description: Correlation ID for the original request.
                required:
                  - type
                  - status
                additionalProperties: false
              example:
                status: 404
                type: not_found
        '405':
          description: >-
            Method Not Allowed. The requested method is not allowed on the
            requested resource.
          headers:
            upvest-request-id:
              required: true
              schema:
                type: string
                format: uuid
                example: 169ae4c7-ebd7-4041-94da-25369653eba7
          content:
            application/problem+json:
              schema:
                title: Error
                type: object
                description: ''
                properties:
                  type:
                    type: string
                    description: URL to a document describing the error condition.
                  status:
                    type: integer
                    description: >-
                      Transmission of the HTTP status code so that all
                      information can be found in one place, but also to correct
                      changes in the status code due to the use of proxy
                      servers.
                  title:
                    type: string
                    description: >-
                      A short, human-readable title for the general error type;
                      the title should not change for given types.
                  detail:
                    type: string
                    description: A human-readable description of the specific error.
                  instance:
                    type: string
                    description: >-
                      This optional key may be present, with a unique URI for
                      the specific error; this will often point to an error log
                      for that specific response.
                  request_id:
                    type: string
                    description: Correlation ID for the original request.
                required:
                  - type
                  - status
                additionalProperties: false
              example:
                status: 405
                type: method_not_allowed
        '406':
          description: >-
            Not Acceptable. The resource does not have a current representation
            that would be acceptable to the user agent. "Accept" header defined
            unsupported value.
          headers:
            upvest-request-id:
              required: true
              schema:
                type: string
                format: uuid
                example: 169ae4c7-ebd7-4041-94da-25369653eba7
          content:
            application/problem+json:
              schema:
                title: Error
                type: object
                description: ''
                properties:
                  type:
                    type: string
                    description: URL to a document describing the error condition.
                  status:
                    type: integer
                    description: >-
                      Transmission of the HTTP status code so that all
                      information can be found in one place, but also to correct
                      changes in the status code due to the use of proxy
                      servers.
                  title:
                    type: string
                    description: >-
                      A short, human-readable title for the general error type;
                      the title should not change for given types.
                  detail:
                    type: string
                    description: A human-readable description of the specific error.
                  instance:
                    type: string
                    description: >-
                      This optional key may be present, with a unique URI for
                      the specific error; this will often point to an error log
                      for that specific response.
                  request_id:
                    type: string
                    description: Correlation ID for the original request.
                required:
                  - type
                  - status
                additionalProperties: false
              example:
                status: 406
                type: not_acceptable
        '429':
          description: >-
            Too Many Requests. The caller has exceeded their quota for the time
            period and has been throttled.
          headers:
            upvest-request-id:
              required: true
              schema:
                type: string
                format: uuid
                example: 169ae4c7-ebd7-4041-94da-25369653eba7
          content:
            application/problem+json:
              schema:
                title: Error
                type: object
                description: ''
                properties:
                  type:
                    type: string
                    description: URL to a document describing the error condition.
                  status:
                    type: integer
                    description: >-
                      Transmission of the HTTP status code so that all
                      information can be found in one place, but also to correct
                      changes in the status code due to the use of proxy
                      servers.
                  title:
                    type: string
                    description: >-
                      A short, human-readable title for the general error type;
                      the title should not change for given types.
                  detail:
                    type: string
                    description: A human-readable description of the specific error.
                  instance:
                    type: string
                    description: >-
                      This optional key may be present, with a unique URI for
                      the specific error; this will often point to an error log
                      for that specific response.
                  request_id:
                    type: string
                    description: Correlation ID for the original request.
                required:
                  - type
                  - status
                additionalProperties: false
              example:
                status: 429
                type: too_many_requests
        '500':
          description: Internal Server Error. The service encountered an unexpected error.
          headers:
            upvest-request-id:
              required: true
              schema:
                type: string
                format: uuid
                example: 169ae4c7-ebd7-4041-94da-25369653eba7
          content:
            application/problem+json:
              schema:
                title: Error
                type: object
                description: ''
                properties:
                  type:
                    type: string
                    description: URL to a document describing the error condition.
                  status:
                    type: integer
                    description: >-
                      Transmission of the HTTP status code so that all
                      information can be found in one place, but also to correct
                      changes in the status code due to the use of proxy
                      servers.
                  title:
                    type: string
                    description: >-
                      A short, human-readable title for the general error type;
                      the title should not change for given types.
                  detail:
                    type: string
                    description: A human-readable description of the specific error.
                  instance:
                    type: string
                    description: >-
                      This optional key may be present, with a unique URI for
                      the specific error; this will often point to an error log
                      for that specific response.
                  request_id:
                    type: string
                    description: Correlation ID for the original request.
                required:
                  - type
                  - status
                additionalProperties: false
              example:
                status: 500
                type: internal_server_error
        '503':
          description: >-
            Service Unavailable. The service handling for this request cannot be
            reached at this time.
          headers:
            upvest-request-id:
              required: true
              schema:
                type: string
                format: uuid
                example: 169ae4c7-ebd7-4041-94da-25369653eba7
          content:
            application/problem+json:
              schema:
                title: Error
                type: object
                description: ''
                properties:
                  type:
                    type: string
                    description: URL to a document describing the error condition.
                  status:
                    type: integer
                    description: >-
                      Transmission of the HTTP status code so that all
                      information can be found in one place, but also to correct
                      changes in the status code due to the use of proxy
                      servers.
                  title:
                    type: string
                    description: >-
                      A short, human-readable title for the general error type;
                      the title should not change for given types.
                  detail:
                    type: string
                    description: A human-readable description of the specific error.
                  instance:
                    type: string
                    description: >-
                      This optional key may be present, with a unique URI for
                      the specific error; this will often point to an error log
                      for that specific response.
                  request_id:
                    type: string
                    description: Correlation ID for the original request.
                required:
                  - type
                  - status
                additionalProperties: false
              example:
                status: 503
                type: method_not_allowed
        '504':
          description: >-
            Gateway Timeout. The service gateway has reached its internal
            timeout.
          headers:
            upvest-request-id:
              required: true
              schema:
                type: string
                format: uuid
                example: 169ae4c7-ebd7-4041-94da-25369653eba7
          content:
            application/problem+json:
              schema:
                title: Error
                type: object
                description: ''
                properties:
                  type:
                    type: string
                    description: URL to a document describing the error condition.
                  status:
                    type: integer
                    description: >-
                      Transmission of the HTTP status code so that all
                      information can be found in one place, but also to correct
                      changes in the status code due to the use of proxy
                      servers.
                  title:
                    type: string
                    description: >-
                      A short, human-readable title for the general error type;
                      the title should not change for given types.
                  detail:
                    type: string
                    description: A human-readable description of the specific error.
                  instance:
                    type: string
                    description: >-
                      This optional key may be present, with a unique URI for
                      the specific error; this will often point to an error log
                      for that specific response.
                  request_id:
                    type: string
                    description: Correlation ID for the original request.
                required:
                  - type
                  - status
                additionalProperties: false
              example:
                status: 504
                type: gateway_timeout
    post:
      operationId: create_account_liquidation
      summary: Create account liquidation request
      description: Create account liquidation request
      tags:
        - Liquidations
      security:
        - oauth-client-credentials:
            - account_liquidations:admin
      parameters:
        - name: idempotency-key
          in: header
          required: true
          schema:
            type: string
            format: uuid
            pattern: >-
              ^[0-9a-fA-F]{8}-?[0-9a-fA-F]{4}-?[0-5][0-9a-fA-F]{3}-?[089abAB][0-9a-fA-F]{3}-?[0-9a-fA-F]{12}$
            example: ccb07f42-4104-44ad-8e1f-c660bb7b269c
          description: >
            A UUID to be used as an idempotency key.  This prevents a duplicate
            request from being replayed.

            https://docs.upvest.co/documentation/concepts/api_concepts/idempotency
      requestBody:
        content:
          application/json:
            schema:
              title: Account liquidation - Request
              type: object
              properties:
                user_id:
                  title: User unique identifier.
                  type: string
                  description: User unique identifier.
                  format: uuid
              required:
                - user_id
              additionalProperties: false
            example:
              user_id: 084a00a8-4a37-4d2d-b276-71ec5e2be0e3
      responses:
        '202':
          description: Account liquidation object
          headers:
            upvest-request-id:
              required: true
              schema:
                type: string
                format: uuid
                example: 169ae4c7-ebd7-4041-94da-25369653eba7
          content:
            application/json:
              schema:
                title: Account liquidation
                type: object
                properties:
                  id:
                    title: Account liquidation unique identifier
                    type: string
                    format: uuid
                  created_at:
                    type: string
                    format: date-time
                    description: >-
                      Date and time when the resource was created. [RFC
                      3339-5](https://datatracker.ietf.org/doc/html/rfc3339#section-5.6),
                      [ISO8601
                      UTC](https://www.iso.org/iso-8601-date-and-time-format.html)
                  updated_at:
                    type: string
                    format: date-time
                    description: >-
                      Date and time when the resource was last updated. [RFC
                      3339-5](https://datatracker.ietf.org/doc/html/rfc3339#section-5.6),
                      [ISO8601
                      UTC](https://www.iso.org/iso-8601-date-and-time-format.html)
                  user_id:
                    title: User unique identifier.
                    type: string
                    description: User unique identifier.
                    format: uuid
                  account_id:
                    title: Account unique identifier.
                    type: string
                    description: Account unique identifier.
                    format: uuid
                  cash_amount:
                    type: string
                    pattern: ^[0-9]{0,63}(\.[0-9]{1,27})?$
                  currency:
                    type: string
                    description: >-
                      Alphabetic three-letter [ISO
                      4217](https://en.wikipedia.org/wiki/ISO_4217) currency
                      code.

                      * EUR - Euro

                      * GBP - British Pound
                    enum:
                      - EUR
                      - GBP
                  status:
                    type: string
                    description: |-
                      Execution status of the Account liquidation.
                      * NEW - 
                      * PROCESSING - 
                      * FILLED - 
                      * CANCELLED - 
                      * SETTLED - 
                    enum:
                      - NEW
                      - PROCESSING
                      - FILLED
                      - CANCELLED
                      - SETTLED
                  orders:
                    type: array
                    description: >-
                      Position liquidation orders associated with this account
                      liquidation
                    items:
                      title: Account liquidation
                      type: object
                      properties:
                        id:
                          title: Account liquidation order unique identifier
                          type: string
                          format: uuid
                        side:
                          type: string
                          description: |-
                            Side of the order.
                            * SELL - 
                          default: SELL
                        status:
                          type: string
                          description: |-
                            Execution status of the Account liquidation order.
                            * NEW - 
                            * PROCESSING - 
                            * FILLED - 
                            * CANCELLED - 
                          enum:
                            - NEW
                            - PROCESSING
                            - FILLED
                            - CANCELLED
                      required:
                        - id
                        - side
                        - status
                      additionalProperties: false
                required:
                  - id
                  - created_at
                  - updated_at
                  - account_id
                  - cash_amount
                  - currency
                  - status
                  - orders
                additionalProperties: false
              example:
                id: b2f541dc-a27b-4d5a-b970-41812b0892b9
                created_at: '2021-07-21T14:10:00.000Z'
                updated_at: '2021-07-21T14:10:00.000Z'
                account_id: debf2026-f2da-4ff0-bb84-92e45babb1e3
                user_id: 81dfb00e-9be6-4617-8994-dfd0407f34df
                cash_amount: '1000'
                currency: EUR
                status: NEW
                orders: []
        '400':
          description: Bad Request. The incoming request had a malformed parameter/object.
          headers:
            upvest-request-id:
              required: true
              schema:
                type: string
                format: uuid
                example: 169ae4c7-ebd7-4041-94da-25369653eba7
          content:
            application/problem+json:
              schema:
                title: Error
                type: object
                description: ''
                properties:
                  type:
                    type: string
                    description: URL to a document describing the error condition.
                  status:
                    type: integer
                    description: >-
                      Transmission of the HTTP status code so that all
                      information can be found in one place, but also to correct
                      changes in the status code due to the use of proxy
                      servers.
                  title:
                    type: string
                    description: >-
                      A short, human-readable title for the general error type;
                      the title should not change for given types.
                  detail:
                    type: string
                    description: A human-readable description of the specific error.
                  instance:
                    type: string
                    description: >-
                      This optional key may be present, with a unique URI for
                      the specific error; this will often point to an error log
                      for that specific response.
                  request_id:
                    type: string
                    description: Correlation ID for the original request.
                required:
                  - type
                  - status
                additionalProperties: false
              example:
                status: 400
                type: bad_request
        '401':
          description: Unauthorized. The caller has not been authenticated.
          headers:
            upvest-request-id:
              required: true
              schema:
                type: string
                format: uuid
                example: 169ae4c7-ebd7-4041-94da-25369653eba7
          content:
            application/problem+json:
              schema:
                title: Error
                type: object
                description: ''
                properties:
                  type:
                    type: string
                    description: URL to a document describing the error condition.
                  status:
                    type: integer
                    description: >-
                      Transmission of the HTTP status code so that all
                      information can be found in one place, but also to correct
                      changes in the status code due to the use of proxy
                      servers.
                  title:
                    type: string
                    description: >-
                      A short, human-readable title for the general error type;
                      the title should not change for given types.
                  detail:
                    type: string
                    description: A human-readable description of the specific error.
                  instance:
                    type: string
                    description: >-
                      This optional key may be present, with a unique URI for
                      the specific error; this will often point to an error log
                      for that specific response.
                  request_id:
                    type: string
                    description: Correlation ID for the original request.
                required:
                  - type
                  - status
                additionalProperties: false
              example:
                status: 401
                type: unauthorized
        '403':
          description: >-
            Forbidden. The caller has been authenticated but is not allowed to
            take the requested action.
          headers:
            upvest-request-id:
              required: true
              schema:
                type: string
                format: uuid
                example: 169ae4c7-ebd7-4041-94da-25369653eba7
          content:
            application/problem+json:
              schema:
                title: Error
                type: object
                description: ''
                properties:
                  type:
                    type: string
                    description: URL to a document describing the error condition.
                  status:
                    type: integer
                    description: >-
                      Transmission of the HTTP status code so that all
                      information can be found in one place, but also to correct
                      changes in the status code due to the use of proxy
                      servers.
                  title:
                    type: string
                    description: >-
                      A short, human-readable title for the general error type;
                      the title should not change for given types.
                  detail:
                    type: string
                    description: A human-readable description of the specific error.
                  instance:
                    type: string
                    description: >-
                      This optional key may be present, with a unique URI for
                      the specific error; this will often point to an error log
                      for that specific response.
                  request_id:
                    type: string
                    description: Correlation ID for the original request.
                required:
                  - type
                  - status
                additionalProperties: false
              example:
                status: 403
                type: forbidden
        '404':
          description: Not Found. The requested resource could not be found.
          headers:
            upvest-request-id:
              required: true
              schema:
                type: string
                format: uuid
                example: 169ae4c7-ebd7-4041-94da-25369653eba7
          content:
            application/problem+json:
              schema:
                title: Error
                type: object
                description: ''
                properties:
                  type:
                    type: string
                    description: URL to a document describing the error condition.
                  status:
                    type: integer
                    description: >-
                      Transmission of the HTTP status code so that all
                      information can be found in one place, but also to correct
                      changes in the status code due to the use of proxy
                      servers.
                  title:
                    type: string
                    description: >-
                      A short, human-readable title for the general error type;
                      the title should not change for given types.
                  detail:
                    type: string
                    description: A human-readable description of the specific error.
                  instance:
                    type: string
                    description: >-
                      This optional key may be present, with a unique URI for
                      the specific error; this will often point to an error log
                      for that specific response.
                  request_id:
                    type: string
                    description: Correlation ID for the original request.
                required:
                  - type
                  - status
                additionalProperties: false
              example:
                status: 404
                type: not_found
        '406':
          description: >-
            Not Acceptable. The resource does not have a current representation
            that would be acceptable to the user agent. "Accept" header defined
            unsupported value.
          headers:
            upvest-request-id:
              required: true
              schema:
                type: string
                format: uuid
                example: 169ae4c7-ebd7-4041-94da-25369653eba7
          content:
            application/problem+json:
              schema:
                title: Error
                type: object
                description: ''
                properties:
                  type:
                    type: string
                    description: URL to a document describing the error condition.
                  status:
                    type: integer
                    description: >-
                      Transmission of the HTTP status code so that all
                      information can be found in one place, but also to correct
                      changes in the status code due to the use of proxy
                      servers.
                  title:
                    type: string
                    description: >-
                      A short, human-readable title for the general error type;
                      the title should not change for given types.
                  detail:
                    type: string
                    description: A human-readable description of the specific error.
                  instance:
                    type: string
                    description: >-
                      This optional key may be present, with a unique URI for
                      the specific error; this will often point to an error log
                      for that specific response.
                  request_id:
                    type: string
                    description: Correlation ID for the original request.
                required:
                  - type
                  - status
                additionalProperties: false
              example:
                status: 406
                type: not_acceptable
        '429':
          description: >-
            Too Many Requests. The caller has exceeded their quota for the time
            period and has been throttled.
          headers:
            upvest-request-id:
              required: true
              schema:
                type: string
                format: uuid
                example: 169ae4c7-ebd7-4041-94da-25369653eba7
          content:
            application/problem+json:
              schema:
                title: Error
                type: object
                description: ''
                properties:
                  type:
                    type: string
                    description: URL to a document describing the error condition.
                  status:
                    type: integer
                    description: >-
                      Transmission of the HTTP status code so that all
                      information can be found in one place, but also to correct
                      changes in the status code due to the use of proxy
                      servers.
                  title:
                    type: string
                    description: >-
                      A short, human-readable title for the general error type;
                      the title should not change for given types.
                  detail:
                    type: string
                    description: A human-readable description of the specific error.
                  instance:
                    type: string
                    description: >-
                      This optional key may be present, with a unique URI for
                      the specific error; this will often point to an error log
                      for that specific response.
                  request_id:
                    type: string
                    description: Correlation ID for the original request.
                required:
                  - type
                  - status
                additionalProperties: false
              example:
                status: 429
                type: too_many_requests
        '500':
          description: Internal Server Error. The service encountered an unexpected error.
          headers:
            upvest-request-id:
              required: true
              schema:
                type: string
                format: uuid
                example: 169ae4c7-ebd7-4041-94da-25369653eba7
          content:
            application/problem+json:
              schema:
                title: Error
                type: object
                description: ''
                properties:
                  type:
                    type: string
                    description: URL to a document describing the error condition.
                  status:
                    type: integer
                    description: >-
                      Transmission of the HTTP status code so that all
                      information can be found in one place, but also to correct
                      changes in the status code due to the use of proxy
                      servers.
                  title:
                    type: string
                    description: >-
                      A short, human-readable title for the general error type;
                      the title should not change for given types.
                  detail:
                    type: string
                    description: A human-readable description of the specific error.
                  instance:
                    type: string
                    description: >-
                      This optional key may be present, with a unique URI for
                      the specific error; this will often point to an error log
                      for that specific response.
                  request_id:
                    type: string
                    description: Correlation ID for the original request.
                required:
                  - type
                  - status
                additionalProperties: false
              example:
                status: 500
                type: internal_server_error
        '503':
          description: >-
            Service Unavailable. The service handling for this request cannot be
            reached at this time.
          headers:
            upvest-request-id:
              required: true
              schema:
                type: string
                format: uuid
                example: 169ae4c7-ebd7-4041-94da-25369653eba7
          content:
            application/problem+json:
              schema:
                title: Error
                type: object
                description: ''
                properties:
                  type:
                    type: string
                    description: URL to a document describing the error condition.
                  status:
                    type: integer
                    description: >-
                      Transmission of the HTTP status code so that all
                      information can be found in one place, but also to correct
                      changes in the status code due to the use of proxy
                      servers.
                  title:
                    type: string
                    description: >-
                      A short, human-readable title for the general error type;
                      the title should not change for given types.
                  detail:
                    type: string
                    description: A human-readable description of the specific error.
                  instance:
                    type: string
                    description: >-
                      This optional key may be present, with a unique URI for
                      the specific error; this will often point to an error log
                      for that specific response.
                  request_id:
                    type: string
                    description: Correlation ID for the original request.
                required:
                  - type
                  - status
                additionalProperties: false
              example:
                status: 503
                type: method_not_allowed
        '504':
          description: >-
            Gateway Timeout. The service gateway has reached its internal
            timeout.
          headers:
            upvest-request-id:
              required: true
              schema:
                type: string
                format: uuid
                example: 169ae4c7-ebd7-4041-94da-25369653eba7
          content:
            application/problem+json:
              schema:
                title: Error
                type: object
                description: ''
                properties:
                  type:
                    type: string
                    description: URL to a document describing the error condition.
                  status:
                    type: integer
                    description: >-
                      Transmission of the HTTP status code so that all
                      information can be found in one place, but also to correct
                      changes in the status code due to the use of proxy
                      servers.
                  title:
                    type: string
                    description: >-
                      A short, human-readable title for the general error type;
                      the title should not change for given types.
                  detail:
                    type: string
                    description: A human-readable description of the specific error.
                  instance:
                    type: string
                    description: >-
                      This optional key may be present, with a unique URI for
                      the specific error; this will often point to an error log
                      for that specific response.
                  request_id:
                    type: string
                    description: Correlation ID for the original request.
                required:
                  - type
                  - status
                additionalProperties: false
              example:
                status: 504
                type: gateway_timeout
  /accounts/{account_id}/liquidations/{account_liquidation_id}:
    parameters:
      - name: account_id
        in: path
        required: true
        schema:
          title: Account unique identifier.
          type: string
          description: Account unique identifier.
          format: uuid
      - name: account_liquidation_id
        in: path
        required: true
        schema:
          title: Account liquidation unique identifier
          type: string
          format: uuid
      - name: upvest-client-id
        in: header
        description: Tenant Client ID
        required: true
        schema:
          type: string
          format: uuid
          example: ebabcf4d-61c3-4942-875c-e265a7c2d062
      - name: authorization
        in: header
        description: |
          Bearer (access) token from the OAuth flow with correct scopes.
          https://datatracker.ietf.org/doc/html/rfc6750
        required: true
        schema:
          type: string
          pattern: ^Bearer [a-zA-Z0-9\-\._~+/]*=*
          example: Bearer c2VjcmV0Cg==
      - name: signature
        in: header
        required: true
        schema:
          type: string
        description: >-
          https://tools.ietf.org/id/draft-ietf-httpbis-message-signatures-01.html#name-the-signature-http-header
      - name: signature-input
        in: header
        required: true
        schema:
          type: string
        description: >-
          https://tools.ietf.org/id/draft-ietf-httpbis-message-signatures-01.html#name-the-signature-input-http-he
      - name: upvest-api-version
        in: header
        required: false
        schema:
          type: string
          enum:
            - '1'
          default: '1'
          example: '1'
        description: 'Upvest API version (Note: Do not include quotation marks)'
    get:
      operationId: retrieve_account_liquidation
      summary: Retrieve account liquidation
      description: Retrieve account liquidation
      tags:
        - Liquidations
      security:
        - oauth-client-credentials:
            - account_liquidations:read
            - account_liquidations:admin
      responses:
        '200':
          description: Account liquidation object
          headers:
            upvest-request-id:
              required: true
              schema:
                type: string
                format: uuid
                example: 169ae4c7-ebd7-4041-94da-25369653eba7
          content:
            application/json:
              schema:
                title: Account liquidation
                type: object
                properties:
                  id:
                    title: Account liquidation unique identifier
                    type: string
                    format: uuid
                  created_at:
                    type: string
                    format: date-time
                    description: >-
                      Date and time when the resource was created. [RFC
                      3339-5](https://datatracker.ietf.org/doc/html/rfc3339#section-5.6),
                      [ISO8601
                      UTC](https://www.iso.org/iso-8601-date-and-time-format.html)
                  updated_at:
                    type: string
                    format: date-time
                    description: >-
                      Date and time when the resource was last updated. [RFC
                      3339-5](https://datatracker.ietf.org/doc/html/rfc3339#section-5.6),
                      [ISO8601
                      UTC](https://www.iso.org/iso-8601-date-and-time-format.html)
                  user_id:
                    title: User unique identifier.
                    type: string
                    description: User unique identifier.
                    format: uuid
                  account_id:
                    title: Account unique identifier.
                    type: string
                    description: Account unique identifier.
                    format: uuid
                  cash_amount:
                    type: string
                    pattern: ^[0-9]{0,63}(\.[0-9]{1,27})?$
                  currency:
                    type: string
                    description: >-
                      Alphabetic three-letter [ISO
                      4217](https://en.wikipedia.org/wiki/ISO_4217) currency
                      code.

                      * EUR - Euro

                      * GBP - British Pound
                    enum:
                      - EUR
                      - GBP
                  status:
                    type: string
                    description: |-
                      Execution status of the Account liquidation.
                      * NEW - 
                      * PROCESSING - 
                      * FILLED - 
                      * CANCELLED - 
                      * SETTLED - 
                    enum:
                      - NEW
                      - PROCESSING
                      - FILLED
                      - CANCELLED
                      - SETTLED
                  orders:
                    type: array
                    description: >-
                      Position liquidation orders associated with this account
                      liquidation
                    items:
                      title: Account liquidation
                      type: object
                      properties:
                        id:
                          title: Account liquidation order unique identifier
                          type: string
                          format: uuid
                        side:
                          type: string
                          description: |-
                            Side of the order.
                            * SELL - 
                          default: SELL
                        status:
                          type: string
                          description: |-
                            Execution status of the Account liquidation order.
                            * NEW - 
                            * PROCESSING - 
                            * FILLED - 
                            * CANCELLED - 
                          enum:
                            - NEW
                            - PROCESSING
                            - FILLED
                            - CANCELLED
                      required:
                        - id
                        - side
                        - status
                      additionalProperties: false
                required:
                  - id
                  - created_at
                  - updated_at
                  - account_id
                  - cash_amount
                  - currency
                  - status
                  - orders
                additionalProperties: false
              example:
                id: f386fdc4-dcd8-4dce-8acb-dae332f51483
                created_at: '2021-07-21T14:10:00.00Z'
                updated_at: '2021-07-21T14:10:00.00Z'
                user_id: 4b9732bd-7496-4e91-8a5f-6360479d7fed
                account_id: f2f7d2c7-d79b-4de2-ae9b-d01646259f9e
                cash_amount: '100.00'
                currency: EUR
                status: PROCESSING
                orders:
                  - id: 79f2c816-13ed-4588-85e6-f3398b0b5825
                    side: SELL
                    status: NEW
                  - id: 44f50a4e-7ce8-4eae-a078-f4b3d8ab4708
                    side: SELL
                    status: NEW
        '401':
          description: Unauthorized. The caller has not been authenticated.
          headers:
            upvest-request-id:
              required: true
              schema:
                type: string
                format: uuid
                example: 169ae4c7-ebd7-4041-94da-25369653eba7
          content:
            application/problem+json:
              schema:
                title: Error
                type: object
                description: ''
                properties:
                  type:
                    type: string
                    description: URL to a document describing the error condition.
                  status:
                    type: integer
                    description: >-
                      Transmission of the HTTP status code so that all
                      information can be found in one place, but also to correct
                      changes in the status code due to the use of proxy
                      servers.
                  title:
                    type: string
                    description: >-
                      A short, human-readable title for the general error type;
                      the title should not change for given types.
                  detail:
                    type: string
                    description: A human-readable description of the specific error.
                  instance:
                    type: string
                    description: >-
                      This optional key may be present, with a unique URI for
                      the specific error; this will often point to an error log
                      for that specific response.
                  request_id:
                    type: string
                    description: Correlation ID for the original request.
                required:
                  - type
                  - status
                additionalProperties: false
              example:
                status: 401
                type: unauthorized
        '403':
          description: >-
            Forbidden. The caller has been authenticated but is not allowed to
            take the requested action.
          headers:
            upvest-request-id:
              required: true
              schema:
                type: string
                format: uuid
                example: 169ae4c7-ebd7-4041-94da-25369653eba7
          content:
            application/problem+json:
              schema:
                title: Error
                type: object
                description: ''
                properties:
                  type:
                    type: string
                    description: URL to a document describing the error condition.
                  status:
                    type: integer
                    description: >-
                      Transmission of the HTTP status code so that all
                      information can be found in one place, but also to correct
                      changes in the status code due to the use of proxy
                      servers.
                  title:
                    type: string
                    description: >-
                      A short, human-readable title for the general error type;
                      the title should not change for given types.
                  detail:
                    type: string
                    description: A human-readable description of the specific error.
                  instance:
                    type: string
                    description: >-
                      This optional key may be present, with a unique URI for
                      the specific error; this will often point to an error log
                      for that specific response.
                  request_id:
                    type: string
                    description: Correlation ID for the original request.
                required:
                  - type
                  - status
                additionalProperties: false
              example:
                status: 403
                type: forbidden
        '404':
          description: Not Found. The requested resource could not be found.
          headers:
            upvest-request-id:
              required: true
              schema:
                type: string
                format: uuid
                example: 169ae4c7-ebd7-4041-94da-25369653eba7
          content:
            application/problem+json:
              schema:
                title: Error
                type: object
                description: ''
                properties:
                  type:
                    type: string
                    description: URL to a document describing the error condition.
                  status:
                    type: integer
                    description: >-
                      Transmission of the HTTP status code so that all
                      information can be found in one place, but also to correct
                      changes in the status code due to the use of proxy
                      servers.
                  title:
                    type: string
                    description: >-
                      A short, human-readable title for the general error type;
                      the title should not change for given types.
                  detail:
                    type: string
                    description: A human-readable description of the specific error.
                  instance:
                    type: string
                    description: >-
                      This optional key may be present, with a unique URI for
                      the specific error; this will often point to an error log
                      for that specific response.
                  request_id:
                    type: string
                    description: Correlation ID for the original request.
                required:
                  - type
                  - status
                additionalProperties: false
              example:
                status: 404
                type: not_found
        '406':
          description: >-
            Not Acceptable. The resource does not have a current representation
            that would be acceptable to the user agent. "Accept" header defined
            unsupported value.
          headers:
            upvest-request-id:
              required: true
              schema:
                type: string
                format: uuid
                example: 169ae4c7-ebd7-4041-94da-25369653eba7
          content:
            application/problem+json:
              schema:
                title: Error
                type: object
                description: ''
                properties:
                  type:
                    type: string
                    description: URL to a document describing the error condition.
                  status:
                    type: integer
                    description: >-
                      Transmission of the HTTP status code so that all
                      information can be found in one place, but also to correct
                      changes in the status code due to the use of proxy
                      servers.
                  title:
                    type: string
                    description: >-
                      A short, human-readable title for the general error type;
                      the title should not change for given types.
                  detail:
                    type: string
                    description: A human-readable description of the specific error.
                  instance:
                    type: string
                    description: >-
                      This optional key may be present, with a unique URI for
                      the specific error; this will often point to an error log
                      for that specific response.
                  request_id:
                    type: string
                    description: Correlation ID for the original request.
                required:
                  - type
                  - status
                additionalProperties: false
              example:
                status: 406
                type: not_acceptable
        '429':
          description: >-
            Too Many Requests. The caller has exceeded their quota for the time
            period and has been throttled.
          headers:
            upvest-request-id:
              required: true
              schema:
                type: string
                format: uuid
                example: 169ae4c7-ebd7-4041-94da-25369653eba7
          content:
            application/problem+json:
              schema:
                title: Error
                type: object
                description: ''
                properties:
                  type:
                    type: string
                    description: URL to a document describing the error condition.
                  status:
                    type: integer
                    description: >-
                      Transmission of the HTTP status code so that all
                      information can be found in one place, but also to correct
                      changes in the status code due to the use of proxy
                      servers.
                  title:
                    type: string
                    description: >-
                      A short, human-readable title for the general error type;
                      the title should not change for given types.
                  detail:
                    type: string
                    description: A human-readable description of the specific error.
                  instance:
                    type: string
                    description: >-
                      This optional key may be present, with a unique URI for
                      the specific error; this will often point to an error log
                      for that specific response.
                  request_id:
                    type: string
                    description: Correlation ID for the original request.
                required:
                  - type
                  - status
                additionalProperties: false
              example:
                status: 429
                type: too_many_requests
        '500':
          description: Internal Server Error. The service encountered an unexpected error.
          headers:
            upvest-request-id:
              required: true
              schema:
                type: string
                format: uuid
                example: 169ae4c7-ebd7-4041-94da-25369653eba7
          content:
            application/problem+json:
              schema:
                title: Error
                type: object
                description: ''
                properties:
                  type:
                    type: string
                    description: URL to a document describing the error condition.
                  status:
                    type: integer
                    description: >-
                      Transmission of the HTTP status code so that all
                      information can be found in one place, but also to correct
                      changes in the status code due to the use of proxy
                      servers.
                  title:
                    type: string
                    description: >-
                      A short, human-readable title for the general error type;
                      the title should not change for given types.
                  detail:
                    type: string
                    description: A human-readable description of the specific error.
                  instance:
                    type: string
                    description: >-
                      This optional key may be present, with a unique URI for
                      the specific error; this will often point to an error log
                      for that specific response.
                  request_id:
                    type: string
                    description: Correlation ID for the original request.
                required:
                  - type
                  - status
                additionalProperties: false
              example:
                status: 500
                type: internal_server_error
        '503':
          description: >-
            Service Unavailable. The service handling for this request cannot be
            reached at this time.
          headers:
            upvest-request-id:
              required: true
              schema:
                type: string
                format: uuid
                example: 169ae4c7-ebd7-4041-94da-25369653eba7
          content:
            application/problem+json:
              schema:
                title: Error
                type: object
                description: ''
                properties:
                  type:
                    type: string
                    description: URL to a document describing the error condition.
                  status:
                    type: integer
                    description: >-
                      Transmission of the HTTP status code so that all
                      information can be found in one place, but also to correct
                      changes in the status code due to the use of proxy
                      servers.
                  title:
                    type: string
                    description: >-
                      A short, human-readable title for the general error type;
                      the title should not change for given types.
                  detail:
                    type: string
                    description: A human-readable description of the specific error.
                  instance:
                    type: string
                    description: >-
                      This optional key may be present, with a unique URI for
                      the specific error; this will often point to an error log
                      for that specific response.
                  request_id:
                    type: string
                    description: Correlation ID for the original request.
                required:
                  - type
                  - status
                additionalProperties: false
              example:
                status: 503
                type: method_not_allowed
        '504':
          description: >-
            Gateway Timeout. The service gateway has reached its internal
            timeout.
          headers:
            upvest-request-id:
              required: true
              schema:
                type: string
                format: uuid
                example: 169ae4c7-ebd7-4041-94da-25369653eba7
          content:
            application/problem+json:
              schema:
                title: Error
                type: object
                description: ''
                properties:
                  type:
                    type: string
                    description: URL to a document describing the error condition.
                  status:
                    type: integer
                    description: >-
                      Transmission of the HTTP status code so that all
                      information can be found in one place, but also to correct
                      changes in the status code due to the use of proxy
                      servers.
                  title:
                    type: string
                    description: >-
                      A short, human-readable title for the general error type;
                      the title should not change for given types.
                  detail:
                    type: string
                    description: A human-readable description of the specific error.
                  instance:
                    type: string
                    description: >-
                      This optional key may be present, with a unique URI for
                      the specific error; this will often point to an error log
                      for that specific response.
                  request_id:
                    type: string
                    description: Correlation ID for the original request.
                required:
                  - type
                  - status
                additionalProperties: false
              example:
                status: 504
                type: gateway_timeout
    delete:
      operationId: cancel_account_liquidation
      summary: Cancel account liquidation
      description: Cancel account liquidation
      tags:
        - Liquidations
      security:
        - oauth-client-credentials:
            - account_liquidations:admin
      responses:
        '204':
          description: Request has been processed successfully.
          headers:
            upvest-request-id:
              required: true
              schema:
                type: string
                format: uuid
                example: 169ae4c7-ebd7-4041-94da-25369653eba7
        '401':
          description: Unauthorized. The caller has not been authenticated.
          headers:
            upvest-request-id:
              required: true
              schema:
                type: string
                format: uuid
                example: 169ae4c7-ebd7-4041-94da-25369653eba7
          content:
            application/problem+json:
              schema:
                title: Error
                type: object
                description: ''
                properties:
                  type:
                    type: string
                    description: URL to a document describing the error condition.
                  status:
                    type: integer
                    description: >-
                      Transmission of the HTTP status code so that all
                      information can be found in one place, but also to correct
                      changes in the status code due to the use of proxy
                      servers.
                  title:
                    type: string
                    description: >-
                      A short, human-readable title for the general error type;
                      the title should not change for given types.
                  detail:
                    type: string
                    description: A human-readable description of the specific error.
                  instance:
                    type: string
                    description: >-
                      This optional key may be present, with a unique URI for
                      the specific error; this will often point to an error log
                      for that specific response.
                  request_id:
                    type: string
                    description: Correlation ID for the original request.
                required:
                  - type
                  - status
                additionalProperties: false
              example:
                status: 401
                type: unauthorized
        '403':
          description: >-
            Forbidden. The caller has been authenticated but is not allowed to
            take the requested action.
          headers:
            upvest-request-id:
              required: true
              schema:
                type: string
                format: uuid
                example: 169ae4c7-ebd7-4041-94da-25369653eba7
          content:
            application/problem+json:
              schema:
                title: Error
                type: object
                description: ''
                properties:
                  type:
                    type: string
                    description: URL to a document describing the error condition.
                  status:
                    type: integer
                    description: >-
                      Transmission of the HTTP status code so that all
                      information can be found in one place, but also to correct
                      changes in the status code due to the use of proxy
                      servers.
                  title:
                    type: string
                    description: >-
                      A short, human-readable title for the general error type;
                      the title should not change for given types.
                  detail:
                    type: string
                    description: A human-readable description of the specific error.
                  instance:
                    type: string
                    description: >-
                      This optional key may be present, with a unique URI for
                      the specific error; this will often point to an error log
                      for that specific response.
                  request_id:
                    type: string
                    description: Correlation ID for the original request.
                required:
                  - type
                  - status
                additionalProperties: false
              example:
                status: 403
                type: forbidden
        '404':
          description: Not Found. The requested resource could not be found.
          headers:
            upvest-request-id:
              required: true
              schema:
                type: string
                format: uuid
                example: 169ae4c7-ebd7-4041-94da-25369653eba7
          content:
            application/problem+json:
              schema:
                title: Error
                type: object
                description: ''
                properties:
                  type:
                    type: string
                    description: URL to a document describing the error condition.
                  status:
                    type: integer
                    description: >-
                      Transmission of the HTTP status code so that all
                      information can be found in one place, but also to correct
                      changes in the status code due to the use of proxy
                      servers.
                  title:
                    type: string
                    description: >-
                      A short, human-readable title for the general error type;
                      the title should not change for given types.
                  detail:
                    type: string
                    description: A human-readable description of the specific error.
                  instance:
                    type: string
                    description: >-
                      This optional key may be present, with a unique URI for
                      the specific error; this will often point to an error log
                      for that specific response.
                  request_id:
                    type: string
                    description: Correlation ID for the original request.
                required:
                  - type
                  - status
                additionalProperties: false
              example:
                status: 404
                type: not_found
        '406':
          description: >-
            Not Acceptable. The resource does not have a current representation
            that would be acceptable to the user agent. "Accept" header defined
            unsupported value.
          headers:
            upvest-request-id:
              required: true
              schema:
                type: string
                format: uuid
                example: 169ae4c7-ebd7-4041-94da-25369653eba7
          content:
            application/problem+json:
              schema:
                title: Error
                type: object
                description: ''
                properties:
                  type:
                    type: string
                    description: URL to a document describing the error condition.
                  status:
                    type: integer
                    description: >-
                      Transmission of the HTTP status code so that all
                      information can be found in one place, but also to correct
                      changes in the status code due to the use of proxy
                      servers.
                  title:
                    type: string
                    description: >-
                      A short, human-readable title for the general error type;
                      the title should not change for given types.
                  detail:
                    type: string
                    description: A human-readable description of the specific error.
                  instance:
                    type: string
                    description: >-
                      This optional key may be present, with a unique URI for
                      the specific error; this will often point to an error log
                      for that specific response.
                  request_id:
                    type: string
                    description: Correlation ID for the original request.
                required:
                  - type
                  - status
                additionalProperties: false
              example:
                status: 406
                type: not_acceptable
        '429':
          description: >-
            Too Many Requests. The caller has exceeded their quota for the time
            period and has been throttled.
          headers:
            upvest-request-id:
              required: true
              schema:
                type: string
                format: uuid
                example: 169ae4c7-ebd7-4041-94da-25369653eba7
          content:
            application/problem+json:
              schema:
                title: Error
                type: object
                description: ''
                properties:
                  type:
                    type: string
                    description: URL to a document describing the error condition.
                  status:
                    type: integer
                    description: >-
                      Transmission of the HTTP status code so that all
                      information can be found in one place, but also to correct
                      changes in the status code due to the use of proxy
                      servers.
                  title:
                    type: string
                    description: >-
                      A short, human-readable title for the general error type;
                      the title should not change for given types.
                  detail:
                    type: string
                    description: A human-readable description of the specific error.
                  instance:
                    type: string
                    description: >-
                      This optional key may be present, with a unique URI for
                      the specific error; this will often point to an error log
                      for that specific response.
                  request_id:
                    type: string
                    description: Correlation ID for the original request.
                required:
                  - type
                  - status
                additionalProperties: false
              example:
                status: 429
                type: too_many_requests
        '500':
          description: Internal Server Error. The service encountered an unexpected error.
          headers:
            upvest-request-id:
              required: true
              schema:
                type: string
                format: uuid
                example: 169ae4c7-ebd7-4041-94da-25369653eba7
          content:
            application/problem+json:
              schema:
                title: Error
                type: object
                description: ''
                properties:
                  type:
                    type: string
                    description: URL to a document describing the error condition.
                  status:
                    type: integer
                    description: >-
                      Transmission of the HTTP status code so that all
                      information can be found in one place, but also to correct
                      changes in the status code due to the use of proxy
                      servers.
                  title:
                    type: string
                    description: >-
                      A short, human-readable title for the general error type;
                      the title should not change for given types.
                  detail:
                    type: string
                    description: A human-readable description of the specific error.
                  instance:
                    type: string
                    description: >-
                      This optional key may be present, with a unique URI for
                      the specific error; this will often point to an error log
                      for that specific response.
                  request_id:
                    type: string
                    description: Correlation ID for the original request.
                required:
                  - type
                  - status
                additionalProperties: false
              example:
                status: 500
                type: internal_server_error
        '503':
          description: >-
            Service Unavailable. The service handling for this request cannot be
            reached at this time.
          headers:
            upvest-request-id:
              required: true
              schema:
                type: string
                format: uuid
                example: 169ae4c7-ebd7-4041-94da-25369653eba7
          content:
            application/problem+json:
              schema:
                title: Error
                type: object
                description: ''
                properties:
                  type:
                    type: string
                    description: URL to a document describing the error condition.
                  status:
                    type: integer
                    description: >-
                      Transmission of the HTTP status code so that all
                      information can be found in one place, but also to correct
                      changes in the status code due to the use of proxy
                      servers.
                  title:
                    type: string
                    description: >-
                      A short, human-readable title for the general error type;
                      the title should not change for given types.
                  detail:
                    type: string
                    description: A human-readable description of the specific error.
                  instance:
                    type: string
                    description: >-
                      This optional key may be present, with a unique URI for
                      the specific error; this will often point to an error log
                      for that specific response.
                  request_id:
                    type: string
                    description: Correlation ID for the original request.
                required:
                  - type
                  - status
                additionalProperties: false
              example:
                status: 503
                type: method_not_allowed
        '504':
          description: >-
            Gateway Timeout. The service gateway has reached its internal
            timeout.
          headers:
            upvest-request-id:
              required: true
              schema:
                type: string
                format: uuid
                example: 169ae4c7-ebd7-4041-94da-25369653eba7
          content:
            application/problem+json:
              schema:
                title: Error
                type: object
                description: ''
                properties:
                  type:
                    type: string
                    description: URL to a document describing the error condition.
                  status:
                    type: integer
                    description: >-
                      Transmission of the HTTP status code so that all
                      information can be found in one place, but also to correct
                      changes in the status code due to the use of proxy
                      servers.
                  title:
                    type: string
                    description: >-
                      A short, human-readable title for the general error type;
                      the title should not change for given types.
                  detail:
                    type: string
                    description: A human-readable description of the specific error.
                  instance:
                    type: string
                    description: >-
                      This optional key may be present, with a unique URI for
                      the specific error; this will often point to an error log
                      for that specific response.
                  request_id:
                    type: string
                    description: Correlation ID for the original request.
                required:
                  - type
                  - status
                additionalProperties: false
              example:
                status: 504
                type: gateway_timeout
  /accounts/{account_id}/returns:
    parameters:
      - name: account_id
        in: path
        required: true
        schema:
          title: Account unique identifier.
          type: string
          description: Account unique identifier.
          format: uuid
      - name: upvest-client-id
        in: header
        description: Tenant Client ID
        required: true
        schema:
          type: string
          format: uuid
          example: ebabcf4d-61c3-4942-875c-e265a7c2d062
      - name: authorization
        in: header
        description: |
          Bearer (access) token from the OAuth flow with correct scopes.
          https://datatracker.ietf.org/doc/html/rfc6750
        required: true
        schema:
          type: string
          pattern: ^Bearer [a-zA-Z0-9\-\._~+/]*=*
          example: Bearer c2VjcmV0Cg==
      - name: signature
        in: header
        required: true
        schema:
          type: string
        description: >-
          https://tools.ietf.org/id/draft-ietf-httpbis-message-signatures-01.html#name-the-signature-http-header
      - name: signature-input
        in: header
        required: true
        schema:
          type: string
        description: >-
          https://tools.ietf.org/id/draft-ietf-httpbis-message-signatures-01.html#name-the-signature-input-http-he
      - name: upvest-api-version
        in: header
        required: false
        schema:
          type: string
          enum:
            - '1'
          default: '1'
          example: '1'
        description: 'Upvest API version (Note: Do not include quotation marks)'
    get:
      operationId: list_account_returns
      summary: List account returns
      description: List account returns
      tags:
        - Returns
      security:
        - oauth-client-credentials:
            - account_returns:read
      parameters:
        - name: start_date
          in: query
          schema:
            type: string
            title: Date in YYYY-MM-DD format. RFC 3339, section 5.6
          description: Returns account returns starting from and including this date (UTC)
          example: '2023-08-15'
        - name: end_date
          in: query
          schema:
            type: string
            title: Date in YYYY-MM-DD format. RFC 3339, section 5.6
          description: Returns account returns up until this date (UTC)
          example: '2023-08-15'
        - name: sort
          in: query
          required: false
          description: Sort the result by `date`.
          schema:
            type: string
            enum:
              - date
            default: date
        - name: order
          in: query
          required: false
          schema:
            type: string
            enum:
              - ASC
              - DESC
            default: ASC
          description: >-
            Sort order of the result list if the `sort` parameter is specified.
            Use `ASC` for ascending or `DESC` for descending sort order.
        - name: offset
          in: query
          schema:
            type: integer
            minimum: 0
            format: int32
          allowEmptyValue: true
          description: >-
            Use the `offset` argument to specify where in the list of results to
            start when returning items for a particular query.
        - name: limit
          in: query
          schema:
            type: integer
            format: int32
            default: 100
            minimum: 0
            maximum: 1000
          allowEmptyValue: true
          description: >-
            Use the `limit` argument to specify the maximum number of items
            returned.
      responses:
        '200':
          description: OK
          headers:
            upvest-request-id:
              required: true
              schema:
                type: string
                format: uuid
                example: 169ae4c7-ebd7-4041-94da-25369653eba7
          content:
            application/json:
              schema:
                title: Account Return - List - Response
                type: object
                properties:
                  meta:
                    type: object
                    properties:
                      offset:
                        type: integer
                        description: Amount of resource to offset in the response.
                      limit:
                        type: integer
                        description: Total limit of the response.
                      count:
                        type: integer
                        description: Count of the resources returned in the response.
                      total_count:
                        type: integer
                        description: Total count of all the resources.
                      sort:
                        type: string
                        description: The field that the list is sorted by.
                      order:
                        type: string
                        description: |-
                          The ordering of the response.
                          * ASC - Ascending order
                          * DESC - Descending order
                        enum:
                          - ASC
                          - DESC
                    required:
                      - offset
                      - limit
                      - count
                      - total_count
                  data:
                    type: array
                    items:
                      title: Account Returns
                      type: object
                      properties:
                        account_id:
                          title: Account unique identifier.
                          type: string
                          description: Account unique identifier.
                          format: uuid
                        date:
                          type: string
                          format: date-time
                          description: >-
                            Date when returns were calculated. [RFC
                            3339-5](https://datatracker.ietf.org/doc/html/rfc3339#section-5.6),
                            [ISO8601
                            UTC](https://www.iso.org/iso-8601-date-and-time-format.html)
                        twr:
                          title: ''
                          type: object
                          properties:
                            daily:
                              type: string
                              pattern: ^-?[0-9]{0,63}(\.[0-9]{1,27})?$
                            cumulative:
                              type: string
                              pattern: ^-?[0-9]{0,63}(\.[0-9]{1,27})?$
                            cumulative_start_date:
                              type: string
                              format: date-time
                              description: >-
                                Date when the cumulative time-weighted returns
                                calculation starts.
                      required:
                        - account_id
                        - date
                        - twr
                      additionalProperties: false
                required:
                  - meta
                  - data
                additionalProperties: false
              example:
                meta:
                  offset: 0
                  limit: 100
                  count: 2
                  total_count: 2
                  sort: date
                  order: ASC
                data:
                  - account_id: bbe9e784-e009-4cb6-a07c-24831897327b
                    date: '2023-09-01'
                    twr:
                      daily: '0.0132434142'
                      cumulative: '0.0324353234'
                      cumulative_start_date: '2023-08-01'
                  - account_id: bbe9e784-e009-4cb6-a07c-24831897327b
                    date: '2023-09-02'
                    twr:
                      daily: '-0.005116543491'
                      cumulative: '0.0271528232'
                      cumulative_start_date: '2023-08-01'
        '400':
          description: Bad Request. The incoming request had a malformed parameter/object.
          headers:
            upvest-request-id:
              required: true
              schema:
                type: string
                format: uuid
                example: 169ae4c7-ebd7-4041-94da-25369653eba7
          content:
            application/problem+json:
              schema:
                title: Error
                type: object
                description: ''
                properties:
                  type:
                    type: string
                    description: URL to a document describing the error condition.
                  status:
                    type: integer
                    description: >-
                      Transmission of the HTTP status code so that all
                      information can be found in one place, but also to correct
                      changes in the status code due to the use of proxy
                      servers.
                  title:
                    type: string
                    description: >-
                      A short, human-readable title for the general error type;
                      the title should not change for given types.
                  detail:
                    type: string
                    description: A human-readable description of the specific error.
                  instance:
                    type: string
                    description: >-
                      This optional key may be present, with a unique URI for
                      the specific error; this will often point to an error log
                      for that specific response.
                  request_id:
                    type: string
                    description: Correlation ID for the original request.
                required:
                  - type
                  - status
                additionalProperties: false
              example:
                status: 400
                type: bad_request
        '401':
          description: Unauthorized. The caller has not been authenticated.
          headers:
            upvest-request-id:
              required: true
              schema:
                type: string
                format: uuid
                example: 169ae4c7-ebd7-4041-94da-25369653eba7
          content:
            application/problem+json:
              schema:
                title: Error
                type: object
                description: ''
                properties:
                  type:
                    type: string
                    description: URL to a document describing the error condition.
                  status:
                    type: integer
                    description: >-
                      Transmission of the HTTP status code so that all
                      information can be found in one place, but also to correct
                      changes in the status code due to the use of proxy
                      servers.
                  title:
                    type: string
                    description: >-
                      A short, human-readable title for the general error type;
                      the title should not change for given types.
                  detail:
                    type: string
                    description: A human-readable description of the specific error.
                  instance:
                    type: string
                    description: >-
                      This optional key may be present, with a unique URI for
                      the specific error; this will often point to an error log
                      for that specific response.
                  request_id:
                    type: string
                    description: Correlation ID for the original request.
                required:
                  - type
                  - status
                additionalProperties: false
              example:
                status: 401
                type: unauthorized
        '403':
          description: >-
            Forbidden. The caller has been authenticated but is not allowed to
            take the requested action.
          headers:
            upvest-request-id:
              required: true
              schema:
                type: string
                format: uuid
                example: 169ae4c7-ebd7-4041-94da-25369653eba7
          content:
            application/problem+json:
              schema:
                title: Error
                type: object
                description: ''
                properties:
                  type:
                    type: string
                    description: URL to a document describing the error condition.
                  status:
                    type: integer
                    description: >-
                      Transmission of the HTTP status code so that all
                      information can be found in one place, but also to correct
                      changes in the status code due to the use of proxy
                      servers.
                  title:
                    type: string
                    description: >-
                      A short, human-readable title for the general error type;
                      the title should not change for given types.
                  detail:
                    type: string
                    description: A human-readable description of the specific error.
                  instance:
                    type: string
                    description: >-
                      This optional key may be present, with a unique URI for
                      the specific error; this will often point to an error log
                      for that specific response.
                  request_id:
                    type: string
                    description: Correlation ID for the original request.
                required:
                  - type
                  - status
                additionalProperties: false
              example:
                status: 403
                type: forbidden
        '404':
          description: Not Found. The requested resource could not be found.
          headers:
            upvest-request-id:
              required: true
              schema:
                type: string
                format: uuid
                example: 169ae4c7-ebd7-4041-94da-25369653eba7
          content:
            application/problem+json:
              schema:
                title: Error
                type: object
                description: ''
                properties:
                  type:
                    type: string
                    description: URL to a document describing the error condition.
                  status:
                    type: integer
                    description: >-
                      Transmission of the HTTP status code so that all
                      information can be found in one place, but also to correct
                      changes in the status code due to the use of proxy
                      servers.
                  title:
                    type: string
                    description: >-
                      A short, human-readable title for the general error type;
                      the title should not change for given types.
                  detail:
                    type: string
                    description: A human-readable description of the specific error.
                  instance:
                    type: string
                    description: >-
                      This optional key may be present, with a unique URI for
                      the specific error; this will often point to an error log
                      for that specific response.
                  request_id:
                    type: string
                    description: Correlation ID for the original request.
                required:
                  - type
                  - status
                additionalProperties: false
              example:
                status: 404
                type: not_found
        '405':
          description: >-
            Method Not Allowed. The requested method is not allowed on the
            requested resource.
          headers:
            upvest-request-id:
              required: true
              schema:
                type: string
                format: uuid
                example: 169ae4c7-ebd7-4041-94da-25369653eba7
          content:
            application/problem+json:
              schema:
                title: Error
                type: object
                description: ''
                properties:
                  type:
                    type: string
                    description: URL to a document describing the error condition.
                  status:
                    type: integer
                    description: >-
                      Transmission of the HTTP status code so that all
                      information can be found in one place, but also to correct
                      changes in the status code due to the use of proxy
                      servers.
                  title:
                    type: string
                    description: >-
                      A short, human-readable title for the general error type;
                      the title should not change for given types.
                  detail:
                    type: string
                    description: A human-readable description of the specific error.
                  instance:
                    type: string
                    description: >-
                      This optional key may be present, with a unique URI for
                      the specific error; this will often point to an error log
                      for that specific response.
                  request_id:
                    type: string
                    description: Correlation ID for the original request.
                required:
                  - type
                  - status
                additionalProperties: false
              example:
                status: 405
                type: method_not_allowed
        '406':
          description: >-
            Not Acceptable. The resource does not have a current representation
            that would be acceptable to the user agent. "Accept" header defined
            unsupported value.
          headers:
            upvest-request-id:
              required: true
              schema:
                type: string
                format: uuid
                example: 169ae4c7-ebd7-4041-94da-25369653eba7
          content:
            application/problem+json:
              schema:
                title: Error
                type: object
                description: ''
                properties:
                  type:
                    type: string
                    description: URL to a document describing the error condition.
                  status:
                    type: integer
                    description: >-
                      Transmission of the HTTP status code so that all
                      information can be found in one place, but also to correct
                      changes in the status code due to the use of proxy
                      servers.
                  title:
                    type: string
                    description: >-
                      A short, human-readable title for the general error type;
                      the title should not change for given types.
                  detail:
                    type: string
                    description: A human-readable description of the specific error.
                  instance:
                    type: string
                    description: >-
                      This optional key may be present, with a unique URI for
                      the specific error; this will often point to an error log
                      for that specific response.
                  request_id:
                    type: string
                    description: Correlation ID for the original request.
                required:
                  - type
                  - status
                additionalProperties: false
              example:
                status: 406
                type: not_acceptable
        '429':
          description: >-
            Too Many Requests. The caller has exceeded their quota for the time
            period and has been throttled.
          headers:
            upvest-request-id:
              required: true
              schema:
                type: string
                format: uuid
                example: 169ae4c7-ebd7-4041-94da-25369653eba7
          content:
            application/problem+json:
              schema:
                title: Error
                type: object
                description: ''
                properties:
                  type:
                    type: string
                    description: URL to a document describing the error condition.
                  status:
                    type: integer
                    description: >-
                      Transmission of the HTTP status code so that all
                      information can be found in one place, but also to correct
                      changes in the status code due to the use of proxy
                      servers.
                  title:
                    type: string
                    description: >-
                      A short, human-readable title for the general error type;
                      the title should not change for given types.
                  detail:
                    type: string
                    description: A human-readable description of the specific error.
                  instance:
                    type: string
                    description: >-
                      This optional key may be present, with a unique URI for
                      the specific error; this will often point to an error log
                      for that specific response.
                  request_id:
                    type: string
                    description: Correlation ID for the original request.
                required:
                  - type
                  - status
                additionalProperties: false
              example:
                status: 429
                type: too_many_requests
        '500':
          description: Internal Server Error. The service encountered an unexpected error.
          headers:
            upvest-request-id:
              required: true
              schema:
                type: string
                format: uuid
                example: 169ae4c7-ebd7-4041-94da-25369653eba7
          content:
            application/problem+json:
              schema:
                title: Error
                type: object
                description: ''
                properties:
                  type:
                    type: string
                    description: URL to a document describing the error condition.
                  status:
                    type: integer
                    description: >-
                      Transmission of the HTTP status code so that all
                      information can be found in one place, but also to correct
                      changes in the status code due to the use of proxy
                      servers.
                  title:
                    type: string
                    description: >-
                      A short, human-readable title for the general error type;
                      the title should not change for given types.
                  detail:
                    type: string
                    description: A human-readable description of the specific error.
                  instance:
                    type: string
                    description: >-
                      This optional key may be present, with a unique URI for
                      the specific error; this will often point to an error log
                      for that specific response.
                  request_id:
                    type: string
                    description: Correlation ID for the original request.
                required:
                  - type
                  - status
                additionalProperties: false
              example:
                status: 500
                type: internal_server_error
        '503':
          description: >-
            Service Unavailable. The service handling for this request cannot be
            reached at this time.
          headers:
            upvest-request-id:
              required: true
              schema:
                type: string
                format: uuid
                example: 169ae4c7-ebd7-4041-94da-25369653eba7
          content:
            application/problem+json:
              schema:
                title: Error
                type: object
                description: ''
                properties:
                  type:
                    type: string
                    description: URL to a document describing the error condition.
                  status:
                    type: integer
                    description: >-
                      Transmission of the HTTP status code so that all
                      information can be found in one place, but also to correct
                      changes in the status code due to the use of proxy
                      servers.
                  title:
                    type: string
                    description: >-
                      A short, human-readable title for the general error type;
                      the title should not change for given types.
                  detail:
                    type: string
                    description: A human-readable description of the specific error.
                  instance:
                    type: string
                    description: >-
                      This optional key may be present, with a unique URI for
                      the specific error; this will often point to an error log
                      for that specific response.
                  request_id:
                    type: string
                    description: Correlation ID for the original request.
                required:
                  - type
                  - status
                additionalProperties: false
              example:
                status: 503
                type: method_not_allowed
        '504':
          description: >-
            Gateway Timeout. The service gateway has reached its internal
            timeout.
          headers:
            upvest-request-id:
              required: true
              schema:
                type: string
                format: uuid
                example: 169ae4c7-ebd7-4041-94da-25369653eba7
          content:
            application/problem+json:
              schema:
                title: Error
                type: object
                description: ''
                properties:
                  type:
                    type: string
                    description: URL to a document describing the error condition.
                  status:
                    type: integer
                    description: >-
                      Transmission of the HTTP status code so that all
                      information can be found in one place, but also to correct
                      changes in the status code due to the use of proxy
                      servers.
                  title:
                    type: string
                    description: >-
                      A short, human-readable title for the general error type;
                      the title should not change for given types.
                  detail:
                    type: string
                    description: A human-readable description of the specific error.
                  instance:
                    type: string
                    description: >-
                      This optional key may be present, with a unique URI for
                      the specific error; this will often point to an error log
                      for that specific response.
                  request_id:
                    type: string
                    description: Correlation ID for the original request.
                required:
                  - type
                  - status
                additionalProperties: false
              example:
                status: 504
                type: gateway_timeout
  /virtual_cash_balances/increases:
    parameters:
      - name: upvest-client-id
        in: header
        description: Tenant Client ID
        required: true
        schema:
          type: string
          format: uuid
          example: ebabcf4d-61c3-4942-875c-e265a7c2d062
      - name: authorization
        in: header
        description: |
          Bearer (access) token from the OAuth flow with correct scopes.
          https://datatracker.ietf.org/doc/html/rfc6750
        required: true
        schema:
          type: string
          pattern: ^Bearer [a-zA-Z0-9\-\._~+/]*=*
          example: Bearer c2VjcmV0Cg==
      - name: signature
        in: header
        required: true
        schema:
          type: string
        description: >-
          https://tools.ietf.org/id/draft-ietf-httpbis-message-signatures-01.html#name-the-signature-http-header
      - name: signature-input
        in: header
        required: true
        schema:
          type: string
        description: >-
          https://tools.ietf.org/id/draft-ietf-httpbis-message-signatures-01.html#name-the-signature-input-http-he
      - name: upvest-api-version
        in: header
        required: false
        schema:
          type: string
          enum:
            - '1'
          default: '1'
          example: '1'
        description: 'Upvest API version (Note: Do not include quotation marks)'
    post:
      operationId: create_virtual_cash_increase
      summary: Trigger a virtual cash increase
      description: Trigger a virtual cash increase
      tags:
        - Virtual Cash Balances
      parameters:
        - name: idempotency-key
          in: header
          required: true
          schema:
            type: string
            format: uuid
            pattern: >-
              ^[0-9a-fA-F]{8}-?[0-9a-fA-F]{4}-?[0-5][0-9a-fA-F]{3}-?[089abAB][0-9a-fA-F]{3}-?[0-9a-fA-F]{12}$
            example: ccb07f42-4104-44ad-8e1f-c660bb7b269c
          description: >
            A UUID to be used as an idempotency key.  This prevents a duplicate
            request from being replayed.

            https://docs.upvest.co/documentation/concepts/api_concepts/idempotency
      security:
        - oauth-client-credentials:
            - virtual_cash_balances:admin
      requestBody:
        content:
          application/json:
            schema:
              title: Virtual Cash Balance - Virtual Cash Increase - Create - Request
              type: object
              additionalProperties: false
              properties:
                account_group_id:
                  title: Account group unique identifier.
                  type: string
                  description: Account group unique identifier.
                  format: uuid
                amount:
                  type: string
                  pattern: ^[0-9]{1,9}(\.[0-9]{2})?$
                currency:
                  type: string
                  description: >-
                    Alphabetic three-letter [ISO
                    4217](https://en.wikipedia.org/wiki/ISO_4217) currency code.

                    * EUR - Euro
                  enum:
                    - EUR
                    - GBP
              required:
                - account_group_id
                - amount
                - currency
            example:
              account_group_id: 2596db3b-0d03-4651-9eda-970910479dfb
              amount: '200.00'
              currency: EUR
      responses:
        '202':
          description: Virtual Cash Balances Increase
          headers:
            upvest-request-id:
              required: true
              schema:
                type: string
                format: uuid
                example: 169ae4c7-ebd7-4041-94da-25369653eba7
          content:
            application/json:
              schema:
                title: Virtual Cash Balance - Virtual Cash Increase
                type: object
                additionalProperties: false
                properties:
                  id:
                    title: Virtual cash unique identifier
                    type: string
                    description: Virtual cash unique identifier
                    format: uuid
                  created_at:
                    type: string
                    format: date-time
                    description: >-
                      Date and time when the resource was created. [RFC
                      3339-5](https://datatracker.ietf.org/doc/html/rfc3339#section-5.6),
                      [ISO8601
                      UTC](https://www.iso.org/iso-8601-date-and-time-format.html)
                  updated_at:
                    type: string
                    format: date-time
                    description: >-
                      Date and time when the resource was last updated. [RFC
                      3339-5](https://datatracker.ietf.org/doc/html/rfc3339#section-5.6),
                      [ISO8601
                      UTC](https://www.iso.org/iso-8601-date-and-time-format.html)
                  account_group_id:
                    title: Account group unique identifier.
                    type: string
                    description: Account group unique identifier.
                    format: uuid
                  amount:
                    type: string
                    pattern: ^[0-9]{1,9}(\.[0-9]{2})?$
                  currency:
                    type: string
                    description: >-
                      Alphabetic three-letter [ISO
                      4217](https://en.wikipedia.org/wiki/ISO_4217) currency
                      code.

                      * EUR - Euro
                    enum:
                      - EUR
                      - GBP
                  status:
                    type: string
                    description: >-
                      Status of the virtual cash

                      * ISSUED - Virtual cash increase is created.

                      * CONFIRMED - Virtual cash increase was successfully
                      processed.
                    enum:
                      - ISSUED
                      - CONFIRMED
                required:
                  - id
                  - account_group_id
                  - amount
                  - currency
                  - status
                  - created_at
                  - updated_at
              example:
                id: 6ffa6b16-2380-4e7a-88b2-ae625c8eef99
                created_at: '2020-08-24T14:15:22Z'
                updated_at: '2020-08-24T14:15:22Z'
                account_group_id: ac1c39e9-2101-46b8-a624-d10a9e351b6c
                amount: '200.00'
                currency: EUR
                status: ISSUED
        '400':
          description: Bad Request. The incoming request had a malformed parameter/object.
          headers:
            upvest-request-id:
              required: true
              schema:
                type: string
                format: uuid
                example: 169ae4c7-ebd7-4041-94da-25369653eba7
          content:
            application/problem+json:
              schema:
                title: Error
                type: object
                description: ''
                properties:
                  type:
                    type: string
                    description: URL to a document describing the error condition.
                  status:
                    type: integer
                    description: >-
                      Transmission of the HTTP status code so that all
                      information can be found in one place, but also to correct
                      changes in the status code due to the use of proxy
                      servers.
                  title:
                    type: string
                    description: >-
                      A short, human-readable title for the general error type;
                      the title should not change for given types.
                  detail:
                    type: string
                    description: A human-readable description of the specific error.
                  instance:
                    type: string
                    description: >-
                      This optional key may be present, with a unique URI for
                      the specific error; this will often point to an error log
                      for that specific response.
                  request_id:
                    type: string
                    description: Correlation ID for the original request.
                required:
                  - type
                  - status
                additionalProperties: false
              example:
                status: 400
                type: bad_request
        '401':
          description: Unauthorized. The caller has not been authenticated.
          headers:
            upvest-request-id:
              required: true
              schema:
                type: string
                format: uuid
                example: 169ae4c7-ebd7-4041-94da-25369653eba7
          content:
            application/problem+json:
              schema:
                title: Error
                type: object
                description: ''
                properties:
                  type:
                    type: string
                    description: URL to a document describing the error condition.
                  status:
                    type: integer
                    description: >-
                      Transmission of the HTTP status code so that all
                      information can be found in one place, but also to correct
                      changes in the status code due to the use of proxy
                      servers.
                  title:
                    type: string
                    description: >-
                      A short, human-readable title for the general error type;
                      the title should not change for given types.
                  detail:
                    type: string
                    description: A human-readable description of the specific error.
                  instance:
                    type: string
                    description: >-
                      This optional key may be present, with a unique URI for
                      the specific error; this will often point to an error log
                      for that specific response.
                  request_id:
                    type: string
                    description: Correlation ID for the original request.
                required:
                  - type
                  - status
                additionalProperties: false
              example:
                status: 401
                type: unauthorized
        '403':
          description: >-
            Forbidden. The caller has been authenticated but is not allowed to
            take the requested action.
          headers:
            upvest-request-id:
              required: true
              schema:
                type: string
                format: uuid
                example: 169ae4c7-ebd7-4041-94da-25369653eba7
          content:
            application/problem+json:
              schema:
                title: Error
                type: object
                description: ''
                properties:
                  type:
                    type: string
                    description: URL to a document describing the error condition.
                  status:
                    type: integer
                    description: >-
                      Transmission of the HTTP status code so that all
                      information can be found in one place, but also to correct
                      changes in the status code due to the use of proxy
                      servers.
                  title:
                    type: string
                    description: >-
                      A short, human-readable title for the general error type;
                      the title should not change for given types.
                  detail:
                    type: string
                    description: A human-readable description of the specific error.
                  instance:
                    type: string
                    description: >-
                      This optional key may be present, with a unique URI for
                      the specific error; this will often point to an error log
                      for that specific response.
                  request_id:
                    type: string
                    description: Correlation ID for the original request.
                required:
                  - type
                  - status
                additionalProperties: false
              example:
                status: 403
                type: forbidden
        '404':
          description: Not Found. The requested resource could not be found.
          headers:
            upvest-request-id:
              required: true
              schema:
                type: string
                format: uuid
                example: 169ae4c7-ebd7-4041-94da-25369653eba7
          content:
            application/problem+json:
              schema:
                title: Error
                type: object
                description: ''
                properties:
                  type:
                    type: string
                    description: URL to a document describing the error condition.
                  status:
                    type: integer
                    description: >-
                      Transmission of the HTTP status code so that all
                      information can be found in one place, but also to correct
                      changes in the status code due to the use of proxy
                      servers.
                  title:
                    type: string
                    description: >-
                      A short, human-readable title for the general error type;
                      the title should not change for given types.
                  detail:
                    type: string
                    description: A human-readable description of the specific error.
                  instance:
                    type: string
                    description: >-
                      This optional key may be present, with a unique URI for
                      the specific error; this will often point to an error log
                      for that specific response.
                  request_id:
                    type: string
                    description: Correlation ID for the original request.
                required:
                  - type
                  - status
                additionalProperties: false
              example:
                status: 404
                type: not_found
        '406':
          description: >-
            Not Acceptable. The resource does not have a current representation
            that would be acceptable to the user agent. "Accept" header defined
            unsupported value.
          headers:
            upvest-request-id:
              required: true
              schema:
                type: string
                format: uuid
                example: 169ae4c7-ebd7-4041-94da-25369653eba7
          content:
            application/problem+json:
              schema:
                title: Error
                type: object
                description: ''
                properties:
                  type:
                    type: string
                    description: URL to a document describing the error condition.
                  status:
                    type: integer
                    description: >-
                      Transmission of the HTTP status code so that all
                      information can be found in one place, but also to correct
                      changes in the status code due to the use of proxy
                      servers.
                  title:
                    type: string
                    description: >-
                      A short, human-readable title for the general error type;
                      the title should not change for given types.
                  detail:
                    type: string
                    description: A human-readable description of the specific error.
                  instance:
                    type: string
                    description: >-
                      This optional key may be present, with a unique URI for
                      the specific error; this will often point to an error log
                      for that specific response.
                  request_id:
                    type: string
                    description: Correlation ID for the original request.
                required:
                  - type
                  - status
                additionalProperties: false
              example:
                status: 406
                type: not_acceptable
        '429':
          description: >-
            Too Many Requests. The caller has exceeded their quota for the time
            period and has been throttled.
          headers:
            upvest-request-id:
              required: true
              schema:
                type: string
                format: uuid
                example: 169ae4c7-ebd7-4041-94da-25369653eba7
          content:
            application/problem+json:
              schema:
                title: Error
                type: object
                description: ''
                properties:
                  type:
                    type: string
                    description: URL to a document describing the error condition.
                  status:
                    type: integer
                    description: >-
                      Transmission of the HTTP status code so that all
                      information can be found in one place, but also to correct
                      changes in the status code due to the use of proxy
                      servers.
                  title:
                    type: string
                    description: >-
                      A short, human-readable title for the general error type;
                      the title should not change for given types.
                  detail:
                    type: string
                    description: A human-readable description of the specific error.
                  instance:
                    type: string
                    description: >-
                      This optional key may be present, with a unique URI for
                      the specific error; this will often point to an error log
                      for that specific response.
                  request_id:
                    type: string
                    description: Correlation ID for the original request.
                required:
                  - type
                  - status
                additionalProperties: false
              example:
                status: 429
                type: too_many_requests
        '500':
          description: Internal Server Error. The service encountered an unexpected error.
          headers:
            upvest-request-id:
              required: true
              schema:
                type: string
                format: uuid
                example: 169ae4c7-ebd7-4041-94da-25369653eba7
          content:
            application/problem+json:
              schema:
                title: Error
                type: object
                description: ''
                properties:
                  type:
                    type: string
                    description: URL to a document describing the error condition.
                  status:
                    type: integer
                    description: >-
                      Transmission of the HTTP status code so that all
                      information can be found in one place, but also to correct
                      changes in the status code due to the use of proxy
                      servers.
                  title:
                    type: string
                    description: >-
                      A short, human-readable title for the general error type;
                      the title should not change for given types.
                  detail:
                    type: string
                    description: A human-readable description of the specific error.
                  instance:
                    type: string
                    description: >-
                      This optional key may be present, with a unique URI for
                      the specific error; this will often point to an error log
                      for that specific response.
                  request_id:
                    type: string
                    description: Correlation ID for the original request.
                required:
                  - type
                  - status
                additionalProperties: false
              example:
                status: 500
                type: internal_server_error
        '503':
          description: >-
            Service Unavailable. The service handling for this request cannot be
            reached at this time.
          headers:
            upvest-request-id:
              required: true
              schema:
                type: string
                format: uuid
                example: 169ae4c7-ebd7-4041-94da-25369653eba7
          content:
            application/problem+json:
              schema:
                title: Error
                type: object
                description: ''
                properties:
                  type:
                    type: string
                    description: URL to a document describing the error condition.
                  status:
                    type: integer
                    description: >-
                      Transmission of the HTTP status code so that all
                      information can be found in one place, but also to correct
                      changes in the status code due to the use of proxy
                      servers.
                  title:
                    type: string
                    description: >-
                      A short, human-readable title for the general error type;
                      the title should not change for given types.
                  detail:
                    type: string
                    description: A human-readable description of the specific error.
                  instance:
                    type: string
                    description: >-
                      This optional key may be present, with a unique URI for
                      the specific error; this will often point to an error log
                      for that specific response.
                  request_id:
                    type: string
                    description: Correlation ID for the original request.
                required:
                  - type
                  - status
                additionalProperties: false
              example:
                status: 503
                type: method_not_allowed
        '504':
          description: >-
            Gateway Timeout. The service gateway has reached its internal
            timeout.
          headers:
            upvest-request-id:
              required: true
              schema:
                type: string
                format: uuid
                example: 169ae4c7-ebd7-4041-94da-25369653eba7
          content:
            application/problem+json:
              schema:
                title: Error
                type: object
                description: ''
                properties:
                  type:
                    type: string
                    description: URL to a document describing the error condition.
                  status:
                    type: integer
                    description: >-
                      Transmission of the HTTP status code so that all
                      information can be found in one place, but also to correct
                      changes in the status code due to the use of proxy
                      servers.
                  title:
                    type: string
                    description: >-
                      A short, human-readable title for the general error type;
                      the title should not change for given types.
                  detail:
                    type: string
                    description: A human-readable description of the specific error.
                  instance:
                    type: string
                    description: >-
                      This optional key may be present, with a unique URI for
                      the specific error; this will often point to an error log
                      for that specific response.
                  request_id:
                    type: string
                    description: Correlation ID for the original request.
                required:
                  - type
                  - status
                additionalProperties: false
              example:
                status: 504
                type: gateway_timeout
  /virtual_cash_balances/decreases:
    parameters:
      - name: upvest-client-id
        in: header
        description: Tenant Client ID
        required: true
        schema:
          type: string
          format: uuid
          example: ebabcf4d-61c3-4942-875c-e265a7c2d062
      - name: authorization
        in: header
        description: |
          Bearer (access) token from the OAuth flow with correct scopes.
          https://datatracker.ietf.org/doc/html/rfc6750
        required: true
        schema:
          type: string
          pattern: ^Bearer [a-zA-Z0-9\-\._~+/]*=*
          example: Bearer c2VjcmV0Cg==
      - name: signature
        in: header
        required: true
        schema:
          type: string
        description: >-
          https://tools.ietf.org/id/draft-ietf-httpbis-message-signatures-01.html#name-the-signature-http-header
      - name: signature-input
        in: header
        required: true
        schema:
          type: string
        description: >-
          https://tools.ietf.org/id/draft-ietf-httpbis-message-signatures-01.html#name-the-signature-input-http-he
      - name: upvest-api-version
        in: header
        required: false
        schema:
          type: string
          enum:
            - '1'
          default: '1'
          example: '1'
        description: 'Upvest API version (Note: Do not include quotation marks)'
    post:
      operationId: create_virtual_cash_decrease
      summary: Trigger a virtual cash decrease
      description: Trigger a virtual cash decrease
      tags:
        - Virtual Cash Balances
      parameters:
        - name: idempotency-key
          in: header
          required: true
          schema:
            type: string
            format: uuid
            pattern: >-
              ^[0-9a-fA-F]{8}-?[0-9a-fA-F]{4}-?[0-5][0-9a-fA-F]{3}-?[089abAB][0-9a-fA-F]{3}-?[0-9a-fA-F]{12}$
            example: ccb07f42-4104-44ad-8e1f-c660bb7b269c
          description: >
            A UUID to be used as an idempotency key.  This prevents a duplicate
            request from being replayed.

            https://docs.upvest.co/documentation/concepts/api_concepts/idempotency
      security:
        - oauth-client-credentials:
            - virtual_cash_balances:admin
      requestBody:
        content:
          application/json:
            schema:
              title: Virtual Cash Balance - Virtual Cash Decrease - Create - Request
              type: object
              additionalProperties: false
              properties:
                account_group_id:
                  title: Account group unique identifier.
                  type: string
                  description: Account group unique identifier.
                  format: uuid
                amount:
                  type: string
                  pattern: ^[0-9]{1,9}(\.[0-9]{2})?$
                currency:
                  type: string
                  description: >-
                    Alphabetic three-letter [ISO
                    4217](https://en.wikipedia.org/wiki/ISO_4217) currency code.

                    * EUR - Euro
                  enum:
                    - EUR
                    - GBP
              required:
                - account_group_id
                - amount
                - currency
            example:
              account_group_id: 2596db3b-0d03-4651-9eda-970910479dfb
              amount: '200.00'
              currency: EUR
      responses:
        '202':
          description: Virtual Cash Balances Decrease
          headers:
            upvest-request-id:
              required: true
              schema:
                type: string
                format: uuid
                example: 169ae4c7-ebd7-4041-94da-25369653eba7
          content:
            application/json:
              schema:
                title: Virtual Cash Balance - Virtual Cash Decrease
                type: object
                additionalProperties: false
                properties:
                  id:
                    title: Virtual cash unique identifier
                    type: string
                    description: Virtual cash unique identifier
                    format: uuid
                  created_at:
                    type: string
                    format: date-time
                    description: >-
                      Date and time when the resource was created. [RFC
                      3339-5](https://datatracker.ietf.org/doc/html/rfc3339#section-5.6),
                      [ISO8601
                      UTC](https://www.iso.org/iso-8601-date-and-time-format.html)
                  updated_at:
                    type: string
                    format: date-time
                    description: >-
                      Date and time when the resource was last updated. [RFC
                      3339-5](https://datatracker.ietf.org/doc/html/rfc3339#section-5.6),
                      [ISO8601
                      UTC](https://www.iso.org/iso-8601-date-and-time-format.html)
                  account_group_id:
                    title: Account group unique identifier.
                    type: string
                    description: Account group unique identifier.
                    format: uuid
                  amount:
                    type: string
                    pattern: ^[0-9]{1,9}(\.[0-9]{2})?$
                  currency:
                    type: string
                    description: >-
                      Alphabetic three-letter [ISO
                      4217](https://en.wikipedia.org/wiki/ISO_4217) currency
                      code.

                      * EUR - Euro
                    enum:
                      - EUR
                      - GBP
                  status:
                    type: string
                    description: >-
                      Status of the virtual cash

                      * ISSUED - Virtual cash decrease is created.

                      * CONFIRMED - Virtual cash decrease was successfully
                      processed.

                      * QUEUED - Virtual cash decrease was queued.

                      * CANCELLED - Virtual cash decrease was cancelled.
                    enum:
                      - ISSUED
                      - CONFIRMED
                      - QUEUED
                      - CANCELLED
                required:
                  - id
                  - account_group_id
                  - amount
                  - currency
                  - status
                  - created_at
                  - updated_at
              example:
                id: 6ffa6b16-2380-4e7a-88b2-ae625c8eef99
                created_at: '2020-08-24T14:15:22Z'
                updated_at: '2020-08-24T14:15:22Z'
                account_group_id: ac1c39e9-2101-46b8-a624-d10a9e351b6c
                amount: '200.00'
                currency: EUR
                status: ISSUED
        '400':
          description: Bad Request. The incoming request had a malformed parameter/object.
          headers:
            upvest-request-id:
              required: true
              schema:
                type: string
                format: uuid
                example: 169ae4c7-ebd7-4041-94da-25369653eba7
          content:
            application/problem+json:
              schema:
                title: Error
                type: object
                description: ''
                properties:
                  type:
                    type: string
                    description: URL to a document describing the error condition.
                  status:
                    type: integer
                    description: >-
                      Transmission of the HTTP status code so that all
                      information can be found in one place, but also to correct
                      changes in the status code due to the use of proxy
                      servers.
                  title:
                    type: string
                    description: >-
                      A short, human-readable title for the general error type;
                      the title should not change for given types.
                  detail:
                    type: string
                    description: A human-readable description of the specific error.
                  instance:
                    type: string
                    description: >-
                      This optional key may be present, with a unique URI for
                      the specific error; this will often point to an error log
                      for that specific response.
                  request_id:
                    type: string
                    description: Correlation ID for the original request.
                required:
                  - type
                  - status
                additionalProperties: false
              example:
                status: 400
                type: bad_request
        '401':
          description: Unauthorized. The caller has not been authenticated.
          headers:
            upvest-request-id:
              required: true
              schema:
                type: string
                format: uuid
                example: 169ae4c7-ebd7-4041-94da-25369653eba7
          content:
            application/problem+json:
              schema:
                title: Error
                type: object
                description: ''
                properties:
                  type:
                    type: string
                    description: URL to a document describing the error condition.
                  status:
                    type: integer
                    description: >-
                      Transmission of the HTTP status code so that all
                      information can be found in one place, but also to correct
                      changes in the status code due to the use of proxy
                      servers.
                  title:
                    type: string
                    description: >-
                      A short, human-readable title for the general error type;
                      the title should not change for given types.
                  detail:
                    type: string
                    description: A human-readable description of the specific error.
                  instance:
                    type: string
                    description: >-
                      This optional key may be present, with a unique URI for
                      the specific error; this will often point to an error log
                      for that specific response.
                  request_id:
                    type: string
                    description: Correlation ID for the original request.
                required:
                  - type
                  - status
                additionalProperties: false
              example:
                status: 401
                type: unauthorized
        '403':
          description: >-
            Forbidden. The caller has been authenticated but is not allowed to
            take the requested action.
          headers:
            upvest-request-id:
              required: true
              schema:
                type: string
                format: uuid
                example: 169ae4c7-ebd7-4041-94da-25369653eba7
          content:
            application/problem+json:
              schema:
                title: Error
                type: object
                description: ''
                properties:
                  type:
                    type: string
                    description: URL to a document describing the error condition.
                  status:
                    type: integer
                    description: >-
                      Transmission of the HTTP status code so that all
                      information can be found in one place, but also to correct
                      changes in the status code due to the use of proxy
                      servers.
                  title:
                    type: string
                    description: >-
                      A short, human-readable title for the general error type;
                      the title should not change for given types.
                  detail:
                    type: string
                    description: A human-readable description of the specific error.
                  instance:
                    type: string
                    description: >-
                      This optional key may be present, with a unique URI for
                      the specific error; this will often point to an error log
                      for that specific response.
                  request_id:
                    type: string
                    description: Correlation ID for the original request.
                required:
                  - type
                  - status
                additionalProperties: false
              example:
                status: 403
                type: forbidden
        '404':
          description: Not Found. The requested resource could not be found.
          headers:
            upvest-request-id:
              required: true
              schema:
                type: string
                format: uuid
                example: 169ae4c7-ebd7-4041-94da-25369653eba7
          content:
            application/problem+json:
              schema:
                title: Error
                type: object
                description: ''
                properties:
                  type:
                    type: string
                    description: URL to a document describing the error condition.
                  status:
                    type: integer
                    description: >-
                      Transmission of the HTTP status code so that all
                      information can be found in one place, but also to correct
                      changes in the status code due to the use of proxy
                      servers.
                  title:
                    type: string
                    description: >-
                      A short, human-readable title for the general error type;
                      the title should not change for given types.
                  detail:
                    type: string
                    description: A human-readable description of the specific error.
                  instance:
                    type: string
                    description: >-
                      This optional key may be present, with a unique URI for
                      the specific error; this will often point to an error log
                      for that specific response.
                  request_id:
                    type: string
                    description: Correlation ID for the original request.
                required:
                  - type
                  - status
                additionalProperties: false
              example:
                status: 404
                type: not_found
        '406':
          description: >-
            Not Acceptable. The resource does not have a current representation
            that would be acceptable to the user agent. "Accept" header defined
            unsupported value.
          headers:
            upvest-request-id:
              required: true
              schema:
                type: string
                format: uuid
                example: 169ae4c7-ebd7-4041-94da-25369653eba7
          content:
            application/problem+json:
              schema:
                title: Error
                type: object
                description: ''
                properties:
                  type:
                    type: string
                    description: URL to a document describing the error condition.
                  status:
                    type: integer
                    description: >-
                      Transmission of the HTTP status code so that all
                      information can be found in one place, but also to correct
                      changes in the status code due to the use of proxy
                      servers.
                  title:
                    type: string
                    description: >-
                      A short, human-readable title for the general error type;
                      the title should not change for given types.
                  detail:
                    type: string
                    description: A human-readable description of the specific error.
                  instance:
                    type: string
                    description: >-
                      This optional key may be present, with a unique URI for
                      the specific error; this will often point to an error log
                      for that specific response.
                  request_id:
                    type: string
                    description: Correlation ID for the original request.
                required:
                  - type
                  - status
                additionalProperties: false
              example:
                status: 406
                type: not_acceptable
        '429':
          description: >-
            Too Many Requests. The caller has exceeded their quota for the time
            period and has been throttled.
          headers:
            upvest-request-id:
              required: true
              schema:
                type: string
                format: uuid
                example: 169ae4c7-ebd7-4041-94da-25369653eba7
          content:
            application/problem+json:
              schema:
                title: Error
                type: object
                description: ''
                properties:
                  type:
                    type: string
                    description: URL to a document describing the error condition.
                  status:
                    type: integer
                    description: >-
                      Transmission of the HTTP status code so that all
                      information can be found in one place, but also to correct
                      changes in the status code due to the use of proxy
                      servers.
                  title:
                    type: string
                    description: >-
                      A short, human-readable title for the general error type;
                      the title should not change for given types.
                  detail:
                    type: string
                    description: A human-readable description of the specific error.
                  instance:
                    type: string
                    description: >-
                      This optional key may be present, with a unique URI for
                      the specific error; this will often point to an error log
                      for that specific response.
                  request_id:
                    type: string
                    description: Correlation ID for the original request.
                required:
                  - type
                  - status
                additionalProperties: false
              example:
                status: 429
                type: too_many_requests
        '500':
          description: Internal Server Error. The service encountered an unexpected error.
          headers:
            upvest-request-id:
              required: true
              schema:
                type: string
                format: uuid
                example: 169ae4c7-ebd7-4041-94da-25369653eba7
          content:
            application/problem+json:
              schema:
                title: Error
                type: object
                description: ''
                properties:
                  type:
                    type: string
                    description: URL to a document describing the error condition.
                  status:
                    type: integer
                    description: >-
                      Transmission of the HTTP status code so that all
                      information can be found in one place, but also to correct
                      changes in the status code due to the use of proxy
                      servers.
                  title:
                    type: string
                    description: >-
                      A short, human-readable title for the general error type;
                      the title should not change for given types.
                  detail:
                    type: string
                    description: A human-readable description of the specific error.
                  instance:
                    type: string
                    description: >-
                      This optional key may be present, with a unique URI for
                      the specific error; this will often point to an error log
                      for that specific response.
                  request_id:
                    type: string
                    description: Correlation ID for the original request.
                required:
                  - type
                  - status
                additionalProperties: false
              example:
                status: 500
                type: internal_server_error
        '503':
          description: >-
            Service Unavailable. The service handling for this request cannot be
            reached at this time.
          headers:
            upvest-request-id:
              required: true
              schema:
                type: string
                format: uuid
                example: 169ae4c7-ebd7-4041-94da-25369653eba7
          content:
            application/problem+json:
              schema:
                title: Error
                type: object
                description: ''
                properties:
                  type:
                    type: string
                    description: URL to a document describing the error condition.
                  status:
                    type: integer
                    description: >-
                      Transmission of the HTTP status code so that all
                      information can be found in one place, but also to correct
                      changes in the status code due to the use of proxy
                      servers.
                  title:
                    type: string
                    description: >-
                      A short, human-readable title for the general error type;
                      the title should not change for given types.
                  detail:
                    type: string
                    description: A human-readable description of the specific error.
                  instance:
                    type: string
                    description: >-
                      This optional key may be present, with a unique URI for
                      the specific error; this will often point to an error log
                      for that specific response.
                  request_id:
                    type: string
                    description: Correlation ID for the original request.
                required:
                  - type
                  - status
                additionalProperties: false
              example:
                status: 503
                type: method_not_allowed
        '504':
          description: >-
            Gateway Timeout. The service gateway has reached its internal
            timeout.
          headers:
            upvest-request-id:
              required: true
              schema:
                type: string
                format: uuid
                example: 169ae4c7-ebd7-4041-94da-25369653eba7
          content:
            application/problem+json:
              schema:
                title: Error
                type: object
                description: ''
                properties:
                  type:
                    type: string
                    description: URL to a document describing the error condition.
                  status:
                    type: integer
                    description: >-
                      Transmission of the HTTP status code so that all
                      information can be found in one place, but also to correct
                      changes in the status code due to the use of proxy
                      servers.
                  title:
                    type: string
                    description: >-
                      A short, human-readable title for the general error type;
                      the title should not change for given types.
                  detail:
                    type: string
                    description: A human-readable description of the specific error.
                  instance:
                    type: string
                    description: >-
                      This optional key may be present, with a unique URI for
                      the specific error; this will often point to an error log
                      for that specific response.
                  request_id:
                    type: string
                    description: Correlation ID for the original request.
                required:
                  - type
                  - status
                additionalProperties: false
              example:
                status: 504
                type: gateway_timeout
  /virtual_cash_balances/decreases/{virtual_cash_decrease_id}:
    parameters:
      - name: virtual_cash_decrease_id
        in: path
        required: true
        schema:
          title: Virtual cash unique identifier
          type: string
          description: Virtual cash unique identifier
          format: uuid
      - name: upvest-client-id
        in: header
        description: Tenant Client ID
        required: true
        schema:
          type: string
          format: uuid
          example: ebabcf4d-61c3-4942-875c-e265a7c2d062
      - name: authorization
        in: header
        description: |
          Bearer (access) token from the OAuth flow with correct scopes.
          https://datatracker.ietf.org/doc/html/rfc6750
        required: true
        schema:
          type: string
          pattern: ^Bearer [a-zA-Z0-9\-\._~+/]*=*
          example: Bearer c2VjcmV0Cg==
      - name: signature
        in: header
        required: true
        schema:
          type: string
        description: >-
          https://tools.ietf.org/id/draft-ietf-httpbis-message-signatures-01.html#name-the-signature-http-header
      - name: signature-input
        in: header
        required: true
        schema:
          type: string
        description: >-
          https://tools.ietf.org/id/draft-ietf-httpbis-message-signatures-01.html#name-the-signature-input-http-he
      - name: upvest-api-version
        in: header
        required: false
        schema:
          type: string
          enum:
            - '1'
          default: '1'
          example: '1'
        description: 'Upvest API version (Note: Do not include quotation marks)'
    delete:
      operationId: cancel_virtual_cash_decrease
      summary: Cancel virtual cash decrease by ID
      description: >-
        Cancels a virtual cash decrease specified by its ID. It is only possible
        to cancel a virtual cash decrease if it has the status `ISSUED` or
        `QUEUED`.
      tags:
        - Virtual Cash Balances
      security:
        - oauth-client-credentials:
            - virtual_cash_balances:admin
      responses:
        '202':
          description: >-
            The request has been successfully accepted and will be processed
            asynchronously.
          headers:
            upvest-request-id:
              required: true
              schema:
                type: string
                format: uuid
                example: 169ae4c7-ebd7-4041-94da-25369653eba7
        '401':
          description: Unauthorized. The caller has not been authenticated.
          headers:
            upvest-request-id:
              required: true
              schema:
                type: string
                format: uuid
                example: 169ae4c7-ebd7-4041-94da-25369653eba7
          content:
            application/problem+json:
              schema:
                title: Error
                type: object
                description: ''
                properties:
                  type:
                    type: string
                    description: URL to a document describing the error condition.
                  status:
                    type: integer
                    description: >-
                      Transmission of the HTTP status code so that all
                      information can be found in one place, but also to correct
                      changes in the status code due to the use of proxy
                      servers.
                  title:
                    type: string
                    description: >-
                      A short, human-readable title for the general error type;
                      the title should not change for given types.
                  detail:
                    type: string
                    description: A human-readable description of the specific error.
                  instance:
                    type: string
                    description: >-
                      This optional key may be present, with a unique URI for
                      the specific error; this will often point to an error log
                      for that specific response.
                  request_id:
                    type: string
                    description: Correlation ID for the original request.
                required:
                  - type
                  - status
                additionalProperties: false
              example:
                status: 401
                type: unauthorized
        '403':
          description: >-
            Forbidden. The caller has been authenticated but is not allowed to
            take the requested action.
          headers:
            upvest-request-id:
              required: true
              schema:
                type: string
                format: uuid
                example: 169ae4c7-ebd7-4041-94da-25369653eba7
          content:
            application/problem+json:
              schema:
                title: Error
                type: object
                description: ''
                properties:
                  type:
                    type: string
                    description: URL to a document describing the error condition.
                  status:
                    type: integer
                    description: >-
                      Transmission of the HTTP status code so that all
                      information can be found in one place, but also to correct
                      changes in the status code due to the use of proxy
                      servers.
                  title:
                    type: string
                    description: >-
                      A short, human-readable title for the general error type;
                      the title should not change for given types.
                  detail:
                    type: string
                    description: A human-readable description of the specific error.
                  instance:
                    type: string
                    description: >-
                      This optional key may be present, with a unique URI for
                      the specific error; this will often point to an error log
                      for that specific response.
                  request_id:
                    type: string
                    description: Correlation ID for the original request.
                required:
                  - type
                  - status
                additionalProperties: false
              example:
                status: 403
                type: forbidden
        '404':
          description: Not Found. The requested resource could not be found.
          headers:
            upvest-request-id:
              required: true
              schema:
                type: string
                format: uuid
                example: 169ae4c7-ebd7-4041-94da-25369653eba7
          content:
            application/problem+json:
              schema:
                title: Error
                type: object
                description: ''
                properties:
                  type:
                    type: string
                    description: URL to a document describing the error condition.
                  status:
                    type: integer
                    description: >-
                      Transmission of the HTTP status code so that all
                      information can be found in one place, but also to correct
                      changes in the status code due to the use of proxy
                      servers.
                  title:
                    type: string
                    description: >-
                      A short, human-readable title for the general error type;
                      the title should not change for given types.
                  detail:
                    type: string
                    description: A human-readable description of the specific error.
                  instance:
                    type: string
                    description: >-
                      This optional key may be present, with a unique URI for
                      the specific error; this will often point to an error log
                      for that specific response.
                  request_id:
                    type: string
                    description: Correlation ID for the original request.
                required:
                  - type
                  - status
                additionalProperties: false
              example:
                status: 404
                type: not_found
        '406':
          description: >-
            Not Acceptable. The resource does not have a current representation
            that would be acceptable to the user agent. "Accept" header defined
            unsupported value.
          headers:
            upvest-request-id:
              required: true
              schema:
                type: string
                format: uuid
                example: 169ae4c7-ebd7-4041-94da-25369653eba7
          content:
            application/problem+json:
              schema:
                title: Error
                type: object
                description: ''
                properties:
                  type:
                    type: string
                    description: URL to a document describing the error condition.
                  status:
                    type: integer
                    description: >-
                      Transmission of the HTTP status code so that all
                      information can be found in one place, but also to correct
                      changes in the status code due to the use of proxy
                      servers.
                  title:
                    type: string
                    description: >-
                      A short, human-readable title for the general error type;
                      the title should not change for given types.
                  detail:
                    type: string
                    description: A human-readable description of the specific error.
                  instance:
                    type: string
                    description: >-
                      This optional key may be present, with a unique URI for
                      the specific error; this will often point to an error log
                      for that specific response.
                  request_id:
                    type: string
                    description: Correlation ID for the original request.
                required:
                  - type
                  - status
                additionalProperties: false
              example:
                status: 406
                type: not_acceptable
        '422':
          description: >-
            Unprocessable Entity. The syntax of request is correct but server
            can't process it due a semantic error.
          headers:
            upvest-request-id:
              required: true
              schema:
                type: string
                format: uuid
                example: 169ae4c7-ebd7-4041-94da-25369653eba7
          content:
            application/problem+json:
              schema:
                title: Error
                type: object
                description: ''
                properties:
                  type:
                    type: string
                    description: URL to a document describing the error condition.
                  status:
                    type: integer
                    description: >-
                      Transmission of the HTTP status code so that all
                      information can be found in one place, but also to correct
                      changes in the status code due to the use of proxy
                      servers.
                  title:
                    type: string
                    description: >-
                      A short, human-readable title for the general error type;
                      the title should not change for given types.
                  detail:
                    type: string
                    description: A human-readable description of the specific error.
                  instance:
                    type: string
                    description: >-
                      This optional key may be present, with a unique URI for
                      the specific error; this will often point to an error log
                      for that specific response.
                  request_id:
                    type: string
                    description: Correlation ID for the original request.
                required:
                  - type
                  - status
                additionalProperties: false
              example:
                status: 422
                type: unprocessable_entity
        '429':
          description: >-
            Too Many Requests. The caller has exceeded their quota for the time
            period and has been throttled.
          headers:
            upvest-request-id:
              required: true
              schema:
                type: string
                format: uuid
                example: 169ae4c7-ebd7-4041-94da-25369653eba7
          content:
            application/problem+json:
              schema:
                title: Error
                type: object
                description: ''
                properties:
                  type:
                    type: string
                    description: URL to a document describing the error condition.
                  status:
                    type: integer
                    description: >-
                      Transmission of the HTTP status code so that all
                      information can be found in one place, but also to correct
                      changes in the status code due to the use of proxy
                      servers.
                  title:
                    type: string
                    description: >-
                      A short, human-readable title for the general error type;
                      the title should not change for given types.
                  detail:
                    type: string
                    description: A human-readable description of the specific error.
                  instance:
                    type: string
                    description: >-
                      This optional key may be present, with a unique URI for
                      the specific error; this will often point to an error log
                      for that specific response.
                  request_id:
                    type: string
                    description: Correlation ID for the original request.
                required:
                  - type
                  - status
                additionalProperties: false
              example:
                status: 429
                type: too_many_requests
        '500':
          description: Internal Server Error. The service encountered an unexpected error.
          headers:
            upvest-request-id:
              required: true
              schema:
                type: string
                format: uuid
                example: 169ae4c7-ebd7-4041-94da-25369653eba7
          content:
            application/problem+json:
              schema:
                title: Error
                type: object
                description: ''
                properties:
                  type:
                    type: string
                    description: URL to a document describing the error condition.
                  status:
                    type: integer
                    description: >-
                      Transmission of the HTTP status code so that all
                      information can be found in one place, but also to correct
                      changes in the status code due to the use of proxy
                      servers.
                  title:
                    type: string
                    description: >-
                      A short, human-readable title for the general error type;
                      the title should not change for given types.
                  detail:
                    type: string
                    description: A human-readable description of the specific error.
                  instance:
                    type: string
                    description: >-
                      This optional key may be present, with a unique URI for
                      the specific error; this will often point to an error log
                      for that specific response.
                  request_id:
                    type: string
                    description: Correlation ID for the original request.
                required:
                  - type
                  - status
                additionalProperties: false
              example:
                status: 500
                type: internal_server_error
        '503':
          description: >-
            Service Unavailable. The service handling for this request cannot be
            reached at this time.
          headers:
            upvest-request-id:
              required: true
              schema:
                type: string
                format: uuid
                example: 169ae4c7-ebd7-4041-94da-25369653eba7
          content:
            application/problem+json:
              schema:
                title: Error
                type: object
                description: ''
                properties:
                  type:
                    type: string
                    description: URL to a document describing the error condition.
                  status:
                    type: integer
                    description: >-
                      Transmission of the HTTP status code so that all
                      information can be found in one place, but also to correct
                      changes in the status code due to the use of proxy
                      servers.
                  title:
                    type: string
                    description: >-
                      A short, human-readable title for the general error type;
                      the title should not change for given types.
                  detail:
                    type: string
                    description: A human-readable description of the specific error.
                  instance:
                    type: string
                    description: >-
                      This optional key may be present, with a unique URI for
                      the specific error; this will often point to an error log
                      for that specific response.
                  request_id:
                    type: string
                    description: Correlation ID for the original request.
                required:
                  - type
                  - status
                additionalProperties: false
              example:
                status: 503
                type: method_not_allowed
        '504':
          description: >-
            Gateway Timeout. The service gateway has reached its internal
            timeout.
          headers:
            upvest-request-id:
              required: true
              schema:
                type: string
                format: uuid
                example: 169ae4c7-ebd7-4041-94da-25369653eba7
          content:
            application/problem+json:
              schema:
                title: Error
                type: object
                description: ''
                properties:
                  type:
                    type: string
                    description: URL to a document describing the error condition.
                  status:
                    type: integer
                    description: >-
                      Transmission of the HTTP status code so that all
                      information can be found in one place, but also to correct
                      changes in the status code due to the use of proxy
                      servers.
                  title:
                    type: string
                    description: >-
                      A short, human-readable title for the general error type;
                      the title should not change for given types.
                  detail:
                    type: string
                    description: A human-readable description of the specific error.
                  instance:
                    type: string
                    description: >-
                      This optional key may be present, with a unique URI for
                      the specific error; this will often point to an error log
                      for that specific response.
                  request_id:
                    type: string
                    description: Correlation ID for the original request.
                required:
                  - type
                  - status
                additionalProperties: false
              example:
                status: 504
                type: gateway_timeout
  /savings_plans/{savings_plan_id}:
    parameters:
      - name: savings_plan_id
        in: path
        required: true
        schema:
          title: Savings plan unique identifier
          type: string
          format: uuid
      - name: upvest-client-id
        in: header
        description: Tenant Client ID
        required: true
        schema:
          type: string
          format: uuid
          example: ebabcf4d-61c3-4942-875c-e265a7c2d062
      - name: authorization
        in: header
        description: |
          Bearer (access) token from the OAuth flow with correct scopes.
          https://datatracker.ietf.org/doc/html/rfc6750
        required: true
        schema:
          type: string
          pattern: ^Bearer [a-zA-Z0-9\-\._~+/]*=*
          example: Bearer c2VjcmV0Cg==
      - name: signature
        in: header
        required: true
        schema:
          type: string
        description: >-
          https://tools.ietf.org/id/draft-ietf-httpbis-message-signatures-01.html#name-the-signature-http-header
      - name: signature-input
        in: header
        required: true
        schema:
          type: string
        description: >-
          https://tools.ietf.org/id/draft-ietf-httpbis-message-signatures-01.html#name-the-signature-input-http-he
      - name: upvest-api-version
        in: header
        required: false
        schema:
          type: string
          enum:
            - '1'
          default: '1'
          example: '1'
        description: 'Upvest API version (Note: Do not include quotation marks)'
    get:
      operationId: retrieve_savings_plan
      summary: Retrieve a savings plan
      description: Retrieve a savings plan specified by its ID.
      tags:
        - Savings Plans
      security:
        - oauth-client-credentials:
            - savings_plans:read
            - savings_plans:admin
      responses:
        '200':
          description: OK
          headers:
            upvest-request-id:
              required: true
              schema:
                type: string
                format: uuid
                example: 169ae4c7-ebd7-4041-94da-25369653eba7
          content:
            application/json:
              schema:
                title: Savings plan
                type: object
                properties:
                  id:
                    title: Savings plan unique identifier
                    type: string
                    format: uuid
                  created_at:
                    type: string
                    format: date-time
                    description: >-
                      Date and time when the resource was created. [RFC
                      3339-5](https://datatracker.ietf.org/doc/html/rfc3339#section-5.6),
                      [ISO8601
                      UTC](https://www.iso.org/iso-8601-date-and-time-format.html)
                  updated_at:
                    type: string
                    format: date-time
                    description: >-
                      Date and time when the resource was last updated. [RFC
                      3339-5](https://datatracker.ietf.org/doc/html/rfc3339#section-5.6),
                      [ISO8601
                      UTC](https://www.iso.org/iso-8601-date-and-time-format.html)
                  user_id:
                    title: User unique identifier.
                    type: string
                    description: User unique identifier.
                    format: uuid
                  account_id:
                    title: Account unique identifier.
                    type: string
                    description: Account unique identifier.
                    format: uuid
                  name:
                    type: string
                    description: Savings plan name
                  type:
                    type: string
                    description: |-
                      Type of the Savings plan.
                      * PORTFOLIO - 
                      * INSTRUMENT - 
                    enum:
                      - PORTFOLIO
                      - INSTRUMENT
                  instrument_id:
                    title: Instrument unique identifier
                    description: Instrument unique identifier.
                    oneOf:
                      - title: International securities identification number
                        type: string
                        description: >-
                          International securities identification number defined
                          by [ISO
                          6166](https://en.wikipedia.org/wiki/International_Securities_Identification_Number).
                        pattern: ^[A-Z]{2}[A-Z0-9]{9}[0-9]$
                      - title: German securities identification code
                        type: string
                        description: >-
                          German securities identification code known as
                          [Wertpapierkennnummer](https://en.wikipedia.org/wiki/Wertpapierkennnummer).
                        pattern: ^[A-HJ-NP-Z0-9]{6}$
                  instrument_id_type:
                    type: string
                    description: |-
                      The type of the ID used in the request.
                      * ISIN - International Securities Identification Number
                      * WKN - German securities identification code
                    enum:
                      - ISIN
                      - WKN
                    default: ISIN
                  cash_amount:
                    type: string
                    pattern: ^[0-9]{0,63}(\.[0-9]{1,27})?$
                  start_date:
                    type: string
                    description: >-
                      First date of the savings plan execution in YYYY-MM-DD
                      format.
                    pattern: ^[12]\d{3}-(0[1-9]|1[0-2])-(0[1-9]|[12]\d|3[01])$
                  currency:
                    type: string
                    description: >-
                      Alphabetic three-letter [ISO
                      4217](https://en.wikipedia.org/wiki/ISO_4217) currency
                      code.

                      * EUR - Euro
                    enum:
                      - EUR
                    default: EUR
                  period:
                    type: string
                    description: |-
                      Unit of time. 
                      * WEEK - 
                      * MONTH - 
                      * YEAR - 
                    enum:
                      - WEEK
                      - MONTH
                      - YEAR
                  interval:
                    description: Number of periods between executions
                    type: integer
                    default: 1
                    minimum: 1
                    maximum: 1000
                  status:
                    type: string
                    description: |-
                      Status of a Savings Plan. 
                      * ACTIVE - 
                      * CANCELLED - 
                    enum:
                      - ACTIVE
                      - CANCELLED
                required:
                  - id
                  - user_id
                  - account_id
                  - type
                  - cash_amount
                  - currency
                  - start_date
                  - period
                  - interval
                  - created_at
                  - updated_at
                additionalProperties: false
              examples:
                instrument:
                  summary: instrument
                  value:
                    id: fc34d28e-38f5-49d2-92f6-82acb79098f4
                    created_at: '2023-07-21T14:10:00.00Z'
                    updated_at: '2023-07-21T15:10:00.00Z'
                    user_id: 4b9732bd-7496-4913-8a5f-6360479d7fed
                    account_id: 00ef0be8-d564-43af-b3c7-11b7a2188030
                    name: Instrument savings plan
                    type: INSTRUMENT
                    instrument_id: DE0007664005
                    instrument_id_type: ISIN
                    cash_amount: '100.00'
                    currency: EUR
                    start_date: '2023-07-24'
                    period: WEEK
                    interval: 1
                    status: ACTIVE
                portfolio:
                  summary: portfolio
                  value:
                    id: fc34d28e-38f5-49d2-92f6-82acb79098f4
                    created_at: '2023-07-21T14:10:00.00Z'
                    updated_at: '2023-07-21T15:10:00.00Z'
                    user_id: 4b9732bd-7496-4913-8a5f-6360479d7fed
                    account_id: 00ef0be8-d564-43af-b3c7-11b7a2188030
                    name: Portfolio savings plan
                    type: PORTFOLIO
                    cash_amount: '100.00'
                    currency: EUR
                    start_date: '2023-07-24'
                    period: WEEK
                    interval: 1
                    status: ACTIVE
        '401':
          description: Unauthorized. The caller has not been authenticated.
          headers:
            upvest-request-id:
              required: true
              schema:
                type: string
                format: uuid
                example: 169ae4c7-ebd7-4041-94da-25369653eba7
          content:
            application/problem+json:
              schema:
                title: Error
                type: object
                description: ''
                properties:
                  type:
                    type: string
                    description: URL to a document describing the error condition.
                  status:
                    type: integer
                    description: >-
                      Transmission of the HTTP status code so that all
                      information can be found in one place, but also to correct
                      changes in the status code due to the use of proxy
                      servers.
                  title:
                    type: string
                    description: >-
                      A short, human-readable title for the general error type;
                      the title should not change for given types.
                  detail:
                    type: string
                    description: A human-readable description of the specific error.
                  instance:
                    type: string
                    description: >-
                      This optional key may be present, with a unique URI for
                      the specific error; this will often point to an error log
                      for that specific response.
                  request_id:
                    type: string
                    description: Correlation ID for the original request.
                required:
                  - type
                  - status
                additionalProperties: false
              example:
                status: 401
                type: unauthorized
        '403':
          description: >-
            Forbidden. The caller has been authenticated but is not allowed to
            take the requested action.
          headers:
            upvest-request-id:
              required: true
              schema:
                type: string
                format: uuid
                example: 169ae4c7-ebd7-4041-94da-25369653eba7
          content:
            application/problem+json:
              schema:
                title: Error
                type: object
                description: ''
                properties:
                  type:
                    type: string
                    description: URL to a document describing the error condition.
                  status:
                    type: integer
                    description: >-
                      Transmission of the HTTP status code so that all
                      information can be found in one place, but also to correct
                      changes in the status code due to the use of proxy
                      servers.
                  title:
                    type: string
                    description: >-
                      A short, human-readable title for the general error type;
                      the title should not change for given types.
                  detail:
                    type: string
                    description: A human-readable description of the specific error.
                  instance:
                    type: string
                    description: >-
                      This optional key may be present, with a unique URI for
                      the specific error; this will often point to an error log
                      for that specific response.
                  request_id:
                    type: string
                    description: Correlation ID for the original request.
                required:
                  - type
                  - status
                additionalProperties: false
              example:
                status: 403
                type: forbidden
        '404':
          description: Not Found. The requested resource could not be found.
          headers:
            upvest-request-id:
              required: true
              schema:
                type: string
                format: uuid
                example: 169ae4c7-ebd7-4041-94da-25369653eba7
          content:
            application/problem+json:
              schema:
                title: Error
                type: object
                description: ''
                properties:
                  type:
                    type: string
                    description: URL to a document describing the error condition.
                  status:
                    type: integer
                    description: >-
                      Transmission of the HTTP status code so that all
                      information can be found in one place, but also to correct
                      changes in the status code due to the use of proxy
                      servers.
                  title:
                    type: string
                    description: >-
                      A short, human-readable title for the general error type;
                      the title should not change for given types.
                  detail:
                    type: string
                    description: A human-readable description of the specific error.
                  instance:
                    type: string
                    description: >-
                      This optional key may be present, with a unique URI for
                      the specific error; this will often point to an error log
                      for that specific response.
                  request_id:
                    type: string
                    description: Correlation ID for the original request.
                required:
                  - type
                  - status
                additionalProperties: false
              example:
                status: 404
                type: not_found
        '405':
          description: >-
            Method Not Allowed. The requested method is not allowed on the
            requested resource.
          headers:
            upvest-request-id:
              required: true
              schema:
                type: string
                format: uuid
                example: 169ae4c7-ebd7-4041-94da-25369653eba7
          content:
            application/problem+json:
              schema:
                title: Error
                type: object
                description: ''
                properties:
                  type:
                    type: string
                    description: URL to a document describing the error condition.
                  status:
                    type: integer
                    description: >-
                      Transmission of the HTTP status code so that all
                      information can be found in one place, but also to correct
                      changes in the status code due to the use of proxy
                      servers.
                  title:
                    type: string
                    description: >-
                      A short, human-readable title for the general error type;
                      the title should not change for given types.
                  detail:
                    type: string
                    description: A human-readable description of the specific error.
                  instance:
                    type: string
                    description: >-
                      This optional key may be present, with a unique URI for
                      the specific error; this will often point to an error log
                      for that specific response.
                  request_id:
                    type: string
                    description: Correlation ID for the original request.
                required:
                  - type
                  - status
                additionalProperties: false
              example:
                status: 405
                type: method_not_allowed
        '406':
          description: >-
            Not Acceptable. The resource does not have a current representation
            that would be acceptable to the user agent. "Accept" header defined
            unsupported value.
          headers:
            upvest-request-id:
              required: true
              schema:
                type: string
                format: uuid
                example: 169ae4c7-ebd7-4041-94da-25369653eba7
          content:
            application/problem+json:
              schema:
                title: Error
                type: object
                description: ''
                properties:
                  type:
                    type: string
                    description: URL to a document describing the error condition.
                  status:
                    type: integer
                    description: >-
                      Transmission of the HTTP status code so that all
                      information can be found in one place, but also to correct
                      changes in the status code due to the use of proxy
                      servers.
                  title:
                    type: string
                    description: >-
                      A short, human-readable title for the general error type;
                      the title should not change for given types.
                  detail:
                    type: string
                    description: A human-readable description of the specific error.
                  instance:
                    type: string
                    description: >-
                      This optional key may be present, with a unique URI for
                      the specific error; this will often point to an error log
                      for that specific response.
                  request_id:
                    type: string
                    description: Correlation ID for the original request.
                required:
                  - type
                  - status
                additionalProperties: false
              example:
                status: 406
                type: not_acceptable
        '429':
          description: >-
            Too Many Requests. The caller has exceeded their quota for the time
            period and has been throttled.
          headers:
            upvest-request-id:
              required: true
              schema:
                type: string
                format: uuid
                example: 169ae4c7-ebd7-4041-94da-25369653eba7
          content:
            application/problem+json:
              schema:
                title: Error
                type: object
                description: ''
                properties:
                  type:
                    type: string
                    description: URL to a document describing the error condition.
                  status:
                    type: integer
                    description: >-
                      Transmission of the HTTP status code so that all
                      information can be found in one place, but also to correct
                      changes in the status code due to the use of proxy
                      servers.
                  title:
                    type: string
                    description: >-
                      A short, human-readable title for the general error type;
                      the title should not change for given types.
                  detail:
                    type: string
                    description: A human-readable description of the specific error.
                  instance:
                    type: string
                    description: >-
                      This optional key may be present, with a unique URI for
                      the specific error; this will often point to an error log
                      for that specific response.
                  request_id:
                    type: string
                    description: Correlation ID for the original request.
                required:
                  - type
                  - status
                additionalProperties: false
              example:
                status: 429
                type: too_many_requests
        '500':
          description: Internal Server Error. The service encountered an unexpected error.
          headers:
            upvest-request-id:
              required: true
              schema:
                type: string
                format: uuid
                example: 169ae4c7-ebd7-4041-94da-25369653eba7
          content:
            application/problem+json:
              schema:
                title: Error
                type: object
                description: ''
                properties:
                  type:
                    type: string
                    description: URL to a document describing the error condition.
                  status:
                    type: integer
                    description: >-
                      Transmission of the HTTP status code so that all
                      information can be found in one place, but also to correct
                      changes in the status code due to the use of proxy
                      servers.
                  title:
                    type: string
                    description: >-
                      A short, human-readable title for the general error type;
                      the title should not change for given types.
                  detail:
                    type: string
                    description: A human-readable description of the specific error.
                  instance:
                    type: string
                    description: >-
                      This optional key may be present, with a unique URI for
                      the specific error; this will often point to an error log
                      for that specific response.
                  request_id:
                    type: string
                    description: Correlation ID for the original request.
                required:
                  - type
                  - status
                additionalProperties: false
              example:
                status: 500
                type: internal_server_error
        '503':
          description: >-
            Service Unavailable. The service handling for this request cannot be
            reached at this time.
          headers:
            upvest-request-id:
              required: true
              schema:
                type: string
                format: uuid
                example: 169ae4c7-ebd7-4041-94da-25369653eba7
          content:
            application/problem+json:
              schema:
                title: Error
                type: object
                description: ''
                properties:
                  type:
                    type: string
                    description: URL to a document describing the error condition.
                  status:
                    type: integer
                    description: >-
                      Transmission of the HTTP status code so that all
                      information can be found in one place, but also to correct
                      changes in the status code due to the use of proxy
                      servers.
                  title:
                    type: string
                    description: >-
                      A short, human-readable title for the general error type;
                      the title should not change for given types.
                  detail:
                    type: string
                    description: A human-readable description of the specific error.
                  instance:
                    type: string
                    description: >-
                      This optional key may be present, with a unique URI for
                      the specific error; this will often point to an error log
                      for that specific response.
                  request_id:
                    type: string
                    description: Correlation ID for the original request.
                required:
                  - type
                  - status
                additionalProperties: false
              example:
                status: 503
                type: method_not_allowed
        '504':
          description: >-
            Gateway Timeout. The service gateway has reached its internal
            timeout.
          headers:
            upvest-request-id:
              required: true
              schema:
                type: string
                format: uuid
                example: 169ae4c7-ebd7-4041-94da-25369653eba7
          content:
            application/problem+json:
              schema:
                title: Error
                type: object
                description: ''
                properties:
                  type:
                    type: string
                    description: URL to a document describing the error condition.
                  status:
                    type: integer
                    description: >-
                      Transmission of the HTTP status code so that all
                      information can be found in one place, but also to correct
                      changes in the status code due to the use of proxy
                      servers.
                  title:
                    type: string
                    description: >-
                      A short, human-readable title for the general error type;
                      the title should not change for given types.
                  detail:
                    type: string
                    description: A human-readable description of the specific error.
                  instance:
                    type: string
                    description: >-
                      This optional key may be present, with a unique URI for
                      the specific error; this will often point to an error log
                      for that specific response.
                  request_id:
                    type: string
                    description: Correlation ID for the original request.
                required:
                  - type
                  - status
                additionalProperties: false
              example:
                status: 504
                type: gateway_timeout
    delete:
      operationId: delete_savings_plan
      summary: Delete a savings plan
      description: Delete a savings plan specified by its ID.
      tags:
        - Savings Plans
      security:
        - oauth-client-credentials:
            - savings_plans:admin
      responses:
        '202':
          description: >-
            The request has been successfully accepted and will be processed
            asynchronously.
          headers:
            upvest-request-id:
              required: true
              schema:
                type: string
                format: uuid
                example: 169ae4c7-ebd7-4041-94da-25369653eba7
        '401':
          description: Unauthorized. The caller has not been authenticated.
          headers:
            upvest-request-id:
              required: true
              schema:
                type: string
                format: uuid
                example: 169ae4c7-ebd7-4041-94da-25369653eba7
          content:
            application/problem+json:
              schema:
                title: Error
                type: object
                description: ''
                properties:
                  type:
                    type: string
                    description: URL to a document describing the error condition.
                  status:
                    type: integer
                    description: >-
                      Transmission of the HTTP status code so that all
                      information can be found in one place, but also to correct
                      changes in the status code due to the use of proxy
                      servers.
                  title:
                    type: string
                    description: >-
                      A short, human-readable title for the general error type;
                      the title should not change for given types.
                  detail:
                    type: string
                    description: A human-readable description of the specific error.
                  instance:
                    type: string
                    description: >-
                      This optional key may be present, with a unique URI for
                      the specific error; this will often point to an error log
                      for that specific response.
                  request_id:
                    type: string
                    description: Correlation ID for the original request.
                required:
                  - type
                  - status
                additionalProperties: false
              example:
                status: 401
                type: unauthorized
        '403':
          description: >-
            Forbidden. The caller has been authenticated but is not allowed to
            take the requested action.
          headers:
            upvest-request-id:
              required: true
              schema:
                type: string
                format: uuid
                example: 169ae4c7-ebd7-4041-94da-25369653eba7
          content:
            application/problem+json:
              schema:
                title: Error
                type: object
                description: ''
                properties:
                  type:
                    type: string
                    description: URL to a document describing the error condition.
                  status:
                    type: integer
                    description: >-
                      Transmission of the HTTP status code so that all
                      information can be found in one place, but also to correct
                      changes in the status code due to the use of proxy
                      servers.
                  title:
                    type: string
                    description: >-
                      A short, human-readable title for the general error type;
                      the title should not change for given types.
                  detail:
                    type: string
                    description: A human-readable description of the specific error.
                  instance:
                    type: string
                    description: >-
                      This optional key may be present, with a unique URI for
                      the specific error; this will often point to an error log
                      for that specific response.
                  request_id:
                    type: string
                    description: Correlation ID for the original request.
                required:
                  - type
                  - status
                additionalProperties: false
              example:
                status: 403
                type: forbidden
        '404':
          description: Not Found. The requested resource could not be found.
          headers:
            upvest-request-id:
              required: true
              schema:
                type: string
                format: uuid
                example: 169ae4c7-ebd7-4041-94da-25369653eba7
          content:
            application/problem+json:
              schema:
                title: Error
                type: object
                description: ''
                properties:
                  type:
                    type: string
                    description: URL to a document describing the error condition.
                  status:
                    type: integer
                    description: >-
                      Transmission of the HTTP status code so that all
                      information can be found in one place, but also to correct
                      changes in the status code due to the use of proxy
                      servers.
                  title:
                    type: string
                    description: >-
                      A short, human-readable title for the general error type;
                      the title should not change for given types.
                  detail:
                    type: string
                    description: A human-readable description of the specific error.
                  instance:
                    type: string
                    description: >-
                      This optional key may be present, with a unique URI for
                      the specific error; this will often point to an error log
                      for that specific response.
                  request_id:
                    type: string
                    description: Correlation ID for the original request.
                required:
                  - type
                  - status
                additionalProperties: false
              example:
                status: 404
                type: not_found
        '406':
          description: >-
            Not Acceptable. The resource does not have a current representation
            that would be acceptable to the user agent. "Accept" header defined
            unsupported value.
          headers:
            upvest-request-id:
              required: true
              schema:
                type: string
                format: uuid
                example: 169ae4c7-ebd7-4041-94da-25369653eba7
          content:
            application/problem+json:
              schema:
                title: Error
                type: object
                description: ''
                properties:
                  type:
                    type: string
                    description: URL to a document describing the error condition.
                  status:
                    type: integer
                    description: >-
                      Transmission of the HTTP status code so that all
                      information can be found in one place, but also to correct
                      changes in the status code due to the use of proxy
                      servers.
                  title:
                    type: string
                    description: >-
                      A short, human-readable title for the general error type;
                      the title should not change for given types.
                  detail:
                    type: string
                    description: A human-readable description of the specific error.
                  instance:
                    type: string
                    description: >-
                      This optional key may be present, with a unique URI for
                      the specific error; this will often point to an error log
                      for that specific response.
                  request_id:
                    type: string
                    description: Correlation ID for the original request.
                required:
                  - type
                  - status
                additionalProperties: false
              example:
                status: 406
                type: not_acceptable
        '409':
          description: >-
            Conflict. An operation is not available for the current state of the
            resource.
          headers:
            upvest-request-id:
              required: true
              schema:
                type: string
                format: uuid
                example: 169ae4c7-ebd7-4041-94da-25369653eba7
          content:
            application/problem+json:
              schema:
                title: Error
                type: object
                description: ''
                properties:
                  type:
                    type: string
                    description: URL to a document describing the error condition.
                  status:
                    type: integer
                    description: >-
                      Transmission of the HTTP status code so that all
                      information can be found in one place, but also to correct
                      changes in the status code due to the use of proxy
                      servers.
                  title:
                    type: string
                    description: >-
                      A short, human-readable title for the general error type;
                      the title should not change for given types.
                  detail:
                    type: string
                    description: A human-readable description of the specific error.
                  instance:
                    type: string
                    description: >-
                      This optional key may be present, with a unique URI for
                      the specific error; this will often point to an error log
                      for that specific response.
                  request_id:
                    type: string
                    description: Correlation ID for the original request.
                required:
                  - type
                  - status
                additionalProperties: false
              example:
                status: 409
                type: conflict
        '429':
          description: >-
            Too Many Requests. The caller has exceeded their quota for the time
            period and has been throttled.
          headers:
            upvest-request-id:
              required: true
              schema:
                type: string
                format: uuid
                example: 169ae4c7-ebd7-4041-94da-25369653eba7
          content:
            application/problem+json:
              schema:
                title: Error
                type: object
                description: ''
                properties:
                  type:
                    type: string
                    description: URL to a document describing the error condition.
                  status:
                    type: integer
                    description: >-
                      Transmission of the HTTP status code so that all
                      information can be found in one place, but also to correct
                      changes in the status code due to the use of proxy
                      servers.
                  title:
                    type: string
                    description: >-
                      A short, human-readable title for the general error type;
                      the title should not change for given types.
                  detail:
                    type: string
                    description: A human-readable description of the specific error.
                  instance:
                    type: string
                    description: >-
                      This optional key may be present, with a unique URI for
                      the specific error; this will often point to an error log
                      for that specific response.
                  request_id:
                    type: string
                    description: Correlation ID for the original request.
                required:
                  - type
                  - status
                additionalProperties: false
              example:
                status: 429
                type: too_many_requests
        '500':
          description: Internal Server Error. The service encountered an unexpected error.
          headers:
            upvest-request-id:
              required: true
              schema:
                type: string
                format: uuid
                example: 169ae4c7-ebd7-4041-94da-25369653eba7
          content:
            application/problem+json:
              schema:
                title: Error
                type: object
                description: ''
                properties:
                  type:
                    type: string
                    description: URL to a document describing the error condition.
                  status:
                    type: integer
                    description: >-
                      Transmission of the HTTP status code so that all
                      information can be found in one place, but also to correct
                      changes in the status code due to the use of proxy
                      servers.
                  title:
                    type: string
                    description: >-
                      A short, human-readable title for the general error type;
                      the title should not change for given types.
                  detail:
                    type: string
                    description: A human-readable description of the specific error.
                  instance:
                    type: string
                    description: >-
                      This optional key may be present, with a unique URI for
                      the specific error; this will often point to an error log
                      for that specific response.
                  request_id:
                    type: string
                    description: Correlation ID for the original request.
                required:
                  - type
                  - status
                additionalProperties: false
              example:
                status: 500
                type: internal_server_error
        '503':
          description: >-
            Service Unavailable. The service handling for this request cannot be
            reached at this time.
          headers:
            upvest-request-id:
              required: true
              schema:
                type: string
                format: uuid
                example: 169ae4c7-ebd7-4041-94da-25369653eba7
          content:
            application/problem+json:
              schema:
                title: Error
                type: object
                description: ''
                properties:
                  type:
                    type: string
                    description: URL to a document describing the error condition.
                  status:
                    type: integer
                    description: >-
                      Transmission of the HTTP status code so that all
                      information can be found in one place, but also to correct
                      changes in the status code due to the use of proxy
                      servers.
                  title:
                    type: string
                    description: >-
                      A short, human-readable title for the general error type;
                      the title should not change for given types.
                  detail:
                    type: string
                    description: A human-readable description of the specific error.
                  instance:
                    type: string
                    description: >-
                      This optional key may be present, with a unique URI for
                      the specific error; this will often point to an error log
                      for that specific response.
                  request_id:
                    type: string
                    description: Correlation ID for the original request.
                required:
                  - type
                  - status
                additionalProperties: false
              example:
                status: 503
                type: method_not_allowed
        '504':
          description: >-
            Gateway Timeout. The service gateway has reached its internal
            timeout.
          headers:
            upvest-request-id:
              required: true
              schema:
                type: string
                format: uuid
                example: 169ae4c7-ebd7-4041-94da-25369653eba7
          content:
            application/problem+json:
              schema:
                title: Error
                type: object
                description: ''
                properties:
                  type:
                    type: string
                    description: URL to a document describing the error condition.
                  status:
                    type: integer
                    description: >-
                      Transmission of the HTTP status code so that all
                      information can be found in one place, but also to correct
                      changes in the status code due to the use of proxy
                      servers.
                  title:
                    type: string
                    description: >-
                      A short, human-readable title for the general error type;
                      the title should not change for given types.
                  detail:
                    type: string
                    description: A human-readable description of the specific error.
                  instance:
                    type: string
                    description: >-
                      This optional key may be present, with a unique URI for
                      the specific error; this will often point to an error log
                      for that specific response.
                  request_id:
                    type: string
                    description: Correlation ID for the original request.
                required:
                  - type
                  - status
                additionalProperties: false
              example:
                status: 504
                type: gateway_timeout
  /savings_plans:
    parameters:
      - name: upvest-client-id
        in: header
        description: Tenant Client ID
        required: true
        schema:
          type: string
          format: uuid
          example: ebabcf4d-61c3-4942-875c-e265a7c2d062
      - name: authorization
        in: header
        description: |
          Bearer (access) token from the OAuth flow with correct scopes.
          https://datatracker.ietf.org/doc/html/rfc6750
        required: true
        schema:
          type: string
          pattern: ^Bearer [a-zA-Z0-9\-\._~+/]*=*
          example: Bearer c2VjcmV0Cg==
      - name: signature
        in: header
        required: true
        schema:
          type: string
        description: >-
          https://tools.ietf.org/id/draft-ietf-httpbis-message-signatures-01.html#name-the-signature-http-header
      - name: signature-input
        in: header
        required: true
        schema:
          type: string
        description: >-
          https://tools.ietf.org/id/draft-ietf-httpbis-message-signatures-01.html#name-the-signature-input-http-he
      - name: upvest-api-version
        in: header
        required: false
        schema:
          type: string
          enum:
            - '1'
          default: '1'
          example: '1'
        description: 'Upvest API version (Note: Do not include quotation marks)'
    get:
      operationId: list_savings_plans
      summary: List savings plans
      description: List savings plans
      tags:
        - Savings Plans
      security:
        - oauth-client-credentials:
            - savings_plans:read
            - savings_plans:admin
      parameters:
        - name: account_id
          in: query
          required: false
          schema:
            type: string
          description: Filters savings plans by account ID
          example: 3ada8e9e-82c4-4c78-a43d-a691b1636509
        - name: user_id
          in: query
          required: false
          schema:
            type: string
          description: Filters savings plans by user ID
          example: 996e5e2c-bb76-4a38-8d5c-ff43d86904da
        - name: instrument_id
          in: query
          required: false
          schema:
            title: Instrument unique identifier
            description: Instrument unique identifier.
            oneOf:
              - title: International securities identification number
                type: string
                description: >-
                  International securities identification number defined by [ISO
                  6166](https://en.wikipedia.org/wiki/International_Securities_Identification_Number).
                pattern: ^[A-Z]{2}[A-Z0-9]{9}[0-9]$
              - title: German securities identification code
                type: string
                description: >-
                  German securities identification code known as
                  [Wertpapierkennnummer](https://en.wikipedia.org/wiki/Wertpapierkennnummer).
                pattern: ^[A-HJ-NP-Z0-9]{6}$
          description: Filters savings plans by instrument ID (ISIN)
          example: FR0010524777
        - name: sort
          in: query
          required: false
          schema:
            type: string
            enum:
              - id
            default: id
          description: Sort the result by `id`.
        - name: order
          in: query
          required: false
          schema:
            type: string
            enum:
              - ASC
            default: ASC
          description: >-
            Sort order of the result list if the `sort` parameter is specified.
            By default, only ASC for ascending sort.
        - name: offset
          in: query
          schema:
            type: integer
            minimum: 0
            format: int32
          allowEmptyValue: true
          description: >-
            Use the `offset` argument to specify where in the list of results to
            start when returning items for a particular query.
        - name: limit
          in: query
          schema:
            type: integer
            format: int32
            default: 100
            minimum: 0
            maximum: 1000
          allowEmptyValue: true
          description: >-
            Use the `limit` argument to specify the maximum number of items
            returned.
      responses:
        '200':
          description: OK
          headers:
            upvest-request-id:
              required: true
              schema:
                type: string
                format: uuid
                example: 169ae4c7-ebd7-4041-94da-25369653eba7
          content:
            application/json:
              schema:
                title: Savings plan - List - Response
                type: object
                properties:
                  meta:
                    type: object
                    properties:
                      offset:
                        type: integer
                        description: Amount of resource to offset in the response.
                      limit:
                        type: integer
                        description: Total limit of the response.
                      count:
                        type: integer
                        description: Count of the resources returned in the response.
                      total_count:
                        type: integer
                        description: Total count of all the resources.
                      sort:
                        type: string
                        description: The field that the list is sorted by.
                      order:
                        type: string
                        description: |-
                          The ordering of the response.
                          * ASC - Ascending order
                          * DESC - Descending order
                        enum:
                          - ASC
                          - DESC
                    required:
                      - offset
                      - limit
                      - count
                      - total_count
                  data:
                    type: array
                    items:
                      title: Savings plan
                      type: object
                      properties:
                        id:
                          title: Savings plan unique identifier
                          type: string
                          format: uuid
                        created_at:
                          type: string
                          format: date-time
                          description: >-
                            Date and time when the resource was created. [RFC
                            3339-5](https://datatracker.ietf.org/doc/html/rfc3339#section-5.6),
                            [ISO8601
                            UTC](https://www.iso.org/iso-8601-date-and-time-format.html)
                        updated_at:
                          type: string
                          format: date-time
                          description: >-
                            Date and time when the resource was last updated.
                            [RFC
                            3339-5](https://datatracker.ietf.org/doc/html/rfc3339#section-5.6),
                            [ISO8601
                            UTC](https://www.iso.org/iso-8601-date-and-time-format.html)
                        user_id:
                          title: User unique identifier.
                          type: string
                          description: User unique identifier.
                          format: uuid
                        account_id:
                          title: Account unique identifier.
                          type: string
                          description: Account unique identifier.
                          format: uuid
                        name:
                          type: string
                          description: Savings plan name
                        type:
                          type: string
                          description: |-
                            Type of the Savings plan.
                            * PORTFOLIO - 
                            * INSTRUMENT - 
                          enum:
                            - PORTFOLIO
                            - INSTRUMENT
                        instrument_id:
                          title: Instrument unique identifier
                          description: Instrument unique identifier.
                          oneOf:
                            - title: International securities identification number
                              type: string
                              description: >-
                                International securities identification number
                                defined by [ISO
                                6166](https://en.wikipedia.org/wiki/International_Securities_Identification_Number).
                              pattern: ^[A-Z]{2}[A-Z0-9]{9}[0-9]$
                            - title: German securities identification code
                              type: string
                              description: >-
                                German securities identification code known as
                                [Wertpapierkennnummer](https://en.wikipedia.org/wiki/Wertpapierkennnummer).
                              pattern: ^[A-HJ-NP-Z0-9]{6}$
                        instrument_id_type:
                          type: string
                          description: >-
                            The type of the ID used in the request.

                            * ISIN - International Securities Identification
                            Number

                            * WKN - German securities identification code
                          enum:
                            - ISIN
                            - WKN
                          default: ISIN
                        cash_amount:
                          type: string
                          pattern: ^[0-9]{0,63}(\.[0-9]{1,27})?$
                        start_date:
                          type: string
                          description: >-
                            First date of the savings plan execution in
                            YYYY-MM-DD format.
                          pattern: ^[12]\d{3}-(0[1-9]|1[0-2])-(0[1-9]|[12]\d|3[01])$
                        currency:
                          type: string
                          description: >-
                            Alphabetic three-letter [ISO
                            4217](https://en.wikipedia.org/wiki/ISO_4217)
                            currency code.

                            * EUR - Euro
                          enum:
                            - EUR
                          default: EUR
                        period:
                          type: string
                          description: |-
                            Unit of time. 
                            * WEEK - 
                            * MONTH - 
                            * YEAR - 
                          enum:
                            - WEEK
                            - MONTH
                            - YEAR
                        interval:
                          description: Number of periods between executions
                          type: integer
                          default: 1
                          minimum: 1
                          maximum: 1000
                        status:
                          type: string
                          description: |-
                            Status of a Savings Plan. 
                            * ACTIVE - 
                            * CANCELLED - 
                          enum:
                            - ACTIVE
                            - CANCELLED
                      required:
                        - id
                        - user_id
                        - account_id
                        - type
                        - cash_amount
                        - currency
                        - start_date
                        - period
                        - interval
                        - created_at
                        - updated_at
                      additionalProperties: false
                required:
                  - meta
                  - data
                additionalProperties: false
              examples:
                instrument:
                  summary: instrument
                  value:
                    meta:
                      offset: 0
                      limit: 100
                      count: 1
                      total_count: 1
                      sort: id
                      order: ASC
                    data:
                      - id: fc34d28e-38f5-49d2-92f6-82acb79098f4
                        created_at: '2023-07-21T14:10:00.00Z'
                        updated_at: '2023-07-21T15:10:00.00Z'
                        user_id: 4b9732bd-7496-4913-8a5f-6360479d7fed
                        account_id: 00ef0be8-d564-43af-b3c7-11b7a2188030
                        name: Instrument savings plan
                        type: INSTRUMENT
                        instrument_id: DE0007664005
                        instrument_id_type: ISIN
                        cash_amount: '100.00'
                        currency: EUR
                        start_date: '2023-07-24'
                        period: WEEK
                        interval: 1
                        status: ACTIVE
                portfolio:
                  summary: portfolio
                  value:
                    meta:
                      offset: 0
                      limit: 100
                      count: 1
                      total_count: 1
                      sort: id
                      order: ASC
                    data:
                      - id: fc34d28e-38f5-49d2-92f6-82acb79098f4
                        created_at: '2023-07-21T14:10:00.00Z'
                        updated_at: '2023-07-21T15:10:00.00Z'
                        user_id: 4b9732bd-7496-4913-8a5f-6360479d7fed
                        account_id: 00ef0be8-d564-43af-b3c7-11b7a2188030
                        name: Portfolio savings plan
                        type: PORTFOLIO
                        cash_amount: '100.00'
                        currency: EUR
                        start_date: '2023-07-24'
                        period: WEEK
                        interval: 1
                        status: ACTIVE
        '400':
          description: Bad Request. The incoming request had a malformed parameter/object.
          headers:
            upvest-request-id:
              required: true
              schema:
                type: string
                format: uuid
                example: 169ae4c7-ebd7-4041-94da-25369653eba7
          content:
            application/problem+json:
              schema:
                title: Error
                type: object
                description: ''
                properties:
                  type:
                    type: string
                    description: URL to a document describing the error condition.
                  status:
                    type: integer
                    description: >-
                      Transmission of the HTTP status code so that all
                      information can be found in one place, but also to correct
                      changes in the status code due to the use of proxy
                      servers.
                  title:
                    type: string
                    description: >-
                      A short, human-readable title for the general error type;
                      the title should not change for given types.
                  detail:
                    type: string
                    description: A human-readable description of the specific error.
                  instance:
                    type: string
                    description: >-
                      This optional key may be present, with a unique URI for
                      the specific error; this will often point to an error log
                      for that specific response.
                  request_id:
                    type: string
                    description: Correlation ID for the original request.
                required:
                  - type
                  - status
                additionalProperties: false
              example:
                status: 400
                type: bad_request
        '401':
          description: Unauthorized. The caller has not been authenticated.
          headers:
            upvest-request-id:
              required: true
              schema:
                type: string
                format: uuid
                example: 169ae4c7-ebd7-4041-94da-25369653eba7
          content:
            application/problem+json:
              schema:
                title: Error
                type: object
                description: ''
                properties:
                  type:
                    type: string
                    description: URL to a document describing the error condition.
                  status:
                    type: integer
                    description: >-
                      Transmission of the HTTP status code so that all
                      information can be found in one place, but also to correct
                      changes in the status code due to the use of proxy
                      servers.
                  title:
                    type: string
                    description: >-
                      A short, human-readable title for the general error type;
                      the title should not change for given types.
                  detail:
                    type: string
                    description: A human-readable description of the specific error.
                  instance:
                    type: string
                    description: >-
                      This optional key may be present, with a unique URI for
                      the specific error; this will often point to an error log
                      for that specific response.
                  request_id:
                    type: string
                    description: Correlation ID for the original request.
                required:
                  - type
                  - status
                additionalProperties: false
              example:
                status: 401
                type: unauthorized
        '403':
          description: >-
            Forbidden. The caller has been authenticated but is not allowed to
            take the requested action.
          headers:
            upvest-request-id:
              required: true
              schema:
                type: string
                format: uuid
                example: 169ae4c7-ebd7-4041-94da-25369653eba7
          content:
            application/problem+json:
              schema:
                title: Error
                type: object
                description: ''
                properties:
                  type:
                    type: string
                    description: URL to a document describing the error condition.
                  status:
                    type: integer
                    description: >-
                      Transmission of the HTTP status code so that all
                      information can be found in one place, but also to correct
                      changes in the status code due to the use of proxy
                      servers.
                  title:
                    type: string
                    description: >-
                      A short, human-readable title for the general error type;
                      the title should not change for given types.
                  detail:
                    type: string
                    description: A human-readable description of the specific error.
                  instance:
                    type: string
                    description: >-
                      This optional key may be present, with a unique URI for
                      the specific error; this will often point to an error log
                      for that specific response.
                  request_id:
                    type: string
                    description: Correlation ID for the original request.
                required:
                  - type
                  - status
                additionalProperties: false
              example:
                status: 403
                type: forbidden
        '404':
          description: Not Found. The requested resource could not be found.
          headers:
            upvest-request-id:
              required: true
              schema:
                type: string
                format: uuid
                example: 169ae4c7-ebd7-4041-94da-25369653eba7
          content:
            application/problem+json:
              schema:
                title: Error
                type: object
                description: ''
                properties:
                  type:
                    type: string
                    description: URL to a document describing the error condition.
                  status:
                    type: integer
                    description: >-
                      Transmission of the HTTP status code so that all
                      information can be found in one place, but also to correct
                      changes in the status code due to the use of proxy
                      servers.
                  title:
                    type: string
                    description: >-
                      A short, human-readable title for the general error type;
                      the title should not change for given types.
                  detail:
                    type: string
                    description: A human-readable description of the specific error.
                  instance:
                    type: string
                    description: >-
                      This optional key may be present, with a unique URI for
                      the specific error; this will often point to an error log
                      for that specific response.
                  request_id:
                    type: string
                    description: Correlation ID for the original request.
                required:
                  - type
                  - status
                additionalProperties: false
              example:
                status: 404
                type: not_found
        '405':
          description: >-
            Method Not Allowed. The requested method is not allowed on the
            requested resource.
          headers:
            upvest-request-id:
              required: true
              schema:
                type: string
                format: uuid
                example: 169ae4c7-ebd7-4041-94da-25369653eba7
          content:
            application/problem+json:
              schema:
                title: Error
                type: object
                description: ''
                properties:
                  type:
                    type: string
                    description: URL to a document describing the error condition.
                  status:
                    type: integer
                    description: >-
                      Transmission of the HTTP status code so that all
                      information can be found in one place, but also to correct
                      changes in the status code due to the use of proxy
                      servers.
                  title:
                    type: string
                    description: >-
                      A short, human-readable title for the general error type;
                      the title should not change for given types.
                  detail:
                    type: string
                    description: A human-readable description of the specific error.
                  instance:
                    type: string
                    description: >-
                      This optional key may be present, with a unique URI for
                      the specific error; this will often point to an error log
                      for that specific response.
                  request_id:
                    type: string
                    description: Correlation ID for the original request.
                required:
                  - type
                  - status
                additionalProperties: false
              example:
                status: 405
                type: method_not_allowed
        '406':
          description: >-
            Not Acceptable. The resource does not have a current representation
            that would be acceptable to the user agent. "Accept" header defined
            unsupported value.
          headers:
            upvest-request-id:
              required: true
              schema:
                type: string
                format: uuid
                example: 169ae4c7-ebd7-4041-94da-25369653eba7
          content:
            application/problem+json:
              schema:
                title: Error
                type: object
                description: ''
                properties:
                  type:
                    type: string
                    description: URL to a document describing the error condition.
                  status:
                    type: integer
                    description: >-
                      Transmission of the HTTP status code so that all
                      information can be found in one place, but also to correct
                      changes in the status code due to the use of proxy
                      servers.
                  title:
                    type: string
                    description: >-
                      A short, human-readable title for the general error type;
                      the title should not change for given types.
                  detail:
                    type: string
                    description: A human-readable description of the specific error.
                  instance:
                    type: string
                    description: >-
                      This optional key may be present, with a unique URI for
                      the specific error; this will often point to an error log
                      for that specific response.
                  request_id:
                    type: string
                    description: Correlation ID for the original request.
                required:
                  - type
                  - status
                additionalProperties: false
              example:
                status: 406
                type: not_acceptable
        '429':
          description: >-
            Too Many Requests. The caller has exceeded their quota for the time
            period and has been throttled.
          headers:
            upvest-request-id:
              required: true
              schema:
                type: string
                format: uuid
                example: 169ae4c7-ebd7-4041-94da-25369653eba7
          content:
            application/problem+json:
              schema:
                title: Error
                type: object
                description: ''
                properties:
                  type:
                    type: string
                    description: URL to a document describing the error condition.
                  status:
                    type: integer
                    description: >-
                      Transmission of the HTTP status code so that all
                      information can be found in one place, but also to correct
                      changes in the status code due to the use of proxy
                      servers.
                  title:
                    type: string
                    description: >-
                      A short, human-readable title for the general error type;
                      the title should not change for given types.
                  detail:
                    type: string
                    description: A human-readable description of the specific error.
                  instance:
                    type: string
                    description: >-
                      This optional key may be present, with a unique URI for
                      the specific error; this will often point to an error log
                      for that specific response.
                  request_id:
                    type: string
                    description: Correlation ID for the original request.
                required:
                  - type
                  - status
                additionalProperties: false
              example:
                status: 429
                type: too_many_requests
        '500':
          description: Internal Server Error. The service encountered an unexpected error.
          headers:
            upvest-request-id:
              required: true
              schema:
                type: string
                format: uuid
                example: 169ae4c7-ebd7-4041-94da-25369653eba7
          content:
            application/problem+json:
              schema:
                title: Error
                type: object
                description: ''
                properties:
                  type:
                    type: string
                    description: URL to a document describing the error condition.
                  status:
                    type: integer
                    description: >-
                      Transmission of the HTTP status code so that all
                      information can be found in one place, but also to correct
                      changes in the status code due to the use of proxy
                      servers.
                  title:
                    type: string
                    description: >-
                      A short, human-readable title for the general error type;
                      the title should not change for given types.
                  detail:
                    type: string
                    description: A human-readable description of the specific error.
                  instance:
                    type: string
                    description: >-
                      This optional key may be present, with a unique URI for
                      the specific error; this will often point to an error log
                      for that specific response.
                  request_id:
                    type: string
                    description: Correlation ID for the original request.
                required:
                  - type
                  - status
                additionalProperties: false
              example:
                status: 500
                type: internal_server_error
        '503':
          description: >-
            Service Unavailable. The service handling for this request cannot be
            reached at this time.
          headers:
            upvest-request-id:
              required: true
              schema:
                type: string
                format: uuid
                example: 169ae4c7-ebd7-4041-94da-25369653eba7
          content:
            application/problem+json:
              schema:
                title: Error
                type: object
                description: ''
                properties:
                  type:
                    type: string
                    description: URL to a document describing the error condition.
                  status:
                    type: integer
                    description: >-
                      Transmission of the HTTP status code so that all
                      information can be found in one place, but also to correct
                      changes in the status code due to the use of proxy
                      servers.
                  title:
                    type: string
                    description: >-
                      A short, human-readable title for the general error type;
                      the title should not change for given types.
                  detail:
                    type: string
                    description: A human-readable description of the specific error.
                  instance:
                    type: string
                    description: >-
                      This optional key may be present, with a unique URI for
                      the specific error; this will often point to an error log
                      for that specific response.
                  request_id:
                    type: string
                    description: Correlation ID for the original request.
                required:
                  - type
                  - status
                additionalProperties: false
              example:
                status: 503
                type: method_not_allowed
        '504':
          description: >-
            Gateway Timeout. The service gateway has reached its internal
            timeout.
          headers:
            upvest-request-id:
              required: true
              schema:
                type: string
                format: uuid
                example: 169ae4c7-ebd7-4041-94da-25369653eba7
          content:
            application/problem+json:
              schema:
                title: Error
                type: object
                description: ''
                properties:
                  type:
                    type: string
                    description: URL to a document describing the error condition.
                  status:
                    type: integer
                    description: >-
                      Transmission of the HTTP status code so that all
                      information can be found in one place, but also to correct
                      changes in the status code due to the use of proxy
                      servers.
                  title:
                    type: string
                    description: >-
                      A short, human-readable title for the general error type;
                      the title should not change for given types.
                  detail:
                    type: string
                    description: A human-readable description of the specific error.
                  instance:
                    type: string
                    description: >-
                      This optional key may be present, with a unique URI for
                      the specific error; this will often point to an error log
                      for that specific response.
                  request_id:
                    type: string
                    description: Correlation ID for the original request.
                required:
                  - type
                  - status
                additionalProperties: false
              example:
                status: 504
                type: gateway_timeout
    post:
      operationId: create_savings_plan
      summary: Create savings plan
      description: Create savings plan
      tags:
        - Savings Plans
      security:
        - oauth-client-credentials:
            - savings_plans:admin
      parameters:
        - name: idempotency-key
          in: header
          required: true
          schema:
            type: string
            format: uuid
            pattern: >-
              ^[0-9a-fA-F]{8}-?[0-9a-fA-F]{4}-?[0-5][0-9a-fA-F]{3}-?[089abAB][0-9a-fA-F]{3}-?[0-9a-fA-F]{12}$
            example: ccb07f42-4104-44ad-8e1f-c660bb7b269c
          description: >
            A UUID to be used as an idempotency key.  This prevents a duplicate
            request from being replayed.

            https://docs.upvest.co/documentation/concepts/api_concepts/idempotency
      requestBody:
        content:
          application/json:
            schema:
              title: Savings plan - Create - Request
              type: object
              properties:
                user_id:
                  title: User unique identifier.
                  type: string
                  description: User unique identifier.
                  format: uuid
                account_id:
                  title: Account unique identifier.
                  type: string
                  description: Account unique identifier.
                  format: uuid
                name:
                  type: string
                  description: Savings plan name
                type:
                  type: string
                  description: |-
                    Type of the Savings plan.
                    * PORTFOLIO - 
                    * INSTRUMENT - 
                  enum:
                    - PORTFOLIO
                    - INSTRUMENT
                instrument_id:
                  title: Instrument unique identifier
                  description: Instrument unique identifier.
                  oneOf:
                    - title: International securities identification number
                      type: string
                      description: >-
                        International securities identification number defined
                        by [ISO
                        6166](https://en.wikipedia.org/wiki/International_Securities_Identification_Number).
                      pattern: ^[A-Z]{2}[A-Z0-9]{9}[0-9]$
                    - title: German securities identification code
                      type: string
                      description: >-
                        German securities identification code known as
                        [Wertpapierkennnummer](https://en.wikipedia.org/wiki/Wertpapierkennnummer).
                      pattern: ^[A-HJ-NP-Z0-9]{6}$
                instrument_id_type:
                  type: string
                  description: |-
                    The type of the ID used in the request.
                    * ISIN - International Securities Identification Number
                    * WKN - German securities identification code
                  enum:
                    - ISIN
                    - WKN
                  default: ISIN
                cash_amount:
                  type: string
                  pattern: ^[0-9]{0,63}(\.[0-9]{1,27})?$
                currency:
                  type: string
                  description: >-
                    Alphabetic three-letter [ISO
                    4217](https://en.wikipedia.org/wiki/ISO_4217) currency code.

                    * EUR - Euro
                  enum:
                    - EUR
                  default: EUR
                start_date:
                  type: string
                  description: >-
                    First date of the savings plan execution in YYYY-MM-DD
                    format.
                  pattern: ^[12]\d{3}-(0[1-9]|1[0-2])-(0[1-9]|[12]\d|3[01])$
                period:
                  type: string
                  description: |-
                    Unit of time. 
                    * WEEK - 
                    * MONTH - 
                    * YEAR - 
                  enum:
                    - WEEK
                    - MONTH
                    - YEAR
                interval:
                  description: Number of periods between executions
                  type: integer
                  default: 1
                  minimum: 1
                  maximum: 1000
              required:
                - user_id
                - account_id
                - type
                - cash_amount
                - currency
                - start_date
                - period
                - interval
              additionalProperties: false
            examples:
              instrument:
                summary: instrument
                value:
                  user_id: fc34d28e-38f5-49d2-92f6-82acb79098f4
                  account_id: 00ef0be8-d564-43af-b3c7-11b7a2188030
                  name: Instrument savings plan
                  type: INSTRUMENT
                  instrument_id: DE0007664005
                  instrument_id_type: ISIN
                  cash_amount: '100.00'
                  currency: EUR
                  start_date: '2023-07-24'
                  period: WEEK
                  interval: 2
              portfolio:
                summary: portfolio
                value:
                  user_id: fc34d28e-38f5-49d2-92f6-82acb79098f4
                  account_id: 00ef0be8-d564-43af-b3c7-11b7a2188030
                  name: Portfolio savings plan
                  type: PORTFOLIO
                  cash_amount: '100.00'
                  currency: EUR
                  start_date: '2023-07-24'
                  period: WEEK
                  interval: 1
      responses:
        '202':
          description: Savings plan object
          headers:
            upvest-request-id:
              required: true
              schema:
                type: string
                format: uuid
                example: 169ae4c7-ebd7-4041-94da-25369653eba7
          content:
            application/json:
              schema:
                title: Savings plan
                type: object
                properties:
                  id:
                    title: Savings plan unique identifier
                    type: string
                    format: uuid
                  created_at:
                    type: string
                    format: date-time
                    description: >-
                      Date and time when the resource was created. [RFC
                      3339-5](https://datatracker.ietf.org/doc/html/rfc3339#section-5.6),
                      [ISO8601
                      UTC](https://www.iso.org/iso-8601-date-and-time-format.html)
                  updated_at:
                    type: string
                    format: date-time
                    description: >-
                      Date and time when the resource was last updated. [RFC
                      3339-5](https://datatracker.ietf.org/doc/html/rfc3339#section-5.6),
                      [ISO8601
                      UTC](https://www.iso.org/iso-8601-date-and-time-format.html)
                  user_id:
                    title: User unique identifier.
                    type: string
                    description: User unique identifier.
                    format: uuid
                  account_id:
                    title: Account unique identifier.
                    type: string
                    description: Account unique identifier.
                    format: uuid
                  name:
                    type: string
                    description: Savings plan name
                  type:
                    type: string
                    description: |-
                      Type of the Savings plan.
                      * PORTFOLIO - 
                      * INSTRUMENT - 
                    enum:
                      - PORTFOLIO
                      - INSTRUMENT
                  instrument_id:
                    title: Instrument unique identifier
                    description: Instrument unique identifier.
                    oneOf:
                      - title: International securities identification number
                        type: string
                        description: >-
                          International securities identification number defined
                          by [ISO
                          6166](https://en.wikipedia.org/wiki/International_Securities_Identification_Number).
                        pattern: ^[A-Z]{2}[A-Z0-9]{9}[0-9]$
                      - title: German securities identification code
                        type: string
                        description: >-
                          German securities identification code known as
                          [Wertpapierkennnummer](https://en.wikipedia.org/wiki/Wertpapierkennnummer).
                        pattern: ^[A-HJ-NP-Z0-9]{6}$
                  instrument_id_type:
                    type: string
                    description: |-
                      The type of the ID used in the request.
                      * ISIN - International Securities Identification Number
                      * WKN - German securities identification code
                    enum:
                      - ISIN
                      - WKN
                    default: ISIN
                  cash_amount:
                    type: string
                    pattern: ^[0-9]{0,63}(\.[0-9]{1,27})?$
                  start_date:
                    type: string
                    description: >-
                      First date of the savings plan execution in YYYY-MM-DD
                      format.
                    pattern: ^[12]\d{3}-(0[1-9]|1[0-2])-(0[1-9]|[12]\d|3[01])$
                  currency:
                    type: string
                    description: >-
                      Alphabetic three-letter [ISO
                      4217](https://en.wikipedia.org/wiki/ISO_4217) currency
                      code.

                      * EUR - Euro
                    enum:
                      - EUR
                    default: EUR
                  period:
                    type: string
                    description: |-
                      Unit of time. 
                      * WEEK - 
                      * MONTH - 
                      * YEAR - 
                    enum:
                      - WEEK
                      - MONTH
                      - YEAR
                  interval:
                    description: Number of periods between executions
                    type: integer
                    default: 1
                    minimum: 1
                    maximum: 1000
                  status:
                    type: string
                    description: |-
                      Status of a Savings Plan. 
                      * ACTIVE - 
                      * CANCELLED - 
                    enum:
                      - ACTIVE
                      - CANCELLED
                required:
                  - id
                  - user_id
                  - account_id
                  - type
                  - cash_amount
                  - currency
                  - start_date
                  - period
                  - interval
                  - created_at
                  - updated_at
                additionalProperties: false
              examples:
                instrument:
                  summary: instrument
                  value:
                    id: fc34d28e-38f5-49d2-92f6-82acb79098f4
                    created_at: '2023-07-21T14:10:00.00Z'
                    updated_at: '2023-07-21T15:10:00.00Z'
                    user_id: 4b9732bd-7496-4913-8a5f-6360479d7fed
                    account_id: 00ef0be8-d564-43af-b3c7-11b7a2188030
                    name: Instrument savings plan
                    type: INSTRUMENT
                    instrument_id: DE0007664005
                    instrument_id_type: ISIN
                    cash_amount: '100.00'
                    currency: EUR
                    start_date: '2023-07-24'
                    period: WEEK
                    interval: 1
                    status: ACTIVE
                portfolio:
                  summary: portfolio
                  value:
                    id: fc34d28e-38f5-49d2-92f6-82acb79098f4
                    created_at: '2023-07-21T14:10:00.00Z'
                    updated_at: '2023-07-21T15:10:00.00Z'
                    user_id: 4b9732bd-7496-4913-8a5f-6360479d7fed
                    account_id: 00ef0be8-d564-43af-b3c7-11b7a2188030
                    name: Portfolio savings plan
                    type: PORTFOLIO
                    cash_amount: '100.00'
                    currency: EUR
                    start_date: '2023-07-24'
                    period: WEEK
                    interval: 1
                    status: ACTIVE
        '400':
          description: Bad Request. The incoming request had a malformed parameter/object.
          headers:
            upvest-request-id:
              required: true
              schema:
                type: string
                format: uuid
                example: 169ae4c7-ebd7-4041-94da-25369653eba7
          content:
            application/problem+json:
              schema:
                title: Error
                type: object
                description: ''
                properties:
                  type:
                    type: string
                    description: URL to a document describing the error condition.
                  status:
                    type: integer
                    description: >-
                      Transmission of the HTTP status code so that all
                      information can be found in one place, but also to correct
                      changes in the status code due to the use of proxy
                      servers.
                  title:
                    type: string
                    description: >-
                      A short, human-readable title for the general error type;
                      the title should not change for given types.
                  detail:
                    type: string
                    description: A human-readable description of the specific error.
                  instance:
                    type: string
                    description: >-
                      This optional key may be present, with a unique URI for
                      the specific error; this will often point to an error log
                      for that specific response.
                  request_id:
                    type: string
                    description: Correlation ID for the original request.
                required:
                  - type
                  - status
                additionalProperties: false
              example:
                status: 400
                type: bad_request
        '401':
          description: Unauthorized. The caller has not been authenticated.
          headers:
            upvest-request-id:
              required: true
              schema:
                type: string
                format: uuid
                example: 169ae4c7-ebd7-4041-94da-25369653eba7
          content:
            application/problem+json:
              schema:
                title: Error
                type: object
                description: ''
                properties:
                  type:
                    type: string
                    description: URL to a document describing the error condition.
                  status:
                    type: integer
                    description: >-
                      Transmission of the HTTP status code so that all
                      information can be found in one place, but also to correct
                      changes in the status code due to the use of proxy
                      servers.
                  title:
                    type: string
                    description: >-
                      A short, human-readable title for the general error type;
                      the title should not change for given types.
                  detail:
                    type: string
                    description: A human-readable description of the specific error.
                  instance:
                    type: string
                    description: >-
                      This optional key may be present, with a unique URI for
                      the specific error; this will often point to an error log
                      for that specific response.
                  request_id:
                    type: string
                    description: Correlation ID for the original request.
                required:
                  - type
                  - status
                additionalProperties: false
              example:
                status: 401
                type: unauthorized
        '403':
          description: >-
            Forbidden. The caller has been authenticated but is not allowed to
            take the requested action.
          headers:
            upvest-request-id:
              required: true
              schema:
                type: string
                format: uuid
                example: 169ae4c7-ebd7-4041-94da-25369653eba7
          content:
            application/problem+json:
              schema:
                title: Error
                type: object
                description: ''
                properties:
                  type:
                    type: string
                    description: URL to a document describing the error condition.
                  status:
                    type: integer
                    description: >-
                      Transmission of the HTTP status code so that all
                      information can be found in one place, but also to correct
                      changes in the status code due to the use of proxy
                      servers.
                  title:
                    type: string
                    description: >-
                      A short, human-readable title for the general error type;
                      the title should not change for given types.
                  detail:
                    type: string
                    description: A human-readable description of the specific error.
                  instance:
                    type: string
                    description: >-
                      This optional key may be present, with a unique URI for
                      the specific error; this will often point to an error log
                      for that specific response.
                  request_id:
                    type: string
                    description: Correlation ID for the original request.
                required:
                  - type
                  - status
                additionalProperties: false
              example:
                status: 403
                type: forbidden
        '404':
          description: Not Found. The requested resource could not be found.
          headers:
            upvest-request-id:
              required: true
              schema:
                type: string
                format: uuid
                example: 169ae4c7-ebd7-4041-94da-25369653eba7
          content:
            application/problem+json:
              schema:
                title: Error
                type: object
                description: ''
                properties:
                  type:
                    type: string
                    description: URL to a document describing the error condition.
                  status:
                    type: integer
                    description: >-
                      Transmission of the HTTP status code so that all
                      information can be found in one place, but also to correct
                      changes in the status code due to the use of proxy
                      servers.
                  title:
                    type: string
                    description: >-
                      A short, human-readable title for the general error type;
                      the title should not change for given types.
                  detail:
                    type: string
                    description: A human-readable description of the specific error.
                  instance:
                    type: string
                    description: >-
                      This optional key may be present, with a unique URI for
                      the specific error; this will often point to an error log
                      for that specific response.
                  request_id:
                    type: string
                    description: Correlation ID for the original request.
                required:
                  - type
                  - status
                additionalProperties: false
              example:
                status: 404
                type: not_found
        '405':
          description: >-
            Method Not Allowed. The requested method is not allowed on the
            requested resource.
          headers:
            upvest-request-id:
              required: true
              schema:
                type: string
                format: uuid
                example: 169ae4c7-ebd7-4041-94da-25369653eba7
          content:
            application/problem+json:
              schema:
                title: Error
                type: object
                description: ''
                properties:
                  type:
                    type: string
                    description: URL to a document describing the error condition.
                  status:
                    type: integer
                    description: >-
                      Transmission of the HTTP status code so that all
                      information can be found in one place, but also to correct
                      changes in the status code due to the use of proxy
                      servers.
                  title:
                    type: string
                    description: >-
                      A short, human-readable title for the general error type;
                      the title should not change for given types.
                  detail:
                    type: string
                    description: A human-readable description of the specific error.
                  instance:
                    type: string
                    description: >-
                      This optional key may be present, with a unique URI for
                      the specific error; this will often point to an error log
                      for that specific response.
                  request_id:
                    type: string
                    description: Correlation ID for the original request.
                required:
                  - type
                  - status
                additionalProperties: false
              example:
                status: 405
                type: method_not_allowed
        '406':
          description: >-
            Not Acceptable. The resource does not have a current representation
            that would be acceptable to the user agent. "Accept" header defined
            unsupported value.
          headers:
            upvest-request-id:
              required: true
              schema:
                type: string
                format: uuid
                example: 169ae4c7-ebd7-4041-94da-25369653eba7
          content:
            application/problem+json:
              schema:
                title: Error
                type: object
                description: ''
                properties:
                  type:
                    type: string
                    description: URL to a document describing the error condition.
                  status:
                    type: integer
                    description: >-
                      Transmission of the HTTP status code so that all
                      information can be found in one place, but also to correct
                      changes in the status code due to the use of proxy
                      servers.
                  title:
                    type: string
                    description: >-
                      A short, human-readable title for the general error type;
                      the title should not change for given types.
                  detail:
                    type: string
                    description: A human-readable description of the specific error.
                  instance:
                    type: string
                    description: >-
                      This optional key may be present, with a unique URI for
                      the specific error; this will often point to an error log
                      for that specific response.
                  request_id:
                    type: string
                    description: Correlation ID for the original request.
                required:
                  - type
                  - status
                additionalProperties: false
              example:
                status: 406
                type: not_acceptable
        '429':
          description: >-
            Too Many Requests. The caller has exceeded their quota for the time
            period and has been throttled.
          headers:
            upvest-request-id:
              required: true
              schema:
                type: string
                format: uuid
                example: 169ae4c7-ebd7-4041-94da-25369653eba7
          content:
            application/problem+json:
              schema:
                title: Error
                type: object
                description: ''
                properties:
                  type:
                    type: string
                    description: URL to a document describing the error condition.
                  status:
                    type: integer
                    description: >-
                      Transmission of the HTTP status code so that all
                      information can be found in one place, but also to correct
                      changes in the status code due to the use of proxy
                      servers.
                  title:
                    type: string
                    description: >-
                      A short, human-readable title for the general error type;
                      the title should not change for given types.
                  detail:
                    type: string
                    description: A human-readable description of the specific error.
                  instance:
                    type: string
                    description: >-
                      This optional key may be present, with a unique URI for
                      the specific error; this will often point to an error log
                      for that specific response.
                  request_id:
                    type: string
                    description: Correlation ID for the original request.
                required:
                  - type
                  - status
                additionalProperties: false
              example:
                status: 429
                type: too_many_requests
        '500':
          description: Internal Server Error. The service encountered an unexpected error.
          headers:
            upvest-request-id:
              required: true
              schema:
                type: string
                format: uuid
                example: 169ae4c7-ebd7-4041-94da-25369653eba7
          content:
            application/problem+json:
              schema:
                title: Error
                type: object
                description: ''
                properties:
                  type:
                    type: string
                    description: URL to a document describing the error condition.
                  status:
                    type: integer
                    description: >-
                      Transmission of the HTTP status code so that all
                      information can be found in one place, but also to correct
                      changes in the status code due to the use of proxy
                      servers.
                  title:
                    type: string
                    description: >-
                      A short, human-readable title for the general error type;
                      the title should not change for given types.
                  detail:
                    type: string
                    description: A human-readable description of the specific error.
                  instance:
                    type: string
                    description: >-
                      This optional key may be present, with a unique URI for
                      the specific error; this will often point to an error log
                      for that specific response.
                  request_id:
                    type: string
                    description: Correlation ID for the original request.
                required:
                  - type
                  - status
                additionalProperties: false
              example:
                status: 500
                type: internal_server_error
        '503':
          description: >-
            Service Unavailable. The service handling for this request cannot be
            reached at this time.
          headers:
            upvest-request-id:
              required: true
              schema:
                type: string
                format: uuid
                example: 169ae4c7-ebd7-4041-94da-25369653eba7
          content:
            application/problem+json:
              schema:
                title: Error
                type: object
                description: ''
                properties:
                  type:
                    type: string
                    description: URL to a document describing the error condition.
                  status:
                    type: integer
                    description: >-
                      Transmission of the HTTP status code so that all
                      information can be found in one place, but also to correct
                      changes in the status code due to the use of proxy
                      servers.
                  title:
                    type: string
                    description: >-
                      A short, human-readable title for the general error type;
                      the title should not change for given types.
                  detail:
                    type: string
                    description: A human-readable description of the specific error.
                  instance:
                    type: string
                    description: >-
                      This optional key may be present, with a unique URI for
                      the specific error; this will often point to an error log
                      for that specific response.
                  request_id:
                    type: string
                    description: Correlation ID for the original request.
                required:
                  - type
                  - status
                additionalProperties: false
              example:
                status: 503
                type: method_not_allowed
        '504':
          description: >-
            Gateway Timeout. The service gateway has reached its internal
            timeout.
          headers:
            upvest-request-id:
              required: true
              schema:
                type: string
                format: uuid
                example: 169ae4c7-ebd7-4041-94da-25369653eba7
          content:
            application/problem+json:
              schema:
                title: Error
                type: object
                description: ''
                properties:
                  type:
                    type: string
                    description: URL to a document describing the error condition.
                  status:
                    type: integer
                    description: >-
                      Transmission of the HTTP status code so that all
                      information can be found in one place, but also to correct
                      changes in the status code due to the use of proxy
                      servers.
                  title:
                    type: string
                    description: >-
                      A short, human-readable title for the general error type;
                      the title should not change for given types.
                  detail:
                    type: string
                    description: A human-readable description of the specific error.
                  instance:
                    type: string
                    description: >-
                      This optional key may be present, with a unique URI for
                      the specific error; this will often point to an error log
                      for that specific response.
                  request_id:
                    type: string
                    description: Correlation ID for the original request.
                required:
                  - type
                  - status
                additionalProperties: false
              example:
                status: 504
                type: gateway_timeout
  /savings_plans/{savings_plan_id}/executions/{savings_plan_execution_id}:
    parameters:
      - name: savings_plan_id
        in: path
        required: true
        schema:
          title: Savings plan unique identifier
          type: string
          format: uuid
      - name: savings_plan_execution_id
        in: path
        required: true
        schema:
          title: Savings plan execution unique identifier
          type: string
          format: uuid
      - name: upvest-client-id
        in: header
        description: Tenant Client ID
        required: true
        schema:
          type: string
          format: uuid
          example: ebabcf4d-61c3-4942-875c-e265a7c2d062
      - name: authorization
        in: header
        description: |
          Bearer (access) token from the OAuth flow with correct scopes.
          https://datatracker.ietf.org/doc/html/rfc6750
        required: true
        schema:
          type: string
          pattern: ^Bearer [a-zA-Z0-9\-\._~+/]*=*
          example: Bearer c2VjcmV0Cg==
      - name: signature
        in: header
        required: true
        schema:
          type: string
        description: >-
          https://tools.ietf.org/id/draft-ietf-httpbis-message-signatures-01.html#name-the-signature-http-header
      - name: signature-input
        in: header
        required: true
        schema:
          type: string
        description: >-
          https://tools.ietf.org/id/draft-ietf-httpbis-message-signatures-01.html#name-the-signature-input-http-he
      - name: upvest-api-version
        in: header
        required: false
        schema:
          type: string
          enum:
            - '1'
          default: '1'
          example: '1'
        description: 'Upvest API version (Note: Do not include quotation marks)'
    get:
      operationId: retrieve_savings_plan_execution
      summary: Retrieve savings plan execution
      description: Retrieve savings plan execution
      tags:
        - Savings Plans
      security:
        - oauth-client-credentials:
            - savings_plans:read
            - savings_plans:admin
      responses:
        '200':
          description: OK
          headers:
            upvest-request-id:
              required: true
              schema:
                type: string
                format: uuid
                example: 169ae4c7-ebd7-4041-94da-25369653eba7
          content:
            application/json:
              schema:
                title: Savings plan
                type: object
                properties:
                  id:
                    title: Savings plan execution unique identifier
                    type: string
                    format: uuid
                  created_at:
                    type: string
                    format: date-time
                    description: >-
                      Date and time when the resource was created. [RFC
                      3339-5](https://datatracker.ietf.org/doc/html/rfc3339#section-5.6),
                      [ISO8601
                      UTC](https://www.iso.org/iso-8601-date-and-time-format.html)
                  updated_at:
                    type: string
                    format: date-time
                    description: >-
                      Date and time when the resource was last updated. [RFC
                      3339-5](https://datatracker.ietf.org/doc/html/rfc3339#section-5.6),
                      [ISO8601
                      UTC](https://www.iso.org/iso-8601-date-and-time-format.html)
                  user_id:
                    title: User unique identifier.
                    type: string
                    description: User unique identifier.
                    format: uuid
                  account_id:
                    title: Account unique identifier.
                    type: string
                    description: Account unique identifier.
                    format: uuid
                  savings_plan_id:
                    title: Savings plan unique identifier
                    type: string
                    format: uuid
                  order_id:
                    title: >-
                      Order unique identifier (Portfolio order or Instrument
                      order)
                    description: >-
                      Order unique identifier (Portfolio order or Instrument
                      order)
                    oneOf:
                      - title: Portfolios order unique identifier
                        type: string
                        format: uuid
                      - title: Order
                        type: object
                        properties:
                          id:
                            title: Order unique identifier
                            type: string
                            format: uuid
                          created_at:
                            type: string
                            format: date-time
                            description: >-
                              Date and time when the resource was created. [RFC
                              3339-5](https://datatracker.ietf.org/doc/html/rfc3339#section-5.6),
                              [ISO8601
                              UTC](https://www.iso.org/iso-8601-date-and-time-format.html)
                          updated_at:
                            type: string
                            format: date-time
                            description: >-
                              Date and time when the resource was last updated.
                              [RFC
                              3339-5](https://datatracker.ietf.org/doc/html/rfc3339#section-5.6),
                              [ISO8601
                              UTC](https://www.iso.org/iso-8601-date-and-time-format.html)
                          user_id:
                            type: string
                            format: uuid
                            description: The ID of the user
                          account_id:
                            type: string
                            format: uuid
                            description: The ID of the account that owns the order
                          cash_amount:
                            allOf:
                              - type: string
                                pattern: ^[0-9]{1,9}(\.[0-9]{2})?$
                              - description: >-
                                  Cash amount for a nominal order, not required
                                  if a share quantity is specified.
                          currency:
                            allOf:
                              - type: string
                                description: >-
                                  Alphabetic three-letter [ISO
                                  4217](https://en.wikipedia.org/wiki/ISO_4217)
                                  currency code.

                                  * EUR - Euro

                                  * GBP - British Pound
                                enum:
                                  - EUR
                                  - GBP
                              - description: The currency for the order.
                          side:
                            type: string
                            description: |-
                              Side of the order.
                              * BUY - 
                              * SELL - 
                            enum:
                              - BUY
                              - SELL
                          instrument_id:
                            title: International securities identification number
                            type: string
                            description: >-
                              International securities identification number
                              defined by [ISO
                              6166](https://en.wikipedia.org/wiki/International_Securities_Identification_Number).
                            pattern: ^[A-Z]{2}[A-Z0-9]{9}[0-9]$
                          instrument_id_type:
                            description: |-
                              The type of the ID used in the request.
                              * ISIN - 
                            enum:
                              - ISIN
                            default: ISIN
                            type: string
                          order_type:
                            type: string
                            description: |-
                              Type of the order.
                              * MARKET - 
                              * LIMIT - 
                              * STOP - 
                            enum:
                              - MARKET
                              - LIMIT
                              - STOP
                          quantity:
                            allOf:
                              - type: string
                                pattern: ^[0-9]{0,63}(\.[0-9]{1,27})?$
                              - description: >-
                                  Quantity of securities for the order. Only
                                  required if the cash amount is not specified.
                          user_instrument_fit_acknowledgement:
                            type: boolean
                            description: >-
                              Only applicable if the user has failed the
                              instrument fit check for the instrument type being
                              ordered. True if the user has acknowledged their
                              willingness to trade.
                          limit_price:
                            allOf:
                              - type: string
                                pattern: ^[0-9]{0,63}(\.[0-9]{1,27})?$
                              - description: >-
                                  The limit price for orders of the type
                                  'limit'.
                          stop_price:
                            allOf:
                              - type: string
                                pattern: ^[0-9]{0,63}(\.[0-9]{1,27})?$
                              - description: The stop price for orders of the type 'stop'.
                          expiry_date:
                            allOf:
                              - title: Expiry date
                                type: string
                                pattern: ^[0-9]{4}-[0-9]{2}-[0-9]{2}$
                              - description: >-
                                  The order expiration date (last day the order
                                  can trade) in the YYYY-MM-DD format. [RFC
                                  3339, section
                                  5.6](https://json-schema.org/draft/2020-12/json-schema-validation.html#RFC3339)
                                  RFC 3339. The default value is order creation
                                  date + 200 years
                          status:
                            type: string
                            description: |-
                              The execution status of the order.
                              * NEW - 
                              * PROCESSING - 
                              * FILLED - 
                              * CANCELLED - 
                            enum:
                              - NEW
                              - PROCESSING
                              - FILLED
                              - CANCELLED
                          fee:
                            type: string
                            pattern: ^[0-9]{0,63}(\.[0-9]{1,27})?$
                          cancellation_reason:
                            type: string
                            description: >-
                              Reason for Order cancellation. The field is
                              present in case the Order has a status of
                              CANCELLED.

                              * CANCELLED_BY_CLIENT - 

                              * CANCELLED_BY_UPVEST_OPERATIONS - 

                              * CANCELLED_BY_TRADING_PARTNER - 

                              * CANCELLED_BY_UPVEST_PLATFORM - 
                            enum:
                              - CANCELLED_BY_CLIENT
                              - CANCELLED_BY_UPVEST_OPERATIONS
                              - CANCELLED_BY_TRADING_PARTNER
                              - CANCELLED_BY_UPVEST_PLATFORM
                          initiation_flow:
                            type: string
                            description: >-
                              Initiation flow used during order creation, i.e.
                              what triggered the order.

                              * API - 

                              * PORTFOLIO - 

                              * CASH_DIVIDEND_REINVESTMENT - 

                              * PORTFOLIO_REBALANCING - 

                              * SELL_TO_COVER_FEES - 

                              * SELL_TO_COVER_TAXES - 

                              * ACCOUNT_LIQUIDATION - 

                              * UPVEST_OPERATIONS - 

                              * SAVINGS_PLAN - 
                            enum:
                              - API
                              - PORTFOLIO
                              - CASH_DIVIDEND_REINVESTMENT
                              - PORTFOLIO_REBALANCING
                              - SELL_TO_COVER_FEES
                              - SELL_TO_COVER_TAXES
                              - ACCOUNT_LIQUIDATION
                              - UPVEST_OPERATIONS
                              - SAVINGS_PLAN
                          execution_flow:
                            type: string
                            description: >-
                              Execution flow that the order processing goes
                              through. If no value is specified, the default
                              value is assumed - `STRAIGHT_THROUGH`.

                              * STRAIGHT_THROUGH - 

                              * BLOCK - 
                            enum:
                              - STRAIGHT_THROUGH
                              - BLOCK
                          executions:
                            type: array
                            description: Order executions associated with this order
                            items:
                              title: Order execution
                              type: object
                              properties:
                                id:
                                  title: Order execution unique identifier
                                  type: string
                                  format: uuid
                                cash_amount:
                                  type: string
                                  pattern: ^[0-9]{1,9}(\.[0-9]{2})?$
                                share_quantity:
                                  type: string
                                  pattern: ^[0-9]{0,63}(\.[0-9]{1,27})?$
                                price:
                                  type: string
                                  pattern: ^[0-9]{0,63}(\.[0-9]{1,4})?$
                                transaction_time:
                                  type: string
                                  format: date-time
                                taxes:
                                  type: array
                                  items:
                                    title: Tax
                                    type: object
                                    properties:
                                      type:
                                        type: string
                                        description: |-
                                          Tax type
                                          * TOTAL - 
                                        default: TOTAL
                                        enum:
                                          - TOTAL
                                      amount:
                                        type: string
                                        pattern: ^[0-9]{0,63}(\.[0-9]{1,27})?$
                                    required:
                                      - type
                                      - amount
                                order_id:
                                  title: Order unique identifier
                                  type: string
                                  format: uuid
                                status:
                                  type: string
                                  description: |-
                                    Execution status of the Execution.
                                    * FILLED - 
                                    * SETTLED - 
                                    * CANCELLED - 
                                  enum:
                                    - FILLED
                                    - SETTLED
                                    - CANCELLED
                                side:
                                  type: string
                                  description: |-
                                    Side of the execution.
                                    * BUY - 
                                    * SELL - 
                                  enum:
                                    - BUY
                                    - SELL
                                currency:
                                  type: string
                                  description: >-
                                    Alphabetic three-letter [ISO
                                    4217](https://en.wikipedia.org/wiki/ISO_4217)
                                    currency code.

                                    * EUR - Euro

                                    * GBP - British Pound
                                  enum:
                                    - EUR
                                    - GBP
                                settlement_date:
                                  allOf:
                                    - title: Settlement date
                                      type: string
                                      pattern: ^[0-9]{4}-[0-9]{2}-[0-9]{2}$
                                    - description: >-
                                        Order execution settlement date in the
                                        YYYY-MM-DD format. [RFC 3339, section
                                        5.6](https://json-schema.org/draft/2020-12/json-schema-validation.html#RFC3339)
                                        RFC 3339
                                venue_id:
                                  type: string
                                  format: uuid
                                  description: The ID of the venue
                              required:
                                - id
                                - cash_amount
                                - share_quantity
                                - price
                                - transaction_time
                                - taxes
                                - order_id
                                - status
                                - side
                                - currency
                                - venue_id
                              additionalProperties: false
                          client_reference:
                            type: string
                            description: >-
                              Immutable reference to the API flow that initiated
                              the order. For client initiated API flows, this is
                              a client provided ID. For internal initiations, it
                              is set to the ID of the related object.
                            maxLength: 100
                          fee_configuration:
                            type: array
                            description: fee configuration
                            items:
                              title: Absolute Fee
                              type: object
                              properties:
                                type:
                                  title: Fee type
                                  description: |-
                                    Fee type
                                    * TRANSACTION_FEE_BUY - 
                                    * TRANSACTION_FEE_SELL - 
                                  type: string
                                  enum:
                                    - TRANSACTION_FEE_BUY
                                    - TRANSACTION_FEE_SELL
                                value_type:
                                  type: string
                                  default: ABSOLUTE
                                  description: The value type must be “ABSOLUTE”.
                                charge_method:
                                  title: Fee charge method
                                  type: string
                                  description: >-
                                    Indicates whether the fee will be charged by
                                    client or by other methods.

                                    * CHARGED_BY_CLIENT - 

                                    * COLLECTED_BY_UPVEST - 
                                  enum:
                                    - CHARGED_BY_CLIENT
                                    - COLLECTED_BY_UPVEST
                                cash_amount:
                                  type: string
                                  pattern: ^[0-9]{1,9}(\.[0-9]{2})?$
                                currency:
                                  type: string
                                  description: >-
                                    Alphabetic three-letter [ISO
                                    4217](https://en.wikipedia.org/wiki/ISO_4217)
                                    currency code.

                                    * EUR - Euro

                                    * GBP - British Pound
                                  enum:
                                    - EUR
                                    - GBP
                              required:
                                - type
                                - value_type
                                - charge_method
                                - cash_amount
                                - currency
                              additionalProperties: false
                        required:
                          - id
                          - created_at
                          - updated_at
                          - user_id
                          - account_id
                          - cash_amount
                          - currency
                          - side
                          - instrument_id
                          - instrument_id_type
                          - order_type
                          - quantity
                          - status
                          - fee
                          - initiation_flow
                          - executions
                          - client_reference
                        additionalProperties: false
                      - type: 'null'
                  cash_amount:
                    type: string
                    pattern: ^[0-9]{0,63}(\.[0-9]{1,27})?$
                  currency:
                    type: string
                    description: >-
                      Alphabetic three-letter [ISO
                      4217](https://en.wikipedia.org/wiki/ISO_4217) currency
                      code.

                      * EUR - Euro
                    enum:
                      - EUR
                    default: EUR
                  status:
                    type: string
                    description: |-
                      Status of a Savings Plan Execution. 
                      * NEW - 
                      * PROCESSING - 
                      * FILLED - 
                      * SETTLED - 
                      * CANCELLED - 
                    enum:
                      - NEW
                      - PROCESSING
                      - FILLED
                      - SETTLED
                      - CANCELLED
                  type:
                    type: string
                    description: |-
                      Type of the Savings plan.
                      * PORTFOLIO - 
                      * INSTRUMENT - 
                    enum:
                      - PORTFOLIO
                      - INSTRUMENT
                  execution_date:
                    type: string
                    description: Date of a savings plan execution in YYYY-MM-DD format.
                    pattern: ^[12]\d{3}-(0[1-9]|1[0-2])-(0[1-9]|[12]\d|3[01])$
                  instrument_id:
                    title: Instrument unique identifier
                    description: Instrument unique identifier.
                    oneOf:
                      - title: International securities identification number
                        type: string
                        description: >-
                          International securities identification number defined
                          by [ISO
                          6166](https://en.wikipedia.org/wiki/International_Securities_Identification_Number).
                        pattern: ^[A-Z]{2}[A-Z0-9]{9}[0-9]$
                      - title: German securities identification code
                        type: string
                        description: >-
                          German securities identification code known as
                          [Wertpapierkennnummer](https://en.wikipedia.org/wiki/Wertpapierkennnummer).
                        pattern: ^[A-HJ-NP-Z0-9]{6}$
                  instrument_id_type:
                    type: string
                    description: |-
                      The type of the ID used in the request.
                      * ISIN - International Securities Identification Number
                      * WKN - German securities identification code
                    enum:
                      - ISIN
                      - WKN
                    default: ISIN
                required:
                  - id
                  - user_id
                  - account_id
                  - savings_plan_id
                  - order_id
                  - cash_amount
                  - currency
                  - status
                  - type
                  - execution_date
                  - created_at
                  - updated_at
                additionalProperties: false
              examples:
                instrument:
                  summary: instrument
                  value:
                    id: fc34d28e-38f5-49d2-92f6-82acb79098f4
                    created_at: '2023-07-21T14:10:00.00Z'
                    updated_at: '2023-07-21T15:10:00.00Z'
                    user_id: 4b9732bd-7496-4913-8a5f-6360479d7fed
                    account_id: 00ef0be8-d564-43af-b3c7-11b7a2188030
                    savings_plan_id: c31083c1-1cd3-405f-95d1-f49a37f0e032
                    order_id: 68068440-6b8e-4700-8cfc-95bf21b34b96
                    cash_amount: '100'
                    currency: EUR
                    status: FILLED
                    type: INSTRUMENT
                    instrument_id: IE00BYTRRD19
                    instrument_id_type: ISIN
                    execution_date: '2023-07-24'
                portfolio:
                  summary: portfolio
                  value:
                    id: fc34d28e-38f5-49d2-92f6-82acb79098f4
                    created_at: '2023-07-21T14:10:00.00Z'
                    updated_at: '2023-07-21T15:10:00.00Z'
                    user_id: 4b9732bd-7496-4913-8a5f-6360479d7fed
                    account_id: 00ef0be8-d564-43af-b3c7-11b7a2188030
                    savings_plan_id: c31083c1-1cd3-405f-95d1-f49a37f0e032
                    order_id: 68068440-6b8e-4700-8cfc-95bf21b34b96
                    cash_amount: '100'
                    currency: EUR
                    status: FILLED
                    type: PORTFOLIO
                    execution_date: '2023-07-24'
        '401':
          description: Unauthorized. The caller has not been authenticated.
          headers:
            upvest-request-id:
              required: true
              schema:
                type: string
                format: uuid
                example: 169ae4c7-ebd7-4041-94da-25369653eba7
          content:
            application/problem+json:
              schema:
                title: Error
                type: object
                description: ''
                properties:
                  type:
                    type: string
                    description: URL to a document describing the error condition.
                  status:
                    type: integer
                    description: >-
                      Transmission of the HTTP status code so that all
                      information can be found in one place, but also to correct
                      changes in the status code due to the use of proxy
                      servers.
                  title:
                    type: string
                    description: >-
                      A short, human-readable title for the general error type;
                      the title should not change for given types.
                  detail:
                    type: string
                    description: A human-readable description of the specific error.
                  instance:
                    type: string
                    description: >-
                      This optional key may be present, with a unique URI for
                      the specific error; this will often point to an error log
                      for that specific response.
                  request_id:
                    type: string
                    description: Correlation ID for the original request.
                required:
                  - type
                  - status
                additionalProperties: false
              example:
                status: 401
                type: unauthorized
        '403':
          description: >-
            Forbidden. The caller has been authenticated but is not allowed to
            take the requested action.
          headers:
            upvest-request-id:
              required: true
              schema:
                type: string
                format: uuid
                example: 169ae4c7-ebd7-4041-94da-25369653eba7
          content:
            application/problem+json:
              schema:
                title: Error
                type: object
                description: ''
                properties:
                  type:
                    type: string
                    description: URL to a document describing the error condition.
                  status:
                    type: integer
                    description: >-
                      Transmission of the HTTP status code so that all
                      information can be found in one place, but also to correct
                      changes in the status code due to the use of proxy
                      servers.
                  title:
                    type: string
                    description: >-
                      A short, human-readable title for the general error type;
                      the title should not change for given types.
                  detail:
                    type: string
                    description: A human-readable description of the specific error.
                  instance:
                    type: string
                    description: >-
                      This optional key may be present, with a unique URI for
                      the specific error; this will often point to an error log
                      for that specific response.
                  request_id:
                    type: string
                    description: Correlation ID for the original request.
                required:
                  - type
                  - status
                additionalProperties: false
              example:
                status: 403
                type: forbidden
        '404':
          description: Not Found. The requested resource could not be found.
          headers:
            upvest-request-id:
              required: true
              schema:
                type: string
                format: uuid
                example: 169ae4c7-ebd7-4041-94da-25369653eba7
          content:
            application/problem+json:
              schema:
                title: Error
                type: object
                description: ''
                properties:
                  type:
                    type: string
                    description: URL to a document describing the error condition.
                  status:
                    type: integer
                    description: >-
                      Transmission of the HTTP status code so that all
                      information can be found in one place, but also to correct
                      changes in the status code due to the use of proxy
                      servers.
                  title:
                    type: string
                    description: >-
                      A short, human-readable title for the general error type;
                      the title should not change for given types.
                  detail:
                    type: string
                    description: A human-readable description of the specific error.
                  instance:
                    type: string
                    description: >-
                      This optional key may be present, with a unique URI for
                      the specific error; this will often point to an error log
                      for that specific response.
                  request_id:
                    type: string
                    description: Correlation ID for the original request.
                required:
                  - type
                  - status
                additionalProperties: false
              example:
                status: 404
                type: not_found
        '405':
          description: >-
            Method Not Allowed. The requested method is not allowed on the
            requested resource.
          headers:
            upvest-request-id:
              required: true
              schema:
                type: string
                format: uuid
                example: 169ae4c7-ebd7-4041-94da-25369653eba7
          content:
            application/problem+json:
              schema:
                title: Error
                type: object
                description: ''
                properties:
                  type:
                    type: string
                    description: URL to a document describing the error condition.
                  status:
                    type: integer
                    description: >-
                      Transmission of the HTTP status code so that all
                      information can be found in one place, but also to correct
                      changes in the status code due to the use of proxy
                      servers.
                  title:
                    type: string
                    description: >-
                      A short, human-readable title for the general error type;
                      the title should not change for given types.
                  detail:
                    type: string
                    description: A human-readable description of the specific error.
                  instance:
                    type: string
                    description: >-
                      This optional key may be present, with a unique URI for
                      the specific error; this will often point to an error log
                      for that specific response.
                  request_id:
                    type: string
                    description: Correlation ID for the original request.
                required:
                  - type
                  - status
                additionalProperties: false
              example:
                status: 405
                type: method_not_allowed
        '406':
          description: >-
            Not Acceptable. The resource does not have a current representation
            that would be acceptable to the user agent. "Accept" header defined
            unsupported value.
          headers:
            upvest-request-id:
              required: true
              schema:
                type: string
                format: uuid
                example: 169ae4c7-ebd7-4041-94da-25369653eba7
          content:
            application/problem+json:
              schema:
                title: Error
                type: object
                description: ''
                properties:
                  type:
                    type: string
                    description: URL to a document describing the error condition.
                  status:
                    type: integer
                    description: >-
                      Transmission of the HTTP status code so that all
                      information can be found in one place, but also to correct
                      changes in the status code due to the use of proxy
                      servers.
                  title:
                    type: string
                    description: >-
                      A short, human-readable title for the general error type;
                      the title should not change for given types.
                  detail:
                    type: string
                    description: A human-readable description of the specific error.
                  instance:
                    type: string
                    description: >-
                      This optional key may be present, with a unique URI for
                      the specific error; this will often point to an error log
                      for that specific response.
                  request_id:
                    type: string
                    description: Correlation ID for the original request.
                required:
                  - type
                  - status
                additionalProperties: false
              example:
                status: 406
                type: not_acceptable
        '429':
          description: >-
            Too Many Requests. The caller has exceeded their quota for the time
            period and has been throttled.
          headers:
            upvest-request-id:
              required: true
              schema:
                type: string
                format: uuid
                example: 169ae4c7-ebd7-4041-94da-25369653eba7
          content:
            application/problem+json:
              schema:
                title: Error
                type: object
                description: ''
                properties:
                  type:
                    type: string
                    description: URL to a document describing the error condition.
                  status:
                    type: integer
                    description: >-
                      Transmission of the HTTP status code so that all
                      information can be found in one place, but also to correct
                      changes in the status code due to the use of proxy
                      servers.
                  title:
                    type: string
                    description: >-
                      A short, human-readable title for the general error type;
                      the title should not change for given types.
                  detail:
                    type: string
                    description: A human-readable description of the specific error.
                  instance:
                    type: string
                    description: >-
                      This optional key may be present, with a unique URI for
                      the specific error; this will often point to an error log
                      for that specific response.
                  request_id:
                    type: string
                    description: Correlation ID for the original request.
                required:
                  - type
                  - status
                additionalProperties: false
              example:
                status: 429
                type: too_many_requests
        '500':
          description: Internal Server Error. The service encountered an unexpected error.
          headers:
            upvest-request-id:
              required: true
              schema:
                type: string
                format: uuid
                example: 169ae4c7-ebd7-4041-94da-25369653eba7
          content:
            application/problem+json:
              schema:
                title: Error
                type: object
                description: ''
                properties:
                  type:
                    type: string
                    description: URL to a document describing the error condition.
                  status:
                    type: integer
                    description: >-
                      Transmission of the HTTP status code so that all
                      information can be found in one place, but also to correct
                      changes in the status code due to the use of proxy
                      servers.
                  title:
                    type: string
                    description: >-
                      A short, human-readable title for the general error type;
                      the title should not change for given types.
                  detail:
                    type: string
                    description: A human-readable description of the specific error.
                  instance:
                    type: string
                    description: >-
                      This optional key may be present, with a unique URI for
                      the specific error; this will often point to an error log
                      for that specific response.
                  request_id:
                    type: string
                    description: Correlation ID for the original request.
                required:
                  - type
                  - status
                additionalProperties: false
              example:
                status: 500
                type: internal_server_error
        '503':
          description: >-
            Service Unavailable. The service handling for this request cannot be
            reached at this time.
          headers:
            upvest-request-id:
              required: true
              schema:
                type: string
                format: uuid
                example: 169ae4c7-ebd7-4041-94da-25369653eba7
          content:
            application/problem+json:
              schema:
                title: Error
                type: object
                description: ''
                properties:
                  type:
                    type: string
                    description: URL to a document describing the error condition.
                  status:
                    type: integer
                    description: >-
                      Transmission of the HTTP status code so that all
                      information can be found in one place, but also to correct
                      changes in the status code due to the use of proxy
                      servers.
                  title:
                    type: string
                    description: >-
                      A short, human-readable title for the general error type;
                      the title should not change for given types.
                  detail:
                    type: string
                    description: A human-readable description of the specific error.
                  instance:
                    type: string
                    description: >-
                      This optional key may be present, with a unique URI for
                      the specific error; this will often point to an error log
                      for that specific response.
                  request_id:
                    type: string
                    description: Correlation ID for the original request.
                required:
                  - type
                  - status
                additionalProperties: false
              example:
                status: 503
                type: method_not_allowed
        '504':
          description: >-
            Gateway Timeout. The service gateway has reached its internal
            timeout.
          headers:
            upvest-request-id:
              required: true
              schema:
                type: string
                format: uuid
                example: 169ae4c7-ebd7-4041-94da-25369653eba7
          content:
            application/problem+json:
              schema:
                title: Error
                type: object
                description: ''
                properties:
                  type:
                    type: string
                    description: URL to a document describing the error condition.
                  status:
                    type: integer
                    description: >-
                      Transmission of the HTTP status code so that all
                      information can be found in one place, but also to correct
                      changes in the status code due to the use of proxy
                      servers.
                  title:
                    type: string
                    description: >-
                      A short, human-readable title for the general error type;
                      the title should not change for given types.
                  detail:
                    type: string
                    description: A human-readable description of the specific error.
                  instance:
                    type: string
                    description: >-
                      This optional key may be present, with a unique URI for
                      the specific error; this will often point to an error log
                      for that specific response.
                  request_id:
                    type: string
                    description: Correlation ID for the original request.
                required:
                  - type
                  - status
                additionalProperties: false
              example:
                status: 504
                type: gateway_timeout
    delete:
      operationId: delete_savings_plan_execution
      summary: Delete savings plan execution
      description: Delete savings plan execution
      tags:
        - Savings Plans
      security:
        - oauth-client-credentials:
            - savings_plans:admin
      responses:
        '202':
          description: >-
            The request has been successfully accepted and will be processed
            asynchronously.
          headers:
            upvest-request-id:
              required: true
              schema:
                type: string
                format: uuid
                example: 169ae4c7-ebd7-4041-94da-25369653eba7
        '401':
          description: Unauthorized. The caller has not been authenticated.
          headers:
            upvest-request-id:
              required: true
              schema:
                type: string
                format: uuid
                example: 169ae4c7-ebd7-4041-94da-25369653eba7
          content:
            application/problem+json:
              schema:
                title: Error
                type: object
                description: ''
                properties:
                  type:
                    type: string
                    description: URL to a document describing the error condition.
                  status:
                    type: integer
                    description: >-
                      Transmission of the HTTP status code so that all
                      information can be found in one place, but also to correct
                      changes in the status code due to the use of proxy
                      servers.
                  title:
                    type: string
                    description: >-
                      A short, human-readable title for the general error type;
                      the title should not change for given types.
                  detail:
                    type: string
                    description: A human-readable description of the specific error.
                  instance:
                    type: string
                    description: >-
                      This optional key may be present, with a unique URI for
                      the specific error; this will often point to an error log
                      for that specific response.
                  request_id:
                    type: string
                    description: Correlation ID for the original request.
                required:
                  - type
                  - status
                additionalProperties: false
              example:
                status: 401
                type: unauthorized
        '403':
          description: >-
            Forbidden. The caller has been authenticated but is not allowed to
            take the requested action.
          headers:
            upvest-request-id:
              required: true
              schema:
                type: string
                format: uuid
                example: 169ae4c7-ebd7-4041-94da-25369653eba7
          content:
            application/problem+json:
              schema:
                title: Error
                type: object
                description: ''
                properties:
                  type:
                    type: string
                    description: URL to a document describing the error condition.
                  status:
                    type: integer
                    description: >-
                      Transmission of the HTTP status code so that all
                      information can be found in one place, but also to correct
                      changes in the status code due to the use of proxy
                      servers.
                  title:
                    type: string
                    description: >-
                      A short, human-readable title for the general error type;
                      the title should not change for given types.
                  detail:
                    type: string
                    description: A human-readable description of the specific error.
                  instance:
                    type: string
                    description: >-
                      This optional key may be present, with a unique URI for
                      the specific error; this will often point to an error log
                      for that specific response.
                  request_id:
                    type: string
                    description: Correlation ID for the original request.
                required:
                  - type
                  - status
                additionalProperties: false
              example:
                status: 403
                type: forbidden
        '404':
          description: Not Found. The requested resource could not be found.
          headers:
            upvest-request-id:
              required: true
              schema:
                type: string
                format: uuid
                example: 169ae4c7-ebd7-4041-94da-25369653eba7
          content:
            application/problem+json:
              schema:
                title: Error
                type: object
                description: ''
                properties:
                  type:
                    type: string
                    description: URL to a document describing the error condition.
                  status:
                    type: integer
                    description: >-
                      Transmission of the HTTP status code so that all
                      information can be found in one place, but also to correct
                      changes in the status code due to the use of proxy
                      servers.
                  title:
                    type: string
                    description: >-
                      A short, human-readable title for the general error type;
                      the title should not change for given types.
                  detail:
                    type: string
                    description: A human-readable description of the specific error.
                  instance:
                    type: string
                    description: >-
                      This optional key may be present, with a unique URI for
                      the specific error; this will often point to an error log
                      for that specific response.
                  request_id:
                    type: string
                    description: Correlation ID for the original request.
                required:
                  - type
                  - status
                additionalProperties: false
              example:
                status: 404
                type: not_found
        '406':
          description: >-
            Not Acceptable. The resource does not have a current representation
            that would be acceptable to the user agent. "Accept" header defined
            unsupported value.
          headers:
            upvest-request-id:
              required: true
              schema:
                type: string
                format: uuid
                example: 169ae4c7-ebd7-4041-94da-25369653eba7
          content:
            application/problem+json:
              schema:
                title: Error
                type: object
                description: ''
                properties:
                  type:
                    type: string
                    description: URL to a document describing the error condition.
                  status:
                    type: integer
                    description: >-
                      Transmission of the HTTP status code so that all
                      information can be found in one place, but also to correct
                      changes in the status code due to the use of proxy
                      servers.
                  title:
                    type: string
                    description: >-
                      A short, human-readable title for the general error type;
                      the title should not change for given types.
                  detail:
                    type: string
                    description: A human-readable description of the specific error.
                  instance:
                    type: string
                    description: >-
                      This optional key may be present, with a unique URI for
                      the specific error; this will often point to an error log
                      for that specific response.
                  request_id:
                    type: string
                    description: Correlation ID for the original request.
                required:
                  - type
                  - status
                additionalProperties: false
              example:
                status: 406
                type: not_acceptable
        '409':
          description: >-
            Conflict. An operation is not available for the current state of the
            resource.
          headers:
            upvest-request-id:
              required: true
              schema:
                type: string
                format: uuid
                example: 169ae4c7-ebd7-4041-94da-25369653eba7
          content:
            application/problem+json:
              schema:
                title: Error
                type: object
                description: ''
                properties:
                  type:
                    type: string
                    description: URL to a document describing the error condition.
                  status:
                    type: integer
                    description: >-
                      Transmission of the HTTP status code so that all
                      information can be found in one place, but also to correct
                      changes in the status code due to the use of proxy
                      servers.
                  title:
                    type: string
                    description: >-
                      A short, human-readable title for the general error type;
                      the title should not change for given types.
                  detail:
                    type: string
                    description: A human-readable description of the specific error.
                  instance:
                    type: string
                    description: >-
                      This optional key may be present, with a unique URI for
                      the specific error; this will often point to an error log
                      for that specific response.
                  request_id:
                    type: string
                    description: Correlation ID for the original request.
                required:
                  - type
                  - status
                additionalProperties: false
              example:
                status: 409
                type: conflict
        '429':
          description: >-
            Too Many Requests. The caller has exceeded their quota for the time
            period and has been throttled.
          headers:
            upvest-request-id:
              required: true
              schema:
                type: string
                format: uuid
                example: 169ae4c7-ebd7-4041-94da-25369653eba7
          content:
            application/problem+json:
              schema:
                title: Error
                type: object
                description: ''
                properties:
                  type:
                    type: string
                    description: URL to a document describing the error condition.
                  status:
                    type: integer
                    description: >-
                      Transmission of the HTTP status code so that all
                      information can be found in one place, but also to correct
                      changes in the status code due to the use of proxy
                      servers.
                  title:
                    type: string
                    description: >-
                      A short, human-readable title for the general error type;
                      the title should not change for given types.
                  detail:
                    type: string
                    description: A human-readable description of the specific error.
                  instance:
                    type: string
                    description: >-
                      This optional key may be present, with a unique URI for
                      the specific error; this will often point to an error log
                      for that specific response.
                  request_id:
                    type: string
                    description: Correlation ID for the original request.
                required:
                  - type
                  - status
                additionalProperties: false
              example:
                status: 429
                type: too_many_requests
        '500':
          description: Internal Server Error. The service encountered an unexpected error.
          headers:
            upvest-request-id:
              required: true
              schema:
                type: string
                format: uuid
                example: 169ae4c7-ebd7-4041-94da-25369653eba7
          content:
            application/problem+json:
              schema:
                title: Error
                type: object
                description: ''
                properties:
                  type:
                    type: string
                    description: URL to a document describing the error condition.
                  status:
                    type: integer
                    description: >-
                      Transmission of the HTTP status code so that all
                      information can be found in one place, but also to correct
                      changes in the status code due to the use of proxy
                      servers.
                  title:
                    type: string
                    description: >-
                      A short, human-readable title for the general error type;
                      the title should not change for given types.
                  detail:
                    type: string
                    description: A human-readable description of the specific error.
                  instance:
                    type: string
                    description: >-
                      This optional key may be present, with a unique URI for
                      the specific error; this will often point to an error log
                      for that specific response.
                  request_id:
                    type: string
                    description: Correlation ID for the original request.
                required:
                  - type
                  - status
                additionalProperties: false
              example:
                status: 500
                type: internal_server_error
        '503':
          description: >-
            Service Unavailable. The service handling for this request cannot be
            reached at this time.
          headers:
            upvest-request-id:
              required: true
              schema:
                type: string
                format: uuid
                example: 169ae4c7-ebd7-4041-94da-25369653eba7
          content:
            application/problem+json:
              schema:
                title: Error
                type: object
                description: ''
                properties:
                  type:
                    type: string
                    description: URL to a document describing the error condition.
                  status:
                    type: integer
                    description: >-
                      Transmission of the HTTP status code so that all
                      information can be found in one place, but also to correct
                      changes in the status code due to the use of proxy
                      servers.
                  title:
                    type: string
                    description: >-
                      A short, human-readable title for the general error type;
                      the title should not change for given types.
                  detail:
                    type: string
                    description: A human-readable description of the specific error.
                  instance:
                    type: string
                    description: >-
                      This optional key may be present, with a unique URI for
                      the specific error; this will often point to an error log
                      for that specific response.
                  request_id:
                    type: string
                    description: Correlation ID for the original request.
                required:
                  - type
                  - status
                additionalProperties: false
              example:
                status: 503
                type: method_not_allowed
        '504':
          description: >-
            Gateway Timeout. The service gateway has reached its internal
            timeout.
          headers:
            upvest-request-id:
              required: true
              schema:
                type: string
                format: uuid
                example: 169ae4c7-ebd7-4041-94da-25369653eba7
          content:
            application/problem+json:
              schema:
                title: Error
                type: object
                description: ''
                properties:
                  type:
                    type: string
                    description: URL to a document describing the error condition.
                  status:
                    type: integer
                    description: >-
                      Transmission of the HTTP status code so that all
                      information can be found in one place, but also to correct
                      changes in the status code due to the use of proxy
                      servers.
                  title:
                    type: string
                    description: >-
                      A short, human-readable title for the general error type;
                      the title should not change for given types.
                  detail:
                    type: string
                    description: A human-readable description of the specific error.
                  instance:
                    type: string
                    description: >-
                      This optional key may be present, with a unique URI for
                      the specific error; this will often point to an error log
                      for that specific response.
                  request_id:
                    type: string
                    description: Correlation ID for the original request.
                required:
                  - type
                  - status
                additionalProperties: false
              example:
                status: 504
                type: gateway_timeout
  /savings_plans/{savings_plan_id}/executions:
    parameters:
      - name: savings_plan_id
        in: path
        required: true
        schema:
          title: Savings plan unique identifier
          type: string
          format: uuid
      - name: upvest-client-id
        in: header
        description: Tenant Client ID
        required: true
        schema:
          type: string
          format: uuid
          example: ebabcf4d-61c3-4942-875c-e265a7c2d062
      - name: authorization
        in: header
        description: |
          Bearer (access) token from the OAuth flow with correct scopes.
          https://datatracker.ietf.org/doc/html/rfc6750
        required: true
        schema:
          type: string
          pattern: ^Bearer [a-zA-Z0-9\-\._~+/]*=*
          example: Bearer c2VjcmV0Cg==
      - name: signature
        in: header
        required: true
        schema:
          type: string
        description: >-
          https://tools.ietf.org/id/draft-ietf-httpbis-message-signatures-01.html#name-the-signature-http-header
      - name: signature-input
        in: header
        required: true
        schema:
          type: string
        description: >-
          https://tools.ietf.org/id/draft-ietf-httpbis-message-signatures-01.html#name-the-signature-input-http-he
      - name: upvest-api-version
        in: header
        required: false
        schema:
          type: string
          enum:
            - '1'
          default: '1'
          example: '1'
        description: 'Upvest API version (Note: Do not include quotation marks)'
    get:
      operationId: list_savings_plan_executions
      summary: List savings plan executions
      description: List savings plan executions for a saving plan specified by its ID.
      tags:
        - Savings Plans
      security:
        - oauth-client-credentials:
            - savings_plans:read
            - savings_plans:admin
      parameters:
        - name: start_date
          in: query
          required: false
          schema:
            type: string
            title: Date in YYYY-MM-DD format. RFC 3339, section 5.6
            description: >-
              Returns savings plan executions starting from and including this
              date (UTC)
          example: '2022-10-14T10:10:10Z'
        - name: end_date
          in: query
          required: false
          schema:
            type: string
            title: Date in YYYY-MM-DD format. RFC 3339, section 5.6
            description: Returns savings plan executions up to this date (UTC)
          example: '2022-10-14T10:10:10Z'
        - name: sort
          in: query
          required: false
          description: Sort the result by `execution_date`.
          schema:
            type: string
            enum:
              - execution_date
            default: execution_date
        - name: order
          in: query
          required: false
          schema:
            type: string
            enum:
              - ASC
            default: ASC
          description: >-
            Sort order of the result list if the `sort` parameter is specified.
            By default, only ASC for ascending sort.
        - name: offset
          in: query
          schema:
            type: integer
            minimum: 0
            format: int32
          allowEmptyValue: true
          description: >-
            Use the `offset` argument to specify where in the list of results to
            start when returning items for a particular query.
        - name: limit
          in: query
          schema:
            type: integer
            format: int32
            default: 100
            minimum: 0
            maximum: 1000
          allowEmptyValue: true
          description: >-
            Use the `limit` argument to specify the maximum number of items
            returned.
      responses:
        '200':
          description: OK
          headers:
            upvest-request-id:
              required: true
              schema:
                type: string
                format: uuid
                example: 169ae4c7-ebd7-4041-94da-25369653eba7
          content:
            application/json:
              schema:
                title: Savings plan execution - List - Response
                type: object
                properties:
                  meta:
                    type: object
                    properties:
                      offset:
                        type: integer
                        description: Amount of resource to offset in the response.
                      limit:
                        type: integer
                        description: Total limit of the response.
                      count:
                        type: integer
                        description: Count of the resources returned in the response.
                      total_count:
                        type: integer
                        description: Total count of all the resources.
                      sort:
                        type: string
                        description: The field that the list is sorted by.
                      order:
                        type: string
                        description: |-
                          The ordering of the response.
                          * ASC - Ascending order
                          * DESC - Descending order
                        enum:
                          - ASC
                          - DESC
                    required:
                      - offset
                      - limit
                      - count
                      - total_count
                  data:
                    type: array
                    items:
                      title: Savings plan
                      type: object
                      properties:
                        id:
                          title: Savings plan execution unique identifier
                          type: string
                          format: uuid
                        created_at:
                          type: string
                          format: date-time
                          description: >-
                            Date and time when the resource was created. [RFC
                            3339-5](https://datatracker.ietf.org/doc/html/rfc3339#section-5.6),
                            [ISO8601
                            UTC](https://www.iso.org/iso-8601-date-and-time-format.html)
                        updated_at:
                          type: string
                          format: date-time
                          description: >-
                            Date and time when the resource was last updated.
                            [RFC
                            3339-5](https://datatracker.ietf.org/doc/html/rfc3339#section-5.6),
                            [ISO8601
                            UTC](https://www.iso.org/iso-8601-date-and-time-format.html)
                        user_id:
                          title: User unique identifier.
                          type: string
                          description: User unique identifier.
                          format: uuid
                        account_id:
                          title: Account unique identifier.
                          type: string
                          description: Account unique identifier.
                          format: uuid
                        savings_plan_id:
                          title: Savings plan unique identifier
                          type: string
                          format: uuid
                        order_id:
                          title: >-
                            Order unique identifier (Portfolio order or
                            Instrument order)
                          description: >-
                            Order unique identifier (Portfolio order or
                            Instrument order)
                          oneOf:
                            - title: Portfolios order unique identifier
                              type: string
                              format: uuid
                            - title: Order
                              type: object
                              properties:
                                id:
                                  title: Order unique identifier
                                  type: string
                                  format: uuid
                                created_at:
                                  type: string
                                  format: date-time
                                  description: >-
                                    Date and time when the resource was created.
                                    [RFC
                                    3339-5](https://datatracker.ietf.org/doc/html/rfc3339#section-5.6),
                                    [ISO8601
                                    UTC](https://www.iso.org/iso-8601-date-and-time-format.html)
                                updated_at:
                                  type: string
                                  format: date-time
                                  description: >-
                                    Date and time when the resource was last
                                    updated. [RFC
                                    3339-5](https://datatracker.ietf.org/doc/html/rfc3339#section-5.6),
                                    [ISO8601
                                    UTC](https://www.iso.org/iso-8601-date-and-time-format.html)
                                user_id:
                                  type: string
                                  format: uuid
                                  description: The ID of the user
                                account_id:
                                  type: string
                                  format: uuid
                                  description: The ID of the account that owns the order
                                cash_amount:
                                  allOf:
                                    - type: string
                                      pattern: ^[0-9]{1,9}(\.[0-9]{2})?$
                                    - description: >-
                                        Cash amount for a nominal order, not
                                        required if a share quantity is
                                        specified.
                                currency:
                                  allOf:
                                    - type: string
                                      description: >-
                                        Alphabetic three-letter [ISO
                                        4217](https://en.wikipedia.org/wiki/ISO_4217)
                                        currency code.

                                        * EUR - Euro

                                        * GBP - British Pound
                                      enum:
                                        - EUR
                                        - GBP
                                    - description: The currency for the order.
                                side:
                                  type: string
                                  description: |-
                                    Side of the order.
                                    * BUY - 
                                    * SELL - 
                                  enum:
                                    - BUY
                                    - SELL
                                instrument_id:
                                  title: >-
                                    International securities identification
                                    number
                                  type: string
                                  description: >-
                                    International securities identification
                                    number defined by [ISO
                                    6166](https://en.wikipedia.org/wiki/International_Securities_Identification_Number).
                                  pattern: ^[A-Z]{2}[A-Z0-9]{9}[0-9]$
                                instrument_id_type:
                                  description: |-
                                    The type of the ID used in the request.
                                    * ISIN - 
                                  enum:
                                    - ISIN
                                  default: ISIN
                                  type: string
                                order_type:
                                  type: string
                                  description: |-
                                    Type of the order.
                                    * MARKET - 
                                    * LIMIT - 
                                    * STOP - 
                                  enum:
                                    - MARKET
                                    - LIMIT
                                    - STOP
                                quantity:
                                  allOf:
                                    - type: string
                                      pattern: ^[0-9]{0,63}(\.[0-9]{1,27})?$
                                    - description: >-
                                        Quantity of securities for the order.
                                        Only required if the cash amount is not
                                        specified.
                                user_instrument_fit_acknowledgement:
                                  type: boolean
                                  description: >-
                                    Only applicable if the user has failed the
                                    instrument fit check for the instrument type
                                    being ordered. True if the user has
                                    acknowledged their willingness to trade.
                                limit_price:
                                  allOf:
                                    - type: string
                                      pattern: ^[0-9]{0,63}(\.[0-9]{1,27})?$
                                    - description: >-
                                        The limit price for orders of the type
                                        'limit'.
                                stop_price:
                                  allOf:
                                    - type: string
                                      pattern: ^[0-9]{0,63}(\.[0-9]{1,27})?$
                                    - description: >-
                                        The stop price for orders of the type
                                        'stop'.
                                expiry_date:
                                  allOf:
                                    - title: Expiry date
                                      type: string
                                      pattern: ^[0-9]{4}-[0-9]{2}-[0-9]{2}$
                                    - description: >-
                                        The order expiration date (last day the
                                        order can trade) in the YYYY-MM-DD
                                        format. [RFC 3339, section
                                        5.6](https://json-schema.org/draft/2020-12/json-schema-validation.html#RFC3339)
                                        RFC 3339. The default value is order
                                        creation date + 200 years
                                status:
                                  type: string
                                  description: |-
                                    The execution status of the order.
                                    * NEW - 
                                    * PROCESSING - 
                                    * FILLED - 
                                    * CANCELLED - 
                                  enum:
                                    - NEW
                                    - PROCESSING
                                    - FILLED
                                    - CANCELLED
                                fee:
                                  type: string
                                  pattern: ^[0-9]{0,63}(\.[0-9]{1,27})?$
                                cancellation_reason:
                                  type: string
                                  description: >-
                                    Reason for Order cancellation. The field is
                                    present in case the Order has a status of
                                    CANCELLED.

                                    * CANCELLED_BY_CLIENT - 

                                    * CANCELLED_BY_UPVEST_OPERATIONS - 

                                    * CANCELLED_BY_TRADING_PARTNER - 

                                    * CANCELLED_BY_UPVEST_PLATFORM - 
                                  enum:
                                    - CANCELLED_BY_CLIENT
                                    - CANCELLED_BY_UPVEST_OPERATIONS
                                    - CANCELLED_BY_TRADING_PARTNER
                                    - CANCELLED_BY_UPVEST_PLATFORM
                                initiation_flow:
                                  type: string
                                  description: >-
                                    Initiation flow used during order creation,
                                    i.e. what triggered the order.

                                    * API - 

                                    * PORTFOLIO - 

                                    * CASH_DIVIDEND_REINVESTMENT - 

                                    * PORTFOLIO_REBALANCING - 

                                    * SELL_TO_COVER_FEES - 

                                    * SELL_TO_COVER_TAXES - 

                                    * ACCOUNT_LIQUIDATION - 

                                    * UPVEST_OPERATIONS - 

                                    * SAVINGS_PLAN - 
                                  enum:
                                    - API
                                    - PORTFOLIO
                                    - CASH_DIVIDEND_REINVESTMENT
                                    - PORTFOLIO_REBALANCING
                                    - SELL_TO_COVER_FEES
                                    - SELL_TO_COVER_TAXES
                                    - ACCOUNT_LIQUIDATION
                                    - UPVEST_OPERATIONS
                                    - SAVINGS_PLAN
                                execution_flow:
                                  type: string
                                  description: >-
                                    Execution flow that the order processing
                                    goes through. If no value is specified, the
                                    default value is assumed -
                                    `STRAIGHT_THROUGH`.

                                    * STRAIGHT_THROUGH - 

                                    * BLOCK - 
                                  enum:
                                    - STRAIGHT_THROUGH
                                    - BLOCK
                                executions:
                                  type: array
                                  description: Order executions associated with this order
                                  items:
                                    title: Order execution
                                    type: object
                                    properties:
                                      id:
                                        title: Order execution unique identifier
                                        type: string
                                        format: uuid
                                      cash_amount:
                                        type: string
                                        pattern: ^[0-9]{1,9}(\.[0-9]{2})?$
                                      share_quantity:
                                        type: string
                                        pattern: ^[0-9]{0,63}(\.[0-9]{1,27})?$
                                      price:
                                        type: string
                                        pattern: ^[0-9]{0,63}(\.[0-9]{1,4})?$
                                      transaction_time:
                                        type: string
                                        format: date-time
                                      taxes:
                                        type: array
                                        items:
                                          title: Tax
                                          type: object
                                          properties:
                                            type:
                                              type: string
                                              description: |-
                                                Tax type
                                                * TOTAL - 
                                              default: TOTAL
                                              enum:
                                                - TOTAL
                                            amount:
                                              type: string
                                              pattern: ^[0-9]{0,63}(\.[0-9]{1,27})?$
                                          required:
                                            - type
                                            - amount
                                      order_id:
                                        title: Order unique identifier
                                        type: string
                                        format: uuid
                                      status:
                                        type: string
                                        description: |-
                                          Execution status of the Execution.
                                          * FILLED - 
                                          * SETTLED - 
                                          * CANCELLED - 
                                        enum:
                                          - FILLED
                                          - SETTLED
                                          - CANCELLED
                                      side:
                                        type: string
                                        description: |-
                                          Side of the execution.
                                          * BUY - 
                                          * SELL - 
                                        enum:
                                          - BUY
                                          - SELL
                                      currency:
                                        type: string
                                        description: >-
                                          Alphabetic three-letter [ISO
                                          4217](https://en.wikipedia.org/wiki/ISO_4217)
                                          currency code.

                                          * EUR - Euro

                                          * GBP - British Pound
                                        enum:
                                          - EUR
                                          - GBP
                                      settlement_date:
                                        allOf:
                                          - title: Settlement date
                                            type: string
                                            pattern: ^[0-9]{4}-[0-9]{2}-[0-9]{2}$
                                          - description: >-
                                              Order execution settlement date in the
                                              YYYY-MM-DD format. [RFC 3339, section
                                              5.6](https://json-schema.org/draft/2020-12/json-schema-validation.html#RFC3339)
                                              RFC 3339
                                      venue_id:
                                        type: string
                                        format: uuid
                                        description: The ID of the venue
                                    required:
                                      - id
                                      - cash_amount
                                      - share_quantity
                                      - price
                                      - transaction_time
                                      - taxes
                                      - order_id
                                      - status
                                      - side
                                      - currency
                                      - venue_id
                                    additionalProperties: false
                                client_reference:
                                  type: string
                                  description: >-
                                    Immutable reference to the API flow that
                                    initiated the order. For client initiated
                                    API flows, this is a client provided ID. For
                                    internal initiations, it is set to the ID of
                                    the related object.
                                  maxLength: 100
                                fee_configuration:
                                  type: array
                                  description: fee configuration
                                  items:
                                    title: Absolute Fee
                                    type: object
                                    properties:
                                      type:
                                        title: Fee type
                                        description: |-
                                          Fee type
                                          * TRANSACTION_FEE_BUY - 
                                          * TRANSACTION_FEE_SELL - 
                                        type: string
                                        enum:
                                          - TRANSACTION_FEE_BUY
                                          - TRANSACTION_FEE_SELL
                                      value_type:
                                        type: string
                                        default: ABSOLUTE
                                        description: The value type must be “ABSOLUTE”.
                                      charge_method:
                                        title: Fee charge method
                                        type: string
                                        description: >-
                                          Indicates whether the fee will be
                                          charged by client or by other methods.

                                          * CHARGED_BY_CLIENT - 

                                          * COLLECTED_BY_UPVEST - 
                                        enum:
                                          - CHARGED_BY_CLIENT
                                          - COLLECTED_BY_UPVEST
                                      cash_amount:
                                        type: string
                                        pattern: ^[0-9]{1,9}(\.[0-9]{2})?$
                                      currency:
                                        type: string
                                        description: >-
                                          Alphabetic three-letter [ISO
                                          4217](https://en.wikipedia.org/wiki/ISO_4217)
                                          currency code.

                                          * EUR - Euro

                                          * GBP - British Pound
                                        enum:
                                          - EUR
                                          - GBP
                                    required:
                                      - type
                                      - value_type
                                      - charge_method
                                      - cash_amount
                                      - currency
                                    additionalProperties: false
                              required:
                                - id
                                - created_at
                                - updated_at
                                - user_id
                                - account_id
                                - cash_amount
                                - currency
                                - side
                                - instrument_id
                                - instrument_id_type
                                - order_type
                                - quantity
                                - status
                                - fee
                                - initiation_flow
                                - executions
                                - client_reference
                              additionalProperties: false
                            - type: 'null'
                        cash_amount:
                          type: string
                          pattern: ^[0-9]{0,63}(\.[0-9]{1,27})?$
                        currency:
                          type: string
                          description: >-
                            Alphabetic three-letter [ISO
                            4217](https://en.wikipedia.org/wiki/ISO_4217)
                            currency code.

                            * EUR - Euro
                          enum:
                            - EUR
                          default: EUR
                        status:
                          type: string
                          description: |-
                            Status of a Savings Plan Execution. 
                            * NEW - 
                            * PROCESSING - 
                            * FILLED - 
                            * SETTLED - 
                            * CANCELLED - 
                          enum:
                            - NEW
                            - PROCESSING
                            - FILLED
                            - SETTLED
                            - CANCELLED
                        type:
                          type: string
                          description: |-
                            Type of the Savings plan.
                            * PORTFOLIO - 
                            * INSTRUMENT - 
                          enum:
                            - PORTFOLIO
                            - INSTRUMENT
                        execution_date:
                          type: string
                          description: >-
                            Date of a savings plan execution in YYYY-MM-DD
                            format.
                          pattern: ^[12]\d{3}-(0[1-9]|1[0-2])-(0[1-9]|[12]\d|3[01])$
                        instrument_id:
                          title: Instrument unique identifier
                          description: Instrument unique identifier.
                          oneOf:
                            - title: International securities identification number
                              type: string
                              description: >-
                                International securities identification number
                                defined by [ISO
                                6166](https://en.wikipedia.org/wiki/International_Securities_Identification_Number).
                              pattern: ^[A-Z]{2}[A-Z0-9]{9}[0-9]$
                            - title: German securities identification code
                              type: string
                              description: >-
                                German securities identification code known as
                                [Wertpapierkennnummer](https://en.wikipedia.org/wiki/Wertpapierkennnummer).
                              pattern: ^[A-HJ-NP-Z0-9]{6}$
                        instrument_id_type:
                          type: string
                          description: >-
                            The type of the ID used in the request.

                            * ISIN - International Securities Identification
                            Number

                            * WKN - German securities identification code
                          enum:
                            - ISIN
                            - WKN
                          default: ISIN
                      required:
                        - id
                        - user_id
                        - account_id
                        - savings_plan_id
                        - order_id
                        - cash_amount
                        - currency
                        - status
                        - type
                        - execution_date
                        - created_at
                        - updated_at
                      additionalProperties: false
                required:
                  - meta
                  - data
                additionalProperties: false
              examples:
                instrument:
                  summary: instrument
                  value:
                    meta:
                      offset: 0
                      limit: 100
                      count: 1
                      total_count: 1
                      sort: id
                      order: ASC
                    data:
                      - id: fc34d28e-38f5-49d2-92f6-82acb79098f4
                        created_at: '2023-07-21T14:10:00.00Z'
                        updated_at: '2023-07-21T15:10:00.00Z'
                        user_id: 4b9732bd-7496-4913-8a5f-6360479d7fed
                        account_id: 00ef0be8-d564-43af-b3c7-11b7a2188030
                        savings_plan_id: c31083c1-1cd3-405f-95d1-f49a37f0e032
                        order_id: 68068440-6b8e-4700-8cfc-95bf21b34b96
                        cash_amount: '100'
                        currency: EUR
                        status: FILLED
                        type: INSTRUMENT
                        instrument_id: DE0007664005
                        instrument_id_type: ISIN
                        execution_date: '2023-10-05'
                portfolio:
                  summary: portfolio
                  value:
                    meta:
                      offset: 0
                      limit: 100
                      count: 1
                      total_count: 1
                      sort: id
                      order: ASC
                    data:
                      - id: fc34d28e-38f5-49d2-92f6-82acb79098f4
                        created_at: '2023-07-21T14:10:00.00Z'
                        updated_at: '2023-07-21T15:10:00.00Z'
                        user_id: 4b9732bd-7496-4913-8a5f-6360479d7fed
                        account_id: 00ef0be8-d564-43af-b3c7-11b7a2188030
                        savings_plan_id: c31083c1-1cd3-405f-95d1-f49a37f0e032
                        order_id: 68068440-6b8e-4700-8cfc-95bf21b34b96
                        cash_amount: '100'
                        currency: EUR
                        status: FILLED
                        type: PORTFOLIO
                        execution_date: '2023-10-05'
        '400':
          description: Bad Request. The incoming request had a malformed parameter/object.
          headers:
            upvest-request-id:
              required: true
              schema:
                type: string
                format: uuid
                example: 169ae4c7-ebd7-4041-94da-25369653eba7
          content:
            application/problem+json:
              schema:
                title: Error
                type: object
                description: ''
                properties:
                  type:
                    type: string
                    description: URL to a document describing the error condition.
                  status:
                    type: integer
                    description: >-
                      Transmission of the HTTP status code so that all
                      information can be found in one place, but also to correct
                      changes in the status code due to the use of proxy
                      servers.
                  title:
                    type: string
                    description: >-
                      A short, human-readable title for the general error type;
                      the title should not change for given types.
                  detail:
                    type: string
                    description: A human-readable description of the specific error.
                  instance:
                    type: string
                    description: >-
                      This optional key may be present, with a unique URI for
                      the specific error; this will often point to an error log
                      for that specific response.
                  request_id:
                    type: string
                    description: Correlation ID for the original request.
                required:
                  - type
                  - status
                additionalProperties: false
              example:
                status: 400
                type: bad_request
        '401':
          description: Unauthorized. The caller has not been authenticated.
          headers:
            upvest-request-id:
              required: true
              schema:
                type: string
                format: uuid
                example: 169ae4c7-ebd7-4041-94da-25369653eba7
          content:
            application/problem+json:
              schema:
                title: Error
                type: object
                description: ''
                properties:
                  type:
                    type: string
                    description: URL to a document describing the error condition.
                  status:
                    type: integer
                    description: >-
                      Transmission of the HTTP status code so that all
                      information can be found in one place, but also to correct
                      changes in the status code due to the use of proxy
                      servers.
                  title:
                    type: string
                    description: >-
                      A short, human-readable title for the general error type;
                      the title should not change for given types.
                  detail:
                    type: string
                    description: A human-readable description of the specific error.
                  instance:
                    type: string
                    description: >-
                      This optional key may be present, with a unique URI for
                      the specific error; this will often point to an error log
                      for that specific response.
                  request_id:
                    type: string
                    description: Correlation ID for the original request.
                required:
                  - type
                  - status
                additionalProperties: false
              example:
                status: 401
                type: unauthorized
        '403':
          description: >-
            Forbidden. The caller has been authenticated but is not allowed to
            take the requested action.
          headers:
            upvest-request-id:
              required: true
              schema:
                type: string
                format: uuid
                example: 169ae4c7-ebd7-4041-94da-25369653eba7
          content:
            application/problem+json:
              schema:
                title: Error
                type: object
                description: ''
                properties:
                  type:
                    type: string
                    description: URL to a document describing the error condition.
                  status:
                    type: integer
                    description: >-
                      Transmission of the HTTP status code so that all
                      information can be found in one place, but also to correct
                      changes in the status code due to the use of proxy
                      servers.
                  title:
                    type: string
                    description: >-
                      A short, human-readable title for the general error type;
                      the title should not change for given types.
                  detail:
                    type: string
                    description: A human-readable description of the specific error.
                  instance:
                    type: string
                    description: >-
                      This optional key may be present, with a unique URI for
                      the specific error; this will often point to an error log
                      for that specific response.
                  request_id:
                    type: string
                    description: Correlation ID for the original request.
                required:
                  - type
                  - status
                additionalProperties: false
              example:
                status: 403
                type: forbidden
        '404':
          description: Not Found. The requested resource could not be found.
          headers:
            upvest-request-id:
              required: true
              schema:
                type: string
                format: uuid
                example: 169ae4c7-ebd7-4041-94da-25369653eba7
          content:
            application/problem+json:
              schema:
                title: Error
                type: object
                description: ''
                properties:
                  type:
                    type: string
                    description: URL to a document describing the error condition.
                  status:
                    type: integer
                    description: >-
                      Transmission of the HTTP status code so that all
                      information can be found in one place, but also to correct
                      changes in the status code due to the use of proxy
                      servers.
                  title:
                    type: string
                    description: >-
                      A short, human-readable title for the general error type;
                      the title should not change for given types.
                  detail:
                    type: string
                    description: A human-readable description of the specific error.
                  instance:
                    type: string
                    description: >-
                      This optional key may be present, with a unique URI for
                      the specific error; this will often point to an error log
                      for that specific response.
                  request_id:
                    type: string
                    description: Correlation ID for the original request.
                required:
                  - type
                  - status
                additionalProperties: false
              example:
                status: 404
                type: not_found
        '405':
          description: >-
            Method Not Allowed. The requested method is not allowed on the
            requested resource.
          headers:
            upvest-request-id:
              required: true
              schema:
                type: string
                format: uuid
                example: 169ae4c7-ebd7-4041-94da-25369653eba7
          content:
            application/problem+json:
              schema:
                title: Error
                type: object
                description: ''
                properties:
                  type:
                    type: string
                    description: URL to a document describing the error condition.
                  status:
                    type: integer
                    description: >-
                      Transmission of the HTTP status code so that all
                      information can be found in one place, but also to correct
                      changes in the status code due to the use of proxy
                      servers.
                  title:
                    type: string
                    description: >-
                      A short, human-readable title for the general error type;
                      the title should not change for given types.
                  detail:
                    type: string
                    description: A human-readable description of the specific error.
                  instance:
                    type: string
                    description: >-
                      This optional key may be present, with a unique URI for
                      the specific error; this will often point to an error log
                      for that specific response.
                  request_id:
                    type: string
                    description: Correlation ID for the original request.
                required:
                  - type
                  - status
                additionalProperties: false
              example:
                status: 405
                type: method_not_allowed
        '406':
          description: >-
            Not Acceptable. The resource does not have a current representation
            that would be acceptable to the user agent. "Accept" header defined
            unsupported value.
          headers:
            upvest-request-id:
              required: true
              schema:
                type: string
                format: uuid
                example: 169ae4c7-ebd7-4041-94da-25369653eba7
          content:
            application/problem+json:
              schema:
                title: Error
                type: object
                description: ''
                properties:
                  type:
                    type: string
                    description: URL to a document describing the error condition.
                  status:
                    type: integer
                    description: >-
                      Transmission of the HTTP status code so that all
                      information can be found in one place, but also to correct
                      changes in the status code due to the use of proxy
                      servers.
                  title:
                    type: string
                    description: >-
                      A short, human-readable title for the general error type;
                      the title should not change for given types.
                  detail:
                    type: string
                    description: A human-readable description of the specific error.
                  instance:
                    type: string
                    description: >-
                      This optional key may be present, with a unique URI for
                      the specific error; this will often point to an error log
                      for that specific response.
                  request_id:
                    type: string
                    description: Correlation ID for the original request.
                required:
                  - type
                  - status
                additionalProperties: false
              example:
                status: 406
                type: not_acceptable
        '429':
          description: >-
            Too Many Requests. The caller has exceeded their quota for the time
            period and has been throttled.
          headers:
            upvest-request-id:
              required: true
              schema:
                type: string
                format: uuid
                example: 169ae4c7-ebd7-4041-94da-25369653eba7
          content:
            application/problem+json:
              schema:
                title: Error
                type: object
                description: ''
                properties:
                  type:
                    type: string
                    description: URL to a document describing the error condition.
                  status:
                    type: integer
                    description: >-
                      Transmission of the HTTP status code so that all
                      information can be found in one place, but also to correct
                      changes in the status code due to the use of proxy
                      servers.
                  title:
                    type: string
                    description: >-
                      A short, human-readable title for the general error type;
                      the title should not change for given types.
                  detail:
                    type: string
                    description: A human-readable description of the specific error.
                  instance:
                    type: string
                    description: >-
                      This optional key may be present, with a unique URI for
                      the specific error; this will often point to an error log
                      for that specific response.
                  request_id:
                    type: string
                    description: Correlation ID for the original request.
                required:
                  - type
                  - status
                additionalProperties: false
              example:
                status: 429
                type: too_many_requests
        '500':
          description: Internal Server Error. The service encountered an unexpected error.
          headers:
            upvest-request-id:
              required: true
              schema:
                type: string
                format: uuid
                example: 169ae4c7-ebd7-4041-94da-25369653eba7
          content:
            application/problem+json:
              schema:
                title: Error
                type: object
                description: ''
                properties:
                  type:
                    type: string
                    description: URL to a document describing the error condition.
                  status:
                    type: integer
                    description: >-
                      Transmission of the HTTP status code so that all
                      information can be found in one place, but also to correct
                      changes in the status code due to the use of proxy
                      servers.
                  title:
                    type: string
                    description: >-
                      A short, human-readable title for the general error type;
                      the title should not change for given types.
                  detail:
                    type: string
                    description: A human-readable description of the specific error.
                  instance:
                    type: string
                    description: >-
                      This optional key may be present, with a unique URI for
                      the specific error; this will often point to an error log
                      for that specific response.
                  request_id:
                    type: string
                    description: Correlation ID for the original request.
                required:
                  - type
                  - status
                additionalProperties: false
              example:
                status: 500
                type: internal_server_error
        '503':
          description: >-
            Service Unavailable. The service handling for this request cannot be
            reached at this time.
          headers:
            upvest-request-id:
              required: true
              schema:
                type: string
                format: uuid
                example: 169ae4c7-ebd7-4041-94da-25369653eba7
          content:
            application/problem+json:
              schema:
                title: Error
                type: object
                description: ''
                properties:
                  type:
                    type: string
                    description: URL to a document describing the error condition.
                  status:
                    type: integer
                    description: >-
                      Transmission of the HTTP status code so that all
                      information can be found in one place, but also to correct
                      changes in the status code due to the use of proxy
                      servers.
                  title:
                    type: string
                    description: >-
                      A short, human-readable title for the general error type;
                      the title should not change for given types.
                  detail:
                    type: string
                    description: A human-readable description of the specific error.
                  instance:
                    type: string
                    description: >-
                      This optional key may be present, with a unique URI for
                      the specific error; this will often point to an error log
                      for that specific response.
                  request_id:
                    type: string
                    description: Correlation ID for the original request.
                required:
                  - type
                  - status
                additionalProperties: false
              example:
                status: 503
                type: method_not_allowed
        '504':
          description: >-
            Gateway Timeout. The service gateway has reached its internal
            timeout.
          headers:
            upvest-request-id:
              required: true
              schema:
                type: string
                format: uuid
                example: 169ae4c7-ebd7-4041-94da-25369653eba7
          content:
            application/problem+json:
              schema:
                title: Error
                type: object
                description: ''
                properties:
                  type:
                    type: string
                    description: URL to a document describing the error condition.
                  status:
                    type: integer
                    description: >-
                      Transmission of the HTTP status code so that all
                      information can be found in one place, but also to correct
                      changes in the status code due to the use of proxy
                      servers.
                  title:
                    type: string
                    description: >-
                      A short, human-readable title for the general error type;
                      the title should not change for given types.
                  detail:
                    type: string
                    description: A human-readable description of the specific error.
                  instance:
                    type: string
                    description: >-
                      This optional key may be present, with a unique URI for
                      the specific error; this will often point to an error log
                      for that specific response.
                  request_id:
                    type: string
                    description: Correlation ID for the original request.
                required:
                  - type
                  - status
                additionalProperties: false
              example:
                status: 504
                type: gateway_timeout
  /tests/payments/transactions:
    parameters:
      - name: upvest-client-id
        in: header
        description: Tenant Client ID
        required: true
        schema:
          type: string
          format: uuid
          example: ebabcf4d-61c3-4942-875c-e265a7c2d062
      - name: authorization
        in: header
        description: |
          Bearer (access) token from the OAuth flow with correct scopes.
          https://datatracker.ietf.org/doc/html/rfc6750
        required: true
        schema:
          type: string
          pattern: ^Bearer [a-zA-Z0-9\-\._~+/]*=*
          example: Bearer c2VjcmV0Cg==
      - name: signature
        in: header
        required: true
        schema:
          type: string
        description: >-
          https://tools.ietf.org/id/draft-ietf-httpbis-message-signatures-01.html#name-the-signature-http-header
      - name: signature-input
        in: header
        required: true
        schema:
          type: string
        description: >-
          https://tools.ietf.org/id/draft-ietf-httpbis-message-signatures-01.html#name-the-signature-input-http-he
      - name: upvest-api-version
        in: header
        required: false
        schema:
          type: string
          enum:
            - '1'
          default: '1'
          example: '1'
        description: 'Upvest API version (Note: Do not include quotation marks)'
    post:
      operationId: create_bank_transaction
      summary: Trigger a bank transaction
      description: >-
        Trigger a bank transaction for testing purposes. This can be used to
        simulate a money transfer for various flows which need cash settlements
        on one of our bank accounts.
      tags:
        - Tests
      security:
        - oauth-client-credentials:
            - tests:admin
      parameters:
        - name: idempotency-key
          in: header
          required: true
          schema:
            type: string
            format: uuid
            pattern: >-
              ^[0-9a-fA-F]{8}-?[0-9a-fA-F]{4}-?[0-5][0-9a-fA-F]{3}-?[089abAB][0-9a-fA-F]{3}-?[0-9a-fA-F]{12}$
            example: ccb07f42-4104-44ad-8e1f-c660bb7b269c
          description: >
            A UUID to be used as an idempotency key.  This prevents a duplicate
            request from being replayed.

            https://docs.upvest.co/documentation/concepts/api_concepts/idempotency
      requestBody:
        content:
          application/json:
            schema:
              title: Payments - Bank Transaction - Create - Request
              type: object
              properties:
                account:
                  allOf:
                    - type: object
                      properties:
                        iban:
                          title: International Bank Account Number (IBAN)
                          type: string
                          description: >-
                            International Bank Account Number
                            [IBAN](https://en.wikipedia.org/wiki/International_Bank_Account_Number).
                          pattern: ^[A-Z]{2}[0-9]{2}[A-Z0-9]{11,26}$
                      required:
                        - iban
                      additionalProperties: false
                    - description: The Upvest account identification
                amount:
                  type: string
                  pattern: ^[0-9]{1,9}(\.[0-9]{2})?$
                currency:
                  title: Bank transaction currency
                  description: >-
                    Alphabetic three-letter [ISO
                    4217](https://en.wikipedia.org/wiki/ISO_4217) currency code
                  type: string
                  enum:
                    - EUR
                    - GBP
                    - USD
                    - JPY
                    - CHF
                remittance_information:
                  type: string
                  maxLength: 140
                  pattern: ^[0-9A-Za-z+?/\-:()\.,'; ]{0,140}$
                  description: >-
                    Information supplied to enable the matching/reconciliation
                    of an entry with the items that the payment is intended to
                    settle, such as commercial invoices in an accounts'
                    receivable system, in an unstructured form.
                client_reference:
                  type: string
                  maxLength: 35
                  pattern: ^[0-9A-Za-z+?/\-:()\.,'; ]{0,35}$
                  description: >-
                    Immutable reference to the API flow that initiated the
                    order. For client initiated API flows, this is a client
                    provided ID. For internal initiations, it is set to the ID
                    of the related object.
                counterparty_name:
                  type: string
                  maxLength: 140
                  pattern: ^[0-9A-Za-z+?/\-:()\.,'; ]{0,140}$
                  description: The counterparty account owner
                counterparty_account:
                  allOf:
                    - type: object
                      properties:
                        iban:
                          title: International Bank Account Number (IBAN)
                          type: string
                          description: >-
                            International Bank Account Number
                            [IBAN](https://en.wikipedia.org/wiki/International_Bank_Account_Number).
                          pattern: ^[A-Z]{2}[0-9]{2}[A-Z0-9]{11,26}$
                      required:
                        - iban
                      additionalProperties: false
                    - description: >-
                        Unambiguous identification of the account of the
                        counterparty of the bank transaction
                counterparty_agent:
                  allOf:
                    - type: object
                      properties:
                        bic:
                          title: Business Identifier Code
                          type: string
                          description: >-
                            Business Identifier Code (also known as SWIFT-BIC,
                            BIC, SWIFT ID or SWIFT code) [ISO
                            9362](https://en.wikipedia.org/wiki/ISO_9362).
                          pattern: ^[A-Z]{6}[A-Z0-9]{2}([A-Z0-9]{3})?$
                      required:
                        - bic
                      additionalProperties: false
                    - description: >-
                        Unambiguous identification of the agent of the
                        counterparty of the bank transaction
                virtual_bank_account_id:
                  allOf:
                    - title: Virtual bank account request unique identifier.
                      type: string
                      description: Virtual bank account request unique identifier.
                      format: uuid
                    - description: >-
                        The ID of the virtual bank account to which you want to
                        send the money.
              required:
                - account
                - amount
                - currency
                - client_reference
                - counterparty_name
                - counterparty_account
              additionalProperties: false
            example:
              account:
                iban: NL70ABNA0106295004
              amount: '13.37'
              currency: EUR
              client_reference: client-reference
              remittance_information: remittance-info
              counterparty_name: counterparty-name
              counterparty_account:
                iban: DE95500105173934555844
              counterparty_agent:
                bic: DEUTDEFF
              virtual_bank_account_id: f7b3b3b3-7b3b-4b3b-8b3b-3b3b3b3b3b3b
      responses:
        '200':
          description: Bank Transaction
          headers:
            upvest-request-id:
              required: true
              schema:
                type: string
                format: uuid
                example: 169ae4c7-ebd7-4041-94da-25369653eba7
          content:
            application/json:
              schema:
                title: Payments - Bank Transaction - Create - Response
                type: object
                properties:
                  id:
                    title: Bank transaction unique identifier
                    type: string
                    description: Bank transaction unique identifier
                    format: uuid
                  bank_reference:
                    type: string
                    description: >-
                      Bank reference of the bank transaction (created by the
                      bank to unambiguously identify the bank transaction in the
                      banks systems)
                required:
                  - id
                  - bank_reference
              example:
                id: 6ffa6b16-2380-4e7a-88b2-ae625c8eef99
                bank_reference: f2f0ef23-c68d-42c1-a744-8c86f471954b
        '400':
          description: Bad Request. The incoming request had a malformed parameter/object.
          headers:
            upvest-request-id:
              required: true
              schema:
                type: string
                format: uuid
                example: 169ae4c7-ebd7-4041-94da-25369653eba7
          content:
            application/problem+json:
              schema:
                title: Error
                type: object
                description: ''
                properties:
                  type:
                    type: string
                    description: URL to a document describing the error condition.
                  status:
                    type: integer
                    description: >-
                      Transmission of the HTTP status code so that all
                      information can be found in one place, but also to correct
                      changes in the status code due to the use of proxy
                      servers.
                  title:
                    type: string
                    description: >-
                      A short, human-readable title for the general error type;
                      the title should not change for given types.
                  detail:
                    type: string
                    description: A human-readable description of the specific error.
                  instance:
                    type: string
                    description: >-
                      This optional key may be present, with a unique URI for
                      the specific error; this will often point to an error log
                      for that specific response.
                  request_id:
                    type: string
                    description: Correlation ID for the original request.
                required:
                  - type
                  - status
                additionalProperties: false
              example:
                status: 400
                type: bad_request
        '401':
          description: Unauthorized. The caller has not been authenticated.
          headers:
            upvest-request-id:
              required: true
              schema:
                type: string
                format: uuid
                example: 169ae4c7-ebd7-4041-94da-25369653eba7
          content:
            application/problem+json:
              schema:
                title: Error
                type: object
                description: ''
                properties:
                  type:
                    type: string
                    description: URL to a document describing the error condition.
                  status:
                    type: integer
                    description: >-
                      Transmission of the HTTP status code so that all
                      information can be found in one place, but also to correct
                      changes in the status code due to the use of proxy
                      servers.
                  title:
                    type: string
                    description: >-
                      A short, human-readable title for the general error type;
                      the title should not change for given types.
                  detail:
                    type: string
                    description: A human-readable description of the specific error.
                  instance:
                    type: string
                    description: >-
                      This optional key may be present, with a unique URI for
                      the specific error; this will often point to an error log
                      for that specific response.
                  request_id:
                    type: string
                    description: Correlation ID for the original request.
                required:
                  - type
                  - status
                additionalProperties: false
              example:
                status: 401
                type: unauthorized
        '403':
          description: >-
            Forbidden. The caller has been authenticated but is not allowed to
            take the requested action.
          headers:
            upvest-request-id:
              required: true
              schema:
                type: string
                format: uuid
                example: 169ae4c7-ebd7-4041-94da-25369653eba7
          content:
            application/problem+json:
              schema:
                title: Error
                type: object
                description: ''
                properties:
                  type:
                    type: string
                    description: URL to a document describing the error condition.
                  status:
                    type: integer
                    description: >-
                      Transmission of the HTTP status code so that all
                      information can be found in one place, but also to correct
                      changes in the status code due to the use of proxy
                      servers.
                  title:
                    type: string
                    description: >-
                      A short, human-readable title for the general error type;
                      the title should not change for given types.
                  detail:
                    type: string
                    description: A human-readable description of the specific error.
                  instance:
                    type: string
                    description: >-
                      This optional key may be present, with a unique URI for
                      the specific error; this will often point to an error log
                      for that specific response.
                  request_id:
                    type: string
                    description: Correlation ID for the original request.
                required:
                  - type
                  - status
                additionalProperties: false
              example:
                status: 403
                type: forbidden
        '404':
          description: Not Found. The requested resource could not be found.
          headers:
            upvest-request-id:
              required: true
              schema:
                type: string
                format: uuid
                example: 169ae4c7-ebd7-4041-94da-25369653eba7
          content:
            application/problem+json:
              schema:
                title: Error
                type: object
                description: ''
                properties:
                  type:
                    type: string
                    description: URL to a document describing the error condition.
                  status:
                    type: integer
                    description: >-
                      Transmission of the HTTP status code so that all
                      information can be found in one place, but also to correct
                      changes in the status code due to the use of proxy
                      servers.
                  title:
                    type: string
                    description: >-
                      A short, human-readable title for the general error type;
                      the title should not change for given types.
                  detail:
                    type: string
                    description: A human-readable description of the specific error.
                  instance:
                    type: string
                    description: >-
                      This optional key may be present, with a unique URI for
                      the specific error; this will often point to an error log
                      for that specific response.
                  request_id:
                    type: string
                    description: Correlation ID for the original request.
                required:
                  - type
                  - status
                additionalProperties: false
              example:
                status: 404
                type: not_found
        '406':
          description: >-
            Not Acceptable. The resource does not have a current representation
            that would be acceptable to the user agent. "Accept" header defined
            unsupported value.
          headers:
            upvest-request-id:
              required: true
              schema:
                type: string
                format: uuid
                example: 169ae4c7-ebd7-4041-94da-25369653eba7
          content:
            application/problem+json:
              schema:
                title: Error
                type: object
                description: ''
                properties:
                  type:
                    type: string
                    description: URL to a document describing the error condition.
                  status:
                    type: integer
                    description: >-
                      Transmission of the HTTP status code so that all
                      information can be found in one place, but also to correct
                      changes in the status code due to the use of proxy
                      servers.
                  title:
                    type: string
                    description: >-
                      A short, human-readable title for the general error type;
                      the title should not change for given types.
                  detail:
                    type: string
                    description: A human-readable description of the specific error.
                  instance:
                    type: string
                    description: >-
                      This optional key may be present, with a unique URI for
                      the specific error; this will often point to an error log
                      for that specific response.
                  request_id:
                    type: string
                    description: Correlation ID for the original request.
                required:
                  - type
                  - status
                additionalProperties: false
              example:
                status: 406
                type: not_acceptable
        '429':
          description: >-
            Too Many Requests. The caller has exceeded their quota for the time
            period and has been throttled.
          headers:
            upvest-request-id:
              required: true
              schema:
                type: string
                format: uuid
                example: 169ae4c7-ebd7-4041-94da-25369653eba7
          content:
            application/problem+json:
              schema:
                title: Error
                type: object
                description: ''
                properties:
                  type:
                    type: string
                    description: URL to a document describing the error condition.
                  status:
                    type: integer
                    description: >-
                      Transmission of the HTTP status code so that all
                      information can be found in one place, but also to correct
                      changes in the status code due to the use of proxy
                      servers.
                  title:
                    type: string
                    description: >-
                      A short, human-readable title for the general error type;
                      the title should not change for given types.
                  detail:
                    type: string
                    description: A human-readable description of the specific error.
                  instance:
                    type: string
                    description: >-
                      This optional key may be present, with a unique URI for
                      the specific error; this will often point to an error log
                      for that specific response.
                  request_id:
                    type: string
                    description: Correlation ID for the original request.
                required:
                  - type
                  - status
                additionalProperties: false
              example:
                status: 429
                type: too_many_requests
        '500':
          description: Internal Server Error. The service encountered an unexpected error.
          headers:
            upvest-request-id:
              required: true
              schema:
                type: string
                format: uuid
                example: 169ae4c7-ebd7-4041-94da-25369653eba7
          content:
            application/problem+json:
              schema:
                title: Error
                type: object
                description: ''
                properties:
                  type:
                    type: string
                    description: URL to a document describing the error condition.
                  status:
                    type: integer
                    description: >-
                      Transmission of the HTTP status code so that all
                      information can be found in one place, but also to correct
                      changes in the status code due to the use of proxy
                      servers.
                  title:
                    type: string
                    description: >-
                      A short, human-readable title for the general error type;
                      the title should not change for given types.
                  detail:
                    type: string
                    description: A human-readable description of the specific error.
                  instance:
                    type: string
                    description: >-
                      This optional key may be present, with a unique URI for
                      the specific error; this will often point to an error log
                      for that specific response.
                  request_id:
                    type: string
                    description: Correlation ID for the original request.
                required:
                  - type
                  - status
                additionalProperties: false
              example:
                status: 500
                type: internal_server_error
        '503':
          description: >-
            Service Unavailable. The service handling for this request cannot be
            reached at this time.
          headers:
            upvest-request-id:
              required: true
              schema:
                type: string
                format: uuid
                example: 169ae4c7-ebd7-4041-94da-25369653eba7
          content:
            application/problem+json:
              schema:
                title: Error
                type: object
                description: ''
                properties:
                  type:
                    type: string
                    description: URL to a document describing the error condition.
                  status:
                    type: integer
                    description: >-
                      Transmission of the HTTP status code so that all
                      information can be found in one place, but also to correct
                      changes in the status code due to the use of proxy
                      servers.
                  title:
                    type: string
                    description: >-
                      A short, human-readable title for the general error type;
                      the title should not change for given types.
                  detail:
                    type: string
                    description: A human-readable description of the specific error.
                  instance:
                    type: string
                    description: >-
                      This optional key may be present, with a unique URI for
                      the specific error; this will often point to an error log
                      for that specific response.
                  request_id:
                    type: string
                    description: Correlation ID for the original request.
                required:
                  - type
                  - status
                additionalProperties: false
              example:
                status: 503
                type: method_not_allowed
        '504':
          description: >-
            Gateway Timeout. The service gateway has reached its internal
            timeout.
          headers:
            upvest-request-id:
              required: true
              schema:
                type: string
                format: uuid
                example: 169ae4c7-ebd7-4041-94da-25369653eba7
          content:
            application/problem+json:
              schema:
                title: Error
                type: object
                description: ''
                properties:
                  type:
                    type: string
                    description: URL to a document describing the error condition.
                  status:
                    type: integer
                    description: >-
                      Transmission of the HTTP status code so that all
                      information can be found in one place, but also to correct
                      changes in the status code due to the use of proxy
                      servers.
                  title:
                    type: string
                    description: >-
                      A short, human-readable title for the general error type;
                      the title should not change for given types.
                  detail:
                    type: string
                    description: A human-readable description of the specific error.
                  instance:
                    type: string
                    description: >-
                      This optional key may be present, with a unique URI for
                      the specific error; this will often point to an error log
                      for that specific response.
                  request_id:
                    type: string
                    description: Correlation ID for the original request.
                required:
                  - type
                  - status
                additionalProperties: false
              example:
                status: 504
                type: gateway_timeout
x-webhooks:
  Instruments events:
    post:
      operationId: instrument_event
      summary: Instruments events
      description: Instruments events
      tags:
        - Instruments
      requestBody:
        content:
          application/json:
            schema:
              title: Webhook - Instruments - Callback
              type: object
              properties:
                id:
                  type: string
                  format: uuid
                  description: Event unique identifier
                created_at:
                  type: string
                  format: date-time
                  description: >-
                    Date and time when the event was created. [RFC
                    3339-5](https://datatracker.ietf.org/doc/html/rfc3339#section-5.6),
                    [ISO8601
                    UTC](https://www.iso.org/iso-8601-date-and-time-format.html)
                type:
                  type: string
                  description: Event type
                  enum:
                    - INSTRUMENT.ONBOARDED
                    - INSTRUMENT.ACTIVATED
                    - INSTRUMENT.DEACTIVATED
                    - INSTRUMENT.FRACTIONAL_TRADING_ENABLED
                    - INSTRUMENT.FRACTIONAL_TRADING_DISABLED
                    - INSTRUMENT.DATA_CHANGED
                object:
                  type: object
                  properties:
                    id:
                      title: Instrument unique identifier.
                      type: string
                      description: Instrument unique identifier.
                      format: uuid
                    created_at:
                      type: string
                      format: date-time
                      description: >-
                        Date and time when the resource was created. [RFC
                        3339-5](https://datatracker.ietf.org/doc/html/rfc3339#section-5.6),
                        [ISO8601
                        UTC](https://www.iso.org/iso-8601-date-and-time-format.html)
                    updated_at:
                      type: string
                      format: date-time
                      description: >-
                        Date and time when the resource was last updated. [RFC
                        3339-5](https://datatracker.ietf.org/doc/html/rfc3339#section-5.6),
                        [ISO8601
                        UTC](https://www.iso.org/iso-8601-date-and-time-format.html)
                    isin:
                      title: International securities identification number
                      type: string
                      description: >-
                        International securities identification number defined
                        by [ISO
                        6166](https://en.wikipedia.org/wiki/International_Securities_Identification_Number).
                      pattern: ^[A-Z]{2}[A-Z0-9]{9}[0-9]$
                    wkn:
                      title: German securities identification code
                      type: string
                      description: >-
                        German securities identification code known as
                        [Wertpapierkennnummer](https://en.wikipedia.org/wiki/Wertpapierkennnummer).
                      pattern: ^[A-HJ-NP-Z0-9]{6}$
                    name:
                      description: Instrument name
                      type: string
                      maxLength: 100
                    fractional_trading:
                      type: boolean
                      description: >-
                        Determines whether the platform can handle fractional
                        investments within this instrument.
                    trading_status:
                      title: Instrument trading status
                      description: >-
                        Instrument trading status

                        * ACTIVE - The instrument can currently be traded on the
                        Upvest platform. 

                        * INACTIVE - The instrument cannot currently be traded
                        on the Upvest platform.
                      type: string
                      enum:
                        - ACTIVE
                        - INACTIVE
                    details:
                      title: Details
                      type: object
                      description: Details
                      properties:
                        distribution_countries:
                          title: Distribution Countries
                          description: Distribution Countries
                          type: array
                          items:
                            description: >-
                              Country code. [ISO 3166 alpha-2
                              Codes](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2).
                            type: string
                            pattern: ^[A-Z]{2}$
                  required:
                    - id
                    - name
                    - fractional_trading
                    - trading_status
                    - created_at
                    - updated_at
                  additionalProperties: false
                webhook_id:
                  title: Webhook ID
                  type: string
                  description: Webhook unique identifier.
                  format: uuid
              required:
                - id
                - created_at
                - type
                - object
                - webhook_id
              additionalProperties: false
            example:
              id: de4e9e75-5c74-44c7-b741-9b3e0d85f4de
              created_at: '2022-08-31T17:28:00.00Z'
              type: INSTRUMENT.ACTIVATED
              object:
                id: 123e4567-e89b-12d3-a456-426614174000
                created_at: '2022-03-31T17:28:00.00Z'
                updated_at: '2022-08-31T17:28:00.00Z'
                isin: DE0007664005
                wkn: '766400'
                name: Volkswagen (VW) St. Aktie.
                fractional_trading: true
                trading_status: ACTIVE
              webhook_id: 0af63506-289c-4051-8859-4e17ec89b002
      responses:
        '200':
          description: Request has been processed successfully.
  Users events:
    post:
      operationId: user_event
      summary: Users events
      description: Users events
      tags:
        - Users
      requestBody:
        content:
          application/json:
            schema:
              title: Webhook - Users - Callback
              type: object
              properties:
                id:
                  type: string
                  format: uuid
                  description: Event unique identifier
                created_at:
                  type: string
                  format: date-time
                  description: >-
                    Date and time when the event was created. [RFC
                    3339-5](https://datatracker.ietf.org/doc/html/rfc3339#section-5.6),
                    [ISO8601
                    UTC](https://www.iso.org/iso-8601-date-and-time-format.html)
                type:
                  type: string
                  description: Event type
                  enum:
                    - USER.CREATED
                    - USER.ACTIVATED
                    - USER.DEACTIVATED
                    - USER.DATA_CHANGED
                    - USER.DATA_CHANGE_FAILED
                    - USER.OFFBOARDING_INITIATED
                    - USER.OFFBOARDED
                object:
                  oneOf:
                    - anyOf:
                        - title: User (BYOL)
                          type: object
                          properties:
                            id:
                              title: User unique identifier.
                              type: string
                              description: User unique identifier.
                              format: uuid
                            created_at:
                              type: string
                              format: date-time
                              description: >-
                                Date and time when the resource was created.
                                [RFC
                                3339-5](https://datatracker.ietf.org/doc/html/rfc3339#section-5.6),
                                [ISO8601
                                UTC](https://www.iso.org/iso-8601-date-and-time-format.html)
                            updated_at:
                              type: string
                              format: date-time
                              description: >-
                                Date and time when the resource was last
                                updated. [RFC
                                3339-5](https://datatracker.ietf.org/doc/html/rfc3339#section-5.6),
                                [ISO8601
                                UTC](https://www.iso.org/iso-8601-date-and-time-format.html)
                            first_name:
                              type: string
                              maxLength: 100
                              minLength: 2
                              description: >-
                                First name(s) of the user. Please include all
                                first and middle names of the user.
                            last_name:
                              type: string
                              maxLength: 100
                              minLength: 1
                              description: Last name of the user.
                            salutation:
                              type: string
                              description: >-
                                Salutation of the user used in reports and
                                statements.

                                * (empty string) - 

                                * SALUTATION_MALE - 

                                * SALUTATION_FEMALE - 

                                * SALUTATION_FEMALE_MARRIED - 

                                * SALUTATION_DIVERSE - 
                              enum:
                                - ''
                                - SALUTATION_MALE
                                - SALUTATION_FEMALE
                                - SALUTATION_FEMALE_MARRIED
                                - SALUTATION_DIVERSE
                              default: ''
                            title:
                              type: string
                              description: >-
                                Title of the user used in reports and
                                statements.

                                * (empty string) - 

                                * DR - Doctor

                                * PROF - Professor

                                * PROF_DR - 

                                * DIPL_ING - Graduate engineer
                                (Diplom-Ingenieur)

                                * MAGISTER - 
                              enum:
                                - ''
                                - DR
                                - PROF
                                - PROF_DR
                                - DIPL_ING
                                - MAGISTER
                              default: ''
                            birth_date:
                              type: string
                              format: date
                              description: >-
                                Birth date of the user in YYYY-MM-DD format.
                                [RFC 3339, section
                                5.6](https://json-schema.org/draft/2020-12/json-schema-validation.html#RFC3339)
                            birth_city:
                              title: City name
                              type: string
                              minLength: 1
                              maxLength: 85
                            birth_country:
                              description: >-
                                Accepted country code. [ISO 3166-1 alpha-2
                                codes](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2).
                              type: string
                              enum:
                                - AD
                                - AE
                                - AF
                                - AG
                                - AI
                                - AL
                                - AM
                                - AO
                                - AQ
                                - AR
                                - AS
                                - AT
                                - AU
                                - AW
                                - AX
                                - AZ
                                - BA
                                - BB
                                - BD
                                - BE
                                - BF
                                - BG
                                - BH
                                - BI
                                - BJ
                                - BL
                                - BM
                                - BN
                                - BO
                                - BQ
                                - BR
                                - BS
                                - BT
                                - BV
                                - BW
                                - BY
                                - BZ
                                - CA
                                - CC
                                - CD
                                - CF
                                - CG
                                - CH
                                - CI
                                - CK
                                - CL
                                - CM
                                - CN
                                - CO
                                - CR
                                - CU
                                - CV
                                - CW
                                - CX
                                - CY
                                - CZ
                                - DE
                                - DJ
                                - DK
                                - DM
                                - DO
                                - DZ
                                - EC
                                - EE
                                - EG
                                - EH
                                - ER
                                - ES
                                - ET
                                - FI
                                - FJ
                                - FK
                                - FM
                                - FO
                                - FR
                                - GA
                                - GB
                                - GD
                                - GE
                                - GF
                                - GG
                                - GH
                                - GI
                                - GL
                                - GM
                                - GN
                                - GP
                                - GQ
                                - GR
                                - GS
                                - GT
                                - GU
                                - GW
                                - GY
                                - HK
                                - HM
                                - HN
                                - HR
                                - HT
                                - HU
                                - ID
                                - IE
                                - IL
                                - IM
                                - IN
                                - IO
                                - IQ
                                - IR
                                - IS
                                - IT
                                - JE
                                - JM
                                - JO
                                - JP
                                - KE
                                - KG
                                - KH
                                - KI
                                - KM
                                - KN
                                - KP
                                - KR
                                - KW
                                - KY
                                - KZ
                                - LA
                                - LB
                                - LC
                                - LI
                                - LK
                                - LR
                                - LS
                                - LT
                                - LU
                                - LV
                                - LY
                                - MA
                                - MC
                                - MD
                                - ME
                                - MF
                                - MG
                                - MH
                                - MK
                                - ML
                                - MM
                                - MN
                                - MO
                                - MP
                                - MQ
                                - MR
                                - MS
                                - MT
                                - MU
                                - MV
                                - MW
                                - MX
                                - MY
                                - MZ
                                - NA
                                - NC
                                - NE
                                - NF
                                - NG
                                - NI
                                - NL
                                - 'NO'
                                - NP
                                - NR
                                - NU
                                - NZ
                                - OM
                                - PA
                                - PE
                                - PF
                                - PG
                                - PH
                                - PK
                                - PL
                                - PM
                                - PN
                                - PR
                                - PS
                                - PT
                                - PW
                                - PY
                                - QA
                                - RE
                                - RO
                                - RS
                                - RU
                                - RW
                                - SA
                                - SB
                                - SC
                                - SD
                                - SE
                                - SG
                                - SH
                                - SI
                                - SJ
                                - SK
                                - SL
                                - SM
                                - SN
                                - SO
                                - SR
                                - SS
                                - ST
                                - SV
                                - SX
                                - SY
                                - SZ
                                - TC
                                - TD
                                - TF
                                - TG
                                - TH
                                - TJ
                                - TK
                                - TL
                                - TM
                                - TN
                                - TO
                                - TR
                                - TT
                                - TV
                                - TW
                                - TZ
                                - UA
                                - UG
                                - UM
                                - US
                                - UY
                                - UZ
                                - VA
                                - VC
                                - VE
                                - VG
                                - VI
                                - VN
                                - VU
                                - WF
                                - WS
                                - XK
                                - YE
                                - YT
                                - ZA
                                - ZM
                                - ZW
                            birth_name:
                              type: string
                              maxLength: 100
                              description: If applicable, birth name of the user.
                            nationalities:
                              type: array
                              items:
                                description: >-
                                  Accepted country code. [ISO 3166-1 alpha-2
                                  codes](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2).
                                type: string
                                enum:
                                  - AD
                                  - AE
                                  - AF
                                  - AG
                                  - AI
                                  - AL
                                  - AM
                                  - AO
                                  - AQ
                                  - AR
                                  - AS
                                  - AT
                                  - AU
                                  - AW
                                  - AX
                                  - AZ
                                  - BA
                                  - BB
                                  - BD
                                  - BE
                                  - BF
                                  - BG
                                  - BH
                                  - BI
                                  - BJ
                                  - BL
                                  - BM
                                  - BN
                                  - BO
                                  - BQ
                                  - BR
                                  - BS
                                  - BT
                                  - BV
                                  - BW
                                  - BY
                                  - BZ
                                  - CA
                                  - CC
                                  - CD
                                  - CF
                                  - CG
                                  - CH
                                  - CI
                                  - CK
                                  - CL
                                  - CM
                                  - CN
                                  - CO
                                  - CR
                                  - CU
                                  - CV
                                  - CW
                                  - CX
                                  - CY
                                  - CZ
                                  - DE
                                  - DJ
                                  - DK
                                  - DM
                                  - DO
                                  - DZ
                                  - EC
                                  - EE
                                  - EG
                                  - EH
                                  - ER
                                  - ES
                                  - ET
                                  - FI
                                  - FJ
                                  - FK
                                  - FM
                                  - FO
                                  - FR
                                  - GA
                                  - GB
                                  - GD
                                  - GE
                                  - GF
                                  - GG
                                  - GH
                                  - GI
                                  - GL
                                  - GM
                                  - GN
                                  - GP
                                  - GQ
                                  - GR
                                  - GS
                                  - GT
                                  - GU
                                  - GW
                                  - GY
                                  - HK
                                  - HM
                                  - HN
                                  - HR
                                  - HT
                                  - HU
                                  - ID
                                  - IE
                                  - IL
                                  - IM
                                  - IN
                                  - IO
                                  - IQ
                                  - IR
                                  - IS
                                  - IT
                                  - JE
                                  - JM
                                  - JO
                                  - JP
                                  - KE
                                  - KG
                                  - KH
                                  - KI
                                  - KM
                                  - KN
                                  - KP
                                  - KR
                                  - KW
                                  - KY
                                  - KZ
                                  - LA
                                  - LB
                                  - LC
                                  - LI
                                  - LK
                                  - LR
                                  - LS
                                  - LT
                                  - LU
                                  - LV
                                  - LY
                                  - MA
                                  - MC
                                  - MD
                                  - ME
                                  - MF
                                  - MG
                                  - MH
                                  - MK
                                  - ML
                                  - MM
                                  - MN
                                  - MO
                                  - MP
                                  - MQ
                                  - MR
                                  - MS
                                  - MT
                                  - MU
                                  - MV
                                  - MW
                                  - MX
                                  - MY
                                  - MZ
                                  - NA
                                  - NC
                                  - NE
                                  - NF
                                  - NG
                                  - NI
                                  - NL
                                  - 'NO'
                                  - NP
                                  - NR
                                  - NU
                                  - NZ
                                  - OM
                                  - PA
                                  - PE
                                  - PF
                                  - PG
                                  - PH
                                  - PK
                                  - PL
                                  - PM
                                  - PN
                                  - PR
                                  - PS
                                  - PT
                                  - PW
                                  - PY
                                  - QA
                                  - RE
                                  - RO
                                  - RS
                                  - RU
                                  - RW
                                  - SA
                                  - SB
                                  - SC
                                  - SD
                                  - SE
                                  - SG
                                  - SH
                                  - SI
                                  - SJ
                                  - SK
                                  - SL
                                  - SM
                                  - SN
                                  - SO
                                  - SR
                                  - SS
                                  - ST
                                  - SV
                                  - SX
                                  - SY
                                  - SZ
                                  - TC
                                  - TD
                                  - TF
                                  - TG
                                  - TH
                                  - TJ
                                  - TK
                                  - TL
                                  - TM
                                  - TN
                                  - TO
                                  - TR
                                  - TT
                                  - TV
                                  - TW
                                  - TZ
                                  - UA
                                  - UG
                                  - UM
                                  - US
                                  - UY
                                  - UZ
                                  - VA
                                  - VC
                                  - VE
                                  - VG
                                  - VI
                                  - VN
                                  - VU
                                  - WF
                                  - WS
                                  - XK
                                  - YE
                                  - YT
                                  - ZA
                                  - ZM
                                  - ZW
                              minItems: 1
                              description: >-
                                Nationalities of the user. [ISO 3166 alpha-2
                                Codes](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2).
                            address:
                              title: Address
                              type: object
                              description: Address. Must not be a P.O. box or c/o address.
                              properties:
                                address_line1:
                                  type: string
                                  description: First address line of the address.
                                  maxLength: 100
                                address_line2:
                                  type: string
                                  description: Second address line of the address.
                                  maxLength: 100
                                postcode:
                                  title: Postal code
                                  type: string
                                  description: Postal code (postcode, PIN or ZIP code)
                                  pattern: >-
                                    ^[a-zA-Z0-9][a-zA-Z0-9\s\-]{0,8}[a-zA-Z0-9]?$
                                country:
                                  description: >-
                                    Accepted country code. [ISO 3166-1 alpha-2
                                    codes](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2).
                                  type: string
                                  enum:
                                    - AD
                                    - AE
                                    - AF
                                    - AG
                                    - AI
                                    - AL
                                    - AM
                                    - AO
                                    - AQ
                                    - AR
                                    - AS
                                    - AT
                                    - AU
                                    - AW
                                    - AX
                                    - AZ
                                    - BA
                                    - BB
                                    - BD
                                    - BE
                                    - BF
                                    - BG
                                    - BH
                                    - BI
                                    - BJ
                                    - BL
                                    - BM
                                    - BN
                                    - BO
                                    - BQ
                                    - BR
                                    - BS
                                    - BT
                                    - BV
                                    - BW
                                    - BY
                                    - BZ
                                    - CA
                                    - CC
                                    - CD
                                    - CF
                                    - CG
                                    - CH
                                    - CI
                                    - CK
                                    - CL
                                    - CM
                                    - CN
                                    - CO
                                    - CR
                                    - CU
                                    - CV
                                    - CW
                                    - CX
                                    - CY
                                    - CZ
                                    - DE
                                    - DJ
                                    - DK
                                    - DM
                                    - DO
                                    - DZ
                                    - EC
                                    - EE
                                    - EG
                                    - EH
                                    - ER
                                    - ES
                                    - ET
                                    - FI
                                    - FJ
                                    - FK
                                    - FM
                                    - FO
                                    - FR
                                    - GA
                                    - GB
                                    - GD
                                    - GE
                                    - GF
                                    - GG
                                    - GH
                                    - GI
                                    - GL
                                    - GM
                                    - GN
                                    - GP
                                    - GQ
                                    - GR
                                    - GS
                                    - GT
                                    - GU
                                    - GW
                                    - GY
                                    - HK
                                    - HM
                                    - HN
                                    - HR
                                    - HT
                                    - HU
                                    - ID
                                    - IE
                                    - IL
                                    - IM
                                    - IN
                                    - IO
                                    - IQ
                                    - IR
                                    - IS
                                    - IT
                                    - JE
                                    - JM
                                    - JO
                                    - JP
                                    - KE
                                    - KG
                                    - KH
                                    - KI
                                    - KM
                                    - KN
                                    - KP
                                    - KR
                                    - KW
                                    - KY
                                    - KZ
                                    - LA
                                    - LB
                                    - LC
                                    - LI
                                    - LK
                                    - LR
                                    - LS
                                    - LT
                                    - LU
                                    - LV
                                    - LY
                                    - MA
                                    - MC
                                    - MD
                                    - ME
                                    - MF
                                    - MG
                                    - MH
                                    - MK
                                    - ML
                                    - MM
                                    - MN
                                    - MO
                                    - MP
                                    - MQ
                                    - MR
                                    - MS
                                    - MT
                                    - MU
                                    - MV
                                    - MW
                                    - MX
                                    - MY
                                    - MZ
                                    - NA
                                    - NC
                                    - NE
                                    - NF
                                    - NG
                                    - NI
                                    - NL
                                    - 'NO'
                                    - NP
                                    - NR
                                    - NU
                                    - NZ
                                    - OM
                                    - PA
                                    - PE
                                    - PF
                                    - PG
                                    - PH
                                    - PK
                                    - PL
                                    - PM
                                    - PN
                                    - PR
                                    - PS
                                    - PT
                                    - PW
                                    - PY
                                    - QA
                                    - RE
                                    - RO
                                    - RS
                                    - RU
                                    - RW
                                    - SA
                                    - SB
                                    - SC
                                    - SD
                                    - SE
                                    - SG
                                    - SH
                                    - SI
                                    - SJ
                                    - SK
                                    - SL
                                    - SM
                                    - SN
                                    - SO
                                    - SR
                                    - SS
                                    - ST
                                    - SV
                                    - SX
                                    - SY
                                    - SZ
                                    - TC
                                    - TD
                                    - TF
                                    - TG
                                    - TH
                                    - TJ
                                    - TK
                                    - TL
                                    - TM
                                    - TN
                                    - TO
                                    - TR
                                    - TT
                                    - TV
                                    - TW
                                    - TZ
                                    - UA
                                    - UG
                                    - UM
                                    - US
                                    - UY
                                    - UZ
                                    - VA
                                    - VC
                                    - VE
                                    - VG
                                    - VI
                                    - VN
                                    - VU
                                    - WF
                                    - WS
                                    - XK
                                    - YE
                                    - YT
                                    - ZA
                                    - ZM
                                    - ZW
                                state:
                                  description: >-
                                    State, province, county. [ISO 3166 alpha-2
                                    Codes](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2).
                                  type: string
                                  maxLength: 50
                                city:
                                  title: City name
                                  type: string
                                  minLength: 1
                                  maxLength: 85
                              required:
                                - address_line1
                                - postcode
                                - country
                                - city
                            postal_address:
                              description: >-
                                User postal address. Needs to be specified if
                                different to the residential address, otherwise
                                it is automatically populated.
                              oneOf:
                                - title: Address
                                  type: object
                                  description: >-
                                    Address. Must not be a P.O. box or c/o
                                    address.
                                  properties:
                                    address_line1:
                                      type: string
                                      description: First address line of the address.
                                      maxLength: 100
                                    address_line2:
                                      type: string
                                      description: Second address line of the address.
                                      maxLength: 100
                                    postcode:
                                      title: Postal code
                                      type: string
                                      description: Postal code (postcode, PIN or ZIP code)
                                      pattern: >-
                                        ^[a-zA-Z0-9][a-zA-Z0-9\s\-]{0,8}[a-zA-Z0-9]?$
                                    country:
                                      description: >-
                                        Accepted country code. [ISO 3166-1
                                        alpha-2
                                        codes](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2).
                                      type: string
                                      enum:
                                        - AD
                                        - AE
                                        - AF
                                        - AG
                                        - AI
                                        - AL
                                        - AM
                                        - AO
                                        - AQ
                                        - AR
                                        - AS
                                        - AT
                                        - AU
                                        - AW
                                        - AX
                                        - AZ
                                        - BA
                                        - BB
                                        - BD
                                        - BE
                                        - BF
                                        - BG
                                        - BH
                                        - BI
                                        - BJ
                                        - BL
                                        - BM
                                        - BN
                                        - BO
                                        - BQ
                                        - BR
                                        - BS
                                        - BT
                                        - BV
                                        - BW
                                        - BY
                                        - BZ
                                        - CA
                                        - CC
                                        - CD
                                        - CF
                                        - CG
                                        - CH
                                        - CI
                                        - CK
                                        - CL
                                        - CM
                                        - CN
                                        - CO
                                        - CR
                                        - CU
                                        - CV
                                        - CW
                                        - CX
                                        - CY
                                        - CZ
                                        - DE
                                        - DJ
                                        - DK
                                        - DM
                                        - DO
                                        - DZ
                                        - EC
                                        - EE
                                        - EG
                                        - EH
                                        - ER
                                        - ES
                                        - ET
                                        - FI
                                        - FJ
                                        - FK
                                        - FM
                                        - FO
                                        - FR
                                        - GA
                                        - GB
                                        - GD
                                        - GE
                                        - GF
                                        - GG
                                        - GH
                                        - GI
                                        - GL
                                        - GM
                                        - GN
                                        - GP
                                        - GQ
                                        - GR
                                        - GS
                                        - GT
                                        - GU
                                        - GW
                                        - GY
                                        - HK
                                        - HM
                                        - HN
                                        - HR
                                        - HT
                                        - HU
                                        - ID
                                        - IE
                                        - IL
                                        - IM
                                        - IN
                                        - IO
                                        - IQ
                                        - IR
                                        - IS
                                        - IT
                                        - JE
                                        - JM
                                        - JO
                                        - JP
                                        - KE
                                        - KG
                                        - KH
                                        - KI
                                        - KM
                                        - KN
                                        - KP
                                        - KR
                                        - KW
                                        - KY
                                        - KZ
                                        - LA
                                        - LB
                                        - LC
                                        - LI
                                        - LK
                                        - LR
                                        - LS
                                        - LT
                                        - LU
                                        - LV
                                        - LY
                                        - MA
                                        - MC
                                        - MD
                                        - ME
                                        - MF
                                        - MG
                                        - MH
                                        - MK
                                        - ML
                                        - MM
                                        - MN
                                        - MO
                                        - MP
                                        - MQ
                                        - MR
                                        - MS
                                        - MT
                                        - MU
                                        - MV
                                        - MW
                                        - MX
                                        - MY
                                        - MZ
                                        - NA
                                        - NC
                                        - NE
                                        - NF
                                        - NG
                                        - NI
                                        - NL
                                        - 'NO'
                                        - NP
                                        - NR
                                        - NU
                                        - NZ
                                        - OM
                                        - PA
                                        - PE
                                        - PF
                                        - PG
                                        - PH
                                        - PK
                                        - PL
                                        - PM
                                        - PN
                                        - PR
                                        - PS
                                        - PT
                                        - PW
                                        - PY
                                        - QA
                                        - RE
                                        - RO
                                        - RS
                                        - RU
                                        - RW
                                        - SA
                                        - SB
                                        - SC
                                        - SD
                                        - SE
                                        - SG
                                        - SH
                                        - SI
                                        - SJ
                                        - SK
                                        - SL
                                        - SM
                                        - SN
                                        - SO
                                        - SR
                                        - SS
                                        - ST
                                        - SV
                                        - SX
                                        - SY
                                        - SZ
                                        - TC
                                        - TD
                                        - TF
                                        - TG
                                        - TH
                                        - TJ
                                        - TK
                                        - TL
                                        - TM
                                        - TN
                                        - TO
                                        - TR
                                        - TT
                                        - TV
                                        - TW
                                        - TZ
                                        - UA
                                        - UG
                                        - UM
                                        - US
                                        - UY
                                        - UZ
                                        - VA
                                        - VC
                                        - VE
                                        - VG
                                        - VI
                                        - VN
                                        - VU
                                        - WF
                                        - WS
                                        - XK
                                        - YE
                                        - YT
                                        - ZA
                                        - ZM
                                        - ZW
                                    state:
                                      description: >-
                                        State, province, county. [ISO 3166
                                        alpha-2
                                        Codes](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2).
                                      type: string
                                      maxLength: 50
                                    city:
                                      title: City name
                                      type: string
                                      minLength: 1
                                      maxLength: 85
                                  required:
                                    - address_line1
                                    - postcode
                                    - country
                                    - city
                                - type: 'null'
                            status:
                              type: string
                              description: |-
                                Status of the user.
                                * ACTIVE - 
                                * INACTIVE - 
                                * OFFBOARDING - 
                                * OFFBOARDED - 
                              enum:
                                - ACTIVE
                                - INACTIVE
                                - OFFBOARDING
                                - OFFBOARDED
                            branch_id:
                              title: Branch unique identifier.
                              type: string
                              description: >-
                                Unique identifier of the market the user is
                                onboarded on. Only relevant if the client is
                                operating in different markets and the client is
                                configured accordingly
                              format: uuid
                          required:
                            - id
                            - created_at
                            - updated_at
                            - first_name
                            - last_name
                            - birth_date
                            - nationalities
                            - address
                            - status
                          additionalProperties: false
                        - title: User (TOL)
                          type: object
                          properties:
                            id:
                              title: User unique identifier.
                              type: string
                              description: User unique identifier.
                              format: uuid
                            created_at:
                              type: string
                              format: date-time
                              description: >-
                                Date and time when the resource was created.
                                [RFC
                                3339-5](https://datatracker.ietf.org/doc/html/rfc3339#section-5.6),
                                [ISO8601
                                UTC](https://www.iso.org/iso-8601-date-and-time-format.html)
                            updated_at:
                              type: string
                              format: date-time
                              description: >-
                                Date and time when the resource was last
                                updated. [RFC
                                3339-5](https://datatracker.ietf.org/doc/html/rfc3339#section-5.6),
                                [ISO8601
                                UTC](https://www.iso.org/iso-8601-date-and-time-format.html)
                            first_name:
                              type: string
                              maxLength: 100
                              minLength: 2
                              description: >-
                                First name(s) of the user. Please include all
                                first and middle names of the user.
                            last_name:
                              type: string
                              maxLength: 100
                              minLength: 1
                              description: Last name of the user.
                            salutation:
                              type: string
                              description: >-
                                Salutation of the user used in reports and
                                statements.

                                * (empty string) - 

                                * SALUTATION_MALE - 

                                * SALUTATION_FEMALE - 

                                * SALUTATION_FEMALE_MARRIED - 

                                * SALUTATION_DIVERSE - 
                              enum:
                                - ''
                                - SALUTATION_MALE
                                - SALUTATION_FEMALE
                                - SALUTATION_FEMALE_MARRIED
                                - SALUTATION_DIVERSE
                              default: ''
                            title:
                              type: string
                              description: >-
                                Title of the user used in reports and
                                statements.

                                * (empty string) - 

                                * DR - Doctor

                                * PROF - Professor

                                * PROF_DR - 

                                * DIPL_ING - Graduate engineer
                                (Diplom-Ingenieur)

                                * MAGISTER - 
                              enum:
                                - ''
                                - DR
                                - PROF
                                - PROF_DR
                                - DIPL_ING
                                - MAGISTER
                              default: ''
                            birth_date:
                              type: string
                              format: date
                              description: >-
                                Birth date of the user in YYYY-MM-DD format.
                                [RFC 3339, section
                                5.6](https://json-schema.org/draft/2020-12/json-schema-validation.html#RFC3339)
                            birth_city:
                              title: City name
                              type: string
                              minLength: 1
                              maxLength: 85
                            birth_country:
                              description: >-
                                Accepted country code. [ISO 3166-1 alpha-2
                                codes](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2).
                              type: string
                              enum:
                                - AD
                                - AE
                                - AF
                                - AG
                                - AI
                                - AL
                                - AM
                                - AO
                                - AQ
                                - AR
                                - AS
                                - AT
                                - AU
                                - AW
                                - AX
                                - AZ
                                - BA
                                - BB
                                - BD
                                - BE
                                - BF
                                - BG
                                - BH
                                - BI
                                - BJ
                                - BL
                                - BM
                                - BN
                                - BO
                                - BQ
                                - BR
                                - BS
                                - BT
                                - BV
                                - BW
                                - BY
                                - BZ
                                - CA
                                - CC
                                - CD
                                - CF
                                - CG
                                - CH
                                - CI
                                - CK
                                - CL
                                - CM
                                - CN
                                - CO
                                - CR
                                - CU
                                - CV
                                - CW
                                - CX
                                - CY
                                - CZ
                                - DE
                                - DJ
                                - DK
                                - DM
                                - DO
                                - DZ
                                - EC
                                - EE
                                - EG
                                - EH
                                - ER
                                - ES
                                - ET
                                - FI
                                - FJ
                                - FK
                                - FM
                                - FO
                                - FR
                                - GA
                                - GB
                                - GD
                                - GE
                                - GF
                                - GG
                                - GH
                                - GI
                                - GL
                                - GM
                                - GN
                                - GP
                                - GQ
                                - GR
                                - GS
                                - GT
                                - GU
                                - GW
                                - GY
                                - HK
                                - HM
                                - HN
                                - HR
                                - HT
                                - HU
                                - ID
                                - IE
                                - IL
                                - IM
                                - IN
                                - IO
                                - IQ
                                - IR
                                - IS
                                - IT
                                - JE
                                - JM
                                - JO
                                - JP
                                - KE
                                - KG
                                - KH
                                - KI
                                - KM
                                - KN
                                - KP
                                - KR
                                - KW
                                - KY
                                - KZ
                                - LA
                                - LB
                                - LC
                                - LI
                                - LK
                                - LR
                                - LS
                                - LT
                                - LU
                                - LV
                                - LY
                                - MA
                                - MC
                                - MD
                                - ME
                                - MF
                                - MG
                                - MH
                                - MK
                                - ML
                                - MM
                                - MN
                                - MO
                                - MP
                                - MQ
                                - MR
                                - MS
                                - MT
                                - MU
                                - MV
                                - MW
                                - MX
                                - MY
                                - MZ
                                - NA
                                - NC
                                - NE
                                - NF
                                - NG
                                - NI
                                - NL
                                - 'NO'
                                - NP
                                - NR
                                - NU
                                - NZ
                                - OM
                                - PA
                                - PE
                                - PF
                                - PG
                                - PH
                                - PK
                                - PL
                                - PM
                                - PN
                                - PR
                                - PS
                                - PT
                                - PW
                                - PY
                                - QA
                                - RE
                                - RO
                                - RS
                                - RU
                                - RW
                                - SA
                                - SB
                                - SC
                                - SD
                                - SE
                                - SG
                                - SH
                                - SI
                                - SJ
                                - SK
                                - SL
                                - SM
                                - SN
                                - SO
                                - SR
                                - SS
                                - ST
                                - SV
                                - SX
                                - SY
                                - SZ
                                - TC
                                - TD
                                - TF
                                - TG
                                - TH
                                - TJ
                                - TK
                                - TL
                                - TM
                                - TN
                                - TO
                                - TR
                                - TT
                                - TV
                                - TW
                                - TZ
                                - UA
                                - UG
                                - UM
                                - US
                                - UY
                                - UZ
                                - VA
                                - VC
                                - VE
                                - VG
                                - VI
                                - VN
                                - VU
                                - WF
                                - WS
                                - XK
                                - YE
                                - YT
                                - ZA
                                - ZM
                                - ZW
                            birth_name:
                              type: string
                              maxLength: 100
                              description: If applicable, birth name of the user.
                            nationalities:
                              type: array
                              items:
                                description: >-
                                  Accepted country code. [ISO 3166-1 alpha-2
                                  codes](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2).
                                type: string
                                enum:
                                  - AD
                                  - AE
                                  - AF
                                  - AG
                                  - AI
                                  - AL
                                  - AM
                                  - AO
                                  - AQ
                                  - AR
                                  - AS
                                  - AT
                                  - AU
                                  - AW
                                  - AX
                                  - AZ
                                  - BA
                                  - BB
                                  - BD
                                  - BE
                                  - BF
                                  - BG
                                  - BH
                                  - BI
                                  - BJ
                                  - BL
                                  - BM
                                  - BN
                                  - BO
                                  - BQ
                                  - BR
                                  - BS
                                  - BT
                                  - BV
                                  - BW
                                  - BY
                                  - BZ
                                  - CA
                                  - CC
                                  - CD
                                  - CF
                                  - CG
                                  - CH
                                  - CI
                                  - CK
                                  - CL
                                  - CM
                                  - CN
                                  - CO
                                  - CR
                                  - CU
                                  - CV
                                  - CW
                                  - CX
                                  - CY
                                  - CZ
                                  - DE
                                  - DJ
                                  - DK
                                  - DM
                                  - DO
                                  - DZ
                                  - EC
                                  - EE
                                  - EG
                                  - EH
                                  - ER
                                  - ES
                                  - ET
                                  - FI
                                  - FJ
                                  - FK
                                  - FM
                                  - FO
                                  - FR
                                  - GA
                                  - GB
                                  - GD
                                  - GE
                                  - GF
                                  - GG
                                  - GH
                                  - GI
                                  - GL
                                  - GM
                                  - GN
                                  - GP
                                  - GQ
                                  - GR
                                  - GS
                                  - GT
                                  - GU
                                  - GW
                                  - GY
                                  - HK
                                  - HM
                                  - HN
                                  - HR
                                  - HT
                                  - HU
                                  - ID
                                  - IE
                                  - IL
                                  - IM
                                  - IN
                                  - IO
                                  - IQ
                                  - IR
                                  - IS
                                  - IT
                                  - JE
                                  - JM
                                  - JO
                                  - JP
                                  - KE
                                  - KG
                                  - KH
                                  - KI
                                  - KM
                                  - KN
                                  - KP
                                  - KR
                                  - KW
                                  - KY
                                  - KZ
                                  - LA
                                  - LB
                                  - LC
                                  - LI
                                  - LK
                                  - LR
                                  - LS
                                  - LT
                                  - LU
                                  - LV
                                  - LY
                                  - MA
                                  - MC
                                  - MD
                                  - ME
                                  - MF
                                  - MG
                                  - MH
                                  - MK
                                  - ML
                                  - MM
                                  - MN
                                  - MO
                                  - MP
                                  - MQ
                                  - MR
                                  - MS
                                  - MT
                                  - MU
                                  - MV
                                  - MW
                                  - MX
                                  - MY
                                  - MZ
                                  - NA
                                  - NC
                                  - NE
                                  - NF
                                  - NG
                                  - NI
                                  - NL
                                  - 'NO'
                                  - NP
                                  - NR
                                  - NU
                                  - NZ
                                  - OM
                                  - PA
                                  - PE
                                  - PF
                                  - PG
                                  - PH
                                  - PK
                                  - PL
                                  - PM
                                  - PN
                                  - PR
                                  - PS
                                  - PT
                                  - PW
                                  - PY
                                  - QA
                                  - RE
                                  - RO
                                  - RS
                                  - RU
                                  - RW
                                  - SA
                                  - SB
                                  - SC
                                  - SD
                                  - SE
                                  - SG
                                  - SH
                                  - SI
                                  - SJ
                                  - SK
                                  - SL
                                  - SM
                                  - SN
                                  - SO
                                  - SR
                                  - SS
                                  - ST
                                  - SV
                                  - SX
                                  - SY
                                  - SZ
                                  - TC
                                  - TD
                                  - TF
                                  - TG
                                  - TH
                                  - TJ
                                  - TK
                                  - TL
                                  - TM
                                  - TN
                                  - TO
                                  - TR
                                  - TT
                                  - TV
                                  - TW
                                  - TZ
                                  - UA
                                  - UG
                                  - UM
                                  - US
                                  - UY
                                  - UZ
                                  - VA
                                  - VC
                                  - VE
                                  - VG
                                  - VI
                                  - VN
                                  - VU
                                  - WF
                                  - WS
                                  - XK
                                  - YE
                                  - YT
                                  - ZA
                                  - ZM
                                  - ZW
                              minItems: 1
                              description: >-
                                Nationalities of the user. [ISO 3166 alpha-2
                                Codes](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2).
                            address:
                              title: Address
                              type: object
                              description: Address. Must not be a P.O. box or c/o address.
                              properties:
                                address_line1:
                                  type: string
                                  description: First address line of the address.
                                  maxLength: 100
                                address_line2:
                                  type: string
                                  description: Second address line of the address.
                                  maxLength: 100
                                postcode:
                                  title: Postal code
                                  type: string
                                  description: Postal code (postcode, PIN or ZIP code)
                                  pattern: >-
                                    ^[a-zA-Z0-9][a-zA-Z0-9\s\-]{0,8}[a-zA-Z0-9]?$
                                country:
                                  description: >-
                                    Accepted country code. [ISO 3166-1 alpha-2
                                    codes](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2).
                                  type: string
                                  enum:
                                    - AD
                                    - AE
                                    - AF
                                    - AG
                                    - AI
                                    - AL
                                    - AM
                                    - AO
                                    - AQ
                                    - AR
                                    - AS
                                    - AT
                                    - AU
                                    - AW
                                    - AX
                                    - AZ
                                    - BA
                                    - BB
                                    - BD
                                    - BE
                                    - BF
                                    - BG
                                    - BH
                                    - BI
                                    - BJ
                                    - BL
                                    - BM
                                    - BN
                                    - BO
                                    - BQ
                                    - BR
                                    - BS
                                    - BT
                                    - BV
                                    - BW
                                    - BY
                                    - BZ
                                    - CA
                                    - CC
                                    - CD
                                    - CF
                                    - CG
                                    - CH
                                    - CI
                                    - CK
                                    - CL
                                    - CM
                                    - CN
                                    - CO
                                    - CR
                                    - CU
                                    - CV
                                    - CW
                                    - CX
                                    - CY
                                    - CZ
                                    - DE
                                    - DJ
                                    - DK
                                    - DM
                                    - DO
                                    - DZ
                                    - EC
                                    - EE
                                    - EG
                                    - EH
                                    - ER
                                    - ES
                                    - ET
                                    - FI
                                    - FJ
                                    - FK
                                    - FM
                                    - FO
                                    - FR
                                    - GA
                                    - GB
                                    - GD
                                    - GE
                                    - GF
                                    - GG
                                    - GH
                                    - GI
                                    - GL
                                    - GM
                                    - GN
                                    - GP
                                    - GQ
                                    - GR
                                    - GS
                                    - GT
                                    - GU
                                    - GW
                                    - GY
                                    - HK
                                    - HM
                                    - HN
                                    - HR
                                    - HT
                                    - HU
                                    - ID
                                    - IE
                                    - IL
                                    - IM
                                    - IN
                                    - IO
                                    - IQ
                                    - IR
                                    - IS
                                    - IT
                                    - JE
                                    - JM
                                    - JO
                                    - JP
                                    - KE
                                    - KG
                                    - KH
                                    - KI
                                    - KM
                                    - KN
                                    - KP
                                    - KR
                                    - KW
                                    - KY
                                    - KZ
                                    - LA
                                    - LB
                                    - LC
                                    - LI
                                    - LK
                                    - LR
                                    - LS
                                    - LT
                                    - LU
                                    - LV
                                    - LY
                                    - MA
                                    - MC
                                    - MD
                                    - ME
                                    - MF
                                    - MG
                                    - MH
                                    - MK
                                    - ML
                                    - MM
                                    - MN
                                    - MO
                                    - MP
                                    - MQ
                                    - MR
                                    - MS
                                    - MT
                                    - MU
                                    - MV
                                    - MW
                                    - MX
                                    - MY
                                    - MZ
                                    - NA
                                    - NC
                                    - NE
                                    - NF
                                    - NG
                                    - NI
                                    - NL
                                    - 'NO'
                                    - NP
                                    - NR
                                    - NU
                                    - NZ
                                    - OM
                                    - PA
                                    - PE
                                    - PF
                                    - PG
                                    - PH
                                    - PK
                                    - PL
                                    - PM
                                    - PN
                                    - PR
                                    - PS
                                    - PT
                                    - PW
                                    - PY
                                    - QA
                                    - RE
                                    - RO
                                    - RS
                                    - RU
                                    - RW
                                    - SA
                                    - SB
                                    - SC
                                    - SD
                                    - SE
                                    - SG
                                    - SH
                                    - SI
                                    - SJ
                                    - SK
                                    - SL
                                    - SM
                                    - SN
                                    - SO
                                    - SR
                                    - SS
                                    - ST
                                    - SV
                                    - SX
                                    - SY
                                    - SZ
                                    - TC
                                    - TD
                                    - TF
                                    - TG
                                    - TH
                                    - TJ
                                    - TK
                                    - TL
                                    - TM
                                    - TN
                                    - TO
                                    - TR
                                    - TT
                                    - TV
                                    - TW
                                    - TZ
                                    - UA
                                    - UG
                                    - UM
                                    - US
                                    - UY
                                    - UZ
                                    - VA
                                    - VC
                                    - VE
                                    - VG
                                    - VI
                                    - VN
                                    - VU
                                    - WF
                                    - WS
                                    - XK
                                    - YE
                                    - YT
                                    - ZA
                                    - ZM
                                    - ZW
                                state:
                                  description: >-
                                    State, province, county. [ISO 3166 alpha-2
                                    Codes](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2).
                                  type: string
                                  maxLength: 50
                                city:
                                  title: City name
                                  type: string
                                  minLength: 1
                                  maxLength: 85
                              required:
                                - address_line1
                                - postcode
                                - country
                                - city
                            postal_address:
                              description: >-
                                User postal address. Needs to be specified if
                                different to the residential address, otherwise
                                it is automatically populated.
                              oneOf:
                                - title: Address
                                  type: object
                                  description: >-
                                    Address. Must not be a P.O. box or c/o
                                    address.
                                  properties:
                                    address_line1:
                                      type: string
                                      description: First address line of the address.
                                      maxLength: 100
                                    address_line2:
                                      type: string
                                      description: Second address line of the address.
                                      maxLength: 100
                                    postcode:
                                      title: Postal code
                                      type: string
                                      description: Postal code (postcode, PIN or ZIP code)
                                      pattern: >-
                                        ^[a-zA-Z0-9][a-zA-Z0-9\s\-]{0,8}[a-zA-Z0-9]?$
                                    country:
                                      description: >-
                                        Accepted country code. [ISO 3166-1
                                        alpha-2
                                        codes](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2).
                                      type: string
                                      enum:
                                        - AD
                                        - AE
                                        - AF
                                        - AG
                                        - AI
                                        - AL
                                        - AM
                                        - AO
                                        - AQ
                                        - AR
                                        - AS
                                        - AT
                                        - AU
                                        - AW
                                        - AX
                                        - AZ
                                        - BA
                                        - BB
                                        - BD
                                        - BE
                                        - BF
                                        - BG
                                        - BH
                                        - BI
                                        - BJ
                                        - BL
                                        - BM
                                        - BN
                                        - BO
                                        - BQ
                                        - BR
                                        - BS
                                        - BT
                                        - BV
                                        - BW
                                        - BY
                                        - BZ
                                        - CA
                                        - CC
                                        - CD
                                        - CF
                                        - CG
                                        - CH
                                        - CI
                                        - CK
                                        - CL
                                        - CM
                                        - CN
                                        - CO
                                        - CR
                                        - CU
                                        - CV
                                        - CW
                                        - CX
                                        - CY
                                        - CZ
                                        - DE
                                        - DJ
                                        - DK
                                        - DM
                                        - DO
                                        - DZ
                                        - EC
                                        - EE
                                        - EG
                                        - EH
                                        - ER
                                        - ES
                                        - ET
                                        - FI
                                        - FJ
                                        - FK
                                        - FM
                                        - FO
                                        - FR
                                        - GA
                                        - GB
                                        - GD
                                        - GE
                                        - GF
                                        - GG
                                        - GH
                                        - GI
                                        - GL
                                        - GM
                                        - GN
                                        - GP
                                        - GQ
                                        - GR
                                        - GS
                                        - GT
                                        - GU
                                        - GW
                                        - GY
                                        - HK
                                        - HM
                                        - HN
                                        - HR
                                        - HT
                                        - HU
                                        - ID
                                        - IE
                                        - IL
                                        - IM
                                        - IN
                                        - IO
                                        - IQ
                                        - IR
                                        - IS
                                        - IT
                                        - JE
                                        - JM
                                        - JO
                                        - JP
                                        - KE
                                        - KG
                                        - KH
                                        - KI
                                        - KM
                                        - KN
                                        - KP
                                        - KR
                                        - KW
                                        - KY
                                        - KZ
                                        - LA
                                        - LB
                                        - LC
                                        - LI
                                        - LK
                                        - LR
                                        - LS
                                        - LT
                                        - LU
                                        - LV
                                        - LY
                                        - MA
                                        - MC
                                        - MD
                                        - ME
                                        - MF
                                        - MG
                                        - MH
                                        - MK
                                        - ML
                                        - MM
                                        - MN
                                        - MO
                                        - MP
                                        - MQ
                                        - MR
                                        - MS
                                        - MT
                                        - MU
                                        - MV
                                        - MW
                                        - MX
                                        - MY
                                        - MZ
                                        - NA
                                        - NC
                                        - NE
                                        - NF
                                        - NG
                                        - NI
                                        - NL
                                        - 'NO'
                                        - NP
                                        - NR
                                        - NU
                                        - NZ
                                        - OM
                                        - PA
                                        - PE
                                        - PF
                                        - PG
                                        - PH
                                        - PK
                                        - PL
                                        - PM
                                        - PN
                                        - PR
                                        - PS
                                        - PT
                                        - PW
                                        - PY
                                        - QA
                                        - RE
                                        - RO
                                        - RS
                                        - RU
                                        - RW
                                        - SA
                                        - SB
                                        - SC
                                        - SD
                                        - SE
                                        - SG
                                        - SH
                                        - SI
                                        - SJ
                                        - SK
                                        - SL
                                        - SM
                                        - SN
                                        - SO
                                        - SR
                                        - SS
                                        - ST
                                        - SV
                                        - SX
                                        - SY
                                        - SZ
                                        - TC
                                        - TD
                                        - TF
                                        - TG
                                        - TH
                                        - TJ
                                        - TK
                                        - TL
                                        - TM
                                        - TN
                                        - TO
                                        - TR
                                        - TT
                                        - TV
                                        - TW
                                        - TZ
                                        - UA
                                        - UG
                                        - UM
                                        - US
                                        - UY
                                        - UZ
                                        - VA
                                        - VC
                                        - VE
                                        - VG
                                        - VI
                                        - VN
                                        - VU
                                        - WF
                                        - WS
                                        - XK
                                        - YE
                                        - YT
                                        - ZA
                                        - ZM
                                        - ZW
                                    state:
                                      description: >-
                                        State, province, county. [ISO 3166
                                        alpha-2
                                        Codes](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2).
                                      type: string
                                      maxLength: 50
                                    city:
                                      title: City name
                                      type: string
                                      minLength: 1
                                      maxLength: 85
                                  required:
                                    - address_line1
                                    - postcode
                                    - country
                                    - city
                                - type: 'null'
                            status:
                              type: string
                              description: |-
                                Status of the user.
                                * ACTIVE - 
                                * INACTIVE - 
                                * OFFBOARDING - 
                                * OFFBOARDED - 
                              enum:
                                - ACTIVE
                                - INACTIVE
                                - OFFBOARDING
                                - OFFBOARDED
                            email:
                              type: string
                              format: email
                              maxLength: 100
                              description: >-
                                Email of the user. Must be a valid email
                                address.
                            phone_number:
                              type: string
                              pattern: ^([0-9]{8,15})?$
                              description: >-
                                Phone number of the user. [Phone number E.164
                                format](https://en.wikipedia.org/wiki/E.164).
                            fatca:
                              type: object
                              properties:
                                status:
                                  type: boolean
                                  description: >-
                                    The user’s FATCA status is true if the user
                                    is subject to paying taxes in the US,
                                    otherwise it can be set to false.
                                confirmed_at:
                                  type: string
                                  format: date-time
                                  description: >-
                                    Timestamp at which the user confirmed their
                                    FATCA status. [RFC
                                    3339-5](https://datatracker.ietf.org/doc/html/rfc3339#section-5.6),
                                    [ISO8601
                                    UTC](https://www.iso.org/iso-8601-date-and-time-format.html)
                              required:
                                - status
                                - confirmed_at
                            terms_and_conditions:
                              type: object
                              properties:
                                consent_document_id:
                                  title: Consent unique identifier.
                                  type: string
                                  description: Consent unique identifier.
                                  format: uuid
                                confirmed_at:
                                  type: string
                                  format: date-time
                                  description: >-
                                    Timestamp at which the user consented to the
                                    terms & conditions. [RFC
                                    3339-5](https://datatracker.ietf.org/doc/html/rfc3339#section-5.6),
                                    [ISO8601
                                    UTC](https://www.iso.org/iso-8601-date-and-time-format.html)
                              required:
                                - consent_document_id
                                - confirmed_at
                            data_privacy_and_sharing_agreement:
                              type: object
                              properties:
                                consent_document_id:
                                  title: Consent unique identifier.
                                  type: string
                                  description: Consent unique identifier.
                                  format: uuid
                                confirmed_at:
                                  type: string
                                  format: date-time
                                  description: >-
                                    Timestamp at which the user consented to the
                                    data sharing agreement. [RFC
                                    3339-5](https://datatracker.ietf.org/doc/html/rfc3339#section-5.6),
                                    [ISO8601
                                    UTC](https://www.iso.org/iso-8601-date-and-time-format.html)
                              required:
                                - consent_document_id
                                - confirmed_at
                            branch_id:
                              title: Branch unique identifier.
                              type: string
                              description: >-
                                Unique identifier of the market the user is
                                onboarded on. Only relevant if the client is
                                operating in different markets and the client is
                                configured accordingly
                              format: uuid
                          required:
                            - id
                            - created_at
                            - updated_at
                            - first_name
                            - last_name
                            - birth_date
                            - nationalities
                            - address
                            - status
                          additionalProperties: false
                    - title: Webhook - Users - Callback
                      type: object
                      properties:
                        user_id:
                          type: string
                          format: uuid
                          description: Event unique identifier
                        reason:
                          type: string
                          maxLength: 100
                          description: The reason why the data change failed.
                      required:
                        - user_id
                        - reason
                      additionalProperties: false
                webhook_id:
                  title: Webhook ID
                  type: string
                  description: Webhook unique identifier.
                  format: uuid
              required:
                - id
                - created_at
                - type
                - object
                - webhook_id
              additionalProperties: false
            examples:
              BYOL:
                summary: BYOL user event
                value:
                  id: 2df83681-6a42-4837-a554-a8197335bcfa
                  created_at: '2021-11-19T13:06:51.980159529Z'
                  type: USER.CREATED
                  object:
                    created_at: '2021-11-22T09:04:42Z'
                    updated_at: '2021-11-22T09:04:42Z'
                    first_name: Jane
                    last_name: Doe
                    salutation: SALUTATION_FEMALE
                    title: PROF
                    birth_date: '1990-01-01'
                    birth_city: Berlin
                    birth_country: DE
                    birth_name: Smith
                    nationalities:
                      - DE
                      - CH
                    address:
                      address_line1: Torstrasse
                      address_line2: 12a
                      city: Berlin
                      country: DE
                      postcode: '10115'
                      state: BE
                    id: a1752f00-93d5-4b77-a148-959cd315581b
                    postal_address:
                      address_line1: Thorstrasse
                      address_line2: '123'
                      city: Berlin
                      country: DE
                      postcode: '10115'
                      state: BE
                    status: ACTIVE
                    branch_id: e6373bfa-ff12-4004-8de9-747ac96764da
                  webhook_id: 1b097e06-8a14-4181-b72a-de0972a3c57b
              TOL:
                summary: TOL user event
                value:
                  id: 2df83681-6a42-4837-a554-a8197335bcfa
                  created_at: '2021-11-22T09:04:42Z'
                  type: USER.CREATED
                  object:
                    created_at: '2021-11-22T09:04:42Z'
                    updated_at: '2021-11-22T09:04:42Z'
                    first_name: Jane
                    last_name: Doe
                    salutation: SALUTATION_FEMALE
                    title: PROF
                    birth_date: '1990-01-01'
                    birth_city: Berlin
                    birth_country: DE
                    birth_name: Smith
                    nationalities:
                      - DE
                      - CH
                    address:
                      address_line1: Torstrasse
                      address_line2: 12a
                      city: Berlin
                      country: DE
                      postcode: '10115'
                      state: BE
                    id: a1752f00-93d5-4b77-a148-959cd315581b
                    postal_address:
                      address_line1: Thorstrasse
                      address_line2: '123'
                      city: Berlin
                      country: DE
                      postcode: '10115'
                      state: BE
                    status: ACTIVE
                    data_privacy_and_sharing_agreement:
                      confirmed_at: '2021-02-03T17:14:46Z'
                      consent_document_id: 7ab0fc5c-8157-4acd-b02d-6ccda0e81dec
                    email: janedoe@example.com
                    fatca:
                      confirmed_at: '2020-02-03T17:14:46Z'
                      status: false
                    phone_number: '0123456789'
                    terms_and_conditions:
                      confirmed_at: '2020-02-03T17:14:46Z'
                      consent_document_id: 62814307-f14b-40af-bc66-5942a549a759
                    branch_id: a1752f00-93d5-4b77-a148-959cd315581b
                  webhook_id: 1b097e06-8a14-4181-b72a-de0972a3c57b
      responses:
        '200':
          description: Request has been processed successfully.
  User checks events:
    post:
      operationId: user_checks_event
      summary: User checks events
      description: User checks events
      tags:
        - User Checks
      requestBody:
        content:
          application/json:
            schema:
              title: Webhook - User Checks - Callback
              type: object
              properties:
                id:
                  type: string
                  format: uuid
                  description: Event unique identifier
                created_at:
                  type: string
                  format: date-time
                  description: >-
                    Date and time when the event was created. [RFC
                    3339-5](https://datatracker.ietf.org/doc/html/rfc3339#section-5.6),
                    [ISO8601
                    UTC](https://www.iso.org/iso-8601-date-and-time-format.html)
                type:
                  type: string
                  description: Event type
                  enum:
                    - USER_CHECK.CREATED
                    - USER_CHECK.PASSED
                    - USER_CHECK.FAILED
                object:
                  title: User Check
                  oneOf:
                    - title: User Check - Know your customer
                      type: object
                      description: >-
                        The KYC (Know your customer) check is completed by the
                        client sharing the valid and relevant KYC data for the
                        user.
                      properties:
                        id:
                          title: User Check unique identifier
                          type: string
                          description: User Check unique identifier.
                          format: uuid
                        user_id:
                          title: User unique identifier.
                          type: string
                          description: User unique identifier.
                          format: uuid
                        type:
                          type: string
                          default: KYC
                          description: The type of check must be “KYC”.
                        check_confirmed_at:
                          type: string
                          format: date-time
                          description: >-
                            Completion date and time of the KYC check. Must not
                            be older than 24 months.
                        data_download_link:
                          type: string
                          format: url
                          maxLength: 1000
                          description: >-
                            Download URL for the KYC evidence file. The file
                            size must not exceed 250 MB.
                        document_type:
                          type: string
                          description: >
                            The type of document used in the KYC process.

                            * PASSPORT - Passport

                            * ID_CARD - National Identification document

                            * RESIDENCE_PERMIT - Residence Permit

                            * DRIVING_LICENSE - Driving License

                            * TWO_PLUS_TWO_VERIFICATION_PROOF - Two plus two
                            verification proof (for GB residence users only)
                          enum:
                            - PASSPORT
                            - ID_CARD
                            - RESIDENCE_PERMIT
                            - DRIVING_LICENSE
                            - TWO_PLUS_TWO_VERIFICATION_PROOF
                        document_expiration_date:
                          type: string
                          format: date
                          description: >
                            Expiration date of the document used in KYC process
                            in YYYY-MM-DD format.


                            **The field is required for the following document
                            types:**

                            * PASSPORT

                            * ID_CARD

                            * RESIDENCE_PERMIT

                            * DRIVING_LICENSE
                        nationality:
                          type: string
                          pattern: ^[A-Z]{2}$
                          description: >
                            Issuing country of the document used in the KYC
                            process. [ISO 3166 alpha-2
                            codes](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2).


                            **The field is required for the following document
                            types:**

                            * PASSPORT

                            * ID_CARD

                            * RESIDENCE_PERMIT

                            * DRIVING_LICENSE
                        status:
                          type: string
                          description: |-
                            Final status of the KYC check.
                            * IN_PROGRESS - KYC check is in progress
                            * PASSED - KYC check passed
                            * FAILED - KYC check failed
                          enum:
                            - IN_PROGRESS
                            - PASSED
                            - FAILED
                        provider:
                          type: string
                          maxLength: 100
                          description: Provider that was used to perform the KYC check.
                        method:
                          type: string
                          description: >-
                            Method used for AML-compliant KYC process

                            * VIDEO_ID - Video identification

                            * IN_PERSON_ID - In-person identification at the
                            post office or the client's outlet

                            * ELECTRONIC_ID - Advanced electronic identification
                            methods (namely German eID)

                            * LIVENESS_PHOTO_ID - Photos and security features
                            of the identification document in combination with a
                            video-based liveness check (residence country must
                            not be Germany in this case)

                            * QUALIFIED_ELECTRONIC_SIGNATURE_WITH_TX - Qualified
                            electronic signature accompanied by a bank
                            transaction for verification

                            * TWO_PLUS_TWO_VERIFICATION - A method of verifying
                            identity by matching at least two personal details
                            from two separate sources (for GB residence users
                            only)
                          enum:
                            - VIDEO_ID
                            - IN_PERSON_ID
                            - ELECTRONIC_ID
                            - LIVENESS_PHOTO_ID
                            - QUALIFIED_ELECTRONIC_SIGNATURE_WITH_TX
                            - TWO_PLUS_TWO_VERIFICATION
                        confirmed_address:
                          title: Address
                          type: object
                          description: Address. Must not be a P.O. box or c/o address.
                          properties:
                            address_line1:
                              type: string
                              description: First address line of the address.
                              maxLength: 100
                            address_line2:
                              type: string
                              description: Second address line of the address.
                              maxLength: 100
                            postcode:
                              title: Postal code
                              type: string
                              description: Postal code (postcode, PIN or ZIP code)
                              pattern: ^[a-zA-Z0-9][a-zA-Z0-9\s\-]{0,8}[a-zA-Z0-9]?$
                            country:
                              description: >-
                                Accepted country code. [ISO 3166-1 alpha-2
                                codes](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2).
                              type: string
                              enum:
                                - AD
                                - AE
                                - AF
                                - AG
                                - AI
                                - AL
                                - AM
                                - AO
                                - AQ
                                - AR
                                - AS
                                - AT
                                - AU
                                - AW
                                - AX
                                - AZ
                                - BA
                                - BB
                                - BD
                                - BE
                                - BF
                                - BG
                                - BH
                                - BI
                                - BJ
                                - BL
                                - BM
                                - BN
                                - BO
                                - BQ
                                - BR
                                - BS
                                - BT
                                - BV
                                - BW
                                - BY
                                - BZ
                                - CA
                                - CC
                                - CD
                                - CF
                                - CG
                                - CH
                                - CI
                                - CK
                                - CL
                                - CM
                                - CN
                                - CO
                                - CR
                                - CU
                                - CV
                                - CW
                                - CX
                                - CY
                                - CZ
                                - DE
                                - DJ
                                - DK
                                - DM
                                - DO
                                - DZ
                                - EC
                                - EE
                                - EG
                                - EH
                                - ER
                                - ES
                                - ET
                                - FI
                                - FJ
                                - FK
                                - FM
                                - FO
                                - FR
                                - GA
                                - GB
                                - GD
                                - GE
                                - GF
                                - GG
                                - GH
                                - GI
                                - GL
                                - GM
                                - GN
                                - GP
                                - GQ
                                - GR
                                - GS
                                - GT
                                - GU
                                - GW
                                - GY
                                - HK
                                - HM
                                - HN
                                - HR
                                - HT
                                - HU
                                - ID
                                - IE
                                - IL
                                - IM
                                - IN
                                - IO
                                - IQ
                                - IR
                                - IS
                                - IT
                                - JE
                                - JM
                                - JO
                                - JP
                                - KE
                                - KG
                                - KH
                                - KI
                                - KM
                                - KN
                                - KP
                                - KR
                                - KW
                                - KY
                                - KZ
                                - LA
                                - LB
                                - LC
                                - LI
                                - LK
                                - LR
                                - LS
                                - LT
                                - LU
                                - LV
                                - LY
                                - MA
                                - MC
                                - MD
                                - ME
                                - MF
                                - MG
                                - MH
                                - MK
                                - ML
                                - MM
                                - MN
                                - MO
                                - MP
                                - MQ
                                - MR
                                - MS
                                - MT
                                - MU
                                - MV
                                - MW
                                - MX
                                - MY
                                - MZ
                                - NA
                                - NC
                                - NE
                                - NF
                                - NG
                                - NI
                                - NL
                                - 'NO'
                                - NP
                                - NR
                                - NU
                                - NZ
                                - OM
                                - PA
                                - PE
                                - PF
                                - PG
                                - PH
                                - PK
                                - PL
                                - PM
                                - PN
                                - PR
                                - PS
                                - PT
                                - PW
                                - PY
                                - QA
                                - RE
                                - RO
                                - RS
                                - RU
                                - RW
                                - SA
                                - SB
                                - SC
                                - SD
                                - SE
                                - SG
                                - SH
                                - SI
                                - SJ
                                - SK
                                - SL
                                - SM
                                - SN
                                - SO
                                - SR
                                - SS
                                - ST
                                - SV
                                - SX
                                - SY
                                - SZ
                                - TC
                                - TD
                                - TF
                                - TG
                                - TH
                                - TJ
                                - TK
                                - TL
                                - TM
                                - TN
                                - TO
                                - TR
                                - TT
                                - TV
                                - TW
                                - TZ
                                - UA
                                - UG
                                - UM
                                - US
                                - UY
                                - UZ
                                - VA
                                - VC
                                - VE
                                - VG
                                - VI
                                - VN
                                - VU
                                - WF
                                - WS
                                - XK
                                - YE
                                - YT
                                - ZA
                                - ZM
                                - ZW
                            state:
                              description: >-
                                State, province, county. [ISO 3166 alpha-2
                                Codes](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2).
                              type: string
                              maxLength: 50
                            city:
                              title: City name
                              type: string
                              minLength: 1
                              maxLength: 85
                          required:
                            - address_line1
                            - postcode
                            - country
                            - city
                        kyc_update:
                          type: boolean
                          description: >-
                            Marks this check as a KYC refresh/update as opposed
                            to an initial record.
                      required:
                        - id
                        - user_id
                        - type
                        - check_confirmed_at
                        - data_download_link
                        - document_type
                        - status
                        - provider
                        - method
                      additionalProperties: false
                    - title: User Check - Proof of Residency
                      type: object
                      description: >-
                        The PoR (Proof of residency) check is completed by the
                        client sharing a valid PoR document, if not fulfilled by
                        the KYC check.
                      properties:
                        id:
                          title: User Check unique identifier
                          type: string
                          description: User Check unique identifier.
                          format: uuid
                        user_id:
                          title: User unique identifier.
                          type: string
                          description: User unique identifier.
                          format: uuid
                        type:
                          type: string
                          default: POR
                          description: The type of check must be POR.
                        check_confirmed_at:
                          type: string
                          format: date-time
                          description: Completion date and time of the PoR check.
                        issuance_date:
                          type: string
                          format: date
                          description: Issuance date in YYYY-MM-DD format.
                        data_download_link:
                          type: string
                          format: url
                          maxLength: 1000
                          description: >-
                            Download URL for the PoR evidence file. The file
                            size must not exceed 250 MB.
                        document_type:
                          type: string
                          description: >-
                            The type of document used in the PoR process.
                            Maximum age of the document is 12 months (stated on
                            the document) applicable for: Utility bills (water,
                            gas, electricity), Telephone bills (only landline),
                            Internet bills, Bank account statements. Documents
                            that need to be still valid - Registration
                            certificate (issued within the past 5 years),
                            Residence permit e.g. Blue Card (as long as valid),
                            ID Card that contains the registration address.

                            * UTILITY_BILL - 

                            * TELEPHONE_BILL - 

                            * INTERNET_BILL - 

                            * BANK_STATEMENT - 

                            * REGISTRATION_CERT - 

                            * RESIDENCE_PERMIT - 

                            * ID_CARD - 

                            * PASSPORT - 
                          enum:
                            - UTILITY_BILL
                            - TELEPHONE_BILL
                            - INTERNET_BILL
                            - BANK_STATEMENT
                            - REGISTRATION_CERT
                            - RESIDENCE_PERMIT
                            - ID_CARD
                            - PASSPORT
                        status:
                          type: string
                          description: |-
                            Final status of the PoR check.
                            * IN_PROGRESS - 
                            * PASSED - 
                            * FAILED - 
                          enum:
                            - IN_PROGRESS
                            - PASSED
                            - FAILED
                        confirmed_address:
                          title: Address
                          type: object
                          description: Address. Must not be a P.O. box or c/o address.
                          properties:
                            address_line1:
                              type: string
                              description: First address line of the address.
                              maxLength: 100
                            address_line2:
                              type: string
                              description: Second address line of the address.
                              maxLength: 100
                            postcode:
                              title: Postal code
                              type: string
                              description: Postal code (postcode, PIN or ZIP code)
                              pattern: ^[a-zA-Z0-9][a-zA-Z0-9\s\-]{0,8}[a-zA-Z0-9]?$
                            country:
                              description: >-
                                Accepted country code. [ISO 3166-1 alpha-2
                                codes](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2).
                              type: string
                              enum:
                                - AD
                                - AE
                                - AF
                                - AG
                                - AI
                                - AL
                                - AM
                                - AO
                                - AQ
                                - AR
                                - AS
                                - AT
                                - AU
                                - AW
                                - AX
                                - AZ
                                - BA
                                - BB
                                - BD
                                - BE
                                - BF
                                - BG
                                - BH
                                - BI
                                - BJ
                                - BL
                                - BM
                                - BN
                                - BO
                                - BQ
                                - BR
                                - BS
                                - BT
                                - BV
                                - BW
                                - BY
                                - BZ
                                - CA
                                - CC
                                - CD
                                - CF
                                - CG
                                - CH
                                - CI
                                - CK
                                - CL
                                - CM
                                - CN
                                - CO
                                - CR
                                - CU
                                - CV
                                - CW
                                - CX
                                - CY
                                - CZ
                                - DE
                                - DJ
                                - DK
                                - DM
                                - DO
                                - DZ
                                - EC
                                - EE
                                - EG
                                - EH
                                - ER
                                - ES
                                - ET
                                - FI
                                - FJ
                                - FK
                                - FM
                                - FO
                                - FR
                                - GA
                                - GB
                                - GD
                                - GE
                                - GF
                                - GG
                                - GH
                                - GI
                                - GL
                                - GM
                                - GN
                                - GP
                                - GQ
                                - GR
                                - GS
                                - GT
                                - GU
                                - GW
                                - GY
                                - HK
                                - HM
                                - HN
                                - HR
                                - HT
                                - HU
                                - ID
                                - IE
                                - IL
                                - IM
                                - IN
                                - IO
                                - IQ
                                - IR
                                - IS
                                - IT
                                - JE
                                - JM
                                - JO
                                - JP
                                - KE
                                - KG
                                - KH
                                - KI
                                - KM
                                - KN
                                - KP
                                - KR
                                - KW
                                - KY
                                - KZ
                                - LA
                                - LB
                                - LC
                                - LI
                                - LK
                                - LR
                                - LS
                                - LT
                                - LU
                                - LV
                                - LY
                                - MA
                                - MC
                                - MD
                                - ME
                                - MF
                                - MG
                                - MH
                                - MK
                                - ML
                                - MM
                                - MN
                                - MO
                                - MP
                                - MQ
                                - MR
                                - MS
                                - MT
                                - MU
                                - MV
                                - MW
                                - MX
                                - MY
                                - MZ
                                - NA
                                - NC
                                - NE
                                - NF
                                - NG
                                - NI
                                - NL
                                - 'NO'
                                - NP
                                - NR
                                - NU
                                - NZ
                                - OM
                                - PA
                                - PE
                                - PF
                                - PG
                                - PH
                                - PK
                                - PL
                                - PM
                                - PN
                                - PR
                                - PS
                                - PT
                                - PW
                                - PY
                                - QA
                                - RE
                                - RO
                                - RS
                                - RU
                                - RW
                                - SA
                                - SB
                                - SC
                                - SD
                                - SE
                                - SG
                                - SH
                                - SI
                                - SJ
                                - SK
                                - SL
                                - SM
                                - SN
                                - SO
                                - SR
                                - SS
                                - ST
                                - SV
                                - SX
                                - SY
                                - SZ
                                - TC
                                - TD
                                - TF
                                - TG
                                - TH
                                - TJ
                                - TK
                                - TL
                                - TM
                                - TN
                                - TO
                                - TR
                                - TT
                                - TV
                                - TW
                                - TZ
                                - UA
                                - UG
                                - UM
                                - US
                                - UY
                                - UZ
                                - VA
                                - VC
                                - VE
                                - VG
                                - VI
                                - VN
                                - VU
                                - WF
                                - WS
                                - XK
                                - YE
                                - YT
                                - ZA
                                - ZM
                                - ZW
                            state:
                              description: >-
                                State, province, county. [ISO 3166 alpha-2
                                Codes](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2).
                              type: string
                              maxLength: 50
                            city:
                              title: City name
                              type: string
                              minLength: 1
                              maxLength: 85
                          required:
                            - address_line1
                            - postcode
                            - country
                            - city
                      required:
                        - id
                        - user_id
                        - type
                        - check_confirmed_at
                        - issuance_date
                        - data_download_link
                        - document_type
                        - status
                        - confirmed_address
                      additionalProperties: false
                    - title: User Check - Instrument fit
                      type: object
                      description: >-
                        Instrument fit check is completed by the client
                        providing the user's answers to the instrument
                        appropriateness or suitability questionnaire.
                      properties:
                        id:
                          title: User Check unique identifier
                          type: string
                          description: User Check unique identifier.
                          format: uuid
                        user_id:
                          title: User unique identifier.
                          type: string
                          description: User unique identifier.
                          format: uuid
                        type:
                          type: string
                          default: INSTRUMENT_FIT
                          description: The type of check must be INSTRUMENT_FIT.
                        check_confirmed_at:
                          type: string
                          format: date-time
                          description: >-
                            Completion date and time of the instrument fit
                            check.
                        status:
                          type: string
                          description: |-
                            Final status of the instrument fit check.
                            * IN_PROGRESS - Instrument fit check is in progress
                            * PASSED - Instrument fit check passed
                            * FAILED - Instrument fit check failed
                          enum:
                            - IN_PROGRESS
                            - PASSED
                            - FAILED
                        instrument_suitability:
                          type: object
                          properties:
                            suitability:
                              type: boolean
                              description: >-
                                Did the user go through a suitability assessment
                                and the outcome indicated suitability.
                          required:
                            - suitability
                      required:
                        - id
                        - user_id
                        - type
                        - check_confirmed_at
                        - status
                        - instrument_suitability
                      additionalProperties: false
                    - title: User Check - Compliance
                      type: object
                      description: Compliance check
                      properties:
                        id:
                          title: User Check unique identifier
                          type: string
                          description: User Check unique identifier.
                          format: uuid
                        user_id:
                          title: User unique identifier.
                          type: string
                          description: User unique identifier.
                          format: uuid
                        type:
                          type: string
                          default: COMPLIANCE
                          description: The type of check must be COMPLIANCE.
                        status:
                          type: string
                          description: |-
                            Final status of the COMPLIANCE check.
                            * IN_PROGRESS - Compliance check is in progress
                            * PASSED - Compliance check passed
                            * FAILED - Compliance check failed
                          enum:
                            - IN_PROGRESS
                            - PASSED
                            - FAILED
                        check_confirmed_at:
                          type: string
                          format: date-time
                          description: Completion date and time of the COMPLIANCE check.
                      required:
                        - id
                        - user_id
                        - type
                        - check_confirmed_at
                      additionalProperties: false
                webhook_id:
                  title: Webhook ID
                  type: string
                  description: Webhook unique identifier.
                  format: uuid
              required:
                - id
                - created_at
                - type
                - object
                - webhook_id
              additionalProperties: false
            example:
              id: 38fc59d0-fc42-46ef-9512-824773219b2e
              created_at: '2021-11-19T13:06:57.820371265Z'
              type: USER_CHECK.PASSED
              object:
                check_confirmed_at: '2021-08-02T15:04:05Z'
                data_download_link: >-
                  https://storage.cloud.google.com/upvest-mock-documents/Test_KYC_documents.zip
                document_expiration_date: '2028-01-02'
                document_type: PASSPORT
                id: 32cbb9a2-dd3b-4e60-a5af-9b41460049dc
                user_id: 7b39529a-e68c-4688-8242-7549d10d6084
                method: VIDEO_ID
                nationality: RU
                provider: IDNOW
                status: PASSED
                type: KYC
              webhook_id: 1b097e06-8a14-4181-b72a-de0972a3c57b
      responses:
        '200':
          description: Request has been processed successfully.
  Tax exemption events:
    post:
      operationId: tax_exemption_event
      summary: Tax Exemption Events
      description: Tax Exemption Events
      tags:
        - Tax Exemptions
      requestBody:
        content:
          application/json:
            schema:
              title: Webhook - Tax Exemptions - Updated
              type: object
              properties:
                id:
                  type: string
                  format: uuid
                  description: Event unique identifier
                created_at:
                  type: string
                  format: date-time
                  description: >-
                    Date and time when the event was created. [RFC
                    3339-5](https://datatracker.ietf.org/doc/html/rfc3339#section-5.6),
                    [ISO8601
                    UTC](https://www.iso.org/iso-8601-date-and-time-format.html)
                type:
                  title: Tax Exemption Update Webhook Type
                  type: string
                  description: >-
                    Tax exemption events webhook type 

                    * TAX_EXEMPTION.CREATED - Tax exemption successfully
                    created. 

                    * TAX_EXEMPTION.UPDATED - Tax exemption successfully
                    updated. 

                    * TAX_EXEMPTION.DELETED - Tax exemption successfully
                    deleted.
                  enum:
                    - TAX_EXEMPTION.CREATED
                    - TAX_EXEMPTION.UPDATED
                    - TAX_EXEMPTION.DELETED
                object:
                  title: Webhook - Tax exemption - Created - Tax exemption
                  type: object
                  additionalProperties: false
                  properties:
                    id:
                      title: Tax Exemption Unique Identifier
                      type: string
                      description: Tax Exemption Unique Identifier
                      format: uuid
                    created_at:
                      type: string
                      format: date-time
                      description: >-
                        Date and time when the resource was created. [RFC
                        3339-5](https://datatracker.ietf.org/doc/html/rfc3339#section-5.6),
                        [ISO8601
                        UTC](https://www.iso.org/iso-8601-date-and-time-format.html)
                    updated_at:
                      type: string
                      format: date-time
                      description: >-
                        Date and time when the resource was last updated. [RFC
                        3339-5](https://datatracker.ietf.org/doc/html/rfc3339#section-5.6),
                        [ISO8601
                        UTC](https://www.iso.org/iso-8601-date-and-time-format.html)
                    status:
                      title: Tax exemption status
                      type: string
                      description: >-
                        Tax exemption status 

                        * NEW - The tax exemption request is created. 

                        * ACTIVE - The tax exemption is valid and active for the
                        current year. 

                        * EXPIRED - The tax exemption is no longer `ACTIVE` and
                        the `valid_to_date` already lies in the past. An update
                        is not possible. 

                        * CANCELLED - The tax exemption could not be created or
                        was cancelled.
                      enum:
                        - NEW
                        - ACTIVE
                        - EXPIRED
                        - CANCELLED
                    user_ids:
                      description: Ids of the users for whom the tax exemption was created.
                      type: array
                      items:
                        title: User unique identifier.
                        type: string
                        description: User unique identifier.
                        format: uuid
                    country:
                      description: >-
                        Country code. [ISO 3166 alpha-2
                        Codes](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2).
                      type: string
                      pattern: ^[A-Z]{2}$
                    valid_from_date:
                      type: string
                      format: date
                      description: >-
                        Date from which the tax exemption is valid. [RFC 3339,
                        section
                        5.6](https://json-schema.org/draft/2020-12/json-schema-validation.html#RFC3339)
                    valid_to_date:
                      type: string
                      format: date
                      nullable: true
                      description: >-
                        Date until which the tax exemption is valid. If it is
                        unlimited, it is omitted. For Germany it is always the
                        last day of the year (YYYY-12-31). [RFC 3339, section
                        5.6](https://json-schema.org/draft/2020-12/json-schema-validation.html#RFC3339)
                    tax_exemption_details:
                      title: Tax Exemption - German Tax Exemption Details
                      type: object
                      additionalProperties: false
                      properties:
                        tax_exemption_type:
                          title: Tax Exemption Type
                          type: string
                          description: |-
                            Tax exemption type 
                            * SINGLE - Tax exemption for Individual. 
                            * MARRIED - Tax exemption for married couples.
                          enum:
                            - SINGLE
                            - MARRIED
                        tax_exemption_amount:
                          title: >-
                            Tax Exemption - Create - Request - Tax Exemption
                            Details - Amount
                          type: object
                          additionalProperties: false
                          properties:
                            amount:
                              type: string
                              pattern: ^[0-9]{1,9}(\.[0-9]{2})?$
                            currency:
                              type: string
                              description: >-
                                Alphabetic three-letter [ISO
                                4217](https://en.wikipedia.org/wiki/ISO_4217)
                                currency code.

                                * EUR - Euro
                              enum:
                                - EUR
                              default: EUR
                          required:
                            - amount
                            - currency
                        utilized_amount:
                          title: >-
                            Tax Exemption - Create - Request - Tax Exemption
                            Details - Amount
                          type: object
                          additionalProperties: false
                          properties:
                            amount:
                              type: string
                              pattern: ^[0-9]{1,9}(\.[0-9]{2})?$
                            currency:
                              type: string
                              description: >-
                                Alphabetic three-letter [ISO
                                4217](https://en.wikipedia.org/wiki/ISO_4217)
                                currency code.

                                * EUR - Euro
                              enum:
                                - EUR
                              default: EUR
                          required:
                            - amount
                            - currency
                        remaining_amount:
                          title: >-
                            Tax Exemption - Create - Request - Tax Exemption
                            Details - Amount
                          type: object
                          additionalProperties: false
                          properties:
                            amount:
                              type: string
                              pattern: ^[0-9]{1,9}(\.[0-9]{2})?$
                            currency:
                              type: string
                              description: >-
                                Alphabetic three-letter [ISO
                                4217](https://en.wikipedia.org/wiki/ISO_4217)
                                currency code.

                                * EUR - Euro
                              enum:
                                - EUR
                              default: EUR
                          required:
                            - amount
                            - currency
                      required:
                        - tax_exemption_type
                        - tax_exemption_amount
                        - utilized_amount
                        - remaining_amount
                  required:
                    - id
                    - status
                    - user_ids
                    - country
                    - valid_from_date
                    - valid_to_date
                    - tax_exemption_details
                    - created_at
                    - updated_at
                webhook_id:
                  title: Webhook ID
                  type: string
                  description: Webhook unique identifier.
                  format: uuid
              required:
                - id
                - created_at
                - type
                - object
                - webhook_id
              additionalProperties: false
            examples:
              tax_exemption_created:
                summary: Tax Exemption Created
                value:
                  id: 295cf14f-368c-450e-b57e-48d115d30fe4
                  created_at: '2024-01-01T10:34:43Z'
                  type: TAX_EXEMPTION.CREATED
                  object:
                    id: f1a57a04-1a89-4dab-ae3a-ff9b2a9377c1
                    created_at: '2024-01-01T10:33:43Z'
                    updated_at: '2024-01-01T10:33:43Z'
                    status: ACTIVE
                    user_ids:
                      - 70821d79-366f-4873-804b-14857d690496
                    country: DE
                    valid_from_date: '2024-01-01'
                    valid_to_date: '2024-12-31'
                    tax_exemption_details:
                      tax_exemption_type: SINGLE
                      tax_exemption_amount:
                        amount: '1000.00'
                        currency: EUR
                      utilized_amount:
                        amount: '0.00'
                        currency: EUR
                      remaining_amount:
                        amount: '1000.00'
                        currency: EUR
                  webhook_id: 4a80c45f-204c-4498-ac20-d900a846e166
              tax_exemption_updated:
                summary: Tax Exemption Updated
                value:
                  id: 295cf14f-368c-450e-b57e-48d115d30fe4
                  created_at: '2024-01-01T10:34:43Z'
                  type: TAX_EXEMPTION.UPDATED
                  object:
                    id: f1a57a04-1a89-4dab-ae3a-ff9b2a9377c1
                    created_at: '2024-01-01T10:33:43Z'
                    updated_at: '2024-01-01T10:33:43Z'
                    status: ACTIVE
                    user_ids:
                      - 70821d79-366f-4873-804b-14857d690496
                    country: DE
                    valid_from_date: '2024-01-01'
                    valid_to_date: '2024-12-31'
                    tax_exemption_details:
                      tax_exemption_type: SINGLE
                      tax_exemption_amount:
                        amount: '1000.00'
                        currency: EUR
                      utilized_amount:
                        amount: '0.00'
                        currency: EUR
                      remaining_amount:
                        amount: '1000.00'
                        currency: EUR
                  webhook_id: c10c4156-5f34-46cd-82b8-4ef84f0f3e24
              tax_exemption_deleted:
                summary: Tax Exemption Deleted
                value:
                  id: 295cf14f-368c-450e-b57e-48d115d30fe4
                  created_at: '2024-01-01T10:34:43Z'
                  type: TAX_EXEMPTION.DELETED
                  object:
                    id: f1a57a04-1a89-4dab-ae3a-ff9b2a9377c1
                    created_at: '2024-01-01T10:33:43Z'
                    updated_at: '2024-09-01T01:13:03Z'
                    status: ACTIVE
                    user_ids:
                      - 70821d79-366f-4873-804b-14857d690496
                    country: DE
                    valid_from_date: '2024-01-01'
                    valid_to_date: '2024-12-31'
                    tax_exemption_details:
                      tax_exemption_type: SINGLE
                      tax_exemption_amount:
                        amount: '1000.00'
                        currency: EUR
                      utilized_amount:
                        amount: '0.00'
                        currency: EUR
                      remaining_amount:
                        amount: '1000.00'
                        currency: EUR
                  webhook_id: cd26a6ce-7a1c-47de-a6fc-b5dfd996da99
      responses:
        '200':
          description: Request has been processed successfully.
  Tax exemption failure events:
    post:
      operationId: tax_exemption_failure_event
      summary: Tax Exemption Failure Events
      description: Tax Exemption Failure Events
      tags:
        - Tax Exemptions
      requestBody:
        content:
          application/json:
            schema:
              title: Webhook - Tax Exemptions - Update Failed
              type: object
              properties:
                id:
                  type: string
                  format: uuid
                  description: Event unique identifier
                created_at:
                  type: string
                  format: date-time
                  description: >-
                    Date and time when the event was created. [RFC
                    3339-5](https://datatracker.ietf.org/doc/html/rfc3339#section-5.6),
                    [ISO8601
                    UTC](https://www.iso.org/iso-8601-date-and-time-format.html)
                type:
                  title: Tax Exemption Update Webhook Type
                  type: string
                  description: >-
                    Type of the tax exemption failure events webhook. 

                    * TAX_EXEMPTION.CREATION_FAILED - Tax exemption creation
                    failed. 

                    * TAX_EXEMPTION.UPDATE_FAILED - Tax exemption update
                    failed. 

                    * TAX_EXEMPTION.DELETION_FAILED - Tax exemption deletion
                    failed.
                  enum:
                    - TAX_EXEMPTION.CREATION_FAILED
                    - TAX_EXEMPTION.UPDATE_FAILED
                    - TAX_EXEMPTION.DELETION_FAILED
                object:
                  title: Webhook - Tax exemption - Created - Tax exemption
                  type: object
                  additionalProperties: false
                  properties:
                    id:
                      title: Tax Exemption Unique Identifier
                      type: string
                      description: Tax Exemption Unique Identifier
                      format: uuid
                    created_at:
                      type: string
                      format: date-time
                      description: >-
                        Date and time when the resource was created. [RFC
                        3339-5](https://datatracker.ietf.org/doc/html/rfc3339#section-5.6),
                        [ISO8601
                        UTC](https://www.iso.org/iso-8601-date-and-time-format.html)
                    updated_at:
                      type: string
                      format: date-time
                      description: >-
                        Date and time when the resource was last updated. [RFC
                        3339-5](https://datatracker.ietf.org/doc/html/rfc3339#section-5.6),
                        [ISO8601
                        UTC](https://www.iso.org/iso-8601-date-and-time-format.html)
                    reason:
                      type: string
                      description: Reason for the failure of the tax exemption request.
                    status:
                      title: Tax exemption status
                      type: string
                      description: >-
                        Tax exemption status 

                        * NEW - The tax exemption request is created. 

                        * ACTIVE - The tax exemption is valid and active for the
                        current year. 

                        * EXPIRED - The tax exemption is no longer `ACTIVE` and
                        the `valid_to_date` already lies in the past. An update
                        is not possible. 

                        * CANCELLED - The tax exemption could not be created or
                        was cancelled.
                      enum:
                        - NEW
                        - ACTIVE
                        - EXPIRED
                        - CANCELLED
                    user_ids:
                      description: Ids of the users for whom the tax exemption was created.
                      type: array
                      items:
                        title: User unique identifier.
                        type: string
                        description: User unique identifier.
                        format: uuid
                  required:
                    - id
                    - reason
                    - status
                    - user_ids
                    - created_at
                    - updated_at
                webhook_id:
                  title: Webhook ID
                  type: string
                  description: Webhook unique identifier.
                  format: uuid
              required:
                - id
                - created_at
                - type
                - object
                - webhook_id
              additionalProperties: false
            examples:
              tax_exemption_created:
                summary: Tax Exemption Created
                value:
                  id: 2ce641a1-e89c-43be-b8d8-981d4aac5bd5
                  created_at: '2024-01-01T10:34:43Z'
                  type: TAX_EXEMPTION.CREATION_FAILED
                  object:
                    id: f1a57a04-1a89-4dab-ae3a-ff9b2a9377c1
                    created_at: '2024-01-01T10:33:43Z'
                    updated_at: '2024-01-01T10:33:43Z'
                    reason: Missing TIN
                    status: CANCELLED
                    user_ids:
                      - 70821d79-366f-4873-804b-14857d690496
                  webhook_id: 606e3c01-c9cf-4073-900e-718bfc521953
              tax_exemption_updated:
                summary: Tax Exemption Updated
                value:
                  id: 2ce641a1-e89c-43be-b8d8-981d4aac5bd5
                  created_at: '2024-01-01T10:34:43Z'
                  type: TAX_EXEMPTION.UPDATE_FAILED
                  object:
                    id: f1a57a04-1a89-4dab-ae3a-ff9b2a9377c1
                    created_at: '2024-01-01T10:33:43Z'
                    updated_at: '2024-01-01T10:33:43Z'
                    reason: Invalid Amount
                    status: CANCELLED
                    user_ids:
                      - 70821d79-366f-4873-804b-14857d690496
                  webhook_id: 0a50586f-74d7-49ea-b2e8-bb02e9e8ee3b
              tax_exemption_deleted:
                summary: Tax Exemption Deleted
                value:
                  id: 43020799-f975-4973-aa5a-be2536efb6dd
                  created_at: '2024-01-01T10:34:43Z'
                  type: TAX_EXEMPTION.DELETION_FAILED
                  object:
                    id: f1670eb3-ccfc-473b-b628-0d8530ebe62d
                    reason: Tax exemption amount already utilised
                    status: ACTIVE
                    user_ids:
                      - a9947111-579b-4652-a53d-d7b81f2e50c8
                    created_at: '2024-01-01T10:33:43Z'
                    updated_at: '2024-01-01T10:33:43Z'
                  webhook_id: c2588a12-a22b-4d79-bada-24cfb9794727
      responses:
        '200':
          description: Request has been processed successfully.
  Tax collection events:
    post:
      operationId: tax_collection_event
      summary: Tax Collection Events
      description: Tax Collection Events
      tags:
        - Tax Collections
      requestBody:
        content:
          application/json:
            schema:
              title: Webhook - Tax Collection - Updated
              type: object
              properties:
                id:
                  type: string
                  format: uuid
                  description: Event unique identifier
                created_at:
                  type: string
                  format: date-time
                  description: >-
                    Date and time when the event was created. [RFC
                    3339-5](https://datatracker.ietf.org/doc/html/rfc3339#section-5.6),
                    [ISO8601
                    UTC](https://www.iso.org/iso-8601-date-and-time-format.html)
                type:
                  title: Tax Collection Webhook Type
                  type: string
                  description: >-
                    Tax collection webhook type 

                    * TAX_COLLECTION.CREATED - Tax collection processing started
                    successfully. 

                    * TAX_COLLECTION.FINALISED - Tax collection processing
                    finalised successfully. 

                    * TAX_COLLECTION.CANCELLED - Tax collection processing
                    cancelled successfully.
                  enum:
                    - TAX_COLLECTION.CREATED
                    - TAX_COLLECTION.FINALISED
                    - TAX_COLLECTION.CANCELLED
                object:
                  title: Webhook - Tax collection
                  type: object
                  additionalProperties: false
                  properties:
                    id:
                      type: string
                      description: Tax Collection Unique Identifier
                      format: uuid
                    created_at:
                      type: string
                      format: date-time
                      description: >-
                        Date and time when the resource was created. [RFC
                        3339-5](https://datatracker.ietf.org/doc/html/rfc3339#section-5.6),
                        [ISO8601
                        UTC](https://www.iso.org/iso-8601-date-and-time-format.html)
                    updated_at:
                      type: string
                      format: date-time
                      description: >-
                        Date and time when the resource was last updated. [RFC
                        3339-5](https://datatracker.ietf.org/doc/html/rfc3339#section-5.6),
                        [ISO8601
                        UTC](https://www.iso.org/iso-8601-date-and-time-format.html)
                    account_group_id:
                      type: string
                      description: Account Group Unique Identifier
                      format: uuid
                    type:
                      type: string
                      description: >-
                        Type of the tax collection

                        * TAX_PREPAYMENT_DE - German preliminary lump-sum tax
                        payment

                        * TAX_PAYMENT - Tax payment
                      enum:
                        - TAX_PREPAYMENT_DE
                        - TAX_PAYMENT
                    collection_amount:
                      type: object
                      description: Total amount of taxes to be collected
                      additionalProperties: false
                      properties:
                        amount:
                          type: string
                          pattern: ^[0-9]{1,9}(\.[0-9]{2})?$
                        currency:
                          type: string
                          description: >-
                            Alphabetic three-letter [ISO
                            4217](https://en.wikipedia.org/wiki/ISO_4217)
                            currency code.

                            * EUR - Euro
                          enum:
                            - EUR
                          default: EUR
                      required:
                        - amount
                        - currency
                    instrument:
                      type: object
                      description: Instrument details
                      additionalProperties: false
                      properties:
                        uuid:
                          type: string
                          description: Instrument Unique Identifier
                          format: uuid
                        isin:
                          title: International securities identification number
                          type: string
                          description: >-
                            International securities identification number
                            defined by [ISO
                            6166](https://en.wikipedia.org/wiki/International_Securities_Identification_Number).
                          pattern: ^[A-Z]{2}[A-Z0-9]{9}[0-9]$
                      required:
                        - uuid
                        - isin
                    processed_amount:
                      type: object
                      description: Processed amount details
                      additionalProperties: false
                      properties:
                        cash_balance:
                          type: object
                          description: Taxes collected from the cash balance
                          additionalProperties: false
                          properties:
                            amount:
                              type: string
                              pattern: ^[0-9]{1,9}(\.[0-9]{2})?$
                            currency:
                              type: string
                              description: >-
                                Alphabetic three-letter [ISO
                                4217](https://en.wikipedia.org/wiki/ISO_4217)
                                currency code.

                                * EUR - Euro
                              enum:
                                - EUR
                              default: EUR
                          required:
                            - amount
                            - currency
                        sell_to_cover:
                          type: object
                          description: Taxes collected by selling assets
                          additionalProperties: false
                          properties:
                            amount:
                              type: string
                              pattern: ^[0-9]{1,9}(\.[0-9]{2})?$
                            currency:
                              type: string
                              description: >-
                                Alphabetic three-letter [ISO
                                4217](https://en.wikipedia.org/wiki/ISO_4217)
                                currency code.

                                * EUR - Euro
                              enum:
                                - EUR
                              default: EUR
                          required:
                            - amount
                            - currency
                        offset_amount:
                          type: object
                          description: Taxes collected by offsetting automatic corrections
                          additionalProperties: false
                          properties:
                            amount:
                              type: string
                              pattern: ^[0-9]{1,9}(\.[0-9]{2})?$
                            currency:
                              type: string
                              description: >-
                                Alphabetic three-letter [ISO
                                4217](https://en.wikipedia.org/wiki/ISO_4217)
                                currency code.

                                * EUR - Euro
                              enum:
                                - EUR
                              default: EUR
                          required:
                            - amount
                            - currency
                      required:
                        - cash_balance
                        - sell_to_cover
                        - offset_amount
                    status:
                      type: string
                      description: >-
                        Tax collection status 

                        * PROCESSING - The tax collection processing has
                        started. 

                        * FINALISED - The tax collection has been processed
                        successfully. 

                        * CANCELLED - The tax collection was cancelled.
                      enum:
                        - PROCESSING
                        - FINALISED
                        - CANCELLED
                    references:
                      type: array
                      items:
                        type: object
                        description: Identifier related to the tax collection.
                        additionalProperties: false
                        properties:
                          id:
                            type: string
                            description: Referenced Identifier
                          type:
                            type: string
                            description: >-
                              Type of the referenced identifier.

                              * EXTERNAL_TAX_TRANSACTION_ID - External tax
                              transaction ID
                            enum:
                              - EXTERNAL_TAX_TRANSACTION_ID
                        required:
                          - id
                          - type
                  required:
                    - id
                    - created_at
                    - updated_at
                    - type
                    - collection_amount
                    - processed_amount
                    - status
                webhook_id:
                  title: Webhook ID
                  type: string
                  description: Webhook unique identifier.
                  format: uuid
              required:
                - id
                - created_at
                - type
                - object
                - webhook_id
              additionalProperties: false
            examples:
              tax_collection_created:
                summary: Tax Collection Created
                value:
                  id: 38fc59d0-fc42-46ef-9512-824773219b2e
                  created_at: '2024-08-19T13:06:57.820371265Z'
                  type: TAX_COLLECTION.CREATED
                  webhook_id: 1b097e06-8a14-4181-b72a-de0972a3c57b
                  object:
                    account_group_id: 999f7566-2ca3-4007-b99d-e501be8c7222
                    collection_amount:
                      amount: '100.00'
                      currency: EUR
                    id: d77e6924-9bb7-4db0-addc-404442258f4b
                    type: TAX_PREPAYMENT_DE
                    instrument:
                      uuid: d77e6924-9bb7-4db0-addc-404442258f4b
                      isin: DE000A0D8QZ0
                    processed_amount:
                      cash_balance:
                        amount: '0.00'
                        currency: EUR
                      sell_to_cover:
                        amount: '0.00'
                        currency: EUR
                      offset_amount:
                        amount: '0.00'
                        currency: EUR
                    status: PROCESSING
                    updated_at: '2024-08-19T13:06:57.820371265Z'
                    created_at: '2024-08-19T13:06:57.820371265Z'
              tax_collection_finalised:
                summary: Tax Collection Finalised
                value:
                  id: 38fc59d0-fc42-46ef-9512-824773219b2e
                  created_at: '2024-08-19T13:06:59.000000000Z'
                  type: TAX_COLLECTION.FINALISED
                  webhook_id: 1b097e06-8a14-4181-b72a-de0972a3c57b
                  object:
                    account_group_id: 999f7566-2ca3-4007-b99d-e501be8c7222
                    collection_amount:
                      amount: '100.00'
                      currency: EUR
                    id: d77e6924-9bb7-4db0-addc-404442258f4b
                    type: TAX_PREPAYMENT_DE
                    instrument:
                      uuid: d77e6924-9bb7-4db0-addc-404442258f4b
                      isin: DE000A0D8QZ0
                    processed_amount:
                      cash_balance:
                        amount: '0.00'
                        currency: EUR
                      sell_to_cover:
                        amount: '90.00'
                        currency: EUR
                      offset_amount:
                        amount: '10.00'
                        currency: EUR
                    status: FINALISED
                    updated_at: '2024-08-19T13:06:59.000000000Z'
                    created_at: '2024-08-19T13:06:57.820371265Z'
                    references:
                      - id: CA_AUTO_50087_265145_I_0
                        type: EXTERNAL_TAX_TRANSACTION_ID
              tax_collection_cancelled:
                summary: Tax Collection Cancelled
                value:
                  id: 38fc59d0-fc42-46ef-9512-824773219b2e
                  created_at: '2024-08-19T13:06:59.000000000Z'
                  type: TAX_COLLECTION.CANCELLED
                  webhook_id: 1b097e06-8a14-4181-b72a-de0972a3c57b
                  object:
                    account_group_id: 999f7566-2ca3-4007-b99d-e501be8c7222
                    collection_amount:
                      amount: '100.00'
                      currency: EUR
                    id: d77e6924-9bb7-4db0-addc-404442258f4b
                    type: TAX_PREPAYMENT_DE
                    instrument:
                      uuid: d77e6924-9bb7-4db0-addc-404442258f4b
                      isin: DE000A0D8QZ0
                    processed_amount:
                      cash_balance:
                        amount: '0.00'
                        currency: EUR
                      sell_to_cover:
                        amount: '0.00'
                        currency: EUR
                      offset_amount:
                        amount: '0.00'
                        currency: EUR
                    status: CANCELLED
                    updated_at: '2024-08-19T13:06:59.000000000Z'
                    created_at: '2024-08-19T13:06:57.820371265Z'
      responses:
        '200':
          description: Request has been processed successfully.
  ISA tax wrapper events:
    post:
      operationId: isa_tax_wrappers_event
      summary: ISA Tax Wrappers events
      description: ISA Tax Wrappers events
      tags:
        - Tax Wrappers
      requestBody:
        content:
          application/json:
            schema:
              title: Tax Wrappers - ISA Tax Wrapper Event
              type: object
              properties:
                id:
                  type: string
                  format: uuid
                  description: Event unique identifier
                created_at:
                  type: string
                  format: date-time
                  description: >-
                    Date and time when the event was created. [RFC
                    3339-5](https://datatracker.ietf.org/doc/html/rfc3339#section-5.6),
                    [ISO8601
                    UTC](https://www.iso.org/iso-8601-date-and-time-format.html)
                type:
                  title: ISA Tax Wrapper Webhook Type
                  type: string
                  description: >-
                    The type of ISA tax wrapper event

                    * NEW - The tax wrapper is newly created and not yet active
                    due to pending checks.

                    * ACTIVE - The tax wrapper is currently active and in use.

                    * INACTIVE - The tax wrapper is not currently active. New
                    subscriptions not allowed.

                    * CLOSED - The tax wrapper has been closed and is no longer
                    available.
                  enum:
                    - ISA_WRAPPER.NEW
                    - ISA_WRAPPER.ACTIVE
                    - ISA_WRAPPER.INACTIVE
                    - ISA_WRAPPER.CLOSED
                object:
                  title: Tax Wrappers - ISA Tax Wrapper
                  type: object
                  additionalProperties: false
                  properties:
                    id:
                      type: string
                      description: Tax wrapper unique identifier.
                      format: uuid
                    created_at:
                      type: string
                      description: The date and time the tax wrapper was created.
                      format: date-time
                    updated_at:
                      type: string
                      description: The date and time the tax wrapper was last updated.
                      format: date-time
                    account_group_id:
                      type: string
                      description: Account group unique identifier.
                      format: uuid
                    is_flexible:
                      type: boolean
                      description: True if tax wrapper is flexible.
                    status:
                      type: string
                      description: >-
                        Status of the tax wrapper

                        * NEW - The tax wrapper is newly created and not yet
                        active due to pending checks.

                        * ACTIVE - The tax wrapper is currently active and in
                        use.

                        * INACTIVE - The tax wrapper is not currently active.
                        New subscriptions not allowed.

                        * CLOSED - The tax wrapper has been closed and is no
                        longer available.
                      enum:
                        - NEW
                        - ACTIVE
                        - INACTIVE
                        - CLOSED
                    type:
                      type: string
                      description: Types of the ISA tax wrapper
                      enum:
                        - STOCKS_AND_SHARES_ISA
                      default: STOCKS_AND_SHARES_ISA
                  required:
                    - id
                    - created_at
                    - updated_at
                    - account_group_id
                    - is_flexible
                    - status
                    - type
                webhook_id:
                  title: Webhook ID
                  type: string
                  description: Webhook unique identifier.
                  format: uuid
              required:
                - id
                - type
                - object
                - webhook_id
                - created_at
              additionalProperties: false
            examples:
              tax_wrapper_new:
                summary: Tax Wrapper New
                value:
                  id: 295cf14f-368c-450e-b57e-48d115d30fe4
                  created_at: '2025-08-01T10:34:43Z'
                  type: ISA_WRAPPER.NEW
                  object:
                    id: f1a57a04-1a89-4dab-ae3a-ff9b2a9377c1
                    created_at: '2025-08-01T10:33:43Z'
                    updated_at: '2025-08-01T10:33:43Z'
                    account_group_id: d4b5c6e7-89f0-4a1b-9c2d-3e4f5a6b7c8d
                    is_flexible: true
                    status: NEW
                    type: STOCKS_AND_SHARES_ISA
                  webhook_id: 4a80c45f-204c-4498-ac20-d900a846e166
      responses:
        '200':
          description: Request has been processed successfully.
  ISA allowance events:
    post:
      operationId: isa_allowance_event
      summary: ISA Allowance events
      description: ISA Allowance events
      tags:
        - Tax Wrappers
      requestBody:
        content:
          application/json:
            schema:
              title: Tax Wrappers - ISA Allowance Event
              type: object
              properties:
                id:
                  type: string
                  format: uuid
                  description: Event unique identifier
                created_at:
                  type: string
                  format: date-time
                  description: >-
                    Date and time when the event was created. [RFC
                    3339-5](https://datatracker.ietf.org/doc/html/rfc3339#section-5.6),
                    [ISO8601
                    UTC](https://www.iso.org/iso-8601-date-and-time-format.html)
                type:
                  title: ISA Allowance Webhook Type
                  type: string
                  description: |-
                    The type of ISA allowance event:
                    * CREATED: Allowance was created.
                    * UPDATED: Allowance was updated.
                    * EXPIRED: Allowance is no longer valid.
                  enum:
                    - ISA_WRAPPER_ALLOWANCE.CREATED
                    - ISA_WRAPPER_ALLOWANCE.UPDATED
                    - ISA_WRAPPER_ALLOWANCE.EXPIRED
                object:
                  title: Tax Wrappers - ISA Allowance
                  type: object
                  additionalProperties: false
                  properties:
                    id:
                      type: string
                      description: Allowance unique identifier.
                      format: uuid
                    created_at:
                      type: string
                      description: The date and time the tax wrapper was created.
                      format: date-time
                    updated_at:
                      type: string
                      description: The date and time the tax wrapper was last updated.
                      format: date-time
                    tax_wrapper_id:
                      type: string
                      description: Tax wrapper unique identifier.
                      format: uuid
                    tax_year:
                      oneOf:
                        - type: 'null'
                        - type: string
                          description: >-
                            Tax year the allowance applies to, in the format
                            'YYYY/YYYY'.
                          pattern: ^[0-9]{4}/[0-9]{4}$
                    type:
                      type: string
                      description: |-
                        Type of the allowance:
                        * ANNUAL - Allowance valid for a tax year.
                      enum:
                        - ANNUAL
                      default: ANNUAL
                    status:
                      type: string
                      description: |-
                        Status of the allowance:
                        * ACTIVE - Current allowance.
                        * EXPIRED - Allowance from previous years.
                      enum:
                        - ACTIVE
                        - EXPIRED
                    currency:
                      type: string
                      description: >-
                        Alphabetic three-letter [ISO
                        4217](https://en.wikipedia.org/wiki/ISO_4217) currency
                        code.

                        * GBP - British Pound Sterling
                      enum:
                        - GBP
                      default: GBP
                    total_amount:
                      type: string
                      pattern: ^[0-9]{1,9}(\.[0-9]{2})?$
                    used_amount:
                      type: string
                      pattern: ^[0-9]{1,9}(\.[0-9]{2})?$
                    remaining_amount:
                      type: string
                      pattern: ^[0-9]{1,9}(\.[0-9]{2})?$
                    valid_from:
                      type: string
                      description: The date from which the allowance is valid.
                      format: date-time
                    valid_to:
                      oneOf:
                        - type: 'null'
                        - type: string
                          format: date-time
                          description: The date until which the allowance is valid.
                    first_subscription_at:
                      oneOf:
                        - type: 'null'
                        - type: string
                          format: date-time
                          description: >-
                            The date of the first subscription that used this
                            allowance.
                  required:
                    - id
                    - created_at
                    - updated_at
                    - tax_wrapper_id
                    - type
                    - status
                    - currency
                    - total_amount
                    - used_amount
                    - remaining_amount
                    - valid_from
                webhook_id:
                  title: Webhook ID
                  type: string
                  description: Webhook unique identifier.
                  format: uuid
              required:
                - id
                - type
                - object
                - webhook_id
                - created_at
              additionalProperties: false
            examples:
              allowance_updated:
                summary: Allowance Updated
                value:
                  id: 295cf14f-368c-450e-b57e-48d115d30fe4
                  created_at: '2025-08-01T10:34:43Z'
                  type: ISA_WRAPPER_ALLOWANCE.UPDATED
                  object:
                    id: f1a57a04-1a89-4dab-ae3a-ff9b2a9377c1
                    created_at: '2025-10-05T14:48:00.000Z'
                    updated_at: '2025-10-05T14:48:00.000Z'
                    tax_wrapper_id: 0d68fea2-66e8-4ea8-b507-276e7a1eb4aa
                    tax_year: 2025/2026
                    type: ANNUAL
                    status: ACTIVE
                    currency: GBP
                    total_amount: '20000.00'
                    used_amount: '1000.00'
                    remaining_amount: '19000.00'
                    valid_from: '2025-04-06T00:00:00.000Z'
                    valid_to: '2026-04-05T23:59:59.000Z'
                    first_subscription_at: '2025-05-13T00:00:00.000Z'
                  webhook_id: 4a80c45f-204c-4498-ac20-d900a846e166
      responses:
        '200':
          description: Request has been processed successfully.
  Orders events:
    post:
      operationId: order_event
      summary: Orders events
      description: Orders events
      tags:
        - Orders
      requestBody:
        content:
          application/json:
            schema:
              title: Webhook - Orders - Callback
              type: object
              properties:
                id:
                  type: string
                  format: uuid
                  description: Event unique identifier
                created_at:
                  type: string
                  format: date-time
                  description: >-
                    Date and time when the event was created. [RFC
                    3339-5](https://datatracker.ietf.org/doc/html/rfc3339#section-5.6),
                    [ISO8601
                    UTC](https://www.iso.org/iso-8601-date-and-time-format.html)
                type:
                  type: string
                  description: Event type
                  enum:
                    - ORDER.NEW
                    - ORDER.PROCESSING
                    - ORDER.FILLED
                    - ORDER.CANCELLED
                object:
                  title: Order
                  type: object
                  properties:
                    id:
                      title: Order unique identifier
                      type: string
                      format: uuid
                    created_at:
                      type: string
                      format: date-time
                      description: >-
                        Date and time when the resource was created. [RFC
                        3339-5](https://datatracker.ietf.org/doc/html/rfc3339#section-5.6),
                        [ISO8601
                        UTC](https://www.iso.org/iso-8601-date-and-time-format.html)
                    updated_at:
                      type: string
                      format: date-time
                      description: >-
                        Date and time when the resource was last updated. [RFC
                        3339-5](https://datatracker.ietf.org/doc/html/rfc3339#section-5.6),
                        [ISO8601
                        UTC](https://www.iso.org/iso-8601-date-and-time-format.html)
                    user_id:
                      type: string
                      format: uuid
                      description: The ID of the user
                    account_id:
                      type: string
                      format: uuid
                      description: The ID of the account that owns the order
                    cash_amount:
                      allOf:
                        - type: string
                          pattern: ^[0-9]{1,9}(\.[0-9]{2})?$
                        - description: >-
                            Cash amount for a nominal order, not required if a
                            share quantity is specified.
                    currency:
                      allOf:
                        - type: string
                          description: >-
                            Alphabetic three-letter [ISO
                            4217](https://en.wikipedia.org/wiki/ISO_4217)
                            currency code.

                            * EUR - Euro

                            * GBP - British Pound
                          enum:
                            - EUR
                            - GBP
                        - description: The currency for the order.
                    side:
                      type: string
                      description: |-
                        Side of the order.
                        * BUY - 
                        * SELL - 
                      enum:
                        - BUY
                        - SELL
                    instrument_id:
                      title: International securities identification number
                      type: string
                      description: >-
                        International securities identification number defined
                        by [ISO
                        6166](https://en.wikipedia.org/wiki/International_Securities_Identification_Number).
                      pattern: ^[A-Z]{2}[A-Z0-9]{9}[0-9]$
                    instrument_id_type:
                      description: |-
                        The type of the ID used in the request.
                        * ISIN - 
                      enum:
                        - ISIN
                      default: ISIN
                      type: string
                    order_type:
                      type: string
                      description: |-
                        Type of the order.
                        * MARKET - 
                        * LIMIT - 
                        * STOP - 
                      enum:
                        - MARKET
                        - LIMIT
                        - STOP
                    quantity:
                      allOf:
                        - type: string
                          pattern: ^[0-9]{0,63}(\.[0-9]{1,27})?$
                        - description: >-
                            Quantity of securities for the order. Only required
                            if the cash amount is not specified.
                    user_instrument_fit_acknowledgement:
                      type: boolean
                      description: >-
                        Only applicable if the user has failed the instrument
                        fit check for the instrument type being ordered. True if
                        the user has acknowledged their willingness to trade.
                    limit_price:
                      allOf:
                        - type: string
                          pattern: ^[0-9]{0,63}(\.[0-9]{1,27})?$
                        - description: The limit price for orders of the type 'limit'.
                    stop_price:
                      allOf:
                        - type: string
                          pattern: ^[0-9]{0,63}(\.[0-9]{1,27})?$
                        - description: The stop price for orders of the type 'stop'.
                    expiry_date:
                      allOf:
                        - title: Expiry date
                          type: string
                          pattern: ^[0-9]{4}-[0-9]{2}-[0-9]{2}$
                        - description: >-
                            The order expiration date (last day the order can
                            trade) in the YYYY-MM-DD format. [RFC 3339, section
                            5.6](https://json-schema.org/draft/2020-12/json-schema-validation.html#RFC3339)
                            RFC 3339. The default value is order creation date +
                            200 years
                    status:
                      type: string
                      description: |-
                        The execution status of the order.
                        * NEW - 
                        * PROCESSING - 
                        * FILLED - 
                        * CANCELLED - 
                      enum:
                        - NEW
                        - PROCESSING
                        - FILLED
                        - CANCELLED
                    fee:
                      type: string
                      pattern: ^[0-9]{0,63}(\.[0-9]{1,27})?$
                    cancellation_reason:
                      type: string
                      description: >-
                        Reason for Order cancellation. The field is present in
                        case the Order has a status of CANCELLED.

                        * CANCELLED_BY_CLIENT - 

                        * CANCELLED_BY_UPVEST_OPERATIONS - 

                        * CANCELLED_BY_TRADING_PARTNER - 

                        * CANCELLED_BY_UPVEST_PLATFORM - 
                      enum:
                        - CANCELLED_BY_CLIENT
                        - CANCELLED_BY_UPVEST_OPERATIONS
                        - CANCELLED_BY_TRADING_PARTNER
                        - CANCELLED_BY_UPVEST_PLATFORM
                    initiation_flow:
                      type: string
                      description: >-
                        Initiation flow used during order creation, i.e. what
                        triggered the order.

                        * API - 

                        * PORTFOLIO - 

                        * CASH_DIVIDEND_REINVESTMENT - 

                        * PORTFOLIO_REBALANCING - 

                        * SELL_TO_COVER_FEES - 

                        * SELL_TO_COVER_TAXES - 

                        * ACCOUNT_LIQUIDATION - 

                        * UPVEST_OPERATIONS - 

                        * SAVINGS_PLAN - 
                      enum:
                        - API
                        - PORTFOLIO
                        - CASH_DIVIDEND_REINVESTMENT
                        - PORTFOLIO_REBALANCING
                        - SELL_TO_COVER_FEES
                        - SELL_TO_COVER_TAXES
                        - ACCOUNT_LIQUIDATION
                        - UPVEST_OPERATIONS
                        - SAVINGS_PLAN
                    execution_flow:
                      type: string
                      description: >-
                        Execution flow that the order processing goes through.
                        If no value is specified, the default value is assumed -
                        `STRAIGHT_THROUGH`.

                        * STRAIGHT_THROUGH - 

                        * BLOCK - 
                      enum:
                        - STRAIGHT_THROUGH
                        - BLOCK
                    executions:
                      type: array
                      description: Order executions associated with this order
                      items:
                        title: Order execution
                        type: object
                        properties:
                          id:
                            title: Order execution unique identifier
                            type: string
                            format: uuid
                          cash_amount:
                            type: string
                            pattern: ^[0-9]{1,9}(\.[0-9]{2})?$
                          share_quantity:
                            type: string
                            pattern: ^[0-9]{0,63}(\.[0-9]{1,27})?$
                          price:
                            type: string
                            pattern: ^[0-9]{0,63}(\.[0-9]{1,4})?$
                          transaction_time:
                            type: string
                            format: date-time
                          taxes:
                            type: array
                            items:
                              title: Tax
                              type: object
                              properties:
                                type:
                                  type: string
                                  description: |-
                                    Tax type
                                    * TOTAL - 
                                  default: TOTAL
                                  enum:
                                    - TOTAL
                                amount:
                                  type: string
                                  pattern: ^[0-9]{0,63}(\.[0-9]{1,27})?$
                              required:
                                - type
                                - amount
                          order_id:
                            title: Order unique identifier
                            type: string
                            format: uuid
                          status:
                            type: string
                            description: |-
                              Execution status of the Execution.
                              * FILLED - 
                              * SETTLED - 
                              * CANCELLED - 
                            enum:
                              - FILLED
                              - SETTLED
                              - CANCELLED
                          side:
                            type: string
                            description: |-
                              Side of the execution.
                              * BUY - 
                              * SELL - 
                            enum:
                              - BUY
                              - SELL
                          currency:
                            type: string
                            description: >-
                              Alphabetic three-letter [ISO
                              4217](https://en.wikipedia.org/wiki/ISO_4217)
                              currency code.

                              * EUR - Euro

                              * GBP - British Pound
                            enum:
                              - EUR
                              - GBP
                          settlement_date:
                            allOf:
                              - title: Settlement date
                                type: string
                                pattern: ^[0-9]{4}-[0-9]{2}-[0-9]{2}$
                              - description: >-
                                  Order execution settlement date in the
                                  YYYY-MM-DD format. [RFC 3339, section
                                  5.6](https://json-schema.org/draft/2020-12/json-schema-validation.html#RFC3339)
                                  RFC 3339
                          venue_id:
                            type: string
                            format: uuid
                            description: The ID of the venue
                        required:
                          - id
                          - cash_amount
                          - share_quantity
                          - price
                          - transaction_time
                          - taxes
                          - order_id
                          - status
                          - side
                          - currency
                          - venue_id
                        additionalProperties: false
                    client_reference:
                      type: string
                      description: >-
                        Immutable reference to the API flow that initiated the
                        order. For client initiated API flows, this is a client
                        provided ID. For internal initiations, it is set to the
                        ID of the related object.
                      maxLength: 100
                    fee_configuration:
                      type: array
                      description: fee configuration
                      items:
                        title: Absolute Fee
                        type: object
                        properties:
                          type:
                            title: Fee type
                            description: |-
                              Fee type
                              * TRANSACTION_FEE_BUY - 
                              * TRANSACTION_FEE_SELL - 
                            type: string
                            enum:
                              - TRANSACTION_FEE_BUY
                              - TRANSACTION_FEE_SELL
                          value_type:
                            type: string
                            default: ABSOLUTE
                            description: The value type must be “ABSOLUTE”.
                          charge_method:
                            title: Fee charge method
                            type: string
                            description: >-
                              Indicates whether the fee will be charged by
                              client or by other methods.

                              * CHARGED_BY_CLIENT - 

                              * COLLECTED_BY_UPVEST - 
                            enum:
                              - CHARGED_BY_CLIENT
                              - COLLECTED_BY_UPVEST
                          cash_amount:
                            type: string
                            pattern: ^[0-9]{1,9}(\.[0-9]{2})?$
                          currency:
                            type: string
                            description: >-
                              Alphabetic three-letter [ISO
                              4217](https://en.wikipedia.org/wiki/ISO_4217)
                              currency code.

                              * EUR - Euro

                              * GBP - British Pound
                            enum:
                              - EUR
                              - GBP
                        required:
                          - type
                          - value_type
                          - charge_method
                          - cash_amount
                          - currency
                        additionalProperties: false
                  required:
                    - id
                    - created_at
                    - updated_at
                    - user_id
                    - account_id
                    - cash_amount
                    - currency
                    - side
                    - instrument_id
                    - instrument_id_type
                    - order_type
                    - quantity
                    - status
                    - fee
                    - initiation_flow
                    - executions
                    - client_reference
                  additionalProperties: false
                webhook_id:
                  title: Webhook ID
                  type: string
                  description: Webhook unique identifier.
                  format: uuid
              required:
                - id
                - created_at
                - type
                - object
                - webhook_id
              additionalProperties: false
            example:
              id: 8962b496-8d42-4560-bfab-10490dd1a721
              created_at: '2021-07-21T14:10:00.00Z'
              type: ORDER.NEW
              object:
                id: eb5ba93f-5dfe-4bf1-8571-4da0caacc80c
                created_at: '2021-07-21T14:10:00.00Z'
                updated_at: '2021-07-21T14:10:00.00Z'
                user_id: 2dedfeb0-58cd-44f2-ae08-0e41fe0413d9
                account_id: debf2026-f2da-4ff0-bb84-92e45babb1e3
                cash_amount: '56.65'
                currency: EUR
                side: BUY
                instrument_id: US0378331005
                instrument_id_type: ISIN
                order_type: MARKET
                quantity: '0.05'
                user_instrument_fit_acknowledgement: true
                limit_price: ''
                stop_price: ''
                status: NEW
                fee: '0.5'
                executions: []
                client_reference: ''
                initiation_flow: API
              webhook_id: 9df39835-be87-4243-9018-f2500b39cee6
      responses:
        '200':
          description: Request has been processed successfully.
  Executions events:
    post:
      operationId: execution_event
      summary: Executions events
      description: Executions events
      tags:
        - Orders
      requestBody:
        content:
          application/json:
            schema:
              title: Webhook - Executions - Callback
              type: object
              properties:
                id:
                  type: string
                  format: uuid
                  description: Event unique identifier
                created_at:
                  type: string
                  format: date-time
                  description: >-
                    Date and time when the event was created. [RFC
                    3339-5](https://datatracker.ietf.org/doc/html/rfc3339#section-5.6),
                    [ISO8601
                    UTC](https://www.iso.org/iso-8601-date-and-time-format.html)
                type:
                  type: string
                  description: Event type
                  enum:
                    - EXECUTION.FILLED
                    - EXECUTION.SETTLED
                    - EXECUTION.CANCELLED
                object:
                  title: Order execution
                  type: object
                  properties:
                    id:
                      title: Order execution unique identifier
                      type: string
                      format: uuid
                    cash_amount:
                      type: string
                      pattern: ^[0-9]{1,9}(\.[0-9]{2})?$
                    share_quantity:
                      type: string
                      pattern: ^[0-9]{0,63}(\.[0-9]{1,27})?$
                    price:
                      type: string
                      pattern: ^[0-9]{0,63}(\.[0-9]{1,4})?$
                    transaction_time:
                      type: string
                      format: date-time
                    taxes:
                      type: array
                      items:
                        title: Tax
                        type: object
                        properties:
                          type:
                            type: string
                            description: |-
                              Tax type
                              * TOTAL - 
                            default: TOTAL
                            enum:
                              - TOTAL
                          amount:
                            type: string
                            pattern: ^[0-9]{0,63}(\.[0-9]{1,27})?$
                        required:
                          - type
                          - amount
                    order_id:
                      title: Order unique identifier
                      type: string
                      format: uuid
                    status:
                      type: string
                      description: |-
                        Execution status of the Execution.
                        * FILLED - 
                        * SETTLED - 
                        * CANCELLED - 
                      enum:
                        - FILLED
                        - SETTLED
                        - CANCELLED
                    side:
                      type: string
                      description: |-
                        Side of the execution.
                        * BUY - 
                        * SELL - 
                      enum:
                        - BUY
                        - SELL
                    currency:
                      type: string
                      description: >-
                        Alphabetic three-letter [ISO
                        4217](https://en.wikipedia.org/wiki/ISO_4217) currency
                        code.

                        * EUR - Euro

                        * GBP - British Pound
                      enum:
                        - EUR
                        - GBP
                    settlement_date:
                      allOf:
                        - title: Settlement date
                          type: string
                          pattern: ^[0-9]{4}-[0-9]{2}-[0-9]{2}$
                        - description: >-
                            Order execution settlement date in the YYYY-MM-DD
                            format. [RFC 3339, section
                            5.6](https://json-schema.org/draft/2020-12/json-schema-validation.html#RFC3339)
                            RFC 3339
                    venue_id:
                      type: string
                      format: uuid
                      description: The ID of the venue
                  required:
                    - id
                    - cash_amount
                    - share_quantity
                    - price
                    - transaction_time
                    - taxes
                    - order_id
                    - status
                    - side
                    - currency
                    - venue_id
                  additionalProperties: false
                webhook_id:
                  title: Webhook ID
                  type: string
                  description: Webhook unique identifier.
                  format: uuid
              required:
                - id
                - created_at
                - type
                - object
                - webhook_id
              additionalProperties: false
            example:
              id: 8962b496-8d42-4560-bfab-10490dd1a721
              created_at: '2022-11-17T10:42:34.758Z'
              type: EXECUTION.FILLED
              object:
                cash_amount: '852.20'
                currency: EUR
                id: b40f4631-e83b-4737-a003-c0cb36382bc5
                order_id: cd2d6019-c11d-4114-aab3-b2e5dbe58cbf
                price: '85.22'
                share_quantity: '10'
                side: BUY
                status: FILLED
                taxes:
                  - type: TOTAL
                    amount: '0'
                transaction_time: '2022-11-17T10:42:34.758Z'
                venue_id: 20d6024b-2df4-41ae-8d42-62e4744e455b
              webhook_id: 9df39835-be87-4243-9018-f2500b39cee6
      responses:
        '200':
          description: Request has been processed successfully.
  Order Cancellations events:
    post:
      operationId: order_cancellation_event
      summary: Order Cancellations events
      description: Order Cancellations events
      tags:
        - Orders
      requestBody:
        content:
          application/json:
            schema:
              title: Webhook - Order Cancellations - Callback
              type: object
              properties:
                id:
                  type: string
                  format: uuid
                  description: Event unique identifier
                created_at:
                  type: string
                  format: date-time
                  description: >-
                    Date and time when the event was created. [RFC
                    3339-5](https://datatracker.ietf.org/doc/html/rfc3339#section-5.6),
                    [ISO8601
                    UTC](https://www.iso.org/iso-8601-date-and-time-format.html)
                type:
                  type: string
                  description: Event type
                  enum:
                    - ORDER_CANCELLATION.REJECTED
                object:
                  title: Order Cancellation
                  type: object
                  description: ''
                  properties:
                    order_id:
                      title: Order unique identifier
                      type: string
                      format: uuid
                    status:
                      type: string
                      description: Status of the order cancellation process
                      enum:
                        - REJECTED
                    reason:
                      type: string
                      description: Reason behind order cancellation rejection.
                  required:
                    - order_id
                    - status
                  additionalProperties: false
                webhook_id:
                  title: Webhook ID
                  type: string
                  description: Webhook unique identifier.
                  format: uuid
              required:
                - id
                - created_at
                - type
                - object
                - webhook_id
              additionalProperties: false
            example:
              id: e0b1f0ac-d34a-4f07-b268-545278110231
              created_at: '2023-08-01T14:10:00.00Z'
              type: ORDER_CANCELLATION.REJECTED
              object:
                order_id: 120c5382-d400-4a8e-95fc-d297903f3568
                status: REJECTED
                reason: Cancellation not possible
              webhook_id: 0e225118-168c-4d4d-84d9-c36096163162
      responses:
        '200':
          description: Request has been processed successfully.
  Positions events:
    post:
      operationId: position_event
      summary: Positions events
      description: Positions events
      tags:
        - Positions
      requestBody:
        content:
          application/json:
            schema:
              title: Webhook - Positions - Callback
              type: object
              properties:
                id:
                  type: string
                  format: uuid
                  description: Event unique identifier
                created_at:
                  type: string
                  format: date-time
                  description: >-
                    Date and time when the event was created. [RFC
                    3339-5](https://datatracker.ietf.org/doc/html/rfc3339#section-5.6),
                    [ISO8601
                    UTC](https://www.iso.org/iso-8601-date-and-time-format.html)
                type:
                  type: string
                  description: Event type
                  enum:
                    - POSITION.UPDATED
                  default: POSITION.UPDATED
                object:
                  type: object
                  properties:
                    account_id:
                      title: Account unique identifier.
                      type: string
                      description: Account unique identifier.
                      format: uuid
                    instrument:
                      type: object
                      properties:
                        uuid:
                          type: string
                          description: Instrument unique identifier.
                          format: uuid
                        isin:
                          title: International securities identification number
                          type: string
                          description: >-
                            International securities identification number
                            defined by [ISO
                            6166](https://en.wikipedia.org/wiki/International_Securities_Identification_Number).
                          pattern: ^[A-Z]{2}[A-Z0-9]{9}[0-9]$
                      required:
                        - uuid
                      additionalProperties: false
                    quantity:
                      type: string
                      pattern: ^-?[0-9]{0,63}(\.[0-9]{1,27})?$
                    locked_for_trading:
                      type: string
                      pattern: ^[0-9]{0,63}(\.[0-9]{1,27})?$
                    pending_settlement:
                      type: string
                      pattern: ^[0-9]{0,63}(\.[0-9]{1,27})?$
                    available_for_trading:
                      type: string
                      pattern: ^-?[0-9]{0,63}(\.[0-9]{1,27})?$
                  required:
                    - account_id
                    - instrument
                    - quantity
                    - locked_for_trading
                    - pending_settlement
                    - available_for_trading
                  additionalProperties: false
                webhook_id:
                  title: Webhook ID
                  type: string
                  description: Webhook unique identifier.
                  format: uuid
              required:
                - id
                - created_at
                - type
                - object
                - webhook_id
              additionalProperties: false
            example:
              id: 8962b496-8d42-4560-bfab-10490dd1a724
              created_at: '2021-07-21T14:10:00.00Z'
              type: POSITION.UPDATED
              object:
                account_id: c5161455-4d27-4781-bc74-f05532e49a77
                instrument:
                  isin: US0378331005
                  uuid: ccb86937-8a39-4160-8d33-85bf9e902321
                quantity: '10.4'
                locked_for_trading: '5'
                pending_settlement: '0'
                available_for_trading: '5.4'
              webhook_id: 9df39835-be87-4243-9018-f2500b39cee6
      responses:
        '200':
          description: Request has been processed successfully.
  Cash Balance events:
    post:
      operationId: cash_balance_event
      summary: Cash Balance events
      description: Cash Balance events
      tags:
        - Cash Balances
      requestBody:
        content:
          application/json:
            schema:
              title: Webhook - Positions - Callback
              type: object
              properties:
                id:
                  type: string
                  format: uuid
                  description: Event unique identifier
                created_at:
                  type: string
                  format: date-time
                  description: >-
                    Date and time when the event was created. [RFC
                    3339-5](https://datatracker.ietf.org/doc/html/rfc3339#section-5.6),
                    [ISO8601
                    UTC](https://www.iso.org/iso-8601-date-and-time-format.html)
                type:
                  type: string
                  description: Event type
                  enum:
                    - CASH_BALANCE.UPDATED
                  default: CASH_BALANCE.UPDATED
                object:
                  type: object
                  properties:
                    account_group_id:
                      title: Account group unique identifier.
                      type: string
                      description: Account group unique identifier.
                      format: uuid
                    currency:
                      type: string
                      description: >-
                        Alphabetic three-letter [ISO
                        4217](https://en.wikipedia.org/wiki/ISO_4217) currency
                        code.

                        * EUR - Euro 

                        * GBP - Great British Pound
                      enum:
                        - EUR
                        - GBP
                    balance:
                      type: string
                      pattern: ^-?[0-9]{0,63}(\.[0-9]{1,27})?$
                    locked_for_trading:
                      type: string
                      pattern: ^[0-9]{0,63}(\.[0-9]{1,27})?$
                    pending_settlement:
                      type: string
                      pattern: ^[0-9]{0,63}(\.[0-9]{1,27})?$
                    available_for_withdrawal:
                      type: string
                      pattern: ^-?[0-9]{0,63}(\.[0-9]{1,27})?$
                    available_for_trading:
                      type: string
                      pattern: ^-?[0-9]{0,63}(\.[0-9]{1,27})?$
                  required:
                    - account_group_id
                    - currency
                    - balance
                    - locked_for_trading
                    - pending_settlement
                    - available_for_withdrawal
                    - available_for_trading
                  additionalProperties: false
                webhook_id:
                  title: Webhook ID
                  type: string
                  description: Webhook unique identifier.
                  format: uuid
              required:
                - id
                - created_at
                - type
                - object
                - webhook_id
              additionalProperties: false
            examples:
              cash_balance_updated:
                summary: Cash Balance Updated
                value:
                  id: 8962b496-8d42-4560-bfab-10490dd1a724
                  created_at: '2021-07-21T14:10:00.00Z'
                  type: CASH_BALANCE.UPDATED
                  object:
                    account_group_id: d0fc0305-97b7-4e3b-bddf-66d3c434898c
                    currency: EUR
                    balance: '100'
                    locked_for_trading: '10'
                    pending_settlement: '10'
                    available_for_withdrawal: '80'
                    available_for_trading: '80'
                  webhook_id: 9df39835-be87-4243-9018-f2500b39cee6
              cash_balance_not_available_for_new_withdrawal:
                summary: Cash Balance not available for NEW withdrawal
                value:
                  id: a59c81ee-7770-4f6b-9ebe-8c268b78beb4
                  created_at: '2021-07-22T14:12:00.00Z'
                  type: CASH_BALANCE.UPDATED
                  object:
                    account_group_id: d0fc0305-97b7-4e3b-bddf-66d3c434898c
                    currency: EUR
                    balance: '200'
                    locked_for_trading: '0'
                    pending_settlement: '0'
                    available_for_withdrawal: '0'
                    available_for_trading: '0'
                  webhook_id: 9df39835-be87-4243-9018-f2500b39cee6
              cash_balance_empty_for_confirmed_withdrawal:
                summary: Cash Balance empty for CONFIRMED withdrawal
                value:
                  id: 8c049f77-dc72-489d-8f5f-3871db782252
                  created_at: '2021-07-21T14:11:00.00Z'
                  type: CASH_BALANCE.UPDATED
                  object:
                    account_group_id: d0fc0305-97b7-4e3b-bddf-66d3c434898c
                    currency: EUR
                    balance: '0'
                    locked_for_trading: '0'
                    pending_settlement: '0'
                    available_for_withdrawal: '0'
                    available_for_trading: '0'
                  webhook_id: 9df39835-be87-4243-9018-f2500b39cee6
      responses:
        '200':
          description: Request has been processed successfully.
  Cash transactions events:
    post:
      operationId: cash_transaction_event
      summary: Cash transactions events
      description: Cash transactions events
      tags:
        - Transactions
      requestBody:
        content:
          application/json:
            schema:
              title: Webhook - Cash Transactions - Callback
              type: object
              properties:
                id:
                  type: string
                  format: uuid
                  description: Event unique identifier
                created_at:
                  type: string
                  format: date-time
                  description: >-
                    Date and time when the event was created. [RFC
                    3339-5](https://datatracker.ietf.org/doc/html/rfc3339#section-5.6),
                    [ISO8601
                    UTC](https://www.iso.org/iso-8601-date-and-time-format.html)
                type:
                  type: string
                  description: Event type
                  enum:
                    - CASH_TRANSACTION.EXECUTED
                  default: CASH_TRANSACTION.EXECUTED
                object:
                  title: Cash Transaction
                  type: object
                  properties:
                    account_group_id:
                      title: Account group unique identifier.
                      type: string
                      description: Account group unique identifier.
                      format: uuid
                    booking_date:
                      title: ' Transaction booking date'
                      type: string
                      description: ' Transaction booking date and time. [RFC 3339-5](https://datatracker.ietf.org/doc/html/rfc3339#section-5.6), [ISO8601 UTC](https://www.iso.org/iso-8601-date-and-time-format.html)'
                      format: date-time
                    created_at:
                      type: string
                      format: date-time
                      description: >-
                        Date and time when the resource was created. [RFC
                        3339-5](https://datatracker.ietf.org/doc/html/rfc3339#section-5.6),
                        [ISO8601
                        UTC](https://www.iso.org/iso-8601-date-and-time-format.html)
                    delta:
                      title: Cash transaction delta
                      description: Entity representing cash transaction delta.
                      type: object
                      properties:
                        amount:
                          type: string
                          pattern: ^-?[0-9]{1,9}(\.[0-9]{2})?$
                        currency:
                          type: string
                          description: >-
                            Alphabetic three-letter [ISO
                            4217](https://en.wikipedia.org/wiki/ISO_4217)
                            currency code.

                            * EUR - Euro
                          enum:
                            - EUR
                          default: EUR
                      required:
                        - amount
                        - currency
                      additionalProperties: false
                    id:
                      title: Cash transaction unique identifier
                      type: string
                      description: Cash transaction unique identifier.
                      format: uuid
                    instrument:
                      title: Instrument
                      description: Entity representing instrument.
                      type: object
                      properties:
                        uuid:
                          description: Internal instrument identifier.
                          type: string
                          format: uuid
                        isin:
                          title: International securities identification number
                          type: string
                          description: >-
                            International securities identification number
                            defined by [ISO
                            6166](https://en.wikipedia.org/wiki/International_Securities_Identification_Number).
                          pattern: ^[A-Z]{2}[A-Z0-9]{9}[0-9]$
                      required:
                        - uuid
                      additionalProperties: false
                    account_id:
                      title: Account unique identifier.
                      type: string
                      description: Account unique identifier.
                      format: uuid
                    taxes:
                      type: array
                      items:
                        title: Transaction tax
                        description: Entity representing the transaction tax.
                        type: object
                        properties:
                          amount:
                            type: string
                            pattern: ^-?[0-9]{1,9}(\.[0-9]{2})?$
                          currency:
                            type: string
                            description: >-
                              Alphabetic three-letter [ISO
                              4217](https://en.wikipedia.org/wiki/ISO_4217)
                              currency code.

                              * EUR - Euro
                            enum:
                              - EUR
                            default: EUR
                          type:
                            type: string
                            description: |-
                              Type of the tax.
                              * TOTAL - Total taxes
                            enum:
                              - TOTAL
                            default: TOTAL
                        required:
                          - amount
                          - currency
                          - type
                        additionalProperties: false
                    fees:
                      type: array
                      items:
                        title: Transaction fee
                        description: Entity representing the transaction fee.
                        type: object
                        properties:
                          amount:
                            type: string
                            pattern: ^-?[0-9]{1,9}(\.[0-9]{2})?$
                          currency:
                            type: string
                            description: >-
                              Alphabetic three-letter [ISO
                              4217](https://en.wikipedia.org/wiki/ISO_4217)
                              currency code.

                              * EUR - Euro
                            enum:
                              - EUR
                            default: EUR
                          type:
                            type: string
                            description: |-
                              Type of the fee.
                              * TOTAL - Total fees
                            enum:
                              - TOTAL
                            default: TOTAL
                          charge_method:
                            type: string
                            description: >-
                              Indicates whether the fee was charged by client or
                              by other methods.

                              * CHARGED_BY_CLIENT - Charged by client

                              * COLLECTED_BY_UPVEST - Charged by client and
                              collected by Upvest
                            enum:
                              - CHARGED_BY_CLIENT
                              - COLLECTED_BY_UPVEST
                        required:
                          - amount
                          - currency
                          - type
                          - charge_method
                        additionalProperties: false
                    references:
                      type: array
                      items:
                        title: Cash transaction reference
                        description: Entity representing cash transaction reference.
                        type: object
                        properties:
                          id:
                            title: Unique identifier for a resource of given type
                            type: string
                            description: Unique identifier for a resource of given type.
                            format: uuid
                          type:
                            type: string
                            description: >-
                              Type of the reference.

                              * CORPORATE_ACTION - Corporate action

                              * CORPORATE_ACTION_TRANSACTION_ID - Corporate
                              action transaction ID

                              * CREDIT_FUNDING - Credit Funding

                              * DIRECT_DEBIT - Direct debit funding request

                              * FEE_COLLECTION - Fee collection

                              * ORDER - Order

                              * ORDER_EXECUTION - Order execution

                              * TAX_TRANSACTION - Tax transaction

                              * TOPUP - Cash top up

                              * TRANSACTION_FEE_EXECUTION - Transaction fee
                              execution

                              * VIRTUAL_CASH_DECREASE - Virtual cash decreased

                              * VIRTUAL_CASH_INCREASE - Virtual cash increased

                              * WITHDRAWAL - Cash withdrawal
                            enum:
                              - CORPORATE_ACTION
                              - CORPORATE_ACTION_TRANSACTION_ID
                              - CREDIT_FUNDING
                              - DIRECT_DEBIT
                              - FEE_COLLECTION
                              - ORDER
                              - ORDER_EXECUTION
                              - TAX_TRANSACTION
                              - TOPUP
                              - TRANSACTION_FEE_EXECUTION
                              - VIRTUAL_CASH_DECREASE
                              - VIRTUAL_CASH_INCREASE
                              - WITHDRAWAL
                        required:
                          - id
                          - type
                        additionalProperties: false
                    type:
                      title: Transaction type
                      description: >-
                        Transaction type

                        * ACCUMULATION - Accumulation

                        * ACCUMULATION_CANCELLATION - Accumulation cancellation

                        * ANNUAL_GENERAL_MEETING - Annual general meeting

                        * ANNUAL_GENERAL_MEETING_CANCELLATION - Annual general
                        meeting cancellation

                        * ATTACHMENT - Attachment

                        * ATTACHMENT_CANCELLATION - Attachment cancellation

                        * BALANCE_CORRECTION - Balance correction

                        * BALANCE_CORRECTION_CANCELLATION - Balance correction
                        cancellation

                        * BANKRUPTCY - Bankruptcy

                        * BANKRUPTCY_CANCELLATION - Bankruptcy cancellation

                        * BOND_DEFAULT - Bond default

                        * BOND_DEFAULT_CANCELLATION - Bond default cancellation

                        * BOND_HOLDER_MEETING - Bond holder meeting

                        * BOND_HOLDER_MEETING_CANCELLATION - Bond holder meeting
                        cancellation

                        * BONUS_ISSUE - Bonus Issue/Capitalisation Issue

                        * BONUS_ISSUE_CANCELLATION - Bonus Issue/Capitalisation
                        Issue, Cancellation

                        * CALL_ON_INTERMEDIATE_SECURITIES - Call on Intermediate
                        Securities

                        * CALL_ON_INTERMEDIATE_SECURITIES_CANCELLATION - Call on
                        Intermediate Securities cancellation

                        * CAPITAL_DISTRIBUTION - Capital distribution

                        * CAPITAL_DISTRIBUTION_CANCELLATION - Capital
                        distribution cancellation

                        * CAPITAL_GAINS_DISTRIBUTION - Capital gains
                        distribution

                        * CAPITAL_GAINS_DISTRIBUTION_CANCELLATION - Capital
                        gains distribution cancellation

                        * CAPITALISATION - Capitalisation

                        * CAPITALISATION_CANCELLATION - Capitalisation
                        cancellation

                        * CASH_DISTRIBUTION_FROM_NON_ELIGIBLE_SECURITIES_SALES -
                        Cash distribution from non eligible securities sales

                        *
                        CASH_DISTRIBUTION_FROM_NON_ELIGIBLE_SECURITIES_SALES_CANCELLATION
                        - Cash distribution from non eligible securities sales
                        cancellation

                        * CASH_DIVIDEND - Cash dividend

                        * CASH_DIVIDEND_CANCELLATION - Cash dividend
                        cancellation

                        * CHANGE - Change

                        * CHANGE_CANCELLATION - Change, Cancellation

                        * CLASS_ACTION - Class action

                        * CLASS_ACTION_CANCELLATION - Class action cancellation

                        * COMPANY_OPTION - Company option

                        * COMPANY_OPTION_CANCELLATION - Company option
                        cancellation

                        * CONSENT - Consent

                        * CONSENT_CANCELLATION - Consent cancellation

                        * CONVERSION - Conversion

                        * CONVERSION_CANCELLATION - Conversion cancellation

                        * COURT_MEETING - Court meeting

                        * COURT_MEETING_CANCELLATION - Court meeting
                        cancellation

                        * CREDIT_EVENT - Credit event

                        * CREDIT_EVENT_CANCELLATION - Credit event cancellation

                        * CREDIT_FUNDING - Credit funding

                        * CREDIT_FUNDING_CHARGE_BACK - Credit funding charge
                        back

                        * DD_REFUND_REJECT_FEE - DD refund reject fee

                        * DD_REFUND_REJECT_FEE_CANCELLATION - DD refund reject
                        fee cancellation

                        * DECREASE_IN_VALUE - Decrease in Value

                        * DECREASE_IN_VALUE_CANCELLATION - Decrease in Value,
                        Cancellation

                        * DETACHMENT - Detachment

                        * DETACHMENT_CANCELLATION - Detachment cancellation

                        * DISCLOSURE - Disclosure

                        * DISCLOSURE_CANCELLATION - Disclosure cancellation

                        * DIVIDEND_OPTION - Dividend Option

                        * DIVIDEND_OPTION_CANCELLATION - Dividend Option,
                        Cancellation

                        * DIVIDEND_REINVESTMENT - Dividend Reinvestment

                        * DIVIDEND_REINVESTMENT_CANCELLATION - Dividend
                        Reinvestment, Cancellation

                        * DRAWING - Drawing

                        * DRAWING_CANCELLATION - Drawing cancellation

                        * DUTCH_AUCTION - Dutch Auction

                        * DUTCH_AUCTION_CANCELLATION - Dutch Auction,
                        Cancellation

                        * EXCHANGE - Exchange

                        * EXCHANGE_CANCELLATION - Exchange cancellation

                        * EXTRAORDINARY_OR_SPECIAL_GENERAL_MEETING -
                        Extraordinary or special general meeting

                        * EXTRAORDINARY_OR_SPECIAL_GENERAL_MEETING_CANCELLATION
                        - Extraordinary or special general meeting cancellation

                        * FEE_COLLECTION - Fee collection

                        * FEE_COLLECTION_CANCELLATION - Fee collection
                        cancellation

                        * FINAL_MATURITY - Final maturity

                        * FINAL_MATURITY_CANCELLATION - Final maturity
                        cancellation

                        * FULL_CALL - Full call

                        * FULL_CALL_CANCELLATION - Full call cancellation

                        * INCREASE_IN_VALUE - Increase in Value

                        * INCREASE_IN_VALUE_CANCELLATION - Increase in Value,
                        Cancellation

                        * INFORMATION - Information

                        * INFORMATION_CANCELLATION - Information cancellation

                        * INSTALMENT_CALL - Instalment call

                        * INSTALMENT_CALL_CANCELLATION - Instalment call
                        cancellation

                        * INTEREST_PAYMENT - Interest payment

                        * INTEREST_PAYMENT_CANCELLATION - Interest payment
                        cancellation

                        * INTERMEDIATE_SECURITIES_DISTRIBUTION - Intermediate
                        Securities Distribution

                        * INTERMEDIATE_SECURITIES_DISTRIBUTION_CANCELLATION -
                        Intermediate Securities Distribution, Cancellation

                        * LIQUIDATION_PAYMENT - Liquidation Dividend/Liquidation
                        Payment

                        * LIQUIDATION_PAYMENT_CANCELLATION - Liquidation
                        Dividend/Liquidation Payment, Cancellation

                        * MATURITY_EXTENSION - Maturity extension

                        * MATURITY_EXTENSION_CANCELLATION - Maturity extension
                        cancellation

                        * MERGER - Merger

                        * MERGER_CANCELLATION - Merger, Cancellation

                        * NON_OFFICIAL_OFFER - Non-Official Offer

                        * NON_OFFICIAL_OFFER_CANCELLATION - Non-Official Offer,
                        Cancellation

                        * NON_US_TEFRA_D_CERTIFICATION - Non us tefra d
                        certification

                        * NON_US_TEFRA_D_CERTIFICATION_CANCELLATION - Non us
                        tefra d certification cancellation

                        * ODD_LOT_SALE - Odd Lot Sale/Purchase

                        * ODD_LOT_SALE_CANCELLATION - Odd Lot Sale/Purchase,
                        Cancellation

                        * ORDER_EXECUTION - Order execution

                        * ORDER_EXECUTION_CANCELLATION - Order execution
                        cancellation

                        * ORDINARY_GENERAL_MEETING - Ordinary general meeting

                        * ORDINARY_GENERAL_MEETING_CANCELLATION - Ordinary
                        general meeting cancellation

                        * OTHER_EVENT - Other Event

                        * OTHER_EVENT_CANCELLATION - Other Event, Cancellation

                        * PARI_PASSU - Pari passu

                        * PARI_PASSU_CANCELLATION - Pari passu cancellation

                        * PARTIAL_DEFEASANCE - Partial defeasance

                        * PARTIAL_DEFEASANCE_CANCELLATION - Partial defeasance
                        cancellation

                        * PARTIAL_REDEMPTION_WITH_POOL_FACTOR_REDUCTION -
                        Partial redemption with pool factor reduction

                        *
                        PARTIAL_REDEMPTION_WITH_POOL_FACTOR_REDUCTION_CANCELLATION
                        - Partial redemption with pool factor reduction
                        cancellation

                        * PARTIAL_REDEMPTION_WITHOUT_POOL_FACTOR_REDUCTION -
                        Partial redemption without pool factor reduction

                        *
                        PARTIAL_REDEMPTION_WITHOUT_POOL_FACTOR_REDUCTION_CANCELLATION
                        - Partial redemption without pool factor reduction
                        cancellation

                        * PAY_IN_KIND - Pay in kind

                        * PAY_IN_KIND_CANCELLATION - Pay in kind cancellation

                        * PEAK_FRACTION_COMPENSATION - Peak fraction
                        compensation

                        * PEAK_ORDER_ADJUSTMENT - Peak order adjustment

                        * PLACE_OF_INCORPORATION - Place of incorporation

                        * PLACE_OF_INCORPORATION_CANCELLATION - Place of
                        incorporation cancellation

                        * PRIORITY_ISSUE - Priority Issue

                        * PRIORITY_ISSUE_CANCELLATION - Priority Issue,
                        Cancellation

                        * PUT_REDEMPTION - Put redemption

                        * PUT_REDEMPTION_CANCELLATION - Put redemption
                        cancellation

                        * REDENOMINATION - Redenomination

                        * REDENOMINATION_CANCELLATION - Redenomination
                        cancellation

                        * REMARKETING_AGREEMENT - Remarketing agreement

                        * REMARKETING_AGREEMENT_CANCELLATION - Remarketing
                        agreement cancellation

                        * REPURCHASE_OFFER - Repurchase Offer/Issuer Bid/Reverse
                        Rights

                        * REPURCHASE_OFFER_CANCELLATION - Repurchase
                        Offer/Issuer Bid/Reverse Rights, Cancellation

                        * REVERSE_STOCK_SPLIT - Reverse Stock Split/Change in
                        Nominal Value

                        * REVERSE_STOCK_SPLIT_CANCELLATION - Reverse Stock
                        Split/Change in Nominal Value, Cancellation

                        * RIGHTS_ISSUE - Rights Issue/Subscription Rights/Rights
                        Offer

                        * RIGHTS_ISSUE_CANCELLATION - Rights Issue/Subscription
                        Rights/Rights Offer, Cancellation

                        * SCRIP_DIVIDEND - Scrip dividend

                        * SCRIP_DIVIDEND_CANCELLATION - Scrip dividend
                        cancellation

                        * SEPA_DIRECT_DEBIT - Sepa direct debit

                        * SEPA_DIRECT_DEBIT_CHARGE_BACK - Sepa direct debit
                        charge back

                        * SHARES_PREMIUM_DIVIDEND - Shares Premium Dividend

                        * SHARES_PREMIUM_DIVIDEND_CANCELLATION - Shares Premium
                        Dividend, Cancellation

                        * SMALLEST_NEGOTIABLE_UNIT - Smallest negotiable unit

                        * SMALLEST_NEGOTIABLE_UNIT_CANCELLATION - Smallest
                        negotiable unit cancellation

                        * SPIN_OFF - Spin-Off

                        * SPIN_OFF_CANCELLATION - Spin-Off, Cancellation

                        * STOCK_DIVIDEND - Stock Dividend

                        * STOCK_DIVIDEND_CANCELLATION - Stock Dividend,
                        Cancellation

                        * STOCK_SPLIT - Stock Split/Change in Nominal
                        Value/Subdivision

                        * STOCK_SPLIT_CANCELLATION - Stock Split/Change in
                        Nominal Value/Subdivision, Cancellation

                        * TAX_ON_NON_DISTRIBUTED_PROCEEDS - Tax on non
                        distributed proceeds

                        * TAX_ON_NON_DISTRIBUTED_PROCEEDS_CANCELLATION - Tax on
                        non distributed proceeds cancellation

                        * TAX_OPTIMISATION - Tax optimisation

                        * TAX_PAYMENT - Tax payment

                        * TAX_PREPAYMENT_DE - German tax prepayment
                        (Vorabpauschale)

                        * TAX_RECLAIM - Tax reclaim

                        * TAX_RECLAIM_CANCELLATION - Tax reclaim cancellation

                        * TAX_REFUND - Tax refund

                        * TENDER - Tender/Acquisition/Takeover/Purchase Offer

                        * TENDER_CANCELLATION -
                        Tender/Acquisition/Takeover/Purchase Offer, Cancellation

                        * TOPUP - Cash top up

                        * TOPUP_CANCELLATION - Top up cancellation

                        * TRADING_STATUS_ACTIVE - Trading status active

                        * TRADING_STATUS_ACTIVE_CANCELLATION - Trading status
                        active cancellation

                        * TRADING_STATUS_DELISTED - Trading status delisted

                        * TRADING_STATUS_DELISTED_CANCELLATION - Trading status
                        delisted cancellation

                        * TRADING_STATUS_SUSPENDED - Trading status suspended

                        * TRADING_STATUS_SUSPENDED_CANCELLATION - Trading status
                        suspended cancellation

                        * TREASURY_PAYMENT - Treasury payment

                        * VIRTUAL_CASH_CORRECTION - Virtual cash correction

                        * VIRTUAL_CASH_CORRECTION_CANCELLATION - Virtual cash
                        correction cancellation

                        * VIRTUAL_CASH_DECREASE - Virtual cash decreased

                        * VIRTUAL_CASH_INCREASE - Virtual cash increased

                        * WARRANT_EXERCISE - Warrant exercise

                        * WARRANT_EXERCISE_CANCELLATION - Warrant exercise
                        cancellation

                        * WITHDRAWAL - Withdrawal

                        * WITHDRAWAL_CANCELLATION - Withdrawal cancellation

                        * WORTHLESS - Worthless

                        * WORTHLESS_CANCELLATION - Worthless, Cancellation

                        * WITHHOLDING_TAX_RELIEF_CERTIFICATION - Withholding tax
                        relief certification

                        * WITHHOLDING_TAX_RELIEF_CERTIFICATION_CANCELLATION -
                        Withholding tax relief certification cancellation
                      type: string
                      enum:
                        - ACCUMULATION
                        - ACCUMULATION_CANCELLATION
                        - ANNUAL_GENERAL_MEETING
                        - ANNUAL_GENERAL_MEETING_CANCELLATION
                        - ATTACHMENT
                        - ATTACHMENT_CANCELLATION
                        - BALANCE_CORRECTION
                        - BALANCE_CORRECTION_CANCELLATION
                        - BANKRUPTCY
                        - BANKRUPTCY_CANCELLATION
                        - BOND_DEFAULT
                        - BOND_DEFAULT_CANCELLATION
                        - BOND_HOLDER_MEETING
                        - BOND_HOLDER_MEETING_CANCELLATION
                        - BONUS_ISSUE
                        - BONUS_ISSUE_CANCELLATION
                        - CALL_ON_INTERMEDIATE_SECURITIES
                        - CALL_ON_INTERMEDIATE_SECURITIES_CANCELLATION
                        - CAPITAL_DISTRIBUTION
                        - CAPITAL_DISTRIBUTION_CANCELLATION
                        - CAPITAL_GAINS_DISTRIBUTION
                        - CAPITAL_GAINS_DISTRIBUTION_CANCELLATION
                        - CAPITALISATION
                        - CAPITALISATION_CANCELLATION
                        - CASH_DISTRIBUTION_FROM_NON_ELIGIBLE_SECURITIES_SALES
                        - >-
                          CASH_DISTRIBUTION_FROM_NON_ELIGIBLE_SECURITIES_SALES_CANCELLATION
                        - CASH_DIVIDEND
                        - CASH_DIVIDEND_CANCELLATION
                        - CHANGE
                        - CHANGE_CANCELLATION
                        - CLASS_ACTION
                        - CLASS_ACTION_CANCELLATION
                        - COMPANY_OPTION
                        - COMPANY_OPTION_CANCELLATION
                        - CONSENT
                        - CONSENT_CANCELLATION
                        - CONVERSION
                        - CONVERSION_CANCELLATION
                        - COURT_MEETING
                        - COURT_MEETING_CANCELLATION
                        - CREDIT_EVENT
                        - CREDIT_EVENT_CANCELLATION
                        - CREDIT_FUNDING
                        - CREDIT_FUNDING_CHARGE_BACK
                        - DD_REFUND_REJECT_FEE
                        - DD_REFUND_REJECT_FEE_CANCELLATION
                        - DECREASE_IN_VALUE
                        - DECREASE_IN_VALUE_CANCELLATION
                        - DETACHMENT
                        - DETACHMENT_CANCELLATION
                        - DISCLOSURE
                        - DISCLOSURE_CANCELLATION
                        - DIVIDEND_OPTION
                        - DIVIDEND_OPTION_CANCELLATION
                        - DIVIDEND_REINVESTMENT
                        - DIVIDEND_REINVESTMENT_CANCELLATION
                        - DRAWING
                        - DRAWING_CANCELLATION
                        - DUTCH_AUCTION
                        - DUTCH_AUCTION_CANCELLATION
                        - EXCHANGE
                        - EXCHANGE_CANCELLATION
                        - EXTRAORDINARY_OR_SPECIAL_GENERAL_MEETING
                        - EXTRAORDINARY_OR_SPECIAL_GENERAL_MEETING_CANCELLATION
                        - FEE_COLLECTION
                        - FEE_COLLECTION_CANCELLATION
                        - FINAL_MATURITY
                        - FINAL_MATURITY_CANCELLATION
                        - FULL_CALL
                        - FULL_CALL_CANCELLATION
                        - INCREASE_IN_VALUE
                        - INCREASE_IN_VALUE_CANCELLATION
                        - INFORMATION
                        - INFORMATION_CANCELLATION
                        - INSTALMENT_CALL
                        - INSTALMENT_CALL_CANCELLATION
                        - INTEREST_PAYMENT
                        - INTEREST_PAYMENT_CANCELLATION
                        - INTERMEDIATE_SECURITIES_DISTRIBUTION
                        - INTERMEDIATE_SECURITIES_DISTRIBUTION_CANCELLATION
                        - LIQUIDATION_PAYMENT
                        - LIQUIDATION_PAYMENT_CANCELLATION
                        - MATURITY_EXTENSION
                        - MATURITY_EXTENSION_CANCELLATION
                        - MERGER
                        - MERGER_CANCELLATION
                        - NON_OFFICIAL_OFFER
                        - NON_OFFICIAL_OFFER_CANCELLATION
                        - NON_US_TEFRA_D_CERTIFICATION
                        - NON_US_TEFRA_D_CERTIFICATION_CANCELLATION
                        - ODD_LOT_SALE
                        - ODD_LOT_SALE_CANCELLATION
                        - ORDER_EXECUTION
                        - ORDER_EXECUTION_CANCELLATION
                        - ORDINARY_GENERAL_MEETING
                        - ORDINARY_GENERAL_MEETING_CANCELLATION
                        - OTHER_EVENT
                        - OTHER_EVENT_CANCELLATION
                        - PARI_PASSU
                        - PARI_PASSU_CANCELLATION
                        - PARTIAL_DEFEASANCE
                        - PARTIAL_DEFEASANCE_CANCELLATION
                        - PARTIAL_REDEMPTION_WITH_POOL_FACTOR_REDUCTION
                        - >-
                          PARTIAL_REDEMPTION_WITH_POOL_FACTOR_REDUCTION_CANCELLATION
                        - PARTIAL_REDEMPTION_WITHOUT_POOL_FACTOR_REDUCTION
                        - >-
                          PARTIAL_REDEMPTION_WITHOUT_POOL_FACTOR_REDUCTION_CANCELLATION
                        - PAY_IN_KIND
                        - PAY_IN_KIND_CANCELLATION
                        - PEAK_FRACTION_COMPENSATION
                        - PEAK_ORDER_ADJUSTMENT
                        - PLACE_OF_INCORPORATION
                        - PLACE_OF_INCORPORATION_CANCELLATION
                        - PRIORITY_ISSUE
                        - PRIORITY_ISSUE_CANCELLATION
                        - PUT_REDEMPTION
                        - PUT_REDEMPTION_CANCELLATION
                        - REDENOMINATION
                        - REDENOMINATION_CANCELLATION
                        - REMARKETING_AGREEMENT
                        - REMARKETING_AGREEMENT_CANCELLATION
                        - REPURCHASE_OFFER
                        - REPURCHASE_OFFER_CANCELLATION
                        - REVERSE_STOCK_SPLIT
                        - REVERSE_STOCK_SPLIT_CANCELLATION
                        - RIGHTS_ISSUE
                        - RIGHTS_ISSUE_CANCELLATION
                        - SCRIP_DIVIDEND
                        - SCRIP_DIVIDEND_CANCELLATION
                        - SEPA_DIRECT_DEBIT
                        - SEPA_DIRECT_DEBIT_CHARGE_BACK
                        - SHARES_PREMIUM_DIVIDEND
                        - SHARES_PREMIUM_DIVIDEND_CANCELLATION
                        - SMALLEST_NEGOTIABLE_UNIT
                        - SMALLEST_NEGOTIABLE_UNIT_CANCELLATION
                        - SPIN_OFF
                        - SPIN_OFF_CANCELLATION
                        - STOCK_DIVIDEND
                        - STOCK_DIVIDEND_CANCELLATION
                        - STOCK_SPLIT
                        - STOCK_SPLIT_CANCELLATION
                        - TAX_ON_NON_DISTRIBUTED_PROCEEDS
                        - TAX_ON_NON_DISTRIBUTED_PROCEEDS_CANCELLATION
                        - TAX_OPTIMISATION
                        - TAX_PAYMENT
                        - TAX_PREPAYMENT_DE
                        - TAX_RECLAIM
                        - TAX_RECLAIM_CANCELLATION
                        - TAX_REFUND
                        - TENDER
                        - TENDER_CANCELLATION
                        - TOPUP
                        - TOPUP_CANCELLATION
                        - TRADING_STATUS_ACTIVE
                        - TRADING_STATUS_ACTIVE_CANCELLATION
                        - TRADING_STATUS_DELISTED
                        - TRADING_STATUS_DELISTED_CANCELLATION
                        - TRADING_STATUS_SUSPENDED
                        - TRADING_STATUS_SUSPENDED_CANCELLATION
                        - TREASURY_PAYMENT
                        - VIRTUAL_CASH_CORRECTION
                        - VIRTUAL_CASH_CORRECTION_CANCELLATION
                        - VIRTUAL_CASH_DECREASE
                        - VIRTUAL_CASH_INCREASE
                        - WARRANT_EXERCISE
                        - WARRANT_EXERCISE_CANCELLATION
                        - WITHDRAWAL
                        - WITHDRAWAL_CANCELLATION
                        - WORTHLESS
                        - WORTHLESS_CANCELLATION
                        - WITHHOLDING_TAX_RELIEF_CERTIFICATION
                        - WITHHOLDING_TAX_RELIEF_CERTIFICATION_CANCELLATION
                    updated_at:
                      type: string
                      format: date-time
                      description: >-
                        Date and time when the resource was last updated. [RFC
                        3339-5](https://datatracker.ietf.org/doc/html/rfc3339#section-5.6),
                        [ISO8601
                        UTC](https://www.iso.org/iso-8601-date-and-time-format.html)
                    value_date:
                      title: Transaction value date
                      type: string
                      description: >-
                        Transaction value date and time. [RFC
                        3339-5](https://datatracker.ietf.org/doc/html/rfc3339#section-5.6),
                        [ISO8601
                        UTC](https://www.iso.org/iso-8601-date-and-time-format.html)
                      format: date-time
                  required:
                    - id
                    - type
                    - account_group_id
                    - delta
                    - taxes
                    - references
                    - booking_date
                    - value_date
                    - created_at
                    - updated_at
                  additionalProperties: true
                webhook_id:
                  title: Webhook ID
                  type: string
                  description: Webhook unique identifier.
                  format: uuid
              required:
                - id
                - created_at
                - type
                - object
                - webhook_id
              additionalProperties: false
            examples:
              cash_dividend:
                summary: Cash Dividend
                value:
                  id: 55a877ce-effa-11ed-a05b-0242ac120003
                  created_at: '2023-01-01T00:00:00.000Z'
                  type: CASH_TRANSACTION.EXECUTED
                  object:
                    id: 6dc9fbca-8835-11ed-a217-2eabd0c03f8a
                    created_at: '2023-01-01T00:00:00.000Z'
                    updated_at: '2023-01-01T00:00:00.000Z'
                    type: CASH_DIVIDEND
                    account_id: 0255e6c4-effa-11ed-a05b-0242ac120003
                    account_group_id: 6409e3f2-8835-11ed-96a4-2eabd0c03f8a
                    instrument:
                      isin: US0378331005
                      uuid: ccb86937-8a39-4160-8d33-85bf9e902321
                    delta:
                      amount: '25.00'
                      currency: EUR
                    taxes:
                      - amount: '2.00'
                        currency: EUR
                        type: TOTAL
                    references:
                      - id: c29a9ee8-ed64-11ef-a2e4-2eabd0c03f8a
                        type: CORPORATE_ACTION
                      - id: 1f5758d3-1ef7-4b4c-96ec-6b3da2bf1a8a
                        type: CORPORATE_ACTION_TRANSACTION_ID
                    booking_date: '2023-01-01T00:00:00.000Z'
                    value_date: '2023-01-01T00:00:00.000Z'
                  webhook_id: 9d3ac2e0-effa-11ed-a05b-0242ac120003
              cash_dividend_cancellation:
                summary: Cash Dividend Cancellation
                value:
                  id: e23218bc-effa-11ed-a05b-0242ac120003
                  created_at: '2023-01-01T00:00:00.000Z'
                  type: CASH_TRANSACTION.EXECUTED
                  object:
                    id: dafd9954-effa-11ed-a05b-0242ac120003
                    created_at: '2023-01-01T00:00:00.000Z'
                    updated_at: '2023-01-01T00:00:00.000Z'
                    type: CASH_DIVIDEND_CANCELLATION
                    account_id: 0255e6c4-effa-11ed-a05b-0242ac120003
                    account_group_id: 6409e3f2-8835-11ed-96a4-2eabd0c03f8a
                    instrument:
                      isin: US0378331005
                      uuid: ccb86937-8a39-4160-8d33-85bf9e902321
                    delta:
                      amount: '-25.00'
                      currency: EUR
                    taxes:
                      - amount: '-2.00'
                        currency: EUR
                        type: TOTAL
                    references:
                      - id: 1f5758d3-1ef7-4b4c-96ec-6b3da2bf1a8a
                        type: CORPORATE_ACTION_TRANSACTION_ID
                    booking_date: '2023-01-01T00:00:00.000Z'
                    value_date: '2023-01-01T00:00:00.000Z'
                  webhook_id: d68273ae-effa-11ed-a05b-0242ac120003
              buy_order_execution:
                summary: Buy Order Execution
                value:
                  id: 398278e2-8835-11ed-97e3-2eabd0c03f8a
                  created_at: '2023-01-01T00:00:00.000Z'
                  type: CASH_TRANSACTION.EXECUTED
                  object:
                    id: 6dc9fbca-8835-11ed-a217-2eabd0c03f8a
                    created_at: '2023-01-01T00:00:00.000Z'
                    updated_at: '2023-01-01T00:00:00.000Z'
                    type: ORDER_EXECUTION
                    account_group_id: 6409e3f2-8835-11ed-96a4-2eabd0c03f8a
                    delta:
                      amount: '-104.00'
                      currency: EUR
                    taxes:
                      - amount: '4.00'
                        currency: EUR
                        type: TOTAL
                    references:
                      - id: 7579a672-8835-11ed-9455-2eabd0c03f8a
                        type: ORDER_EXECUTION
                      - id: 1f5758d3-1ef7-4b4c-96ec-6b3da2bf1a8a
                        type: ORDER
                    booking_date: '2023-01-01T00:00:00.000Z'
                    value_date: '2023-01-01T00:00:00.000Z'
                  webhook_id: 35701970-effb-11ed-a05b-0242ac120003
              buy_order_execution_with_fees_charged_by_client:
                summary: Buy Order Execution with fees charged by client
                value:
                  id: 398278e2-8835-11ed-97e3-2eabd0c03f8a
                  created_at: '2023-01-01T00:00:00.000Z'
                  type: CASH_TRANSACTION.EXECUTED
                  object:
                    id: 6dc9fbca-8835-11ed-a217-2eabd0c03f8a
                    created_at: '2023-01-01T00:00:00.000Z'
                    updated_at: '2023-01-01T00:00:00.000Z'
                    type: ORDER_EXECUTION
                    account_group_id: 6409e3f2-8835-11ed-96a4-2eabd0c03f8a
                    delta:
                      amount: '-104.00'
                      currency: EUR
                    taxes:
                      - amount: '4.00'
                        currency: EUR
                        type: TOTAL
                    fees:
                      - amount: '1.00'
                        currency: EUR
                        type: TOTAL
                        charge_method: CHARGED_BY_CLIENT
                    references:
                      - id: 7579a672-8835-11ed-9455-2eabd0c03f8a
                        type: ORDER_EXECUTION
                      - id: 1f5758d3-1ef7-4b4c-96ec-6b3da2bf1a8a
                        type: ORDER
                    booking_date: '2023-01-01T00:00:00.000Z'
                    value_date: '2023-01-01T00:00:00.000Z'
                  webhook_id: 35701970-effb-11ed-a05b-0242ac120003
              buy_order_execution_with_fees_collected_by_upvest:
                summary: >-
                  Buy Order Execution with fees charged by client and collected
                  by Upvest
                value:
                  id: 398278e2-8835-11ed-97e3-2eabd0c03f8a
                  created_at: '2023-01-01T00:00:00.000Z'
                  type: CASH_TRANSACTION.EXECUTED
                  object:
                    id: 6dc9fbca-8835-11ed-a217-2eabd0c03f8a
                    created_at: '2023-01-01T00:00:00.000Z'
                    updated_at: '2023-01-01T00:00:00.000Z'
                    type: ORDER_EXECUTION
                    account_group_id: 6409e3f2-8835-11ed-96a4-2eabd0c03f8a
                    delta:
                      amount: '-105.00'
                      currency: EUR
                    taxes:
                      - amount: '4.00'
                        currency: EUR
                        type: TOTAL
                    fees:
                      - amount: '1.00'
                        currency: EUR
                        type: TOTAL
                        charge_method: COLLECTED_BY_UPVEST
                    references:
                      - id: 7579a672-8835-11ed-9455-2eabd0c03f8a
                        type: ORDER_EXECUTION
                      - id: 1f5758d3-1ef7-4b4c-96ec-6b3da2bf1a8a
                        type: ORDER
                      - id: 6add5e16-79eb-11f0-8944-3aa3573bef52
                        type: TRANSACTION_FEE_EXECUTION
                    booking_date: '2023-01-01T00:00:00.000Z'
                    value_date: '2023-01-01T00:00:00.000Z'
                  webhook_id: 35701970-effb-11ed-a05b-0242ac120003
              buy_order_execution_cancellation:
                summary: Buy Order Execution Cancellation
                value:
                  id: 1dac4156-effb-11ed-a05b-0242ac120003
                  created_at: '2023-01-01T00:00:00.000Z'
                  type: CASH_TRANSACTION.EXECUTED
                  object:
                    id: 25c56ab6-effb-11ed-a05b-0242ac120003
                    created_at: '2023-01-01T00:00:00.000Z'
                    updated_at: '2023-01-01T00:00:00.000Z'
                    type: ORDER_EXECUTION_CANCELLATION
                    account_group_id: 6409e3f2-8835-11ed-96a4-2eabd0c03f8a
                    delta:
                      amount: '104.00'
                      currency: EUR
                    taxes:
                      - amount: '-4.00'
                        currency: EUR
                        type: TOTAL
                    references:
                      - id: 7579a672-8835-11ed-9455-2eabd0c03f8a
                        type: ORDER_EXECUTION
                      - id: 1f5758d3-1ef7-4b4c-96ec-6b3da2bf1a8a
                        type: ORDER
                    booking_date: '2023-01-01T00:00:00.000Z'
                    value_date: '2023-01-01T00:00:00.000Z'
                  webhook_id: 162db946-effb-11ed-a05b-0242ac120003
              sell_order_execution:
                summary: Sell Order Execution
                value:
                  id: 398278e2-8835-11ed-97e3-2eabd0c03f8a
                  created_at: '2023-01-01T00:00:00.000Z'
                  type: CASH_TRANSACTION.EXECUTED
                  object:
                    id: 6dc9fbca-8835-11ed-a217-2eabd0c03f8a
                    created_at: '2023-01-01T00:00:00.000Z'
                    updated_at: '2023-01-01T00:00:00.000Z'
                    type: ORDER_EXECUTION
                    account_group_id: 6409e3f2-8835-11ed-96a4-2eabd0c03f8a
                    delta:
                      amount: '96.00'
                      currency: EUR
                    taxes:
                      - amount: '4.00'
                        currency: EUR
                        type: TOTAL
                    references:
                      - id: 7579a672-8835-11ed-9455-2eabd0c03f8a
                        type: ORDER_EXECUTION
                      - id: 1f5758d3-1ef7-4b4c-96ec-6b3da2bf1a8a
                        type: ORDER
                    booking_date: '2023-01-01T00:00:00.000Z'
                    value_date: '2023-01-01T00:00:00.000Z'
                  webhook_id: 35701970-effb-11ed-a05b-0242ac120003
              sell_order_execution_cancellation:
                summary: Sell Order Execution Cancellation
                value:
                  id: 1dac4156-effb-11ed-a05b-0242ac120003
                  created_at: '2023-01-01T00:00:00.000Z'
                  type: CASH_TRANSACTION.EXECUTED
                  object:
                    id: 25c56ab6-effb-11ed-a05b-0242ac120003
                    created_at: '2023-01-01T00:00:00.000Z'
                    updated_at: '2023-01-01T00:00:00.000Z'
                    type: ORDER_EXECUTION_CANCELLATION
                    account_group_id: 6409e3f2-8835-11ed-96a4-2eabd0c03f8a
                    delta:
                      amount: '-96.00'
                      currency: EUR
                    taxes:
                      - amount: '-4.00'
                        currency: EUR
                        type: TOTAL
                    references:
                      - id: 7579a672-8835-11ed-9455-2eabd0c03f8a
                        type: ORDER_EXECUTION
                      - id: 1f5758d3-1ef7-4b4c-96ec-6b3da2bf1a8a
                        type: ORDER
                    booking_date: '2023-01-01T00:00:00.000Z'
                    value_date: '2023-01-01T00:00:00.000Z'
                  webhook_id: 162db946-effb-11ed-a05b-0242ac120003
              fee_collection:
                summary: Fee Collection
                value:
                  id: 1d27576e-f4a3-11ed-a05b-0242ac120003
                  created_at: '2023-01-01T00:00:00.000Z'
                  type: CASH_TRANSACTION.EXECUTED
                  object:
                    id: 2349857c-f4a3-11ed-a05b-0242ac120003
                    created_at: '2023-01-01T00:00:00.000Z'
                    updated_at: '2023-01-01T00:00:00.000Z'
                    type: FEE_COLLECTION
                    account_group_id: 6409e3f2-8835-11ed-96a4-2eabd0c03f8a
                    delta:
                      amount: '-10.00'
                      currency: EUR
                    taxes: []
                    references:
                      - id: 17c36d9e-f4a3-11ed-a05b-0242ac120003
                        type: FEE_COLLECTION
                    booking_date: '2023-01-01T00:00:00.000Z'
                    value_date: '2023-01-01T00:00:00.000Z'
                  webhook_id: 1216067c-f4a3-11ed-a05b-0242ac120003
              fee_collection_cancellation:
                summary: Fee Collection Cancellation
                value:
                  id: 3cdfad72-f4a3-11ed-a05b-0242ac120003
                  created_at: '2023-01-01T00:00:00.000Z'
                  type: CASH_TRANSACTION.EXECUTED
                  object:
                    id: 2349857c-f4a3-11ed-a05b-0242ac120003
                    created_at: '2023-01-01T00:00:00.000Z'
                    updated_at: '2023-01-01T00:00:00.000Z'
                    type: FEE_COLLECTION_CANCELLATION
                    account_group_id: 6409e3f2-8835-11ed-96a4-2eabd0c03f8a
                    delta:
                      amount: '10.00'
                      currency: EUR
                    taxes: []
                    references:
                      - id: 45d15c46-f4a3-11ed-a05b-0242ac120003
                        type: FEE_COLLECTION
                    booking_date: '2023-01-01T00:00:00.000Z'
                    value_date: '2023-01-01T00:00:00.000Z'
                  webhook_id: 40fb1252-f4a3-11ed-a05b-0242ac120003
              sepa_direct_debit:
                summary: Sepa Direct Debit
                value:
                  id: a9a76224-eff8-11ed-a05b-0242ac120003
                  created_at: '2023-01-01T00:00:00.000Z'
                  type: CASH_TRANSACTION.EXECUTED
                  object:
                    id: 9e7a3188-eff8-11ed-a05b-0242ac120003
                    created_at: '2023-01-01T00:00:00.000Z'
                    updated_at: '2023-01-01T00:00:00.000Z'
                    type: SEPA_DIRECT_DEBIT
                    account_group_id: 6409e3f2-8835-11ed-96a4-2eabd0c03f8a
                    delta:
                      amount: '305.00'
                      currency: EUR
                    taxes: []
                    references:
                      - id: 98f01200-eff8-11ed-a05b-0242ac120003
                        type: DIRECT_DEBIT
                    booking_date: '2023-01-01T00:00:00.000Z'
                    value_date: '2023-01-01T00:00:00.000Z'
                  webhook_id: 9390c822-eff8-11ed-a05b-0242ac120003
              sepa_direct_debit_chargeback:
                summary: Sepa Direct Debit Chargeback
                value:
                  id: 2e471146-eff9-11ed-a05b-0242ac120003
                  created_at: '2023-01-01T00:00:00.000Z'
                  type: CASH_TRANSACTION.EXECUTED
                  object:
                    id: 23547364-eff9-11ed-a05b-0242ac120003
                    created_at: '2023-01-01T00:00:00.000Z'
                    updated_at: '2023-01-01T00:00:00.000Z'
                    type: SEPA_DIRECT_DEBIT_CHARGE_BACK
                    account_group_id: 6409e3f2-8835-11ed-96a4-2eabd0c03f8a
                    delta:
                      amount: '-305.00'
                      currency: EUR
                    taxes: []
                    references:
                      - id: 1d2a347e-eff9-11ed-a05b-0242ac120003
                        type: DIRECT_DEBIT
                    booking_date: '2023-01-01T00:00:00.000Z'
                    value_date: '2023-01-01T00:00:00.000Z'
                  webhook_id: 060844b6-eff9-11ed-a05b-0242ac120003
              topup:
                summary: Top-up
                value:
                  id: e619bf74-effb-11ed-a05b-0242ac120003
                  created_at: '2023-01-01T00:00:00.000Z'
                  type: CASH_TRANSACTION.EXECUTED
                  object:
                    id: e165c4b4-effb-11ed-a05b-0242ac120003
                    created_at: '2023-01-01T00:00:00.000Z'
                    updated_at: '2023-01-01T00:00:00.000Z'
                    type: TOPUP
                    account_group_id: 6409e3f2-8835-11ed-96a4-2eabd0c03f8a
                    delta:
                      amount: '100.00'
                      currency: EUR
                    taxes: []
                    references:
                      - id: dbf4d0a6-effb-11ed-a05b-0242ac120003
                        type: TOPUP
                    booking_date: '2023-01-01T00:00:00.000Z'
                    value_date: '2023-01-01T00:00:00.000Z'
                  webhook_id: d53b06f4-effb-11ed-a05b-0242ac120003
              withdrawal:
                summary: Withdrawal
                value:
                  id: 398278e2-8835-11ed-97e3-2eabd0c03f8a
                  created_at: '2023-01-01T00:00:00.000Z'
                  type: CASH_TRANSACTION.EXECUTED
                  object:
                    id: 6dc9fbca-8835-11ed-a217-2eabd0c03f8a
                    created_at: '2023-01-01T00:00:00.000Z'
                    updated_at: '2023-01-01T00:00:00.000Z'
                    type: WITHDRAWAL
                    account_group_id: 6409e3f2-8835-11ed-96a4-2eabd0c03f8a
                    delta:
                      amount: '-305.00'
                      currency: EUR
                    taxes: []
                    references:
                      - id: 1f5758d3-1ef7-4b4c-96ec-6b3da2bf1a8a
                        type: WITHDRAWAL
                    booking_date: '2023-01-01T00:00:00.000Z'
                    value_date: '2023-01-01T00:00:00.000Z'
                  webhook_id: 7eea34e2-8835-11ed-a47e-2eabd0c03f8a
              withdrawal_cancellation:
                summary: Withdrawal Cancellation
                value:
                  id: 10cabec6-effc-11ed-a05b-0242ac120003
                  created_at: '2023-01-01T00:00:00.000Z'
                  type: CASH_TRANSACTION.EXECUTED
                  object:
                    id: 15750eae-effc-11ed-a05b-0242ac120003
                    created_at: '2023-01-01T00:00:00.000Z'
                    updated_at: '2023-01-01T00:00:00.000Z'
                    type: WITHDRAWAL_CANCELLATION
                    account_group_id: 6409e3f2-8835-11ed-96a4-2eabd0c03f8a
                    delta:
                      amount: '305.00'
                      currency: EUR
                    taxes: []
                    references:
                      - id: 1cffa512-effc-11ed-a05b-0242ac120003
                        type: WITHDRAWAL
                    booking_date: '2023-01-01T00:00:00.000Z'
                    value_date: '2023-01-01T00:00:00.000Z'
                  webhook_id: 0d0edd62-effc-11ed-a05b-0242ac120003
      responses:
        '200':
          description: Request has been processed successfully.
  Security transactions events:
    post:
      operationId: security_transaction_event
      summary: Security transactions events
      description: Security transactions events
      tags:
        - Transactions
      requestBody:
        content:
          application/json:
            schema:
              title: Webhook - Security Transactions - Callback
              type: object
              properties:
                id:
                  type: string
                  format: uuid
                  description: Event unique identifier
                created_at:
                  type: string
                  format: date-time
                  description: >-
                    Date and time when the event was created. [RFC
                    3339-5](https://datatracker.ietf.org/doc/html/rfc3339#section-5.6),
                    [ISO8601
                    UTC](https://www.iso.org/iso-8601-date-and-time-format.html)
                type:
                  type: string
                  description: Event type
                  enum:
                    - SECURITY_TRANSACTION.EXECUTED
                  default: SECURITY_TRANSACTION.EXECUTED
                object:
                  title: Security Transaction
                  type: object
                  properties:
                    account_group_id:
                      title: Account group unique identifier.
                      type: string
                      description: Account group unique identifier.
                      format: uuid
                    account_id:
                      title: Account unique identifier.
                      type: string
                      description: Account unique identifier.
                      format: uuid
                    booking_date:
                      title: ' Transaction booking date'
                      type: string
                      description: ' Transaction booking date and time. [RFC 3339-5](https://datatracker.ietf.org/doc/html/rfc3339#section-5.6), [ISO8601 UTC](https://www.iso.org/iso-8601-date-and-time-format.html)'
                      format: date-time
                    created_at:
                      type: string
                      format: date-time
                      description: >-
                        Date and time when the resource was created. [RFC
                        3339-5](https://datatracker.ietf.org/doc/html/rfc3339#section-5.6),
                        [ISO8601
                        UTC](https://www.iso.org/iso-8601-date-and-time-format.html)
                    delta:
                      title: Security transaction delta
                      description: Entity representing the security transaction delta.
                      type: object
                      properties:
                        amount:
                          type: string
                          pattern: ^-?[0-9]{0,63}(\.[0-9]{1,27})?$
                      required:
                        - amount
                      additionalProperties: true
                    id:
                      title: Security transaction unique identifier
                      type: string
                      description: Security transaction unique identifier.
                      format: uuid
                    instrument:
                      title: Instrument
                      description: Entity representing instrument.
                      type: object
                      properties:
                        uuid:
                          description: Internal instrument identifier.
                          type: string
                          format: uuid
                        isin:
                          title: International securities identification number
                          type: string
                          description: >-
                            International securities identification number
                            defined by [ISO
                            6166](https://en.wikipedia.org/wiki/International_Securities_Identification_Number).
                          pattern: ^[A-Z]{2}[A-Z0-9]{9}[0-9]$
                      required:
                        - uuid
                      additionalProperties: false
                    type:
                      title: Transaction type
                      description: >-
                        Transaction type

                        * ACCUMULATION - Accumulation

                        * ACCUMULATION_CANCELLATION - Accumulation cancellation

                        * ANNUAL_GENERAL_MEETING - Annual general meeting

                        * ANNUAL_GENERAL_MEETING_CANCELLATION - Annual general
                        meeting cancellation

                        * ATTACHMENT - Attachment

                        * ATTACHMENT_CANCELLATION - Attachment cancellation

                        * BALANCE_CORRECTION - Balance correction

                        * BALANCE_CORRECTION_CANCELLATION - Balance correction
                        cancellation

                        * BANKRUPTCY - Bankruptcy

                        * BANKRUPTCY_CANCELLATION - Bankruptcy cancellation

                        * BOND_DEFAULT - Bond default

                        * BOND_DEFAULT_CANCELLATION - Bond default cancellation

                        * BOND_HOLDER_MEETING - Bond holder meeting

                        * BOND_HOLDER_MEETING_CANCELLATION - Bond holder meeting
                        cancellation

                        * BONUS_ISSUE - Bonus Issue/Capitalisation Issue

                        * BONUS_ISSUE_CANCELLATION - Bonus Issue/Capitalisation
                        Issue, Cancellation

                        * CALL_ON_INTERMEDIATE_SECURITIES - Call on Intermediate
                        Securities

                        * CALL_ON_INTERMEDIATE_SECURITIES_CANCELLATION - Call on
                        Intermediate Securities, Cancellation

                        * CAPITAL_DISTRIBUTION - Capital distribution

                        * CAPITAL_DISTRIBUTION_CANCELLATION - Capital
                        distribution cancellation

                        * CAPITAL_GAINS_DISTRIBUTION - Capital gains
                        distribution

                        * CAPITAL_GAINS_DISTRIBUTION_CANCELLATION - Capital
                        gains distribution cancellation

                        * CAPITALISATION - Capitalisation

                        * CAPITALISATION_CANCELLATION - Capitalisation
                        cancellation

                        * CASH_DISTRIBUTION_FROM_NON_ELIGIBLE_SECURITIES_SALES -
                        Cash distribution from non eligible securities sales

                        *
                        CASH_DISTRIBUTION_FROM_NON_ELIGIBLE_SECURITIES_SALES_CANCELLATION
                        - Cash distribution from non eligible securities sales
                        cancellation

                        * CASH_DIVIDEND - Cash dividend

                        * CASH_DIVIDEND_CANCELLATION - Cash dividend
                        cancellation

                        * CHANGE - Change

                        * CHANGE_CANCELLATION - Change, Cancellation

                        * CLASS_ACTION - Class action

                        * CLASS_ACTION_CANCELLATION - Class action cancellation

                        * COMPANY_OPTION - Company option

                        * COMPANY_OPTION_CANCELLATION - Company option
                        cancellation

                        * CONSENT - Consent

                        * CONSENT_CANCELLATION - Consent cancellation

                        * CONVERSION - Conversion

                        * CONVERSION_CANCELLATION - Conversion cancellation

                        * COURT_MEETING - Court meeting

                        * COURT_MEETING_CANCELLATION - Court meeting
                        cancellation

                        * CREDIT_EVENT - Credit event

                        * CREDIT_EVENT_CANCELLATION - Credit event cancellation

                        * DECREASE_IN_VALUE - Decrease in value

                        * DECREASE_IN_VALUE_CANCELLATION - Decrease in value
                        cancellation

                        * DETACHMENT - Detachment

                        * DETACHMENT_CANCELLATION - Detachment cancellation

                        * DISCLOSURE - Disclosure

                        * DISCLOSURE_CANCELLATION - Disclosure cancellation

                        * DIVIDEND_OPTION - Dividend Option

                        * DIVIDEND_OPTION_CANCELLATION - Dividend Option,
                        Cancellation

                        * DIVIDEND_REINVESTMENT - Dividend Reinvestment

                        * DIVIDEND_REINVESTMENT_CANCELLATION - Dividend
                        Reinvestment, Cancellation

                        * DRAWING - Drawing

                        * DRAWING_CANCELLATION - Drawing cancellation

                        * DUST_CLEANUP - Dust Cleanup

                        * DUTCH_AUCTION - Dutch Auction

                        * DUTCH_AUCTION_CANCELLATION - Dutch Auction,
                        Cancellation

                        * EXCHANGE - Exchange

                        * EXCHANGE_CANCELLATION - Exchange cancellation

                        * EXTRAORDINARY_OR_SPECIAL_GENERAL_MEETING -
                        Extraordinary or special general meeting

                        * EXTRAORDINARY_OR_SPECIAL_GENERAL_MEETING_CANCELLATION
                        - Extraordinary or special general meeting cancellation

                        * FINAL_MATURITY - Final maturity

                        * FINAL_MATURITY_CANCELLATION - Final maturity
                        cancellation

                        * FULL_CALL - Full call

                        * FULL_CALL_CANCELLATION - Full call cancellation

                        * INCREASE_IN_VALUE - Increase in value

                        * INCREASE_IN_VALUE_CANCELLATION - Increase in value
                        cancellation

                        * INFORMATION - Information

                        * INFORMATION_CANCELLATION - Information cancellation

                        * INSTALMENT_CALL - Instalment call

                        * INSTALMENT_CALL_CANCELLATION - Instalment call
                        cancellation

                        * INTEREST_PAYMENT - Interest payment

                        * INTEREST_PAYMENT_CANCELLATION - Interest payment
                        cancellation

                        * INTERMEDIATE_SECURITIES_DISTRIBUTION - Intermediate
                        Securities Distribution

                        * INTERMEDIATE_SECURITIES_DISTRIBUTION_CANCELLATION -
                        Intermediate Securities Distribution, Cancellation

                        * LIQUIDATION_PAYMENT - Liquidation Dividend/Liquidation
                        Payment

                        * LIQUIDATION_PAYMENT_CANCELLATION - Liquidation
                        Dividend/Liquidation Payment, Cancellation

                        * MATURITY_EXTENSION - Maturity extension

                        * MATURITY_EXTENSION_CANCELLATION - Maturity extension
                        cancellation

                        * MERGER - Merger

                        * MERGER_CANCELLATION - Merger, Cancellation

                        * NON_OFFICIAL_OFFER - Non-Official Offer

                        * NON_OFFICIAL_OFFER_CANCELLATION - Non-Official Offer,
                        Cancellation

                        * NON_US_TEFRA_D_CERTIFICATION - Non us tefra d
                        certification

                        * NON_US_TEFRA_D_CERTIFICATION_CANCELLATION - Non us
                        tefra d certification cancellation

                        * ODD_LOT_SALE - Odd Lot Sale/Purchase

                        * ODD_LOT_SALE_CANCELLATION - Odd Lot Sale/Purchase,
                        Cancellation

                        * ORDER_EXECUTION - Order execution

                        * ORDER_EXECUTION_CANCELLATION - Order execution
                        cancellation

                        * ORDINARY_GENERAL_MEETING - Ordinary general meeting

                        * ORDINARY_GENERAL_MEETING_CANCELLATION - Ordinary
                        general meeting cancellation

                        * OTHER_EVENT - Other Event

                        * OTHER_EVENT_CANCELLATION - Other Event cancellation

                        * PARI_PASSU - Pari passu

                        * PARI_PASSU_CANCELLATION - Pari passu cancellation

                        * PARTIAL_DEFEASANCE - Partial defeasance

                        * PARTIAL_DEFEASANCE_CANCELLATION - Partial defeasance
                        cancellation

                        * PARTIAL_REDEMPTION_WITH_POOL_FACTOR_REDUCTION -
                        Partial redemption with pool factor reduction

                        *
                        PARTIAL_REDEMPTION_WITH_POOL_FACTOR_REDUCTION_CANCELLATION
                        - Partial redemption with pool factor reduction
                        cancellation

                        * PARTIAL_REDEMPTION_WITHOUT_POOL_FACTOR_REDUCTION -
                        Partial redemption without pool factor reduction

                        *
                        PARTIAL_REDEMPTION_WITHOUT_POOL_FACTOR_REDUCTION_CANCELLATION
                        - Partial redemption without pool factor reduction
                        cancellation

                        * PAY_IN_KIND - Pay in kind

                        * PAY_IN_KIND_CANCELLATION - Pay in kind cancellation

                        * PEAK_FRACTION_COMPENSATION - Peak fraction
                        compensation

                        * PEAK_ORDER_ADJUSTMENT - Peak order adjustment

                        * PLACE_OF_INCORPORATION - Place of incorporation

                        * PLACE_OF_INCORPORATION_CANCELLATION - Place of
                        incorporation cancellation

                        * PRIORITY_ISSUE - Priority Issue

                        * PRIORITY_ISSUE_CANCELLATION - Priority Issue,
                        Cancellation

                        * PUT_REDEMPTION - Put redemption

                        * PUT_REDEMPTION_CANCELLATION - Put redemption
                        cancellation

                        * REDENOMINATION - Redenomination

                        * REDENOMINATION_CANCELLATION - Redenomination
                        cancellation

                        * REMARKETING_AGREEMENT - Remarketing agreement

                        * REMARKETING_AGREEMENT_CANCELLATION - Remarketing
                        agreement cancellation

                        * REPURCHASE_OFFER - Repurchase Offer/Issuer Bid/Reverse
                        Rights

                        * REPURCHASE_OFFER_CANCELLATION - Repurchase
                        Offer/Issuer Bid/Reverse Rights, Cancellation

                        * REVERSE_STOCK_SPLIT - Reverse Stock Split/Change in
                        Nominal Value

                        * REVERSE_STOCK_SPLIT_CANCELLATION - Reverse Stock
                        Split/Change in Nominal Value, Cancellation

                        * RIGHTS_ISSUE - Rights Issue/Subscription Rights/Rights
                        Offer

                        * RIGHTS_ISSUE_CANCELLATION - Rights Issue/Subscription
                        Rights/Rights Offer, Cancellation

                        * SCRIP_DIVIDEND - Scrip dividend

                        * SCRIP_DIVIDEND_CANCELLATION - Scrip dividend
                        cancellation

                        * SECURITIES_TRANSFER - Securities transfer

                        * SECURITIES_TRANSFER_CANCELLATION - Securities transfer
                        cancellation

                        * SHARES_PREMIUM_DIVIDEND - Shares premium dividend

                        * SHARES_PREMIUM_DIVIDEND_CANCELLATION - Shares premium
                        dividend cancellation

                        * SMALLEST_NEGOTIABLE_UNIT - Smallest negotiable unit

                        * SMALLEST_NEGOTIABLE_UNIT_CANCELLATION - Smallest
                        negotiable unit cancellation

                        * SPIN_OFF - Spin-Off

                        * SPIN_OFF_CANCELLATION - Spin-Off, Cancellation

                        * STOCK_DIVIDEND - Stock Dividend

                        * STOCK_DIVIDEND_CANCELLATION - Stock Dividend,
                        Cancellation

                        * STOCK_SPLIT - Stock Split/Change in Nominal
                        Value/Subdivision

                        * STOCK_SPLIT_CANCELLATION - Stock Split/Change in
                        Nominal Value/Subdivision, Cancellation

                        * TAX_ON_NON_DISTRIBUTED_PROCEEDS - Tax on non
                        distributed proceeds

                        * TAX_ON_NON_DISTRIBUTED_PROCEEDS_CANCELLATION - Tax on
                        non distributed proceeds cancellation

                        * TAX_OPTIMISATION - Tax optimisation

                        * TAX_RECLAIM - Tax reclaim

                        * TAX_RECLAIM_CANCELLATION - Tax reclaim cancellation

                        * TENDER - Tender/Acquisition/Takeover/Purchase Offer

                        * TENDER_CANCELLATION -
                        Tender/Acquisition/Takeover/Purchase Offer, Cancellation

                        * TRADING_STATUS_ACTIVE - Trading status active

                        * TRADING_STATUS_ACTIVE_CANCELLATION - Trading status
                        active cancellation

                        * TRADING_STATUS_DELISTED - Trading status delisted

                        * TRADING_STATUS_DELISTED_CANCELLATION - Trading status
                        delisted cancellation

                        * TRADING_STATUS_SUSPENDED - Trading status suspended

                        * TRADING_STATUS_SUSPENDED_CANCELLATION - Trading status
                        suspended cancellation

                        * VIRTUAL_CASH_CORRECTION_CANCELLATION - Virtual cash
                        correction cancellation

                        * WARRANT_EXERCISE - Warrant exercise

                        * WARRANT_EXERCISE_CANCELLATION - Warrant exercise
                        cancellation

                        * WITHHOLDING_TAX_RELIEF_CERTIFICATION - Withholding tax
                        relief certification

                        * WITHHOLDING_TAX_RELIEF_CERTIFICATION_CANCELLATION -
                        Withholding tax relief certification cancellation

                        * WORTHLESS - Worthless

                        * WORTHLESS_CANCELLATION - Worthless, Cancellation
                      type: string
                      enum:
                        - ACCUMULATION
                        - ACCUMULATION_CANCELLATION
                        - ANNUAL_GENERAL_MEETING
                        - ANNUAL_GENERAL_MEETING_CANCELLATION
                        - ATTACHMENT
                        - ATTACHMENT_CANCELLATION
                        - BALANCE_CORRECTION
                        - BALANCE_CORRECTION_CANCELLATION
                        - BANKRUPTCY
                        - BANKRUPTCY_CANCELLATION
                        - BOND_DEFAULT
                        - BOND_DEFAULT_CANCELLATION
                        - BOND_HOLDER_MEETING
                        - BOND_HOLDER_MEETING_CANCELLATION
                        - BONUS_ISSUE
                        - BONUS_ISSUE_CANCELLATION
                        - CALL_ON_INTERMEDIATE_SECURITIES
                        - CALL_ON_INTERMEDIATE_SECURITIES_CANCELLATION
                        - CAPITAL_DISTRIBUTION
                        - CAPITAL_DISTRIBUTION_CANCELLATION
                        - CAPITAL_GAINS_DISTRIBUTION
                        - CAPITAL_GAINS_DISTRIBUTION_CANCELLATION
                        - CAPITALISATION
                        - CAPITALISATION_CANCELLATION
                        - CASH_DISTRIBUTION_FROM_NON_ELIGIBLE_SECURITIES_SALES
                        - >-
                          CASH_DISTRIBUTION_FROM_NON_ELIGIBLE_SECURITIES_SALES_CANCELLATION
                        - CASH_DIVIDEND
                        - CASH_DIVIDEND_CANCELLATION
                        - CHANGE
                        - CHANGE_CANCELLATION
                        - CLASS_ACTION
                        - CLASS_ACTION_CANCELLATION
                        - COMPANY_OPTION
                        - COMPANY_OPTION_CANCELLATION
                        - CONSENT
                        - CONSENT_CANCELLATION
                        - CONVERSION
                        - CONVERSION_CANCELLATION
                        - COURT_MEETING
                        - COURT_MEETING_CANCELLATION
                        - CREDIT_EVENT
                        - CREDIT_EVENT_CANCELLATION
                        - DECREASE_IN_VALUE
                        - DECREASE_IN_VALUE_CANCELLATION
                        - DETACHMENT
                        - DETACHMENT_CANCELLATION
                        - DISCLOSURE
                        - DISCLOSURE_CANCELLATION
                        - DIVIDEND_OPTION
                        - DIVIDEND_OPTION_CANCELLATION
                        - DIVIDEND_REINVESTMENT
                        - DIVIDEND_REINVESTMENT_CANCELLATION
                        - DRAWING
                        - DRAWING_CANCELLATION
                        - DUST_CLEANUP
                        - DUTCH_AUCTION
                        - DUTCH_AUCTION_CANCELLATION
                        - EXCHANGE
                        - EXCHANGE_CANCELLATION
                        - EXTRAORDINARY_OR_SPECIAL_GENERAL_MEETING
                        - EXTRAORDINARY_OR_SPECIAL_GENERAL_MEETING_CANCELLATION
                        - FINAL_MATURITY
                        - FINAL_MATURITY_CANCELLATION
                        - FULL_CALL
                        - FULL_CALL_CANCELLATION
                        - INCREASE_IN_VALUE
                        - INCREASE_IN_VALUE_CANCELLATION
                        - INFORMATION
                        - INFORMATION_CANCELLATION
                        - INSTALMENT_CALL
                        - INSTALMENT_CALL_CANCELLATION
                        - INTEREST_PAYMENT
                        - INTEREST_PAYMENT_CANCELLATION
                        - INTERMEDIATE_SECURITIES_DISTRIBUTION
                        - INTERMEDIATE_SECURITIES_DISTRIBUTION_CANCELLATION
                        - LIQUIDATION_PAYMENT
                        - LIQUIDATION_PAYMENT_CANCELLATION
                        - MATURITY_EXTENSION
                        - MATURITY_EXTENSION_CANCELLATION
                        - MERGER
                        - MERGER_CANCELLATION
                        - NON_OFFICIAL_OFFER
                        - NON_OFFICIAL_OFFER_CANCELLATION
                        - NON_US_TEFRA_D_CERTIFICATION
                        - NON_US_TEFRA_D_CERTIFICATION_CANCELLATION
                        - ODD_LOT_SALE
                        - ODD_LOT_SALE_CANCELLATION
                        - ORDER_EXECUTION
                        - ORDER_EXECUTION_CANCELLATION
                        - ORDINARY_GENERAL_MEETING
                        - ORDINARY_GENERAL_MEETING_CANCELLATION
                        - OTHER_EVENT
                        - OTHER_EVENT_CANCELLATION
                        - PARI_PASSU
                        - PARI_PASSU_CANCELLATION
                        - PARTIAL_DEFEASANCE
                        - PARTIAL_DEFEASANCE_CANCELLATION
                        - PARTIAL_REDEMPTION_WITH_POOL_FACTOR_REDUCTION
                        - >-
                          PARTIAL_REDEMPTION_WITH_POOL_FACTOR_REDUCTION_CANCELLATION
                        - PARTIAL_REDEMPTION_WITHOUT_POOL_FACTOR_REDUCTION
                        - >-
                          PARTIAL_REDEMPTION_WITHOUT_POOL_FACTOR_REDUCTION_CANCELLATION
                        - PAY_IN_KIND
                        - PAY_IN_KIND_CANCELLATION
                        - PEAK_FRACTION_COMPENSATION
                        - PEAK_ORDER_ADJUSTMENT
                        - PLACE_OF_INCORPORATION
                        - PLACE_OF_INCORPORATION_CANCELLATION
                        - PRIORITY_ISSUE
                        - PRIORITY_ISSUE_CANCELLATION
                        - PUT_REDEMPTION
                        - PUT_REDEMPTION_CANCELLATION
                        - REDENOMINATION
                        - REDENOMINATION_CANCELLATION
                        - REMARKETING_AGREEMENT
                        - REMARKETING_AGREEMENT_CANCELLATION
                        - REPURCHASE_OFFER
                        - REPURCHASE_OFFER_CANCELLATION
                        - REVERSE_STOCK_SPLIT
                        - REVERSE_STOCK_SPLIT_CANCELLATION
                        - RIGHTS_ISSUE
                        - RIGHTS_ISSUE_CANCELLATION
                        - SCRIP_DIVIDEND
                        - SCRIP_DIVIDEND_CANCELLATION
                        - SECURITIES_TRANSFER
                        - SECURITIES_TRANSFER_CANCELLATION
                        - SHARES_PREMIUM_DIVIDEND
                        - SHARES_PREMIUM_DIVIDEND_CANCELLATION
                        - SMALLEST_NEGOTIABLE_UNIT
                        - SMALLEST_NEGOTIABLE_UNIT_CANCELLATION
                        - SPIN_OFF
                        - SPIN_OFF_CANCELLATION
                        - STOCK_DIVIDEND
                        - STOCK_DIVIDEND_CANCELLATION
                        - STOCK_SPLIT
                        - STOCK_SPLIT_CANCELLATION
                        - TAX_ON_NON_DISTRIBUTED_PROCEEDS
                        - TAX_ON_NON_DISTRIBUTED_PROCEEDS_CANCELLATION
                        - TAX_OPTIMISATION
                        - TAX_RECLAIM
                        - TAX_RECLAIM_CANCELLATION
                        - TENDER
                        - TENDER_CANCELLATION
                        - TRADING_STATUS_ACTIVE
                        - TRADING_STATUS_ACTIVE_CANCELLATION
                        - TRADING_STATUS_DELISTED
                        - TRADING_STATUS_DELISTED_CANCELLATION
                        - TRADING_STATUS_SUSPENDED
                        - TRADING_STATUS_SUSPENDED_CANCELLATION
                        - VIRTUAL_CASH_CORRECTION_CANCELLATION
                        - WARRANT_EXERCISE
                        - WARRANT_EXERCISE_CANCELLATION
                        - WITHHOLDING_TAX_RELIEF_CERTIFICATION
                        - WITHHOLDING_TAX_RELIEF_CERTIFICATION_CANCELLATION
                        - WORTHLESS
                        - WORTHLESS_CANCELLATION
                    references:
                      type: array
                      items:
                        title: Security transaction reference
                        description: Entity representing security transaction reference.
                        type: object
                        properties:
                          id:
                            title: Unique identifier for a resource of given type
                            type: string
                            description: Unique identifier for a resource of given type.
                            format: uuid
                          type:
                            type: string
                            description: >-
                              Type of the reference.

                              * ORDER - Order

                              * ORDER_EXECUTION - Order execution

                              * CORPORATE_ACTION - Corporate action

                              * CORPORATE_ACTION_TRANSACTION_ID - Corporate
                              action transaction ID
                            enum:
                              - ORDER
                              - ORDER_EXECUTION
                              - CORPORATE_ACTION
                              - CORPORATE_ACTION_TRANSACTION_ID
                        required:
                          - id
                          - type
                        additionalProperties: false
                    updated_at:
                      type: string
                      format: date-time
                      description: >-
                        Date and time when the resource was last updated. [RFC
                        3339-5](https://datatracker.ietf.org/doc/html/rfc3339#section-5.6),
                        [ISO8601
                        UTC](https://www.iso.org/iso-8601-date-and-time-format.html)
                    value_date:
                      title: Transaction value date
                      type: string
                      description: >-
                        Transaction value date and time. [RFC
                        3339-5](https://datatracker.ietf.org/doc/html/rfc3339#section-5.6),
                        [ISO8601
                        UTC](https://www.iso.org/iso-8601-date-and-time-format.html)
                      format: date-time
                  required:
                    - id
                    - type
                    - account_id
                    - account_group_id
                    - instrument
                    - delta
                    - references
                    - value_date
                    - booking_date
                    - created_at
                    - updated_at
                  additionalProperties: true
                webhook_id:
                  title: Webhook ID
                  type: string
                  description: Webhook unique identifier.
                  format: uuid
              required:
                - id
                - created_at
                - type
                - object
                - webhook_id
              additionalProperties: false
            examples:
              order_execution:
                summary: Order Execution
                value:
                  id: 543c9996-eff6-11ed-a05b-0242ac120003
                  created_at: '2023-01-01T00:00:00.000Z'
                  type: SECURITY_TRANSACTION.EXECUTED
                  object:
                    id: 6dc9fbca-8835-11ed-a217-2eabd0c03f8a
                    created_at: '2023-01-01T00:00:00.000Z'
                    updated_at: '2023-01-01T00:00:00.000Z'
                    type: ORDER_EXECUTION
                    account_id: db6290bb-1491-45bf-aafe-262dad59d497
                    account_group_id: 6409e3f2-8835-11ed-96a4-2eabd0c03f8a
                    instrument:
                      isin: US0378331005
                      uuid: ccb86937-8a39-4160-8d33-85bf9e902321
                    delta:
                      amount: '-2.5234543879'
                    references:
                      - id: 7579a672-8835-11ed-9455-2eabd0c03f8a
                        type: ORDER_EXECUTION
                      - id: 1f5758d3-1ef7-4b4c-96ec-6b3da2bf1a8a
                        type: ORDER
                    booking_date: '2023-01-01T00:00:00.000Z'
                    value_date: '2023-01-01T00:00:00.000Z'
                  webhook_id: 3ae8a8a4-eff6-11ed-a05b-0242ac120003
              order_execution_cancellation:
                summary: Order Execution Cancellation
                value:
                  id: 398278e2-8835-11ed-97e3-2eabd0c03f8a
                  created_at: '2023-01-01T00:00:00.000Z'
                  type: SECURITY_TRANSACTION.EXECUTED
                  object:
                    id: 6dc9fbca-8835-11ed-a217-2eabd0c03f8a
                    created_at: '2023-01-01T00:00:00.000Z'
                    updated_at: '2023-01-01T00:00:00.000Z'
                    type: ORDER_EXECUTION_CANCELLATION
                    account_id: db6290bb-1491-45bf-aafe-262dad59d497
                    account_group_id: 6409e3f2-8835-11ed-96a4-2eabd0c03f8a
                    instrument:
                      isin: US0378331005
                      uuid: ccb86937-8a39-4160-8d33-85bf9e902321
                    delta:
                      amount: '2.5234543879'
                    references:
                      - id: 7579a672-8835-11ed-9455-2eabd0c03f8a
                        type: ORDER_EXECUTION
                      - id: 1f5758d3-1ef7-4b4c-96ec-6b3da2bf1a8a
                        type: ORDER
                    booking_date: '2023-01-01T00:00:00.000Z'
                    value_date: '2023-01-01T00:00:00.000Z'
                  webhook_id: fd9690e2-effa-11ed-a05b-0242ac120003
              merger:
                summary: Merger
                value:
                  id: 71478127-4688-46b6-b3c6-871febb20330
                  created_at: '2023-01-01T00:00:00.000Z'
                  type: SECURITY_TRANSACTION.EXECUTED
                  object:
                    id: f0f6834a-ddc8-4ef4-b4e2-025a6bbd1cf1
                    created_at: '2023-01-01T00:00:00.000Z'
                    updated_at: '2023-01-01T00:00:00.000Z'
                    type: MERGER
                    account_id: db6290bb-1491-45bf-aafe-262dad59d497
                    account_group_id: 6409e3f2-8835-11ed-96a4-2eabd0c03f8a
                    instrument:
                      isin: US0378331005
                      uuid: ccb86937-8a39-4160-8d33-85bf9e902321
                    delta:
                      amount: '32.52'
                    references:
                      - id: 7f3a087b-2934-40f0-a311-caab2e449d9b
                        type: CORPORATE_ACTION
                      - id: f29af46d-d424-4b87-b656-ab2cb46e460c
                        type: CORPORATE_ACTION_TRANSACTION_ID
                    booking_date: '2023-01-01T00:00:00.000Z'
                    value_date: '2023-01-01T00:00:00.000Z'
                  webhook_id: 52a47a86-8805-43be-b631-d79e67bb5da9
      responses:
        '200':
          description: Request has been processed successfully.
  Treasury reports events:
    post:
      operationId: treasury_report_event
      summary: Treasury reports events
      description: Treasury reports events
      tags:
        - Treasury Reports
      requestBody:
        content:
          application/json:
            schema:
              title: Webhook - Treasury report - Callback
              type: object
              properties:
                id:
                  type: string
                  format: uuid
                  description: Event unique identifier
                created_at:
                  type: string
                  format: date-time
                  description: >-
                    Date and time when the event was created. [RFC
                    3339-5](https://datatracker.ietf.org/doc/html/rfc3339#section-5.6),
                    [ISO8601
                    UTC](https://www.iso.org/iso-8601-date-and-time-format.html)
                type:
                  type: string
                  description: Event type
                  enum:
                    - TREASURY_REPORT.CREATED
                  default: TREASURY_REPORT.CREATED
                object:
                  title: Treasury report
                  type: object
                  properties:
                    id:
                      title: Treasury operation unique identifier
                      type: string
                      format: uuid
                    type:
                      type: string
                      description: |-
                        Treasury operation type.
                        * TRADING - 
                        * CORPORATE_ACTION - 
                        * FEE - 
                        * TAX - 
                        * TAX_ADJUSTMENT_RECEIVABLE - 
                        * TAX_ADJUSTMENT_PAYABLE - 
                      enum:
                        - TRADING
                        - CORPORATE_ACTION
                        - FEE
                        - TAX
                        - TAX_ADJUSTMENT_RECEIVABLE
                        - TAX_ADJUSTMENT_PAYABLE
                    currency:
                      type: string
                      description: >-
                        The currency of the treasury payment. Alphabetic
                        three-letter [ISO
                        4217](https://en.wikipedia.org/wiki/ISO_4217) currency
                        code.
                    settlement_amount:
                      type: string
                      pattern: ^[0-9]{1,9}(\.[0-9]{2})?$
                    report_date:
                      description: The date when the treasury report was created.
                      type: string
                      format: date
                    direction:
                      type: string
                      description: |-
                        Direction of the treasury operation.
                        * INCOMING - 
                        * OUTGOING - 
                        * NA - 
                      enum:
                        - INCOMING
                        - OUTGOING
                        - NA
                    filename:
                      description: The report name.
                      type: string
                  required:
                    - id
                    - type
                    - currency
                    - settlement_amount
                    - report_date
                    - direction
                    - filename
                  additionalProperties: false
                webhook_id:
                  title: Webhook ID
                  type: string
                  description: Webhook unique identifier.
                  format: uuid
              required:
                - id
                - created_at
                - type
                - object
                - webhook_id
              additionalProperties: false
            example:
              id: 8962b496-8d42-4560-bfab-10490dd1a721
              created_at: '2023-05-08T10:42:34.758Z'
              type: TREASURY_REPORT.CREATED
              object:
                id: 6e736b54-ed57-46ad-8620-0ef59ddd8e6d
                type: TRADING
                currency: EUR
                settlement_amount: '123.12'
                report_date: '2023-05-08'
                direction: OUTGOING
                filename: trading_buy_05082023.csv
              webhook_id: 9df39835-be87-4243-9018-f2500b39cee6
      responses:
        '200':
          description: Request has been processed successfully.
  User reports events:
    post:
      operationId: report_event
      summary: User reports events
      description: User reports events
      tags:
        - Reports
      requestBody:
        content:
          application/json:
            schema:
              title: Webhook - Reports - Callback
              type: object
              properties:
                id:
                  type: string
                  format: uuid
                  description: Event unique identifier
                created_at:
                  type: string
                  format: date-time
                  description: >-
                    Date and time when the event was created. [RFC
                    3339-5](https://datatracker.ietf.org/doc/html/rfc3339#section-5.6),
                    [ISO8601
                    UTC](https://www.iso.org/iso-8601-date-and-time-format.html)
                type:
                  type: string
                  description: Event type
                  enum:
                    - REPORT.CREATED
                  default: REPORT.CREATED
                object:
                  title: Report
                  anyOf:
                    - title: Report
                      type: object
                      properties:
                        id:
                          title: Report unique identifier.
                          type: string
                          description: Report unique identifier.
                          format: uuid
                        created_at:
                          type: string
                          format: date-time
                          description: >-
                            Date and time when the resource was created. [RFC
                            3339-5](https://datatracker.ietf.org/doc/html/rfc3339#section-5.6),
                            [ISO8601
                            UTC](https://www.iso.org/iso-8601-date-and-time-format.html)
                        user_id:
                          title: User unique identifier.
                          type: string
                          description: User unique identifier.
                          format: uuid
                        type:
                          title: Report type
                          description: >-
                            Report type

                            * ACCOUNT_CLOSING - Securities account closure

                            * ACCOUNT_OPENING - Securities account opening

                            * AD_HOC_ACCOUNT_STATEMENT - Ad hoc account
                            statement

                            * ANNUAL_ACCOUNT_STATEMENT - Annual account
                            statement

                            * ANNUAL_INCOME_STATEMENT - Annual tax income
                            statement ("Erträgnisaufstellung")

                            * ANNUAL_TAX_STATEMENT - Annual tax reporting

                            * BANK_ACCOUNT_CONNECTED - Connect reference bank
                            account

                            * BUY_ORDER - Buy order

                            * CANCELLED_ORDER - Cancelled buy or sell order (not
                            yet executed, user cancels or trading venue
                            cancelled)

                            * CORPORATE_ACTION_CASH_TRANSACTION - cash
                            transaction document (after corporate action)

                            * CORPORATE_ACTION_SECURITY_TRANSACTION - security
                            transaction document (after corporate action)

                            * DIRECT_DEBIT_MANDATE - Creation of SEPA direct
                            debit mandate

                            * EX_POST_COST - Ex-post cost report

                            * FUND_COMMUNICATION - Generic fund communication

                            * GENERAL_MEETING_NOTIFICATION - General meeting
                            notification

                            * GENERIC_COMMUNICATION - Generic communication

                            * INCOME_DISTRIBUTION - Income distribution report

                            * INCOME_REINVESTMENT - Reinvestment billing report
                            (accumulating funds)

                            * MONTHLY_BILLING_STATEMENT - Monthly billing
                            activities statement

                            * QUARTERLY_ACCOUNT_STATEMENT - Quarterly account
                            statement

                            * REVOKED_ORDER - Revoked buy or sell order
                            ("Storno")

                            * SECURITIES_TRANSFER_INCOMING - Securities are
                            transferred in

                            * SECURITIES_TRANSFER_OUTGOING - Securities are
                            being transferred out

                            * SELL_ORDER - Sell order

                            * TAX_EXEMPTION_CREATION - Creation of exemption
                            order ("Freistellungsauftrag")

                            * TAX_PAYMENT - Tax payment document

                            * TAX_PREPAYMENT_DE - German tax prepayment
                            (Vorabpauschale)

                            * TAX_REFUND - Tax refund document (after tax
                            optimization)
                          type: string
                          enum:
                            - ACCOUNT_CLOSING
                            - ACCOUNT_OPENING
                            - AD_HOC_ACCOUNT_STATEMENT
                            - ANNUAL_ACCOUNT_STATEMENT
                            - ANNUAL_INCOME_STATEMENT
                            - ANNUAL_TAX_STATEMENT
                            - BANK_ACCOUNT_CONNECTED
                            - BUY_ORDER
                            - CANCELLED_ORDER
                            - CORPORATE_ACTION_CASH_TRANSACTION
                            - CORPORATE_ACTION_SECURITY_TRANSACTION
                            - DIRECT_DEBIT_MANDATE
                            - EX_POST_COST
                            - FUND_COMMUNICATION
                            - GENERAL_MEETING_NOTIFICATION
                            - GENERIC_COMMUNICATION
                            - INCOME_DISTRIBUTION
                            - INCOME_REINVESTMENT
                            - MONTHLY_BILLING_STATEMENT
                            - QUARTERLY_ACCOUNT_STATEMENT
                            - REVOKED_ORDER
                            - SECURITIES_TRANSFER_INCOMING
                            - SECURITIES_TRANSFER_OUTGOING
                            - SELL_ORDER
                            - TAX_EXEMPTION_CREATION
                            - TAX_PAYMENT
                            - TAX_PREPAYMENT_DE
                            - TAX_REFUND
                        substituted_report_id:
                          oneOf:
                            - type: 'null'
                            - title: Substituted Report unique identifier.
                              type: string
                              description: >-
                                References report that has been replaced by this
                                one.
                              format: uuid
                        data:
                          title: Report Data
                          type: object
                          description: Contents of the report.
                          properties:
                            account:
                              type: object
                              title: Account.
                              description: Account information.
                              properties:
                                id:
                                  title: Account unique identifier.
                                  type: string
                                  description: Account unique identifier.
                                  format: uuid
                            references:
                              type: array
                              title: References.
                              items:
                                title: Report reference data
                                type: object
                                description: Reference data for a report
                                properties:
                                  id:
                                    type: string
                                    format: uuid
                                  type:
                                    title: Report reference type
                                    description: >-
                                      Report reference type

                                      * CORPORATE_ACTION_TRANSACTION_ID -
                                      Corporate action transaction identifier

                                      * ACCOUNT_GROUP_ID - Account group
                                      identifier

                                      * ACCOUNT_ID - Account identifier

                                      * ORDER_ID - Order identifier
                                    type: string
                                    enum:
                                      - CORPORATE_ACTION_TRANSACTION_ID
                                      - ACCOUNT_GROUP_ID
                                      - ACCOUNT_ID
                                      - ORDER_ID
                      required:
                        - id
                        - user_id
                        - created_at
                        - type
                        - substituted_report_id
                      additionalProperties: false
                    - title: Report - Order ex-ante cost
                      type: object
                      properties:
                        id:
                          title: Report unique identifier.
                          type: string
                          description: Report unique identifier.
                          format: uuid
                        created_at:
                          type: string
                          format: date-time
                          description: >-
                            Date and time when the resource was created. [RFC
                            3339-5](https://datatracker.ietf.org/doc/html/rfc3339#section-5.6),
                            [ISO8601
                            UTC](https://www.iso.org/iso-8601-date-and-time-format.html)
                        user_id:
                          title: User unique identifier.
                          type: string
                          description: User unique identifier.
                          format: uuid
                        type:
                          type: string
                          default: ORDER_EX_ANTE_COST
                          description: The type of report must be “ORDER_EX_ANTE_COST”.
                        substituted_report_id:
                          oneOf:
                            - type: 'null'
                            - title: Substituted Report unique identifier.
                              type: string
                              description: >-
                                References report that has been replaced by this
                                one.
                              format: uuid
                        data:
                          title: Report Data - Order ex-ante cost
                          type: object
                          description: Contents of the order ex-ante cost report.
                          properties:
                            holding_period:
                              type: object
                              description: Holding period.
                              properties:
                                unit:
                                  type: string
                                  description: |-
                                    Unit of time. 
                                    * YEAR - 
                                  enum:
                                    - YEAR
                                  default: YEAR
                                quantity:
                                  description: Quantity of time units.
                                  type: integer
                            instrument:
                              type: object
                              description: Instrument details.
                              properties:
                                isin:
                                  title: >-
                                    International securities identification
                                    number
                                  type: string
                                  description: >-
                                    International securities identification
                                    number defined by [ISO
                                    6166](https://en.wikipedia.org/wiki/International_Securities_Identification_Number).
                                  pattern: ^[A-Z]{2}[A-Z0-9]{9}[0-9]$
                                short_name:
                                  description: Instrument short name.
                                  type: string
                                  maxLength: 100
                            venue:
                              type: object
                              description: Venue details.
                              properties:
                                name:
                                  description: Venue name.
                                  type: string
                                  maxLength: 100
                            account:
                              type: object
                              description: Account details.
                              properties:
                                id:
                                  title: Account unique identifier.
                                  type: string
                                  description: Account unique identifier.
                                  format: uuid
                                account_number:
                                  type: integer
                                  description: >-
                                    The serial account number of the account in
                                    the account group.
                                  minimum: 1
                            account_group:
                              type: object
                              description: Account group details.
                              properties:
                                id:
                                  title: Account group unique identifier.
                                  type: string
                                  description: Account group unique identifier.
                                  format: uuid
                                securities_account_number:
                                  type: string
                                  description: Securities account number.
                                  pattern: ^[0-9]{9}$
                            user:
                              type: object
                              description: User details.
                              properties:
                                first_name:
                                  type: string
                                  maxLength: 100
                                  minLength: 2
                                  description: First name of the user.
                                last_name:
                                  type: string
                                  maxLength: 100
                                  minLength: 2
                                  description: Last name of the user.
                                salutation:
                                  type: string
                                  description: >-
                                    Salutation of the user used in reports and
                                    statements.

                                    * (empty string) - 

                                    * SALUTATION_MALE - 

                                    * SALUTATION_FEMALE - 

                                    * SALUTATION_FEMALE_MARRIED - 

                                    * SALUTATION_DIVERSE - 
                                  enum:
                                    - ''
                                    - SALUTATION_MALE
                                    - SALUTATION_FEMALE
                                    - SALUTATION_FEMALE_MARRIED
                                    - SALUTATION_DIVERSE
                                  default: ''
                                title:
                                  type: string
                                  description: >-
                                    Title of the user used in reports and
                                    statements.

                                    * (empty string) - 

                                    * DR - Doctor

                                    * PROF - Professor

                                    * PROF_DR - 

                                    * DIPL_ING - Graduate engineer
                                    (Diplom-Ingenieur)

                                    * MAGISTER - 
                                  enum:
                                    - ''
                                    - DR
                                    - PROF
                                    - PROF_DR
                                    - DIPL_ING
                                    - MAGISTER
                                  default: ''
                                address:
                                  type: object
                                  description: User residential address.
                                  properties:
                                    address_line1:
                                      type: string
                                      description: First address line of the address.
                                      maxLength: 100
                                    address_line2:
                                      type: string
                                      description: Second address line of the address.
                                      maxLength: 100
                                    postcode:
                                      title: Postal code
                                      type: string
                                      description: Postal code (postcode, PIN or ZIP code)
                                      pattern: >-
                                        ^[a-zA-Z0-9][a-zA-Z0-9\s\-]{0,8}[a-zA-Z0-9]?$
                                    country:
                                      description: >-
                                        Country code. [ISO 3166 alpha-2
                                        Codes](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2).
                                      type: string
                                      pattern: ^[A-Z]{2}$
                                    state:
                                      description: >-
                                        State, province, county. [ISO 3166
                                        alpha-2
                                        Codes](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2).
                                      type: string
                                      maxLength: 50
                                    city:
                                      title: City name
                                      type: string
                                      minLength: 1
                                      maxLength: 85
                            order:
                              type: object
                              description: Order details.
                              properties:
                                user_id:
                                  type: string
                                  format: uuid
                                  description: The ID of the user.
                                account_id:
                                  type: string
                                  format: uuid
                                  description: The ID of the account that owns the order.
                                cash_amount:
                                  allOf:
                                    - type: string
                                      pattern: ^[0-9]{1,9}(\.[0-9]{2})?$
                                    - description: Cash amount for a nominal order.
                                currency:
                                  allOf:
                                    - type: string
                                      description: >-
                                        Alphabetic three-letter [ISO
                                        4217](https://en.wikipedia.org/wiki/ISO_4217)
                                        currency code.

                                        * EUR - Euro
                                      enum:
                                        - EUR
                                      default: EUR
                                    - description: The currency for the order.
                                side:
                                  type: string
                                  description: |-
                                    Side of the order.
                                    * BUY - 
                                    * SELL - 
                                  enum:
                                    - BUY
                                    - SELL
                                instrument_id:
                                  title: >-
                                    International securities identification
                                    number
                                  type: string
                                  description: >-
                                    International securities identification
                                    number defined by [ISO
                                    6166](https://en.wikipedia.org/wiki/International_Securities_Identification_Number).
                                  pattern: ^[A-Z]{2}[A-Z0-9]{9}[0-9]$
                                instrument_id_type:
                                  description: |-
                                    The type of the ID used in the request.
                                    * ISIN - 
                                  enum:
                                    - ISIN
                                  default: ISIN
                                  type: string
                                order_type:
                                  type: string
                                  description: |-
                                    Type of the order.
                                    * MARKET - 
                                    * LIMIT - 
                                    * STOP - 
                                  enum:
                                    - MARKET
                                    - LIMIT
                                    - STOP
                                quantity:
                                  allOf:
                                    - type: string
                                      pattern: ^[0-9]{0,63}(\.[0-9]{1,27})?$
                                    - description: Quantity of securities for the order.
                                limit_price:
                                  allOf:
                                    - type: string
                                      pattern: ^[0-9]{0,63}(\.[0-9]{1,27})?$
                                    - description: >-
                                        The limit price for orders of the type
                                        'limit'.
                                stop_price:
                                  allOf:
                                    - type: string
                                      pattern: ^[0-9]{0,63}(\.[0-9]{1,27})?$
                                    - description: >-
                                        The stop price for orders of the type
                                        'stop'.
                                price:
                                  allOf:
                                    - type: string
                                      pattern: ^[0-9]{0,63}(\.[0-9]{1,27})?$
                                    - description: >-
                                        The estimated price for the order. In
                                        case of LIMIT or STOP order provided
                                        'limit'/'stop' price will be used.
                            return_impact:
                              type: object
                              description: Return impact.
                              properties:
                                year_one:
                                  title: Cost
                                  type: object
                                  properties:
                                    cash_amount:
                                      type: string
                                      pattern: ^[0-9]{1,9}(\.[0-9]{2})?$
                                    currency:
                                      type: string
                                      description: >-
                                        Alphabetic three-letter [ISO
                                        4217](https://en.wikipedia.org/wiki/ISO_4217)
                                        currency code.

                                        * EUR - Euro
                                      enum:
                                        - EUR
                                      default: EUR
                                    as_percentage:
                                      allOf:
                                        - type: string
                                          pattern: ^-?[0-9]{0,63}(\.[0-9]{1,27})?$
                                        - description: >-
                                            The cost value represented as a
                                            percentage.
                                  additionalProperties: false
                                year_two:
                                  title: Cost
                                  type: object
                                  properties:
                                    cash_amount:
                                      type: string
                                      pattern: ^[0-9]{1,9}(\.[0-9]{2})?$
                                    currency:
                                      type: string
                                      description: >-
                                        Alphabetic three-letter [ISO
                                        4217](https://en.wikipedia.org/wiki/ISO_4217)
                                        currency code.

                                        * EUR - Euro
                                      enum:
                                        - EUR
                                      default: EUR
                                    as_percentage:
                                      allOf:
                                        - type: string
                                          pattern: ^-?[0-9]{0,63}(\.[0-9]{1,27})?$
                                        - description: >-
                                            The cost value represented as a
                                            percentage.
                                  additionalProperties: false
                                year_three:
                                  title: Cost
                                  type: object
                                  properties:
                                    cash_amount:
                                      type: string
                                      pattern: ^[0-9]{1,9}(\.[0-9]{2})?$
                                    currency:
                                      type: string
                                      description: >-
                                        Alphabetic three-letter [ISO
                                        4217](https://en.wikipedia.org/wiki/ISO_4217)
                                        currency code.

                                        * EUR - Euro
                                      enum:
                                        - EUR
                                      default: EUR
                                    as_percentage:
                                      allOf:
                                        - type: string
                                          pattern: ^-?[0-9]{0,63}(\.[0-9]{1,27})?$
                                        - description: >-
                                            The cost value represented as a
                                            percentage.
                                  additionalProperties: false
                            total_cost:
                              title: Order ex-ante aggregated cost
                              type: object
                              description: >-
                                Aggregated totals of product costs, service
                                costs and third party payments.
                              properties:
                                product:
                                  title: Cost
                                  type: object
                                  properties:
                                    cash_amount:
                                      type: string
                                      pattern: ^[0-9]{1,9}(\.[0-9]{2})?$
                                    currency:
                                      type: string
                                      description: >-
                                        Alphabetic three-letter [ISO
                                        4217](https://en.wikipedia.org/wiki/ISO_4217)
                                        currency code.

                                        * EUR - Euro
                                      enum:
                                        - EUR
                                      default: EUR
                                    as_percentage:
                                      allOf:
                                        - type: string
                                          pattern: ^-?[0-9]{0,63}(\.[0-9]{1,27})?$
                                        - description: >-
                                            The cost value represented as a
                                            percentage.
                                  additionalProperties: false
                                service:
                                  title: Cost
                                  type: object
                                  properties:
                                    cash_amount:
                                      type: string
                                      pattern: ^[0-9]{1,9}(\.[0-9]{2})?$
                                    currency:
                                      type: string
                                      description: >-
                                        Alphabetic three-letter [ISO
                                        4217](https://en.wikipedia.org/wiki/ISO_4217)
                                        currency code.

                                        * EUR - Euro
                                      enum:
                                        - EUR
                                      default: EUR
                                    as_percentage:
                                      allOf:
                                        - type: string
                                          pattern: ^-?[0-9]{0,63}(\.[0-9]{1,27})?$
                                        - description: >-
                                            The cost value represented as a
                                            percentage.
                                  additionalProperties: false
                                third_party:
                                  title: Cost
                                  type: object
                                  properties:
                                    cash_amount:
                                      type: string
                                      pattern: ^[0-9]{1,9}(\.[0-9]{2})?$
                                    currency:
                                      type: string
                                      description: >-
                                        Alphabetic three-letter [ISO
                                        4217](https://en.wikipedia.org/wiki/ISO_4217)
                                        currency code.

                                        * EUR - Euro
                                      enum:
                                        - EUR
                                      default: EUR
                                    as_percentage:
                                      allOf:
                                        - type: string
                                          pattern: ^-?[0-9]{0,63}(\.[0-9]{1,27})?$
                                        - description: >-
                                            The cost value represented as a
                                            percentage.
                                  additionalProperties: false
                                total:
                                  title: Cost
                                  type: object
                                  properties:
                                    cash_amount:
                                      type: string
                                      pattern: ^[0-9]{1,9}(\.[0-9]{2})?$
                                    currency:
                                      type: string
                                      description: >-
                                        Alphabetic three-letter [ISO
                                        4217](https://en.wikipedia.org/wiki/ISO_4217)
                                        currency code.

                                        * EUR - Euro
                                      enum:
                                        - EUR
                                      default: EUR
                                    as_percentage:
                                      allOf:
                                        - type: string
                                          pattern: ^-?[0-9]{0,63}(\.[0-9]{1,27})?$
                                        - description: >-
                                            The cost value represented as a
                                            percentage.
                                  additionalProperties: false
                              additionalProperties: false
                            product_cost:
                              title: Order ex-ante product cost
                              type: object
                              description: >-
                                All costs and associated charges related to the
                                financial instrument.
                              properties:
                                one_off:
                                  title: Cost
                                  type: object
                                  properties:
                                    cash_amount:
                                      type: string
                                      pattern: ^[0-9]{1,9}(\.[0-9]{2})?$
                                    currency:
                                      type: string
                                      description: >-
                                        Alphabetic three-letter [ISO
                                        4217](https://en.wikipedia.org/wiki/ISO_4217)
                                        currency code.

                                        * EUR - Euro
                                      enum:
                                        - EUR
                                      default: EUR
                                    as_percentage:
                                      allOf:
                                        - type: string
                                          pattern: ^-?[0-9]{0,63}(\.[0-9]{1,27})?$
                                        - description: >-
                                            The cost value represented as a
                                            percentage.
                                  additionalProperties: false
                                ongoing:
                                  title: Cost
                                  type: object
                                  properties:
                                    cash_amount:
                                      type: string
                                      pattern: ^[0-9]{1,9}(\.[0-9]{2})?$
                                    currency:
                                      type: string
                                      description: >-
                                        Alphabetic three-letter [ISO
                                        4217](https://en.wikipedia.org/wiki/ISO_4217)
                                        currency code.

                                        * EUR - Euro
                                      enum:
                                        - EUR
                                      default: EUR
                                    as_percentage:
                                      allOf:
                                        - type: string
                                          pattern: ^-?[0-9]{0,63}(\.[0-9]{1,27})?$
                                        - description: >-
                                            The cost value represented as a
                                            percentage.
                                  additionalProperties: false
                                transaction:
                                  title: Cost
                                  type: object
                                  properties:
                                    cash_amount:
                                      type: string
                                      pattern: ^[0-9]{1,9}(\.[0-9]{2})?$
                                    currency:
                                      type: string
                                      description: >-
                                        Alphabetic three-letter [ISO
                                        4217](https://en.wikipedia.org/wiki/ISO_4217)
                                        currency code.

                                        * EUR - Euro
                                      enum:
                                        - EUR
                                      default: EUR
                                    as_percentage:
                                      allOf:
                                        - type: string
                                          pattern: ^-?[0-9]{0,63}(\.[0-9]{1,27})?$
                                        - description: >-
                                            The cost value represented as a
                                            percentage.
                                  additionalProperties: false
                                incidental:
                                  title: Cost
                                  type: object
                                  properties:
                                    cash_amount:
                                      type: string
                                      pattern: ^[0-9]{1,9}(\.[0-9]{2})?$
                                    currency:
                                      type: string
                                      description: >-
                                        Alphabetic three-letter [ISO
                                        4217](https://en.wikipedia.org/wiki/ISO_4217)
                                        currency code.

                                        * EUR - Euro
                                      enum:
                                        - EUR
                                      default: EUR
                                    as_percentage:
                                      allOf:
                                        - type: string
                                          pattern: ^-?[0-9]{0,63}(\.[0-9]{1,27})?$
                                        - description: >-
                                            The cost value represented as a
                                            percentage.
                                  additionalProperties: false
                                total:
                                  title: Cost
                                  type: object
                                  properties:
                                    cash_amount:
                                      type: string
                                      pattern: ^[0-9]{1,9}(\.[0-9]{2})?$
                                    currency:
                                      type: string
                                      description: >-
                                        Alphabetic three-letter [ISO
                                        4217](https://en.wikipedia.org/wiki/ISO_4217)
                                        currency code.

                                        * EUR - Euro
                                      enum:
                                        - EUR
                                      default: EUR
                                    as_percentage:
                                      allOf:
                                        - type: string
                                          pattern: ^-?[0-9]{0,63}(\.[0-9]{1,27})?$
                                        - description: >-
                                            The cost value represented as a
                                            percentage.
                                  additionalProperties: false
                              additionalProperties: false
                            service_cost:
                              title: Order ex-ante service cost
                              type: object
                              description: >-
                                All costs and associated charges related to the
                                investment service(s) and/or ancillary services.
                              properties:
                                one_off:
                                  title: Cost
                                  type: object
                                  properties:
                                    cash_amount:
                                      type: string
                                      pattern: ^[0-9]{1,9}(\.[0-9]{2})?$
                                    currency:
                                      type: string
                                      description: >-
                                        Alphabetic three-letter [ISO
                                        4217](https://en.wikipedia.org/wiki/ISO_4217)
                                        currency code.

                                        * EUR - Euro
                                      enum:
                                        - EUR
                                      default: EUR
                                    as_percentage:
                                      allOf:
                                        - type: string
                                          pattern: ^-?[0-9]{0,63}(\.[0-9]{1,27})?$
                                        - description: >-
                                            The cost value represented as a
                                            percentage.
                                  additionalProperties: false
                                ongoing:
                                  title: Cost
                                  type: object
                                  properties:
                                    cash_amount:
                                      type: string
                                      pattern: ^[0-9]{1,9}(\.[0-9]{2})?$
                                    currency:
                                      type: string
                                      description: >-
                                        Alphabetic three-letter [ISO
                                        4217](https://en.wikipedia.org/wiki/ISO_4217)
                                        currency code.

                                        * EUR - Euro
                                      enum:
                                        - EUR
                                      default: EUR
                                    as_percentage:
                                      allOf:
                                        - type: string
                                          pattern: ^-?[0-9]{0,63}(\.[0-9]{1,27})?$
                                        - description: >-
                                            The cost value represented as a
                                            percentage.
                                  additionalProperties: false
                                transaction:
                                  title: Cost
                                  type: object
                                  properties:
                                    cash_amount:
                                      type: string
                                      pattern: ^[0-9]{1,9}(\.[0-9]{2})?$
                                    currency:
                                      type: string
                                      description: >-
                                        Alphabetic three-letter [ISO
                                        4217](https://en.wikipedia.org/wiki/ISO_4217)
                                        currency code.

                                        * EUR - Euro
                                      enum:
                                        - EUR
                                      default: EUR
                                    as_percentage:
                                      allOf:
                                        - type: string
                                          pattern: ^-?[0-9]{0,63}(\.[0-9]{1,27})?$
                                        - description: >-
                                            The cost value represented as a
                                            percentage.
                                  additionalProperties: false
                                ancillary:
                                  title: Cost
                                  type: object
                                  properties:
                                    cash_amount:
                                      type: string
                                      pattern: ^[0-9]{1,9}(\.[0-9]{2})?$
                                    currency:
                                      type: string
                                      description: >-
                                        Alphabetic three-letter [ISO
                                        4217](https://en.wikipedia.org/wiki/ISO_4217)
                                        currency code.

                                        * EUR - Euro
                                      enum:
                                        - EUR
                                      default: EUR
                                    as_percentage:
                                      allOf:
                                        - type: string
                                          pattern: ^-?[0-9]{0,63}(\.[0-9]{1,27})?$
                                        - description: >-
                                            The cost value represented as a
                                            percentage.
                                  additionalProperties: false
                                incidental:
                                  title: Cost
                                  type: object
                                  properties:
                                    cash_amount:
                                      type: string
                                      pattern: ^[0-9]{1,9}(\.[0-9]{2})?$
                                    currency:
                                      type: string
                                      description: >-
                                        Alphabetic three-letter [ISO
                                        4217](https://en.wikipedia.org/wiki/ISO_4217)
                                        currency code.

                                        * EUR - Euro
                                      enum:
                                        - EUR
                                      default: EUR
                                    as_percentage:
                                      allOf:
                                        - type: string
                                          pattern: ^-?[0-9]{0,63}(\.[0-9]{1,27})?$
                                        - description: >-
                                            The cost value represented as a
                                            percentage.
                                  additionalProperties: false
                                total:
                                  title: Cost
                                  type: object
                                  properties:
                                    cash_amount:
                                      type: string
                                      pattern: ^[0-9]{1,9}(\.[0-9]{2})?$
                                    currency:
                                      type: string
                                      description: >-
                                        Alphabetic three-letter [ISO
                                        4217](https://en.wikipedia.org/wiki/ISO_4217)
                                        currency code.

                                        * EUR - Euro
                                      enum:
                                        - EUR
                                      default: EUR
                                    as_percentage:
                                      allOf:
                                        - type: string
                                          pattern: ^-?[0-9]{0,63}(\.[0-9]{1,27})?$
                                        - description: >-
                                            The cost value represented as a
                                            percentage.
                                  additionalProperties: false
                              additionalProperties: false
                            third_party_payments:
                              type: object
                              description: >-
                                Third party payments associated with the
                                investment service.
                              properties:
                                total:
                                  title: Cost
                                  type: object
                                  properties:
                                    cash_amount:
                                      type: string
                                      pattern: ^[0-9]{1,9}(\.[0-9]{2})?$
                                    currency:
                                      type: string
                                      description: >-
                                        Alphabetic three-letter [ISO
                                        4217](https://en.wikipedia.org/wiki/ISO_4217)
                                        currency code.

                                        * EUR - Euro
                                      enum:
                                        - EUR
                                      default: EUR
                                    as_percentage:
                                      allOf:
                                        - type: string
                                          pattern: ^-?[0-9]{0,63}(\.[0-9]{1,27})?$
                                        - description: >-
                                            The cost value represented as a
                                            percentage.
                                  additionalProperties: false
                                received_by_client:
                                  title: Cost
                                  type: object
                                  properties:
                                    cash_amount:
                                      type: string
                                      pattern: ^[0-9]{1,9}(\.[0-9]{2})?$
                                    currency:
                                      type: string
                                      description: >-
                                        Alphabetic three-letter [ISO
                                        4217](https://en.wikipedia.org/wiki/ISO_4217)
                                        currency code.

                                        * EUR - Euro
                                      enum:
                                        - EUR
                                      default: EUR
                                    as_percentage:
                                      allOf:
                                        - type: string
                                          pattern: ^-?[0-9]{0,63}(\.[0-9]{1,27})?$
                                        - description: >-
                                            The cost value represented as a
                                            percentage.
                                  additionalProperties: false
                                received_by_upvest:
                                  title: Cost
                                  type: object
                                  properties:
                                    cash_amount:
                                      type: string
                                      pattern: ^[0-9]{1,9}(\.[0-9]{2})?$
                                    currency:
                                      type: string
                                      description: >-
                                        Alphabetic three-letter [ISO
                                        4217](https://en.wikipedia.org/wiki/ISO_4217)
                                        currency code.

                                        * EUR - Euro
                                      enum:
                                        - EUR
                                      default: EUR
                                    as_percentage:
                                      allOf:
                                        - type: string
                                          pattern: ^-?[0-9]{0,63}(\.[0-9]{1,27})?$
                                        - description: >-
                                            The cost value represented as a
                                            percentage.
                                  additionalProperties: false
                              additionalProperties: false
                          additionalProperties: false
                      required:
                        - id
                        - user_id
                        - created_at
                        - type
                        - substituted_report_id
                      additionalProperties: false
                webhook_id:
                  title: Webhook ID
                  type: string
                  description: Webhook unique identifier.
                  format: uuid
              required:
                - id
                - created_at
                - type
                - object
                - webhook_id
              additionalProperties: false
            example:
              id: 8962b496-8d42-4560-bfab-10490dd1a721
              created_at: '2021-07-21T14:10:00.00Z'
              type: REPORT.CREATED
              object:
                id: b96b1ee7-d491-43eb-b5e4-4833af9c9c2f
                created_at: '2020-08-24T14:15:22Z'
                user_id: d1a4be99-8bb6-4e78-b897-8168f6823ab5
                type: CORPORATE_ACTION_CASH_TRANSACTION
                substituted_report_id: null
                data:
                  account:
                    id: a9a4ad54-6dd1-419a-a98d-ab48f9f23bc8
                  references:
                    - id: b96b1ee7-d491-43eb-b5e4-4833af9c9c2f
                      type: CORPORATE_ACTION_TRANSACTION_ID
              webhook_id: 9df39835-be87-4243-9018-f2500b39cee6
      responses:
        '200':
          description: Request has been processed successfully.
  Account events:
    post:
      operationId: account_event
      summary: Account events
      description: Account events
      tags:
        - Accounts
      requestBody:
        content:
          application/json:
            schema:
              title: Webhook - Accounts - Callback
              type: object
              properties:
                id:
                  type: string
                  format: uuid
                  description: Event unique identifier
                created_at:
                  type: string
                  format: date-time
                  description: >-
                    Date and time when the event was created. [RFC
                    3339-5](https://datatracker.ietf.org/doc/html/rfc3339#section-5.6),
                    [ISO8601
                    UTC](https://www.iso.org/iso-8601-date-and-time-format.html)
                type:
                  type: string
                  description: Event type
                  enum:
                    - ACCOUNT.CREATED
                    - ACCOUNT.ACTIVATED
                    - ACCOUNT.CLOSING_INITIATED
                    - ACCOUNT.CLOSED
                    - ACCOUNT.LOCKED
                    - ACCOUNT.UPDATED
                object:
                  title: Account
                  type: object
                  description: ''
                  properties:
                    id:
                      title: Account unique identifier.
                      type: string
                      description: Account unique identifier.
                      format: uuid
                    created_at:
                      type: string
                      format: date-time
                      description: >-
                        Date and time when the resource was created. [RFC
                        3339-5](https://datatracker.ietf.org/doc/html/rfc3339#section-5.6),
                        [ISO8601
                        UTC](https://www.iso.org/iso-8601-date-and-time-format.html)
                    updated_at:
                      type: string
                      format: date-time
                      description: >-
                        Date and time when the resource was last updated. [RFC
                        3339-5](https://datatracker.ietf.org/doc/html/rfc3339#section-5.6),
                        [ISO8601
                        UTC](https://www.iso.org/iso-8601-date-and-time-format.html)
                    account_group_id:
                      title: Account group unique identifier.
                      type: string
                      description: Account group unique identifier.
                      format: uuid
                    type:
                      type: string
                      description: >-
                        Account type.

                        * TRADING - Orders in accounts of this type are created
                        on a specific instrument basis.

                        * PORTFOLIO - Orders in accounts of this type are
                        created on a portfolio basis and additional portfolio
                        functionality is available.
                      enum:
                        - TRADING
                        - PORTFOLIO
                    users:
                      type: array
                      items:
                        type: object
                        properties:
                          id:
                            title: User unique identifier.
                            type: string
                            description: User unique identifier.
                            format: uuid
                          type:
                            type: string
                            description: |-
                              Relation type
                              * OWNER - 
                            enum:
                              - OWNER
                            default: OWNER
                    account_number:
                      type: integer
                      description: >-
                        The serial account number of the account in the account
                        group.
                      minimum: 1
                    name:
                      type: string
                      description: The name of the account.
                      maxLength: 100
                    status:
                      type: string
                      description: >-
                        The status of the account

                        * PENDING_APPROVAL - Account approval is pending - the
                        account is visible through our API but cannot be acted
                        on.

                        * ACTIVE - Account is active - full functionality of the
                        Investment API is accessible.

                        * CLOSING - Account is closing - only sell orders or the
                        transfer of positions out are permissible before the
                        account is closed.

                        * CLOSED - Account is closed with zero balance
                        successfully.

                        * LOCKED - Account is locked for all actions.
                      enum:
                        - PENDING_APPROVAL
                        - ACTIVE
                        - CLOSING
                        - CLOSED
                        - LOCKED
                  required:
                    - id
                    - created_at
                    - updated_at
                    - account_group_id
                    - type
                    - users
                    - name
                    - status
                    - account_number
                  additionalProperties: false
                webhook_id:
                  title: Webhook ID
                  type: string
                  description: Webhook unique identifier.
                  format: uuid
              required:
                - id
                - created_at
                - type
                - object
                - webhook_id
              additionalProperties: false
            example:
              id: 56510309-d9de-4730-9b5b-4a0ed047f3a9
              created_at: '2021-07-21T14:10:00.00Z'
              type: ACCOUNT.CREATED
              object:
                id: ad45b27f-c0e7-4cfb-b48c-a83670dbdfbd
                created_at: '2020-08-24T14:15:22Z'
                updated_at: '2020-08-24T14:15:22Z'
                account_group_id: fa2414ed-8d62-46fd-85ed-565a340c81d6
                type: TRADING
                users:
                  - id: 9c36af78-91a0-4174-a515-fc81214e3dab
                    type: OWNER
                account_number: 1
                name: Main account
                status: ACTIVE
              webhook_id: b838bde5-b6df-4f1f-bfc4-71d3fb01d430
      responses:
        '200':
          description: Request has been processed successfully.
  Account Group events:
    post:
      operationId: account_group_event
      summary: Account group events
      description: Account group events
      tags:
        - Account Groups
      requestBody:
        content:
          application/json:
            schema:
              title: Webhook - Account Groups - Callback
              type: object
              properties:
                id:
                  type: string
                  format: uuid
                  description: Event unique identifier
                created_at:
                  type: string
                  format: date-time
                  description: >-
                    Date and time when the event was created. [RFC
                    3339-5](https://datatracker.ietf.org/doc/html/rfc3339#section-5.6),
                    [ISO8601
                    UTC](https://www.iso.org/iso-8601-date-and-time-format.html)
                type:
                  type: string
                  description: Event type
                  enum:
                    - ACCOUNT_GROUP.CREATED
                    - ACCOUNT_GROUP.ACTIVATED
                    - ACCOUNT_GROUP.CLOSING_INITIATED
                    - ACCOUNT_GROUP.CLOSED
                    - ACCOUNT_GROUP.LOCKED
                object:
                  title: Account Group
                  type: object
                  description: ''
                  properties:
                    id:
                      title: Account group unique identifier.
                      type: string
                      description: Account group unique identifier.
                      format: uuid
                    created_at:
                      type: string
                      format: date-time
                      description: >-
                        Date and time when the resource was created. [RFC
                        3339-5](https://datatracker.ietf.org/doc/html/rfc3339#section-5.6),
                        [ISO8601
                        UTC](https://www.iso.org/iso-8601-date-and-time-format.html)
                    updated_at:
                      type: string
                      format: date-time
                      description: >-
                        Date and time when the resource was last updated. [RFC
                        3339-5](https://datatracker.ietf.org/doc/html/rfc3339#section-5.6),
                        [ISO8601
                        UTC](https://www.iso.org/iso-8601-date-and-time-format.html)
                    users:
                      type: array
                      items:
                        type: object
                        properties:
                          id:
                            title: User unique identifier.
                            type: string
                            description: User unique identifier.
                            format: uuid
                          type:
                            type: string
                            description: |-
                              Relation type
                              * OWNER - 
                            enum:
                              - OWNER
                            default: OWNER
                    status:
                      type: string
                      description: >-
                        Status of the account group

                        * PENDING_APPROVAL - Account group approval is pending -
                        the account group is visible through our API but cannot
                        be acted on.

                        * ACTIVE - Account group is active - full functionality
                        of the Investment API is accessible.

                        * CLOSING - Account group is closing.

                        * CLOSED - Account group is closed.

                        * LOCKED - Account group is locked for all actions.
                      enum:
                        - PENDING_APPROVAL
                        - ACTIVE
                        - CLOSING
                        - CLOSED
                        - LOCKED
                    type:
                      type: string
                      description: >-
                        Account group type.

                        * PERSONAL - Account group of a person holding assets on
                        their own behalf.

                        * LEGAL_ENTITY - Account group of a legal entity holding
                        assets on behalf of their users.

                        * FRENCH_PEA - Account group of a french resident
                        holding assets in Plan d'Epargne en Actions.

                        * ISA - Account group of a UK resident holding assets in
                        an individual savings account.

                        * CHILD - Account group of a child user holding assets
                        in a child account.
                      enum:
                        - PERSONAL
                        - LEGAL_ENTITY
                        - FRENCH_PEA
                        - ISA
                        - CHILD
                    securities_account_number:
                      type: string
                      description: Securities account number
                      pattern: ^[0-9]{9}$
                  required:
                    - id
                    - created_at
                    - updated_at
                    - users
                    - status
                    - type
                    - securities_account_number
                  additionalProperties: false
                webhook_id:
                  title: Webhook ID
                  type: string
                  description: Webhook unique identifier.
                  format: uuid
              required:
                - id
                - created_at
                - type
                - object
                - webhook_id
              additionalProperties: false
            example:
              id: 72da9e41-9926-419f-976e-4c8069a04249
              created_at: '2021-07-21T14:10:00.00Z'
              type: ACCOUNT_GROUP.CREATED
              object:
                id: 9d95820d-4333-46b6-98de-04ab7512e76f
                created_at: '2020-08-24T14:15:22Z'
                updated_at: '2020-08-24T14:15:22Z'
                type: PERSONAL
                status: ACTIVE
                users:
                  - id: 413715f2-5401-4b97-8055-034a6b879f8c
                    type: OWNER
                securities_account_number: '123456789'
              webhook_id: 9df39835-be87-4243-9018-f2500b39cee6
      responses:
        '200':
          description: Request has been processed successfully.
  Direct Debit events:
    post:
      operationId: direct_debit_event
      summary: Direct Debit events
      description: Direct Debit events
      tags:
        - Direct Debits
      requestBody:
        content:
          application/json:
            schema:
              title: Webhook - Direct Debits - Callback
              type: object
              properties:
                id:
                  type: string
                  format: uuid
                  description: Event unique identifier
                created_at:
                  type: string
                  format: date-time
                  description: >-
                    Date and time when the event was created. [RFC
                    3339-5](https://datatracker.ietf.org/doc/html/rfc3339#section-5.6),
                    [ISO8601
                    UTC](https://www.iso.org/iso-8601-date-and-time-format.html)
                type:
                  type: string
                  description: Event type
                  enum:
                    - DIRECT_DEBIT.NEW
                    - DIRECT_DEBIT.PROCESSING
                    - DIRECT_DEBIT.CONFIRMED
                    - DIRECT_DEBIT.CANCELLED
                object:
                  type: object
                  properties:
                    id:
                      title: Direct debit funding request unique identifier
                      type: string
                      description: Direct debit funding request unique identifier
                      format: uuid
                    created_at:
                      type: string
                      format: date-time
                      description: >-
                        Date and time when the resource was created. [RFC
                        3339-5](https://datatracker.ietf.org/doc/html/rfc3339#section-5.6),
                        [ISO8601
                        UTC](https://www.iso.org/iso-8601-date-and-time-format.html)
                    user_id:
                      title: User unique identifier.
                      type: string
                      description: User unique identifier.
                      format: uuid
                    account_group_id:
                      title: Account group unique identifier.
                      type: string
                      description: Account group unique identifier.
                      format: uuid
                    mandate_id:
                      title: Direct Debit Mandate unique identifier.
                      type: string
                      description: Direct Debit Mandate unique identifier.
                      format: uuid
                    cash_amount:
                      type: string
                      pattern: ^-?[0-9]{1,9}(\.[0-9]{2})?$
                    currency:
                      type: string
                      description: >-
                        Alphabetic three-letter [ISO
                        4217](https://en.wikipedia.org/wiki/ISO_4217) currency
                        code.

                        * EUR - Euro
                      enum:
                        - EUR
                      default: EUR
                    remittance_information:
                      type: string
                      maxLength: 140
                      pattern: ^[0-9A-Za-z+?/\-:()\.,';_ ]{0,140}$
                      description: >-
                        Payment reference the end user will see in their bank
                        statement for the corresponding direct debit booking
                        (“Verwendungszweck”). We recommend that you keep this
                        info concise and avoid special characters or
                        non-standardised formatting ([see
                        more](/documentation/guides/payments/direct_debit/direct_debit_submitting)).
                    status:
                      type: string
                      description: >-
                        Status of the direct debit

                        * NEW - Direct debit is created but not started
                        processing.

                        * PROCESSING - Direct debit is in processing.

                        * CONFIRMED - Direct debit was successfully processed.

                        * CANCELLED - Direct debit was cancelled.
                      enum:
                        - NEW
                        - PROCESSING
                        - CONFIRMED
                        - CANCELLED
                    purpose_code:
                      type: string
                      maxLength: 4
                      description: >-
                        Purpose of the payment based on *ExternalPurpose1Code*
                        from [ISO
                        20022](https://www.iso20022.org/catalogue-messages/additional-content-messages/external-code-sets).
                  required:
                    - id
                    - created_at
                    - user_id
                    - account_group_id
                    - mandate_id
                    - cash_amount
                    - currency
                  additionalProperties: false
                webhook_id:
                  title: Webhook ID
                  type: string
                  description: Webhook unique identifier.
                  format: uuid
              required:
                - id
                - created_at
                - type
                - object
                - webhook_id
              additionalProperties: false
            example:
              id: 8962b496-8d42-4560-bfab-10490dd1a721
              created_at: '2021-07-21T14:10:00.00Z'
              type: DIRECT_DEBIT.NEW
              object:
                id: 1ab4fef9-a097-4c6f-9345-647025d5fde6
                created_at: '2020-08-24T14:15:22Z'
                user_id: 82b49999-1145-4e05-916a-567662daa7bc
                account_group_id: 1ea60f56-b67b-61fc-829a-0242ac130003
                mandate_id: 730b8719-0bc6-401d-98dd-b2de72afbf05
                cash_amount: '200.00'
                currency: EUR
                remittance_information: payment for green energy portfolio
                status: NEW
              webhook_id: 9df39835-be87-4243-9018-f2500b39cee6
      responses:
        '200':
          description: Request has been processed successfully.
  Top-up events:
    post:
      operationId: topup_event
      summary: Top-up events
      description: Top-up events
      tags:
        - Top-ups
      requestBody:
        content:
          application/json:
            schema:
              title: Webhook - Top up - Callback
              type: object
              properties:
                id:
                  type: string
                  format: uuid
                  description: Event unique identifier
                created_at:
                  type: string
                  format: date-time
                  description: >-
                    Date and time when the event was created. [RFC
                    3339-5](https://datatracker.ietf.org/doc/html/rfc3339#section-5.6),
                    [ISO8601
                    UTC](https://www.iso.org/iso-8601-date-and-time-format.html)
                type:
                  type: string
                  description: Event type
                  enum:
                    - TOPUP.CONFIRMED
                    - TOPUP.SETTLED
                    - TOPUP.CANCELLED
                object:
                  type: object
                  properties:
                    id:
                      title: Top up request unique identifier.
                      type: string
                      description: Top up request unique identifier.
                      format: uuid
                    created_at:
                      type: string
                      format: date-time
                      description: >-
                        Date and time when the resource was created. [RFC
                        3339-5](https://datatracker.ietf.org/doc/html/rfc3339#section-5.6),
                        [ISO8601
                        UTC](https://www.iso.org/iso-8601-date-and-time-format.html)
                    account_group_id:
                      title: Account group unique identifier.
                      type: string
                      description: Account group unique identifier.
                      format: uuid
                    cash_amount:
                      type: string
                      pattern: ^[0-9]{1,9}(\.[0-9]{2})?$
                    currency:
                      type: string
                      description: >-
                        Alphabetic three-letter [ISO
                        4217](https://en.wikipedia.org/wiki/ISO_4217) currency
                        code.

                        * EUR - Euro
                      enum:
                        - EUR
                      default: EUR
                    settlement_reference:
                      type: string
                      maxLength: 130
                      pattern: ^[0-9A-Za-z+?/\-:()\.,'; ]{0,130}$
                      description: >-
                        Settlement reference to be included in the corresponding
                        bank transfer to settle this top up.
                    status:
                      type: string
                      description: |-
                        Status of the top up
                        * CONFIRMED - The top up is created and confirmed.
                        * SETTLED - The top up is settled.
                        * CANCELLED - The top up is cancelled
                      enum:
                        - CONFIRMED
                        - SETTLED
                        - CANCELLED
                  required:
                    - id
                    - created_at
                    - account_group_id
                    - cash_amount
                    - currency
                  additionalProperties: false
                webhook_id:
                  title: Webhook ID
                  type: string
                  description: Webhook unique identifier.
                  format: uuid
              required:
                - id
                - created_at
                - type
                - object
                - webhook_id
              additionalProperties: false
            example:
              id: ac62dbc4-c94e-45e4-a16e-381c51c8de38
              created_at: '2022-12-05T12:34:56Z'
              type: TOPUP.SETTLED
              object:
                id: a4496ff8-ce69-4e23-9f2e-6c3c7914b95c
                account_group_id: 2a761567-251b-450e-8615-025d61dcc95e
                settlement_reference: 91a44df3-7278-4dee-a1bf-2bc254eca66c
                cash_amount: '100.01'
                currency: EUR
                created_at: '2022-12-05T12:34:56Z'
                status: SETTLED
              webhook_id: 9df39835-be87-4243-9018-f2500b39cee6
      responses:
        '200':
          description: Request has been processed successfully.
  Credit Funding events:
    post:
      operationId: credit_funding_event
      summary: Credit Funding events
      description: Credit Funding events
      tags:
        - Credit Fundings
      requestBody:
        content:
          application/json:
            schema:
              title: Webhook - Credit Funding - Callback
              type: object
              properties:
                id:
                  type: string
                  format: uuid
                  description: Event unique identifier
                created_at:
                  type: string
                  format: date-time
                  description: >-
                    Date and time when the event was created. [RFC
                    3339-5](https://datatracker.ietf.org/doc/html/rfc3339#section-5.6),
                    [ISO8601
                    UTC](https://www.iso.org/iso-8601-date-and-time-format.html)
                type:
                  type: string
                  description: Event type
                  enum:
                    - CREDIT_FUNDING.CONFIRMED
                    - CREDIT_FUNDING.CANCELLED
                  default: CREDIT_FUNDING.CONFIRMED
                object:
                  type: object
                  properties:
                    id:
                      title: Credit Funding request unique identifier
                      type: string
                      description: Credit Funding request unique identifier
                      format: uuid
                    created_at:
                      type: string
                      format: date-time
                      description: >-
                        Date and time when the resource was created. [RFC
                        3339-5](https://datatracker.ietf.org/doc/html/rfc3339#section-5.6),
                        [ISO8601
                        UTC](https://www.iso.org/iso-8601-date-and-time-format.html)
                    account_group_id:
                      title: Account group unique identifier.
                      type: string
                      description: Account group unique identifier.
                      format: uuid
                    cash_amount:
                      type: string
                      pattern: ^[0-9]{1,9}(\.[0-9]{2})?$
                    currency:
                      type: string
                      description: >-
                        Alphabetic three-letter [ISO
                        4217](https://en.wikipedia.org/wiki/ISO_4217) currency
                        code.

                        * EUR - Euro
                      enum:
                        - EUR
                      default: EUR
                    status:
                      type: string
                      description: |-
                        Status of the credit funding
                        * CONFIRMED - Credit Funding was confirmed.
                        * CANCELLED - Credit Funding was cancelled.
                      enum:
                        - CONFIRMED
                        - CANCELLED
                    remittance_information:
                      type: string
                      description: >-
                        Payment reference the one that was used by the end user
                        for the corresponding SEPA Credit Transfer
                    counterparty:
                      type: object
                      properties:
                        identification:
                          type: object
                          properties:
                            name:
                              type: string
                              description: Name of the counterparty
                          required:
                            - name
                        account:
                          type: object
                          properties:
                            identification:
                              type: object
                              properties:
                                iban:
                                  title: International Bank Account Number (IBAN)
                                  type: string
                                  description: >-
                                    International Bank Account Number
                                    [IBAN](https://en.wikipedia.org/wiki/International_Bank_Account_Number).
                                  pattern: ^[A-Z]{2}[0-9]{2}[A-Z0-9]{11,26}$
                              required:
                                - iban
                          required:
                            - identification
                      required:
                        - identification
                        - account
                    virtual_bank_account_id:
                      title: Virtual bank account request unique identifier.
                      type: string
                      description: Virtual bank account request unique identifier.
                      format: uuid
                    purpose_code:
                      type: string
                      maxLength: 4
                      description: >-
                        Purpose of the payment based on *ExternalPurpose1Code*
                        from [ISO
                        20022](https://www.iso20022.org/catalogue-messages/additional-content-messages/external-code-sets).
                  required:
                    - id
                    - created_at
                    - account_group_id
                    - cash_amount
                    - currency
                    - remittance_information
                    - counterparty
                  additionalProperties: false
                webhook_id:
                  title: Webhook ID
                  type: string
                  description: Webhook unique identifier.
                  format: uuid
              required:
                - id
                - created_at
                - type
                - object
                - webhook_id
              additionalProperties: false
            example:
              id: 8962b496-8d42-4560-bfab-10490dd1a721
              created_at: '2021-07-21T14:10:00.00Z'
              type: CREDIT_FUNDING.CONFIRMED
              object:
                id: 1ab4fef9-a097-4c6f-9345-647025d5fde6
                created_at: '2020-08-24T14:15:22Z'
                account_group_id: 1ea60f56-b67b-61fc-829a-0242ac130003
                cash_amount: '200.00'
                currency: EUR
                status: CONFIRMED
                remittance_information: CF123456789
                counterparty:
                  identification:
                    name: Max Musterman
                  account:
                    identification:
                      iban: DE02100500000054540402
                virtual_bank_account_id: ab8f9b19-6a31-48d3-b201-4dee92f3da0d
                purpose_code: OTHR
              webhook_id: 9df39835-be87-4243-9018-f2500b39cee6
      responses:
        '200':
          description: Request has been processed successfully.
  Withdrawals events:
    post:
      operationId: withdrawal_event
      summary: Withdrawals events
      description: Withdrawals events
      tags:
        - Withdrawals
      requestBody:
        content:
          application/json:
            schema:
              title: Webhook - Withdrawals - Callback
              type: object
              properties:
                id:
                  type: string
                  format: uuid
                  description: Event unique identifier
                created_at:
                  type: string
                  format: date-time
                  description: >-
                    Date and time when the event was created. [RFC
                    3339-5](https://datatracker.ietf.org/doc/html/rfc3339#section-5.6),
                    [ISO8601
                    UTC](https://www.iso.org/iso-8601-date-and-time-format.html)
                type:
                  type: string
                  description: Event type
                  enum:
                    - WITHDRAWAL.NEW
                    - WITHDRAWAL.PROCESSING
                    - WITHDRAWAL.CONFIRMED
                    - WITHDRAWAL.CANCELLED
                object:
                  title: Payments - Withdrawal
                  type: object
                  additionalProperties: false
                  properties:
                    id:
                      title: Cash withdrawal unique identifier
                      type: string
                      description: Cash withdrawal unique identifier
                      format: uuid
                    created_at:
                      type: string
                      format: date-time
                      description: >-
                        Date and time when the resource was created. [RFC
                        3339-5](https://datatracker.ietf.org/doc/html/rfc3339#section-5.6),
                        [ISO8601
                        UTC](https://www.iso.org/iso-8601-date-and-time-format.html)
                    updated_at:
                      type: string
                      format: date-time
                      description: >-
                        Date and time when the resource was last updated. [RFC
                        3339-5](https://datatracker.ietf.org/doc/html/rfc3339#section-5.6),
                        [ISO8601
                        UTC](https://www.iso.org/iso-8601-date-and-time-format.html)
                    reference_account_id:
                      title: Reference account unique identifier.
                      type: string
                      description: Reference account unique identifier.
                      format: uuid
                    account_group_id:
                      title: Account group unique identifier.
                      type: string
                      description: Account group unique identifier.
                      format: uuid
                    user_id:
                      title: User unique identifier.
                      type: string
                      description: User unique identifier.
                      format: uuid
                    amount:
                      type: string
                      pattern: ^[0-9]{1,9}(\.[0-9]{2})?$
                    currency:
                      type: string
                      description: >-
                        Alphabetic three-letter [ISO
                        4217](https://en.wikipedia.org/wiki/ISO_4217) currency
                        code.

                        * EUR - Euro
                      enum:
                        - EUR
                      default: EUR
                    remittance_information:
                      type: string
                      maxLength: 140
                      pattern: ^[0-9A-Za-z+?/\-:()\.,';_ ]{0,140}$
                      description: >-
                        Payment reference the end user will see in their bank
                        statement for the corresponding credit transfer booking
                        (“Verwendungszweck”). We recommend that you keep this
                        info concise and avoid special characters or
                        non-standardised formatting ([see
                        more](/documentation/guides/payments/cash_balances/cash_withdrawal)).
                    taxes:
                      type: array
                      items:
                        title: Tax
                        type: object
                        properties:
                          amount:
                            type: string
                            pattern: ^-?[0-9]{0,63}(\.[0-9]{1,27})?$
                          currency:
                            type: string
                            description: >-
                              Alphabetic three-letter [ISO
                              4217](https://en.wikipedia.org/wiki/ISO_4217)
                              currency code.

                              * EUR - Euro
                            enum:
                              - EUR
                            default: EUR
                          type:
                            type: string
                            description: |-
                              Type of the tax.
                              * TOTAL - Total taxes
                            enum:
                              - TOTAL
                            default: TOTAL
                        required:
                          - type
                          - amount
                          - currency
                    status:
                      type: string
                      description: >-
                        Status of the withdrawal

                        * NEW - Withdrawal is created but not started
                        processing.

                        * PROCESSING - Withdrawal is in processing.

                        * CONFIRMED - Withdrawal was successfully processed.

                        * CANCELLED - Withdrawal was cancelled.
                      enum:
                        - NEW
                        - PROCESSING
                        - CONFIRMED
                        - CANCELLED
                    purpose_code:
                      type: string
                      maxLength: 4
                      description: >-
                        Purpose of the payment based on *ExternalPurpose1Code*
                        from [ISO
                        20022](https://www.iso20022.org/catalogue-messages/additional-content-messages/external-code-sets).
                  required:
                    - id
                    - reference_account_id
                    - account_group_id
                    - user_id
                    - amount
                    - currency
                    - created_at
                    - updated_at
                    - remittance_information
                webhook_id:
                  title: Webhook ID
                  type: string
                  description: Webhook unique identifier.
                  format: uuid
              required:
                - id
                - created_at
                - type
                - object
                - webhook_id
              additionalProperties: false
            example:
              id: 8962b496-8d42-4560-bfab-10490dd1a721
              created_at: '2021-07-21T14:10:00.00Z'
              type: WITHDRAWAL.NEW
              object:
                id: 6ffa6b16-2380-4e7a-88b2-ae625c8eef99
                created_at: '2020-08-24T14:15:22Z'
                updated_at: '2020-08-24T14:15:22Z'
                reference_account_id: 295378ec-036e-4f3f-ae5c-2be85c93e837
                account_group_id: ac1c39e9-2101-46b8-a624-d10a9e351b6c
                user_id: b668282b-cdf3-439a-bda2-3f3c9f655bb7
                amount: '200.00'
                currency: EUR
                remittance_information: Withdrawal
                taxes:
                  - type: TOTAL
                    amount: '38.00'
                    currency: EUR
                status: NEW
              webhook_id: 9df39835-be87-4243-9018-f2500b39cee6
      responses:
        '200':
          description: Request has been processed successfully.
  Virtual Bank Accounts events:
    post:
      operationId: virtual_bank_account_event
      summary: Virtual Bank Accounts events
      description: Virtual Bank Accounts events
      tags:
        - Virtual Bank Accounts
      requestBody:
        content:
          application/json:
            schema:
              title: Webhook - Virtual Bank Account - Callback
              type: object
              properties:
                id:
                  type: string
                  format: uuid
                  description: Event unique identifier
                created_at:
                  type: string
                  format: date-time
                  description: >-
                    Date and time when the event was created. [RFC
                    3339-5](https://datatracker.ietf.org/doc/html/rfc3339#section-5.6),
                    [ISO8601
                    UTC](https://www.iso.org/iso-8601-date-and-time-format.html)
                type:
                  type: string
                  description: Event type
                  enum:
                    - VIRTUAL_BANK_ACCOUNT.CREATED
                object:
                  type: object
                  properties:
                    id:
                      title: Virtual bank account request unique identifier.
                      type: string
                      description: Virtual bank account request unique identifier.
                      format: uuid
                    created_at:
                      type: string
                      format: date-time
                      description: >-
                        Date and time when the resource was created. [RFC
                        3339-5](https://datatracker.ietf.org/doc/html/rfc3339#section-5.6),
                        [ISO8601
                        UTC](https://www.iso.org/iso-8601-date-and-time-format.html)
                    account_group_id:
                      title: Account group unique identifier.
                      type: string
                      description: Account group unique identifier.
                      format: uuid
                    name:
                      type: string
                      description: Name of the virtual bank account
                    owner:
                      type: object
                      description: Owner of the virtual bank account
                      properties:
                        name:
                          type: string
                          description: Name of the owner of the virtual bank account
                      required:
                        - name
                      additionalProperties: false
                    identification:
                      type: object
                      description: Identification details
                      properties:
                        swift:
                          type: object
                          description: SWIFT details
                          properties:
                            iban:
                              title: International Bank Account Number (IBAN)
                              type: string
                              description: >-
                                International Bank Account Number
                                [IBAN](https://en.wikipedia.org/wiki/International_Bank_Account_Number).
                              pattern: ^[A-Z]{2}[0-9]{2}[A-Z0-9]{11,26}$
                            bic:
                              title: Business Identifier Code
                              type: string
                              description: >-
                                Business Identifier Code (also known as
                                SWIFT-BIC, BIC, SWIFT ID or SWIFT code) [ISO
                                9362](https://en.wikipedia.org/wiki/ISO_9362).
                              pattern: ^[A-Z]{6}[A-Z0-9]{2}([A-Z0-9]{3})?$
                          required:
                            - iban
                            - bic
                          additionalProperties: false
                      additionalProperties: false
                  required:
                    - id
                    - created_at
                    - account_group_id
                    - owner
                    - identification
                  additionalProperties: false
                webhook_id:
                  title: Webhook ID
                  type: string
                  description: Webhook unique identifier.
                  format: uuid
              required:
                - id
                - created_at
                - type
                - object
                - webhook_id
              additionalProperties: false
            example:
              id: 8962b496-8d42-4560-bfab-10490dd1a721
              created_at: '2021-07-21T14:10:00.00Z'
              type: VIRTUAL_BANK_ACCOUNT.CREATED
              object:
                id: 22913092-0484-42e9-9273-9ffd6dfd0b13
                created_at: '2021-07-21T14:10:00.00Z'
                account_group_id: d1354aad-6da7-4da7-aaa1-e00ebfd3240d
                name: Max's Virtual Bank Account
                owner:
                  name: Max Musterman
                identification:
                  swift:
                    iban: DE89000000000000000000
                    bic: ABCDEXXX
              webhook_id: 9df39835-be87-4243-9018-f2500b39cee6
      responses:
        '200':
          description: Request has been processed successfully.
  Portfolio orders events:
    post:
      operationId: portfolio_order_event
      summary: Portfolios orders events
      description: Portfolios orders events
      tags:
        - Portfolios
      requestBody:
        content:
          application/json:
            schema:
              title: Webhook - Portfolios Orders - Callback
              type: object
              properties:
                id:
                  type: string
                  format: uuid
                  description: Event unique identifier
                created_at:
                  type: string
                  format: date-time
                  description: >-
                    Date and time when the event was created. [RFC
                    3339-5](https://datatracker.ietf.org/doc/html/rfc3339#section-5.6),
                    [ISO8601
                    UTC](https://www.iso.org/iso-8601-date-and-time-format.html)
                type:
                  type: string
                  description: Event type
                  enum:
                    - PORTFOLIO_ORDER.NEW
                    - PORTFOLIO_ORDER.PROCESSING
                    - PORTFOLIO_ORDER.FILLED
                    - PORTFOLIO_ORDER.SETTLED
                    - PORTFOLIO_ORDER.CANCELLED
                object:
                  title: Portfolios order
                  type: object
                  properties:
                    id:
                      title: Portfolios order unique identifier
                      type: string
                      format: uuid
                    created_at:
                      type: string
                      format: date-time
                      description: >-
                        Date and time when the resource was created. [RFC
                        3339-5](https://datatracker.ietf.org/doc/html/rfc3339#section-5.6),
                        [ISO8601
                        UTC](https://www.iso.org/iso-8601-date-and-time-format.html)
                    updated_at:
                      type: string
                      format: date-time
                      description: >-
                        Date and time when the resource was last updated. [RFC
                        3339-5](https://datatracker.ietf.org/doc/html/rfc3339#section-5.6),
                        [ISO8601
                        UTC](https://www.iso.org/iso-8601-date-and-time-format.html)
                    user_id:
                      title: User unique identifier.
                      type: string
                      description: User unique identifier.
                      format: uuid
                    account_id:
                      title: Account unique identifier.
                      type: string
                      description: Account unique identifier.
                      format: uuid
                    allocation_id:
                      title: Portfolio allocation unique identifier
                      type: string
                      format: uuid
                    cash_amount:
                      type: string
                      pattern: ^[0-9]{0,63}(\.[0-9]{1,27})?$
                    currency:
                      type: string
                      description: >-
                        Alphabetic three-letter [ISO
                        4217](https://en.wikipedia.org/wiki/ISO_4217) currency
                        code.

                        * EUR - Euro
                      enum:
                        - EUR
                      default: EUR
                    status:
                      type: string
                      description: |-
                        Execution status of the Portfolio Order.
                        * NEW - 
                        * PROCESSING - 
                        * FILLED - 
                        * SETTLED - 
                        * CANCELLED - 
                      enum:
                        - NEW
                        - PROCESSING
                        - FILLED
                        - SETTLED
                        - CANCELLED
                    type:
                      type: string
                      description: |-
                        Type of the Portfolio Order.
                        * BUY - 
                        * SELL - 
                        * REBALANCING - 
                      enum:
                        - BUY
                        - SELL
                        - REBALANCING
                    post_tax:
                      type: boolean
                      description: Cash amount is post-tax value
                      default: false
                    orders:
                      type: array
                      description: Orders associated with this portfolio order
                      items:
                        title: Portfolios order
                        type: object
                        properties:
                          id:
                            title: Order unique identifier
                            type: string
                            format: uuid
                          side:
                            type: string
                            description: |-
                              Side of the portfolio order.
                              * BUY - 
                              * SELL - 
                            enum:
                              - BUY
                              - SELL
                          status:
                            type: string
                            description: |-
                              The execution status of the order.
                              * NEW - 
                              * PROCESSING - 
                              * FILLED - 
                              * CANCELLED - 
                            enum:
                              - NEW
                              - PROCESSING
                              - FILLED
                              - CANCELLED
                        required:
                          - id
                          - side
                          - status
                        additionalProperties: false
                    client_reference:
                      title: An ID provided by the client
                      type: string
                    initiation_flow:
                      title: Initiation flow used during order creation
                      description: |-
                        What triggered the order creation .
                        * API - 
                        * SAVINGS_PLAN -  
                      type: string
                      enum:
                        - API
                        - SAVINGS_PLAN
                    cancellation_reason:
                      title: Cancellation reason code
                      description: |-
                        Explains the reason why the order was cancelled .
                        * ACCOUNT_IS_EMPTY - 
                        * CANCELLED_BY_CLIENT - 
                        * CANCELLED_BY_UPVEST - 
                        * PORTFOLIO_IS_BALANCED - 
                        * SELL_LIMIT_EXCEEDED - 
                      type: string
                      enum:
                        - ACCOUNT_IS_EMPTY
                        - CANCELLED_BY_CLIENT
                        - CANCELLED_BY_UPVEST
                        - PORTFOLIO_IS_BALANCED
                        - SELL_LIMIT_EXCEEDED
                    cancellation_details:
                      type: string
                  required:
                    - id
                    - created_at
                    - updated_at
                    - account_id
                    - cash_amount
                    - currency
                    - status
                    - post_tax
                    - client_reference
                    - initiation_flow
                    - orders
                  additionalProperties: false
                webhook_id:
                  title: Webhook ID
                  type: string
                  description: Webhook unique identifier.
                  format: uuid
              required:
                - id
                - created_at
                - type
                - object
                - webhook_id
              additionalProperties: false
            example:
              id: 54b8d84f-5bd0-4e43-bf0f-164388cb4c23
              created_at: '2021-07-21T14:10:00.00Z'
              type: PORTFOLIO_ORDER.NEW
              object:
                id: eb5ba93f-5dfe-4bf1-8571-4da0caacc80c
                created_at: '2021-07-21T14:10:00.000Z'
                updated_at: '2021-07-21T14:10:00.000Z'
                account_id: debf2026-f2da-4ff0-bb84-92e45babb1e3
                allocation_id: debf2026-f2da-4ff0-bb84-92e45babb1e3
                cash_amount: '1000'
                currency: EUR
                status: PROCESSING
                type: SELL
                post_tax: false
                client_reference: ''
                initiation_flow: API
                orders:
                  - id: e7aecb80-5e84-4bf7-984b-b39ab77eb0a8
                    side: SELL
                    status: NEW
                  - id: eb5ba93f-5dfe-4bf1-8571-4da0caacc80c
                    side: SELL
                    status: PROCESSING
                  - id: d8a85120-2941-4ed6-8d57-e80401a4779c
                    side: SELL
                    status: FILLED
              webhook_id: cd2e4183-4e62-4e0f-981b-44b594d14610
      responses:
        '200':
          description: Request has been processed successfully.
  Portfolio rebalancing execution orders events:
    post:
      operationId: portfolio_rebalancing_execution_order_event
      summary: Portfolio rebalancing execution orders events
      description: Portfolio rebalancing execution orders events
      tags:
        - Portfolios Rebalancing
      requestBody:
        content:
          application/json:
            schema:
              title: Webhook - Portfolio Rebalancing Execution Order - Callback
              type: object
              properties:
                id:
                  type: string
                  format: uuid
                  description: Event unique identifier
                created_at:
                  type: string
                  format: date-time
                  description: >-
                    Date and time when the event was created. [RFC
                    3339-5](https://datatracker.ietf.org/doc/html/rfc3339#section-5.6),
                    [ISO8601
                    UTC](https://www.iso.org/iso-8601-date-and-time-format.html)
                type:
                  type: string
                  description: Event type
                  enum:
                    - REBALANCING_EXECUTION_ORDER.NEW
                    - REBALANCING_EXECUTION_ORDER.PROCESSING
                    - REBALANCING_EXECUTION_ORDER.CANCELLED
                    - REBALANCING_EXECUTION_ORDER.FILLED
                object:
                  title: Portfolios rebalancing execution order
                  type: object
                  properties:
                    id:
                      title: Rebalancing execution order unique identifier
                      type: string
                      format: uuid
                    execution_id:
                      title: Portfolio rebalancing execution unique identifier
                      type: string
                      format: uuid
                    account_id:
                      title: Account unique identifier.
                      type: string
                      description: Account unique identifier.
                      format: uuid
                    portfolio_order_id:
                      oneOf:
                        - title: Portfolios order unique identifier
                          type: string
                          format: uuid
                        - type: 'null'
                    status:
                      type: string
                      description: |-
                        Status of the Rebalancing Execution Order.
                        * NEW - 
                        * PROCESSING - 
                        * FILLED - 
                        * CANCELLED - 
                      enum:
                        - NEW
                        - PROCESSING
                        - FILLED
                        - CANCELLED
                    created_at:
                      type: string
                      format: date-time
                      description: >-
                        Date and time when the resource was created. [RFC
                        3339-5](https://datatracker.ietf.org/doc/html/rfc3339#section-5.6),
                        [ISO8601
                        UTC](https://www.iso.org/iso-8601-date-and-time-format.html)
                    updated_at:
                      type: string
                      format: date-time
                      description: >-
                        Date and time when the resource was last updated. [RFC
                        3339-5](https://datatracker.ietf.org/doc/html/rfc3339#section-5.6),
                        [ISO8601
                        UTC](https://www.iso.org/iso-8601-date-and-time-format.html)
                    cancellation_reason:
                      type: string
                      description: >-
                        Reason for Rebalancing Execution Order Cancellation. The
                        field is present in case the Order has a status of
                        CANCELLED.

                        * ACCOUNT_IS_EMPTY - 

                        * ACCOUNT_NOT_FOUND - 

                        * CANCELLED_BY_CLIENT - 

                        * CANCELLED_BY_UPVEST - 

                        * CONFIGURATION_IS_MISSING - 

                        * INVALID_ACCOUNT_TYPE - 

                        * PORTFOLIO_IS_BALANCED - 

                        * UNKNOWN - 
                      enum:
                        - ACCOUNT_IS_EMPTY
                        - ACCOUNT_NOT_FOUND
                        - CANCELLED_BY_CLIENT
                        - CANCELLED_BY_UPVEST
                        - CONFIGURATION_IS_MISSING
                        - INVALID_ACCOUNT_TYPE
                        - PORTFOLIO_IS_BALANCED
                        - UNKNOWN
                    cancellation_details:
                      type: string
                  required:
                    - id
                    - execution_id
                    - account_id
                    - portfolio_order_id
                    - status
                    - created_at
                    - updated_at
                  additionalProperties: false
                webhook_id:
                  title: Webhook ID
                  type: string
                  description: Webhook unique identifier.
                  format: uuid
              required:
                - id
                - created_at
                - type
                - object
                - webhook_id
              additionalProperties: false
            example:
              id: 54b8d84f-5bd0-4e43-bf0f-164388cb4c23
              created_at: '2021-07-21T14:10:00.00Z'
              type: REBALANCING_EXECUTION_ORDER.NEW
              object:
                id: eb5ba93f-5dfe-4bf1-8571-4da0caacc80c
                execution_id: 760abce7-e6b5-440b-bdf3-88e35ed6417a
                created_at: '2021-07-21T14:10:00.000Z'
                updated_at: '2021-07-21T14:10:00.000Z'
                account_id: debf2026-f2da-4ff0-bb84-92e45babb1e3
                portfolio_order_id: 4f2f5db9-ef4e-4dbf-80a1-bffc71985d6c
                status: PROCESSING
              webhook_id: cd2e4183-4e62-4e0f-981b-44b594d14610
      responses:
        '200':
          description: Request has been processed successfully.
  Portfolio allocations events:
    post:
      operationId: portfolio_allocation_event
      summary: Portfolios allocations events
      description: Portfolios allocations events
      tags:
        - Portfolios
      requestBody:
        content:
          application/json:
            schema:
              title: Webhook - Portfolios Orders - Callback
              type: object
              properties:
                id:
                  type: string
                  format: uuid
                  description: Event unique identifier
                created_at:
                  type: string
                  format: date-time
                  description: >-
                    Date and time when the event was created. [RFC
                    3339-5](https://datatracker.ietf.org/doc/html/rfc3339#section-5.6),
                    [ISO8601
                    UTC](https://www.iso.org/iso-8601-date-and-time-format.html)
                type:
                  type: string
                  description: Event type
                  enum:
                    - PORTFOLIO_ALLOCATION.CREATED
                    - PORTFOLIO_ALLOCATION.CHANGED
                object:
                  title: Portfolios allocation
                  type: object
                  properties:
                    id:
                      title: Portfolio allocation unique identifier
                      type: string
                      format: uuid
                    created_at:
                      type: string
                      format: date-time
                      description: >-
                        Date and time when the resource was created. [RFC
                        3339-5](https://datatracker.ietf.org/doc/html/rfc3339#section-5.6),
                        [ISO8601
                        UTC](https://www.iso.org/iso-8601-date-and-time-format.html)
                    updated_at:
                      type: string
                      format: date-time
                      description: >-
                        Date and time when the resource was last updated. [RFC
                        3339-5](https://datatracker.ietf.org/doc/html/rfc3339#section-5.6),
                        [ISO8601
                        UTC](https://www.iso.org/iso-8601-date-and-time-format.html)
                    name:
                      description: Allocation name
                      type: string
                    allocation:
                      description: List of portfolios allocations
                      type: array
                      items:
                        type: object
                        properties:
                          instrument_id:
                            oneOf:
                              - title: International securities identification number
                                type: string
                                description: >-
                                  International securities identification number
                                  defined by [ISO
                                  6166](https://en.wikipedia.org/wiki/International_Securities_Identification_Number).
                                pattern: ^[A-Z]{2}[A-Z0-9]{9}[0-9]$
                              - title: Unique identifier
                                description: UPVEST instrument identifier
                                type: string
                                format: uuid
                                pattern: >-
                                  ^[0-9a-fA-F]{8}-?[0-9a-fA-F]{4}-?[0-5][0-9a-fA-F]{3}-?[089abAB][0-9a-fA-F]{3}-?[0-9a-fA-F]{12}$
                          instrument_id_type:
                            description: >-
                              The type of the ID used in the request.

                              * ISIN - International Securities Identification
                              Number

                              * UPVEST - UPVEST's unique instrument identifier
                            enum:
                              - ISIN
                              - UPVEST
                            default: ISIN
                            type: string
                          weight:
                            description: Instrument allocation weight
                            type: string
                            pattern: ^(100|[0-9]{1,2}(\.[0-9]{1,5})?)$
                        required:
                          - instrument_id
                          - instrument_id_type
                          - weight
                        additionalProperties: false
                  required:
                    - id
                    - created_at
                    - updated_at
                    - name
                    - allocation
                  additionalProperties: false
                webhook_id:
                  title: Webhook ID
                  type: string
                  description: Webhook unique identifier.
                  format: uuid
              required:
                - id
                - created_at
                - type
                - object
                - webhook_id
              additionalProperties: false
            example:
              id: 54b8d84f-5bd0-4e43-bf0f-164388cb4c23
              created_at: '2021-07-21T14:10:00.00Z'
              type: PORTFOLIO_ALLOCATION.CREATED
              object:
                id: 436244bb-4afd-4002-b53b-b1d7a3bca032
                created_at: '2021-07-21T14:10:00.00Z'
                updated_at: '2021-07-21T14:10:00.00Z'
                name: Allocation 1
                allocation:
                  - instrument_id: IE00B0M62Q58
                    instrument_id_type: ISIN
                    weight: '0.7'
                  - instrument_id: US0378331005
                    instrument_id_type: ISIN
                    weight: '0.3'
              webhook_id: cd2e4183-4e62-4e0f-981b-44b594d14610
      responses:
        '200':
          description: Request has been processed successfully.
  Savings plan execution events:
    post:
      operationId: savings_plan_execution_event
      summary: Savings plan execution events
      description: Savings plan execution events
      tags:
        - Savings Plans
      requestBody:
        content:
          application/json:
            schema:
              title: Webhook - Savings Plan Executions - Callback
              type: object
              properties:
                id:
                  type: string
                  format: uuid
                  description: Event unique identifier
                created_at:
                  type: string
                  format: date-time
                  description: >-
                    Date and time when the event was created. [RFC
                    3339-5](https://datatracker.ietf.org/doc/html/rfc3339#section-5.6),
                    [ISO8601
                    UTC](https://www.iso.org/iso-8601-date-and-time-format.html)
                type:
                  type: string
                  description: Event type
                  enum:
                    - SAVINGS_PLAN_EXECUTION.NEW
                    - SAVINGS_PLAN_EXECUTION.PROCESSING
                    - SAVINGS_PLAN_EXECUTION.FILLED
                    - SAVINGS_PLAN_EXECUTION.SETTLED
                    - SAVINGS_PLAN_EXECUTION.CANCELLED
                    - SAVINGS_PLAN_EXECUTION.REMINDER
                object:
                  title: Savings plan
                  type: object
                  properties:
                    id:
                      title: Savings plan execution unique identifier
                      type: string
                      format: uuid
                    created_at:
                      type: string
                      format: date-time
                      description: >-
                        Date and time when the resource was created. [RFC
                        3339-5](https://datatracker.ietf.org/doc/html/rfc3339#section-5.6),
                        [ISO8601
                        UTC](https://www.iso.org/iso-8601-date-and-time-format.html)
                    updated_at:
                      type: string
                      format: date-time
                      description: >-
                        Date and time when the resource was last updated. [RFC
                        3339-5](https://datatracker.ietf.org/doc/html/rfc3339#section-5.6),
                        [ISO8601
                        UTC](https://www.iso.org/iso-8601-date-and-time-format.html)
                    user_id:
                      title: User unique identifier.
                      type: string
                      description: User unique identifier.
                      format: uuid
                    account_id:
                      title: Account unique identifier.
                      type: string
                      description: Account unique identifier.
                      format: uuid
                    savings_plan_id:
                      title: Savings plan unique identifier
                      type: string
                      format: uuid
                    order_id:
                      title: >-
                        Order unique identifier (Portfolio order or Instrument
                        order)
                      description: >-
                        Order unique identifier (Portfolio order or Instrument
                        order)
                      oneOf:
                        - title: Portfolios order unique identifier
                          type: string
                          format: uuid
                        - title: Order
                          type: object
                          properties:
                            id:
                              title: Order unique identifier
                              type: string
                              format: uuid
                            created_at:
                              type: string
                              format: date-time
                              description: >-
                                Date and time when the resource was created.
                                [RFC
                                3339-5](https://datatracker.ietf.org/doc/html/rfc3339#section-5.6),
                                [ISO8601
                                UTC](https://www.iso.org/iso-8601-date-and-time-format.html)
                            updated_at:
                              type: string
                              format: date-time
                              description: >-
                                Date and time when the resource was last
                                updated. [RFC
                                3339-5](https://datatracker.ietf.org/doc/html/rfc3339#section-5.6),
                                [ISO8601
                                UTC](https://www.iso.org/iso-8601-date-and-time-format.html)
                            user_id:
                              type: string
                              format: uuid
                              description: The ID of the user
                            account_id:
                              type: string
                              format: uuid
                              description: The ID of the account that owns the order
                            cash_amount:
                              allOf:
                                - type: string
                                  pattern: ^[0-9]{1,9}(\.[0-9]{2})?$
                                - description: >-
                                    Cash amount for a nominal order, not
                                    required if a share quantity is specified.
                            currency:
                              allOf:
                                - type: string
                                  description: >-
                                    Alphabetic three-letter [ISO
                                    4217](https://en.wikipedia.org/wiki/ISO_4217)
                                    currency code.

                                    * EUR - Euro

                                    * GBP - British Pound
                                  enum:
                                    - EUR
                                    - GBP
                                - description: The currency for the order.
                            side:
                              type: string
                              description: |-
                                Side of the order.
                                * BUY - 
                                * SELL - 
                              enum:
                                - BUY
                                - SELL
                            instrument_id:
                              title: International securities identification number
                              type: string
                              description: >-
                                International securities identification number
                                defined by [ISO
                                6166](https://en.wikipedia.org/wiki/International_Securities_Identification_Number).
                              pattern: ^[A-Z]{2}[A-Z0-9]{9}[0-9]$
                            instrument_id_type:
                              description: |-
                                The type of the ID used in the request.
                                * ISIN - 
                              enum:
                                - ISIN
                              default: ISIN
                              type: string
                            order_type:
                              type: string
                              description: |-
                                Type of the order.
                                * MARKET - 
                                * LIMIT - 
                                * STOP - 
                              enum:
                                - MARKET
                                - LIMIT
                                - STOP
                            quantity:
                              allOf:
                                - type: string
                                  pattern: ^[0-9]{0,63}(\.[0-9]{1,27})?$
                                - description: >-
                                    Quantity of securities for the order. Only
                                    required if the cash amount is not
                                    specified.
                            user_instrument_fit_acknowledgement:
                              type: boolean
                              description: >-
                                Only applicable if the user has failed the
                                instrument fit check for the instrument type
                                being ordered. True if the user has acknowledged
                                their willingness to trade.
                            limit_price:
                              allOf:
                                - type: string
                                  pattern: ^[0-9]{0,63}(\.[0-9]{1,27})?$
                                - description: >-
                                    The limit price for orders of the type
                                    'limit'.
                            stop_price:
                              allOf:
                                - type: string
                                  pattern: ^[0-9]{0,63}(\.[0-9]{1,27})?$
                                - description: >-
                                    The stop price for orders of the type
                                    'stop'.
                            expiry_date:
                              allOf:
                                - title: Expiry date
                                  type: string
                                  pattern: ^[0-9]{4}-[0-9]{2}-[0-9]{2}$
                                - description: >-
                                    The order expiration date (last day the
                                    order can trade) in the YYYY-MM-DD format.
                                    [RFC 3339, section
                                    5.6](https://json-schema.org/draft/2020-12/json-schema-validation.html#RFC3339)
                                    RFC 3339. The default value is order
                                    creation date + 200 years
                            status:
                              type: string
                              description: |-
                                The execution status of the order.
                                * NEW - 
                                * PROCESSING - 
                                * FILLED - 
                                * CANCELLED - 
                              enum:
                                - NEW
                                - PROCESSING
                                - FILLED
                                - CANCELLED
                            fee:
                              type: string
                              pattern: ^[0-9]{0,63}(\.[0-9]{1,27})?$
                            cancellation_reason:
                              type: string
                              description: >-
                                Reason for Order cancellation. The field is
                                present in case the Order has a status of
                                CANCELLED.

                                * CANCELLED_BY_CLIENT - 

                                * CANCELLED_BY_UPVEST_OPERATIONS - 

                                * CANCELLED_BY_TRADING_PARTNER - 

                                * CANCELLED_BY_UPVEST_PLATFORM - 
                              enum:
                                - CANCELLED_BY_CLIENT
                                - CANCELLED_BY_UPVEST_OPERATIONS
                                - CANCELLED_BY_TRADING_PARTNER
                                - CANCELLED_BY_UPVEST_PLATFORM
                            initiation_flow:
                              type: string
                              description: >-
                                Initiation flow used during order creation, i.e.
                                what triggered the order.

                                * API - 

                                * PORTFOLIO - 

                                * CASH_DIVIDEND_REINVESTMENT - 

                                * PORTFOLIO_REBALANCING - 

                                * SELL_TO_COVER_FEES - 

                                * SELL_TO_COVER_TAXES - 

                                * ACCOUNT_LIQUIDATION - 

                                * UPVEST_OPERATIONS - 

                                * SAVINGS_PLAN - 
                              enum:
                                - API
                                - PORTFOLIO
                                - CASH_DIVIDEND_REINVESTMENT
                                - PORTFOLIO_REBALANCING
                                - SELL_TO_COVER_FEES
                                - SELL_TO_COVER_TAXES
                                - ACCOUNT_LIQUIDATION
                                - UPVEST_OPERATIONS
                                - SAVINGS_PLAN
                            execution_flow:
                              type: string
                              description: >-
                                Execution flow that the order processing goes
                                through. If no value is specified, the default
                                value is assumed - `STRAIGHT_THROUGH`.

                                * STRAIGHT_THROUGH - 

                                * BLOCK - 
                              enum:
                                - STRAIGHT_THROUGH
                                - BLOCK
                            executions:
                              type: array
                              description: Order executions associated with this order
                              items:
                                title: Order execution
                                type: object
                                properties:
                                  id:
                                    title: Order execution unique identifier
                                    type: string
                                    format: uuid
                                  cash_amount:
                                    type: string
                                    pattern: ^[0-9]{1,9}(\.[0-9]{2})?$
                                  share_quantity:
                                    type: string
                                    pattern: ^[0-9]{0,63}(\.[0-9]{1,27})?$
                                  price:
                                    type: string
                                    pattern: ^[0-9]{0,63}(\.[0-9]{1,4})?$
                                  transaction_time:
                                    type: string
                                    format: date-time
                                  taxes:
                                    type: array
                                    items:
                                      title: Tax
                                      type: object
                                      properties:
                                        type:
                                          type: string
                                          description: |-
                                            Tax type
                                            * TOTAL - 
                                          default: TOTAL
                                          enum:
                                            - TOTAL
                                        amount:
                                          type: string
                                          pattern: ^[0-9]{0,63}(\.[0-9]{1,27})?$
                                      required:
                                        - type
                                        - amount
                                  order_id:
                                    title: Order unique identifier
                                    type: string
                                    format: uuid
                                  status:
                                    type: string
                                    description: |-
                                      Execution status of the Execution.
                                      * FILLED - 
                                      * SETTLED - 
                                      * CANCELLED - 
                                    enum:
                                      - FILLED
                                      - SETTLED
                                      - CANCELLED
                                  side:
                                    type: string
                                    description: |-
                                      Side of the execution.
                                      * BUY - 
                                      * SELL - 
                                    enum:
                                      - BUY
                                      - SELL
                                  currency:
                                    type: string
                                    description: >-
                                      Alphabetic three-letter [ISO
                                      4217](https://en.wikipedia.org/wiki/ISO_4217)
                                      currency code.

                                      * EUR - Euro

                                      * GBP - British Pound
                                    enum:
                                      - EUR
                                      - GBP
                                  settlement_date:
                                    allOf:
                                      - title: Settlement date
                                        type: string
                                        pattern: ^[0-9]{4}-[0-9]{2}-[0-9]{2}$
                                      - description: >-
                                          Order execution settlement date in the
                                          YYYY-MM-DD format. [RFC 3339, section
                                          5.6](https://json-schema.org/draft/2020-12/json-schema-validation.html#RFC3339)
                                          RFC 3339
                                  venue_id:
                                    type: string
                                    format: uuid
                                    description: The ID of the venue
                                required:
                                  - id
                                  - cash_amount
                                  - share_quantity
                                  - price
                                  - transaction_time
                                  - taxes
                                  - order_id
                                  - status
                                  - side
                                  - currency
                                  - venue_id
                                additionalProperties: false
                            client_reference:
                              type: string
                              description: >-
                                Immutable reference to the API flow that
                                initiated the order. For client initiated API
                                flows, this is a client provided ID. For
                                internal initiations, it is set to the ID of the
                                related object.
                              maxLength: 100
                            fee_configuration:
                              type: array
                              description: fee configuration
                              items:
                                title: Absolute Fee
                                type: object
                                properties:
                                  type:
                                    title: Fee type
                                    description: |-
                                      Fee type
                                      * TRANSACTION_FEE_BUY - 
                                      * TRANSACTION_FEE_SELL - 
                                    type: string
                                    enum:
                                      - TRANSACTION_FEE_BUY
                                      - TRANSACTION_FEE_SELL
                                  value_type:
                                    type: string
                                    default: ABSOLUTE
                                    description: The value type must be “ABSOLUTE”.
                                  charge_method:
                                    title: Fee charge method
                                    type: string
                                    description: >-
                                      Indicates whether the fee will be charged
                                      by client or by other methods.

                                      * CHARGED_BY_CLIENT - 

                                      * COLLECTED_BY_UPVEST - 
                                    enum:
                                      - CHARGED_BY_CLIENT
                                      - COLLECTED_BY_UPVEST
                                  cash_amount:
                                    type: string
                                    pattern: ^[0-9]{1,9}(\.[0-9]{2})?$
                                  currency:
                                    type: string
                                    description: >-
                                      Alphabetic three-letter [ISO
                                      4217](https://en.wikipedia.org/wiki/ISO_4217)
                                      currency code.

                                      * EUR - Euro

                                      * GBP - British Pound
                                    enum:
                                      - EUR
                                      - GBP
                                required:
                                  - type
                                  - value_type
                                  - charge_method
                                  - cash_amount
                                  - currency
                                additionalProperties: false
                          required:
                            - id
                            - created_at
                            - updated_at
                            - user_id
                            - account_id
                            - cash_amount
                            - currency
                            - side
                            - instrument_id
                            - instrument_id_type
                            - order_type
                            - quantity
                            - status
                            - fee
                            - initiation_flow
                            - executions
                            - client_reference
                          additionalProperties: false
                        - type: 'null'
                    cash_amount:
                      type: string
                      pattern: ^[0-9]{0,63}(\.[0-9]{1,27})?$
                    currency:
                      type: string
                      description: >-
                        Alphabetic three-letter [ISO
                        4217](https://en.wikipedia.org/wiki/ISO_4217) currency
                        code.

                        * EUR - Euro
                      enum:
                        - EUR
                      default: EUR
                    status:
                      type: string
                      description: |-
                        Status of a Savings Plan Execution. 
                        * NEW - 
                        * PROCESSING - 
                        * FILLED - 
                        * SETTLED - 
                        * CANCELLED - 
                      enum:
                        - NEW
                        - PROCESSING
                        - FILLED
                        - SETTLED
                        - CANCELLED
                    type:
                      type: string
                      description: |-
                        Type of the Savings plan.
                        * PORTFOLIO - 
                        * INSTRUMENT - 
                      enum:
                        - PORTFOLIO
                        - INSTRUMENT
                    execution_date:
                      type: string
                      description: Date of a savings plan execution in YYYY-MM-DD format.
                      pattern: ^[12]\d{3}-(0[1-9]|1[0-2])-(0[1-9]|[12]\d|3[01])$
                    instrument_id:
                      title: Instrument unique identifier
                      description: Instrument unique identifier.
                      oneOf:
                        - title: International securities identification number
                          type: string
                          description: >-
                            International securities identification number
                            defined by [ISO
                            6166](https://en.wikipedia.org/wiki/International_Securities_Identification_Number).
                          pattern: ^[A-Z]{2}[A-Z0-9]{9}[0-9]$
                        - title: German securities identification code
                          type: string
                          description: >-
                            German securities identification code known as
                            [Wertpapierkennnummer](https://en.wikipedia.org/wiki/Wertpapierkennnummer).
                          pattern: ^[A-HJ-NP-Z0-9]{6}$
                    instrument_id_type:
                      type: string
                      description: |-
                        The type of the ID used in the request.
                        * ISIN - International Securities Identification Number
                        * WKN - German securities identification code
                      enum:
                        - ISIN
                        - WKN
                      default: ISIN
                  required:
                    - id
                    - user_id
                    - account_id
                    - savings_plan_id
                    - order_id
                    - cash_amount
                    - currency
                    - status
                    - type
                    - execution_date
                    - created_at
                    - updated_at
                  additionalProperties: false
                webhook_id:
                  title: Webhook ID
                  type: string
                  description: Webhook unique identifier.
                  format: uuid
              required:
                - id
                - created_at
                - type
                - object
                - webhook_id
              additionalProperties: false
            examples:
              instrument:
                summary: instrument
                value:
                  id: 54b8d84f-5bd0-4e43-bf0f-164388cb4c23
                  created_at: '2023-07-21T10:00:00.00Z'
                  type: SAVINGS_PLAN_EXECUTION.NEW
                  object:
                    id: fc34d28e-38f5-49d2-92f6-82acb79098f4
                    created_at: '2023-07-21T14:10:00.00Z'
                    updated_at: '2023-07-21T15:10:00.00Z'
                    user_id: 4b9732bd-7496-4913-8a5f-6360479d7fed
                    account_id: 00ef0be8-d564-43af-b3c7-11b7a2188030
                    savings_plan_id: c31083c1-1cd3-405f-95d1-f49a37f0e032
                    order_id: null
                    cash_amount: '100'
                    currency: EUR
                    status: NEW
                    type: INSTRUMENT
                    instrument_id: DE0007664005
                    instrument_id_type: ISIN
                    execution_date: '2023-07-23'
                  webhook_id: cd2e4183-4e62-4e0f-981b-44b594d14610
              portfolio:
                summary: portfolio
                value:
                  id: 54b8d84f-5bd0-4e43-bf0f-164388cb4c23
                  created_at: '2023-07-21T10:00:00.00Z'
                  type: SAVINGS_PLAN_EXECUTION.NEW
                  object:
                    id: fc34d28e-38f5-49d2-92f6-82acb79098f4
                    created_at: '2023-07-21T14:10:00.00Z'
                    updated_at: '2023-07-21T15:10:00.00Z'
                    user_id: 4b9732bd-7496-4913-8a5f-6360479d7fed
                    account_id: 00ef0be8-d564-43af-b3c7-11b7a2188030
                    savings_plan_id: c31083c1-1cd3-405f-95d1-f49a37f0e032
                    order_id: null
                    cash_amount: '100'
                    currency: EUR
                    status: NEW
                    type: PORTFOLIO
                    execution_date: '2023-07-23'
                  webhook_id: cd2e4183-4e62-4e0f-981b-44b594d14610
      responses:
        '200':
          description: Request has been processed successfully.
  Savings plan events:
    post:
      operationId: savings_plan_event
      summary: Savings plan events
      description: Savings plan events
      tags:
        - Savings Plans
      requestBody:
        content:
          application/json:
            schema:
              title: Webhook - Savings Plan - Callback
              type: object
              properties:
                id:
                  type: string
                  format: uuid
                  description: Event unique identifier
                created_at:
                  type: string
                  format: date-time
                  description: >-
                    Date and time when the event was created. [RFC
                    3339-5](https://datatracker.ietf.org/doc/html/rfc3339#section-5.6),
                    [ISO8601
                    UTC](https://www.iso.org/iso-8601-date-and-time-format.html)
                type:
                  type: string
                  description: Event type
                  enum:
                    - SAVINGS_PLAN.CREATED
                    - SAVINGS_PLAN.CANCELLED
                object:
                  title: Savings plan
                  type: object
                  properties:
                    id:
                      title: Savings plan unique identifier
                      type: string
                      format: uuid
                    created_at:
                      type: string
                      format: date-time
                      description: >-
                        Date and time when the resource was created. [RFC
                        3339-5](https://datatracker.ietf.org/doc/html/rfc3339#section-5.6),
                        [ISO8601
                        UTC](https://www.iso.org/iso-8601-date-and-time-format.html)
                    updated_at:
                      type: string
                      format: date-time
                      description: >-
                        Date and time when the resource was last updated. [RFC
                        3339-5](https://datatracker.ietf.org/doc/html/rfc3339#section-5.6),
                        [ISO8601
                        UTC](https://www.iso.org/iso-8601-date-and-time-format.html)
                    user_id:
                      title: User unique identifier.
                      type: string
                      description: User unique identifier.
                      format: uuid
                    account_id:
                      title: Account unique identifier.
                      type: string
                      description: Account unique identifier.
                      format: uuid
                    name:
                      type: string
                      description: Savings plan name
                    type:
                      type: string
                      description: |-
                        Type of the Savings plan.
                        * PORTFOLIO - 
                        * INSTRUMENT - 
                      enum:
                        - PORTFOLIO
                        - INSTRUMENT
                    instrument_id:
                      title: Instrument unique identifier
                      description: Instrument unique identifier.
                      oneOf:
                        - title: International securities identification number
                          type: string
                          description: >-
                            International securities identification number
                            defined by [ISO
                            6166](https://en.wikipedia.org/wiki/International_Securities_Identification_Number).
                          pattern: ^[A-Z]{2}[A-Z0-9]{9}[0-9]$
                        - title: German securities identification code
                          type: string
                          description: >-
                            German securities identification code known as
                            [Wertpapierkennnummer](https://en.wikipedia.org/wiki/Wertpapierkennnummer).
                          pattern: ^[A-HJ-NP-Z0-9]{6}$
                    instrument_id_type:
                      type: string
                      description: |-
                        The type of the ID used in the request.
                        * ISIN - International Securities Identification Number
                        * WKN - German securities identification code
                      enum:
                        - ISIN
                        - WKN
                      default: ISIN
                    cash_amount:
                      type: string
                      pattern: ^[0-9]{0,63}(\.[0-9]{1,27})?$
                    start_date:
                      type: string
                      description: >-
                        First date of the savings plan execution in YYYY-MM-DD
                        format.
                      pattern: ^[12]\d{3}-(0[1-9]|1[0-2])-(0[1-9]|[12]\d|3[01])$
                    currency:
                      type: string
                      description: >-
                        Alphabetic three-letter [ISO
                        4217](https://en.wikipedia.org/wiki/ISO_4217) currency
                        code.

                        * EUR - Euro
                      enum:
                        - EUR
                      default: EUR
                    period:
                      type: string
                      description: |-
                        Unit of time. 
                        * WEEK - 
                        * MONTH - 
                        * YEAR - 
                      enum:
                        - WEEK
                        - MONTH
                        - YEAR
                    interval:
                      description: Number of periods between executions
                      type: integer
                      default: 1
                      minimum: 1
                      maximum: 1000
                    status:
                      type: string
                      description: |-
                        Status of a Savings Plan. 
                        * ACTIVE - 
                        * CANCELLED - 
                      enum:
                        - ACTIVE
                        - CANCELLED
                  required:
                    - id
                    - user_id
                    - account_id
                    - type
                    - cash_amount
                    - currency
                    - start_date
                    - period
                    - interval
                    - created_at
                    - updated_at
                  additionalProperties: false
                webhook_id:
                  title: Webhook ID
                  type: string
                  description: Webhook unique identifier.
                  format: uuid
              required:
                - id
                - created_at
                - type
                - object
                - webhook_id
              additionalProperties: false
            examples:
              instrument:
                summary: instrument
                value:
                  id: 54b8d84f-5bd0-4e43-bf0f-164388cb4c23
                  created_at: '2023-07-21T10:00:00.00Z'
                  type: SAVINGS_PLAN.CREATED
                  object:
                    id: fc34d28e-38f5-49d2-92f6-82acb79098f4
                    created_at: '2023-07-21T14:10:00.00Z'
                    updated_at: '2023-07-21T15:10:00.00Z'
                    user_id: 4b9732bd-7496-4913-8a5f-6360479d7fed
                    account_id: 00ef0be8-d564-43af-b3c7-11b7a2188030
                    name: Instrument savings plan
                    type: INSTRUMENT
                    instrument_id: DE0007664005
                    instrument_id_type: ISIN
                    cash_amount: '100.00'
                    currency: EUR
                    start_date: '2023-07-24'
                    period: WEEK
                    interval: 1
                    status: ACTIVE
                  webhook_id: cd2e4183-4e62-4e0f-981b-44b594d14610
              portfolio:
                summary: portfolio
                value:
                  id: 54b8d84f-5bd0-4e43-bf0f-164388cb4c23
                  created_at: '2023-07-21T10:00:00.00Z'
                  type: SAVINGS_PLAN.CREATED
                  object:
                    id: fc34d28e-38f5-49d2-92f6-82acb79098f4
                    created_at: '2023-07-21T14:10:00.00Z'
                    updated_at: '2023-07-21T15:10:00.00Z'
                    user_id: 4b9732bd-7496-4913-8a5f-6360479d7fed
                    account_id: 00ef0be8-d564-43af-b3c7-11b7a2188030
                    name: Portfolio savings plan
                    type: PORTFOLIO
                    cash_amount: '100.00'
                    currency: EUR
                    start_date: '2023-07-24'
                    period: WEEK
                    interval: 1
                    status: ACTIVE
                  webhook_id: cd2e4183-4e62-4e0f-981b-44b594d14610
      responses:
        '200':
          description: Request has been processed successfully.
  Account valuation events:
    post:
      operationId: account_valuation_event
      summary: Account valuation events
      description: Account valuation events
      tags:
        - Valuations
      requestBody:
        content:
          application/json:
            schema:
              title: Webhook - Account Valuation - Callback
              type: object
              properties:
                id:
                  type: string
                  format: uuid
                  description: Event unique identifier
                created_at:
                  type: string
                  format: date-time
                  description: >-
                    Date and time when the event was created. [RFC
                    3339-5](https://datatracker.ietf.org/doc/html/rfc3339#section-5.6),
                    [ISO8601
                    UTC](https://www.iso.org/iso-8601-date-and-time-format.html)
                type:
                  type: string
                  description: Event type
                  enum:
                    - ACCOUNT_VALUATION.CREATED
                object:
                  title: Account Valuation
                  type: object
                  properties:
                    id:
                      title: Account valuation unique identifier
                      description: Account valuation unique identifier.
                      type: string
                      format: uuid
                    created_at:
                      type: string
                      format: date-time
                      description: >-
                        Date and time when the resource was created. [RFC
                        3339-5](https://datatracker.ietf.org/doc/html/rfc3339#section-5.6),
                        [ISO8601
                        UTC](https://www.iso.org/iso-8601-date-and-time-format.html)
                    updated_at:
                      type: string
                      format: date-time
                      description: >-
                        Date and time when the resource was last updated. [RFC
                        3339-5](https://datatracker.ietf.org/doc/html/rfc3339#section-5.6),
                        [ISO8601
                        UTC](https://www.iso.org/iso-8601-date-and-time-format.html)
                    account_id:
                      title: Account unique identifier.
                      type: string
                      description: Account unique identifier.
                      format: uuid
                    total_security_value:
                      title: Total security value
                      description: >-
                        Entity representing the monetary value by amount and
                        currency.
                      type: object
                      properties:
                        amount:
                          type: string
                          pattern: ^[0-9]{0,63}(\.[0-9]{1,2})?$
                        currency:
                          type: string
                          description: >-
                            Alphabetic three-letter [ISO
                            4217](https://en.wikipedia.org/wiki/ISO_4217)
                            currency code.

                            * EUR - Euro
                          enum:
                            - EUR
                          default: EUR
                      required:
                        - amount
                        - currency
                      additionalProperties: false
                    price_quality:
                      type: string
                      description: |-
                        The requested price quality.
                        * EOD - End of day prices
                        * HIGHEST_AVAILABLE - The most recent available prices
                      enum:
                        - EOD
                        - HIGHEST_AVAILABLE
                    security_positions:
                      type: array
                      description: Positions associated with this account valuation.
                      items:
                        title: Account valuation security position
                        type: object
                        properties:
                          instrument:
                            title: Instrument
                            description: Entity representing the financial instrument.
                            type: object
                            properties:
                              uuid:
                                description: >-
                                  String representing the instrument internal
                                  identifier.
                                type: string
                                format: uuid
                              isin:
                                title: International securities identification number
                                type: string
                                description: >-
                                  International securities identification number
                                  defined by [ISO
                                  6166](https://en.wikipedia.org/wiki/International_Securities_Identification_Number).
                                pattern: ^[A-Z]{2}[A-Z0-9]{9}[0-9]$
                            required:
                              - uuid
                            additionalProperties: false
                          quantity:
                            allOf:
                              - type: string
                                pattern: ^-?[0-9]{0,63}(\.[0-9]{1,10})?$
                              - description: >-
                                  Total quantity of the instrument (10 decimal
                                  places).
                          value:
                            nullable: true
                            allOf:
                              - title: Security position value
                                description: >-
                                  Entity representing the monetary value by
                                  amount and currency, and the time of the price
                                  used.
                                type: object
                                properties:
                                  amount:
                                    type: string
                                    pattern: ^[0-9]{0,63}(\.[0-9]{1,2})?$
                                  currency:
                                    type: string
                                    description: >-
                                      Alphabetic three-letter [ISO
                                      4217](https://en.wikipedia.org/wiki/ISO_4217)
                                      currency code.

                                      * EUR - Euro
                                    enum:
                                      - EUR
                                    default: EUR
                                  price_time:
                                    type: string
                                    format: date-time
                                    description: >-
                                      The date and time of the price used for
                                      the calculation. [RFC
                                      3339-5](https://datatracker.ietf.org/doc/html/rfc3339#section-5.6),
                                      [ISO8601
                                      UTC](https://www.iso.org/iso-8601-date-and-time-format.html)
                                required:
                                  - amount
                                  - currency
                                  - price_time
                                additionalProperties: false
                              - nullable: true
                          weight:
                            nullable: true
                            allOf:
                              - type: string
                                pattern: ^-?[0-9]{0,63}(\.[0-9]{1,10})?$
                              - description: >-
                                  Total weight of the instrument (10 decimal
                                  places).
                          price_quality:
                            type: string
                            description: >-
                              The price quality used for the calculation of the
                              value of the position.

                              * EOD - end of day price

                              * REALTIME - realtime price

                              * DELAYED - delayed price

                              * NA - no available price
                            enum:
                              - EOD
                              - REALTIME
                              - DELAYED
                              - NA
                        required:
                          - instrument
                          - quantity
                          - value
                          - weight
                        additionalProperties: false
                    valuation_time:
                      type: string
                      format: date-time
                      description: >-
                        Date and time as of which the value was calculated. [RFC
                        3339-5](https://datatracker.ietf.org/doc/html/rfc3339#section-5.6),
                        [ISO8601
                        UTC](https://www.iso.org/iso-8601-date-and-time-format.html)
                  required:
                    - id
                    - account_id
                    - created_at
                    - updated_at
                    - valuation_time
                    - total_security_value
                    - price_quality
                  additionalProperties: false
                webhook_id:
                  title: Webhook ID
                  type: string
                  description: Webhook unique identifier.
                  format: uuid
              required:
                - id
                - created_at
                - type
                - object
                - webhook_id
              additionalProperties: false
            example:
              id: 8962b496-8d42-4560-bfab-10490dd1a721
              created_at: '2023-01-10T00:15:32Z'
              type: ACCOUNT_VALUATION.CREATED
              object:
                id: 404b170a-9042-11ed-9a51-2eabd0c03f8a
                created_at: '2023-01-10T00:15:22Z'
                updated_at: '2023-01-10T00:15:22Z'
                valuation_time: '2023-01-10T00:15:22Z'
                account_id: 51cdc0cc-9042-11ed-b017-2eabd0c03f8a
                price_quality: EOD
                total_security_value:
                  amount: '142.29'
                  currency: EUR
                security_positions:
                  - instrument:
                      uuid: 123e4567-e89b-12d3-a456-426614174000
                      isin: DE0007664005
                    value:
                      amount: '104.81'
                      currency: EUR
                      price_time: '2023-01-09'
                    quantity: '0.65'
                    weight: '0.736595'
                  - instrument:
                      uuid: 48b798b7-3a62-4f30-8307-ee94d35b21b7
                      isin: FR0010524777
                    value:
                      amount: '37.48'
                      currency: EUR
                      price_time: '2023-01-09'
                    quantity: '1.00'
                    weight: '0.263405'
              webhook_id: 9df39835-be87-4243-9018-f2500b39cee6
      responses:
        '200':
          description: Request has been processed successfully.
  Intraday account valuation events:
    post:
      operationId: intraday_account_valuation_event
      summary: Intraday account valuation events
      description: Intraday account valuation events
      tags:
        - Valuations
      requestBody:
        content:
          application/json:
            schema:
              title: Webhook - Intraday Account Valuation - Callback
              type: object
              properties:
                id:
                  type: string
                  format: uuid
                  description: Event unique identifier
                created_at:
                  type: string
                  format: date-time
                  description: >-
                    Date and time when the event was created. [RFC
                    3339-5](https://datatracker.ietf.org/doc/html/rfc3339#section-5.6),
                    [ISO8601
                    UTC](https://www.iso.org/iso-8601-date-and-time-format.html)
                type:
                  type: string
                  description: Event type
                  enum:
                    - INTRADAY_ACCOUNT_VALUATION.CREATED
                object:
                  title: Account Valuation
                  type: object
                  properties:
                    id:
                      title: Account valuation unique identifier
                      description: Account valuation unique identifier.
                      type: string
                      format: uuid
                    created_at:
                      type: string
                      format: date-time
                      description: >-
                        Date and time when the resource was created. [RFC
                        3339-5](https://datatracker.ietf.org/doc/html/rfc3339#section-5.6),
                        [ISO8601
                        UTC](https://www.iso.org/iso-8601-date-and-time-format.html)
                    updated_at:
                      type: string
                      format: date-time
                      description: >-
                        Date and time when the resource was last updated. [RFC
                        3339-5](https://datatracker.ietf.org/doc/html/rfc3339#section-5.6),
                        [ISO8601
                        UTC](https://www.iso.org/iso-8601-date-and-time-format.html)
                    account_id:
                      title: Account unique identifier.
                      type: string
                      description: Account unique identifier.
                      format: uuid
                    total_security_value:
                      title: Total security value
                      description: >-
                        Entity representing the monetary value by amount and
                        currency.
                      type: object
                      properties:
                        amount:
                          type: string
                          pattern: ^[0-9]{0,63}(\.[0-9]{1,2})?$
                        currency:
                          type: string
                          description: >-
                            Alphabetic three-letter [ISO
                            4217](https://en.wikipedia.org/wiki/ISO_4217)
                            currency code.

                            * EUR - Euro
                          enum:
                            - EUR
                          default: EUR
                      required:
                        - amount
                        - currency
                      additionalProperties: false
                    price_quality:
                      type: string
                      description: |-
                        The requested price quality.
                        * EOD - End of day prices
                        * HIGHEST_AVAILABLE - The most recent available prices
                      enum:
                        - EOD
                        - HIGHEST_AVAILABLE
                    security_positions:
                      type: array
                      description: Positions associated with this account valuation.
                      items:
                        title: Account valuation security position
                        type: object
                        properties:
                          instrument:
                            title: Instrument
                            description: Entity representing the financial instrument.
                            type: object
                            properties:
                              uuid:
                                description: >-
                                  String representing the instrument internal
                                  identifier.
                                type: string
                                format: uuid
                              isin:
                                title: International securities identification number
                                type: string
                                description: >-
                                  International securities identification number
                                  defined by [ISO
                                  6166](https://en.wikipedia.org/wiki/International_Securities_Identification_Number).
                                pattern: ^[A-Z]{2}[A-Z0-9]{9}[0-9]$
                            required:
                              - uuid
                            additionalProperties: false
                          quantity:
                            allOf:
                              - type: string
                                pattern: ^-?[0-9]{0,63}(\.[0-9]{1,10})?$
                              - description: >-
                                  Total quantity of the instrument (10 decimal
                                  places).
                          value:
                            nullable: true
                            allOf:
                              - title: Security position value
                                description: >-
                                  Entity representing the monetary value by
                                  amount and currency, and the time of the price
                                  used.
                                type: object
                                properties:
                                  amount:
                                    type: string
                                    pattern: ^[0-9]{0,63}(\.[0-9]{1,2})?$
                                  currency:
                                    type: string
                                    description: >-
                                      Alphabetic three-letter [ISO
                                      4217](https://en.wikipedia.org/wiki/ISO_4217)
                                      currency code.

                                      * EUR - Euro
                                    enum:
                                      - EUR
                                    default: EUR
                                  price_time:
                                    type: string
                                    format: date-time
                                    description: >-
                                      The date and time of the price used for
                                      the calculation. [RFC
                                      3339-5](https://datatracker.ietf.org/doc/html/rfc3339#section-5.6),
                                      [ISO8601
                                      UTC](https://www.iso.org/iso-8601-date-and-time-format.html)
                                required:
                                  - amount
                                  - currency
                                  - price_time
                                additionalProperties: false
                              - nullable: true
                          weight:
                            nullable: true
                            allOf:
                              - type: string
                                pattern: ^-?[0-9]{0,63}(\.[0-9]{1,10})?$
                              - description: >-
                                  Total weight of the instrument (10 decimal
                                  places).
                          price_quality:
                            type: string
                            description: >-
                              The price quality used for the calculation of the
                              value of the position.

                              * EOD - end of day price

                              * REALTIME - realtime price

                              * DELAYED - delayed price

                              * NA - no available price
                            enum:
                              - EOD
                              - REALTIME
                              - DELAYED
                              - NA
                        required:
                          - instrument
                          - quantity
                          - value
                          - weight
                        additionalProperties: false
                    valuation_time:
                      type: string
                      format: date-time
                      description: >-
                        Date and time as of which the value was calculated. [RFC
                        3339-5](https://datatracker.ietf.org/doc/html/rfc3339#section-5.6),
                        [ISO8601
                        UTC](https://www.iso.org/iso-8601-date-and-time-format.html)
                  required:
                    - id
                    - account_id
                    - created_at
                    - updated_at
                    - valuation_time
                    - total_security_value
                    - price_quality
                  additionalProperties: false
                webhook_id:
                  title: Webhook ID
                  type: string
                  description: Webhook unique identifier.
                  format: uuid
              required:
                - id
                - created_at
                - type
                - object
                - webhook_id
              additionalProperties: false
            example:
              id: 8962b496-8d42-4560-bfab-10490dd1a722
              created_at: '2023-01-10T14:15:32Z'
              type: INTRADAY_ACCOUNT_VALUATION.CREATED
              object:
                id: 404b170a-9042-11ed-9a51-2eabd0c03f8b
                created_at: '2023-01-10T14:15:22Z'
                updated_at: '2023-01-10T14:15:22Z'
                valuation_time: '2023-01-10T14:15:22Z'
                account_id: 51cdc0cc-9042-11ed-b017-2eabd0c03f8a
                price_quality: EOD
                total_security_value:
                  amount: '142.29'
                  currency: EUR
                security_positions:
                  - instrument:
                      uuid: 123e4567-e89b-12d3-a456-426614174000
                      isin: DE0007664005
                    value:
                      amount: '104.81'
                      currency: EUR
                      price_time: '2023-01-09'
                    quantity: '0.65'
                    weight: '0.736595'
                  - instrument:
                      uuid: 48b798b7-3a62-4f30-8307-ee94d35b21b7
                      isin: FR0010524777
                    value:
                      amount: '37.48'
                      currency: EUR
                      price_time: '2023-01-09'
                    quantity: '1.00'
                    weight: '0.263405'
              webhook_id: 9df39835-be87-4243-9018-f2500b39cee7
      responses:
        '200':
          description: Request has been processed successfully.
  Account liquidation events:
    post:
      operationId: account_liquidation_event
      summary: Account liquidation events
      description: Account liquidation events
      tags:
        - Liquidations
      requestBody:
        content:
          application/json:
            schema:
              title: Webhook - Accounts - Callback
              type: object
              properties:
                id:
                  type: string
                  format: uuid
                  description: Event unique identifier
                created_at:
                  type: string
                  format: date-time
                  description: >-
                    Date and time when the event was created. [RFC
                    3339-5](https://datatracker.ietf.org/doc/html/rfc3339#section-5.6),
                    [ISO8601
                    UTC](https://www.iso.org/iso-8601-date-and-time-format.html)
                type:
                  type: string
                  description: Event type
                  enum:
                    - ACCOUNT_LIQUIDATION.NEW
                    - ACCOUNT_LIQUIDATION.PROCESSING
                    - ACCOUNT_LIQUIDATION.FILLED
                    - ACCOUNT_LIQUIDATION.CANCELLED
                    - ACCOUNT_LIQUIDATION.SETTLED
                object:
                  title: Account liquidation
                  type: object
                  properties:
                    id:
                      title: Account liquidation unique identifier
                      type: string
                      format: uuid
                    created_at:
                      type: string
                      format: date-time
                      description: >-
                        Date and time when the resource was created. [RFC
                        3339-5](https://datatracker.ietf.org/doc/html/rfc3339#section-5.6),
                        [ISO8601
                        UTC](https://www.iso.org/iso-8601-date-and-time-format.html)
                    updated_at:
                      type: string
                      format: date-time
                      description: >-
                        Date and time when the resource was last updated. [RFC
                        3339-5](https://datatracker.ietf.org/doc/html/rfc3339#section-5.6),
                        [ISO8601
                        UTC](https://www.iso.org/iso-8601-date-and-time-format.html)
                    user_id:
                      title: User unique identifier.
                      type: string
                      description: User unique identifier.
                      format: uuid
                    account_id:
                      title: Account unique identifier.
                      type: string
                      description: Account unique identifier.
                      format: uuid
                    cash_amount:
                      type: string
                      pattern: ^[0-9]{0,63}(\.[0-9]{1,27})?$
                    currency:
                      type: string
                      description: >-
                        Alphabetic three-letter [ISO
                        4217](https://en.wikipedia.org/wiki/ISO_4217) currency
                        code.

                        * EUR - Euro

                        * GBP - British Pound
                      enum:
                        - EUR
                        - GBP
                    status:
                      type: string
                      description: |-
                        Execution status of the Account liquidation.
                        * NEW - 
                        * PROCESSING - 
                        * FILLED - 
                        * CANCELLED - 
                        * SETTLED - 
                      enum:
                        - NEW
                        - PROCESSING
                        - FILLED
                        - CANCELLED
                        - SETTLED
                    orders:
                      type: array
                      description: >-
                        Position liquidation orders associated with this account
                        liquidation
                      items:
                        title: Account liquidation
                        type: object
                        properties:
                          id:
                            title: Account liquidation order unique identifier
                            type: string
                            format: uuid
                          side:
                            type: string
                            description: |-
                              Side of the order.
                              * SELL - 
                            default: SELL
                          status:
                            type: string
                            description: |-
                              Execution status of the Account liquidation order.
                              * NEW - 
                              * PROCESSING - 
                              * FILLED - 
                              * CANCELLED - 
                            enum:
                              - NEW
                              - PROCESSING
                              - FILLED
                              - CANCELLED
                        required:
                          - id
                          - side
                          - status
                        additionalProperties: false
                  required:
                    - id
                    - created_at
                    - updated_at
                    - account_id
                    - cash_amount
                    - currency
                    - status
                    - orders
                  additionalProperties: false
                webhook_id:
                  title: Webhook ID
                  type: string
                  description: Webhook unique identifier.
                  format: uuid
              required:
                - id
                - created_at
                - type
                - object
                - webhook_id
              additionalProperties: false
            example:
              id: 56510309-d9de-4730-9b5b-4a0ed047f3a9
              created_at: '2021-07-21T14:10:00.00Z'
              type: ACCOUNT_LIQUIDATION.NEW
              object:
                id: b2f541dc-a27b-4d5a-b970-41812b0892b9
                created_at: '2021-07-21T14:10:00.000Z'
                updated_at: '2021-07-21T14:10:00.000Z'
                account_id: debf2026-f2da-4ff0-bb84-92e45babb1e3
                user_id: 81dfb00e-9be6-4617-8994-dfd0407f34df
                cash_amount: '1000'
                currency: EUR
                status: NEW
                orders: []
              webhook_id: b838bde5-b6df-4f1f-bfc4-71d3fb01d430
      responses:
        '200':
          description: Request has been processed successfully.
  Account returns events:
    post:
      operationId: account_returns_event
      summary: Account returns event
      description: Account returns event
      tags:
        - Returns
      requestBody:
        content:
          application/json:
            schema:
              title: Webhook - Account Returns - Callback
              type: object
              properties:
                id:
                  type: string
                  format: uuid
                  description: Event unique identifier
                created_at:
                  type: string
                  format: date-time
                  description: >-
                    Date and time when the event was created. [RFC
                    3339-5](https://datatracker.ietf.org/doc/html/rfc3339#section-5.6),
                    [ISO8601
                    UTC](https://www.iso.org/iso-8601-date-and-time-format.html)
                type:
                  type: string
                  description: Event type
                  enum:
                    - ACCOUNT_RETURNS.CREATED
                  default: ACCOUNT_RETURNS.CREATED
                object:
                  title: Account Returns
                  type: object
                  properties:
                    account_id:
                      title: Account unique identifier.
                      type: string
                      description: Account unique identifier.
                      format: uuid
                    date:
                      type: string
                      format: date-time
                      description: >-
                        Date when returns were calculated. [RFC
                        3339-5](https://datatracker.ietf.org/doc/html/rfc3339#section-5.6),
                        [ISO8601
                        UTC](https://www.iso.org/iso-8601-date-and-time-format.html)
                    twr:
                      title: ''
                      type: object
                      properties:
                        daily:
                          type: string
                          pattern: ^-?[0-9]{0,63}(\.[0-9]{1,27})?$
                        cumulative:
                          type: string
                          pattern: ^-?[0-9]{0,63}(\.[0-9]{1,27})?$
                        cumulative_start_date:
                          type: string
                          format: date-time
                          description: >-
                            Date when the cumulative time-weighted returns
                            calculation starts.
                  required:
                    - account_id
                    - date
                    - twr
                  additionalProperties: false
                webhook_id:
                  title: Webhook ID
                  type: string
                  description: Webhook unique identifier.
                  format: uuid
              required:
                - id
                - created_at
                - type
                - object
                - webhook_id
              additionalProperties: false
            example:
              id: 399dc0a7-f4cb-42a4-9513-496df030381e
              created_at: '2023-09-02T05:15:00Z'
              type: ACCOUNT_RETURNS.CREATED
              object:
                account_id: bbe9e784-e009-4cb6-a07c-24831897327b
                date: '2023-09-01'
                twr:
                  daily: '0.0132434142'
                  cumulative: '0.0324353234'
                  cumulative_start_date: '2023-08-01'
              webhook_id: 435719ac-c064-4c7a-a8b9-6db9446965de
      responses:
        '200':
          description: Request has been processed successfully.
  Virtual cash increase events:
    post:
      operationId: virtual_cash_increase_event
      summary: Virtual cash increase events
      description: Virtual cash increase events
      tags:
        - Virtual Cash Balances
      requestBody:
        content:
          application/json:
            schema:
              title: >-
                Webhook - Virtual Cash Balance - Virtual Cash Increase -
                Callback
              type: object
              properties:
                id:
                  type: string
                  format: uuid
                  description: Event unique identifier
                created_at:
                  type: string
                  format: date-time
                  description: >-
                    Date and time when the event was created. [RFC
                    3339-5](https://datatracker.ietf.org/doc/html/rfc3339#section-5.6),
                    [ISO8601
                    UTC](https://www.iso.org/iso-8601-date-and-time-format.html)
                type:
                  type: string
                  description: Event type
                  enum:
                    - VIRTUAL_CASH_INCREASE.ISSUED
                    - VIRTUAL_CASH_INCREASE.CONFIRMED
                object:
                  title: Virtual Cash Balance - Virtual Cash Increase
                  type: object
                  additionalProperties: false
                  properties:
                    id:
                      title: Virtual cash unique identifier
                      type: string
                      description: Virtual cash unique identifier
                      format: uuid
                    created_at:
                      type: string
                      format: date-time
                      description: >-
                        Date and time when the resource was created. [RFC
                        3339-5](https://datatracker.ietf.org/doc/html/rfc3339#section-5.6),
                        [ISO8601
                        UTC](https://www.iso.org/iso-8601-date-and-time-format.html)
                    updated_at:
                      type: string
                      format: date-time
                      description: >-
                        Date and time when the resource was last updated. [RFC
                        3339-5](https://datatracker.ietf.org/doc/html/rfc3339#section-5.6),
                        [ISO8601
                        UTC](https://www.iso.org/iso-8601-date-and-time-format.html)
                    account_group_id:
                      title: Account group unique identifier.
                      type: string
                      description: Account group unique identifier.
                      format: uuid
                    amount:
                      type: string
                      pattern: ^[0-9]{1,9}(\.[0-9]{2})?$
                    currency:
                      type: string
                      description: >-
                        Alphabetic three-letter [ISO
                        4217](https://en.wikipedia.org/wiki/ISO_4217) currency
                        code.

                        * EUR - Euro
                      enum:
                        - EUR
                        - GBP
                    status:
                      type: string
                      description: >-
                        Status of the virtual cash

                        * ISSUED - Virtual cash increase is created.

                        * CONFIRMED - Virtual cash increase was successfully
                        processed.
                      enum:
                        - ISSUED
                        - CONFIRMED
                  required:
                    - id
                    - account_group_id
                    - amount
                    - currency
                    - status
                    - created_at
                    - updated_at
                webhook_id:
                  title: Webhook ID
                  type: string
                  description: Webhook unique identifier.
                  format: uuid
              required:
                - id
                - created_at
                - type
                - object
                - webhook_id
              additionalProperties: false
            example:
              id: 8962b496-8d42-4560-bfab-10490dd1a721
              created_at: '2021-07-21T14:10:00.00Z'
              type: VIRTUAL_CASH_INCREASE.ISSUED
              object:
                id: 6ffa6b16-2380-4e7a-88b2-ae625c8eef99
                created_at: '2020-08-24T14:15:22Z'
                updated_at: '2020-08-24T14:15:22Z'
                account_group_id: ac1c39e9-2101-46b8-a624-d10a9e351b6c
                amount: '200.00'
                currency: EUR
                status: ISSUED
              webhook_id: 9df39835-be87-4243-9018-f2500b39cee6
      responses:
        '200':
          description: Request has been processed successfully.
  Virtual cash decrease events:
    post:
      operationId: virtual_cash_decrease_event
      summary: Virtual cash decrease events
      description: Virtual cash decrease events
      tags:
        - Virtual Cash Balances
      requestBody:
        content:
          application/json:
            schema:
              title: >-
                Webhook - Virtual Cash Balance - Virtual Cash Decrease -
                Callback
              type: object
              properties:
                id:
                  type: string
                  format: uuid
                  description: Event unique identifier
                created_at:
                  type: string
                  format: date-time
                  description: >-
                    Date and time when the event was created. [RFC
                    3339-5](https://datatracker.ietf.org/doc/html/rfc3339#section-5.6),
                    [ISO8601
                    UTC](https://www.iso.org/iso-8601-date-and-time-format.html)
                type:
                  type: string
                  description: Event type
                  enum:
                    - VIRTUAL_CASH_DECREASE.ISSUED
                    - VIRTUAL_CASH_DECREASE.CONFIRMED
                    - VIRTUAL_CASH_DECREASE.QUEUED
                    - VIRTUAL_CASH_DECREASE.CANCELLED
                object:
                  title: Virtual Cash Balance - Virtual Cash Decrease
                  type: object
                  additionalProperties: false
                  properties:
                    id:
                      title: Virtual cash unique identifier
                      type: string
                      description: Virtual cash unique identifier
                      format: uuid
                    created_at:
                      type: string
                      format: date-time
                      description: >-
                        Date and time when the resource was created. [RFC
                        3339-5](https://datatracker.ietf.org/doc/html/rfc3339#section-5.6),
                        [ISO8601
                        UTC](https://www.iso.org/iso-8601-date-and-time-format.html)
                    updated_at:
                      type: string
                      format: date-time
                      description: >-
                        Date and time when the resource was last updated. [RFC
                        3339-5](https://datatracker.ietf.org/doc/html/rfc3339#section-5.6),
                        [ISO8601
                        UTC](https://www.iso.org/iso-8601-date-and-time-format.html)
                    account_group_id:
                      title: Account group unique identifier.
                      type: string
                      description: Account group unique identifier.
                      format: uuid
                    amount:
                      type: string
                      pattern: ^[0-9]{1,9}(\.[0-9]{2})?$
                    currency:
                      type: string
                      description: >-
                        Alphabetic three-letter [ISO
                        4217](https://en.wikipedia.org/wiki/ISO_4217) currency
                        code.

                        * EUR - Euro
                      enum:
                        - EUR
                        - GBP
                    status:
                      type: string
                      description: >-
                        Status of the virtual cash

                        * ISSUED - Virtual cash decrease is created.

                        * CONFIRMED - Virtual cash decrease was successfully
                        processed.

                        * QUEUED - Virtual cash decrease was queued.

                        * CANCELLED - Virtual cash decrease was cancelled.
                      enum:
                        - ISSUED
                        - CONFIRMED
                        - QUEUED
                        - CANCELLED
                  required:
                    - id
                    - account_group_id
                    - amount
                    - currency
                    - status
                    - created_at
                    - updated_at
                webhook_id:
                  title: Webhook ID
                  type: string
                  description: Webhook unique identifier.
                  format: uuid
              required:
                - id
                - created_at
                - type
                - object
                - webhook_id
              additionalProperties: false
            example:
              id: 8962b496-8d42-4560-bfab-10490dd1a721
              created_at: '2021-07-21T14:10:00.00Z'
              type: VIRTUAL_CASH_DECREASE.ISSUED
              object:
                id: 6ffa6b16-2380-4e7a-88b2-ae625c8eef99
                created_at: '2020-08-24T14:15:22Z'
                updated_at: '2020-08-24T14:15:22Z'
                account_group_id: ac1c39e9-2101-46b8-a624-d10a9e351b6c
                amount: '200.00'
                currency: EUR
                status: ISSUED
              webhook_id: 9df39835-be87-4243-9018-f2500b39cee6
      responses:
        '200':
          description: Request has been processed successfully.
  Fee collection events:
    post:
      operationId: fee_collection_event
      summary: Fee collection events
      description: Fee collection events
      tags:
        - Fees
      requestBody:
        content:
          application/json:
            schema:
              title: Webhook - Fee Collection - Callback
              type: object
              properties:
                id:
                  type: string
                  format: uuid
                  description: Event unique identifier
                created_at:
                  type: string
                  format: date-time
                  description: >-
                    Date and time when the event was created. [RFC
                    3339-5](https://datatracker.ietf.org/doc/html/rfc3339#section-5.6),
                    [ISO8601
                    UTC](https://www.iso.org/iso-8601-date-and-time-format.html)
                type:
                  type: string
                  description: Event type
                  enum:
                    - FEE_COLLECTION.CREATED
                    - FEE_COLLECTION.FINALISED
                    - FEE_COLLECTION.CANCELLED
                object:
                  title: Fee Collection
                  type: object
                  properties:
                    id:
                      title: Fee collection unique identifier.
                      type: string
                      description: Fee collection unique identifier.
                      format: uuid
                    created_at:
                      type: string
                      format: date-time
                      description: >-
                        Date and time when the resource was created. [RFC
                        3339-5](https://datatracker.ietf.org/doc/html/rfc3339#section-5.6),
                        [ISO8601
                        UTC](https://www.iso.org/iso-8601-date-and-time-format.html)
                    updated_at:
                      type: string
                      format: date-time
                      description: >-
                        Date and time when the resource was last updated. [RFC
                        3339-5](https://datatracker.ietf.org/doc/html/rfc3339#section-5.6),
                        [ISO8601
                        UTC](https://www.iso.org/iso-8601-date-and-time-format.html)
                    account_id:
                      title: Account unique identifier.
                      type: string
                      description: Account unique identifier.
                      format: uuid
                    account_group_id:
                      title: Account group unique identifier.
                      type: string
                      description: Account group unique identifier.
                      format: uuid
                    type:
                      type: string
                      description: >-
                        Type of the fee collection

                        * SERVICE_FEE - Service fee intake in a pre-defined
                        cadence (e.g. monthly)

                        * SERVICE_FEE_LIQUIDATION - Service fee intake as a
                        result of a Portfolio liquidation
                      enum:
                        - SERVICE_FEE
                        - SERVICE_FEE_LIQUIDATION
                    collection_amount:
                      type: string
                      pattern: ^[0-9]{1,9}(\.[0-9]{2})?$
                    processed_amount:
                      type: object
                      properties:
                        cash_balance:
                          type: string
                          pattern: ^[0-9]{1,9}(\.[0-9]{2})?$
                        sell_to_cover:
                          type: string
                          pattern: ^[0-9]{1,9}(\.[0-9]{2})?$
                    currency:
                      type: string
                      description: >-
                        Alphabetic three-letter [ISO
                        4217](https://en.wikipedia.org/wiki/ISO_4217) currency
                        code.

                        * EUR - Euro
                      enum:
                        - EUR
                      default: EUR
                    status:
                      type: string
                      description: >-
                        Status of the fee collection

                        * PROCESSING - Fee collection is in progress.

                        * FINALISED - Fees have been collected from the account
                        and the funds has been transferred to the client.

                        * CANCELLED - Fee collection has been cancelled.
                      enum:
                        - PROCESSING
                        - FINALISED
                        - CANCELLED
                    period_start:
                      type: string
                      format: date
                      description: >-
                        Start date of the fee collection period in YYYY-MM-DD
                        format. [RFC 3339, section
                        5.6](https://json-schema.org/draft/2020-12/json-schema-validation.html#RFC3339)
                        RFC 3339
                    period_end:
                      type: string
                      format: date
                      description: >-
                        End date of the fee collection period in YYYY-MM-DD
                        format. [RFC 3339, section
                        5.6](https://json-schema.org/draft/2020-12/json-schema-validation.html#RFC3339)
                        RFC 3339
                  required:
                    - id
                    - account_id
                    - account_group_id
                    - type
                    - collection_amount
                    - processed_amount
                    - currency
                    - status
                    - period_start
                    - period_end
                    - created_at
                    - updated_at
                  additionalProperties: false
                webhook_id:
                  title: Webhook ID
                  type: string
                  description: Webhook unique identifier.
                  format: uuid
              required:
                - id
                - created_at
                - type
                - object
                - webhook_id
              additionalProperties: false
            example:
              id: 38fc59d0-fc42-46ef-9512-824773219b2e
              created_at: '2023-08-19T13:06:57.820371265Z'
              type: FEE_COLLECTION.CREATED
              webhook_id: 1b097e06-8a14-4181-b72a-de0972a3c57b
              object:
                account_group_id: 999f7566-2ca3-4007-b99d-e501be8c7222
                account_id: 689f7566-2ca3-4007-b99d-e501be8c7783
                collection_amount: '12.41'
                created_at: '2022-11-30T14:16:22Z'
                currency: EUR
                id: d77e6924-9bb7-4db0-addc-404442258f4b
                period_start: '2022-11-01'
                period_end: '2022-11-30'
                processed_amount:
                  cash_balance: '0'
                  sell_to_cover: '0'
                status: PROCESSING
                type: SERVICE_FEE
                updated_at: '2022-11-30T14:16:22Z'
      responses:
        '200':
          description: Request has been processed successfully.
  Corporate action events:
    post:
      operationId: corporate_action_event
      summary: Corporate action events
      description: Corporate action events
      tags:
        - Corporate Actions
      requestBody:
        content:
          application/json:
            schema:
              title: Webhook - Corporate Action Notification
              type: object
              properties:
                id:
                  type: string
                  format: uuid
                  description: Event unique identifier
                created_at:
                  type: string
                  format: date-time
                  description: >-
                    Date and time when the event was created. [RFC
                    3339-5](https://datatracker.ietf.org/doc/html/rfc3339#section-5.6),
                    [ISO8601
                    UTC](https://www.iso.org/iso-8601-date-and-time-format.html)
                type:
                  type: string
                  description: Event type
                  enum:
                    - CORPORATE_ACTION.UPDATED
                object:
                  title: Corporate Action
                  description: >-
                    Object representing corporate action and its related
                    processing status
                  type: object
                  additionalProperties: false
                  properties:
                    id:
                      title: Corporate action unique identifier.
                      type: string
                      description: >-
                        Unique internal identifier assigned to a corporate
                        action by Upvest
                      format: uuid
                    instrument:
                      title: Instrument
                      description: Entity representing the financial instrument.
                      type: object
                      properties:
                        uuid:
                          description: Name of the instrument.
                          type: string
                          format: uuid
                        isin:
                          title: International securities identification number
                          type: string
                          description: >-
                            International securities identification number
                            defined by [ISO
                            6166](https://en.wikipedia.org/wiki/International_Securities_Identification_Number).
                          pattern: ^[A-Z]{2}[A-Z0-9]{9}[0-9]$
                        name:
                          description: Name of the instrument.
                          type: string
                    iso_type:
                      title: ISO type of corporate action
                      description: >-
                        The identifier of a corporate action type [ISO
                        Code](https://www.iso20022.org/15022/uhb/mt564-5-field-22f.htm)
                      type: string
                    name:
                      description: Name of the corporate action type
                      type: string
                    currency_denomination:
                      title: Currency Of Denomination
                      description: >-
                        Currency in which a financial instrument is currently
                        denominated.
                        [ISO](https://www.iso20022.org/15022/uhb/mt564-24-field-11a.htm).
                      type: string
                      enum:
                        - UNSPECIFIED
                        - EUR
                        - USD
                        - GBP
                        - SEK
                        - JPY
                        - CHF
                        - CNY
                        - AUD
                        - CAD
                        - HKD
                        - NOK
                        - NZD
                        - AED
                        - AFN
                        - ALL
                        - AMD
                        - ARS
                        - AZN
                        - BAM
                        - BDT
                        - BGN
                        - BHD
                        - BND
                        - BOB
                        - BRL
                        - BYR
                        - BZD
                        - CLP
                        - COP
                        - CRC
                        - CSD
                        - CZK
                        - DKK
                        - DOP
                        - DZD
                        - EEK
                        - EGP
                        - ETB
                        - GEL
                        - GTQ
                        - HNL
                        - HRK
                        - HUF
                        - IDR
                        - ILS
                        - INR
                        - IQD
                        - IRR
                        - ISK
                        - JMD
                        - JOD
                        - KES
                        - KGS
                        - KHR
                        - KRW
                        - KWD
                        - KZT
                        - LAK
                        - LBP
                        - LKR
                        - LTL
                        - LVL
                        - LYD
                        - MAD
                        - MKD
                        - MNT
                        - MOP
                        - MVR
                        - MXN
                        - MYR
                        - NIO
                        - NPR
                        - OMR
                        - PAB
                        - PEN
                        - PHP
                        - PKR
                        - PLN
                        - PYG
                        - QAR
                        - RON
                        - RSD
                        - RUB
                        - RWF
                        - SAR
                        - SGD
                        - SYP
                        - THB
                        - TJS
                        - TMT
                        - TND
                        - TRY
                        - TTD
                        - TWD
                        - UAH
                        - UYU
                        - UZS
                        - VEF
                        - VND
                        - XOF
                        - YER
                        - ZAR
                        - ZWL
                      default: UNSPECIFIED
                    mandatory_voluntary_indicator:
                      title: Mandatory-Voluntary indicator
                      description: >-
                        Indicates whether a corporate action is mandatory,
                        voluntary or choosable.
                      type: string
                      enum:
                        - UNSPECIFIED
                        - MANDATORY
                        - VOLUNTARY
                        - CHOOSABLE
                      default: UNSPECIFIED
                    announcement_status:
                      title: Announcement status
                      description: >-
                        Indicates the completeness of the announcement of a
                        corporate action
                        [ISO](https://www.iso20022.org/15022/uhb/mt564-7-field-25d.htm).
                      type: string
                      enum:
                        - UNSPECIFIED
                        - COMPLETE
                        - COMPLETE_UNCONFIRMED
                        - WITH_ENTITLEMENT
                        - PRELIMINARY_ANNOUNCEMENT_CONFIRMED
                        - PRELIMINARY_ANNOUNCEMENT_UNCONFIRMED
                      default: UNSPECIFIED
                    function_of_message:
                      title: Function of message
                      description: >-
                        The function of the message is specified in this field.
                        More details under [ISO
                        definitions](https://www.iso20022.org/15022/uhb/mt564-4-field-23g.htm).
                      type: string
                      enum:
                        - UNSPECIFIED
                        - ADDITIONAL_BUSINESS_PROCESS
                        - CANCELLATION_ADVICE
                        - NEW
                        - ELIGIBLE_BALANCE_NOTIFICATION
                        - REPLACEMENT
                        - REMINDER
                        - WITHDRAWAL
                      default: UNSPECIFIED
                    announcement_date:
                      title: Announcement date
                      description: >-
                        Date on which a company announces a corporate event.
                        [RFC
                        3339-5](https://datatracker.ietf.org/doc/html/rfc3339#section-5.6),
                        [ISO8601
                        UTC](https://www.iso.org/iso-8601-date-and-time-format.html)
                      type: string
                      format: date
                    ex_date:
                      title: Ex-Date
                      description: >-
                        The date up to which a particular share is eligible for
                        the upcoming corporate action. If buyers purchase a
                        share on the ex-date, they are not entitled to
                        participate in the upcoming corporate action; but the
                        seller still would be. [RFC
                        3339-5](https://datatracker.ietf.org/doc/html/rfc3339#section-5.6),
                        [ISO8601
                        UTC](https://www.iso.org/iso-8601-date-and-time-format.html)
                      type: string
                      format: date
                    record_date:
                      title: Record date
                      description: >-
                        Date on which the issuer reviews its records to
                        determine its authorised shareholders. The authorised
                        shareholders are those who are affected by the
                        respective corporate action. [RFC
                        3339-5](https://datatracker.ietf.org/doc/html/rfc3339#section-5.6),
                        [ISO8601
                        UTC](https://www.iso.org/iso-8601-date-and-time-format.html)
                      type: string
                      format: date
                    options:
                      type: array
                      items:
                        title: Option
                        description: Corporate action option.
                        type: object
                        properties:
                          option_number:
                            description: >-
                              Number to identify the available options for
                              corporate actions.
                            type: string
                          option_type:
                            title: Option type
                            description: >-
                              Type of option based on [ISO
                              CAOP](https://www.iso20022.org/15022/uhb/mt564-57-field-22f.htm).
                            type: string
                            enum:
                              - UNSPECIFIED
                              - ABSTAIN
                              - VOTE_AGAINST_MANAGEMENT
                              - BENEFICIAL_OWNER_BREAKDOWN_REQUEST
                              - BONUS_SHARE_PLAN
                              - BUY_UP
                              - CASH_AND_SECURITIES
                              - CASH
                              - CONSENT_AND_EXCHANGE
                              - CONSENT_DENIED
                              - CONSENT_GRANTED
                              - CONSENT_AND_TENDER
                              - EXERCISE
                              - LAPSE
                              - VOTE_WITH_MANAGEMENT
                              - RETAIN
                              - NO_ACTION
                              - NON_QUALIFIED_INVESTOR
                              - PROPOSED_RATE
                              - OTHER
                              - OVERSUBSCRIBE
                              - PROXY_CARD
                              - UNKNOWN_PROCEEDS
                              - QUALIFIED_INVESTOR
                              - SECURITIES_OPTION
                              - SELL_ENTITLEMENT
                              - SPLIT_INSTRUCTION
                            default: UNSPECIFIED
                          option_details:
                            title: Option Details
                            description: Details of the corporate action option.
                            type: object
                            properties:
                              default_option:
                                description: >-
                                  Indicates whether the option is the default
                                  option.
                                type: string
                                enum:
                                  - 'TRUE'
                                  - 'FALSE'
                              market_deadline:
                                title: Market deadline
                                description: >-
                                  Issuer or issuer's agent deadline to respond,
                                  including an election instruction to an
                                  outstanding offer or privilege. [RFC
                                  3339-5](https://datatracker.ietf.org/doc/html/rfc3339#section-5.6),
                                  [ISO8601
                                  UTC](https://www.iso.org/iso-8601-date-and-time-format.html)
                                type: string
                                format: date
                              client_deadline:
                                title: Client deadline
                                description: >-
                                  Client deadline to respond to an outstanding
                                  offer or privilege. [RFC
                                  3339-5](https://datatracker.ietf.org/doc/html/rfc3339#section-5.6),
                                  [ISO8601
                                  UTC](https://www.iso.org/iso-8601-date-and-time-format.html)
                                type: string
                                format: date
                              action_period_start:
                                description: >-
                                  Start of the period during which the specified
                                  option, or all options of the event, remains
                                  valid, for example, offer period.
                                type: string
                                format: date
                              action_period_end:
                                description: >-
                                  End of the period during which the specified
                                  option, or all options of the event, remains
                                  valid, for example, offer period.
                                type: string
                                format: date
                              minimum_quantity:
                                description: >-
                                  Minimum quantity of financial instrument that
                                  can be instructed.
                                type: string
                              minimum_multiple_quantity:
                                description: >-
                                  Minimum of multiple financial instruments that
                                  can be instructed.
                                type: string
                          movements:
                            type: array
                            items:
                              title: Movement
                              description: >-
                                Movement information for corporate action
                                option.
                              type: object
                              properties:
                                movement_type:
                                  title: Movement type
                                  description: Type of the movement.
                                  type: string
                                  enum:
                                    - UNSPECIFIED
                                    - CASH
                                    - SECURITIES_OPTION
                                  default: UNSPECIFIED
                                movement_details:
                                  title: Movement details
                                  description: Details of the movement.
                                  type: object
                                  properties:
                                    credit_debit_factor:
                                      description: >-
                                        Indicates whether the movement is a
                                        credit or a debit. DEPRECATED: Use
                                        credit_debit_indicator instead.
                                      type: string
                                      enum:
                                        - UNSPECIFIED
                                        - CREDIT
                                        - DEBIT
                                      default: UNSPECIFIED
                                      deprecated: true
                                    credit_debit_indicator:
                                      description: >-
                                        Indicates whether the movement is a
                                        credit or a debit.
                                      type: string
                                      enum:
                                        - UNSPECIFIED
                                        - CREDIT
                                        - DEBIT
                                      default: UNSPECIFIED
                                    instrument:
                                      title: Instrument
                                      description: >-
                                        Entity representing the financial
                                        instrument.
                                      type: object
                                      properties:
                                        uuid:
                                          description: Name of the instrument.
                                          type: string
                                          format: uuid
                                        isin:
                                          title: >-
                                            International securities identification
                                            number
                                          type: string
                                          description: >-
                                            International securities identification
                                            number defined by [ISO
                                            6166](https://en.wikipedia.org/wiki/International_Securities_Identification_Number).
                                          pattern: ^[A-Z]{2}[A-Z0-9]{9}[0-9]$
                                        name:
                                          description: Name of the instrument.
                                          type: string
                                    ratio:
                                      title: Ratio
                                      description: >-
                                        The ratio is the numerical comparison
                                        between instruments and can be
                                        calculated in two different ways: 

                                        * ADEX = Additional for Existing
                                        Securities. Example: You hold 10 units
                                        and the ratio is 1/5. 40 additional
                                        units are added. 

                                        * NEWO = New to Old. Example: You hold
                                        1000 units and the ratio is 3/11. 1000
                                        old units are removed and 3666.6 are
                                        added.
                                      type: object
                                      properties:
                                        debit_factor:
                                          description: Amount to be decreased.
                                          type: string
                                        credit_factor:
                                          description: Amount to be increased.
                                          type: string
                                    payment_date:
                                      title: Payment date
                                      description: >-
                                        Date on which the movement is due to
                                        take place (cash and/or securities).
                                        [RFC
                                        3339-5](https://datatracker.ietf.org/doc/html/rfc3339#section-5.6),
                                        [ISO8601
                                        UTC](https://www.iso.org/iso-8601-date-and-time-format.html)
                                      type: string
                                      format: date
                                    gross_dividend:
                                      description: >-
                                        String value, which represents a
                                        monetary amount. Amount of the cash
                                        dividend per equity before deductions or
                                        allowances.
                                      type: string
                                    offer_price_received:
                                      description: >-
                                        String value that represents a monetary
                                        amount. Generic cash price that the
                                        holder of the underlying security
                                        receives per product.
                                      type: string
                                    withholding_tax:
                                      title: Withholding Tax rate
                                      description: Withholding tax rate.
                                      type: string
                                    currency:
                                      type: string
                                      description: >-
                                        Alphabetic three-letter [ISO
                                        4217](https://en.wikipedia.org/wiki/ISO_4217)
                                        currency code.

                                        * EUR - Euro
                                      enum:
                                        - EUR
                                      default: EUR
                                    rounding_indicator:
                                      title: >-
                                        Indicator for the rounding approach for
                                        the disposition of fractions.
                                      type: string
                                      description: >-
                                        Indicator for the rounding approach for
                                        the disposition of fractions.

                                        * BUYU - Buy securities up to the next
                                        whole number.

                                        * CINL - Receive cash instead of
                                        fractions.

                                        * DIST - Accept distribution of
                                        fractions in the form of securities.

                                        * RDDN - Rounds down the entitlement to
                                        the last full unit/minimum nominal
                                        quantity, fractions are discarded.

                                        * RDUP - Round up to the next full
                                        unit/minimum nominal quantity at no
                                        cost.

                                        * STAN - If the fraction is greater than
                                        or equal to 0.5 of the resulting
                                        security, round up, otherwise round down
                                        as specified in the respective RDUP and
                                        RDDN codes.

                                        * UKWN - The characteristics of the
                                        disposition of fractions are unknown.
                                      enum:
                                        - BUYU
                                        - CINL
                                        - DIST
                                        - RDDN
                                        - RDUP
                                        - STAN
                                        - UKWN
                            minItems: 1
                            description: Movements in corporate action option.
                      minItems: 1
                      description: Available corporate action options.
                    additional_text:
                      title: Additional text
                      description: >-
                        Provides additional information or specifies in more
                        detail the content of a message.
                      type: string
                  required:
                    - id
                    - iso_type
                    - instrument
                webhook_id:
                  title: Webhook ID
                  type: string
                  description: Webhook unique identifier.
                  format: uuid
              required:
                - id
                - created_at
                - type
                - object
                - webhook_id
              additionalProperties: false
            example:
              id: d0cb44d6-d61f-4272-b0f5-a8c7349b8b9a
              created_at: '2024-09-05T12:03:43.201937702Z'
              type: CORPORATE_ACTION.UPDATED
              object:
                id: b96b1ee7-d491-43eb-b5e4-4833af9c9c2f
                instrument:
                  uuid: 48b798b7-3a62-4f30-8307-ee94d35b21b7
                  isin: FR0010524777
                  name: Lyxor MSCI New Energy ESG Filtered (DR) ETF
                name: CASH_DIVIDEND
                iso_type: DVCA
                currency_denomination: EUR
                mandatory_voluntary_indicator: MANDATORY
                announcement_status: PRELIMINARY_ANNOUNCEMENT_CONFIRMED
                function_of_message: NEW
                announcement_date: '2023-11-09'
                ex_date: '2023-12-04'
                record_date: '2023-12-05'
                options:
                  - option_number: '001'
                    option_type: CASH
                    option_details:
                      default_option: 'TRUE'
                    movements:
                      - movement_type: CASH
                        movement_details:
                          credit_debit_indicator: CREDIT
                          payment_date: '2023-12-10'
                          gross_dividend: '0.54'
                          withholding_tax: '0.30'
                          currency: EUR
              webhook_id: dbebe0ac-a407-4d43-a404-b8fe846eb691
      responses:
        '200':
          description: Request has been processed successfully.
components:
  securitySchemes:
    oauth-client-credentials:
      type: oauth2
      flows:
        clientCredentials:
          tokenUrl: https://sandbox.upvest.co/auth/token
          scopes:
            accounts:read: Read accounts and account groups
            accounts:admin: Create/update/delete accounts and account groups
            webhooks:admin: Create/update/delete webhooks
            webhooks:read: Read webhooks
            files:read: Read files metadata
            orders:admin: Create/update/delete orders
            orders:read: Read orders
            users:admin: Create/update/delete users
            users:read: Read users
            checks:admin: Create checks
            checks:read: Read checks
            positions:read: Read positions
            reference_accounts:admin: Create/update/delete reference accounts
            reference_accounts:read: Read reference accounts
            mandates:admin: Create/update/delete mandates
            mandates:read: Read mandates
            payments:admin: Payins and withdrawal operations
            payments:read: Payins and withdrawal read operations
            topups:admin: Top-ups operations
            topups:read: Top-ups read operations
            credit_fundings:read: Credit Fundings read operations
            securities_transfers:read: Securities Transfers read transfers
            securities_transfers:admin: Securities Transfers operations
            reports:read: Read reports
            reports:admin: Create reports
            taxes:read: Read tax residencies
            taxes:admin: Modify tax residencies and tax exemptions
            transactions:read: Read cash and securities transactions
            instruments:read: Read instruments
            fees:admin: Create and read fee operations
            fees:read: Read fee operations
            portfolios:read: Read portfolios
            portfolios:admin: Modify portfolios
            valuations:read: Read valuations
            account_liquidations:read: Read accounts liquidations
            account_liquidations:admin: Trigger/read/cancel accounts liquidations
            account_returns:read: Read accounts returns
            virtual_cash_balances:admin: Virtual cash balances
            savings_plans:read: Read savings plans
            savings_plans:admin: Create/read savings plans
            prices:read: Read instrument prices,
            tests:admin: Testing related operations
  headers:
    upvest-request-id:
      required: true
      schema:
        type: string
        format: uuid
        example: 169ae4c7-ebd7-4041-94da-25369653eba7
  parameters:
    apiVersion:
      name: upvest-api-version
      in: header
      required: false
      schema:
        type: string
        enum:
          - '1'
        default: '1'
        example: '1'
      description: 'Upvest API version (Note: Do not include quotation marks)'
    authorization:
      name: authorization
      in: header
      description: |
        Bearer (access) token from the OAuth flow with correct scopes.
        https://datatracker.ietf.org/doc/html/rfc6750
      required: true
      schema:
        type: string
        pattern: ^Bearer [a-zA-Z0-9\-\._~+/]*=*
        example: Bearer c2VjcmV0Cg==
    clientID:
      name: upvest-client-id
      in: header
      description: Tenant Client ID
      required: true
      schema:
        type: string
        format: uuid
        example: ebabcf4d-61c3-4942-875c-e265a7c2d062
    signature:
      name: signature
      in: header
      required: true
      schema:
        type: string
      description: >-
        https://tools.ietf.org/id/draft-ietf-httpbis-message-signatures-01.html#name-the-signature-http-header
    signatureInput:
      name: signature-input
      in: header
      required: true
      schema:
        type: string
      description: >-
        https://tools.ietf.org/id/draft-ietf-httpbis-message-signatures-01.html#name-the-signature-input-http-he
    idempotencyKey:
      name: idempotency-key
      in: header
      required: true
      schema:
        type: string
        format: uuid
        pattern: >-
          ^[0-9a-fA-F]{8}-?[0-9a-fA-F]{4}-?[0-5][0-9a-fA-F]{3}-?[089abAB][0-9a-fA-F]{3}-?[0-9a-fA-F]{12}$
        example: ccb07f42-4104-44ad-8e1f-c660bb7b269c
      description: >
        A UUID to be used as an idempotency key.  This prevents a duplicate
        request from being replayed.

        https://docs.upvest.co/documentation/concepts/api_concepts/idempotency
    limit:
      name: limit
      in: query
      schema:
        type: integer
        format: int32
        default: 100
        minimum: 0
        maximum: 1000
      allowEmptyValue: true
      description: >-
        Use the `limit` argument to specify the maximum number of items
        returned.
    offset:
      name: offset
      in: query
      schema:
        type: integer
        minimum: 0
        format: int32
      allowEmptyValue: true
      description: >-
        Use the `offset` argument to specify where in the list of results to
        start when returning items for a particular query.
    order:
      name: order
      in: query
      required: false
      schema:
        type: string
        enum:
          - ASC
          - DESC
        default: ASC
      description: >-
        Sort order of the result list if the `sort` parameter is specified. Use
        `ASC` for ascending or `DESC` for descending sort order.
    order_asc:
      name: order
      in: query
      required: false
      schema:
        type: string
        enum:
          - ASC
        default: ASC
      description: >-
        Sort order of the result list if the `sort` parameter is specified. By
        default, only ASC for ascending sort.
    folder:
      name: folder
      in: path
      description: Files folder name
      required: true
      schema:
        type: string
        pattern: ^[a-z0-9-_\.]{1,32}$
        example: booking_references
    fileName:
      name: file_name
      in: path
      description: Filename
      required: true
      schema:
        type: string
        pattern: ^[a-z0-9-_\.]{1,255}$
        example: list.txt
    webhookID:
      name: webhook_id
      in: path
      description: Webhook identifier
      required: true
      schema:
        title: Webhook ID
        type: string
        description: Webhook unique identifier.
        format: uuid
    userID:
      name: user_id
      in: path
      required: true
      schema:
        title: User unique identifier.
        type: string
        description: User unique identifier.
        format: uuid
    userIDOptional:
      name: user_id
      in: query
      required: false
      schema:
        title: User unique identifier.
        type: string
        description: User unique identifier.
        format: uuid
    identifierID:
      name: identifier_id
      in: path
      required: true
      schema:
        title: Unique identifier for the user's national ID.
        type: string
        description: Unique identifier for the user's national ID.
        format: uuid
    feeCollectionID:
      name: fee_collection_id
      in: path
      required: true
      schema:
        title: Fee collection unique identifier.
        type: string
        description: Fee collection unique identifier.
        format: uuid
    accountID:
      name: account_id
      in: path
      required: true
      schema:
        title: Account unique identifier.
        type: string
        description: Account unique identifier.
        format: uuid
    accountGroupID:
      name: account_group_id
      in: path
      required: true
      schema:
        title: Account group unique identifier.
        type: string
        description: Account group unique identifier.
        format: uuid
    accountGroupIDOptional:
      name: account_group_id
      in: query
      required: false
      schema:
        title: Account group unique identifier.
        type: string
        description: Account group unique identifier.
        format: uuid
    accountIDOptional:
      name: account_id
      in: query
      required: false
      schema:
        title: Account unique identifier.
        type: string
        description: Account unique identifier.
        format: uuid
    dateCreatedFrom:
      name: date_created_from
      in: query
      required: false
      schema:
        type: string
        format: date-time
        title: Date in YYYY-MM-DD format. RFC 3339, section 5.6
      description: date range from
      example: '2022-10-14T10:10:10Z'
    dateCreatedTo:
      name: date_created_to
      in: query
      required: false
      schema:
        type: string
        format: date-time
        title: Date in YYYY-MM-DD format. RFC 3339, section 5.6
      description: date range to
      example: '2022-10-14T10:10:10Z'
    status:
      name: status
      in: query
      required: false
      schema:
        type: string
        enum:
          - NEW
          - PROCESSING
          - FILLED
          - CANCELLED
        default: FILLED
      description: |-
        The execution status of the order.
        * NEW - 
        * PROCESSING - 
        * FILLED - 
        * CANCELLED - 
    securitiesTransferStatusOptional:
      name: status
      in: query
      required: false
      schema:
        type: string
        enum:
          - NEW
          - PROCESSING
          - CLIENT_RESOLUTION_REQUIRED
          - CANCELLED
          - SETTLED
      description: >-
        Status of the securities transfer 

        * NEW - Securities transfer is created but not started processing. 

        * PROCESSING - Securities transfer is in processing. 

        * SETTLED - Securities transfer was successfully settled. 

        * CANCELLED - Securities transfer was cancelled.  

        * CLIENT_RESOLUTION_REQUIRED - Securities transfer requires client
        resolution
    referenceAccountID:
      name: reference_account_id
      in: path
      required: true
      schema:
        title: Reference account unique identifier.
        type: string
        description: Reference account unique identifier.
        format: uuid
    mandateID:
      name: mandate_id
      in: path
      required: true
      schema:
        title: Direct Debit Mandate unique identifier.
        type: string
        description: Direct Debit Mandate unique identifier.
        format: uuid
    directDebitID:
      name: direct_debit_id
      in: path
      required: true
      schema:
        title: Direct debit funding request unique identifier
        type: string
        description: Direct debit funding request unique identifier
        format: uuid
    topupID:
      name: topup_id
      in: path
      required: true
      schema:
        title: Top up request unique identifier.
        type: string
        description: Top up request unique identifier.
        format: uuid
    creditFundingID:
      name: credit_funding_id
      in: path
      required: true
      schema:
        title: Credit Funding request unique identifier
        type: string
        description: Credit Funding request unique identifier
        format: uuid
    virtualBankAccountID:
      name: virtual_bank_account_id
      in: path
      required: true
      schema:
        title: Virtual bank account request unique identifier.
        type: string
        description: Virtual bank account request unique identifier.
        format: uuid
    checkID:
      name: check_id
      in: path
      required: true
      schema:
        title: User Check unique identifier
        type: string
        description: User Check unique identifier.
        format: uuid
    instrumentID:
      name: instrument_id
      in: path
      required: true
      schema:
        title: Instrument unique identifier
        description: Instrument unique identifier.
        oneOf:
          - title: >-
              International securities identification number with 'isin:' URN
              namespace
            type: string
            description: >-
              International securities identification number defined by [ISO
              6166](https://en.wikipedia.org/wiki/International_Securities_Identification_Number),
              prefixed with a 'isin:' [URN
              scheme](https://datatracker.ietf.org/doc/html/rfc8141).
            pattern: ^(urn:)?isin:[A-Z]{2}[A-Z0-9]{9}[0-9]$
          - title: Universally Unique IDentifier (UUID) with 'uuid:' URN scheme
            type: string
            description: >-
              Universally Unique IDentifier (UUID) with 'uuid:' URN namespace,
              defined by [RFC
              4122](https://datatracker.ietf.org/doc/html/rfc4122).
            pattern: >-
              ^(urn:)?uuid:[0-9a-fA-F]{8}-?[0-9a-fA-F]{4}-?[0-5][0-9a-fA-F]{3}-?[089abAB][0-9a-fA-F]{3}-?[0-9a-fA-F]{12}$
    preorderID:
      name: preorder_id
      description: ''
      in: path
      required: true
      schema:
        title: Preorder unique identifier
        type: string
        format: uuid
        description: The ID of the preorder
    orderID:
      name: order_id
      description: ''
      in: path
      required: true
      schema:
        title: Order unique identifier
        type: string
        format: uuid
    executionID:
      name: execution_id
      description: ''
      in: path
      required: true
      schema:
        title: Order execution unique identifier
        type: string
        format: uuid
    reportID:
      name: report_id
      in: path
      required: true
      schema:
        title: Report unique identifier.
        type: string
        description: Report unique identifier.
        format: uuid
    withdrawalID:
      name: withdrawal_id
      in: path
      required: true
      schema:
        title: Cash withdrawal unique identifier
        type: string
        description: Cash withdrawal unique identifier
        format: uuid
    allocationID:
      name: allocation_id
      in: path
      required: true
      schema:
        title: Portfolio allocation unique identifier
        type: string
        format: uuid
    portfolioExecutionID:
      name: portfolio_execution_id
      in: path
      required: true
      schema:
        title: Portfolio rebalancing execution unique identifier
        type: string
        format: uuid
    portfolioOrderID:
      name: portfolio_order_id
      in: path
      required: true
      schema:
        title: Portfolios order unique identifier
        type: string
        format: uuid
    accountLiquidationID:
      name: account_liquidation_id
      in: path
      required: true
      schema:
        title: Account liquidation unique identifier
        type: string
        format: uuid
    virtualCashDecreaseID:
      name: virtual_cash_decrease_id
      in: path
      required: true
      schema:
        title: Virtual cash unique identifier
        type: string
        description: Virtual cash unique identifier
        format: uuid
    savingsPlanID:
      name: savings_plan_id
      in: path
      required: true
      schema:
        title: Savings plan unique identifier
        type: string
        format: uuid
    savingsPlanExecutionID:
      name: savings_plan_execution_id
      in: path
      required: true
      schema:
        title: Savings plan execution unique identifier
        type: string
        format: uuid
    venueID:
      name: venue_id
      in: path
      required: true
      schema:
        title: Venue unique identifier.
        type: string
        description: Venue unique identifier.
        format: uuid
    currency:
      name: currency
      in: path
      required: true
      schema:
        type: string
        description: >-
          Alphabetic three-letter [ISO
          4217](https://en.wikipedia.org/wiki/ISO_4217) currency code.

          * EUR - Euro 

          * GBP - Great British Pound
        enum:
          - EUR
          - GBP
    taxExemptionID:
      name: tax_exemption_id
      description: ''
      in: path
      required: true
      schema:
        title: Tax Exemption Unique Identifier
        type: string
        description: Tax Exemption Unique Identifier
        format: uuid
    taxWrapperID:
      name: tax_wrapper_id
      description: ''
      in: path
      required: true
      schema:
        title: Tax Wrapper Unique Identifier
        type: string
        description: Tax wrapper unique identifier
        format: uuid
    securitiesTransferID:
      name: securities_transfer_id
      in: path
      required: true
      schema:
        title: Securities transfer request unique identifier.
        type: string
        description: Securities transfer request unique identifier.
        format: uuid
  responses:
    WebhookNoContentResponse:
      description: Request has been processed successfully.
    ResponseNoContent:
      description: Request has been processed successfully.
      headers:
        upvest-request-id:
          required: true
          schema:
            type: string
            format: uuid
            example: 169ae4c7-ebd7-4041-94da-25369653eba7
    ResponseAccepted:
      description: >-
        The request has been successfully accepted and will be processed
        asynchronously.
      headers:
        upvest-request-id:
          required: true
          schema:
            type: string
            format: uuid
            example: 169ae4c7-ebd7-4041-94da-25369653eba7
    ResponseSingleError:
      description: |-
        Shared error response to be used for all errors returned from the API.

        We follow the generic parts of RFC 7807 "Problem Details for HTTP APIs"
        https://datatracker.ietf.org/doc/html/rfc7807
      content:
        application/problem+json:
          schema:
            title: Error
            type: object
            description: ''
            properties:
              type:
                type: string
                description: URL to a document describing the error condition.
              status:
                type: integer
                description: >-
                  Transmission of the HTTP status code so that all information
                  can be found in one place, but also to correct changes in the
                  status code due to the use of proxy servers.
              title:
                type: string
                description: >-
                  A short, human-readable title for the general error type; the
                  title should not change for given types.
              detail:
                type: string
                description: A human-readable description of the specific error.
              instance:
                type: string
                description: >-
                  This optional key may be present, with a unique URI for the
                  specific error; this will often point to an error log for that
                  specific response.
              request_id:
                type: string
                description: Correlation ID for the original request.
            required:
              - type
              - status
            additionalProperties: false
    ResponseError400:
      description: Bad Request. The incoming request had a malformed parameter/object.
      headers:
        upvest-request-id:
          required: true
          schema:
            type: string
            format: uuid
            example: 169ae4c7-ebd7-4041-94da-25369653eba7
      content:
        application/problem+json:
          schema:
            title: Error
            type: object
            description: ''
            properties:
              type:
                type: string
                description: URL to a document describing the error condition.
              status:
                type: integer
                description: >-
                  Transmission of the HTTP status code so that all information
                  can be found in one place, but also to correct changes in the
                  status code due to the use of proxy servers.
              title:
                type: string
                description: >-
                  A short, human-readable title for the general error type; the
                  title should not change for given types.
              detail:
                type: string
                description: A human-readable description of the specific error.
              instance:
                type: string
                description: >-
                  This optional key may be present, with a unique URI for the
                  specific error; this will often point to an error log for that
                  specific response.
              request_id:
                type: string
                description: Correlation ID for the original request.
            required:
              - type
              - status
            additionalProperties: false
          example:
            status: 400
            type: bad_request
    ResponseError401:
      description: Unauthorized. The caller has not been authenticated.
      headers:
        upvest-request-id:
          required: true
          schema:
            type: string
            format: uuid
            example: 169ae4c7-ebd7-4041-94da-25369653eba7
      content:
        application/problem+json:
          schema:
            title: Error
            type: object
            description: ''
            properties:
              type:
                type: string
                description: URL to a document describing the error condition.
              status:
                type: integer
                description: >-
                  Transmission of the HTTP status code so that all information
                  can be found in one place, but also to correct changes in the
                  status code due to the use of proxy servers.
              title:
                type: string
                description: >-
                  A short, human-readable title for the general error type; the
                  title should not change for given types.
              detail:
                type: string
                description: A human-readable description of the specific error.
              instance:
                type: string
                description: >-
                  This optional key may be present, with a unique URI for the
                  specific error; this will often point to an error log for that
                  specific response.
              request_id:
                type: string
                description: Correlation ID for the original request.
            required:
              - type
              - status
            additionalProperties: false
          example:
            status: 401
            type: unauthorized
    ResponseError403:
      description: >-
        Forbidden. The caller has been authenticated but is not allowed to take
        the requested action.
      headers:
        upvest-request-id:
          required: true
          schema:
            type: string
            format: uuid
            example: 169ae4c7-ebd7-4041-94da-25369653eba7
      content:
        application/problem+json:
          schema:
            title: Error
            type: object
            description: ''
            properties:
              type:
                type: string
                description: URL to a document describing the error condition.
              status:
                type: integer
                description: >-
                  Transmission of the HTTP status code so that all information
                  can be found in one place, but also to correct changes in the
                  status code due to the use of proxy servers.
              title:
                type: string
                description: >-
                  A short, human-readable title for the general error type; the
                  title should not change for given types.
              detail:
                type: string
                description: A human-readable description of the specific error.
              instance:
                type: string
                description: >-
                  This optional key may be present, with a unique URI for the
                  specific error; this will often point to an error log for that
                  specific response.
              request_id:
                type: string
                description: Correlation ID for the original request.
            required:
              - type
              - status
            additionalProperties: false
          example:
            status: 403
            type: forbidden
    ResponseError404:
      description: Not Found. The requested resource could not be found.
      headers:
        upvest-request-id:
          required: true
          schema:
            type: string
            format: uuid
            example: 169ae4c7-ebd7-4041-94da-25369653eba7
      content:
        application/problem+json:
          schema:
            title: Error
            type: object
            description: ''
            properties:
              type:
                type: string
                description: URL to a document describing the error condition.
              status:
                type: integer
                description: >-
                  Transmission of the HTTP status code so that all information
                  can be found in one place, but also to correct changes in the
                  status code due to the use of proxy servers.
              title:
                type: string
                description: >-
                  A short, human-readable title for the general error type; the
                  title should not change for given types.
              detail:
                type: string
                description: A human-readable description of the specific error.
              instance:
                type: string
                description: >-
                  This optional key may be present, with a unique URI for the
                  specific error; this will often point to an error log for that
                  specific response.
              request_id:
                type: string
                description: Correlation ID for the original request.
            required:
              - type
              - status
            additionalProperties: false
          example:
            status: 404
            type: not_found
    ResponseError405:
      description: >-
        Method Not Allowed. The requested method is not allowed on the requested
        resource.
      headers:
        upvest-request-id:
          required: true
          schema:
            type: string
            format: uuid
            example: 169ae4c7-ebd7-4041-94da-25369653eba7
      content:
        application/problem+json:
          schema:
            title: Error
            type: object
            description: ''
            properties:
              type:
                type: string
                description: URL to a document describing the error condition.
              status:
                type: integer
                description: >-
                  Transmission of the HTTP status code so that all information
                  can be found in one place, but also to correct changes in the
                  status code due to the use of proxy servers.
              title:
                type: string
                description: >-
                  A short, human-readable title for the general error type; the
                  title should not change for given types.
              detail:
                type: string
                description: A human-readable description of the specific error.
              instance:
                type: string
                description: >-
                  This optional key may be present, with a unique URI for the
                  specific error; this will often point to an error log for that
                  specific response.
              request_id:
                type: string
                description: Correlation ID for the original request.
            required:
              - type
              - status
            additionalProperties: false
          example:
            status: 405
            type: method_not_allowed
    ResponseError406:
      description: >-
        Not Acceptable. The resource does not have a current representation that
        would be acceptable to the user agent. "Accept" header defined
        unsupported value.
      headers:
        upvest-request-id:
          required: true
          schema:
            type: string
            format: uuid
            example: 169ae4c7-ebd7-4041-94da-25369653eba7
      content:
        application/problem+json:
          schema:
            title: Error
            type: object
            description: ''
            properties:
              type:
                type: string
                description: URL to a document describing the error condition.
              status:
                type: integer
                description: >-
                  Transmission of the HTTP status code so that all information
                  can be found in one place, but also to correct changes in the
                  status code due to the use of proxy servers.
              title:
                type: string
                description: >-
                  A short, human-readable title for the general error type; the
                  title should not change for given types.
              detail:
                type: string
                description: A human-readable description of the specific error.
              instance:
                type: string
                description: >-
                  This optional key may be present, with a unique URI for the
                  specific error; this will often point to an error log for that
                  specific response.
              request_id:
                type: string
                description: Correlation ID for the original request.
            required:
              - type
              - status
            additionalProperties: false
          example:
            status: 406
            type: not_acceptable
    ResponseError409:
      description: >-
        Conflict. An operation is not available for the current state of the
        resource.
      headers:
        upvest-request-id:
          required: true
          schema:
            type: string
            format: uuid
            example: 169ae4c7-ebd7-4041-94da-25369653eba7
      content:
        application/problem+json:
          schema:
            title: Error
            type: object
            description: ''
            properties:
              type:
                type: string
                description: URL to a document describing the error condition.
              status:
                type: integer
                description: >-
                  Transmission of the HTTP status code so that all information
                  can be found in one place, but also to correct changes in the
                  status code due to the use of proxy servers.
              title:
                type: string
                description: >-
                  A short, human-readable title for the general error type; the
                  title should not change for given types.
              detail:
                type: string
                description: A human-readable description of the specific error.
              instance:
                type: string
                description: >-
                  This optional key may be present, with a unique URI for the
                  specific error; this will often point to an error log for that
                  specific response.
              request_id:
                type: string
                description: Correlation ID for the original request.
            required:
              - type
              - status
            additionalProperties: false
          example:
            status: 409
            type: conflict
    ResponseError422:
      description: >-
        Unprocessable Entity. The syntax of request is correct but server can't
        process it due a semantic error.
      headers:
        upvest-request-id:
          required: true
          schema:
            type: string
            format: uuid
            example: 169ae4c7-ebd7-4041-94da-25369653eba7
      content:
        application/problem+json:
          schema:
            title: Error
            type: object
            description: ''
            properties:
              type:
                type: string
                description: URL to a document describing the error condition.
              status:
                type: integer
                description: >-
                  Transmission of the HTTP status code so that all information
                  can be found in one place, but also to correct changes in the
                  status code due to the use of proxy servers.
              title:
                type: string
                description: >-
                  A short, human-readable title for the general error type; the
                  title should not change for given types.
              detail:
                type: string
                description: A human-readable description of the specific error.
              instance:
                type: string
                description: >-
                  This optional key may be present, with a unique URI for the
                  specific error; this will often point to an error log for that
                  specific response.
              request_id:
                type: string
                description: Correlation ID for the original request.
            required:
              - type
              - status
            additionalProperties: false
          example:
            status: 422
            type: unprocessable_entity
    ResponseError429:
      description: >-
        Too Many Requests. The caller has exceeded their quota for the time
        period and has been throttled.
      headers:
        upvest-request-id:
          required: true
          schema:
            type: string
            format: uuid
            example: 169ae4c7-ebd7-4041-94da-25369653eba7
      content:
        application/problem+json:
          schema:
            title: Error
            type: object
            description: ''
            properties:
              type:
                type: string
                description: URL to a document describing the error condition.
              status:
                type: integer
                description: >-
                  Transmission of the HTTP status code so that all information
                  can be found in one place, but also to correct changes in the
                  status code due to the use of proxy servers.
              title:
                type: string
                description: >-
                  A short, human-readable title for the general error type; the
                  title should not change for given types.
              detail:
                type: string
                description: A human-readable description of the specific error.
              instance:
                type: string
                description: >-
                  This optional key may be present, with a unique URI for the
                  specific error; this will often point to an error log for that
                  specific response.
              request_id:
                type: string
                description: Correlation ID for the original request.
            required:
              - type
              - status
            additionalProperties: false
          example:
            status: 429
            type: too_many_requests
    ResponseError500:
      description: Internal Server Error. The service encountered an unexpected error.
      headers:
        upvest-request-id:
          required: true
          schema:
            type: string
            format: uuid
            example: 169ae4c7-ebd7-4041-94da-25369653eba7
      content:
        application/problem+json:
          schema:
            title: Error
            type: object
            description: ''
            properties:
              type:
                type: string
                description: URL to a document describing the error condition.
              status:
                type: integer
                description: >-
                  Transmission of the HTTP status code so that all information
                  can be found in one place, but also to correct changes in the
                  status code due to the use of proxy servers.
              title:
                type: string
                description: >-
                  A short, human-readable title for the general error type; the
                  title should not change for given types.
              detail:
                type: string
                description: A human-readable description of the specific error.
              instance:
                type: string
                description: >-
                  This optional key may be present, with a unique URI for the
                  specific error; this will often point to an error log for that
                  specific response.
              request_id:
                type: string
                description: Correlation ID for the original request.
            required:
              - type
              - status
            additionalProperties: false
          example:
            status: 500
            type: internal_server_error
    ResponseError503:
      description: >-
        Service Unavailable. The service handling for this request cannot be
        reached at this time.
      headers:
        upvest-request-id:
          required: true
          schema:
            type: string
            format: uuid
            example: 169ae4c7-ebd7-4041-94da-25369653eba7
      content:
        application/problem+json:
          schema:
            title: Error
            type: object
            description: ''
            properties:
              type:
                type: string
                description: URL to a document describing the error condition.
              status:
                type: integer
                description: >-
                  Transmission of the HTTP status code so that all information
                  can be found in one place, but also to correct changes in the
                  status code due to the use of proxy servers.
              title:
                type: string
                description: >-
                  A short, human-readable title for the general error type; the
                  title should not change for given types.
              detail:
                type: string
                description: A human-readable description of the specific error.
              instance:
                type: string
                description: >-
                  This optional key may be present, with a unique URI for the
                  specific error; this will often point to an error log for that
                  specific response.
              request_id:
                type: string
                description: Correlation ID for the original request.
            required:
              - type
              - status
            additionalProperties: false
          example:
            status: 503
            type: method_not_allowed
    ResponseError504:
      description: Gateway Timeout. The service gateway has reached its internal timeout.
      headers:
        upvest-request-id:
          required: true
          schema:
            type: string
            format: uuid
            example: 169ae4c7-ebd7-4041-94da-25369653eba7
      content:
        application/problem+json:
          schema:
            title: Error
            type: object
            description: ''
            properties:
              type:
                type: string
                description: URL to a document describing the error condition.
              status:
                type: integer
                description: >-
                  Transmission of the HTTP status code so that all information
                  can be found in one place, but also to correct changes in the
                  status code due to the use of proxy servers.
              title:
                type: string
                description: >-
                  A short, human-readable title for the general error type; the
                  title should not change for given types.
              detail:
                type: string
                description: A human-readable description of the specific error.
              instance:
                type: string
                description: >-
                  This optional key may be present, with a unique URI for the
                  specific error; this will often point to an error log for that
                  specific response.
              request_id:
                type: string
                description: Correlation ID for the original request.
            required:
              - type
              - status
            additionalProperties: false
          example:
            status: 504
            type: gateway_timeout
