Reassign to vendor

Move every address assigned to one vendor over to another vendor in a single call.

Recent Requests
Log in to see full request history
TimeStatusUser Agent
Retrieving recent requests…
LoadingLoading…

Overview

Move every address currently assigned to one vendor over to another vendor on the same site, in a single call. Only the vendor assignment changes; all other address data is left untouched.

Example: a delivery route changes hands. Instead of editing each address one at a time, reassign every address held by the outgoing vendor to the incoming vendor in one request.


Preview before moving anything

Set preview to true to find out how many addresses a reassignment would affect without writing anything.

A preview returns matched_addresses together with up to five sample_address_ids, so the scope can be confirmed before the real run. On a preview, reassigned_addresses is always 0 and operation_id is null.

Run the same request again with preview omitted or set to false to perform the reassignment.


Narrowing the scope

By default every address the source vendor holds on the site is moved. The optional fields below narrow that set. They combine — an address must satisfy all of the filters supplied to be included.

FieldEffect
address_idsRestrict the run to specific addresses. Up to 1,000 identifiers per request.
typeOnly addresses of this type: shipping, billing or account_primary.
cityOnly addresses in this city.
stateOnly addresses in this state, province or region.
countryOnly addresses in this country, as an ISO3166 alpha-2 code.
postal_codeOnly addresses with this ZIP or postal code.

Outcomes

SituationResult
The reassignment would affect more than 50,000 addresses422, and nothing is written. Narrow the scope and try again.
No addresses match200, with matched_addresses of 0 and a null operation_id.
The source or destination vendor is not on your account400
The destination vendor is the same as the source vendor400

What is not affected

  • Only the vendor assignment is updated. Every other address attribute keeps its current value.
  • Reassignment does not fire address update events, so no address.updated webhook is sent and no payment processor or tax recalculation is triggered.
  • Addresses belonging to deleted customers are never included.

Auditing a run

A reassignment that moves at least one address returns an operation_id. Every address moved by that run is recorded against it, so a single reassignment can be reviewed as one operation after the fact.

Query Params
int32
required

The unique identifier of the site associated with your account.

Body Params
int32
required

The unique identifier of the site associated with your account.

int32
required

The unique identifier of the vendor the addresses are moved away from. Must exist on your account.

int32
required

The unique identifier of the vendor the addresses are moved to. Must exist on your account and be different from source_vendor_id.

boolean
Defaults to false

When true, count the addresses that would be moved and write nothing. Use it to confirm the scope before running the reassignment.

address_ids
array of int32s
length ≤ 1000

Restrict the reassignment to these address identifiers. Omit to move every address assigned to the source vendor.

address_ids
string
enum

Only reassign addresses of this type, one of either "shipping", "billing" or "account_primary".

Allowed:
string
length ≤ 255

Only reassign addresses in this city.

string
length ≤ 255

Only reassign addresses in this state, province or region.

string
length ≤ 2

Only reassign addresses in this country. The two-letter country codes as specified by ISO3166 alpha-2. Learn more here.

string
length ≤ 45

Only reassign addresses with this ZIP or postal code.

Responses

Language
Credentials
LoadingLoading…
Response
Click Try It! to start a request and see the response here! Or choose an example:
application/json