Changelog
This page contains the changelog of the current API version. For the past changelog, please refer to this page.
2026-07 (2026-07-09)
1. General
| CHANGE | BEFORE | AFTER |
|---|---|---|
| Base URL | https://api.aftership.com/commerce/2026-01 | https://api.aftership.com/commerce/2026-07 |
2. Location Resource
2.1 Added Location Resource
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 /locationsGET /locationsGET /locations/{id}PATCH /locations/{id}
Notes
- Location resources are organization-level resources and do not require the
as-store-idheader. sourceindicates whether a location was created manually through Commerce API (manual) or imported from an ecommerce platform (platform).POST /locationscreates manual locations only. The required request fields arenameandaddress.- 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, andorder_processing. - The
idreturned by every Location endpoint is the canonical identifier to use elsewhere in Commerce API — for example as thelocation_idinsideorder.pickup_locationandfulfillment.ship_from_location/fulfillment.pickup_location. See §3. address.first_nameandaddress.last_nameare joined into one contact name on write; on read, the full contact name is returned asaddress.first_nameandaddress.last_nameis empty.address.typeis 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, omittedaddress.coordinatevalues are auto-filled from the postal address (geocoded by AfterShip). Coordinates explicitly provided by the caller are preserved as-is.
Response Example
{ "id": "warehouse_1", "name": "SF Warehouse", "source": "manual", "address": { "company": "AfterShip", "first_name": "John", "last_name": "Doe", "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" }
3. Order & Fulfillment Resource Changes
3.1 pickup_location.location_id / ship_from_location.location_id now accepts the Location ID only
pickup_location.location_id / ship_from_location.location_id now accepts the Location ID onlyFrom 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") forsource = manuallocations. - A platform composite ID
app-<platform>-<app_key>-<external_id>forsource = platformlocations.
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
- Call
GET /locations(or remember theidreturned byPOST /locations). - Pass that
idas thelocation_idon 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.
4. Product Resource Changes
4.1 New hs_code and origin_country_region fields on product variant
hs_code and origin_country_region fields on product variantThe product variant now supports two customs-related fields. This is a backward-compatible addition made after the initial release of this version: existing requests keep working without changes.
| Field | Type | Description |
|---|---|---|
hs_code | string (max 256) | Harmonized System (HS) code of the variant. |
origin_country_region | string | Origin country of the variant, in ISO 3166-1 alpha-3 format, for example AUS. |
Affected Endpoints (Request Body and Response Body)
POST /productsPATCH /products/{id}POST /products/{id}/variantsPATCH /products/{id}/variants/{variant_id}GET /products,GET /products/{id},GET /products/{id}/variants/{variant_id}(response only)
Request Example
{ "variants": [ { "id": "5634477687", "sku": "SKU001", "price": "10", "hs_code": "6403911600", "origin_country_region": "AUS" } ] }
If origin_country_region is not a valid ISO 3166-1 alpha-3 code (for example AU or Australia), the endpoint returns 422 Unprocessable Entity. On PATCH, omitting a field keeps its current value.