Create a payable

Create a new Payable in Created status. Idempotent via Idempotency-Key. Fires Payable.Created on success. If externalId duplicates an existing payable for the same payer Account, returns 409 ResourceConflict; create is not an upsert.

Recent Requests
Log in to see full request history
TimeStatusUser Agent
Retrieving recent requests…
LoadingLoading…
Body Params
string
required
length between 1 and 200
^(?=.*\S)[^\x00-\x1F\x7F]+$

V3 Payee relationship-record id; never an Account id. This may be a Wingspan id or one of the legacy composite relationship ids returned by the read/list APIs. When supplied, the payable is issued under the payer's default engagement, which the payee is assigned if it does not hold it yet. Rejected with 422 when the payer has no default engagement.

string
^(?:[A-Za-z0-9_.]{22}|[a-f0-9]{24})$

Optional Account id hint for the payee. When supplied it must match the payee Account resolved from the selected relationship.

string
length between 1 and 200
^(?=.*\S)[^\x00-\x1F\x7F]+$

Explicit PayeeEngagement relationship-record id. Mutually exclusive with payeeId.

string
length between 1 and 255
^(?=.*\S)[^\x00-\x1F\x7F]+$

Customer's own payable ID for reconciliation. Accepted on create and echoed on every read. Duplicate values under the same payer Account return 409 ResourceConflict; create is not an upsert.

string

Not yet supported for V3 payable create; supplying it returns 422.

string
enum
required

Currency codes currently accepted by V3 invoice/payable create.

Allowed:
lineItems
array of objects
required
length ≥ 1
lineItems*

Writable line-item projection used by Invoice and Payable create requests.

string
string
enum
Allowed:
double

Use totalCost OR quantity + unitCost, not both

double
double

A monetary amount as a JSON number in major units, with decimal places carrying the minor units defined for its currency (USD/EUR: 2, JPY: 0, BHD: 3, ...) — e.g. 100.00. Never a string and never minor-unit (cent) integers. The currency comes from the enclosing resource's currency field; amounts with more decimal places than the currency supports are rejected with 422 ValidationError. Wingspan converts to exact minor units at the service boundary, so callers never need sub-minor-unit precision.

string

Unit of measure for quantity (e.g. "hours", "each").

string
discount
object

Per-line discount — a percentage or a fixed amount (not both). Supplying both mutually-exclusive members returns 422 ConflictingFields.

accounting
object

Generic accounting classification dimensions that map cleanly into external bookkeeping systems (QuickBooks, Xero, NetSuite, Sage). These are the set of fields accounting systems consistently support as line-item dimensions. Fields are optional; populate only what's relevant to the customer's chart of accounts. Wingspan stores and returns these values verbatim. Mapping them into a provider's native identifiers is a separate integration concern.

splits
array of objects

Optional fixed-amount per-line collaborator splits. Mutually exclusive with document-level splits; each split's payeeEngagementId is authoritative.

splits
metadata
object

Free-form key-value pairs. Max 50 keys; key length at most 40 characters; value length at most 500 characters. Where a list endpoint declares metadata filtering, it uses the QueryQL namespace via filter[metadata.{key}][eq]=value or filter[metadata.{key}][in][]=value. Endpoints that do not declare the dynamic Metadata filter do not support Metadata filtering.

splits
array of objects

Optional document-level collaborator splits. Mutually exclusive with lineItems[].splits.

splits
date
required
string
metadata
object

Free-form key-value pairs. Max 50 keys; key length at most 40 characters; value length at most 500 characters. Where a list endpoint declares metadata filtering, it uses the QueryQL namespace via filter[metadata.{key}][eq]=value or filter[metadata.{key}][in][]=value. Endpoints that do not declare the dynamic Metadata filter do not support Metadata filtering.

sourceWorkLogIds
array of strings

Not yet supported for V3 payable create; supplying a non-empty array returns 422.

sourceWorkLogIds
quickbooks
object

Link this payable to a QBO Bill/BillPayment created out-of-band, and/or suppress quickbooks-sender's own sync. Omit to leave unmanaged by the caller.

Headers
string
length between 1 and 255
^[\x21-\x7e]{1,255}$

Optional idempotency token for authenticated POST and PATCH requests. Reusing the same key and body returns the cached response for 24 hours, except credential operations that explicitly document a 409 because one-time secret material is never cached; reusing it with a different body returns 409 IdempotencyKeyConflict. Use 1-255 printable ASCII characters.

string
^(?:[A-Za-z0-9_.]{22}|[a-f0-9]{24})$

Select the Account for an Account-scoped operation. A direct ServiceAccount API key MUST supply this header, and the target must be within the ServiceAccount owner's or Authorization grant's Account boundary. A Person bearer may select an Account on which it has an active Stakeholder, and an Account session may select its bound Account (or a descendant only when the session explicitly includes descendants).

string
enum
Defaults to application/json

Generated from available response content types

Allowed:
Responses

Language
Credentials
Bearer
JWT
LoadingLoading…
Response
Click Try It! to start a request and see the response here! Or choose an example:
application/json
application/problem+json