Changelog

This page contains the changelog of the current API version. For the past changelog, please refer to this page.

CHANGEBEFOREAFTER
Base URLhttps://api.aftership.com/commerce/2026-01https://api.aftership.com/commerce/2026-07

The new Location resource represents an organization-level warehouse, store, or other physical place used for fulfillment, order processing, and pickup settings.

New Endpoints

  • POST /locations
  • GET /locations
  • GET /locations/{id}
  • PATCH /locations/{id}

Notes

  • Location resources are organization-level resources and do not require the as-store-id header.
  • source indicates whether a location was created manually through Commerce API (manual) or imported from an ecommerce platform (platform).
  • POST /locations creates manual locations only. The required request fields are name and address.
  • Custom IDs for manual locations must be unique within the organization and cannot start with the reserved prefix app-.
  • Platform-sourced location IDs are returned in the format app-<platform>-<app_key>-<external_id>.
  • Platform-sourced locations can only patch address.email, address.phone, timezone_identifier, opening_hours, and order_processing.
  • The id returned by every Location endpoint is the canonical identifier to use elsewhere in Commerce API — for example as the location_id inside order.pickup_location and fulfillment.ship_from_location / fulfillment.pickup_location. See §3.
  • address.first_name and address.last_name are joined into one contact name on write; on read, the full contact name is returned as address.first_name and address.last_name is empty.
  • address.type is accepted by the schema for compatibility with the standard address shape but is not used for Location resources — omit it on write; on read it is always empty.
  • When pickup_setting.enabled = true, omitted address.coordinate values are auto-filled from the postal address (geocoded by AfterShip). Coordinates explicitly provided by the caller are preserved as-is.

Response Example

preparing...

From 2026-07, the location_id field on order.pickup_location, fulfillment.pickup_location, and fulfillment.ship_from_location would only accept the public Location ID returned by the new Location Resource (§2), in either form:

  • A merchant-defined custom ID (e.g. "warehouse_1") for source = manual locations.
  • A platform composite ID app-<platform>-<app_key>-<external_id> for source = platform locations.

Affected Endpoints (Request Body)

  • POST /orders (request_body.pickup_location.location_id)
  • POST /fulfillments (request_body.pickup_location.location_id, request_body.ship_from_location.location_id)
  • PATCH /fulfillments/{id} (request_body.pickup_location.location_id, request_body.ship_from_location.location_id)
BEFORE (2026-01)AFTER (2026-07)
location_id required the ID from admin.aftership.com/organization/warehouses, which was not exposed by any Commerce API endpoint.location_id accepts the Location resource's public id (GET /locations) only, previous ID would be rejected.

Recommended Flow

  1. Call GET /locations (or remember the id returned by POST /locations).
  2. Pass that id as the location_id on order/fulfillment requests.

If the supplied location_id does not match any Location under the organization, the endpoint returns 422 Unprocessable Entity with info: "The location does not exist." on the corresponding request_body.*.location_id path.