Undo Short-Close
DELETE/api/purchase-order-line-short-close-events/:short_close_event
Reverse a prior short-close event, restoring the PO line's original ordered quantity.
purchase-orders:writeGrant this scope to your token under Settings → Developer → Personal Access Tokens.
Authentication: Requires Bearer token.
The event is marked as undone (with undone_at / undone_by) rather than deleted, preserving the audit trail. The associated PurchaseOrderLine's quantity is restored to its original_quantity from the event.
Validation errors (422):
- The event must currently be active. Re-reversing an already-undone event is rejected.
Returns the updated PurchaseOrderLineShortCloseEvent (now with is_active: false, eager-loaded with closedBy, undoneBy, and followUpPurchaseOrder).
Request
Responses
- 200
- 401
- 403
- 404
- 422
- 429
OK
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
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.