question

mark.davies avatar image
0 Likes"
mark.davies asked

Unable to update the shipping details using ReviseItem

Having trouble updating the ShippingDetails using the ReviseItem api call. As mentioned in the docs, I am first calling GetItem and using the same details but I keep getting ApiException "Postage service Standard International Flat Rate Postage(51507) is not available." How do I preserve all existing shipping details apart from the ExcludeShipToLocation property I'm trying to update? ReviseItemCall apiCall = new ReviseItemCall(Context); GetItemCall getItemApiCall = new GetItemCall(Context); foreach (ItemType item in items) { getItemApiCall.DetailLevelList.Add(DetailLevelCodeType.ReturnAll); ItemType fetchedItem = getItemApiCall.GetItem(item.ItemID); ShippingDetailsType shippingDetails = fetchedItem.ShippingDetails; shippingDetails.ExcludeShipToLocation = excludeShipToLocations; item.ShippingDetails = shippingDetails; try { apiCall.ReviseItem(item, deletedFields, false); System.Diagnostics.Debug.WriteLine("Success"); } catch (Exception ex) { System.Diagnostics.Debug.WriteLine(ex.Message); } }
shippingdetails
10 |600

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

0 Answers

·

Write an Answer

Hint: Notify or tag a user in this post by typing @username.

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.