Get Changes Since Last Sent
GET/api/purchase-orders/:purchase_order/changes-since-sent
Compare the live purchase order against the most recent revision snapshot and return a line-level and header-level diff. Use it to detect when an order has been edited after it was last sent to the supplier, so those pending changes can be reviewed and re-sent.
Path params:
purchase_order(required): id of the purchase order.
Response under data:
latest_revision_number/latest_sent_at— the revision the live order is compared against.has_pending_changes—truewhen the live order differs from that revision.changes_pending_since— when the order first diverged from the sent revision.line_changes[]— each entry has achange_typeofadded,removedormodified, and (formodified) afields[]array of{ field, from, to }.header_changes[]— same shape for header-level fields.
If the order has never been sent there is no revision to compare against.
Authentication: Requires Bearer token.
Requires permission: purchase_orders.view
Request
Responses
- 200
- 401
- 403
- 404
- 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.
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.