MerchantFulfillment

class sp_api.api.MerchantFulfillment(marketplace: 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)
Link:

https://github.com/amzn/selling-partner-api-docs/blob/main/references/merchant-fulfillment-api/merchantFulfillmentV0.md

get_eligible_shipment_services_old(self, shipment_request_details: dict, **kwargs) ApiResponse

Returns a list of shipping service offers that satisfy the specified shipment request details.

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:

MerchantFulfillment().get_eligible_shipment_services_old({
        "AmazonOrderId": "903-5563053-5647845",
        "ItemList": [
            {
                "OrderItemId": "52986411826454",
                "Quantity": 1
            }
        ],
        "ShipFromAddress": {
            "Name": "John Doe",
            "AddressLine1": "300 Turnbull Ave",
            "Email": "jdoeasdfllkj@yahoo.com",
            "City": "Detroit",
            "StateOrProvinceCode": "MI",
            "PostalCode": "48123",
            "CountryCode": "US",
            "Phone": "7132341234"
        },
        "PackageDimensions": {
            "Length": 10,
            "Width": 10,
            "Height": 10,
            "Unit": "inches"
        },
        "Weight": {
            "Value": 10,
            "Unit": "oz"
        },
        "ShippingServiceOptions": {
            "DeliveryExperience": "NoTracking",
            "CarrierWillPickUp": False,
            "CarrierWillPickUpOption": "ShipperWillDropOff"
        }
    })
Parameters:

shipment_request_details – dict:

Return type:

GetEligibleShipmentServicesResponse

get_eligible_shipment_services(self, shipment_request_details: dict, **kwargs) ApiResponse

Returns a list of shipping service offers that satisfy the specified shipment request details.

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:

MerchantFulfillment().get_eligible_shipment_services({
        "AmazonOrderId": "903-5563053-5647845",
        "ItemList": [
            {
                "OrderItemId": "52986411826454",
                "Quantity": 1
            }
        ],
        "ShipFromAddress": {
            "Name": "John Doe",
            "AddressLine1": "300 Turnbull Ave",
            "Email": "jdoeasdfllkj@yahoo.com",
            "City": "Detroit",
            "StateOrProvinceCode": "MI",
            "PostalCode": "48123",
            "CountryCode": "US",
            "Phone": "7132341234"
        },
        "PackageDimensions": {
            "Length": 10,
            "Width": 10,
            "Height": 10,
            "Unit": "inches"
        },
        "Weight": {
            "Value": 10,
            "Unit": "oz"
        },
        "ShippingServiceOptions": {
            "DeliveryExperience": "NoTracking",
            "CarrierWillPickUp": False,
            "CarrierWillPickUpOption": "ShipperWillDropOff"
        }
    })
Parameters:

shipment_request_details – dict:

Return type:

GetEligibleShipmentServicesResponse

get_shipment(self, shipmentId: str) ApiResponse

Returns a specified item and its attributes.

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:

MerchantFulfillment().get_shipment("abcddcba-00c3-4f6f-a63a-639f76ee9253")
Parameters:

shipment_id – str:

Return type:

GetShipmentResponse

cancel_shipment(self, shipment_id: str, **kwargs) ApiResponse

Cancel the shipment indicated by the specified shipment identifier.

Usage Plan:

Rate (requests per second)

Burst

1

1

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

Parameters:

shipment_id – str:

Return type:

CancelShipmentResponse

cancel_shipment_old(self, shipment_id: str, **kwargs) ApiResponse

Cancel the shipment indicated by the specified shipment identifer.

Usage Plan:

Rate (requests per second)

Burst

1

1

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

Parameters:

shipment_id – str:

Return type:

CancelShipmentResponse

create_shipment(self, shipment_request_details: dict, shipping_service_id: str, **kwargs) ApiResponse

Create a shipment with the information provided.

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:

MerchantFulfillment().create_shipment(
        shipment_request_details={
            "AmazonOrderId": "903-5563053-5647845",
            "ItemList": [
                {
                    "OrderItemId": "52986411826454",
                    "Quantity": 1
                }
            ],
            "ShipFromAddress": {
                "Name": "John Doe",
                "AddressLine1": "300 Turnbull Ave",
                "Email": "jdoeasdfllkj@yahoo.com",
                "City": "Detroit",
                "StateOrProvinceCode": "MI",
                "PostalCode": "48123",
                "CountryCode": "US",
                "Phone": "7132341234"
            },
            "PackageDimensions": {
                "Length": 10,
                "Width": 10,
                "Height": 10,
                "Unit": "inches"
            },
            "Weight": {
                "Value": 10,
                "Unit": "oz"
            },
            "ShippingServiceOptions": {
                "DeliveryExperience": "NoTracking",
                "CarrierWillPickUp": False,
                "CarrierWillPickUpOption": "ShipperWillDropOff"
            }
        },
        shipping_service_id="UPS_PTP_2ND_DAY_AIR",
        ShippingServiceOfferId="WHgxtyn6qjGGaCzOCog1azF5HLHje5Pz3Lc2Fmt5eKoZAReW8oJ1SMumuBS8lA/Hjuglhyiu0"
                               "+KRLvyJxFV0PB9YFMDhygs3VyTL0WGYkGxiuRkmuEvpqldUn9rrkWVodqnR4vx2VtXvtER"
                               "/Ju6RqYoddJZGy6RS2KLzzhQ2NclN0NYXMZVqpOe5RsRBddXaGuJr7oza3M52"
                               "+JzChocAHzcurIhCRynpbxfmNLzZMQEbgnpGLzuaoSMzfxg90/NaXFR/Ou01du/uKd5AbfMW"
                               "/AxAKP9ht6Oi9lDHq6WkGqvjkVLW0/jj/fBgblIwcs+t"
    )
Parameters:
  • shipment_request_details – dict

  • shipping_service_id – str:

Return type:

CreateShipmentResponse

get_additional_seller_inputs_old(shipping_service_id: str, ship_from_address: dict, order_id: str, **kwargs) ApiResponse

get_additional_seller_inputs_old(self, shipping_service_id: str, ship_from_address: dict, order_id: str, **kwargs) -> ApiResponse Get a list of additional seller inputs required for a ship method. This is generally used for international shipping.

Usage Plan:

Rate (requests per second)

Burst

1

1

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

Parameters:
  • shipping_service_id – str

  • ship_from_address – dict

  • order_id – str:

Return type:

GetAdditionalSellerInputsResponse

get_additional_seller_inputs(shipping_service_id: str, ship_from_address: dict, order_id: str, **kwargs) ApiResponse

get_additional_seller_inputs(self, shipping_service_id: str, ship_from_address: dict, order_id: str, **kwargs) -> ApiResponse Gets a list of additional seller inputs required for a ship method. This is generally used for international shipping.

Usage Plan:

Rate (requests per second)

Burst

1

1

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

Parameters:
  • shipping_service_id – str

  • ship_from_address – dict

  • order_id – str:

Return type:

GetAdditionalSellerInputsResponse