Skip to content

12.0.0

Choose a tag to compare

@1415003719 1415003719 released this 13 Jul 08:23
· 8 commits to 2026-07 since this release
d3a5d62

What's New - AfterShip Tracking Java SDK v12.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
CreateTrackingRequest request = new CreateTrackingRequest();
request.setTrackingNumber("1234567890");
request.setSlug("usps");
request.setShipmentDirection(CreateTrackingRequestShipmentDirection.Return);
CreateTrackingResponse response = TrackingResource.createTracking()
    .setCreateTrackingRequest(request)
    .create();

// Read
GetTrackingByIdResponse res = TrackingResource.getTrackingById()
    .setId(id)
    .fetch();
Tracking tracking = res.getData();
tracking.getShipmentDirection(); // "forward" | "return"
tracking.getReturnShipment();    // linked return shipment: id, tracking_number, slug
tracking.getForwardShipment();   // linked forward shipment: id

2. Multi-Piece Shipment Info

New read-only multi_piece_info field on the Tracking model:

if (tracking.getMultiPieceInfo() != null) {
    tracking.getMultiPieceInfo().getType(); // "master" | "child"
    for (TrackingMultiPieceInfoPieces piece : tracking.getMultiPieceInfo().getPieces()) {
        // piece.getTrackingId(), piece.getTrackingNumber(), piece.getType(), piece.getTrackable()
    }
}

3. Customer ID

New read/write id field on customers[], for storing the customer identifier from your merchant or platform (e.g. Shopify) system:

CreateTrackingRequestCustomers customer = new CreateTrackingRequestCustomers();
customer.setEmail("customer@example.com");
customer.setId("shopify-customer-123");
request.setCustomers(List.of(customer));

4. Proof of Delivery, Shipment Dimensions, Checkpoint Hash

New read-only fields on the Tracking model:

tracking.getProofOfDelivery();        // POD records (type, url); feature must be enabled
tracking.getShipmentDimensions();     // unit, length, width, height
tracking.getCheckpoints().get(0).getHash(); // 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: 11.0.0...12.0.0