Site Logo

Create a Warehouse

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

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.
name✔stringnon-empty
Name of the warehouse.
origin_address✔objectThe origin address of the warehouse.
origin_address.name✔stringnon-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.phone✔string non-empty The phone number of a contact person at this address. The format of this phone number varies depending on the country.
origin_address.emailstring Nullable
Email for the address owner.
origin_address.company_namestring Nullable
non-empty
 If this is a business address, then specify the company name here.
origin_address.address_line1✔string non-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_locality✔string  non-empty
The name of the city or locality.
origin_address.state_province✔string  non-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_code✔string  non-empty
postal code
origin_address.country_code✔string  2 characters
The two-letter ISO 3166-1 country code.
origin_address.address_residential_indicator✔stringDefault: "unknown"
Enum: "unknown" "yes" "no"
Indicates whether or not this is a residential address.
return_addressobjectThe return address of the warehouse.
return_address.name✔stringnon-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.phone✔string non-empty The phone number of a contact person at this address. The format of this phone number varies depending on the country.
return_address.emailstring Nullable
Email for the address owner.
return_address.company_namestring Nullable
non-empty
 If this is a business address, then specify the company name here.
return_address.address_line1✔string non-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_locality✔string  non-empty
The name of the city or locality.
return_address.state_province✔string  non-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_code✔string  non-empty
postal code
return_address.country_code✔string  2 characters
The two-letter ISO 3166-1 country code.
return_address.address_residential_indicator✔stringDefault: "unknown"
Enum: "unknown" "yes" "no"
Indicates whether or not this is a residential address.

Example Request & Response

POST /v1/warehouses

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
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": "[email protected]",
"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": "[email protected]",
"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 ShipEngine operations.

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
{
"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": "[email protected]",
"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": "[email protected]",
"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"
}
}