Skip to content
Last updated

Create a Warehouse

Use the warehouses endpoint to create a warehouse location in ShipStation API. The response will generate and return the warehouse_id, which is a property you'll use for many operations with ShipStation API.

For example, a warehouse_id is required when creating manifests. If you create return shipping labels, you'll use a warehouse_id to provide the return location.

Properties for Request

Property NameRequiredTypeDescription
is_defaultbooleanNullable. Default: false
Designates which single warehouse is the default on the account.
NOTE: The first warehouse created on the account automatically becomes the default. Should you want to delete this warehouse, you must create another warehouse, make the new one the default, and then you can remove the first one.
namestringnon-empty
Name of the warehouse.
origin_addressobjectThe origin address of the warehouse.
origin_address.namestringnon-empty
The name of a contact person at this address. This field may be set instead of, or in addition to, the company_name field.
origin_address.phonestringnon-empty The phone number of a contact person at this address. The format of this phone number varies depending on the country.
origin_address.emailstringNullable
Email for the address owner.
origin_address.company_namestringNullable
non-empty
 If this is a business address, then specify the company name here.
origin_address.address_line1stringnon-empty
The first line of the street address. For some addresses, this may be the only line. Other addresses may require 2 or 3 lines.
origin_address.address_line2stringNullable
non-empty
  The second line of the street address. For some addresses, this line may not be needed.
origin_address.address_line3stringNullable
non-empty
  The third line of the street address. For some addresses, this line may not be needed.
origin_address.city_localitystringnon-empty
The name of the city or locality.
origin_address.state_provincestringnon-empty
The state or province. For some countries (including the U.S.) only abbreviations are allowed. Other countries allow the full name or abbreviation.
origin_address.postal_codestringnon-empty
postal code
origin_address.country_codestring2 characters
The two-letter ISO 3166-1 country code.
origin_address.address_residential_indicatorstringDefault: "unknown"
Enum: "unknown" "yes" "no"
Indicates whether or not this is a residential address.
return_addressobjectThe return address of the warehouse.
return_address.namestringnon-empty
The name of a contact person at this address. This field may be set instead of, or in addition to, the company_name field.
return_address.phonestringnon-empty The phone number of a contact person at this address. The format of this phone number varies depending on the country.
return_address.emailstringNullable
Email for the address owner.
return_address.company_namestringNullable
non-empty
 If this is a business address, then specify the company name here.
return_address.address_line1stringnon-empty
The first line of the street address. For some addresses, this may be the only line. Other addresses may require 2 or 3 lines.
return_address.address_line2stringnon-empty
Nullable
return_address.address_line3stringnon-empty
Nullable
return_address.city_localitystringnon-empty
The name of the city or locality.
return_address.state_provincestringnon-empty
The state or province. For some countries (including the U.S.) only abbreviations are allowed. Other countries allow the full name or abbreviation.
return_address.postal_codestringnon-empty
postal code
return_address.country_codestring2 characters
The two-letter ISO 3166-1 country code.
return_address.address_residential_indicatorstringDefault: "unknown"
Enum: "unknown" "yes" "no"
Indicates whether or not this is a residential address.

Example Request & Response

POST /v1/warehouses

POST /v1/warehouses HTTP/1.1
Host: api.shipengine.com
API-Key: __YOUR_API_KEY_HERE__
Content-Type: application/json

{
  "name": "Example Corp. East Warehouse",
  "origin_address": {
    "company_name": "Example Corp.",
    "name": "John Doe",
    "phone": "111-111-1111",
    "email": "recipient@example.com",
    "address_line1": "4009 Marathon Blvd",
    "address_line2": "Suite 300",
    "city_locality": "Austin",
    "state_province": "TX",
    "postal_code": "78756",
    "country_code": "US",
    "address_residential_indicator": "no"
  },
  "return_address": {
    "company_name": "Example Corp.",
    "name": "John Doe",
    "email": "sender@example.com",
    "phone": "111-111-1111",
    "address_line1": "4009 Marathon Blvd",
    "address_line2": "Suite 300",
    "city_locality": "Austin",
    "state_province": "TX",
    "postal_code": "78756",
    "country_code": "US",
    "address_residential_indicator": "no"
  }
}

Response

The response will include the warehouse_id, a string between 1 and 25 characters that uniquely identifies the warehouse. You'll use this property for multiple ShipStation API operations.

{
  "warehouse_id": "se-277331",
  "name": "Example Corp. East Warehouse",
  "created_at": "2018-02-12T23:48:15.387Z",
  "origin_address": {
    "company_name": "Example Corp.",
    "name": "John Doe",
    "phone": "111-111-1111",
    "email": "recipient@example.com",
    "address_line1": "4009 Marathon Blvd",
    "address_line2": "Suite 300",
    "city_locality": "Austin",
    "state_province": "TX",
    "postal_code": "78756",
    "country_code": "US",
    "address_residential_indicator": "no"
  },
  "return_address": {
    "company_name": "Example Corp.",
    "name": "John Doe",
    "phone": "111-111-1111",
    "email": "sender@example.com",
    "address_line1": "4009 Marathon Blvd",
    "address_line2": "Suite 300",
    "city_locality": "Austin",
    "state_province": "TX",
    "postal_code": "78756",
    "country_code": "US",
    "address_residential_indicator": "no"
  }
}