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:
How do I correctly specify the MPN for multi-variation listings?