Skip to main content
POST
Create a vendor bill

Authorizations

Authorization
string
header
required

API key issued per entity via Settings > Developers > API Keys. Each key carries scopes (e.g. orders:read, products:write). Bearer token format: Authorization: Bearer ark_live_ent_Test keys use ark_test_ent_. Both are issued per entity
via Settings > Developers > API Keys.

Body

application/json
vendor_id
string<uuid>
required
bill_date
string<date>
required
items
object[]
required

The bill's lines (VendorBillLineInput, the one line shape every bill door reads).

po_id
string<uuid>
effective_date
string<date>

The posting date: the date the bill's journal entries post on, and the anchor of its due date. Defaults to bill_date. It must fall inside the entity's posting-date window (entities.settings.manual_je_future_days ahead of today UTC, default 0; manual_je_backdate_days behind it, default 180), in an open accounting period, and outside a locked AP tax year; otherwise the bill is refused 422 and nothing is written.

backdate_reason
string

Why the posting date is further back than the backdate window. Read only when the window refuses it; granted when the calling identity holds accounting.close_period and an accounting period covers the date, and recorded on the bill's own audit row.

Required string length: 4 - 500
future_reason
string

The forward mirror of backdate_reason: why the posting date is further ahead of today (UTC) than the forward window. Granted on the same terms (and a MONTHLY accounting period covering the date); the bill's entry then posts on that date. Recorded on the bill's own audit row.

Required string length: 4 - 500
due_date
string<date>
notes
string
suppress_gl
boolean

Migration:write scope required. Skip GL posting for historical import.

landed_cost_receipt_txn_ids
string<uuid>[]

For a standalone landed bill (landed lines, no goods lines, no po_id): the purchase receipts it lands on. A non-empty set on a bill that names a po_id is refused 422 landed_receipt_set_with_po on every bill door (a landed line on a PO-linked bill lands on that PO's receipts). Any number of landed bills may land on one receipt (freight and duty on one shipment); an id that is not a purchase receipt of the entity is refused 422 invalid_receipt. Every landed bill already on these receipts is returned in landed_receipt_warnings (bill, vendor, categories, amount, date, and a sentence).

allow_duplicate_override
boolean

Overrides a duplicate refusal, with duplicate_override_reason; the override is audited. It answers the vendor-invoice-number duplicate (409 duplicate_vendor_invoice_number) and the likely duplicate LANDED charge (409 landed_duplicate_charge: a bill already covering every receipt this bill lands on, in any mode, carries a landed line of the same category within one percent of a new line; the refusal lists the candidates and requires_override). Never a hard block.

duplicate_override_reason
string

Why the duplicate is a separate charge (required with allow_duplicate_override; written to the audit trail).

Response

Created vendor bill. A bill with landed lines also carries, beside data, landed_receipt_warnings (every landed bill already on the receipts it lands on, in any mode), landed_allocation (what the allocation posted and the basis each landed line actually used, a fallback named) and landed_duplicate_overridden when an override was used. The cost figures in them follow the margin permission (an API key never receives them).

A vendor invoice (AP). Posts to AP and inventory/expense on approval.

id
string<uuid>
object
enum<string>
Available options:
vendor_bill
entity_id
string<uuid>
read-only
bill_number
string
read-only

Sequential bill number per entity.

vendor_invoice_number
string | null

Vendor's invoice number.

vendor_id
string<uuid>
po_id
string<uuid> | null
status
enum<string>
read-only
Available options:
draft,
pending_approval,
approved,
rejected,
paid,
partially_paid,
voided
bill_date
string<date>

The vendor's document date.

effective_date
string<date>

The posting date: the date the bill's journal entries post to the general ledger and the anchor of its due date. Defaults to bill_date. It may be ahead of or behind bill_date inside the entity's posting-date window (Settings > Fiscal Year); a posted bill's posting date moves only through a linked pair of correcting entries, never by editing this field.

posted_entry_date
string<date> | null
read-only

The date of the bill's own journal entry (returned by GET /v1/vendor_bills/{id}).

ledger_posting_date
string<date> | null
read-only

The date the bill's liability sits on in the ledger now, which follows a posting-date correction (returned by GET /v1/vendor_bills/{id}).

redate_block
object | null
read-only

Null when the bill's posting date can still be moved; otherwise why not, as the re-date door would refuse it (for example bill_terminal for a voided bill). Returned by GET /v1/vendor_bills/{id}.

redate_latest_date
string<date> | null
read-only

The latest date the bill's posting date may move to: the first day money or credit relieved the bill (a posted payment, an applied vendor credit, an applied prepayment), so the vendor's payable never runs negative in between; null when nothing has relieved it. Returned by GET /v1/vendor_bills/{id}.

posting_corrections
object[]
read-only

Every posting-date correction of this bill, newest first. Each is a linked pair of CORRECTION journal entries: the OUT leg removes the liability from from_date and the IN leg records it on to_date. At most one pair is live (the one carrying the liability now). Returned by GET /v1/vendor_bills/{id}.

due_date
string<date> | null
subtotal
number
tax_total
number
shipping_total
number
bill_total
number
amount_paid
number
read-only
balance_due
number
read-only

bill_total minus amount_paid. Unlike the sales-side orders.balance_due, this is NEVER coerced to 0 by document lifecycle: a draft or terminal vendor bill still reports its true remaining payable. There is therefore no separate amount_due field on this resource. SSOT: utils/ap-helpers.mjs::updateAPBalance.

currency
string
default:USD
payment_term_id
string<uuid> | null
notes
string | null
metadata
object | null
created_at
string<date-time>
read-only
updated_at
string<date-time>
read-only
landed_receipts_reached
object[]
read-only

Every receipt the bill's landed allocations reached, in all three modes (Case A, a landed-only bill naming a PO, a receipt set); allocated_amount only for a caller with the margin permission (never an API key today). Returned by GET /v1/vendor-bills/{id}.

landed_receipt_warnings
object[]
landed_allocation
object

What a landed allocation posted and the basis each landed line actually used (a fallback is named). The inventory and COGS portions are omitted for a caller without the margin permission (every API key today).

landed_duplicate_overridden
boolean