Releases: AfterShip/tracking-sdk-ruby
Release list
15.0.0
What's New - AfterShip Tracking Ruby SDK v15.0.0
This release upgrades the SDK to the AfterShip Tracking API version 2026-07 (previously 2026-01). All endpoints now call /tracking/2026-07/.... See the 2026-07 Migration Guide for the underlying API changes.
There are no breaking changes — all 2026-07 API changes are additive. The major version bump reflects the API version upgrade only.
1. Shipment Direction and Linked Shipments
New read/write field shipment_direction (forward | return) on CreateTrackingRequest, UpdateTrackingByIdRequest, and the Tracking model, plus read-only links between forward and return shipments:
# Write
request = AftershipAPI::Model::CreateTrackingRequest.new
request.tracking_number = '1234567890'
request.slug = 'usps'
request.shipment_direction = AftershipAPI::Model::CreateTrackingRequestShipmentDirection::RETURN
response = AftershipAPI::Tracking.create_tracking(body: request)
# Read
response = AftershipAPI::Tracking.get_tracking_by_id(id: id)
tracking = response.data
tracking.shipment_direction # "forward" | "return"
tracking.return_shipment # linked return shipment: id, tracking_number, slug
tracking.forward_shipment # linked forward shipment: id2. Multi-Piece Shipment Info
New read-only multi_piece_info field on the Tracking model:
if tracking.multi_piece_info
tracking.multi_piece_info.type # "master" | "child"
tracking.multi_piece_info.pieces.each do |piece|
# piece.tracking_id, piece.tracking_number, piece.type, piece.trackable
end
end3. Customer ID
New read/write id field on customers[], for storing the customer identifier from your merchant or platform (e.g. Shopify) system:
customer = AftershipAPI::Model::CreateTrackingRequestCustomers.new
customer.email = 'customer@example.com'
customer.id = 'shopify-customer-123'
request.customers = [customer]4. Proof of Delivery, Shipment Dimensions, Checkpoint Hash
New read-only fields on the Tracking model:
tracking.proof_of_delivery # POD records (type, url); feature must be enabled
tracking.shipment_dimensions # unit, length, width, height
tracking.checkpoints[0].hash # unique hash per checkpoint event, for deduplication5. 10 New Delivery Sub-statuses
The API may now return the following new subtag values. subtag is a plain string in the SDK, so no code change is required:
| Sub-status | Message |
|---|---|
Delivered_005 |
Delivered to neighbor |
Exception_016 |
Delayed (Processing issue) |
Exception_017 |
Delayed (Extreme weather) |
Exception_018 |
Incorrect missing documents |
Exception_019 |
Delayed (Late flight) |
Exception_020 |
Shipment cancelled |
Exception_021 |
Shipment disposed |
InTransit_011 |
Import customs clearance completed |
InTransit_012 |
Import customs clearance started |
InTransit_013 |
Drop off for carrier pickup |
Full Changelog: 14.0.0...15.0.0
14.0.0
13.0.0
Breaking Changes - AfterShip Tracking Ruby SDK New Version
1. Complete Response Structure Refactor
Old Version - Direct Property Access
# Old version - Direct property access
response = api.create_tracking(body: request)
id = response.id
tracking_number = response.tracking_number
slug = response.slugNew Version - Must Access Through data
# New version - Access through data
response = api.create_tracking(body: request)
data = response.data
id = data.id
tracking_number = data.tracking_number
slug = data.slug
# Can also access response headers
response_header = response.response_headerImpact: All API response handling code needs to be rewritten to access actual data through the data method
2. Model Name Changes - Prefix Naming Convention
Model classes changed from suffix naming to prefix naming
# Old version - Suffix naming
require 'aftership-tracking-sdk'
# Using old models
courier_edd = AftershipAPI::Model::CourierEstimatedDeliveryDateTracking
shipment_weight = AftershipAPI::Model::ShipmentWeightTracking
aftership_edd = AftershipAPI::Model::AftershipEstimatedDeliveryDateTracking
carbon_emissions = AftershipAPI::Model::CarbonEmissionsTracking
custom_edd = AftershipAPI::Model::CustomEstimatedDeliveryDateTracking
first_estimated = AftershipAPI::Model::FirstEstimatedDeliveryTracking
first_mile = AftershipAPI::Model::FirstMileTracking
last_mile = AftershipAPI::Model::LastMileTracking
customers = AftershipAPI::Model::CustomersTracking
# New version - Prefix naming
require 'aftership-tracking-sdk'
# Using new models
courier_edd = AftershipAPI::Model::TrackingCourierEstimatedDeliveryDate
shipment_weight = AftershipAPI::Model::TrackingShipmentWeight
aftership_edd = AftershipAPI::Model::TrackingAftershipEstimatedDeliveryDate
carbon_emissions = AftershipAPI::Model::TrackingCarbonEmissions
custom_edd = AftershipAPI::Model::TrackingCustomEstimatedDeliveryDate
first_estimated = AftershipAPI::Model::TrackingFirstEstimatedDelivery
first_mile = AftershipAPI::Model::TrackingFirstMile
last_mile = AftershipAPI::Model::TrackingLastMile
customers = AftershipAPI::Model::TrackingCustomersImpact: All nested Tracking model class names need to be updated from XxxTracking to TrackingXxx
3. Enum Member Name Changes
Tag enum member names changed to underscore-separated
| Old Version | New Version |
|---|---|
Tag::INFORECEIVED |
Tag::INFO_RECEIVED |
Tag::INTRANSIT |
Tag::IN_TRANSIT |
Tag::OUTFORDELIVERY |
Tag::OUT_FOR_DELIVERY |
Tag::ATTEMPTFAIL |
Tag::ATTEMPT_FAIL |
Tag::AVAILABLEFORPICKUP |
Tag::AVAILABLE_FOR_PICKUP |
Impact: Code using these enum members needs name updates
4. String to Enum Changes
Several string fields changed to enum types (following API documentation)
# 1. CreateTrackingRequest.delivery_type
# Old version
request = AftershipAPI::Model::CreateTrackingRequest.new
request.delivery_type = "pickup_at_store"
# New version
request = AftershipAPI::Model::CreateTrackingRequest.new
request.delivery_type = AftershipAPI::Model::CreateTrackingRequestDeliveryType::PICKUP_AT_STORE
# 2. UpdateTrackingByIdRequest.delivery_type
# Old version
update_request.delivery_type = "door_to_door"
# New version
update_request.delivery_type = AftershipAPI::Model::UpdateTrackingByIdRequestDeliveryType::DOOR_TO_DOOR
# 3. MarkTrackingCompletedByIdRequest.reason
# Old version
mark_request.reason = "DELIVERED"
# New version
mark_request.reason = AftershipAPI::Model::MarkTrackingCompletedByIdRequestReason::DELIVEREDImpact: Code using string values needs to be changed to use corresponding enum types
12.0.0
11.0.0
What's Changed
- support 2025-04 version by @1415003719 in #10
New Contributors
- @1415003719 made their first contribution in #10
Full Changelog: 10.0.0...11.0.0
10.0.0
9.0.0
- supporting 2024-10 version.
API and SDK Version
Each SDK version is designed to work with a specific API version. Please refer to the table below to identify the supported API versions for each SDK version, ensuring you select the appropriate SDK version for the API version you intend to use.
| SDK Version | Supported API Version | Branch |
|---|---|---|
| 9.x.x | 2024-10 | https://github.com/AfterShip/tracking-sdk-ruby/tree/2024-10 |
| 8.x.x | 2024-07 | https://github.com/AfterShip/tracking-sdk-ruby/tree/2024-07 |
| 7.x.x | 2024-04 | https://github.com/AfterShip/tracking-sdk-ruby/tree/2024-04 |
| <=6.x.x | Legacy API | https://github.com/AfterShip/aftership-sdk-ruby |
8.0.0
- supporting 2024-07 version.
API and SDK Version
Each SDK version is designed to work with a specific API version. Please refer to the table below to identify the supported API versions for each SDK version, ensuring you select the appropriate SDK version for the API version you intend to use.
| SDK Version | Supported API Version | Branch |
|---|---|---|
| 8.x.x | 2024-07 | https://github.com/AfterShip/tracking-sdk-ruby/tree/2024-07 |
| 7.x.x | 2024-04 | https://github.com/AfterShip/tracking-sdk-ruby/tree/2024-04 |
| <=6.x.x | Legacy API | https://github.com/AfterShip/aftership-sdk-ruby |
7.0.0
- supporting Tracking API 2024-04 version.
API and SDK Version
Each SDK version is designed to work with a specific API version. Please refer to the table below to identify the supported API versions for each SDK version, ensuring you select the appropriate SDK version for the API version you intend to use.
| SDK Version | Supported API Version | Branch |
|---|---|---|
| 7.x.x | 2024-04 | https://github.com/AfterShip/tracking-sdk-ruby/tree/2024-04 |
| <=6.x.x | Legacy API | https://github.com/AfterShip/aftership-sdk-ruby |