Skip to main content

Change Ship-From on Amazon

POST 

/api/amazon/:integrationInstance/draft-inbound-plans/:draft_inbound_plan/change-ship-from

Move the ship-from of a draft inbound plan that is already submitted to Amazon to another supplier warehouse.

Not yet available to API tokens

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

How the change reaches Amazon depends on the plan's stage, and the plan response says which (ship_from_change.mode):

  • per_shipment — once a placement option is confirmed Amazon has shipments and stores the source address on each of them, so every open shipment is updated in place. Amazon discards the shipments' transportation quotes as a side effect — regenerate transportation options afterwards. Only when every shipment accepted the new address does the plan's source_warehouse_id and supplier follow; a partial refusal leaves the plan on its previous ship-from and names the shipments that did move (re-running is safe).
  • resubmit — before a placement option is confirmed Amazon has no shipments and offers no way to change a plan's address, so a new inbound plan is created from the same draft with the new ship-from, the previous plan is voided once the new one exists, and the confirmed packing option and boxes are carried over (box contents are re-submitted when they had been submitted). The draft record, name and status stay; the Amazon plan ID changes. Placement options must be generated again.

Either way the request is validated synchronously and the Amazon work runs in a background job — follow it with the returned tracked_job_log_id. This is possible until the shipment carriers are confirmed, which is when Amazon locks the address for good.

Authentication: Requires Bearer token.

Body

  • source_warehouse_id (integer, required, must exist in warehouses) — the new ship-from. Must be a supplier warehouse with a complete address (address line 1, city, state/province, postal code, country, phone, contact name).

Returns 422 when the change is not allowed:

  • the plan is not submitted yet (use PUT …/draft-inbound-plans/{draft_inbound_plan} with source_warehouse_id instead)
  • the plan ships from your own warehouse (warehouse transfer) rather than a supplier
  • the Amazon plan is voided, errored or already shipped
  • carriers are already confirmed for a shipment, or a shipment has shipped
  • the target is the current warehouse, is not a supplier warehouse, or belongs to a different supplier while purchase orders already exist for the plan's shipments

GET …/draft-inbound-plans/{draft_inbound_plan} exposes the same decision as ship_from_change (changeable, mode, blocker, blocker_message, same_supplier_only, supplier_id, shipment_count, packing_option_confirmed, box_count).

Request

Responses

OK

Response Headers
    Content-Type