AddFixedPriceItem: specify MPN in VariationSpecifics.NameValueList

I am updating the code that generates XML for eBay lists, some of which add MPN.

For single ads, everything works fine, since the brand and MPN can be specified through the ItemSpecifics container. However, for variants with several variations, MPN must be specified for each variant.

According to the documentation, it should be specified in the VariationSpecifics.NameValueList container.

I have added code for this that generates 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 for a reprint of the product, it fails, responding to 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 suggested that I need to provide each MPN in the VariationSpecificsSet.NameValueList container, adding that the listing was successful, but then MPN appears as an option for selection in the listing itself, which is clearly wrong:

The listing shows mpn as a selectable option.

How to specify MPN for multiposition lists?

+5
source share
1 answer

I think you are misleading two separate concepts, and you can probably blame the eBay API naming conventions for this confusion. But a Part Specification is an information field that is marked on an eBay sheet, and Variation Specifications controls the visual aspect of the drop-down menus in a list with several variations. p>

Usually inside <VariationSpecificsSet> you define <Name> and <Value> tags. This only creates a visual drop down menu available to customers on eBay .

Then you bind the <Name> and <Value> tags with the <Name> and <Value> tags in <VariationSpecifics> for each option. This will only populate the visual dropdown created by <VariationSpecificsSet> . (The name / value tag in the Variations Specifications must correspond to the name / value tag, otherwise you will receive the errors that you receive.

So, as a solution. If you use your MPN as your unique identifier, you can fill it in the SKU field. But if you just want to add this field to the element specification container, then you might want to just create a <ItemSpecifics> <Name> called "MPN" and combine all these MPN values ​​in a comma-separated list for <Value> .

+1
source

Source: https://habr.com/ru/post/1243226/


All Articles