5

I'm updating some code which generates the XML for eBay listings, part of which is adding the MPN.

For single listings everything is working fine, as the brand and MPN can be specified through the ItemSpecifics container. For multi-variation listings however, the MPN must be specified for each variation.

According to the documentation, it should be specified in a variation's VariationSpecifics.NameValueList container.

I've added the code to do this, which generates the XML:

<Variation>
  <SKU>CODE</SKU>
  <StartPrice>99.99</StartPrice>
  <Quantity>124</Quantity>
  <VariationSpecifics>
    <NameValueList>
      <Name>MPN</Name>
      <Value>000001</Value>
    </NameValueList>
    <NameValueList>
      <Name>Choose Colour</Name>
      <Value>Black</Value>
    </NameValueList>
  </VariationSpecifics>
</Variation>

When sending a request to list the product, it fails, responding with the following errors:

[1] => Array
    (
        [ShortMessage] => Variation Specifics Mismatch.
        [LongMessage] => Variation Specifics provided does not match with the variation specifics of the variations on the item.
        [ErrorCode] => 21916664
        [SeverityCode] => Error
        [ErrorClassification] => RequestError
    )

[2] => Array
    (
        [ShortMessage] => Missing name in name-value list.
        [LongMessage] => Missing name in the variation specifics or variation specifics set.
        [ErrorCode] => 21916587
        [SeverityCode] => Error
        [ErrorClassification] => RequestError
    )

I assumed that I needed to provide each MPN in a VariationSpecificsSet.NameValueList container, having added that the listing was successful, but then the MPN appears as a selectable option on the listing itself, which is obviously incorrect:

listing shows mpn as selectable option

How do I correctly specify the MPN for multi-variation listings?

billyonecan
  • 20,090
  • 8
  • 42
  • 64

1 Answers1

1

I think you are confusing two separate concepts, and you can probably blame eBay's API naming conventions for that confusion. But, Item specifics is an informational field that is slapped onto the eBay listing, and Variation Specifics controls the visual aspect of the dropdown menus in a Multi-Variation listing.

Generally inside <VariationSpecificsSet>you will define the <Name> and <Value> tags. This only creates the visual drop-down menu view-able for customers on eBay.

Then you link those <Name> and <Value> tags to the <Name> and <Value> tags in <VariationSpecifics> on each variation. This will only fill in the visual drop-down created by <VariationSpecificsSet>. (The name/value tag in Variation Specifics must match a name/value tag in , otherwise you will get the errors that you are getting.

So as a solution, If you are using your MPN to as your unique ID, then you can fill it into the SKU field. But, if you are looking to simply add that field to the item specifics container, then you might want to just want to create an <ItemSpecifics> custom <Name> tag called "MPNs" and concatenate all of those MPN values in a comma separated list for the <Value>.

Isaac Montaine
  • 308
  • 2
  • 7
  • Thanks for the answer. It's just that eBay explicitly states that if you're using a brand and MPN to identify a product, the brand is set in the `ItemSpecifics` container, and the MPN in the `VariationSpecifics` container: *If using brand and MPN (manufacturer part number) values to identify each product variation, the brand name is specified at the item level in the ItemSpecifics.NameValueList container, and the MPN for each product variation is specified at the variation level in the VariationSpecifics.NameValueList container.* – billyonecan Feb 20 '16 at 21:54
  • The key language is "if [you are] using [the] MPN values to identify each product variation." And if you are using MPN's to differentiate your product you would use MPN's instead of colors in the tags. So your drop down would be something like Style >> MPN1,MPN2,MPN3 instead of Color >> Red, Blue, Green. Alternatively, you can just insert the MPN's as SKU if you are using MPN's as your unique ID, but that depends on your setup. – Isaac Montaine Feb 21 '16 at 00:59
  • 1
    You can also take a look at this container ` VariationProductListingDetailsType string string string ` – Isaac Montaine Feb 23 '16 at 16:20