Skip to content

Releases: AfterShip/tracking-sdk-python

8.0.1

27 Oct 03:43
1bd6cae

Choose a tag to compare

What's Changed

Full Changelog: 8.0.0...8.0.1

8.0.0

21 Oct 03:03
2120f93

Choose a tag to compare

Breaking Changes - AfterShip Tracking Python SDK v8.0.0

1. Response Structure Complete Refactor

All Response classes now contain response_header and data structure:

# v7 - Direct access to response properties
response = client.tracking.create_tracking(request)
tracking_id = response.id
tracking_number = response.tracking_number

# v8 - Must access through data property
response = client.tracking.create_tracking(request)
tracking_id = response.data.id
tracking_number = response.data.tracking_number
headers = response.response_header  # New feature: get response headers

Applies to all API responses: create_tracking, get_tracking_by_id, get_trackings, update_tracking_by_id, get_couriers, etc.

2. Model Names Simplified

Tracking model naming convention changed:

# v7 - Suffix naming
from tracking.models.courier_estimated_delivery_date_tracking import CourierEstimatedDeliveryDateTracking
from tracking.models.shipment_weight_tracking import ShipmentWeightTracking
from tracking.models.aftership_estimated_delivery_date_tracking import AftershipEstimatedDeliveryDateTracking

# v8 - Prefix naming  
from tracking.models.tracking_courier_estimated_delivery_date import TrackingCourierEstimatedDeliveryDate
from tracking.models.tracking_shipment_weight import TrackingShipmentWeight
from tracking.models.tracking_aftership_estimated_delivery_date import TrackingAftershipEstimatedDeliveryDate

Response class simplification:

  • Old SDK had 150+ specialized response classes (e.g., AftershipEstimatedDeliveryDateCreateTrackingResponse, CarbonEmissionsGetTrackingByIdResponse)
  • New SDK unified these into simple, consistent response classes

3. String Parameters to Strong-Typed Enums

Parameters changed from string to enum types:

# v7 - String parameters
from tracking.models.mark_tracking_completed_by_id_request import MarkTrackingCompletedByIdRequest

request = MarkTrackingCompletedByIdRequest(
    reason="DELIVERED"  # String parameter
)

# v8 - Enum parameters
from tracking.models.mark_tracking_completed_by_id_request import MarkTrackingCompletedByIdRequest
from tracking.models.mark_tracking_completed_by_id_request_reason import MarkTrackingCompletedByIdRequestReason

request = MarkTrackingCompletedByIdRequest(
    reason=MarkTrackingCompletedByIdRequestReason.DELIVERED  # Enum parameter
)

Enum constants also changed naming convention:

# v7 - Concatenated naming
Tag.INFORECEIVED
Tag.INTRANSIT
Tag.OUTFORDELIVERY

# v8 - Underscore separated naming
Tag.INFO_RECEIVED
Tag.IN_TRANSIT
Tag.OUT_FOR_DELIVERY

7.1.0

14 Oct 06:21
26500c3

Choose a tag to compare

What's Changed

Full Changelog: 7.0.0...7.1.0

7.0.0

22 Jul 08:52
1aaf75a

Choose a tag to compare

What's Changed

Full Changelog: 6.0.0...7.0.0

6.0.0

23 Apr 09:12
8cd876e

Choose a tag to compare

What's Changed

Full Changelog: 5.0.1...6.0.0

5.0.1

03 Mar 11:03
0ccc240

Choose a tag to compare

What's Changed

Full Changelog: 5.0.0...5.0.1

5.0.0

17 Jan 02:19
8bb2af1

Choose a tag to compare

What's Changed

New Contributors

Full Changelog: https://github.com/AfterShip/tracking-sdk-python/commits/5.0.0

4.0.0

25 Oct 03:23
7b8d4cc

Choose a tag to compare

  • 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
4.x.x 2024-10 https://github.com/AfterShip/tracking-sdk-python/tree/2024-10
3.x.x 2024-07 https://github.com/AfterShip/tracking-sdk-python/tree/2024-07
2.x.x 2024-04 https://github.com/AfterShip/tracking-sdk-python/tree/2024-04
<=1.x.x Legacy API https://github.com/AfterShip/aftership-sdk-python

3.0.0

29 Jul 01:48
1073ce2

Choose a tag to compare

  • 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
3.x.x 2024-07 https://github.com/AfterShip/tracking-sdk-python/tree/2024-07
2.x.x 2024-04 https://github.com/AfterShip/tracking-sdk-python/tree/2024-04
<=1.x.x Legacy API https://github.com/AfterShip/aftership-sdk-python

2.0.1

25 Jun 08:47
9143d1a

Choose a tag to compare

  • 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
2.x.x 2024-04 https://github.com/AfterShip/tracking-sdk-python/tree/2024-04
<=1.x.x Legacy API https://github.com/AfterShip/aftership-sdk-python