Warehouse Set

PUT{{api_url}}/shop/warehouse/{{warehouse_id}}

Updates an existing warehouse. It takes the same fields as Warehouse Create: address, contact details, zip code rules, and IDs on connected 3PLs, fulfillment services, marketplaces, and ERPs. To create a new warehouse, use Warehouse Create.

Warehouse changes affect order routing on every channel. The address decides how Zip Code Distance ranks the warehouse, and its zip code rules decide which orders it can fill at all. Changes apply to orders routed after the update.

Body

FieldTypeDescription
warehouse_namestringThe warehouse's display name.
warehouse_identifierstringThe warehouse's short code, for example main. It appears in warehouse_identifier on order lines and in routing records.
street1, street2, city, state, region, zip, countrystringThe warehouse address. Zip Code Distance routing measures from this address, so keep the full street address and zip.
contact_person, company, phone, emailstringThe warehouse's contact details.
use_zip_rulesstring"1" turns the warehouse's zip code rules on, so it only fills orders whose ship-to zip matches one of them. "0" makes it eligible for every order. Must be numeric.
zip_rulesstringThe warehouse's zip code rules, as one string with each rule on its own line, separated by new lines: "8\*\n9\*". Each rule is a zip prefix ending in the \* wildcard. 9\* matches every zip starting with 9, and 713\* matches every zip starting with 713, five-digit or ZIP+4. A rule without the wildcard, such as 60540, matches only that exact zip and misses 60540-1234.
Connected-service fieldsstringThe warehouse's ID or setting on each connected 3PL, fulfillment service, marketplace, or ERP. A fulfillment service ID is what routes the warehouse's orders to that service: netsuite_id, netsuite_inventory_kit_custom_fields, amazon_vendor_central_id, wayfair_id, shopify_id, three_pl_central_id, shipstream_id, flexe_id, midwest_id, zhenhub_id, overstock_id, infiplex_fbi_id, qbo_inventory_asset_account, amazon_today_id, magento_store_id, magento_stock_id, big_commerce_id, big_commerce_pickup_method_id, square_up_id, sellercloud_id, walmart_id, newegg_vf_id, dsco_id, sams_club_id, teamwork_com_id, tiktok_id, finale_inv_id, infiplex_alerts_api_key, target_plus_id, true_value_id, amazon_com_id, emery_jensen_dist_id, deposco_id, cin7_id, logiwa_id, ryder_id, do_it_best_id, keystone_id, seawide_id, ntp_id, kehe_id, meyer_dist_id, dot_foods_id, zulily_id, bedbathbeyond_id, backyard_id, shiphero_id, costco_id, veracore_id, wayfair_castlegate_id, snapfulfil_id, ppm_fulfillment_id, epicor_id.

Examples

Update warehouse 3's address and contact details:

{{api_url}}/shop/warehouse/3
{
    "warehouse_name": "Main Warehouse",
    "warehouse_identifier": "main",
    "street1": "123 Main St",
    "street2": "",
    "city": "Naperville",
    "state": "IL",
    "region": "",
    "zip": "60540",
    "country": "USA",
    "contact_person": "main contact",
    "phone": "234-999-7361",
    "email": "main@email.com",
    "use_zip_rules": "0"
}

Turn on zip rules for warehouse 14 so it fills orders to zips starting with 1 through 9:

{{api_url}}/shop/warehouse/14
{
    "use_zip_rules": "1",
    "zip_rules": "1*\n2*\n3*\n4*\n5*\n6*\n7*\n8*\n9*"
}

Response

{"warehouseid": "3"}
FieldTypeDescription
warehouseidstringThe ID of the warehouse that was updated.

Before you build

  • Read the current values with Warehouse Get before changing anything, so you can put them back.
  • Send zip_rules as one string with a new line (\n in JSON) between rules, not as an array.
  • Setting use_zip_rules to "1" on a warehouse with no zip code rules leaves it matching no orders, so it drops out of routing. Send zip_rules in the same call.
  • fulfill_ord, the warehouse's Manual Sort position, can't be changed here. InfiPlex assigns it.
  • Your API key needs Warehouse write permission. A key without it gets 403 Forbidden.

Related guides:

Authorization

Bearer token, sent in the Authorization header. Inherited from the collection.

Headers

KeyValueDescription
Content-Typeapplication/json

Body

{
    "warehouse_name": "Main Warehouse",
    "warehouse_identifier": "main",
    "street1": "123 Main St",
    "street2": "",
    "city": "Naperville",
    "state": "IL",
    "region": "",
    "zip": "60540",
    "country": "USA",
    "use_zip_rules": "0"
}

Example Request

curl --location --request PUT '{{api_url}}/shop/warehouse/{{warehouse_id}}' \
--header 'Content-Type: application/json' \
--header 'Authorization: Bearer {{auth_token}}' \
--data '{
    "warehouse_name": "Main Warehouse",
    "warehouse_identifier": "main",
    "street1": "123 Main St",
    "street2": "",
    "city": "Naperville",
    "state": "IL",
    "region": "",
    "zip": "60540",
    "country": "USA",
    "use_zip_rules": "0"
}'

Example Responses

Warehouse Set

Request

curl --location --request PUT '{{api_url}}/shop/warehouse/3' \
--header 'Content-Type: application/json' \
--header 'Authorization: Bearer YOUR_API_KEY' \
--data '{
    "warehouse_name": "Main Warehouse",
    "warehouse_identifier": "main",
    "street1": "123 Main St",
    "street2": "",
    "city": "Naperville",
    "state": "IL",
    "region": "",
    "zip": "60540",
    "country": "USA",
    "use_zip_rules": "0"
}'

Response 200 OK

{
    "warehouseid": "3"
}