{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/divvy/json-schema/divvy-bill-without-approvers-response-dto-schema.json",
  "title": "BillWithoutApproversResponseDto",
  "description": "Bills response without approvers.",
  "x-generated": "2026-11-10",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/divvy-bills-api-openapi.yml#/components/schemas/BillWithoutApproversResponseDto",
  "required": [
    "archived",
    "id",
    "vendorId"
  ],
  "type": "object",
  "properties": {
    "id": {
      "type": "string",
      "description": "BILL-generated ID of the bill. The value begins with `00n`."
    },
    "archived": {
      "type": "boolean",
      "description": "Set as `true` if the bill is archived"
    },
    "vendorId": {
      "type": "string",
      "description": "BILL-generated ID of the vendor. The value begins with `009`."
    },
    "fundingAmount": {
      "type": "number",
      "description": "Bill total amount. This value is in USD."
    },
    "amount": {
      "type": "number",
      "description": "Bill total amount. For a bill in an international currency (not USD), this value is in the local currency."
    },
    "paidAmount": {
      "type": "number",
      "description": "Bill paid amount. This value is the sum of all cleared payments and any credit amount applied to the bill."
    },
    "dueAmount": {
      "type": "number",
      "description": "Bill due amount. The value is calculated by subtracting any applied credits (`creditAmount`), scheduled payment (`scheduledAmount`), and cleared payment from the bill `amount`."
    },
    "scheduledAmount": {
      "type": "number",
      "description": "Bill scheduled amount. The value is set as the vendor payment amount that is pending clearance."
    },
    "creditAmount": {
      "type": "number",
      "description": "Credit amount applied to the bill"
    },
    "exchangeRate": {
      "type": "number",
      "description": "Exchange rate for the bill amount in an international currency (not USD).\n\nThe BILL exchange rate changes periodically and a different rate may apply at the time of payment."
    },
    "description": {
      "type": "string",
      "description": "Bill description"
    },
    "dueDate": {
      "type": "string",
      "description": "Bill due date. The value is in the `yyyy-MM-dd` format.",
      "format": "date"
    },
    "paymentTermId": {
      "type": "string"
    },
    "invoice": {
      "allOf": [
        {
          "$ref": "#/$defs/Invoice"
        },
        {
          "description": "Invoice information"
        }
      ]
    },
    "billLineItems": {
      "type": "array",
      "description": "Bill line item information",
      "items": {
        "$ref": "#/$defs/BillResponseLineItem"
      }
    },
    "payFromChartOfAccountId": {
      "type": "string",
      "description": "BILL-generated ID of the chart of accounts for the bill payment. The value begins with `0ca`."
    },
    "paymentStatus": {
      "allOf": [
        {
          "$ref": "#/$defs/BillPaymentStatusDto"
        },
        {
          "description": "Bill payment status."
        }
      ]
    },
    "approvalStatus": {
      "allOf": [
        {
          "$ref": "#/$defs/BillApprovalStatusResponse"
        },
        {
          "description": "Bill approval status."
        }
      ]
    },
    "createdBy": {
      "type": "string",
      "description": "BILL-generated ID of the user that created the bill. The value begins with `006`."
    },
    "createdTime": {
      "type": "string",
      "description": "Created date and time",
      "format": "date-time"
    },
    "updatedTime": {
      "type": "string",
      "description": "Updated date and time",
      "format": "date-time"
    },
    "classifications": {
      "allOf": [
        {
          "$ref": "#/$defs/BillClassificationsDto"
        },
        {
          "description": "General ledger classifications information for the bill"
        }
      ]
    },
    "purchaseOrderNumber": {
      "type": "string",
      "description": "Purchase order number linked with the bill"
    }
  },
  "$defs": {
    "BillApprovalStatusResponse": {
      "type": "string",
      "description": "Approval status of a bill response.",
      "enum": [
        "UNASSIGNED",
        "ASSIGNED",
        "APPROVED",
        "APPROVING",
        "DENIED",
        "UNDEFINED"
      ]
    },
    "BillClassificationsDto": {
      "type": "object",
      "properties": {
        "chartOfAccountId": {
          "type": "string",
          "description": "BILL-generated ID of the chart of accounts. The value begins with `0ca`."
        },
        "accountingClassId": {
          "type": "string",
          "description": "BILL-generated ID of the accounting class. The value begins with `cls`."
        },
        "departmentId": {
          "type": "string",
          "description": "BILL-generated ID of the department. The value begins with `0de`."
        },
        "locationId": {
          "type": "string",
          "description": "BILL-generated ID of the location. The value begins with `loc`."
        },
        "itemId": {
          "type": "string",
          "description": "BILL-generated ID of the item. The value begins with `0ii`."
        }
      },
      "description": "DTO for Bill classifications."
    },
    "BillLineItemClassificationsDto": {
      "type": "object",
      "properties": {
        "chartOfAccountId": {
          "type": "string",
          "description": "BILL-generated ID of the chart of accounts. The value begins with `0ca`."
        },
        "accountingClassId": {
          "type": "string",
          "description": "BILL-generated ID of the accounting class. The value begins with `cls`."
        },
        "departmentId": {
          "type": "string",
          "description": "BILL-generated ID of the department. The value begins with `0de`."
        },
        "employeeId": {
          "type": "string",
          "description": "BILL-generated ID of the employee. The value begins with `emp`."
        },
        "jobId": {
          "type": "string",
          "description": "BILL-generated ID of the job. The value begins with `job`."
        },
        "locationId": {
          "type": "string",
          "description": "BILL-generated ID of the location. The value begins with `loc`."
        },
        "itemId": {
          "type": "string",
          "description": "BILL-generated ID of the item. The value begins with `0ii`."
        },
        "customerId": {
          "type": "string",
          "description": "BILL-generated ID of the customer. The value begins with `0cu`."
        }
      },
      "description": "DTO for Bill Line Item classifications."
    },
    "BillPaymentStatusDto": {
      "type": "string",
      "description": "Payment Status of a bill.",
      "enum": [
        "PAID",
        "UNPAID",
        "PARTIALLY_PAID",
        "SCHEDULED",
        "IN_PROCESS",
        "UNDEFINED"
      ]
    },
    "BillResponseLineItem": {
      "required": [
        "amount"
      ],
      "type": "object",
      "properties": {
        "id": {
          "type": "string",
          "description": "BILL-generated ID of the bill line item. The value begins with `bli`."
        },
        "amount": {
          "type": "number",
          "description": "Bill line item amount. For a bill in an international currency (not USD), this value is in the local currency.\n\nIf you set `amount`, `quantity`, and `price`, BILL uses the `amount` value as the bill line item total amount."
        },
        "quantity": {
          "type": "number",
          "description": "Bill line item unit quantity"
        },
        "price": {
          "type": "number",
          "description": "Bill line item unit price. For a bill in an international currency (not USD), this value is in the local currency."
        },
        "description": {
          "type": "string",
          "description": "Bill line item description"
        },
        "classifications": {
          "allOf": [
            {
              "$ref": "#/$defs/BillLineItemClassificationsDto"
            },
            {
              "description": "General ledger classifications information for the bill line item"
            }
          ]
        }
      },
      "description": "Line items that define a bill's overall amount."
    },
    "Invoice": {
      "required": [
        "invoiceDate",
        "invoiceNumber"
      ],
      "type": "object",
      "properties": {
        "invoiceNumber": {
          "maxLength": 100,
          "minLength": 1,
          "type": "string",
          "description": "User-generated invoice number. This value can be your chosen number scheme or bill due date."
        },
        "invoiceDate": {
          "type": "string",
          "description": "Date when the invoice is sent. This value is in the `yyyy-MM-dd` format.",
          "format": "date"
        }
      },
      "description": "Invoice linked to a bill."
    }
  }
}