# Returns the vendor bill with the given identifier.

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

Group: Accounting › Vendor Bills · Operation ID: `getVendorBill`

A vendor bill is an invoice received from a vendor, with its header and line items. It shares its read with POST accounting/vendor-bills/search, which returns the same record. The list at GET accounting/vendor-bills is header-only, so the line items come back here and on search.

[Open in the interactive reference](https://docs.api.lensing.ai/?op=getVendorBill)

## Parameters

| Name | In | Type | Required | Description |
| --- | --- | --- | --- | --- |
| `Api-Version` | header | `"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 for the vendor bill to return. |

## 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` | string (date) | yes | The date printed on the vendor's invoice. Format YYYY-MM-DD. |
| `serviceDate` | string (date) | no | The date the goods or services were delivered. Format YYYY-MM-DD. Absent when not recorded. |
| `dueDate` | string (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` | string (decimal) | no | The total bill amount, gross, in the bill currency. |
| `amountPaid` | string (decimal) | no | The cumulative amount paid against this bill so far, in the bill currency. |
| `openAmount` | string (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` | string (date-time) | yes | The date and time the vendor bill last changed, in UTC. Format YYYY-MM-DDTHH:mm:ss.sssZ. |
| `approvals` | array of 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` | string (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 of 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` | string (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` | string (decimal) | no | The line amount excluding VAT, in the bill currency. |
| `lines[].vatAmount` | string (decimal) | no | The computed VAT amount on the line, in the bill currency. |
| `lines[].vatPercentage` | string (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 departments/:id. |

## Errors

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

## Statuses

- `400` — Invalid request or business failure. Codes: NOT_FOUND
- `401` — Missing or invalid access token
- `403` — Not authorized
- `404` — Not found
- `429` — Too many requests
- `500` — Internal server error
