# Retrieve a vendor bill

Operation ID: `getVendorBill`

Group: Accounting › Vendor Bills

[Open in the interactive reference](https://docs.api.lensing.ai/lensing/v1/endpoints/getVendorBill)

`GET /accounting/vendor-bills/{id}`

Read-only: Reads and returns; changes nothing.

Retrieves a vendor bill. The response has the bill's main fields, its line items with their amortization schedules, and its approval decisions.

POST accounting/vendor-bills/search returns the same fields for each match, except approvals. GET accounting/vendor-bills returns the main fields only.

## Parameters

| Name | In | Type | Required | Description |
| --- | --- | --- | --- | --- |
| `Api-Version` | header | string · v1 | yes | The API version this request targets, named by its public identifier. Required on every request; omitting it, or naming a version this company does not have, is answered with 400. This document describes version `v1`. |
| `id` | path | string | yes | The unique identifier of the vendor bill you want to retrieve. Example: `"3b7d5e9c-1a24-4f80-9c6d-2e8f70b13a45"`. |

## Response

`200` Success

Under `data` (getVendorBillOutput):

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `id` | string | yes | The unique identifier for the vendor bill. |
| `vendorBillNumber` | string | yes | The vendor bill number. Stable across edits. |
| `billNumber` | string | yes | The vendor-issued invoice number, as printed on the bill. It is not unique across vendors. |
| `billDate` | date | yes | The date printed on the vendor's invoice. Format YYYY-MM-DD. |
| `serviceDate` | date | no | The date the goods or services were delivered. Format YYYY-MM-DD. Absent when not recorded. |
| `dueDate` | date | yes | The date payment is due. Format YYYY-MM-DD. |
| `currency` | string | yes | The currency the bill is denominated in. Format ISO 4217, for example 'USD'. Governs total, amountPaid, openAmount and every line amount. |
| `status` | string | yes | The approval status. Values include 'pendingApproval', 'approved', 'rejected', 'voided' and 'reversed'. |
| `paymentStatus` | string | no | The payment status. Values include 'unpaid', 'partiallyPaid', 'fullyPaid', 'pending', 'notApplicable' and 'voided'. |
| `postingStatus` | string | no | The accounting posting status, defined by the accounting subsystem, for example 'notPosted', 'posted' or 'postingFailed'. |
| `paymentTerms` | string | no | The payment-terms key applied to this bill, for example 'net30', 'net60' or 'dueOnReceipt'. Inherited from the vendor unless overridden. |
| `total` | decimal | no | The total bill amount, gross, in the bill currency. |
| `amountPaid` | decimal | no | The cumulative amount paid against this bill so far, in the bill currency. |
| `openAmount` | decimal | no | The outstanding amount still owed, total minus amountPaid, in the bill currency. |
| `externalVendorBillId` | string | no | The identifier this bill has in the upstream system that produced it. It is not unique. |
| `vendorId` | string | no | The vendor this bill is from. See id on GET accounting/vendors/:id. |
| `vendorName` | string | no | The name of the vendor this bill is from. |
| `entityId` | string | no | The legal entity this bill is posted under. See id on GET base/entities. |
| `entityName` | string | no | The name of the legal entity this bill is posted under. |
| `purchaseOrderId` | string | no | The purchase order this bill is matched to. See id on GET accounting/purchase-orders/:id. The match is line-level, so it is absent when the bill is matched to no purchase order. |
| `purchaseOrderNumber` | string | no | The number of the purchase order this bill is matched to. Absent when the bill is matched to no purchase order. |
| `externalPurchaseOrderNumber` | string | no | The external reference of the purchase order this bill is matched to. Absent when the bill is matched to no purchase order, or when that purchase order has no external reference. |
| `lastModifiedDate` | date-time | yes | The date and time the vendor bill last changed, in UTC. Format YYYY-MM-DDTHH:mm:ss.sssZ. |
| `approvals` | array<object> | no | The approval decisions on this bill, oldest first. An empty array when no approval policy has matched the bill. |
| `approvals[].decision` | string | yes | What was decided. Values include 'approve' and 'reject'. |
| `approvals[].employeeName` | string | no | The name of the employee who decided. |
| `approvals[].message` | string | no | The reviewer's note, where one was given. |
| `approvals[].decidedAt` | date-time | yes | The date and time the decision was recorded, in UTC. Format YYYY-MM-DDTHH:mm:ss.sssZ. |
| `origin` | string | no | The source system this record came from, as free-form text. Absent when none was supplied. |
| `lines` | array<object> | no | The bill line items, in their order on the bill. An empty array when the bill has none. |
| `lines[].id` | string | yes | The unique identifier for the line item. |
| `lines[].lineNumber` | string | no | The line item number. |
| `lines[].description` | string | no | A description of the line item, typically copied from the vendor's invoice. |
| `lines[].lineType` | string | no | The type of line item. Values include 'expense' and 'prepaidExpense'. |
| `lines[].amount` | decimal | no | The total line amount, gross, in the bill currency. |
| `lines[].currency` | string | no | The currency for the line. It always matches the bill currency. Format ISO 4217, for example 'USD'. |
| `lines[].netAmount` | decimal | no | The line amount excluding VAT, in the bill currency. |
| `lines[].vatAmount` | decimal | no | The computed VAT amount on the line, in the bill currency. |
| `lines[].vatPercentage` | decimal | no | The VAT rate applied, as a percentage. 21 means 21%, not 0.21. |
| `lines[].billableExpense` | string | no | The billable-expense status for this line. Values include 'yes', 'no' and 'skipped'. |
| `lines[].externalVendorBillItemId` | string | no | The identifier this line has in the upstream system that produced it. |
| `lines[].accountId` | string | no | The GL expense account this line posts to. See id on GET accounting/accounts/:id. |
| `lines[].departmentId` | string | no | The department this line is charged to. See id on GET people/departments/:id. |
| `lines[].crossChargeEntityId` | string | no | The legal entity this line is cross charged to (Charge to). See id on GET base/entities. Absent when the line is not cross charged. |
| `lines[].amortizationSchedules` | array<object> | no | The amortization schedules this line is deferred over, one per accounting book. Absent when the line is not amortized, which is every line whose lineType is not 'prepaidExpense'. Read the scheduled installments with GET accounting/amortization-schedule-lines, filtering on amortizationScheduleHeaderId. |
| `lines[].amortizationSchedules[].id` | string | yes | The unique identifier for the amortization schedule. Pass it as amortizationScheduleHeaderId to GET accounting/amortization-schedule-lines to read its installments. |
| `lines[].amortizationSchedules[].bookId` | string | no | The accounting book this schedule posts into. It is what distinguishes the entries of this array. See id on GET accounting/books/:id. |
| `lines[].amortizationSchedules[].bookName` | string | no | The name of the accounting book this schedule posts into. |
| `lines[].amortizationSchedules[].status` | string | no | How far the schedule has progressed. Values include 'notStarted', 'inProgress', 'completed' and 'voided'. A schedule created alongside an unposted bill reads 'notStarted' until the bill posts. |
| `lines[].amortizationSchedules[].amortizationMethod` | string | no | How the schedule spreads its total. Values include 'exactDays', 'pointInTime', 'straightLine', 'straightLineProRateFirstLast' and 'usageBased'. |
| `lines[].amortizationSchedules[].amortizationStartDate` | date | no | The first day the schedule amortizes over. Format YYYY-MM-DD. |
| `lines[].amortizationSchedules[].amortizationEndDate` | date | no | The last day the schedule amortizes over, inclusive. Format YYYY-MM-DD. |
| `lines[].amortizationSchedules[].term` | decimal | no | The number of months the schedule spreads over. A count, not an amount, so it carries no currency. |
| `lines[].amortizationSchedules[].description` | string | no | The note recorded against the schedule, where one was given. |
| `lines[].amortizationSchedules[].deferredAccountId` | string | no | The general ledger account the deferred balance sits on until it is recognized. See id on GET accounting/accounts/:id. |
| `lines[].amortizationSchedules[].recognitionAccountId` | string | no | The general ledger account each installment recognizes the expense into. See id on GET accounting/accounts/:id. It is taken from the schedule's installments, so it is absent on a schedule that has none yet. |
| `lines[].amortizationSchedules[].totalRecognized` | decimal | no | The amount recognized so far across the schedule's posted installments, in the bill currency. Zero until the first installment posts. |

```json
{
  "data": {
    "id": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
    "vendorBillNumber": "<vendorBillNumber>",
    "billNumber": "<billNumber>",
    "billDate": "2026-01-15",
    "serviceDate": "2026-01-15",
    "dueDate": "2026-01-15",
    "currency": "<currency>",
    "status": "<status>",
    "paymentStatus": "<paymentStatus>",
    "postingStatus": "<postingStatus>",
    "paymentTerms": "<paymentTerms>",
    "total": "19.99",
    "amountPaid": "19.99",
    "openAmount": "19.99",
    "externalVendorBillId": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
    "vendorId": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
    "vendorName": "<vendorName>",
    "entityId": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
    "entityName": "<entityName>",
    "purchaseOrderId": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
    "purchaseOrderNumber": "<purchaseOrderNumber>",
    "externalPurchaseOrderNumber": "<externalPurchaseOrderNumber>",
    "lastModifiedDate": "2026-01-15T09:30:00.000Z",
    "approvals": [
      {
        "decision": "<decision>",
        "employeeName": "<employeeName>",
        "message": "<message>",
        "decidedAt": "2026-01-15T09:30:00.000Z"
      }
    ],
    "origin": "<origin>",
    "lines": [
      {
        "id": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
        "lineNumber": "<lineNumber>",
        "description": "<description>",
        "lineType": "<lineType>",
        "amount": "19.99",
        "currency": "<currency>",
        "netAmount": "19.99",
        "vatAmount": "19.99",
        "vatPercentage": "19.99",
        "billableExpense": "<billableExpense>",
        "externalVendorBillItemId": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
        "accountId": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
        "departmentId": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
        "crossChargeEntityId": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
        "amortizationSchedules": [
          {
            "id": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
            "bookId": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
            "bookName": "<bookName>",
            "status": "<status>",
            "amortizationMethod": "<amortizationMethod>",
            "amortizationStartDate": "2026-01-15",
            "amortizationEndDate": "2026-01-15",
            "term": "19.99",
            "description": "<description>",
            "deferredAccountId": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
            "recognitionAccountId": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
            "totalRecognized": "19.99"
          }
        ]
      }
    ]
  },
  "diagnostics": [
    {
      "code": "<code>",
      "message": "<message>",
      "severity": "error",
      "path": [
        "<path>"
      ],
      "details": "<details>"
    }
  ]
}
```

## Errors

| Code | Status |
| --- | --- |
| `NOT_FOUND` | 400 |

## Statuses

- `400` — Invalid request or business failure. Codes: NOT_FOUND
- `401` — The request carries no valid access token.
- `403` — Not authorized
- `404` — Not found
- `429` — Too many requests from this client address. The response has no body and no `Retry-After` header.
- `500` — Internal server error
