Preview ASN
GET/api/purchase-orders/:purchase_order/asn/preview
Dry run of the ASN for this purchase order: exactly what its warehouse system (ShipHero) would receive, without sending anything.
purchase-orders:readGrant this scope to your token under Settings → Developer → Personal Access Tokens.
modeiscreatefor a purchase order not yet sent, orupdatewhen it is already in the warehouse system; thendifflists the changes Push ASN Changes would make (lines[].action:update,delete,add— a new SKU the warehouse system can't add to an existing PO — orblocked— a quantity below what was already received) and changed header fields;diff.structural({reason, label}or null) is a vendor or warehouse change, which cancels the warehouse-system PO and sends it again (it has no line or header diff);diff.can_pushsays whether Push ASN Changes has anything it can send. Removing every line of an already-sent PO is not a blocker inupdatemode: each line is set to 0. A PO with more than 200 warehouse-system SKUs is blocked (too_many_lines).payloadholds the PO number, warehouse, vendor (withresolution:matched,will_be_created,fixed,omitted,unmapped,not_verified), PO date and its source, tracking, notes, totals, and the lines combined per warehouse-system SKU (name_truncated_fromis the original length when a name was cut).blockersstop the send (missing products, an unmapped vendor, fractional quantities, a locked or closed warehouse PO).warningsdon't (names cut, unknown weight, no tracking, no expected arrival,not_verifiedwhen the warehouse system couldn't be reached — the payload is still shown).backup_spreadsheetsays whether the backup ASN spreadsheet will also be emailed, to whom, and how many backups remain after this one.
Returns 422 when the destination warehouse isn't connected to a warehouse system that supports previews. Returns 422 ASN sending is off for {connection}… when the connection's ASN sending (asn.enabled) was switched off after the PO was sent; receipts keep syncing.
Requires permission: purchase_orders.show
Authentication: Requires Bearer token.
Request
Responses
- 200
- 401
- 403
- 404
- 422
- 429
OK
Response Headers
Unauthenticated — the bearer token is missing, revoked, expired, or malformed. Never retry automatically; fix the credential. See the Errors guide.
Forbidden — the token lacks a required scope, the endpoint is not available to API tokens, or the user behind the token lacks the permission. A human must adjust the token scopes or user permissions; do not retry.
Not found — no record with the given identifier (or the route does not exist). Verify the ID before retrying.
Unprocessable Entity
Response Headers
Rate limited — platform limit is 1,000 requests/min; individual tokens may carry lower limits. Honor the Retry-After header before retrying. See the Rate Limits guide.