Skip to main content

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_changestrue when the live order differs from that revision.
  • changes_pending_since — when the order first diverged from the sent revision.
  • line_changes[] — each entry has a change_type of added, removed or modified, and (for modified) a fields[] 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

OK

Response Headers
    Content-Type