question

nooey_007 avatar image
0 Likes"
nooey_007 asked ·

Error trying to use Global shipping program

I am trying to use **InternationalPriorityShipping** for the global shipping programme from the UK. However each time it errors out, and I can't get any further. Any help appreciated. when i test with InternationalPriorityShippingUK i get following error: *Postage service is not available.Postage service International Priority Shipping(50300) is not available.Invalid Postage Type.Postage Type is not supported by this site.* This is the code i am using : $item->ShippingDetails = new Types\ShippingDetailsType(); $item->ShippingDetails->ShippingType = Enums \ShippingTypeCodeType::C_FLAT_DOMESTIC_CALCULATED_INTERNATIONAL; //service setting for Royal Mail 1st Class & Free shipping $shippingService = new Types\ShippingServiceOptionsType(); $shippingService->ShippingServicePriority = 1; $shippingService->ShippingService = "UK_RoyalMailFirstClassStandard"; $shippingService->FreeShipping = true; $item->ShippingDetails->ShippingServiceOptions[] = $shippingService; //international setting for Global Shipping Programme, but not sure $shippingService = new Types\InternationalShippingServiceOptionsType(); $shippingService->ShippingServicePriority = 2; $shippingService->ShippingService = "InternationalPriorityShippingUK"; $item->ShippingDetails->InternationalShippingServiceOption[] = $shippingService; when i try above code i get the following error: *Postage service is not available.Postage service International Priority Shipping(50300) is not available.Invalid Postage Type.Postage Type is not supported by this*
error50300
10 |600 characters needed characters left characters exceeded

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

davidtsadler avatar image
0 Likes"
davidtsadler answered ·
@mescart-sales the [example]( https://github.com/davidtsadler/ebay-sdk-examples/blob/master/business-policies-management/01-retrieve-all-policies.php) uses the production site so double check that you are connecting to the sandbox with the changes below. $service = new Services\BusinessPoliciesManagementService(array( 'authToken' => $config['sandbox']['userToken'], 'globalId' => Constants\GlobalIds::US, 'sandbox' => true )); It also looks like you can use the name of the policy in your [AddItem]( http://developer.ebay.com/DevZone/XML/docs/Reference/eBay/AddItem.html#Request.Item.SellerProfiles.SellerShippingProfile.ShippingProfileName) request. I'm guessing that it's possible to copy and paste the name from the sandbox site. I haven't used this method in my projects so can't say for certain if it will work. $item->SellerProfiles->SellerShippingProfile->ShippingProfileName = '< NAME OF THE POLICY>';
· 1 · Share
10 |600 characters needed characters left characters exceeded

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

It does not work. Business policy has Globalshipping=1 but when item is added using SDK and this shipping policy item has no such flag (so does not work). When item is added manually in ebay (using same policy) everything is fine. I tried to mix policies with: $item->ShippingDetails = new Types\ShippingDetailsType(); $item->ShippingDetails->GlobalShipping = true; but without success. Looks like ebay just ignore ShippingDetails->GlobalShipping = true; and do not load appropriate setting from policy (GlobalShipping=1).
0 Likes 0 · ·
davidtsadler avatar image
0 Likes"
davidtsadler answered ·
Hi Paul, If you just want to use global shipping in a listing you can set the [GlobalShipping]( http://developer.ebay.com/DevZone/XML/docs/Reference/eBay/AddItem.html#Request.Item.ShippingDetails.GlobalShipping) field to true. $item->ShippingDetails = new Types\ShippingDetailsType(); $item->ShippingDetails->GlobalShipping = true; It's a little more complex if you want a listing that uses both global shipping and business policies. You first need to create a shipping business policy and activate the [GlobalShipping]( http://developer.ebay.com/DevZone/business-policies/CallRef/addSellerProfile.html#Request.shippingPolicyProfile.shippingPolicyInfo.GlobalShipping) field within it. You then need to assign the policy to the listing. $item->SellerProfiles = new Types\SellerProfilesType(); $item->SellerProfiles->SellerShippingProfile = new Types\SellerShippingProfileType(); $item->SellerProfiles->SellerShippingProfile->ShippingProfileID = I can write an example that shows how to create to create a business policy and then assign it to a listing. It will make a great example for everyone so I have no problem doing it. It will only take a few days so I'll reply to this forum once it's done.
· 1 · Share
10 |600 characters needed characters left characters exceeded

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

Hi David, That would be great thanks and thanks for the reply I have sent you a email message. Im not sure if GlobalShipping would need to be set up in the api if you are using business policies and GlobalShipping is used in the policy. I have tried to use 01-retrieve-all-policies.php to get the id's but no success just get a blank screen, I have put some echo's in and it hangs up after the response line, I have 3 polices set up in the sandbox account so don't know why thats happening. Kind regards Paul
0 Likes 0 · ·
mescart-sales avatar image
0 Likes"
mescart-sales answered ·
Hi, I would like just to use business policies for all my shipping including GlobalShipping, what do I change in 04-add-fixed-price-item.php to do this ? Kind regards Paul
· Share
10 |600 characters needed characters left characters exceeded

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

davidtsadler avatar image
0 Likes"
davidtsadler answered ·
The two fields in the screen shot are [ExtendedHolidayReturns]( http://developer.ebay.com/DevZone/XML/docs/Reference/eBay/AddItem.html#Request.Item.ReturnPolicy.ExtendedHolidayReturns) and [Description]( http://developer.ebay.com/DevZone/XML/docs/Reference/eBay/AddItem.html#Request.Item.ReturnPolicy.Description) in the API. $item->ReturnPolicy = new Types\ReturnPolicyType(); $item->ReturnPolicy->ExtendedHolidayReturns = true; $item->ReturnPolicy->Description = ' ';
· 1 · Share
10 |600 characters needed characters left characters exceeded

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

That's great Thank you very much.
0 Likes 0 · ·
nooey_007 avatar image
0 Likes"
nooey_007 answered ·
Thanks very much for your answer That worked very well Now I am trying to set a return policy using your sdk from Github I hope you can help further to show me how to set additional returns policy details. I've highlighted what I mean below : ![As shown here][1] [1]: http://esp1.co.uk/ebay_policies.jpg
· Share
10 |600 characters needed characters left characters exceeded

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

davidtsadler avatar image
0 Likes"
davidtsadler answered ·
I've a list of shipping services for all eBay sites available at http://devbay.net/developers/tools/ebay-details/ShippingServiceDetails/ These values where taken from the [GeteBayDetails]( http://developer.ebay.com/DevZone/XML/docs/Reference/eBay/GeteBayDetails.html) operation. Be aware that **ValidForSellingFlow** must be *true* if you want to list an item with a service. To activate the global shipping you need to pass true to the [GlobalShipping]( http://developer.ebay.com/DevZone/XML/docs/Reference/eBay/AddItem.html#Request.Item.ShippingDetails.GlobalShipping) field in your request. $item->ShippingDetails->GlobalShipping = true;
· 1 · Share
10 |600 characters needed characters left characters exceeded

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

Thanks very much for your answer That worked very well Now I am trying to set a return policy using your sdk from Github I hope you can help further to show me how to set additional returns policy details. I've highlighted what I mean below :
0 Likes 0 · ·
nooey_007 avatar image
0 Likes"
nooey_007 answered ·
* have tried the link you sent but get a 503 error - bad gateway
· Share
10 |600 characters needed characters left characters exceeded

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

shulmani_developer.support avatar image
0 Likes"
shulmani_developer.support answered ·
Hi. The reason you get that error is that the Shipping Service: InternationalPriorityShippingUK is not available for the Listing Flow. You need to ,make the GeteBayDetails API Call setting the DetailName to ShippingServiceDetails and check for the ValidForSellingFlow tag in the response for the Shipping Service that you want to use. In the case of InternationalPriorityShippingUK , this is set to False, meaning that it is not available for Listing flow. Check this knowledge base article: https://ebaydts.com/eBayKBDetails?KBid=1275 Cheers!!!!
· Share
10 |600 characters needed characters left characters exceeded

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

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.