Get locations

get
/locations

Get location results with multiple locations.

source
string

Filter locations by source. manual means locations created through Commerce API. platform means locations imported from ecommerce platforms.

Allowed values:
manualplatform
page
integer

Current page of the collection. Default is 1.

>= 1<= 200
Default:
1
limit
integer

The maximum number of results to show on a page. Default is 10, maximum is 50.

>= 1<= 50
Default:
10
meta
Meta

The Meta model holds the metadata of the API response, including relevant error details for debugging purposes.Show all...

Example:
{"code":20000,"type":"OK","message":"The request was successfully processed by AfterShip."}
code
number
required

Error code in integer format. For detailed information, please refer to the Request Error introduction page.

Default:
20000
Example:
20000
type
string
required

Response type string for the reference. For detailed information, please refer to the Request Error introduction page.

>= 1 characters
Example:
OK
message
string
required

Human-readable response message. For detailed information, please refer to the Request Error introduction page.

>= 1 characters
Example:
The request was successfully processed by AfterShip.
errors
array[Error]

Error detail object. Each error object contains a "path" key and an "info" key. The "path" is the JSON path of the request object to indicate the error location. The "info" is a human-readable description of the error.Show all...

data
object
locations
array[Location]

A Location represents a warehouse, store, or other physical place used for fulfillment, order processing, and pickup settings. Location resources are scoped to the organization and are not bound to a store.

pagination
Pagination

The Pagination holds the information for the pagination when the response contains multiple objects.

Example:
{"page":1,"limit":10,"has_next_page":false}
parameter_string
string

A string that includes the request parameters.

Example:
source=manual&page=1&limit=10
Auth
:
Parameters
:
:
:
Response Example
{ "meta": { "code": 20000, "type": "OK", "message": "The request was successfully processed by AfterShip." }, "data": { "locations": [ { "id": "warehouse_1", "name": "SF Warehouse", "source": "manual", "address": { "company": "AfterShip", "first_name": "John Doe", "last_name": "", "phone": "+14155551234", "email": "[email protected]", "street_1": "123 Main St", "street_2": "Suite 100", "street_3": "", "city": "San Francisco", "state": "CA", "country_region": "USA", "postal_code": "94105", "coordinate": { "latitude": 37.7749, "longitude": -122.4194 } }, "timezone_identifier": "America/New_York", "opening_hours": { "sunday": { "open": false, "from": null, "to": null }, "monday": { "open": true, "from": "09:00", "to": "18:00" }, "tuesday": { "open": true, "from": "09:00", "to": "18:00" }, "wednesday": { "open": true, "from": "09:00", "to": "18:00" }, "thursday": { "open": true, "from": "09:00", "to": "18:00" }, "friday": { "open": true, "from": "09:00", "to": "18:00" }, "saturday": { "open": false, "from": null, "to": null } }, "order_processing": { "enabled": true, "order_cutoff_time": "14:00", "order_processing_duration_days": 0 }, "pickup_setting": { "enabled": true, "instructions": "Please pick up at the front desk.", "order_processing_duration_seconds_min": 3600, "order_processing_duration_seconds_max": 7200 }, "created_at": "2026-01-01T00:00:00Z", "updated_at": "2026-04-24T00:00:00Z" } ], "pagination": { "page": 1, "limit": 10, "has_next_page": false }, "parameter_string": "source=manual&page=1&limit=10" } }