> This page is for Unified.

> For clean Markdown of any page, append .md to the page URL.
> For a complete documentation index, see https://docs.merge.dev/llms.txt.
> For AI client integration (Claude Code, Cursor, etc.), connect to the MCP server at https://docs.merge.dev/_mcp/server.

The `Invoice` object represents an itemized record of goods and/or services sold to a customer or bought from a vendor.

Represents a Bill when the `Invoice` type is `ACCOUNTS_PAYABLE`. References an Invoice when the `Invoice` type is `ACCOUNTS_RECEIVABLE`.

### The Invoice Object

```json
{
  "id": "string",
  "remote_id": "string",
  "created_at": "2023-01-01T00:00:00Z",
  "modified_at": "2023-01-01T00:00:00Z",
  "type": "ACCOUNTS_RECEIVABLE",
  "contact": "string",
  "number": "string",
  "issue_date": "2023-01-01T00:00:00Z",
  "due_date": "2023-01-01T00:00:00Z",
  "paid_on_date": "2023-01-01T00:00:00Z",
  "memo": "string",
  "company": "string",
  "employee": "string",
  "currency": "XUA",
  "exchange_rate": "string",
  "payment_term": "string",
  "total_discount": 1,
  "sub_total": 1,
  "status": "PAID",
  "total_tax_amount": 1,
  "total_amount": 1,
  "balance": 1,
  "remote_updated_at": "2023-01-01T00:00:00Z",
  "tracking_categories": [
    "string"
  ],
  "accounting_period": "string",
  "purchase_orders": [
    "string"
  ],
  "sales_orders": [
    "string"
  ],
  "payments": [
    "string"
  ],
  "applied_payments": [
    "string"
  ],
  "line_items": [
    {
      "id": "string",
      "remote_id": "string",
      "created_at": "2023-01-01T00:00:00Z",
      "modified_at": "2023-01-01T00:00:00Z",
      "description": "string",
      "unit_price": 1,
      "quantity": 1,
      "total_amount": 1,
      "employee": "string",
      "project": "string",
      "contact": "string",
      "currency": "XUA",
      "exchange_rate": "string",
      "item": "string",
      "account": "string",
      "tax_rate": "string",
      "tracking_category": "string",
      "tracking_categories": [
        "string"
      ],
      "company": "string",
      "remote_was_deleted": true,
      "is_billable": true,
      "field_mappings": {
        "organization_defined_targets": {
          "string": {}
        },
        "linked_account_defined_targets": {
          "string": {}
        }
      },
      "remote_fields": [
        {
          "remote_field_class": {
            "id": "string",
            "display_name": "string",
            "remote_key_name": "string",
            "description": "string",
            "is_custom": true,
            "is_common_model_field": true,
            "is_required": true,
            "field_type": "string",
            "field_format": "string",
            "field_choices": [
              "string"
            ],
            "item_schema": {
              "item_type": "string",
              "item_format": "string",
              "item_choices": [
                "string"
              ]
            }
          },
          "value": {
            "string": {}
          }
        }
      ]
    }
  ],
  "applied_credit_notes": [
    {
      "remote_id": "string",
      "created_at": "2023-01-01T00:00:00Z",
      "modified_at": "2023-01-01T00:00:00Z",
      "credit_note": "string",
      "applied_date": "2023-01-01T00:00:00Z",
      "applied_amount": "string",
      "remote_was_deleted": true
    }
  ],
  "applied_vendor_credits": [
    {
      "remote_id": "string",
      "created_at": "2023-01-01T00:00:00Z",
      "modified_at": "2023-01-01T00:00:00Z",
      "vendor_credit": "string",
      "applied_date": "2023-01-01T00:00:00Z",
      "applied_amount": "string",
      "remote_was_deleted": true
    }
  ],
  "inclusive_of_tax": true,
  "invoice_url": "string",
  "remote_was_deleted": true,
  "field_mappings": {
    "organization_defined_targets": {
      "string": {}
    },
    "linked_account_defined_targets": {
      "string": {}
    }
  },
  "remote_data": [
    {
      "path": "string",
      "data": {}
    }
  ],
  "remote_fields": [
    {
      "remote_field_class": {
        "id": "string",
        "display_name": "string",
        "remote_key_name": "string",
        "description": "string",
        "is_custom": true,
        "is_common_model_field": true,
        "is_required": true,
        "field_type": "string",
        "field_format": "string",
        "field_choices": [
          "string"
        ],
        "item_schema": {
          "item_type": "string",
          "item_format": "string",
          "item_choices": [
            "string"
          ]
        }
      },
      "value": {
        "string": {}
      }
    }
  ]
}
```

### Schema (`Invoice`)

```yaml
components:
  schemas:
    InvoiceTypeEnum:
      type: string
      enum:
        - ACCOUNTS_RECEIVABLE
        - ACCOUNTS_PAYABLE
      title: InvoiceTypeEnum
    TransactionCurrencyEnum:
      type: string
      enum:
        - XUA
        - AFN
        - AFA
        - ALL
        - ALK
        - DZD
        - ADP
        - AOA
        - AOK
        - AON
        - AOR
        - ARA
        - ARS
        - ARM
        - ARP
        - ARL
        - AMD
        - AWG
        - AUD
        - ATS
        - AZN
        - AZM
        - BSD
        - BHD
        - BDT
        - BBD
        - BYN
        - BYB
        - BYR
        - BEF
        - BEC
        - BEL
        - BZD
        - BMD
        - BTN
        - BOB
        - BOL
        - BOV
        - BOP
        - BAM
        - BAD
        - BAN
        - BWP
        - BRC
        - BRZ
        - BRE
        - BRR
        - BRN
        - BRB
        - BRL
        - GBP
        - BND
        - BGL
        - BGN
        - BGO
        - BGM
        - BUK
        - BIF
        - XPF
        - KHR
        - CAD
        - CVE
        - KYD
        - XAF
        - CLE
        - CLP
        - CLF
        - CNX
        - CNY
        - CNH
        - COP
        - COU
        - KMF
        - CDF
        - CRC
        - HRD
        - HRK
        - CUC
        - CUP
        - CYP
        - CZK
        - CSK
        - DKK
        - DJF
        - DOP
        - NLG
        - XCD
        - DDM
        - ECS
        - ECV
        - EGP
        - GQE
        - ERN
        - EEK
        - ETB
        - EUR
        - XBA
        - XEU
        - XBB
        - XBC
        - XBD
        - FKP
        - FJD
        - FIM
        - FRF
        - XFO
        - XFU
        - GMD
        - GEK
        - GEL
        - DEM
        - GHS
        - GHC
        - GIP
        - XAU
        - GRD
        - GTQ
        - GWP
        - GNF
        - GNS
        - GYD
        - HTG
        - HNL
        - HKD
        - HUF
        - IMP
        - ISK
        - ISJ
        - INR
        - IDR
        - IRR
        - IQD
        - IEP
        - ILS
        - ILP
        - ILR
        - ITL
        - JMD
        - JPY
        - JOD
        - KZT
        - KES
        - KWD
        - KGS
        - LAK
        - LVL
        - LVR
        - LBP
        - LSL
        - LRD
        - LYD
        - LTL
        - LTT
        - LUL
        - LUC
        - LUF
        - MOP
        - MKD
        - MKN
        - MGA
        - MGF
        - MWK
        - MYR
        - MVR
        - MVP
        - MLF
        - MTL
        - MTP
        - MRU
        - MRO
        - MUR
        - MXV
        - MXN
        - MXP
        - MDC
        - MDL
        - MCF
        - MNT
        - MAD
        - MAF
        - MZE
        - MZN
        - MZM
        - MMK
        - NAD
        - NPR
        - ANG
        - TWD
        - NZD
        - NIO
        - NIC
        - NGN
        - KPW
        - NOK
        - OMR
        - PKR
        - XPD
        - PAB
        - PGK
        - PYG
        - PEI
        - PEN
        - PES
        - PHP
        - XPT
        - PLN
        - PLZ
        - PTE
        - GWE
        - QAR
        - XRE
        - RHD
        - RON
        - ROL
        - RUB
        - RUR
        - RWF
        - SVC
        - WST
        - SAR
        - RSD
        - CSD
        - SCR
        - SLL
        - XAG
        - SGD
        - SKK
        - SIT
        - SBD
        - SOS
        - ZAR
        - ZAL
        - KRH
        - KRW
        - KRO
        - SSP
        - SUR
        - ESP
        - ESA
        - ESB
        - XDR
        - LKR
        - SHP
        - XSU
        - SDD
        - SDG
        - SDP
        - SRD
        - SRG
        - SZL
        - SEK
        - CHF
        - SYP
        - STN
        - STD
        - TVD
        - TJR
        - TJS
        - TZS
        - XTS
        - THB
        - XXX
        - TPE
        - TOP
        - TTD
        - TND
        - TRY
        - TRL
        - TMT
        - TMM
        - USD
        - USN
        - USS
        - UGX
        - UGS
        - UAH
        - UAK
        - AED
        - UYW
        - UYU
        - UYP
        - UYI
        - UZS
        - VUV
        - VES
        - VEB
        - VEF
        - VND
        - VNN
        - CHE
        - CHW
        - XOF
        - YDD
        - YER
        - YUN
        - YUD
        - YUM
        - YUR
        - ZWN
        - ZRN
        - ZRZ
        - ZMW
        - ZMK
        - ZWD
        - ZWR
        - ZWL
      description: The currency code in ISO 4217 format.
      title: TransactionCurrencyEnum
    InvoiceStatusEnum:
      type: string
      enum:
        - PAID
        - DRAFT
        - SUBMITTED
        - PARTIALLY_PAID
        - OPEN
        - VOID
      title: InvoiceStatusEnum
    InvoiceLineItemFieldMappings:
      type: object
      properties:
        organization_defined_targets:
          type: object
          additionalProperties:
            description: Any type
        linked_account_defined_targets:
          type: object
          additionalProperties:
            description: Any type
      title: InvoiceLineItemFieldMappings
    FieldTypeEnum:
      type: string
      enum:
        - string
        - number
        - date
        - datetime
        - bool
        - list
      title: FieldTypeEnum
    FieldFormatEnum:
      type: string
      enum:
        - string
        - number
        - date
        - datetime
        - bool
        - list
      title: FieldFormatEnum
    ItemTypeEnum:
      type: string
      enum:
        - string
        - number
        - date
        - datetime
        - bool
        - list
      title: ItemTypeEnum
    ItemFormatEnum:
      type: string
      enum:
        - string
        - number
        - date
        - datetime
        - bool
        - list
      title: ItemFormatEnum
    ItemSchema:
      type: object
      properties:
        item_type:
          $ref: '#/components/schemas/ItemTypeEnum'
        item_format:
          $ref: '#/components/schemas/ItemFormatEnum'
        item_choices:
          type: array
          items:
            type: string
      title: ItemSchema
    RemoteFieldClass:
      type: object
      properties:
        id:
          type: string
        display_name:
          type: string
        remote_key_name:
          type: string
        description:
          type: string
        is_custom:
          type: boolean
        is_common_model_field:
          type: boolean
        is_required:
          type: boolean
        field_type:
          $ref: '#/components/schemas/FieldTypeEnum'
        field_format:
          $ref: '#/components/schemas/FieldFormatEnum'
        field_choices:
          type: array
          items:
            type: string
        item_schema:
          $ref: '#/components/schemas/ItemSchema'
      title: RemoteFieldClass
    RemoteField:
      type: object
      properties:
        remote_field_class:
          $ref: '#/components/schemas/RemoteFieldClass'
        value:
          type: object
          additionalProperties:
            description: Any type
      required:
        - remote_field_class
      title: RemoteField
    InvoiceLineItem:
      type: object
      properties:
        id:
          type: string
          format: uuid
        remote_id:
          type:
            - string
            - 'null'
          description: The third-party API ID of the matching object.
        created_at:
          type: string
          format: date-time
          description: The datetime that this object was created by Merge.
        modified_at:
          type: string
          format: date-time
          description: The datetime that this object was modified by Merge.
        description:
          type:
            - string
            - 'null'
          description: The line item's description.
        unit_price:
          type:
            - number
            - 'null'
          format: double
          description: The line item's unit price.
        quantity:
          type:
            - number
            - 'null'
          format: double
          description: The line item's quantity.
        total_amount:
          type:
            - number
            - 'null'
          format: double
          description: The line item's total amount.
        employee:
          type:
            - string
            - 'null'
          format: uuid
          description: The employee this overall transaction relates to.
        project:
          type:
            - string
            - 'null'
          format: uuid
        contact:
          type:
            - string
            - 'null'
          format: uuid
          description: The invoice's contact.
        currency:
          oneOf:
            - $ref: '#/components/schemas/TransactionCurrencyEnum'
            - type: 'null'
          description: The line item's currency. The currency code in ISO 4217 format.
        exchange_rate:
          type:
            - string
            - 'null'
          format: decimal
          pattern: ^-?\d{0,32}(?:\.\d{0,16})?$
          description: The line item's exchange rate.
        item:
          type:
            - string
            - 'null'
          format: uuid
        account:
          type:
            - string
            - 'null'
          format: uuid
        tax_rate:
          type:
            - string
            - 'null'
          format: uuid
          description: The tax rate that applies to this line item.
        tracking_category:
          type:
            - string
            - 'null'
          format: uuid
          deprecated: true
        tracking_categories:
          type: array
          items:
            type: string
            format: uuid
          description: The invoice line item's associated tracking categories.
        company:
          type:
            - string
            - 'null'
          format: uuid
          description: The company the invoice belongs to.
        remote_was_deleted:
          type: boolean
          description: >-
            Indicates whether or not this object has been deleted in the third
            party platform. Full coverage deletion detection is a premium
            add-on. Native deletion detection is offered for free with limited
            coverage. [Learn
            more](https://docs.merge.dev/integrations/hris/supported-features/).
        is_billable:
          type:
            - boolean
            - 'null'
          description: Indicates if the line item can be charged to the client/customer.
        field_mappings:
          oneOf:
            - $ref: '#/components/schemas/InvoiceLineItemFieldMappings'
            - type: 'null'
        remote_fields:
          type: array
          items:
            $ref: '#/components/schemas/RemoteField'
      description: >-
        # The InvoiceLineItem Object

        ### Description

        The `InvoiceLineItem` object represents an itemized record of goods
        and/or services sold to a customer.


        ### Usage Example

        Fetch from the `GET Invoice` endpoint and view the invoice's line items.
      title: InvoiceLineItem
    CreditNoteApplyLineForInvoice:
      type: object
      properties:
        remote_id:
          type:
            - string
            - 'null'
          description: The third-party API ID of the matching object.
        created_at:
          type: string
          format: date-time
          description: The datetime that this object was created by Merge.
        modified_at:
          type: string
          format: date-time
          description: The datetime that this object was modified by Merge.
        credit_note:
          type:
            - string
            - 'null'
          format: uuid
        applied_date:
          type:
            - string
            - 'null'
          format: date-time
          description: Date that the credit note is applied to the invoice.
        applied_amount:
          type:
            - string
            - 'null'
          format: decimal
          pattern: ^-?\d{0,32}(?:\.\d{0,16})?$
          description: The amount of the Credit Note applied to the invoice.
        remote_was_deleted:
          type: boolean
          description: >-
            Indicates whether or not this object has been deleted in the third
            party platform. Full coverage deletion detection is a premium
            add-on. Native deletion detection is offered for free with limited
            coverage. [Learn
            more](https://docs.merge.dev/integrations/hris/supported-features/).
      description: >-
        # The CreditNoteApplyLine Object

        ### Description

        The `CreditNoteApplyLine` is attached to the CreditNote model.


        ### Usage Example

        Fetch from the `GET CreditNote` endpoint and view the invoice's applied
        to lines.
      title: CreditNoteApplyLineForInvoice
    VendorCreditApplyLineForInvoice:
      type: object
      properties:
        remote_id:
          type:
            - string
            - 'null'
          description: The third-party API ID of the matching object.
        created_at:
          type: string
          format: date-time
          description: The datetime that this object was created by Merge.
        modified_at:
          type: string
          format: date-time
          description: The datetime that this object was modified by Merge.
        vendor_credit:
          type:
            - string
            - 'null'
          format: uuid
        applied_date:
          type:
            - string
            - 'null'
          format: date-time
          description: Date that the vendor credit is applied to the invoice.
        applied_amount:
          type:
            - string
            - 'null'
          format: decimal
          pattern: ^-?\d{0,32}(?:\.\d{0,16})?$
          description: The amount of the VendorCredit applied to the invoice.
        remote_was_deleted:
          type: boolean
          description: >-
            Indicates whether or not this object has been deleted in the third
            party platform. Full coverage deletion detection is a premium
            add-on. Native deletion detection is offered for free with limited
            coverage. [Learn
            more](https://docs.merge.dev/integrations/hris/supported-features/).
      description: >-
        # The VendorCreditApplyLine Object

        ### Description

        The `VendorCreditApplyLine` object is used to represent a applied vendor
        credit.


        ### Usage Example

        Fetch from the `GET VendorCredit` endpoint and view the vendor credit's
        applied to lines.
      title: VendorCreditApplyLineForInvoice
    InvoiceFieldMappings:
      type: object
      properties:
        organization_defined_targets:
          type: object
          additionalProperties:
            description: Any type
        linked_account_defined_targets:
          type: object
          additionalProperties:
            description: Any type
      title: InvoiceFieldMappings
    RemoteData:
      type: object
      properties:
        path:
          type: string
          description: The third-party API path that is being called.
        data:
          description: >-
            The data returned from the third-party for this object in its
            original, unnormalized format.
      required:
        - path
      description: >-
        # The RemoteData Object

        ### Description

        The `RemoteData` object is used to represent the full data pulled from
        the third-party API for an object.


        ### Usage Example

        TODO
      title: RemoteData
    Invoice:
      type: object
      properties:
        id:
          type: string
          format: uuid
        remote_id:
          type:
            - string
            - 'null'
          description: The third-party API ID of the matching object.
        created_at:
          type: string
          format: date-time
          description: The datetime that this object was created by Merge.
        modified_at:
          type: string
          format: date-time
          description: The datetime that this object was modified by Merge.
        type:
          oneOf:
            - $ref: '#/components/schemas/InvoiceTypeEnum'
            - type: 'null'
          description: >-
            Whether the invoice is an accounts receivable or accounts payable.
            If `type` is `ACCOUNTS_PAYABLE`, the invoice is a bill. If `type` is
            `ACCOUNTS_RECEIVABLE`, it is an invoice. This field is an open enum:
            Merge can return a value outside this list when an integration
            provides one it does not map. Pass `show_enum_origins=type` to
            receive the integration's own value instead.
        contact:
          type:
            - string
            - 'null'
          format: uuid
          description: The invoice's contact.
        number:
          type:
            - string
            - 'null'
          description: The invoice's number.
        issue_date:
          type:
            - string
            - 'null'
          format: date-time
          description: The invoice's issue date.
        due_date:
          type:
            - string
            - 'null'
          format: date-time
          description: The invoice's due date.
        paid_on_date:
          type:
            - string
            - 'null'
          format: date-time
          description: The invoice's paid date.
        memo:
          type:
            - string
            - 'null'
          description: The invoice's private note.
        company:
          type:
            - string
            - 'null'
          format: uuid
          description: The company the invoice belongs to.
        employee:
          type:
            - string
            - 'null'
          format: uuid
          description: The employee this overall transaction relates to.
        currency:
          oneOf:
            - $ref: '#/components/schemas/TransactionCurrencyEnum'
            - type: 'null'
          description: The invoice's currency. The currency code in ISO 4217 format.
        exchange_rate:
          type:
            - string
            - 'null'
          format: decimal
          pattern: ^-?\d{0,32}(?:\.\d{0,16})?$
          description: The invoice's exchange rate.
        payment_term:
          type:
            - string
            - 'null'
          format: uuid
          description: The payment term that applies to this transaction.
        total_discount:
          type:
            - number
            - 'null'
          format: double
          description: The total discounts applied to the total cost.
        sub_total:
          type:
            - number
            - 'null'
          format: double
          description: The total amount being paid before taxes.
        status:
          oneOf:
            - $ref: '#/components/schemas/InvoiceStatusEnum'
            - type: 'null'
          description: The status of the invoice.
        total_tax_amount:
          type:
            - number
            - 'null'
          format: double
          description: The total amount being paid in taxes.
        total_amount:
          type:
            - number
            - 'null'
          format: double
          description: The invoice's total amount.
        balance:
          type:
            - number
            - 'null'
          format: double
          description: The invoice's remaining balance.
        remote_updated_at:
          type:
            - string
            - 'null'
          format: date-time
          description: When the third party's invoice entry was updated.
        tracking_categories:
          type: array
          items:
            type: string
            format: uuid
        accounting_period:
          type:
            - string
            - 'null'
          format: uuid
          description: The accounting period that the Invoice was generated in.
        purchase_orders:
          type: array
          items:
            type: string
            format: uuid
        sales_orders:
          type: array
          items:
            type: string
            format: uuid
        payments:
          type: array
          items:
            type: string
            format: uuid
          description: Array of `Payment` object IDs.
        applied_payments:
          type: array
          items:
            type: string
            format: uuid
          description: >-
            A list of the Payment Applied to Lines common models related to a
            given Invoice, Credit Note, or Journal Entry.
        line_items:
          type: array
          items:
            $ref: '#/components/schemas/InvoiceLineItem'
        applied_credit_notes:
          type: array
          items:
            $ref: '#/components/schemas/CreditNoteApplyLineForInvoice'
          description: '`CreditNoteApplyLines` applied to the Invoice.'
        applied_vendor_credits:
          type: array
          items:
            $ref: '#/components/schemas/VendorCreditApplyLineForInvoice'
          description: '`VendorCreditApplyLines` applied to the Invoice.'
        inclusive_of_tax:
          type:
            - boolean
            - 'null'
          description: >-
            If the transaction is inclusive or exclusive of tax. `True` if
            inclusive, `False` if exclusive.
        invoice_url:
          type:
            - string
            - 'null'
          format: uri
          maxLength: 2000
          description: The 3rd party URL of the invoice.
        remote_was_deleted:
          type: boolean
          description: >-
            Indicates whether or not this object has been deleted in the third
            party platform. Full coverage deletion detection is a premium
            add-on. Native deletion detection is offered for free with limited
            coverage. [Learn
            more](https://docs.merge.dev/integrations/hris/supported-features/).
        field_mappings:
          oneOf:
            - $ref: '#/components/schemas/InvoiceFieldMappings'
            - type: 'null'
        remote_data:
          type:
            - array
            - 'null'
          items:
            $ref: '#/components/schemas/RemoteData'
        remote_fields:
          type: array
          items:
            $ref: '#/components/schemas/RemoteField'
      title: Invoice
```