Skip to main content

Apply AWD Re-anchor

POST 

/api/amazon/unified/awd/re-anchor/apply

Apply the correction. This writes an inventory adjustment for every included product and changes stock on hand.

The proposal itself is never taken from the request. Send back the reference, proposalHash and totals returned by the preview, plus any exclusions; the correction is then recomputed from current data and applied only if it still matches what was sent. If it has changed — a ledger import landed, a cost was edited — the request is refused so the figures that were approved are always the figures that land.

The whole operation is atomic. Stock records consumed beyond their own quantity are repaired first (only for the products being corrected), the adjustments are written, and every product is then checked individually. If any product did not reach its expected quantity the entire correction is rolled back and nothing is recorded — a bulk write that half-landed would be invisible, and retrying it would correct a second time on top.

Applying the same reference twice is refused, whether or not the earlier correction was reversed. A genuine redo needs a fresh count.

Request fields:

  • reference — required, the reference from the preview being applied.
  • proposal_hash — required, the proposalHash from that same preview.
  • products_affected, net_units, net_value — required, the totals from that preview.
  • excluded_product_ids — optional array of product ids to leave untouched, including their stock records.
  • warehouse_id — optional, required when the account has more than one AWD warehouse.

Authentication: requires a Bearer token.

Not yet available to API tokens

This endpoint currently requires session authentication; Personal Access Token scope support is in progress.

Request

Responses

OK

Response Headers
    Content-Type