Skip to main content
POST
Email purchase orders to suppliers

Authorizations

Authorization
string
header
required

Authenticate using a bearer token. To create a token, navigate to /settings/api-tokens and click Create API Token.

Body

application/json
purchase_order_ids
integer[]
required

IDs of the purchase orders to email. Every one must exist and have a supplier.

Required array length: 1 - 100 elements
Required range: x >= 1
template_id
integer | null

Purchase order email template to use for suppliers without their own template. Defaults to your default template.

Required range: x >= 1
attach_pdf
boolean | null
default:true

Attach each purchase order's PDF.

attach_data
boolean | null
default:false

Also attach each purchase order as a spreadsheet (PurchaseOrder_<id>.csv or .xlsx), built the same way as the purchase order's CSV / Excel export. Can be sent alongside the PDF or, with attach_pdf: false, instead of it.

data_export_template_id
integer | null

Purchase order data export template that controls the spreadsheet's columns, column order and header names. Defaults to your default purchase order data template; with none, every default column is included. Only used when attach_data is true.

Required range: x >= 1
data_format
enum<string> | null
default:csv

Spreadsheet format for the data attachment. Only used when attach_data is true.

Available options:
csv,
xlsx

Response

Emails queued

data
object