v1

latestOpenAPI 3.1.02026-07-2689175245.8 KB
Destinations

Create Destination

Create a destination.

Required API key scope

  • Destinations (Write)
post/destinations

Request body

namestring required

The destination's name.

type'warehouse' | 'donate' required

The type of location represented by the destination.

enabledboolean

Whether the destination is enabled as a return destination.

Example request

{
  "name": "Example Destination",
  "type": "warehouse",
  "enabled": true,
  "address": {
    "name": "Main Warehouse",
    "company": "Universal Exports",
    "address1": "123 Main St",
    "address2": "Unit 456",
    "city": "Columbus",
    "state": "Ohio",
    "zip": "43210",
    "country": "United States",
    "country_code": "US",
    "phone": "+1-678-999-8212"
  }
}

Response

Success

idinteger

The destination's unique identifier.

type'warehouse' | 'donate'

The type of location represented by the destination.

namestring

The destination's name.

enabledboolean

Whether the destination is enabled as a return destination.

provider_location_idinteger nullable

The numeric location identifier from the commerce platform (for example Shopify) when a location is linked to this destination in Loop. null when no location is linked. The linked location's source field indicates which provider the ID belongs to.

Example response

{
  "id": 1,
  "type": "warehouse",
  "name": "Example Destination",
  "enabled": true,
  "provider_location_id": 42424242,
  "address": {
    "id": 23432434,
    "hash": "dd93hf99d83hdops9d8fhh38fhd03hh3",
    "created_at": "2021-10-01T03:30:15.000Z",
    "updated_at": "2021-10-01T03:30:15.000Z",
    "name": "Staples",
    "company": "Example Company",
    "address1": "1747 Olentangy River Rd",
    "city": "Columbus",
    "state": "OH",
    "zip": "43212",
    "country": "United States of America",
    "country_code": "US",
    "latitude": 39.995329,
    "longitude": -83.026838
  }
}