v1

latestOpenAPI 3.1.02026-07-2689175245.8 KB
Locations

Upsert Location

Upsert a location, identified using the location's external_id.

put/locations

Request body

external_idstring required

The identifier used by an external source to identify the location.

sales_channelstring required

If a channel with this name is not already associated with the shop, it will be used to create a new channel.

namestring required

The name of the location.

status'active' | 'inactive' required

The status of the location.

Example request

{
  "external_id": "62291d16-9b61-4fbb-b868-21c2d32dc155",
  "sales_channel": "shopify",
  "name": "Main Warehouse",
  "address": {
    "name": "Main Warehouse",
    "company": "Universal Exports",
    "address1": "1234 Example Street",
    "address2": "Unit 19",
    "city": "Townsville",
    "region": "Louisiana",
    "country_code": "US"
  }
}

Response

Success

Example response

{
  "location": {
    "id": 9007199254740991,
    "external_id": "62291d16-9b61-4fbb-b868-21c2d32dc155",
    "sales_channel": "shopify",
    "name": "Main Warehouse",
    "address": {
      "name": "Main Warehouse",
      "company": "Universal Exports",
      "address1": "1234 Example Street",
      "address2": "Unit 19",
      "city": "Townsville",
      "region": "Louisiana",
      "country_code": "US"
    }
  }
}