Get a purchase order
AI agents: read /llms.txt; add .md to any page URL. This page as Markdown: /reference/purchase-orders/v1-purchase-order-show.md. Index of every page and the rules for every call: /llms.txt. Guides and concepts in one file: /llms-full.txt. OpenAPI: /openapi.json.
GET/
Returns one purchase order with its lines, status, vendor, delivery and billing addresses, creator and tags.
This operation is kept for YoPrint's Zapier app, which uses this path, and its answer keeps the flat line fields Zapier reads: each line in items has product (type, with id or name), quantity, price and totals as plain values. The public API has no newer purchase order operations to use instead: creating, editing and receiving purchase orders are not part of it.
Money in this answer is in thousandths, an older encoding (10800 is 10.80): calc_subtotal, calc_tax and calc_total on the purchase order and on each line, and each line's price. A whole number of thousandths is a JSON integer; an amount finer than a thousandth comes back as a decimal string such as "12656.3", whatever headers you send, so parse these as decimals. See Money and quantities. A line's quantity is what is still to receive, not what was ordered; received_total is what has arrived. items lists every line, deleted and voided ones included, and the rows don't say which.
{hash_id} is the purchase order's id, not its number (PO0042). Deleted purchase orders are not found.
Path parameters
Your team slug, shown as Team ID next to your API key in Profile.
- Example
your-team
- Example
The purchase order's id (not its number, such as
PO0042). A hash id from an earlier answer; unique keys and document numbers (such asPO0042) don't work here.- Example
EDhVUaC6jbLbed
- Example
Request body
This operation takes no request body.
Response
200Successful response.
Child fields (39)
The purchase order's subtotal. Thousandths, an older encoding:
10800is 10.80. A whole number of thousandths comes back as a JSON integer; an amount finer than a thousandth comes back as a decimal string, such as"12656.3", whatever headers you send. Parse it as a decimal. See Money and quantities.Its tax. Thousandths, an older encoding:
10800is 10.80. A whole number of thousandths comes back as a JSON integer; an amount finer than a thousandth comes back as a decimal string, such as"12656.3", whatever headers you send. Parse it as a decimal. See Money and quantities.Its total. Thousandths, an older encoding:
10800is 10.80. A whole number of thousandths comes back as a JSON integer; an amount finer than a thousandth comes back as a decimal string, such as"12656.3", whatever headers you send. Parse it as a decimal. See Money and quantities.The purchase order's id: use it in the path.
Every line of the purchase order, including deleted and voided ones: the rows don't say which.
Fields of each item (11)
The line's subtotal as YoPrint stores it: usually
pricetimes the quantity ordered; on some older lines, times the quantity still to receive. Thousandths, an older encoding:10800is 10.80. A whole number of thousandths comes back as a JSON integer; an amount finer than a thousandth comes back as a decimal string, such as"12656.3", whatever headers you send. Parse it as a decimal. See Money and quantities.The line's tax. Thousandths, an older encoding:
10800is 10.80. A whole number of thousandths comes back as a JSON integer; an amount finer than a thousandth comes back as a decimal string, such as"12656.3", whatever headers you send. Parse it as a decimal. See Money and quantities.calc_subtotalpluscalc_tax. Thousandths, an older encoding:10800is 10.80. A whole number of thousandths comes back as a JSON integer; an amount finer than a thousandth comes back as a decimal string, such as"12656.3", whatever headers you send. Parse it as a decimal. See Money and quantities.The line's id.
true for a line that doesn't track stock.
The unit price. Thousandths, an older encoding:
10800is 10.80. A whole number of thousandths comes back as a JSON integer; an amount finer than a thousandth comes back as a decimal string, such as"12656.3", whatever headers you send. Parse it as a decimal. See Money and quantities.What the line buys, flat.
idis a catalog item id such assmr-10001fordb_catalog, or the hash id of your product or variant fordb_simple,user_simpleanddb_variant;nameis the line's own name forcustom,fee,feesandcustomer_provide_product. Older lines can havecart_itemororder_item, with that record's id.sizeandcolorappear only when the line has them.The quantity still to receive (ordered minus received), not the quantity ordered. A whole number is a JSON integer; a fraction is a decimal string, such as
"1.25".The quantity received so far. A whole number is a JSON integer; a fraction is a decimal string, such as
"1.25".The line's own tax rate, used when
tax_modeisline_level, as a percentage ×1000:8000is 8% (0 when the line has none). A rate that is not a whole number comes back as a decimal string.positioninteger | string | nullThe line's place on the purchase order, or null. A whole number is a JSON integer; a fraction is a decimal string, such as
"1.25".
The purchase order number people see, such as
PO0042. Not an id.billing_addressobject | nullThe billing address.
Child fields (33)
False for deleted, replaced, Shopify or redacted addresses. Only current addresses can be picked for new documents or edited.
Goes up by one on every saved change. Send it back as
base_revision_numberwhen updating the address to protect against concurrent edits.billingorshippingfor customer addresses.address2string | nulladdress_family_idstring | nullShared by an address and the copies made when it was edited after use.
citystring | nullcopied_from_address_idstring | nullcountrystring | nullcountry_codestring | nullcustomer_idstringCustomer addresses only: the customer's id.
external_typestring | nullshopifyfor an address synced from Shopify.hold_stockbooleanCompany locations only; false for customer addresses.
is_default_warehousebooleanCompany locations only; false for customer addresses.
is_externalbooleanTrue for an address synced from Shopify; such addresses are read-only.
nexusbooleanCompany locations only; false for customer addresses.
notestring | nullowner_idstring | nullThe owner's id: for a customer address, the customer's id (the same as
customer_id).owner_typestringcustomerfor customer addresses.- One of:
"customer","team","unknown"
- One of:
postal_can_validatebooleanpostal_is_validbooleanpostal_validatedbooleanTrue once YoPrint has checked the address with its address validator.
postal_can_validatesays whether it could be checked andpostal_is_validgives the result. Any edit resets it to false.postcodestring | nullsourcestringcustomerfor customer addresses.- One of:
"customer","company_location","custom","unknown"
- One of:
statestring | nullstate_codestring | nullsuperseded_atstring (date-time) | nullsuperseded_by_address_idstring | nullSet on an old copy: the address that replaced it.
used_by_active_profilebooleanTrue when a brand profile uses it as Ship From. Sent on lists, reads, updates and customer answers; not on create or set-primary.
billing_address_idstring | nullcreated_atstring (date-time) | nullcreated_bystring | nullThe team member who created it.
creatorobject | nullThe team member who created it:
id,name,email,avatar_url,timezoneand a few profile flags.doc_viewer_urlstringA link that opens the purchase order in the document viewer, with the same kind of token.
due_datestring (date-time) | nullinternal_notestring | nullis_custom_warehousebooleantrue when the delivery address is not one of the team's company locations.
issue_datestring (date-time) | nullnamestring | nullpdfarray of objectsPDF links: the purchase order detail, its 4" x 6" label, and the team's custom purchase order templates. Each
urlcarries a token likepdf_url.Fields of each item (3)
descriptionstring | nulllabelstringurlstring
pdf_urlstringA link that downloads the purchase order PDF. Its token stops working 9,000 hours (about a year) after the answer was made, and anyone with the link can open the PDF: don't share it.
quickbook_disable_syncbooleantrue when QuickBooks sync is off for this purchase order.
quickbook_last_error_syncstring (date-time) | nullquickbook_last_success_syncstring (date-time) | nullstatusobject | nullThe purchase order's status, as List purchase order statuses returns it:
id,role(purchase_order),type(start,pre_production,in_progressorend),label,customer_label,color,positionandtrashed.status_completion_datestring (date-time) | nullWhen it was moved to its final (
end) status; null otherwise.status_last_change_datestring (date-time) | nulltagsarray of objectstax_modestring | nullorder_level: onetax_ratefor the purchase order, and each line is taxable or not.line_level: each line has its own rate (tax_total).tax_ratestring | nullFor
order_level: the rate as a decimal string fraction with 6 decimals,"0.080000"is 8%. Null when not set.teamobjectYour team, as the shared purchase order answer carries it:
id,name,slug, contact details, the public ids of its enabled payment gateways, andplan. Nothing here is specific to the purchase order.updated_atstring (date-time) | nullvendorobject | nullThe vendor with its contacts, as Get a vendor returns it.
Child fields (8)
True when the vendor is deleted.
account_numberstring | nullcontactsarray of objectsEvery contact, deleted ones included.
Fields of each item (18)
True when the contact is deleted.
customer_idstringCustomer contacts only.
default_receive_smsbooleanemailstring | nullexternal_typestring | nullfaxstring | nullfax_countrystring | nullis_externalbooleanTrue for a contact synced from Shopify; such contacts are read-only.
last_namestring | nullphonestring | nullphone_countrystring | nullsend_invoicebooleanCustomer contacts only.
vendor_idstringVendor contacts only.
default_vendor_notestring | nullinternal_notesstring | nullwebsitestring | null
vendor_idstring | nullvendor_notestring | nullThe note printed for the vendor.
versioninteger2 for purchase orders made in the current editor; 1 for older ones.
warehouseobject | nullThe delivery address, usually one of the team's company locations.
- Same fields as
data.billing_address.
- Same fields as
warehouse_can_hold_stockbooleantrue when the delivery address is set and holds stock, so receiving adds stock there.
warehouse_idstring | nullWhere the goods are delivered.
Errors
401The API key is missing or wrong (
unauthenticated).403You are not allowed to do this.
api_access_not_in_plan: your team's plan doesn't include API access (Pro and above, with an active subscription or trial), so every request answers this until the team upgrades. When your role lacks the permission the operation needs, the body is only{"message": "Insufficient Permission"}. Other refusals use the error envelope, withunauthorizedoruser_is_not_authorized.- When
- Your role has no Manage Purchase Order permission to view. This 403 has a short body,
{"message": "Insufficient Permission"}, with nosuccessorerror. - Fix
- Ask a team owner to give your role a Manage Purchase Order level.
404Not found.
page_not_found: the team slug is unknown, you are not a member of the team, or an id in the path is not one of this team's.code: null, with a message that starts "No query results for": there is no record with that id.- When
- No live purchase order with this id in the team, or your role sees only purchase orders you created or are assigned to and this is not one of them.
error.codeis null anderror.messagenames the record type. - Fix
- Check the id, or ask to be assigned to the purchase order.
Notes
- A line's
quantityis the quantity still to receive. To get the quantity ordered, addreceived_total. - Read
status.type:endmeans the purchase order is complete.
Related
- PUTChange a purchase order's status
/v1/ api/ store/ {team_slug}/ purchase_order/ {hash_id}/ status - GETList a purchase order's history
/v1/ api/ store/ {team_slug}/ purchase_order/ {hash_id}/ history - GETList purchase order statuses
/v1/ api/ store/ {team_slug}/ setting/ status/ purchase_order
