Warehouse Create

POST{{api_url}}/shop/warehouse/
  • Creates a new warehouse and returns its ID. You can set everything about the warehouse in the same call: its address, contact details, zip code rules, and its IDs on connected 3PLs, fulfillment services, marketplaces, and ERPs. Use the returned ID as warehouse_id on the inventory, bin location, and warehouse endpoints.A new warehouse becomes part of order routing on every channel. Its address decides how Zip Code Distance ranks it, and its zip code rules decide which orders it can fill. InfiPlex assigns its fulfill_ord, its position in the Manual Sort priority list.BodyFieldTypeDescriptionwarehouse_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 send 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" leaves 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. Send only the ones this warehouse uses: 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.ExamplesA warehouse that fills every order:{{api_url}}/shop/warehouse/{ "warehouse_name": "Third Warehouse", "warehouse_identifier": "warehouse_three", "street1": "701 Water St.", "street2": "", "city": "Naperville", "state": "IL", "region": "", "zip": "60540", "country": "USA", "use_zip_rules": "0"}A West warehouse that only fills orders to zips starting with 8 or 9:{ "warehouse_name": "West Warehouse", "warehouse_identifier": "west", "street1": "4500 Kietzke Ln", "city": "Reno", "state": "NV", "zip": "89502", "country": "USA", "contact_person": "Jane Smith", "phone": "775-555-0100", "email": "west@example.com", "use_zip_rules": "1", "zip_rules": "8\\\n9\"}A warehouse at a 3PL, tied to its Extensiv facility:{ "warehouse_name": "3PL East", "warehouse_identifier": "3pl_east", "city": "Columbus", "state": "OH", "zip": "43215", "country": "USA", "use_zip_rules": "1", "zip_rules": "0\\\n1\\\n2\\\n3\\\n4\*", "three_pl_central_id": "4"}Response{"warehouseid": "5"}FieldTypeDescriptionwarehouseidstringThe new warehouse's ID.After you create a warehouseBefore you buildRelated guides:
  1. Read it back with Warehouse Get. warehouse_zip_rules lists each rule you sent, and fulfill_ord shows the Manual Sort position InfiPlex assigned.
  2. Put stock in it with Inventory Set or Inventory Set Bulk, using the new warehouseid as warehouse_id.
  • Send zip_rules as one string with a new line (\n in JSON) between rules, not as an array.
  • End every zip rule with the \* wildcard unless you mean one exact zip. Marketplaces send ZIP+4 on a large share of US orders, and a rule without the wildcard misses them.
  • use_zip_rules set to "1" with no zip_rules leaves the warehouse matching no orders, so it drops out of routing.
  • Check Warehouse Search first, so you don't create a warehouse that already exists.
  • To change a warehouse after it's created, use Warehouse Set.
  • Your API key needs Warehouse write permission. A key without it gets 403 Forbidden.
  • Geo Routing by Zip Code
  • Multi-Warehouse Order Routing & Splitting
  • Warehouse Management Set-up
  • 3PL Warehouse Integration

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",
    "fulfill_ord": "3",
    "use_zip_rules": "0"
}

Example Request

curl --location --request POST '{{api_url}}/shop/warehouse/' \
--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",
    "fulfill_ord": "3",
    "use_zip_rules": "0"
}'

Example Responses

Warehouse Create

Request

curl --location --request POST '{{api_url}}/shop/warehouse/' \
--header 'Content-Type: application/json' \
--header 'Authorization: Bearer {{auth_token}}' \
--data '{
    "warehouse_name": "Third Warehouse",
    "warehouse_identifier": "warehouse_three",
    "street1": "701 Water St.",
    "street2": "",
    "city": "Naperville",
    "state": "IL",
    "region": "",
    "zip": "60540",
    "country": "USA",
    "use_zip_rules": "0"
}'

Response 200 OK

{
    "warehouseid": "5"
}