-1

I am using the eBay API and @davidtstadler's SDK to revise ebay listings.

I am using eBay business policies for payment methods, shipping costs and returns. I can retrieve my business policy id's using BusinessPoliciesManagementService but how do I revise an item to use the policies for payment, shipping and returns.

I cannot find any examples in the API documentation.

paj
  • 1,177
  • 16
  • 33
  • [Looks like](https://github.com/davidtsadler/ebay-sdk-examples/blob/master/business-policies-management/README.md) the SDK only allows you to retrieve business polices, not set them. – Jamie Bicknell Jul 01 '16 at 14:41
  • I don't want to set them - I want to use them when I list or revise an item. – paj Jul 01 '16 at 14:55
  • Use the ID's that you got back from the business policies and pass them to the PaymentProfileID, ReturnProfileID, ShippingProfileID fields when revising/adding your items. http://developer.ebay.com/DevZone/XML/docs/Reference/eBay/AddFixedPriceItem.html#Request.Item.SellerProfiles –  Jul 01 '16 at 16:21
  • thanks david, do you have a code sample, $item->SellerProfiles->SellerPaymentProfile->PaymentProfileID=1234567890; returns an error when used in reviseitem – paj Jul 02 '16 at 16:15
  • What error do you get? –  Jul 04 '16 at 08:16
  • my mistake was not creating the new type object for each profile. – paj Jul 04 '16 at 12:00

1 Answers1

0

The correct way to set Business Policy ID's for Payment, Returns and Shipping is

    // Business PROFILES
    $item->SellerProfiles = new Types\SellerProfilesType();

    // PAYMENT
    $item->SellerProfiles->SellerPaymentProfile = new Types\SellerPaymentProfileType();
    $item->SellerProfiles->SellerPaymentProfile->PaymentProfileID = 1234567890;
    // RETURNS
    $item->SellerProfiles->SellerReturnProfile = new Types\SellerReturnProfileType();
    $item->SellerProfiles->SellerReturnProfile->ReturnProfileID = 1234567890;
    // SHIPPING
    $item->SellerProfiles->SellerShippingProfile = new Types\SellerShippingProfileType();
    $item->SellerProfiles->SellerShippingProfile->ShippingProfileName = 1234567890; 
Community
  • 1
  • 1
paj
  • 1,177
  • 16
  • 33