Tuesday, 17 January 2023

Amazon SP-API Python update transport information keep returning Member must satisfy enum value set: [LTL, SP]

I'm trying to update a shipment to LTL and keep getting the same error:

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': ''}]

I'm trying a lot of different variations of the command but they all return to that, this is what I've tried:

res = FulfillmentInbound(credentials=credentials).update_transport_information("FBA1xxxxxx",shipmentType = {"shipmentType":"LTL"})

res = FulfillmentInbound(credentials=credentials).update_transport_information("FBA1xxxxxx",shipmentType = "LTL")

data = {
"ShipmentType": ["LTL"],
"IsPartnered": True
}

res = FulfillmentInbound(credentials=credentials).update_transport_information"FBA1xxxxxx",data=data)

What am I doing wrong?



from Amazon SP-API Python update transport information keep returning Member must satisfy enum value set: [LTL, SP]

No comments:

Post a Comment