> ## Documentation Index
> Fetch the complete documentation index at: https://docs.tesouro.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Mark a payable as partially paid

> Mark a payable as partially paid.

If the payable is partially paid, its status is moved to `partially_paid`. The value of the `amount_paid` field must be
 the sum of all payments made, not only the last one.

Notes:
- This endpoint can be used for payables in the `waiting_to_be_paid` status.
- The `amount_paid` must be greater than 0 and less than the total payable amount specified by the `amount` field.
- You can use this endpoint multiple times for the same payable to reflect multiple partial payments, always setting the
 sum of all payments made.
- To use this endpoint with an entity user token, this entity user must have a role that includes the `pay`
permission for payables.
- The `amount_to_pay` field is automatically calculated based on the `amount_due` less the percentage described
in the `payment_terms.discount` value.

Related guide: [Mark a payable as partially paid](https://docs.monite.com/accounts-payable/approvals/manual-transition#mark-as-partially-paid)

See also:

[Payables lifecycle](https://docs.monite.com/accounts-payable/payables/index)

[Payables status transitions](https://docs.monite.com/accounts-payable/payables/collect#suggested-payment-date)

[Mark a payable as paid](https://docs.monite.com/accounts-payable/approvals/manual-transition#mark-as-paid)



## OpenAPI

````yaml /.tooling/schemas/rest/tags/product-finops.json post /finops/v1/payables/{payable_id}/mark-as-partially-paid
openapi: 3.1.0
info:
  title: Tesouro Partner API
  version: '2025-06-23'
  description: The Tesouro REST API, for Tesouro partners to integrate with our solution.
  termsOfService: https://tesouro.com/terms
  contact:
    name: Tesouro team
    url: https://tesouro.com/about/
    email: developers@tesouro.com
servers:
  - url: https://api.sandbox.tesouro.com
    description: Sandbox
security: []
tags:
  - name: Accounting connections
  - name: Accounting data pull
  - name: Accounting synchronized records
  - name: Accounting tax rates
  - name: Analytics
  - name: Approval policies
  - name: Approval requests
  - name: Bank details
  - name: Comments
  - name: Cost centers
  - name: Counterpart VAT IDs
  - name: Counterpart addresses
  - name: Counterpart bank accounts
  - name: Counterpart contacts
  - name: Counterparts
  - name: Credit notes
  - name: Custom tax rates
  - name: Delivery notes
  - name: Documents
  - name: Entities
  - name: Entity users
  - name: Events
  - name: Files
  - name: Identity
  - name: Ledger accounts
  - name: Mail templates
  - name: Mailbox domains
  - name: Mailboxes
  - name: Measure units
  - name: OCR
  - name: Overdue reminders
  - name: PDF templates
  - name: Payable line items
  - name: Payables
  - name: Payment intents
  - name: Payment links
  - name: Payment methods
  - name: Payment records
  - name: Payment reminders
  - name: Payment terms
  - name: Products
  - name: Projects
  - name: Purchase orders
  - name: Receipts
  - name: Receivables
  - name: Recurrences
  - name: Tags
  - name: Text templates
  - name: Transactions
  - name: VAT rates
  - name: Webhook deliveries
  - name: Webhook subscriptions
paths:
  /finops/v1/payables/{payable_id}/mark-as-partially-paid:
    post:
      tags:
        - Payables
      summary: Mark a payable as partially paid
      description: >-
        Mark a payable as partially paid.


        If the payable is partially paid, its status is moved to
        `partially_paid`. The value of the `amount_paid` field must be
         the sum of all payments made, not only the last one.

        Notes:

        - This endpoint can be used for payables in the `waiting_to_be_paid`
        status.

        - The `amount_paid` must be greater than 0 and less than the total
        payable amount specified by the `amount` field.

        - You can use this endpoint multiple times for the same payable to
        reflect multiple partial payments, always setting the
         sum of all payments made.
        - To use this endpoint with an entity user token, this entity user must
        have a role that includes the `pay`

        permission for payables.

        - The `amount_to_pay` field is automatically calculated based on the
        `amount_due` less the percentage described

        in the `payment_terms.discount` value.


        Related guide: [Mark a payable as partially
        paid](https://docs.monite.com/accounts-payable/approvals/manual-transition#mark-as-partially-paid)


        See also:


        [Payables
        lifecycle](https://docs.monite.com/accounts-payable/payables/index)


        [Payables status
        transitions](https://docs.monite.com/accounts-payable/payables/collect#suggested-payment-date)


        [Mark a payable as
        paid](https://docs.monite.com/accounts-payable/approvals/manual-transition#mark-as-paid)
      operationId: post_payables_id_mark-as-partially-paid
      parameters:
        - required: true
          schema:
            type: string
            format: date
          example: '2025-06-23'
          name: x-finops-version
          in: header
        - required: true
          schema:
            type: string
            format: uuid
          name: payable_id
          in: path
        - description: The ID of the entity that owns the requested resource.
          required: true
          schema:
            type: string
            format: uuid
            examples:
              - 9d2b4c8f-2087-4738-ba91-7359683c49a4
          name: x-organization-id
          in: header
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/PartiallyPaidPayload'
        required: true
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/PayableResponseSchema'
        '400':
          description: Bad Request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorSchemaResponse'
        '401':
          description: Unauthorized
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorSchemaResponse'
        '403':
          description: Forbidden
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorSchemaResponse'
        '404':
          description: Not Found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorSchemaResponse'
        '405':
          description: Method Not Allowed
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorSchemaResponse'
        '409':
          description: >-
            Possible responses: `Action for {object_type} at permissions not
            found: {action}`, `Object type at permissions not found:
            {object_type}`, `Action {action} for {object_type} not allowed`,
            `Payable couldn't be updated due to current state`, `The file cannot
            be attached because another file is already attached. Please note
            that only one file attachment is allowed.`
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorSchemaResponse'
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
        '500':
          description: Internal Server Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorSchemaResponse'
      security:
        - HTTPBearer: []
components:
  schemas:
    PartiallyPaidPayload:
      properties:
        amount_paid:
          type: integer
          minimum: 0
          description: How much was paid on the invoice (in minor units).
      additionalProperties: false
      type: object
      required:
        - amount_paid
    PayableResponseSchema:
      properties:
        id:
          type: string
          format: uuid
          description: A unique ID assigned to this payable.
        created_at:
          type: string
          format: date-time
          description: >-
            UTC date and time when this payable was created. Timestamps follow
            the [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format.
        updated_at:
          type: string
          format: date-time
          description: >-
            UTC date and time when this payable was last updated. Timestamps
            follow the [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601)
            format.
        amount_due:
          type: integer
          description: How much is left to be paid on the invoice (in minor units).
          example: 1000
        amount_paid:
          type: integer
          description: How much was paid on the invoice (in minor units).
          example: 1000
        amount_to_pay:
          type: integer
          description: >-
            How much is left to be paid on the invoice (in minor units) with
            discounts from payment terms.
          example: 1000
        approval_policy_id:
          type: string
          format: uuid
          description: >-
            Id of existing approval policy that applies to this payable, if any.
            A policy is applied if the payable matches the policy trigger
            conditions.
        counterpart:
          allOf:
            - $ref: '#/components/schemas/CounterpartRawData'
          description: >-
            Object representing de-normalized counterpart data. Filled at the
            moment of invoice submitting for approval or payment.
        counterpart_address_id:
          type: string
          format: uuid
          description: The ID of counterpart address object stored in counterparts service
        counterpart_bank_account_id:
          type: string
          format: uuid
          description: >-
            The ID of counterpart bank account object stored in counterparts
            service
        counterpart_id:
          type: string
          format: uuid
          description: >-
            The ID of the counterpart object that represents the vendor or
            supplier.
        counterpart_raw_data:
          allOf:
            - $ref: '#/components/schemas/CounterpartRawData'
          description: >-
            Object representing counterpart data which was extracted by OCR.
            Used for informational purposes.
        counterpart_vat_id_id:
          type: string
          format: uuid
          description: The ID of counterpart VAT ID object stored in counterparts service
        credit_notes:
          items:
            $ref: '#/components/schemas/PayableCreditNoteData'
          type: array
          description: The list of linked credit notes of the payable.
        currency:
          allOf:
            - $ref: '#/components/schemas/CurrencyEnum'
          description: >-
            The [currency code](https://docs.monite.com/references/currencies)
            of the currency used in the payable.
          example: USD
        currency_exchange:
          $ref: '#/components/schemas/CurrencyExchangeSchema2'
        description:
          type: string
          description: An arbitrary description of this payable.
        discount:
          type: integer
          description: >-
            The value of the additional discount that will be applied to the
            total amount. in [minor
            units](https://docs.monite.com/references/currencies#minor-units).
            For example, $12.50 is represented as 1250.
          example: 500
        document_id:
          type: string
          description: >-
            A unique invoice number assigned by the invoice issuer for payment
            tracking purposes. This is different from `id` which is an internal
            ID created automatically by Monite.
          example: INV-2287
        due_date:
          type: string
          format: date
          description: >-
            The date by which the payable must be paid, in the YYYY-MM-DD
            format. If the payable specifies payment terms with early payment
            discounts, this is the final payment date.
        enforce_approval_policy_id:
          type: string
          format: uuid
          description: >-
            Id of an existing approval policy that should be enforced when
            submitting the payable for approval.If this field is set, no other
            policies will be evaluated via their triggers - the specified policy
            will always be applied instead.
        entity_id:
          type: string
          format: uuid
          description: The ID of the entity to which the payable was issued.
        file:
          allOf:
            - $ref: '#/components/schemas/FileSchema'
          description: The original file from which this payable was created.
        file_id:
          type: string
          format: uuid
          description: File id to retrieve file info from file saver.
        issued_at:
          type: string
          format: date
          description: The date when the payable was issued, in the YYYY-MM-DD format.
        marked_as_paid_by_entity_user_id:
          type: string
          format: uuid
          description: The ID of the entity user who marked this document as paid.
          example: 71e8875a-43b3-434f-b12a-54c84c176ef3
        marked_as_paid_with_comment:
          type: string
          description: >-
            An arbitrary comment that describes how and when this payable was
            paid.
          example: Was paid partly in the end of the month.
        ocr_request_id:
          type: string
          format: uuid
          description: >-
            Id of OCR request to match asynchronous result of processing
            payable.
        ocr_status:
          allOf:
            - $ref: '#/components/schemas/OcrStatusEnum'
          description: >-
            The status of the data recognition process using OCR. The
            'processing' status means that the data recognition is in progress
            and the user needs to wait for the data enrichment. The 'error'
            status indicates that some error occurred on the OCR side and the
            user can fill in the data manually. The 'success' status means the
            data recognition has been successfully completed, after which the
            user can check the data if desired and enrich or correct it.
        other_extracted_data:
          anyOf:
            - $ref: '#/components/schemas/OCRResponseInvoiceReceiptData'
            - $ref: '#/components/schemas/OcrRecognitionResponse'
          description: Data extracted from the uploaded payable by OCR.
        paid_at:
          type: string
          format: date-time
          description: The date by which the payable was paid
        partner_metadata:
          type: object
          description: Metadata for partner needs
        payable_origin:
          allOf:
            - $ref: '#/components/schemas/PayableOriginEnum'
          description: >-
            Specifies how this payable was created in Monite: `upload` - created
            via an API call, `email` - sent via email to the entity's mailbox.
        payment_terms:
          allOf:
            - $ref: '#/components/schemas/PayablePaymentTermsCreatePayload'
          description: >-
            The number of days to pay with potential discount for options
            shorter than due_date
        project_id:
          type: string
          format: uuid
          description: Project id of a payable.
        purchase_order_id:
          type: string
          format: uuid
          description: The identifier of the purchase order to which this payable belongs.
        sender:
          type: string
          format: email
          description: The email address from which the invoice was sent to the entity.
          example: hello@example.com
        source_of_payable_data:
          allOf:
            - $ref: '#/components/schemas/SourceOfPayableDataEnum'
          description: >-
            Specifies how the property values of this payable were provided:
            `ocr` - Monite OCR service extracted the values from the provided
            PDF or image file, `user_specified` - values were added or updated
            via an API call.
        status:
          allOf:
            - $ref: '#/components/schemas/PayableStateEnum'
          description: >-
            The
            [status](https://docs.monite.com/accounts-payable/payables/index) of
            the payable.
        subtotal:
          type: integer
          description: >-
            The subtotal amount to be paid, in [minor
            units](https://docs.monite.com/references/currencies#minor-units).
            For example, $12.50 is represented as 1250.
          example: 1250
        suggested_payment_term:
          allOf:
            - $ref: '#/components/schemas/SuggestedPaymentTerm'
          description: >-
            The suggested date and corresponding discount in which payable could
            be paid. The date is in the YYYY-MM-DD format. The discount is
            calculated as X * (10^-4) - for example, 100 is 1%, 25 is 0,25%,
            10000 is 100 %. Date varies depending on the payment terms and may
            even be equal to the due date with discount 0.
        tags:
          items:
            $ref: '#/components/schemas/TagReadSchema'
          type: array
          description: >-
            A list of user-defined tags (labels) assigned to this payable. Tags
            can be used to trigger a specific approval policy for this payable.
        tax:
          type: integer
          description: >-
            Registered tax percentage applied for a service price in minor
            units, e.g. 200 means 2%, 1050 means 10.5%.
          example: 2000
        tax_amount:
          type: integer
          description: >-
            Tax amount in [minor
            units](https://docs.monite.com/references/currencies#minor-units).
            For example, $12.50 is represented as 1250.
          example: 250
        total_amount:
          type: integer
          description: >-
            The total amount to be paid, in [minor
            units](https://docs.monite.com/references/currencies#minor-units).
            For example, $12.50 is represented as 1250.
          example: 1500
        total_amount_with_credit_notes:
          type: integer
          description: >-
            The total price of the payable in [minor
            units](https://docs.monite.com/references/currencies#minor-units),
            excluding all issued credit notes.
        was_created_by_user_id:
          type: string
          format: uuid
      type: object
      required:
        - id
        - created_at
        - updated_at
        - credit_notes
        - entity_id
        - payable_origin
        - source_of_payable_data
        - status
      description: >-
        Represents an Accounts Payable document received from a vendor or
        supplier.
    ErrorSchemaResponse:
      properties:
        error:
          $ref: '#/components/schemas/ErrorSchema'
      type: object
      required:
        - error
    HTTPValidationError:
      properties:
        detail:
          items:
            $ref: '#/components/schemas/ValidationError'
          type: array
      type: object
    CounterpartRawData:
      properties:
        address:
          allOf:
            - $ref: '#/components/schemas/CounterpartRawAddress'
          description: The address of the vendor or supplier.
        bank_account:
          allOf:
            - $ref: '#/components/schemas/CounterpartRawBankAccount'
          description: Object representing counterpart bank account.
        email:
          type: string
          format: email
          description: The email address of the organization
          example: acme@example.com
        name:
          type: string
          description: Vendor or supplier name.
          example: Acme Inc.
        phone:
          type: string
          description: The phone number of the organization
          example: '5551231234'
        tax_id:
          type: string
          description: The tax id of the counterpart.
          example: '123456789'
        vat_id:
          allOf:
            - $ref: '#/components/schemas/CounterpartRawVatID'
          description: VAT ID of the vendor or supplier which was used in the invoice.
      type: object
    PayableCreditNoteData:
      properties:
        id:
          type: string
          format: uuid
          description: The unique identifier of the credit note.
          example: 123e4567-e89b-12d3-a456-426614174000
        document_id:
          type: string
          description: The credit note's unique document number.
          example: CN-123456
        issued_at:
          type: string
          format: date
          description: The date when the credit note was issued, in the YYYY-MM-DD format
          example: '2024-01-15'
        status:
          type: string
          maxLength: 30
          description: The current status of the credit note in its lifecycle
          example: submitted_for_approval
        total_amount:
          type: integer
          description: Credit note total amount.
          example: 1000
      type: object
      required:
        - id
        - status
    CurrencyEnum:
      type: string
      enum:
        - AED
        - AFN
        - ALL
        - AMD
        - ANG
        - AOA
        - ARS
        - AUD
        - AWG
        - AZN
        - BAM
        - BBD
        - BDT
        - BGN
        - BHD
        - BIF
        - BMD
        - BND
        - BOB
        - BRL
        - BSD
        - BTN
        - BWP
        - BYN
        - BZD
        - CAD
        - CDF
        - CHF
        - CLP
        - CNY
        - COP
        - CRC
        - CVE
        - CZK
        - DJF
        - DKK
        - DOP
        - DZD
        - EGP
        - ETB
        - EUR
        - FJD
        - FKP
        - GBP
        - GEL
        - GHS
        - GIP
        - GMD
        - GNF
        - GTQ
        - GYD
        - HKD
        - HNL
        - HTG
        - HUF
        - IDR
        - ILS
        - INR
        - IQD
        - ISK
        - JMD
        - JOD
        - JPY
        - KES
        - KGS
        - KHR
        - KMF
        - KRW
        - KWD
        - KYD
        - KZT
        - LAK
        - LBP
        - LKR
        - LRD
        - LSL
        - LYD
        - MAD
        - MDL
        - MGA
        - MKD
        - MMK
        - MNT
        - MOP
        - MUR
        - MVR
        - MWK
        - MXN
        - MYR
        - MZN
        - NAD
        - NGN
        - NIO
        - NOK
        - NPR
        - NZD
        - OMR
        - PAB
        - PEN
        - PGK
        - PHP
        - PKR
        - PLN
        - PYG
        - QAR
        - RON
        - RSD
        - RUB
        - RWF
        - SAR
        - SBD
        - SCR
        - SEK
        - SGD
        - SHP
        - SLE
        - SOS
        - SRD
        - SSP
        - SVC
        - SZL
        - THB
        - TJS
        - TMT
        - TND
        - TOP
        - TRY
        - TTD
        - TWD
        - TZS
        - UAH
        - UGX
        - USD
        - UYU
        - UZS
        - VND
        - VUV
        - WST
        - XAF
        - XCD
        - XOF
        - XPF
        - YER
        - ZAR
        - ZMW
    CurrencyExchangeSchema2:
      properties:
        default_currency_code:
          type: string
        rate:
          type: number
          exclusiveMinimum: 0
        total:
          type: number
      additionalProperties: false
      type: object
      required:
        - default_currency_code
        - rate
        - total
    FileSchema:
      properties:
        id:
          type: string
          format: uuid
          description: A unique ID of this file.
        created_at:
          type: string
          format: date-time
          description: >-
            UTC date and time when this file was uploaded to Monite. Timestamps
            follow the [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601)
            format.
        file_type:
          type: string
          description: The type of the business object associated with this file.
          example: payables
        md5:
          type: string
          description: The MD5 hash of the file.
          example: 31d1a2dd1ad3dfc39be849d70a68dac0
        mimetype:
          type: string
          description: >-
            The file's [media
            type](https://developer.mozilla.org/en-US/docs/Web/HTTP/Basics_of_HTTP/MIME_types).
          example: application/pdf
        name:
          type: string
          maxLength: 512
          description: The original file name (if available).
          example: invoice.pdf
        pages:
          items:
            $ref: '#/components/schemas/PageSchema2'
          type: array
          description: >-
            If the file is a PDF document, this property contains individual
            pages extracted from the file. Otherwise, an empty array.
          default: []
        previews:
          items:
            $ref: '#/components/schemas/PreviewSchema2'
          type: array
          description: >-
            Preview images generated for this file. There can be multiple images
            with different sizes.
          default: []
        region:
          type: string
          description: Geographical region of the data center where the file is stored.
          example: eu-central-1
        size:
          type: integer
          minimum: 0
          description: The file size in bytes.
          example: 24381
        url:
          type: string
          description: The URL to download the file.
          example: https://bucketname.s3.amazonaws.com/12345/67890.pdf
      type: object
      required:
        - id
        - created_at
        - file_type
        - name
        - region
        - md5
        - mimetype
        - url
        - size
      description: Represents a file (such as a PDF invoice) that was uploaded to Monite.
    OcrStatusEnum:
      type: string
      enum:
        - processing
        - error
        - success
        - canceled
    OCRResponseInvoiceReceiptData:
      properties:
        counterpart_account_id:
          type: string
          description: Counterpart bank ID
          example: CHASUS33
        counterpart_account_number:
          type: string
          description: The bank account number
        counterpart_address:
          type: string
          description: Counterpart address
        counterpart_address_object:
          allOf:
            - $ref: '#/components/schemas/OCRAddress'
          description: >-
            Counterpart address as a json object compatible with counterparts
            service
        counterpart_branch_number:
          type: string
          description: The bank branch number
        counterpart_email:
          type: string
          description: Email address of the counterpart
        counterpart_name:
          type: string
          description: Counterpart name
          example: Clacksworth Keyboards
        counterpart_routing_number:
          type: string
          description: The bank routing number
        counterpart_vat_id:
          type: string
          description: Counterpart VAT ID
          example: '123456789'
        currency:
          type: string
          description: ISO 4217 currency code
          example: USD
        discount_raw:
          type: number
          description: Discount Raw amount
        document_due_date:
          type: string
          description: Document due date in ISO format
        document_id:
          type: string
          description: Invoice/receipt ID
          example: CST-13341
        document_issued_at_date:
          type: string
          description: Document issuance date in ISO format
        line_items_raw:
          items:
            $ref: '#/components/schemas/OCRResponseInvoiceReceiptLineItemRaw'
          type: array
          description: >-
            List of line items from document raw, without minor units
            conversion.
        payment_terms_raw:
          items:
            type: string
          type: array
          description: Raw payment terms parsed but not calculated.
        purchase_order_number:
          type: string
          description: Purchase Order Number
          example: '1234'
        tax_payer_id:
          type: string
          description: Tax payer ID
          example: '12345678901'
        total_excl_vat_raw:
          type: number
          description: Subtotal, without minor units
          example: 77
        total_paid_amount_raw:
          type: number
          description: Total paid amount
          default: 0
          example: 50
        total_raw:
          type: number
          description: Total, without minor units
          example: 70
        total_vat_amount_raw:
          type: number
          description: VAT amount, without minor units
          example: 7
        total_vat_rate_raw:
          type: number
          description: VAT Percent raw, without minor units.
          example: 12.5
        type:
          type: string
          enum:
            - invoice
          default: invoice
      type: object
    OcrRecognitionResponse:
      properties:
        line_items:
          items:
            $ref: '#/components/schemas/LabelNValue'
          type: array
          description: Text content of the invoice line items as recognized by OCR.
        summary:
          items:
            $ref: '#/components/schemas/LabelNValue'
          type: array
          description: >-
            Invoice text content other than the line items. Such as the invoice
            issue and due dates, vendor name and address, and other general
            information.
      type: object
      description: >-
        Contains information about all text blocks extracted from an uploaded
        invoice by OCR.

        The text blocks are grouped into `line_items` (invoice line items) and
        `summary` (all other information).

        Legacy schema used for AWS textract recognition.
    PayableOriginEnum:
      type: string
      enum:
        - upload
        - email
    PayablePaymentTermsCreatePayload:
      properties:
        description:
          type: string
        name:
          type: string
        term_1:
          $ref: '#/components/schemas/PayablePaymentTermDiscount'
        term_2:
          $ref: '#/components/schemas/PayablePaymentTermDiscount'
        term_final:
          $ref: '#/components/schemas/PayablePaymentTermFinal'
      additionalProperties: false
      type: object
      required:
        - name
        - term_final
    SourceOfPayableDataEnum:
      type: string
      enum:
        - ocr
        - user_specified
    PayableStateEnum:
      type: string
      enum:
        - draft
        - new
        - approve_in_progress
        - waiting_to_be_paid
        - partially_paid
        - paid
        - canceled
        - rejected
    SuggestedPaymentTerm:
      properties:
        date:
          type: string
          format: date
        discount:
          type: integer
          maximum: 10000
          minimum: 0
      additionalProperties: false
      type: object
      required:
        - date
      description: Suggested payment date and corresponding discount
    TagReadSchema:
      properties:
        id:
          type: string
          format: uuid
          description: A unique ID of this tag.
          example: ea837e28-509b-4b6a-a600-d54b6aa0b1f5
        created_at:
          type: string
          format: date-time
          description: >-
            Date and time when the tag was created. Timestamps follow the [ISO
            8601](https://en.wikipedia.org/wiki/ISO_8601) standard.
          example: '2022-09-07T16:35:18.484507+00:00'
        updated_at:
          type: string
          format: date-time
          description: >-
            Date and time when the tag was last updated. Timestamps follow the
            [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) standard.
          example: '2022-09-07T16:35:18.484507+00:00'
        category:
          allOf:
            - $ref: '#/components/schemas/TagCategory'
          description: The tag category.
          example: department
        created_by_entity_user_id:
          type: string
          format: uuid
          description: ID of the user who created the tag.
          example: ea837e28-509b-4b6a-a600-d54b6aa0b1f5
        description:
          type: string
          maxLength: 255
          minLength: 1
          description: The tag description.
          example: Tag for the Marketing Department
        name:
          type: string
          description: The tag name.
          example: Marketing
      type: object
      required:
        - id
        - created_at
        - updated_at
        - name
      description: >-
        Represents a user-defined tag that can be assigned to resources to
        filter them.
    ErrorSchema:
      properties:
        message:
          type: string
      type: object
      required:
        - message
    ValidationError:
      properties:
        loc:
          items:
            anyOf:
              - type: string
              - type: integer
          type: array
        msg:
          type: string
        type:
          type: string
      type: object
      required:
        - loc
        - msg
        - type
    CounterpartRawAddress:
      properties:
        city:
          type: string
          description: City name.
          example: New York
        country:
          allOf:
            - $ref: '#/components/schemas/AllowedCountries'
          description: >-
            Two-letter ISO country code ([ISO 3166-1
            alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)).
          example: US
        line1:
          type: string
          description: Street address.
          example: 456 Fifth Avenue
        line2:
          type: string
          description: Additional address information (if any).
        postal_code:
          type: string
          description: ZIP or postal code.
          example: '10001'
        state:
          type: string
          description: State, region, province, or county.
      type: object
      description: Address information.
    CounterpartRawBankAccount:
      properties:
        account_holder_name:
          type: string
          description: Vendor's bank account name.
        account_number:
          type: string
          description: >-
            Vendor's bank account number, IBAN, or similar (if specified in the
            payable document).
          example: '123456789012'
        bic:
          type: string
          description: SWIFT code (BIC) of the vendor's bank.
          example: CHASUS33XXX
        iban:
          type: string
          description: required for non-GB bank accounts
        routing_number:
          type: string
          description: required for US bank accounts
        sort_code:
          type: string
          description: required for GB bank accounts
      type: object
    CounterpartRawVatID:
      properties:
        country:
          $ref: '#/components/schemas/AllowedCountries'
        type:
          type: string
        value:
          type: string
      type: object
    PageSchema2:
      properties:
        id:
          type: string
          format: uuid
          description: A unique ID of the image.
        mimetype:
          type: string
          description: >-
            The [media
            type](https://developer.mozilla.org/en-US/docs/Web/HTTP/Basics_of_HTTP/MIME_types)
            of the image.
          example: image/png
        number:
          type: integer
          minimum: 0
          description: The page number in the PDF document, from 0.
          example: 0
        size:
          type: integer
          minimum: 0
          description: Image file size, in bytes.
          example: 21972
        url:
          type: string
          description: The URL to download the image.
          example: https://bucket.s3.amazonaws.com/123/456.png
      type: object
      required:
        - id
        - mimetype
        - size
        - number
        - url
      description: >-
        When a PDF document is uploaded to Monite, it extracts individual pages
        from the document

        and saves them as PNG images. This object contains the image and
        metadata of a single page.
    PreviewSchema2:
      properties:
        height:
          type: integer
          description: The image height in pixels.
          example: 400
        url:
          type: string
          description: The image URL.
          example: https://bucketname.s3.amazonaws.com/1/2/3.png
        width:
          type: integer
          description: The image width in pixels.
          example: 200
      type: object
      required:
        - url
        - width
        - height
      description: A preview image generated for a file.
    OCRAddress:
      properties:
        city:
          type: string
          description: City name.
          example: New York
        country:
          type: string
          description: >-
            Two-letter ISO country code ([ISO 3166-1
            alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)).
          example: US
        line1:
          type: string
          description: Street address.
          example: 456 Fifth Avenue
        line2:
          type: string
          description: Additional address information (if any).
        original_country_name:
          type: string
          description: Country name as it is stated in the document.
          example: United States
        postal_code:
          type: string
          description: ZIP or postal code.
          example: '10001'
        state:
          type: string
          description: State, region, province, or county.
      type: object
      description: |-
        In general it's compatible with CounterpartAddress model but
        * All fields are optional
        * There is an additional field original_country_name
    OCRResponseInvoiceReceiptLineItemRaw:
      properties:
        description:
          type: string
          description: Human-readable line item description
          example: >-
            Impact Players : How to Take the Lead , Play Bigger , and Multiply
            Your
        item_adjusted:
          type: boolean
          description: Item Quantity/Unit Price adjusted
          default: false
        line_item_ocr_id:
          type: string
          description: OCR Id of line item
        quantity:
          type: number
          description: Quantity
          example: 1.2
        total_excl_vat:
          type: number
          description: Total excluded VAT as parsed.
          example: 120
        total_incl_vat:
          type: number
          description: Total included VAT as parsed.
          example: 135
        unit:
          type: string
          description: Unit
          example: meters
        unit_price:
          type: number
          description: Price as parsed
          example: 100
        vat_amount:
          type: number
          description: VAT Amount as parsed.
          example: 15
        vat_percentage:
          type: number
          description: VAT Percent as parsed.
          example: 12.5
      type: object
    LabelNValue:
      properties:
        label:
          allOf:
            - $ref: '#/components/schemas/Item'
          description: Text label.
          example:
            text: total
            confidence: 99.799
        value:
          allOf:
            - $ref: '#/components/schemas/Item'
          description: The value (if any).
      type: object
      required:
        - label
        - value
      description: >-
        A label-value pair extracted from an uploaded document by OCR.

        For example, the label could be "Total" and the value could be a
        currency amount.
    PayablePaymentTermDiscount:
      properties:
        discount:
          type: integer
          description: >-
            The discount percentage in minor units. E.g., 200 means 2%, 1050
            means 10.5%.
        number_of_days:
          type: integer
          description: The amount of days after the invoice issue date.
      additionalProperties: false
      type: object
      required:
        - discount
        - number_of_days
    PayablePaymentTermFinal:
      properties:
        number_of_days:
          type: integer
          description: The amount of days after the invoice issue date.
      additionalProperties: false
      type: object
      required:
        - number_of_days
    TagCategory:
      type: string
      enum:
        - document_type
        - department
        - project
        - cost_center
        - vendor_type
        - payment_method
        - approval_status
    AllowedCountries:
      type: string
      enum:
        - AF
        - AX
        - AL
        - DZ
        - AS
        - AD
        - AO
        - AI
        - AQ
        - AG
        - AR
        - AM
        - AW
        - AU
        - AT
        - AZ
        - BS
        - BH
        - BD
        - BB
        - BY
        - BE
        - BZ
        - BJ
        - BM
        - BT
        - BO
        - BA
        - BW
        - BV
        - BR
        - IO
        - BN
        - BG
        - BF
        - BI
        - KH
        - CM
        - CA
        - IC
        - CV
        - KY
        - CF
        - EA
        - TD
        - CL
        - CN
        - CX
        - CC
        - CO
        - KM
        - CG
        - CD
        - CK
        - CR
        - CI
        - HR
        - CU
        - CY
        - CZ
        - DK
        - DJ
        - DM
        - DO
        - EC
        - EG
        - SV
        - GQ
        - ER
        - EE
        - SZ
        - ET
        - FK
        - FO
        - FJ
        - FI
        - FR
        - GF
        - PF
        - TF
        - GA
        - GM
        - GE
        - DE
        - GH
        - GI
        - GR
        - GL
        - GD
        - GP
        - GU
        - GT
        - GG
        - GN
        - GW
        - GY
        - HT
        - HM
        - VA
        - HN
        - HK
        - HU
        - IS
        - IN
        - ID
        - IR
        - IQ
        - IE
        - IM
        - IL
        - IT
        - JM
        - JP
        - JE
        - JO
        - KZ
        - KE
        - KI
        - KP
        - KR
        - KW
        - KG
        - LA
        - LV
        - LB
        - LS
        - LR
        - LY
        - LI
        - LT
        - LU
        - MO
        - MG
        - MW
        - MY
        - MV
        - ML
        - MT
        - MH
        - MQ
        - MR
        - MU
        - YT
        - MX
        - FM
        - MD
        - MC
        - MN
        - ME
        - MS
        - MA
        - MZ
        - MM
        - NA
        - NR
        - NP
        - NL
        - AN
        - NC
        - NZ
        - NI
        - NE
        - NG
        - NU
        - NF
        - MP
        - MK
        - 'NO'
        - OM
        - PK
        - PW
        - PS
        - PA
        - PG
        - PY
        - PE
        - PH
        - PN
        - PL
        - PT
        - PR
        - QA
        - RE
        - RO
        - RU
        - RW
        - SH
        - KN
        - LC
        - PM
        - VC
        - WS
        - SM
        - ST
        - SA
        - SN
        - RS
        - SC
        - SL
        - SG
        - SK
        - SI
        - SB
        - SO
        - ZA
        - SS
        - GS
        - ES
        - LK
        - SD
        - SR
        - SJ
        - SE
        - CH
        - SY
        - TW
        - TJ
        - TZ
        - TH
        - TL
        - TG
        - TK
        - TO
        - TT
        - TN
        - TR
        - TM
        - TC
        - TV
        - UG
        - UA
        - AE
        - GB
        - US
        - UM
        - UY
        - UZ
        - VU
        - VE
        - VN
        - VG
        - VI
        - WF
        - EH
        - YE
        - ZM
        - ZW
        - BL
        - BQ
        - CW
        - MF
        - SX
    Item:
      properties:
        confidence:
          type: number
          maximum: 100
          minimum: 0
          description: >-
            OCR confidence score - the estimated accuracy percentage of
            character recognition of the extracted text, from 0 to 100%.
          example: 96.238
        processed_text:
          description: >-
            If the `text` value is identified as a currency amount or a date,
            `processed_text` contains this value converted to a common format:


            * Currency amounts (such as the total, subtotal, tax/VAT, line item
            prices) are converted to numbers with the currency character
            removed. For example, "$1,125.00" becomes 1125.0.* Dates are
            converted to the [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601)
            format, `YYYY-MM-DDThh:mm:ss`. For example, "26/3/2021" becomes
            "2021-03-26T00:00:00".


            If `text` is not a currency amount or a date, `processed_text` is
            `null`.
          example: 1125
        text:
          type: string
          description: The text as recognized by OCR.
          example: $1,125.00
      type: object
      required:
        - confidence
        - text
      description: >-
        Contains information about a text block or line extracted from an
        uploaded document by OCR.
  securitySchemes:
    HTTPBearer:
      type: http
      scheme: bearer

````