Accept Fulfillment Order Discrepancy
POST/api/fulfillment-orders/:fulfillmentOrder/accept-discrepancy
Self-heal a shipping-provider ↔ fulfillment-order line discrepancy. Use this when the shipping provider marked the order shipped but one line's product cannot be fulfilled (no on-hand to deduct) — a permanent mismatch between what the provider shipped and what can actually leave the warehouse.
Accepting records a real shipment (with the provider's tracking) for the lines that DID ship and parks the discrepant line so it is never deducted from inventory. The provider's order record is left untouched (it stays the source of truth for what the provider believes shipped), and the open discrepancy alert is resolved.
Body:
acknowledged(required, must be true): explicit confirmation that the discrepant line will NOT be deducted from inventory. Any other value returns 422.
Side effects: records the SalesOrderFulfillment (+ tracking, inventory movements, COGS) for the fulfillable lines, marks the discrepant line out-of-sync (parked), stamps who/when accepted, advances the fulfillment order lifecycle, and resolves the discrepancy alert.
Returns the fulfillment order with discrepancy_accepted_at / discrepancy_accepted_by set. 422 if there is no shipped provider order, nothing discrepant to accept, or the shipment cannot be recorded.
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 Content
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.