Skip to content

Commit 20438c1

Browse files
authored
Merge pull request #20 from 1415003719/2025-07
support 2025-07
2 parents 60f291a + 591be93 commit 20438c1

File tree

7 files changed

+20
-19
lines changed

7 files changed

+20
-19
lines changed

README.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,6 +42,7 @@ Each SDK version is designed to work with a specific API version. Please refer t
4242

4343
| SDK Version | Supported API Version | Branch |
4444
| ----------- | --------------------- | ------------------------------------------------------------- |
45+
| 7.x.x | 2025-07 | https://github.com/AfterShip/tracking-sdk-python/tree/2025-07 |
4546
| 6.x.x | 2025-04 | https://github.com/AfterShip/tracking-sdk-python/tree/2025-04 |
4647
| 5.x.x | 2025-01 | https://github.com/AfterShip/tracking-sdk-python/tree/2025-01 |
4748
| 4.x.x | 2024-10 | https://github.com/AfterShip/tracking-sdk-python/tree/2024-10 |
@@ -98,7 +99,7 @@ except exceptions.RateLimitExceedError:
9899

99100
## Rate Limiter
100101

101-
See the [Rate Limit](https://www.aftership.com/docs/tracking/2025-04/quickstart/api-quick-start) to understand the AfterShip rate limit policy.
102+
See the [Rate Limit](https://www.aftership.com/docs/tracking/2025-07/quickstart/api-quick-start) to understand the AfterShip rate limit policy.
102103

103104
## Error Handling
104105

tracking/__init__.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,4 +11,4 @@
1111
from . import exceptions
1212
from .models import *
1313

14-
__version__ = "6.0.0"
14+
__version__ = "7.0.0"

tracking/api/courier.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ def detect_courier(
3333
a path to an SSL certificate file, an `ssl.SSLContext`, or `False`
3434
(which will disable verification).
3535
"""
36-
url = "/tracking/2025-04/couriers/detect"
36+
url = "/tracking/2025-07/couriers/detect"
3737

3838
body = detect_courier_request
3939
if not isinstance(body, dict):
@@ -58,7 +58,7 @@ def get_couriers(self, **kwargs) -> GetCouriersResponse:
5858
**active**: bool. get user activated couriers
5959
**slug**: str. Unique courier code Use comma for multiple values. (Example: dhl,ups,usps)
6060
"""
61-
url = "/tracking/2025-04/couriers"
61+
url = "/tracking/2025-07/couriers"
6262
params_keys = {
6363
"active",
6464
"slug",

tracking/api/courier_connection.py

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ def delete_courier_connections_by_id(
3838
a path to an SSL certificate file, an `ssl.SSLContext`, or `False`
3939
(which will disable verification).
4040
"""
41-
url = f"/tracking/2025-04/courier-connections/{courier_connection_id}"
41+
url = f"/tracking/2025-07/courier-connections/{courier_connection_id}"
4242

4343
result = self._request("DELETE", url=url, **kwargs)
4444
return DeleteCourierConnectionsByIdResponse().from_dict(result)
@@ -59,7 +59,7 @@ def get_courier_connections(self, **kwargs) -> GetCourierConnectionsResponse:
5959
**cursor**: str. A string representing the cursor value for the current page of results.
6060
**limit**: str. Number of courier connections each page contain. (Default: 100, Max: 200)
6161
"""
62-
url = "/tracking/2025-04/courier-connections"
62+
url = "/tracking/2025-07/courier-connections"
6363
params_keys = {
6464
"courier_slug",
6565
"cursor",
@@ -90,7 +90,7 @@ def get_courier_connections_by_id(
9090
a path to an SSL certificate file, an `ssl.SSLContext`, or `False`
9191
(which will disable verification).
9292
"""
93-
url = f"/tracking/2025-04/courier-connections/{courier_connection_id}"
93+
url = f"/tracking/2025-07/courier-connections/{courier_connection_id}"
9494

9595
result = self._request("GET", url=url, **kwargs)
9696
return GetCourierConnectionsByIdResponse().from_dict(result)
@@ -110,7 +110,7 @@ def post_courier_connections(
110110
a path to an SSL certificate file, an `ssl.SSLContext`, or `False`
111111
(which will disable verification).
112112
"""
113-
url = "/tracking/2025-04/courier-connections"
113+
url = "/tracking/2025-07/courier-connections"
114114

115115
body = post_courier_connections_request
116116
if not isinstance(body, dict):
@@ -139,7 +139,7 @@ def put_courier_connections_by_id(
139139
a path to an SSL certificate file, an `ssl.SSLContext`, or `False`
140140
(which will disable verification).
141141
"""
142-
url = f"/tracking/2025-04/courier-connections/{courier_connection_id}"
142+
url = f"/tracking/2025-07/courier-connections/{courier_connection_id}"
143143

144144
body = put_courier_connections_by_id_request
145145
if not isinstance(body, dict):

tracking/api/estimated_delivery_date.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ def predict(self, predict_request: Union[PredictRequest, dict], **kwargs) -> Pre
3232
a path to an SSL certificate file, an `ssl.SSLContext`, or `False`
3333
(which will disable verification).
3434
"""
35-
url = "/tracking/2025-04/estimated-delivery-date/predict"
35+
url = "/tracking/2025-07/estimated-delivery-date/predict"
3636

3737
body = predict_request
3838
if not isinstance(body, dict):
@@ -57,7 +57,7 @@ def predict_batch(
5757
a path to an SSL certificate file, an `ssl.SSLContext`, or `False`
5858
(which will disable verification).
5959
"""
60-
url = "/tracking/2025-04/estimated-delivery-date/predict-batch"
60+
url = "/tracking/2025-07/estimated-delivery-date/predict-batch"
6161

6262
body = predict_batch_request
6363
if not isinstance(body, dict):

tracking/api/tracking.py

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@ def create_tracking(
4141
a path to an SSL certificate file, an `ssl.SSLContext`, or `False`
4242
(which will disable verification).
4343
"""
44-
url = "/tracking/2025-04/trackings"
44+
url = "/tracking/2025-07/trackings"
4545

4646
body = create_tracking_request
4747
if not isinstance(body, dict):
@@ -66,7 +66,7 @@ def delete_tracking_by_id(
6666
a path to an SSL certificate file, an `ssl.SSLContext`, or `False`
6767
(which will disable verification).
6868
"""
69-
url = f"/tracking/2025-04/trackings/{tracking_id}"
69+
url = f"/tracking/2025-07/trackings/{tracking_id}"
7070

7171
result = self._request("DELETE", url=url, **kwargs)
7272
return DeleteTrackingByIdResponse().from_dict(result)
@@ -89,7 +89,7 @@ def get_tracking_by_id(
8989
**fields**: str. List of fields to include in the response. Use comma for multiple values. Fields to include: `destination_postal_code`, `tracking_ship_date`, `tracking_account_number`, `tracking_key`, `origin_country_region`, `destination_country_region`, `destination_state`, `title`, `order_id`, `tag`, `checkpoints`
9090
**lang**: str. Translate checkpoint messages from the carrier’s provided language to the target language. Supported target languages include:</br>&nbsp;&nbsp;&nbsp;&nbsp;- English (en)</br>&nbsp;&nbsp;&nbsp;&nbsp;- French (fr)</br>&nbsp;&nbsp;&nbsp;&nbsp;- French Canadian (fr-CA)</br>&nbsp;&nbsp;&nbsp;&nbsp;- Arabic (ar)</br>&nbsp;&nbsp;&nbsp;&nbsp;- Bulgarian (bg)</br>&nbsp;&nbsp;&nbsp;&nbsp;- Catalan (ca)</br>&nbsp;&nbsp;&nbsp;&nbsp;- Croatian (hr)</br>&nbsp;&nbsp;&nbsp;&nbsp;- Czech (cs)</br>&nbsp;&nbsp;&nbsp;&nbsp;- Danish (da)</br>&nbsp;&nbsp;&nbsp;&nbsp;- Dutch (nl)</br>&nbsp;&nbsp;&nbsp;&nbsp;- Estonian (et)</br>&nbsp;&nbsp;&nbsp;&nbsp;- Filipino (tl)</br>&nbsp;&nbsp;&nbsp;&nbsp;- Finnish (fi)</br>&nbsp;&nbsp;&nbsp;&nbsp;- German (de)</br>&nbsp;&nbsp;&nbsp;&nbsp;- Greek (el)</br>&nbsp;&nbsp;&nbsp;&nbsp;- Hebrew (he)</br>&nbsp;&nbsp;&nbsp;&nbsp;- Hindi (hi)</br>&nbsp;&nbsp;&nbsp;&nbsp;- Hungarian (hu)</br>&nbsp;&nbsp;&nbsp;&nbsp;- Indonesian (id)</br>&nbsp;&nbsp;&nbsp;&nbsp;- Italian (it)</br>&nbsp;&nbsp;&nbsp;&nbsp;- Japanese (ja)</br>&nbsp;&nbsp;&nbsp;&nbsp;- Korean (ko)</br>&nbsp;&nbsp;&nbsp;&nbsp;- Latvian (lv)</br>&nbsp;&nbsp;&nbsp;&nbsp;- Lithuanian (lt)</br>&nbsp;&nbsp;&nbsp;&nbsp;- Malay (ms)</br>&nbsp;&nbsp;&nbsp;&nbsp;- Polish (pl)</br>&nbsp;&nbsp;&nbsp;&nbsp;- Portuguese (pt)</br>&nbsp;&nbsp;&nbsp;&nbsp;- Romanian (ro)</br>&nbsp;&nbsp;&nbsp;&nbsp;- Russian (ru)</br>&nbsp;&nbsp;&nbsp;&nbsp;- Serbian (sr)</br>&nbsp;&nbsp;&nbsp;&nbsp;- Slovak (sk)</br>&nbsp;&nbsp;&nbsp;&nbsp;- Slovenian (sl)</br>&nbsp;&nbsp;&nbsp;&nbsp;- Spanish (es)</br>&nbsp;&nbsp;&nbsp;&nbsp;- Swedish (sv)</br>&nbsp;&nbsp;&nbsp;&nbsp;- Thai (th)</br>&nbsp;&nbsp;&nbsp;&nbsp;- Turkish (tr)</br>&nbsp;&nbsp;&nbsp;&nbsp;- Ukrainian (uk)</br>&nbsp;&nbsp;&nbsp;&nbsp;- Vietnamese (vi)</br>&nbsp;&nbsp;&nbsp;&nbsp;- Simplified Chinese (zh-Hans)</br>&nbsp;&nbsp;&nbsp;&nbsp;- Traditional Chinese (zh-Hant)</br>&nbsp;&nbsp;&nbsp;&nbsp;- Norwegian (nb)</br>
9191
"""
92-
url = f"/tracking/2025-04/trackings/{tracking_id}"
92+
url = f"/tracking/2025-07/trackings/{tracking_id}"
9393
params_keys = {
9494
"fields",
9595
"lang",
@@ -130,7 +130,7 @@ def get_trackings(self, **kwargs) -> GetTrackingsResponse:
130130
**shipment_tags**: str. Tags you added to your shipments to help categorize and filter them easily. Use a comma to separate multiple values (Example: a,b)
131131
**order_id**: str. A globally-unique identifier for the order. Use comma for multiple values.(Example: 6845a095a27a4caeb27487806f058add,4845a095a27a4caeb27487806f058abc)
132132
"""
133-
url = "/tracking/2025-04/trackings"
133+
url = "/tracking/2025-07/trackings"
134134
params_keys = {
135135
"cursor",
136136
"limit",
@@ -180,7 +180,7 @@ def mark_tracking_completed_by_id(
180180
a path to an SSL certificate file, an `ssl.SSLContext`, or `False`
181181
(which will disable verification).
182182
"""
183-
url = f"/tracking/2025-04/trackings/{tracking_id}/mark-as-completed"
183+
url = f"/tracking/2025-07/trackings/{tracking_id}/mark-as-completed"
184184

185185
body = mark_tracking_completed_by_id_request
186186
if not isinstance(body, dict):
@@ -205,7 +205,7 @@ def retrack_tracking_by_id(
205205
a path to an SSL certificate file, an `ssl.SSLContext`, or `False`
206206
(which will disable verification).
207207
"""
208-
url = f"/tracking/2025-04/trackings/{tracking_id}/retrack"
208+
url = f"/tracking/2025-07/trackings/{tracking_id}/retrack"
209209

210210
result = self._request("POST", url=url, **kwargs)
211211
return RetrackTrackingByIdResponse().from_dict(result)
@@ -229,7 +229,7 @@ def update_tracking_by_id(
229229
a path to an SSL certificate file, an `ssl.SSLContext`, or `False`
230230
(which will disable verification).
231231
"""
232-
url = f"/tracking/2025-04/trackings/{tracking_id}"
232+
url = f"/tracking/2025-07/trackings/{tracking_id}"
233233

234234
body = update_tracking_by_id_request
235235
if not isinstance(body, dict):

tracking/request.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@
1717
from tracking.response import parse_response
1818
from tracking.exceptions import ApiException, TimedOutError, BadRequestError, ErrorCodeEnum
1919

20-
_default_user_agent = "aftership-sdk-python/6.0.0 (https://www.aftership.com) httpx/0.19.0"
20+
_default_user_agent = "aftership-sdk-python/7.0.0 (https://www.aftership.com) httpx/0.19.0"
2121

2222

2323
def validate_params(func):

0 commit comments

Comments
 (0)