Link to Sales Order Line
POST/api/amazon/:integrationInstance/awd/ledgers/:awdLedger/link-sales-order-line
Link an AWD departure (a DEPARTED ledger entry whose reference is not an FBA or STAR shipment) to the sales order line it shipped. The line must be routed to an AWD warehouse of the same Amazon integration and carry the same product.
This endpoint currently requires session authentication; Personal Access Token scope support is in progress.
Returns 422 when the link is refused: the ledger is not a sales-order departure, it is already linked, the line is not routed to AWD, the products differ, or the line already has units shipped from a stock-deducting warehouse that, together with this departure, exceed the line quantity. In that last case void the other shipment first, then link.
Returns 404 when the AWD ledger entry belongs to a different Amazon account than the one in the URL.
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
Response Headers
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.