Skip to main content
POST
cURL
Creates a purchase order from a supplier and its lines, wrapped in purchase_order. Name an existing supplier with account_id, or send account to create the supplier in the same call. A line takes an existing item by item_id, or a new one by item_name with a price under item_price_snapshot. The new order is active; send "draft": true to create a draft instead.
The SDK samples get their client from credentials your app registers once when it starts, as shown in Authentication. To try the call here, click Try it, set host to your Exsited API host name and paste an access token from Get an access token. To send a raw JSON body instead of filling in fields, copy the cURL sample and edit its -d payload.

Authorizations

Authorization
string
header
required

An access token from POST /api/v4/oauth2/token. The SDKs get and renew it for you.

Body

application/json
purchase_order
object
required

Response

201 - application/json

The new purchase order, under purchase_order.

purchase_order
object