Shipping V1

class sp_api.api.ShippingV1(marketplace: ~sp_api.base.marketplaces.Marketplaces = Marketplaces.US, *, refresh_token=None, account='default', credentials=None, restricted_data_token=None, proxies=None, verify=True, timeout=None, version=None, credential_providers=None, auth_token_client_class=<class 'sp_api.auth.access_token_client.AccessTokenClient'>)

Shipping SP-API Client :link:

Provides programmatic access to Amazon Shipping APIs.

create_shipment(self, **kwargs) ApiResponse

Create a new shipment.

Usage Plan:

Rate (requests per second)

Burst

5

15

For more information, see “Usage Plans and Rate Limits” in the Selling Partner API documentation.

Examples

literal blocks:

ShippingV1().create_shipment()
Parameters:

body – CreateShipmentRequest | required CreateShipmentRequest Body

Returns:

ApiResponse

get_shipment(self, shipmentId, **kwargs) ApiResponse

Return the entire shipment object for the shipmentId.

Usage Plan:

Rate (requests per second)

Burst

5

15

For more information, see “Usage Plans and Rate Limits” in the Selling Partner API documentation.

Examples

literal blocks:

ShippingV1().get_shipment("value")
Parameters:

shipmentId – object | required Shipment id to return the entire shipment object

Returns:

ApiResponse

cancel_shipment(self, shipmentId, **kwargs) ApiResponse

Cancel a shipment by the given shipmentId.

Usage Plan:

Rate (requests per second)

Burst

5

15

For more information, see “Usage Plans and Rate Limits” in the Selling Partner API documentation.

Examples

literal blocks:

ShippingV1().cancel_shipment("value")
Parameters:

shipmentId – object | required Shipment Id to cancel a shipment

Returns:

ApiResponse

purchase_labels(self, shipmentId, **kwargs) ApiResponse

Purchase shipping labels based on a given rate.

Usage Plan:

Rate (requests per second)

Burst

5

15

For more information, see “Usage Plans and Rate Limits” in the Selling Partner API documentation.

Examples

literal blocks:

ShippingV1().purchase_labels("value")
Parameters:
  • shipmentId – object | required Shipment id for purchase shipping label

  • body – PurchaseLabelsRequest | required PurchaseShippingLabelRequest body

Returns:

ApiResponse

retrieve_shipping_label(self, shipmentId, **kwargs) ApiResponse

Retrieve shipping label based on the shipment id and tracking id.

Examples

literal blocks:

ShippingV1().retrieve_shipping_label("value")
Parameters:
  • shipmentId

    required

  • **kwargs

Returns:

ApiResponse

retrieve_shipping_label_for_container(self, shipmentId, trackingId, **kwargs) ApiResponse

Retrieve shipping label based on the shipment id and tracking id.

Usage Plan:

Rate (requests per second)

Burst

5

15

For more information, see “Usage Plans and Rate Limits” in the Selling Partner API documentation.

Examples

literal blocks:

ShippingV1().retrieve_shipping_label_for_container("value", "value")
Parameters:
  • shipmentId – object | required Shipment Id to retreive label

  • trackingId – object | required Tracking Id

  • body – RetrieveShippingLabelRequest | required RetrieveShippingLabelRequest body

Returns:

ApiResponse

purchase_shipment(self, **kwargs) ApiResponse

Purchase shipping labels.

Usage Plan:

Rate (requests per second)

Burst

5

15

For more information, see “Usage Plans and Rate Limits” in the Selling Partner API documentation.

Examples

literal blocks:

ShippingV1().purchase_shipment()
Parameters:

body – PurchaseShipmentRequest | required PurchaseShipmentRequest body

Returns:

ApiResponse

get_rates(self, **kwargs) ApiResponse

Get service rates.

Usage Plan:

Rate (requests per second)

Burst

5

15

For more information, see “Usage Plans and Rate Limits” in the Selling Partner API documentation.

Examples

literal blocks:

ShippingV1().get_rates()
Parameters:

body – GetRatesRequest | required GetRatesRequest body

Returns:

ApiResponse

get_account(self, **kwargs) ApiResponse

Verify if the current account is valid.

Usage Plan:

Rate (requests per second)

Burst

5

15

For more information, see “Usage Plans and Rate Limits” in the Selling Partner API documentation.

Examples

literal blocks:

ShippingV1().get_account()
Parameters:

**kwargs

Returns:

ApiResponse

get_tracking_information(self, trackingId, **kwargs) ApiResponse

Return the tracking information of a shipment.

Usage Plan:

Rate (requests per second)

Burst

1

1

For more information, see “Usage Plans and Rate Limits” in the Selling Partner API documentation.

Examples

literal blocks:

ShippingV1().get_tracking_information("value")
Parameters:

trackingId – object | required Tracking Id

Returns:

ApiResponse