Traceback (most recent call last):
File "<pyshell#625>", line 1, in
res = FulfillmentInbound(credentials=credentials).update_transport_information("FBA1xxxxxx",shipmentType = {"shipmentType":"LTL"})
File "C:\Users\Ferdinand\AppData\Local\Programs\Python\Python39\lib\site-packages\sp_api\base\helpers.py", line 19, in wrapper
return function(*args, **kwargs)
File "C:\Users\Ferdinand\AppData\Local\Programs\Python\Python39\lib\site-packages\sp_api\api\fulfillment_inbound\fulfillment_inbound.py", line 267, in update_transport_information
return self._request(
File "C:\Users\Ferdinand\AppData\Local\Programs\Python\Python39\lib\site-packages\sp_api\base\client.py", line 129, in _request
return self._check_response(res)
File "C:\Users\Ferdinand\AppData\Local\Programs\Python\Python39\lib\site-packages\sp_api\base\client.py", line 144, in _check_response
raise exception(error, headers=res.headers)
sp_api.base.exceptions.SellingApiBadRequestException: [{'code': 'InvalidInput', 'message': "1 validation error detected: Value '' at 'shipmentType' failed to satisfy constraint: Member must satisfy enum value set: [LTL, SP]", 'details': ''}]
Amazon SP-API Python update transport information keep returning Member must satisfy enum value set: [LTL, SP]
Share
The error message “Member must satisfy enum value set: [LTL, SP]” when using the Amazon SP-API in Python is indicating that the value provided for the “transport_type” parameter is not valid. The
transport_type
parameter is used to specify the type of transport being used for the shipment.The Amazon SP-API only supports two transport types: “LTL” (less-than-truckload) and “SP” (small parcel). So, if you’re seeing this error, it’s likely because the value you’re passing for the “transport_type” parameter is not one of these two options.
Here are a few things you can try to fix this error:
In summary, this error occurs when the value passed for the transport_type parameter is not a valid option, you should make sure you are passing “LTL” or “SP” as the value for transport_type, or that the variable you are passing is set to one of these two options.
The error message “1 validation error detected: Value ” at ‘shipmentType’ failed to satisfy constraint: Member must satisfy enum value set: [LTL, SP]” is indicating that the value provided for the “shipmentType” parameter is not valid. The
shipmentType
parameter is used to specify the type of shipment being used for the update_transport_information call.The Amazon SP-API only supports two shipment types: “LTL” (less-than-truckload) and “SP” (small parcel). The error message is indicating that the value you’re passing for the “shipmentType” parameter is empty, which is not one of the two options.
Here are a few things you can try to fix this error: