Closed owsiakl closed 6 months ago
Hi, can you please provide the request screenshot as well ?
Thanks and Regards, Supriya Puppala Solutions Architect, Selling Partner API.
Hey, sure - this is a full request that I've made just now:
{
"ShipmentRequestDetails": {
"AmazonOrderId": "hidden",
"SellerOrderId": "c48a284f-aabe-4347-a5b7-98d9c20e1d49",
"ItemList": [
{
"OrderItemId": "hidden",
"Quantity": 1
}
],
"ShipFromAddress": {
"Name": "Warehouse",
"AddressLine1": "hidden",
"DistrictOrCounty": "hidden",
"Email": "hidden",
"City": "hidden",
"StateOrProvinceCode": "hidden",
"PostalCode": "hidden",
"CountryCode": "hidden",
"Phone": "hidden"
},
"PackageDimensions": {
"Length": 14,
"Width": 19,
"Height": 34.75,
"Unit": "inches"
},
"Weight": {
"Value": 1068.64,
"Unit": "oz"
},
"ShipDate": "2022-03-16T15:00:00+00:00",
"ShippingServiceOptions": {
"DeliveryExperience": "DeliveryConfirmationWithoutSignature",
"DeclaredValue": {
"CurrencyCode": "USD",
"Amount": 0
},
"CarrierWillPickUp": false,
"LabelFormat": "PDF"
}
}
}
It was sent to the https://sellingpartnerapi-na.amazon.com/mfn/v0/eligibleShippingServices
.
And this was full response if needed(I removed RejectedShippingServiceList
content, it was too big):
{
"payload": {
"ShippingServiceList": [
{
"ShippingServiceName": "FedEx 2Day®A.M.",
"CarrierName": "FEDEX",
"ShippingServiceId": "FEDEX_PTP_SECOND_DAY_AM",
"ShippingServiceOfferId": "hidden",
"ShipDate": "2022-03-16T15:00:00Z",
"EarliestEstimatedDeliveryDate": "2022-03-18T12:00:00Z",
"LatestEstimatedDeliveryDate": "2022-03-18T12:00:00Z",
"Rate": {
"CurrencyCode": "USD",
"Amount": 122.08
},
"ShippingServiceOptions": {
"DeliveryExperience": "DeliveryConfirmationWithoutSignature",
"CarrierWillPickUp": false,
"LabelFormat": ""
},
"AvailableLabelFormats": [
"ZPL203",
"ShippingServiceDefault",
"PDF",
"PNG"
],
"AvailableFormatOptionsForLabel": [
{
"LabelFormat": "ZPL203"
},
{
"LabelFormat": "ShippingServiceDefault"
},
{
"LabelFormat": "PDF"
},
{
"LabelFormat": "PNG"
}
]
},
{
"ShippingServiceName": "UPS Next Day Air Saver",
"CarrierName": "UPS",
"ShippingServiceId": "UPS_PTP_NEXT_DAY_AIR_SAVER",
"ShippingServiceOfferId": "hidden",
"ShipDate": "2022-03-16T15:00:00Z",
"EarliestEstimatedDeliveryDate": "2022-03-18T06:00:00Z",
"LatestEstimatedDeliveryDate": "2022-03-18T06:00:00Z",
"Rate": {
"CurrencyCode": "USD",
"Amount": 90.6
},
"ShippingServiceOptions": {
"DeliveryExperience": "DeliveryConfirmationWithoutSignature",
"CarrierWillPickUp": false,
"LabelFormat": ""
},
"AvailableLabelFormats": [
"ZPL203",
"ShippingServiceDefault",
"PDF",
"PNG"
],
"AvailableFormatOptionsForLabel": [
{
"LabelFormat": "ZPL203"
},
{
"LabelFormat": "ShippingServiceDefault"
},
{
"LabelFormat": "PDF"
},
{
"LabelFormat": "PNG"
}
]
},
{
"ShippingServiceName": "UPS Next Day Air",
"CarrierName": "UPS",
"ShippingServiceId": "UPS_PTP_NEXT_DAY_AIR",
"ShippingServiceOfferId": "hidden",
"ShipDate": "2022-03-16T15:00:00Z",
"EarliestEstimatedDeliveryDate": "2022-03-17T19:00:00Z",
"LatestEstimatedDeliveryDate": "2022-03-17T19:00:00Z",
"Rate": {
"CurrencyCode": "USD",
"Amount": 99.2
},
"ShippingServiceOptions": {
"DeliveryExperience": "DeliveryConfirmationWithoutSignature",
"CarrierWillPickUp": false,
"LabelFormat": ""
},
"AvailableLabelFormats": [
"ZPL203",
"ShippingServiceDefault",
"PDF",
"PNG"
],
"AvailableFormatOptionsForLabel": [
{
"LabelFormat": "ZPL203"
},
{
"LabelFormat": "ShippingServiceDefault"
},
{
"LabelFormat": "PDF"
},
{
"LabelFormat": "PNG"
}
]
},
{
"ShippingServiceName": "FedEx Priority Overnight®",
"CarrierName": "FEDEX",
"ShippingServiceId": "FEDEX_PTP_PRIORITY_OVERNIGHT",
"ShippingServiceOfferId": "hidden",
"ShipDate": "2022-03-16T15:00:00Z",
"EarliestEstimatedDeliveryDate": "2022-03-18T06:59:59Z",
"LatestEstimatedDeliveryDate": "2022-03-18T06:59:59Z",
"Rate": {
"CurrencyCode": "USD",
"Amount": 209.59
},
"ShippingServiceOptions": {
"DeliveryExperience": "DeliveryConfirmationWithoutSignature",
"CarrierWillPickUp": false,
"LabelFormat": ""
},
"AvailableLabelFormats": [
"ZPL203",
"ShippingServiceDefault",
"PDF",
"PNG"
],
"AvailableFormatOptionsForLabel": [
{
"LabelFormat": "ZPL203"
},
{
"LabelFormat": "ShippingServiceDefault"
},
{
"LabelFormat": "PDF"
},
{
"LabelFormat": "PNG"
}
]
},
{
"ShippingServiceName": "FedEx Standard Overnight®",
"CarrierName": "FEDEX",
"ShippingServiceId": "FEDEX_PTP_STANDARD_OVERNIGHT",
"ShippingServiceOfferId": "hidden",
"ShipDate": "2022-03-16T15:00:00Z",
"EarliestEstimatedDeliveryDate": "2022-03-17T20:00:00Z",
"LatestEstimatedDeliveryDate": "2022-03-17T20:00:00Z",
"Rate": {
"CurrencyCode": "USD",
"Amount": 185.67
},
"ShippingServiceOptions": {
"DeliveryExperience": "DeliveryConfirmationWithoutSignature",
"CarrierWillPickUp": false,
"LabelFormat": ""
},
"AvailableLabelFormats": [
"ZPL203",
"ShippingServiceDefault",
"PDF",
"PNG"
],
"AvailableFormatOptionsForLabel": [
{
"LabelFormat": "ZPL203"
},
{
"LabelFormat": "ShippingServiceDefault"
},
{
"LabelFormat": "PDF"
},
{
"LabelFormat": "PNG"
}
]
},
{
"ShippingServiceName": "UPS 2nd Day Air",
"CarrierName": "UPS",
"ShippingServiceId": "UPS_PTP_2ND_DAY_AIR",
"ShippingServiceOfferId": "hidden",
"ShipDate": "2022-03-16T15:00:00Z",
"EarliestEstimatedDeliveryDate": "2022-03-19T06:59:59Z",
"LatestEstimatedDeliveryDate": "2022-03-19T06:59:59Z",
"Rate": {
"CurrencyCode": "USD",
"Amount": 73.46
},
"ShippingServiceOptions": {
"DeliveryExperience": "DeliveryConfirmationWithoutSignature",
"CarrierWillPickUp": false,
"LabelFormat": ""
},
"AvailableLabelFormats": [
"ZPL203",
"ShippingServiceDefault",
"PDF",
"PNG"
],
"AvailableFormatOptionsForLabel": [
{
"LabelFormat": "ZPL203"
},
{
"LabelFormat": "ShippingServiceDefault"
},
{
"LabelFormat": "PDF"
},
{
"LabelFormat": "PNG"
}
]
},
{
"ShippingServiceName": "FedEx Home Delivery®",
"CarrierName": "FEDEX",
"ShippingServiceId": "FEDEX_PTP_HOME_DELIVERY",
"ShippingServiceOfferId": "hidden",
"ShipDate": "2022-03-16T15:00:00Z",
"EarliestEstimatedDeliveryDate": "2022-03-18T06:59:59Z",
"LatestEstimatedDeliveryDate": "2022-03-18T06:59:59Z",
"Rate": {
"CurrencyCode": "USD",
"Amount": 48.54
},
"ShippingServiceOptions": {
"DeliveryExperience": "DeliveryConfirmationWithoutSignature",
"CarrierWillPickUp": false,
"LabelFormat": ""
},
"AvailableLabelFormats": [
"ZPL203",
"ShippingServiceDefault",
"PDF",
"PNG"
],
"AvailableFormatOptionsForLabel": [
{
"LabelFormat": "ZPL203"
},
{
"LabelFormat": "ShippingServiceDefault"
},
{
"LabelFormat": "PDF"
},
{
"LabelFormat": "PNG"
}
]
},
{
"ShippingServiceName": "UPS Ground",
"CarrierName": "UPS",
"ShippingServiceId": "UPS_PTP_GND",
"ShippingServiceOfferId": "hidden",
"ShipDate": "2022-03-16T15:00:00Z",
"EarliestEstimatedDeliveryDate": "2022-03-18T06:59:59Z",
"LatestEstimatedDeliveryDate": "2022-03-18T06:59:59Z",
"Rate": {
"CurrencyCode": "USD",
"Amount": 42.9
},
"ShippingServiceOptions": {
"DeliveryExperience": "DeliveryConfirmationWithoutSignature",
"CarrierWillPickUp": false,
"LabelFormat": ""
},
"AvailableLabelFormats": [
"ZPL203",
"ShippingServiceDefault",
"PDF",
"PNG"
],
"AvailableFormatOptionsForLabel": [
{
"LabelFormat": "ZPL203"
},
{
"LabelFormat": "ShippingServiceDefault"
},
{
"LabelFormat": "PDF"
},
{
"LabelFormat": "PNG"
}
]
},
{
"ShippingServiceName": "FedEx 2Day®",
"CarrierName": "FEDEX",
"ShippingServiceId": "FEDEX_PTP_SECOND_DAY",
"ShippingServiceOfferId": "hidden",
"ShipDate": "2022-03-16T15:00:00Z",
"EarliestEstimatedDeliveryDate": "2022-03-19T06:59:59Z",
"LatestEstimatedDeliveryDate": "2022-03-19T06:59:59Z",
"Rate": {
"CurrencyCode": "USD",
"Amount": 91.21
},
"ShippingServiceOptions": {
"DeliveryExperience": "DeliveryConfirmationWithoutSignature",
"CarrierWillPickUp": false,
"LabelFormat": ""
},
"AvailableLabelFormats": [
"ZPL203",
"ShippingServiceDefault",
"PDF",
"PNG"
],
"AvailableFormatOptionsForLabel": [
{
"LabelFormat": "ZPL203"
},
{
"LabelFormat": "ShippingServiceDefault"
},
{
"LabelFormat": "PDF"
},
{
"LabelFormat": "PNG"
}
]
}
],
"RejectedShippingServiceList": [],
"TermsAndConditionsNotAcceptedCarrierList": [
{
"CarrierName": "YANWEN"
},
{
"CarrierName": "AMAZON_HORIZON"
},
{
"CarrierName": "DHLECCN"
},
{
"CarrierName": "USPS"
},
{
"CarrierName": "AMZN_US"
},
{
"CarrierName": "DHLMX"
},
{
"CarrierName": "YUN"
},
{
"CarrierName": "CHINA_POST"
},
{
"CarrierName": "IPARCEL"
},
{
"CarrierName": "HNC"
},
{
"CarrierName": "ONTRAC"
}
]
}
}
Hi,
Thanks for the response. I am currently checking on this and will get back to you as soon as possible.
Thanks and Regards, Supriya Puppala Solutions Architect, Selling Partner API.
Hi Lukasz Owsiak, So here the response you got for the request is as expected. The "LabelFormat" in the response is always blank. We never set the LabelFormat in the response.
Thanks and Regards, Supriya Puppala Solutions Architect, Selling Partner API.
@puppsupr If you never populate the LabelFormat how are we supposed to know which format the label is being provided as?
Hi,
This is just for a GetEligibleShippingServicesCall. Each returned option has their list of available label formats. When the seller makes a create shipment call and expects a label back this is more important, but here we are returning eligible shipping services for them not the labels themselves.
Thanks and Regards, Supriya Puppala Solutions Architect, Selling Partner API.
Okay, thanks for the explanation. @puppsupr can you return null value instead of an empty string here? Because now response for this endpoint is not consistent with the model documentation - https://github.com/amzn/selling-partner-api-models/blob/main/models/merchant-fulfillment-api-model/merchantFulfillmentV0.json#L3082 - empty string is not a valid enum value.
@puppsupr any update on this? I agree with @owsiakl that below model definition:
doesn't allow to assign empty string for that enum. If you need to pass empty value instead of null
then can you change the model to allow empty string values for that enum?
I probably don't understand something. Could you explain why empty string is expected behaviour and not just use null
values? I'm curious, because I'm probably missing something here and would like to understand it.
Hi @tomaszhanc @owsiakl, we are currently working on this and will let you know once I have an update.
@puppsupr would you mind giving us an update about it?
Hi, we are working on to modify the documentation for LabelFormat response. We will provide you an update once its done.
@puppsupr hey, it's been another month and we are getting closer to the deadline of switching to SP API. Do you have any updates on this?
This is a very old issue that is probably not getting as much attention as it deserves. We encourage you to check if this is still an issue after the latest release and if you find that this is still a problem, please feel free to open a new issue and make a reference to this one.
closed for inactivity
Hey guys, we have a problem with
getEligibleShipmentServices
endpoint - we define label format in the request, but in the response this fieldLabelFormat
returns empty string value:According to the documentation, this field should be either null: https://github.com/amzn/selling-partner-api-docs/blob/main/references/merchant-fulfillment-api/merchantFulfillmentV0.md#shippingservicelist
or should have one of values:
PDF, PNG, ZPL203, ZPL300, ShippingServiceDefault
: https://github.com/amzn/selling-partner-api-docs/blob/main/references/merchant-fulfillment-api/merchantFulfillmentV0.md#labelformatbut returns an empty string and because of that we can't serialize the response in our generated SDK. This was tested on production, but the same is for sandbox env: https://github.com/amzn/selling-partner-api-models/blob/main/models/merchant-fulfillment-api-model/merchantFulfillmentV0.json#L471
Is this an expected behaviour? Shouldn't this return value that we send in the request? Thanks!