Skip to main content
POST
/
locations
Create Location
curl --request POST \
  --url https://api.loopreturns.com/api/v1/locations \
  --header 'Content-Type: application/json' \
  --header 'X-Authorization: <api-key>' \
  --data '
{
  "name": "<string>",
  "status": "active",
  "address": {
    "address1": "<string>",
    "city": "<string>",
    "country_code": "<string>",
    "name": "<string>",
    "company": "<string>",
    "address2": "<string>",
    "region": "<string>",
    "postal_code": "<string>"
  },
  "external_id": "<string>",
  "channel": "<string>"
}
'
{
  "id": 123,
  "external_id": "<string>",
  "channel": "<string>",
  "name": "<string>",
  "status": "active",
  "address": {
    "address1": "<string>",
    "city": "<string>",
    "country_code": "<string>",
    "name": "<string>",
    "company": "<string>",
    "address2": "<string>",
    "region": "<string>",
    "postal_code": "<string>"
  }
}

Authorizations

X-Authorization
string
header
required

API Scope: "Locations (write)"

Body

application/json
name
string
required

The name of the location.

Maximum string length: 100
Example:

"Main Warehouse"

status
enum<string>
required

The status of the location.

Available options:
active,
inactive
Maximum string length: 100
address
object
required

The address of the location.

external_id
string | null

The provided external_id must be unique. If a non-unique external_id is provided, the API will respond with an error.

Maximum string length: 100
Example:

"62291d16-9b61-4fbb-b868-21c2d32dc155"

channel
string | null

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

Maximum string length: 255
Example:

"shopify"

Response

Success

id
integer<int64>

The unique integer identifier for the location, created by Loop.

Example:

9007199254740991

external_id
string | null

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

Example:

"62291d16-9b61-4fbb-b868-21c2d32dc155"

channel
string | null

The name of the channel.

Example:

"shopify"

name
string | null

The name of the location.

Maximum string length: 100
Example:

"Main Warehouse"

status
enum<string> | null

The status of the location.

Available options:
active,
inactive
address
object

The address of the location.