Skip to content

Purchasing API

The buying side: suppliers, price lists, orders, deliveries, bills, claims and the payment run.

The same operations are in the interactive API reference, and the whole contract is in the OpenAPI document.

GET/v1/purchasing/suppliers

List suppliers

The suppliers the workspace buys from, newest first, each with whether their account can be paid yet and how they have performed. Needs purchasing:read.

Scope purchasing:read. Accepts: API key or personal access token. Open in the API reference

ParameterInTypeRequiredDescription
limitqueryintegerNoHow many items to return. Default 50, at most 100.
cursorquerystringNoThe `next_cursor` of the previous page. Opaque; never built by the client.
AirFone-VersionheaderstringNoThe API version to use, as a date. Defaults to the version the account was pinned to.

POST/v1/purchasing/suppliers

Add a supplier

Adds a supplier. Their account is added separately and is not paid until the supplier has been called back and the owner confirms it. Needs purchasing:write.

Scope purchasing:write. Accepts: API key or personal access token. Open in the API reference

ParameterInTypeRequiredDescription
AirFone-VersionheaderstringNoThe API version to use, as a date. Defaults to the version the account was pinned to.

GET/v1/purchasing/suppliers/{id}

Get a supplier

One supplier. Needs purchasing:read.

Scope purchasing:read. Accepts: API key or personal access token. Open in the API reference

ParameterInTypeRequiredDescription
idpathstringYesThe resource id.
AirFone-VersionheaderstringNoThe API version to use, as a date. Defaults to the version the account was pinned to.

POST/v1/purchasing/suppliers/{id}/payee

Put an account on file

Sets the account the supplier is paid into. A new or changed account is unconfirmed and is held after it is confirmed for a day before it can be paid; details read from a message or a document are never taken. Needs purchasing:write.

Scope purchasing:write. Accepts: API key or personal access token. Open in the API reference

ParameterInTypeRequiredDescription
idpathstringYesThe resource id.
AirFone-VersionheaderstringNoThe API version to use, as a date. Defaults to the version the account was pinned to.

POST/v1/purchasing/suppliers/{id}/payee/verify

Confirm the account

Says that the supplier was called back on the number already on file and confirmed the account. Only an owner may. Needs purchasing:write.

Scope purchasing:write. Accepts: API key or personal access token. Open in the API reference

ParameterInTypeRequiredDescription
idpathstringYesThe resource id.
AirFone-VersionheaderstringNoThe API version to use, as a date. Defaults to the version the account was pinned to.

POST/v1/purchasing/suppliers/{id}/state

Hold or drop a supplier

Marks the supplier active, on_hold (will not ship until paid, so a payment keeps supply) or dropped (never paid or ordered from). Needs purchasing:write.

Scope purchasing:write. Accepts: API key or personal access token. Open in the API reference

ParameterInTypeRequiredDescription
idpathstringYesThe resource id.
AirFone-VersionheaderstringNoThe API version to use, as a date. Defaults to the version the account was pinned to.

GET/v1/purchasing/price-lists

List price lists

What suppliers quoted, with the dates each holds and whether it is current, ends soon, has ended or never said when it ends. supplier limits the list to one. Needs purchasing:read.

Scope purchasing:read. Accepts: API key or personal access token. Open in the API reference

ParameterInTypeRequiredDescription
limitqueryintegerNoHow many items to return. Default 50, at most 100.
cursorquerystringNoThe `next_cursor` of the previous page. Opaque; never built by the client.
supplierquerystringNoOnly this supplier's lists.
AirFone-VersionheaderstringNoThe API version to use, as a date. Defaults to the version the account was pinned to.

POST/v1/purchasing/price-lists

Keep a price list

Keeps a quote with its expiry. A list with no end date is shown for the owner to ask about. Needs purchasing:write.

Scope purchasing:write. Accepts: API key or personal access token. Open in the API reference

ParameterInTypeRequiredDescription
AirFone-VersionheaderstringNoThe API version to use, as a date. Defaults to the version the account was pinned to.

GET/v1/purchasing/orders

List purchase orders

Orders to suppliers, newest first. Needs purchasing:read.

Scope purchasing:read. Accepts: API key or personal access token. Open in the API reference

ParameterInTypeRequiredDescription
limitqueryintegerNoHow many items to return. Default 50, at most 100.
cursorquerystringNoThe `next_cursor` of the previous page. Opaque; never built by the client.
statusquerystringNoOnly orders in this status.
supplierquerystringNoOnly this supplier's orders.
AirFone-VersionheaderstringNoThe API version to use, as a date. Defaults to the version the account was pinned to.

POST/v1/purchasing/orders

Write a purchase order

Writes a draft order with its lines, prices, delivery window and terms. It is approved by an owner before it is sent. Needs purchasing:write.

Scope purchasing:write. Accepts: API key or personal access token. Open in the API reference

ParameterInTypeRequiredDescription
AirFone-VersionheaderstringNoThe API version to use, as a date. Defaults to the version the account was pinned to.

GET/v1/purchasing/orders/{id}

Get a purchase order

One order with the supplier's answer and how much of each line has arrived and been billed. Needs purchasing:read.

Scope purchasing:read. Accepts: API key or personal access token. Open in the API reference

ParameterInTypeRequiredDescription
idpathstringYesThe resource id.
AirFone-VersionheaderstringNoThe API version to use, as a date. Defaults to the version the account was pinned to.

POST/v1/purchasing/orders/{id}/approve

Approve an order

An owner approves the order. It cannot be sent before. Needs purchasing:write.

Scope purchasing:write. Accepts: API key or personal access token. Open in the API reference

ParameterInTypeRequiredDescription
idpathstringYesThe resource id.
AirFone-VersionheaderstringNoThe API version to use, as a date. Defaults to the version the account was pinned to.

POST/v1/purchasing/orders/{id}/send

Send an order

Marks an approved order as sent to the supplier. Needs purchasing:write.

Scope purchasing:write. Accepts: API key or personal access token. Open in the API reference

ParameterInTypeRequiredDescription
idpathstringYesThe resource id.
AirFone-VersionheaderstringNoThe API version to use, as a date. Defaults to the version the account was pinned to.

POST/v1/purchasing/orders/{id}/reply

Record the supplier's reply

Takes the supplier's typed answer: confirm, change with the lines they would change, or reject with a reason. Needs purchasing:write.

Scope purchasing:write. Accepts: API key or personal access token. Open in the API reference

ParameterInTypeRequiredDescription
idpathstringYesThe resource id.
AirFone-VersionheaderstringNoThe API version to use, as a date. Defaults to the version the account was pinned to.

POST/v1/purchasing/orders/{id}/accept-changes

Accept the supplier's changes

An owner accepts the changes the supplier asked for; they are applied and the order is accepted. Needs purchasing:write.

Scope purchasing:write. Accepts: API key or personal access token. Open in the API reference

ParameterInTypeRequiredDescription
idpathstringYesThe resource id.
AirFone-VersionheaderstringNoThe API version to use, as a date. Defaults to the version the account was pinned to.

POST/v1/purchasing/orders/{id}/cancel

Cancel an order

Cancels an order nothing has been received against. Needs purchasing:write.

Scope purchasing:write. Accepts: API key or personal access token. Open in the API reference

ParameterInTypeRequiredDescription
idpathstringYesThe resource id.
AirFone-VersionheaderstringNoThe API version to use, as a date. Defaults to the version the account was pinned to.

POST/v1/purchasing/orders/{id}/receipts

Take in a delivery

Records what arrived against the order: counted, damaged and the earliest expiry per line. Accepted goods are added to stock, variances are listed, and shortages and damage are claimed on the supplier. Send the same id again to repeat safely. Needs purchasing:write.

Scope purchasing:write. Accepts: API key or personal access token. Open in the API reference

ParameterInTypeRequiredDescription
idpathstringYesThe resource id.
AirFone-VersionheaderstringNoThe API version to use, as a date. Defaults to the version the account was pinned to.

GET/v1/purchasing/bills

List supplier bills

Bills with their three-way match status. Needs purchasing:read.

Scope purchasing:read. Accepts: API key or personal access token. Open in the API reference

ParameterInTypeRequiredDescription
limitqueryintegerNoHow many items to return. Default 50, at most 100.
cursorquerystringNoThe `next_cursor` of the previous page. Opaque; never built by the client.
statusquerystringNoOnly bills in this status.
supplierquerystringNoOnly this supplier's bills.
AirFone-VersionheaderstringNoThe API version to use, as a date. Defaults to the version the account was pinned to.

POST/v1/purchasing/bills

Record a supplier bill

Records a bill, checks it, holds it against the order and what was received, and books the part they support. The same supplier's same bill number again is refused. Needs purchasing:write.

Scope purchasing:write. Accepts: API key or personal access token. Open in the API reference

ParameterInTypeRequiredDescription
AirFone-VersionheaderstringNoThe API version to use, as a date. Defaults to the version the account was pinned to.

GET/v1/purchasing/bills/{id}

Get a bill

One bill with what the match found. Needs purchasing:read.

Scope purchasing:read. Accepts: API key or personal access token. Open in the API reference

ParameterInTypeRequiredDescription
idpathstringYesThe resource id.
AirFone-VersionheaderstringNoThe API version to use, as a date. Defaults to the version the account was pinned to.

POST/v1/purchasing/bills/{id}/approve-difference

Pay despite a difference

An owner decides the bill is to be paid in full although it differs from the order or the receipt, and says why. Needs purchasing:write.

Scope purchasing:write. Accepts: API key or personal access token. Open in the API reference

ParameterInTypeRequiredDescription
idpathstringYesThe resource id.
AirFone-VersionheaderstringNoThe API version to use, as a date. Defaults to the version the account was pinned to.

POST/v1/purchasing/bills/{id}/dispute

Dispute a bill

Marks a bill that has nothing booked or paid against it as disputed. Needs purchasing:write.

Scope purchasing:write. Accepts: API key or personal access token. Open in the API reference

ParameterInTypeRequiredDescription
idpathstringYesThe resource id.
AirFone-VersionheaderstringNoThe API version to use, as a date. Defaults to the version the account was pinned to.

GET/v1/purchasing/claims

List claims on suppliers

Shortages, damage and returns claimed, and the credit notes that answer them. Needs purchasing:read.

Scope purchasing:read. Accepts: API key or personal access token. Open in the API reference

ParameterInTypeRequiredDescription
limitqueryintegerNoHow many items to return. Default 50, at most 100.
cursorquerystringNoThe `next_cursor` of the previous page. Opaque; never built by the client.
statusquerystringNoOnly claims in this status.
AirFone-VersionheaderstringNoThe API version to use, as a date. Defaults to the version the account was pinned to.

POST/v1/purchasing/claims

Claim on a supplier

Claims an amount for a shortage, damaged goods, a return or a price correction. Needs purchasing:write.

Scope purchasing:write. Accepts: API key or personal access token. Open in the API reference

ParameterInTypeRequiredDescription
AirFone-VersionheaderstringNoThe API version to use, as a date. Defaults to the version the account was pinned to.

POST/v1/purchasing/claims/{id}/credit

Record the credit note

The supplier's credit note arrived; it comes off the next payment run. Needs purchasing:write.

Scope purchasing:write. Accepts: API key or personal access token. Open in the API reference

ParameterInTypeRequiredDescription
idpathstringYesThe resource id.
AirFone-VersionheaderstringNoThe API version to use, as a date. Defaults to the version the account was pinned to.

GET/v1/purchasing/runs

List payment runs

The weekly payment runs, newest first. Needs purchasing:read.

Scope purchasing:read. Accepts: API key or personal access token. Open in the API reference

ParameterInTypeRequiredDescription
limitqueryintegerNoHow many items to return. Default 50, at most 100.
cursorquerystringNoThe `next_cursor` of the previous page. Opaque; never built by the client.
AirFone-VersionheaderstringNoThe API version to use, as a date. Defaults to the version the account was pinned to.

POST/v1/purchasing/runs

Propose a payment run

Plans the run from the bills the order and the receipt support: overdue first, then suppliers who keep supply, then early-payment discounts, then what falls due. Suppliers whose account is unconfirmed or still held, or whose withholding is not known, are listed as blocked and not paid. Nothing is asked of anyone yet. Needs purchasing:write.

Scope purchasing:write. Accepts: API key or personal access token. Open in the API reference

ParameterInTypeRequiredDescription
AirFone-VersionheaderstringNoThe API version to use, as a date. Defaults to the version the account was pinned to.

GET/v1/purchasing/runs/{id}

Get a payment run

One run with where each payment stands. Needs purchasing:read.

Scope purchasing:read. Accepts: API key or personal access token. Open in the API reference

ParameterInTypeRequiredDescription
idpathstringYesThe resource id.
AirFone-VersionheaderstringNoThe API version to use, as a date. Defaults to the version the account was pinned to.

POST/v1/purchasing/runs/{id}/approve

Approve a payment run

An owner approves the run. Each payment is asked of the person who pays, who pays from their own account and says that it was paid; only then does it enter the books. Needs purchasing:write.

Scope purchasing:write. Accepts: API key or personal access token. Open in the API reference

ParameterInTypeRequiredDescription
idpathstringYesThe resource id.
AirFone-VersionheaderstringNoThe API version to use, as a date. Defaults to the version the account was pinned to.

POST/v1/purchasing/runs/{id}/cancel

Cancel a payment run

Cancels a run that was only proposed. Needs purchasing:write.

Scope purchasing:write. Accepts: API key or personal access token. Open in the API reference

ParameterInTypeRequiredDescription
idpathstringYesThe resource id.
AirFone-VersionheaderstringNoThe API version to use, as a date. Defaults to the version the account was pinned to.

GET/v1/purchasing/attention

What needs attention

Orders not answered in time, price lists to renew, goods with no bill, claims to chase, disputed and overdue bills, and suppliers owed money whose account cannot be paid yet. Needs purchasing:read.

Scope purchasing:read. Accepts: API key or personal access token. Open in the API reference

ParameterInTypeRequiredDescription
AirFone-VersionheaderstringNoThe API version to use, as a date. Defaults to the version the account was pinned to.