AfterShip Locations API
The Locations API from AfterShip — 2 operation(s) for locations.
The Locations API from AfterShip — 2 operation(s) for locations.
Every API here is available over the APIs.io API and to AI agents over MCP.
One button, every client — Claude, Cursor, VS Code and the rest.
https://apis.io/mcp
find_apisBrowse and filter every API in the catalog.get_api_artifactsOne API's artifacts, grouped by type.get_openapiThe primary OpenAPI for this API.find_similar_apisAPIs that look like this one.apis_io_searchSTART HERE — APIs, providers and tags for one query, each with its total.resolveTurn a domain, URL or GitHub org into the provider it belongs to.find_cohortsEvery scored population of providers in the catalog.curl "https://apis.io/api/v1/apis/aftership-locations-api"
curl "https://apis.io/api/v1/apis?limit=25"
Discovery needs no key. Ratings and market analysis are Pro.
openapi: 3.2.0
info:
title: Aftership Locations API
contact:
name: AfterShip Support
url: https://www.aftership.com/contact-us
email: support@aftership.com
termsOfService: https://www.aftership.com/legal/terms-of-service
version: '1.0'
description: 'Operations tagged Locations across 2 of this provider''s published API definitions: aftership-commerce-api-openapi.yml, aftership-shipping-api-openapi.yml. Each path carries the servers of the definition it was published in.'
servers:
- url: https://api.aftership.com/commerce/2026-07
description: API Endpoint
- description: Sandbox
url: https://sandbox-api.aftership.com/postmen/v3
- url: https://api.aftership.com/postmen/v3
description: Production
security:
- as-api-key: []
tags:
- name: Locations
paths:
/locations:
post:
summary: Create a location
responses:
'201':
description: ''
content:
application/json:
schema:
type: object
properties:
meta:
$ref: '#/components/schemas/Meta.v1'
data:
$ref: '#/components/schemas/Location.v1'
examples:
Example 1:
value:
meta:
code: 20100
type: Created
message: The request was successful, we created a new resource and the response body contains the representation.
data:
id: warehouse_1
name: SF Warehouse
source: manual
address:
company: AfterShip
first_name: John Doe
last_name: ''
phone: '+14155551234'
email: john@example.com
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'
operationId: create-location
description: Create a manual location. Locations created through Commerce API are organization-level resources and are not bound to a store. A custom `id` can be provided, but it cannot start with the reserved prefix `app-`.
parameters: []
requestBody:
content:
application/json:
schema:
type: object
additionalProperties: false
required:
- name
- address
properties:
id:
type: string
description: A custom identifier for the location. If not provided, the system will generate a UUID. Must be unique within the organization and immutable. Cannot start with the reserved prefix `app-`.
maxLength: 128
pattern: ^[a-zA-Z0-9_-]+$
example: warehouse_1
name:
type: string
description: The location name.
maxLength: 256
example: SF Warehouse
address:
$ref: '#/components/schemas/Address_with_coordinate.v1'
description: The physical address and contact information of the location. For Location resources, `first_name` and `last_name` are joined into one contact name on write; on read, the full contact name is returned as `first_name` and `last_name` is empty. The `type` field is accepted by the schema but not used for Location resources — omit it on write; on read it is always empty.
timezone_identifier:
type: string
description: The name of the timezone where the location is located, as defined by the [IANA timezone database standard](https://en.wikipedia.org/wiki/List_of_tz_database_time_zones).
maxLength: 256
example: America/New_York
opening_hours:
$ref: '#/components/schemas/Opening_hours.v1'
description: The regular opening hours of the location.
order_processing:
type: object
additionalProperties: false
description: The order processing setting for this location. When `enabled` is `true`, `order_cutoff_time` and `order_processing_duration_days` are required.
properties:
enabled:
type: boolean
description: Whether order processing is enabled for this location.
example: true
order_cutoff_time:
type: string
description: The daily cutoff time for processing orders in `HH:mm` format.
example: '14:00'
order_processing_duration_days:
type: integer
description: The number of business days needed to process an order. Use `0` when fulfillment can be completed within 1 business day.
minimum: 0
example: 0
pickup_setting:
type: object
additionalProperties: false
description: The pickup setting for this location. When `enabled` is `true`, `order_processing_duration_seconds_min` and `order_processing_duration_seconds_max` are required.
properties:
enabled:
type: boolean
description: Whether pickup is enabled for this location.
example: true
instructions:
type: string
description: Pickup instructions shown to the customer.
maxLength: 2048
example: Please pick up at the front desk.
order_processing_duration_seconds_min:
type: integer
description: The minimum number of seconds needed before the order is ready for pickup.
minimum: 0
example: 3600
order_processing_duration_seconds_max:
type: integer
description: The maximum number of seconds needed before the order is ready for pickup.
minimum: 0
example: 7200
examples:
Example 1:
value:
id: warehouse_1
name: SF Warehouse
address:
company: AfterShip
first_name: John
last_name: Doe
phone: '+14155551234'
email: john@example.com
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
description: ''
tags:
- Locations
x-stoplight:
id: create-location
get:
summary: Get locations
operationId: get-locations
responses:
'200':
description: ''
content:
application/json:
schema:
type: object
properties:
meta:
$ref: '#/components/schemas/Meta.v1'
data:
type: object
properties:
locations:
type: array
items:
$ref: '#/components/schemas/Location.v1'
pagination:
$ref: '#/components/schemas/Pagination.v2'
parameter_string:
type: string
description: A string that includes the request parameters.
example: source=manual&page=1&limit=10
examples:
Example 1:
value:
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: john@example.com
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
description: Get location results with multiple locations.
parameters:
- schema:
type: string
enum:
- manual
- platform
in: query
name: source
description: Filter locations by source. `manual` means locations created through Commerce API. `platform` means locations imported from ecommerce platforms.
- schema:
type: integer
default: 1
minimum: 1
maximum: 200
in: query
name: page
description: Current page of the collection. Default is 1.
- schema:
type: integer
default: 10
minimum: 1
maximum: 50
in: query
name: limit
description: The maximum number of results to show on a page. Default is 10, maximum is 50.
tags:
- Locations
x-stoplight:
id: get-locations
parameters: []
servers:
- url: https://api.aftership.com/commerce/2026-07
description: API Endpoint
/locations/{id}:
parameters:
- schema:
type: string
name: id
in: path
required: true
description: Location ID. Use the `id` value returned in a `Location` resource response, such as from `GET /locations`, as this path parameter.
get:
summary: Get location by ID
responses:
'200':
description: ''
content:
application/json:
schema:
type: object
properties:
meta:
$ref: '#/components/schemas/Meta.v1'
data:
$ref: '#/components/schemas/Location.v1'
examples:
Example 1:
value:
meta:
code: 20000
type: OK
message: The request was successfully processed by AfterShip.
data:
id: warehouse_1
name: SF Warehouse
source: manual
address:
company: AfterShip
first_name: John Doe
last_name: ''
phone: '+14155551234'
email: john@example.com
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'
operationId: get-location-by-id
description: Get a location by ID. Use the `id` value returned in a `Location` resource response, such as from `GET /locations`, as this path parameter.
parameters: []
tags:
- Locations
x-stoplight:
id: get-location-by-id
patch:
summary: Update location by ID
operationId: update-location-by-id
responses:
'200':
description: ''
content:
application/json:
schema:
type: object
properties:
meta:
$ref: '#/components/schemas/Meta.v1'
data:
$ref: '#/components/schemas/Location.v1'
examples:
Example 1:
value:
meta:
code: 20000
type: OK
message: The request was successfully processed by AfterShip.
data:
id: warehouse_1
name: SF Warehouse
source: manual
address:
company: AfterShip
first_name: John Doe
last_name: ''
phone: '+14155551234'
email: john@example.com
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'
requestBody:
content:
application/json:
schema:
type: object
additionalProperties: false
properties:
name:
type: string
description: The location name. This field cannot be patched for platform-sourced locations.
maxLength: 256
example: SF Warehouse
address:
type: object
additionalProperties: false
description: Patch the address and contact information of the location. The `address` object itself cannot be `null`; omit a field to keep its current value. For platform-sourced locations, only `email` and `phone` can be patched. For Location resources, `first_name` and `last_name` are joined into one contact name on write; on read, the full contact name is returned as `first_name` and `last_name` is empty. The `type` field is accepted by the schema but not used for Location resources — omit it on write; on read it is always empty.
properties:
company:
type: string
description: The name of the company associated to the address.
maxLength: 256
example: AfterShip
first_name:
type: string
description: The first name of the person associated to the address.
maxLength: 256
example: John
last_name:
type: string
description: The last name of the person associated to the address.
maxLength: 256
example: Doe
phone:
type: string
description: The phone number of the person associated to the address.
maxLength: 256
example: '+14155551234'
email:
type: string
description: The email address of the person associated to the address.
maxLength: 256
example: john@example.com
street_1:
type: string
description: First line of the street address.
maxLength: 256
example: 123 Main St
street_2:
type: string
description: Second line of the street address.
maxLength: 256
example: Suite 100
street_3:
type: string
description: Third line of the street address.
maxLength: 256
example: ''
city:
type: string
description: The location's city, town, or village.
maxLength: 256
example: San Francisco
state:
type: string
description: The state or region of the location, such as a province, state, or prefecture.
maxLength: 256
example: CA
country_region:
type: string
description: The address country/region in [ISO 3166-1 alpha-3](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-3) format.
pattern: ^[A-Z]{3}$
example: USA
postal_code:
type: string
description: The postal code of the location.
maxLength: 256
example: '94105'
coordinate:
type: object
additionalProperties: false
description: The coordinate of the address. If `coordinate` is provided, both `latitude` and `longitude` are required.
required:
- latitude
- longitude
properties:
latitude:
type: number
description: The latitude of the address.
example: 37.7749
longitude:
type: number
description: The longitude of the address.
example: -122.4194
timezone_identifier:
type: string
description: The name of the timezone where the location is located, as defined by the [IANA timezone database standard](https://en.wikipedia.org/wiki/List_of_tz_database_time_zones).
maxLength: 256
example: America/New_York
opening_hours:
$ref: '#/components/schemas/Opening_hours.v1'
description: Patch the regular opening hours of the location. The `opening_hours` object itself cannot be `null`. You may provide only the weekdays to update, but each provided weekday object is replaced atomically and must include `open`. When `open` is `false`, `from` and `to` must be `null` or omitted. When `open` is `true`, `from` and `to` must both be provided in `HH:mm` format or both be `null` for 24-hour operation.
order_processing:
type: object
additionalProperties: false
description: Patch the order processing setting for this location. The `order_processing` object itself cannot be `null`. Omitted fields keep their current values. Sending only `enabled` toggles the setting without clearing `order_cutoff_time` or `order_processing_duration_days`; when enabling order processing, the final setting must include a valid cutoff time and processing duration.
properties:
enabled:
type: boolean
description: Whether order processing is enabled for this location.
example: true
order_cutoff_time:
type: string
description: The daily cutoff time for processing orders in `HH:mm` format.
example: '14:00'
order_processing_duration_days:
type: integer
description: The number of business days needed to process an order. Use `0` when fulfillment can be completed within 1 business day.
minimum: 0
example: 0
pickup_setting:
type: object
additionalProperties: false
description: Patch the pickup setting for this location. The `pickup_setting` object itself cannot be `null`. Omitted fields keep their current values. Sending only `enabled` toggles the setting without clearing existing pickup fields; when enabling pickup, the final setting must include valid minimum and maximum processing durations. This field cannot be patched for platform-sourced locations.
properties:
enabled:
type: boolean
description: Whether pickup is enabled for this location.
example: true
instructions:
type: string
description: Pickup instructions shown to the customer.
maxLength: 2048
example: Please pick up at the front desk.
order_processing_duration_seconds_min:
type: integer
description: The minimum number of seconds needed before the order is ready for pickup.
minimum: 0
example: 3600
order_processing_duration_seconds_max:
type: integer
description: The maximum number of seconds needed before the order is ready for pickup.
minimum: 0
example: 7200
examples:
Example 1:
value:
address:
city: San Francisco
timezone_identifier: America/New_York
opening_hours:
monday:
open: true
from: 09:00
to: '18:00'
order_processing:
enabled: true
order_cutoff_time: '14:00'
order_processing_duration_days: 0
description: Update a location by ID. Use the `id` value returned in a `Location` resource response, such as from `GET /locations`, as this path parameter. Omit a field to keep its current value. Top-level objects and scalar fields cannot be set to `null`. For platform-sourced locations, only `address.email`, `address.phone`, `timezone_identifier`, `opening_hours`, and `order_processing` can be patched; other fields are managed by the ecommerce platform.
parameters: []
tags:
- Locations
x-stoplight:
id: update-location-by-id
servers:
- url: https://api.aftership.com/commerce/2026-07
description: API Endpoint
components:
schemas:
Opening_hours.v1:
description: The regular opening hours of the location.
title: OpeningHours
x-stoplight:
id: n7s4wz0dwk5ai
type: object
properties:
sunday:
$ref: '#/components/schemas/Opening_hour_period.v1'
monday:
$ref: '#/components/schemas/Opening_hour_period.v1'
tuesday:
$ref: '#/components/schemas/Opening_hour_period.v1'
wednesday:
$ref: '#/componen
# --- truncated at 32 KB (54 KB total) ---
# Full source: https://raw.githubusercontent.com/api-evangelist/aftership/refs/heads/main/openapi/aftership-locations-api-openapi.yml