All notable changes to this project will be documented in this file.
- Workflow transitions support in
patch_item— update fields and trigger workflow actions in a single call - Async context manager support (
async with ShipthisAPI(...) as client:) - Persistent HTTP client with connection pooling for better performance
disconnect()is now async and properly closes the HTTP clientupload_filekeeps its own client (separate upload host)
- Query parameters in
get_exchange_rate,search_location, andget_place_detailsnow use proper URL encoding instead of string interpolation
- Async-first: All API methods are now async and require
await - Replaced
requestslibrary withhttpxfor async HTTP support - Removed
webhook_syncandwebhook_updatemethods (usepatch_iteminstead)
- Full async/await support using
httpx custom_headersparameter for server-to-server authenticationcreate_reference_linked_fieldmethod- Per-request header override support
x_api_keyis now optional (can usecustom_headersfor auth)patch_itemis now the recommended method for updating document fields- Updated all method signatures to be async
Before (v2.x):
from ShipthisAPI import ShipthisAPI
client = ShipthisAPI(organisation="org_id", x_api_key="key")
client.connect()
items = client.get_list("shipment")
client.patch_item("fcl_load", doc_id, {"status": "done"})After (v3.x):
import asyncio
from ShipthisAPI import ShipthisAPI
async def main():
client = ShipthisAPI(organisation="org_id", x_api_key="key")
await client.connect()
items = await client.get_list("shipment")
await client.patch_item("fcl_load", doc_id, {"status": "done"})
asyncio.run(main())custom_headersparameter for overriding default headerscreate_reference_linked_fieldmethod- Per-request header override in
_make_request
x_api_keyis now optional- Enhanced
patch_itemdocumentation
primary_workflow_actionmethod for workflow transitionssecondary_workflow_actionmethod for sub-status changesbulk_editmethod for batch updates
- Complete rewrite with better error handling
ShipthisAPIError,ShipthisAuthError,ShipthisRequestErrorexceptions- Comprehensive CRUD operations
- Workflow operations
- Report views
- Third-party integrations (currency, places)
- Conversation methods
- File upload support
- Initial release
- Basic API client functionality