Skip to content

Releases: AfterShip/tracking-sdk-ruby

15.0.0

Choose a tag to compare

@1415003719 1415003719 released this 13 Jul 08:26
fff22a8

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: id

2. 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
end

3. 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 deduplication

5. 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

Choose a tag to compare

@1415003719 1415003719 released this 09 Feb 09:13
44b1c13

What's Changed

Full Changelog: 13.0.0...14.0.0

13.0.0

Choose a tag to compare

@1415003719 1415003719 released this 21 Oct 10:10
764958f

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.slug

New 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_header

Impact: 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::TrackingCustomers

Impact: 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::DELIVERED

Impact: Code using string values needs to be changed to use corresponding enum types

12.0.0

Choose a tag to compare

@1415003719 1415003719 released this 22 Jul 08:10
dd71cbb

What's Changed

Full Changelog: 11.0.0...12.0.0

11.0.0

Choose a tag to compare

@1415003719 1415003719 released this 23 Apr 06:13
89a64ec

What's Changed

New Contributors

Full Changelog: 10.0.0...11.0.0

10.0.0

Choose a tag to compare

@panxl6 panxl6 released this 20 Jan 06:11
b72e913
  • supporting 2025-01 version.

9.0.0

Choose a tag to compare

@panxl6 panxl6 released this 25 Oct 06:49
12794d3
  • 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

Choose a tag to compare

@panxl6 panxl6 released this 01 Aug 01:48
b4691c3
  • 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

Choose a tag to compare

@panxl6 panxl6 released this 01 Jul 02:59
12ac277
  • 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