{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/monite/json-schema/monite-accounting-payable-list-schema.json",
  "title": "AccountingPayableList",
  "x-generated": "2026-11-10",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/monite-accounting-data-pull-api-openapi.yml#/components/schemas/AccountingPayableList",
  "properties": {
    "data": {
      "items": {
        "$ref": "#/$defs/AccountingPayable"
      },
      "type": "array"
    }
  },
  "type": "object",
  "required": [
    "data"
  ],
  "$defs": {
    "AccountingLineItem": {
      "properties": {
        "description": {
          "type": "string",
          "description": "The name or description of the product or service being invoiced."
        },
        "discount_amount": {
          "type": "number",
          "description": "Discount amount for this line item (if any)."
        },
        "discount_percentage": {
          "type": "number",
          "description": "Discount percentage for this line item (if any)."
        },
        "ledger_account_id": {
          "type": "string",
          "description": "ID of the ledger account associated with this line item. You can use `GET /ledger_accounts/{ledger_account_id}` to get further details about this ledger account."
        },
        "quantity": {
          "type": "number",
          "description": "The quantity of the product or service."
        },
        "tax_rate_ref": {
          "allOf": [
            {
              "$ref": "#/$defs/AccountingRefObject"
            }
          ],
          "description": "An internal reference to the tax rate in the accounting system that the line item is linked to."
        },
        "unit_amount": {
          "type": "number",
          "description": "The cost per unit of the product or service."
        }
      },
      "type": "object",
      "description": "Contains the details of an invoice line item retrieved from an accounting system."
    },
    "AccountingPayable": {
      "properties": {
        "id": {
          "type": "string",
          "description": "An internal identifier of the payable in the accounting system."
        },
        "amount_due": {
          "type": "number",
          "description": "Remaining amount to be paid."
        },
        "currency": {
          "type": "string",
          "description": "ISO-4217 currency code of the payable."
        },
        "currency_rate": {
          "type": "number",
          "description": "Rate to convert the total amount of the transaction into the entity's base currency at the time of the transaction."
        },
        "due_date": {
          "anyOf": [
            {
              "type": "string",
              "format": "date-time"
            },
            {
              "type": "string",
              "format": "date"
            }
          ],
          "description": "The payable's due date."
        },
        "invoice_number": {
          "type": "string",
          "description": "Invoice number of the payable."
        },
        "lines": {
          "items": {
            "$ref": "#/$defs/AccountingLineItem"
          },
          "type": "array"
        },
        "memo": {
          "type": "string",
          "description": "Any additional information or business notes about the payable."
        },
        "posted_date": {
          "type": "string",
          "format": "date",
          "description": "Date when the payable was added to the accounting service. This may differ from the payable creation date."
        },
        "purchase_order_refs": {
          "items": {
            "$ref": "#/$defs/AccountingPurchaseOrderRef"
          },
          "type": "array",
          "description": "A list of purchase orders linked to the payable, if any."
        },
        "status": {
          "type": "string",
          "description": "The status of the payable in the accounting system. Possible values: `open`, `draft`, `partially_paid`, `paid`, `unknown`, `void`."
        },
        "subtotal": {
          "type": "number",
          "description": "Amount payable, including discounts but excluding VAT/taxes."
        },
        "tax_amount": {
          "type": "number",
          "description": "Total VAT or tax amount."
        },
        "total_amount": {
          "type": "number",
          "description": "The total amount payable, including discounts and VAT/taxes."
        },
        "vendor_ref": {
          "allOf": [
            {
              "$ref": "#/$defs/AccountingVendorRefObject"
            }
          ],
          "description": "Information about the vendor from whom the payable was received."
        }
      },
      "type": "object",
      "required": [
        "id",
        "status",
        "total_amount"
      ],
      "description": "Details of an accounts payable invoice (bill) retrieved from an accounting system."
    },
    "AccountingPurchaseOrderRef": {
      "properties": {
        "id": {
          "type": "string",
          "description": "An internal ID of the purchase order in the accounting system."
        },
        "name": {
          "type": "string",
          "description": "Reference number of the purchase order."
        }
      },
      "type": "object",
      "required": [
        "id"
      ]
    },
    "AccountingRefObject": {
      "properties": {
        "id": {
          "type": "string",
          "description": "An internal ID of the tax rate in the accounting system."
        }
      },
      "type": "object"
    },
    "AccountingVendorRefObject": {
      "properties": {
        "id": {
          "type": "string",
          "description": "A unique identifier of the vendor in the accounting system."
        },
        "name": {
          "type": "string",
          "description": "Vendor name in the accounting system."
        }
      },
      "type": "object",
      "required": [
        "id"
      ]
    }
  }
}