shipstation_sdk¶
ShipStation API SDK.
Submodules¶
Classes¶
A class wrapping ShipStation API v2 interaction. |
Package Contents¶
- class shipstation_sdk.ShipStationClient(api_key: str, base_url: str = 'https://api.shipstation.com', timeout: float = 60.0)[source]¶
A class wrapping ShipStation API v2 interaction.
- make_request(method: str, path: str, params: dict[str, Any] | None = None, json: dict[str, Any] | None = None) niquests.Response[source]¶
Make a request to ShipStation, retrying when rate-limited.
Retries up to
RETRY_ATTEMPTStotal attempts on HTTP 429, sleeping the response’sRetry-After(DEFAULT_RETRY_AFTER_SECONDSwhen absent).
- list_shipments(parameters: shipstation_sdk.parameters.ShipmentListParameters | None = None) shipstation_sdk.models.ShipmentsList[source]¶
Get a page of shipments.
- iter_shipments(parameters: shipstation_sdk.parameters.ShipmentListParameters | None = None) collections.abc.Iterator[shipstation_sdk.models.Shipment][source]¶
Iterate over every shipment matching the parameters, following pagination.
- get_shipment(shipment_id: str) shipstation_sdk.models.Shipment[source]¶
Get a specific shipment.
- get_shipment_by_external_id(external_shipment_id: str) shipstation_sdk.models.Shipment[source]¶
Get a specific shipment by the external shipment ID it was created with.
External shipment IDs are caller-defined and may contain URL metacharacters (e.g. marketplace IDs like
gid://...), so the path segment is escaped.
- list_carriers() shipstation_sdk.models.CarriersList[source]¶
Get the connected carrier accounts.
- list_tags() shipstation_sdk.models.TagsList[source]¶
Get the tags defined on the account.