Vendors
List vendors
Credential: a company's API key or OAuth token.
Retrieves all vendors for your company, sorted by vendor number. Each vendor
carries its full metadata map.
Pass metadata[key]=value query parameters to return only the vendors whose
metadata carries every given key with exactly the given value (AND semantics,
exact match, at most 10 pairs). A request with more than 10 pairs returns 400
with error code METADATA_TOO_MANY_FILTERS.
The unfiltered list is cached for 5 seconds; creating a vendor through this API invalidates the cache, so a just-created vendor is immediately visible. A filtered list is never cached, so a metadata change is visible on the next filtered read.
Pagination
The list is returned in full, as an array, unless you send cursor,
page or limit. Sending any of them switches the response to a
paginated object (data, total, page, limit, totalPages,
nextCursor, hasMore); page and limit take their defaults when
omitted. A paginated read is never cached.
To walk the whole list, send limit and then pass each response's
nextCursor back as cursor, with the same filters, until hasMore is
false. Paging by page is deprecated, and page cannot be sent with
cursor (400 PAGINATION_CURSOR_WITH_PAGE). A cursor replayed with other filters is
refused with 400 PAGINATION_INVALID_CURSOR. From
2026-12-31, a page past the first of a list with more
than 10,000 items is refused with
400 PAGINATION_OFFSET_TOO_DEEP.
DEPRECATED — sunset on 2026-12-31 (RFC 8594; every response carries Deprecation/Sunset/Link headers). Migrate to the supplier endpoints under /api/v1/suppliers — identical shapes with supplier-named fields and SUPPLIER_* error codes.
Required Scope
suppliers-read
query Parameters
Exact-match metadata filters in the form metadata[key]=value. Multiple pairs combine with AND semantics — a record matches only if it carries every given key with exactly the given value. At most 10 pairs per request.
cursorOpaque cursor from the previous response's nextCursor. Returns the items after it, in the same order. Send the same filters as the request that produced it, and do not send page. The preferred way to page through the list. Sending cursor, page or limit switches the response from the full array to a paginated object.
pageDeprecated: page with cursor instead. Page number (1-indexed). Sending cursor, page or limit switches the response from the full array to a paginated object. When only limit or cursor is sent, page is 1.
limitNumber of items per page. Sending cursor, page or limit switches the response from the full array to a paginated object. When limit is omitted from a paginated request, it is 25.
List vendors › Responses
The full list of vendors matching the given filters, or one page of it when cursor, page or limit is sent
Decision Table
| Variant | Matching Criteria |
|---|---|
| type = array | |
| type = object · requires: data, total, page +4 more |
idThe unique identifier of the vendor
vendorNumberVendor number
nameName of the vendor
vendorGroupIdVendor group ID
currencyCurrency code
statusVendor status
vendorGroupNameVendor group name
emailEmail address
phonePhone number
addressStreet address
cityCity
postalCodePostal code
countryCodeTwo-letter country code (ISO 3166-1 alpha-2)
vatNumberVAT registration number
attentionAttention field
paymentTermsPayment terms in days
openingBalanceOpening balance in the company base currency (signed: positive = we owe the vendor)
Key-value metadata attached to the vendor
Create a vendor
Credential: a company's API key or OAuth token.
Creates a vendor together with its contacts.
vendorNumber is trimmed and must be unique within your company — a
duplicate returns 400 with error code VENDOR_NUMBER_ALREADY_EXISTS.
Exactly one contact must be marked as default. When you provide a single
contact it is made the default automatically; otherwise a missing or
duplicated default returns 400 with error code CONTACT_DEFAULT_REQUIRED
or CONTACT_MULTIPLE_DEFAULTS.
vendorGroupId must reference an existing vendor group in your company
(404 VENDOR_GROUP_NOT_FOUND), and defaultAccountId, when provided,
must reference an existing ledger account (404 LEDGER_NOT_FOUND).
An optional metadata map (string keys to string values, at most 50 entries,
keys up to 128 characters, values up to 500 characters) is stored with the
vendor. An invalid map is rejected before the vendor is created, with error
code METADATA_KEY_REQUIRED, METADATA_KEY_TOO_LONG,
METADATA_VALUE_TOO_LONG, METADATA_DUPLICATE_KEY or
METADATA_TOO_MANY_ENTRIES.
The response contains only the new vendor's id and vendorNumber;
fetch the full record, including its metadata, via the list endpoint.
DEPRECATED — sunset on 2026-12-31 (RFC 8594; every response carries Deprecation/Sunset/Link headers). Migrate to the supplier endpoints under /api/v1/suppliers — identical shapes with supplier-named fields and SUPPLIER_* error codes.
Required Scope
suppliers-write
Headers
x-api-idempotency-keyOptional idempotency key for safely retrying mutating requests.
Create a vendor › Request Body
vendorNumberUnique vendor number
nameVendor name
vendorGroupIdVendor group ID
currency^[A-Za-z]{3}$ · requiredThe currency this vendor bills us in, ISO 4217 alpha-3.
countryCodeTwo-letter country code
Contacts for the vendor. At least one contact with isDefault: true is required.
emailEmail address
phonePhone number
addressStreet address
cityCity
postalCodePostal code
vatNumberVAT registration number
attentionAttention field
paymentTermsPayment terms in days
openingBalanceOpening balance in the company base currency, seeding payables that predate LedgerBee. Signed: positive = we owe the vendor, negative = a credit position.
defaultAccountIdDefault ledger account ID
Key-value metadata to attach to the vendor. At most 50 entries; keys up to 128 characters, string values up to 500 characters. Read it back, or filter on it, through the list endpoint.
Create a vendor › Responses
Vendor created successfully
idThe unique identifier of the created vendor
vendorNumberVendor number
List vendor contacts
Credential: a company's API key or OAuth token.
Retrieves all contacts for a vendor, with the default contact first and the rest sorted alphabetically by name.
Returns 404 with error code VENDOR_NOT_FOUND when the vendor does not
exist in your company.
DEPRECATED — sunset on 2026-12-31 (RFC 8594; every response carries Deprecation/Sunset/Link headers). Migrate to the supplier endpoints under /api/v1/suppliers — identical shapes with supplier-named fields and SUPPLIER_* error codes.
Required Scope
suppliers-read
path Parameters
vendorIdVendor ID
List vendor contacts › Responses
List of contacts for a vendor
idThe unique identifier of the contact
nameName of the contact
isDefaultForVendorWhether this is the default contact for the vendor
emailEmail address
phonePhone number
List vendor departments
Credential: a company's API key or OAuth token.
Retrieves all departments for a vendor, with the default department first and the rest sorted alphabetically by name.
Returns 404 with error code VENDOR_NOT_FOUND when the vendor does not
exist in your company.
DEPRECATED — sunset on 2026-12-31 (RFC 8594; every response carries Deprecation/Sunset/Link headers). Migrate to the supplier endpoints under /api/v1/suppliers — identical shapes with supplier-named fields and SUPPLIER_* error codes.
Required Scope
suppliers-read
path Parameters
vendorIdVendor ID
List vendor departments › Responses
List of departments for a vendor
idThe unique identifier of the department
nameName of the department
isDefaultWhether this is the default department for the vendor
isActiveWhether the department is active
poNumberPurchase order number
eanNumberEAN number for e-invoicing
addressStreet address
cityCity
postalCodePostal code
countryCodeTwo-letter country code (ISO 3166-1 alpha-2)
List vendor groups
Credential: a company's API key or OAuth token.
Retrieves all vendor groups for your company, sorted alphabetically by name.
The list is cached for 5 seconds.
DEPRECATED — sunset on 2026-12-31 (RFC 8594; every response carries Deprecation/Sunset/Link headers). Migrate to the supplier endpoints under /api/v1/suppliers — identical shapes with supplier-named fields and SUPPLIER_* error codes.
Required Scope
suppliers-read
List vendor groups › Responses
List of vendor groups for the company
idThe unique identifier of the vendor group
nameName of the vendor group
descriptionDescription of the vendor group
defaultAccountIdDefault ledger account ID