简体   繁体   中英

Amazon MWS API: How do I save search terms for a product?

I'm trying to add search terms when uploading a product using the Amazon MWS API but I keep getting an error in the response.
This is what i'm sending

<?xml version="1.0" encoding="iso-8859-1"?>
<AmazonEnvelope
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="amzn-envelope.xsd">
<Header>
    <DocumentVersion>1.01</DocumentVersion>
    <MerchantIdentifier>XXXXXXXXXXX</MerchantIdentifier>
</Header>
<MessageType>Product</MessageType>
<PurgeAndReplace>false</PurgeAndReplace>
<Message>
    <MessageID>1</MessageID>
    <OperationType>Update</OperationType>
    <Product>
        <SKU>test-sku-Pink-8-b 5</SKU>
        <StandardProductID>
            <Type>UPC</Type>
            <Value>699178226987</Value>
        </StandardProductID>
        <DescriptionData>
            <Title>
                <![CDATA[test name-Pink-8]]>
            </Title>
            <Brand>Layla K</Brand>
            <Description>
                <![CDATA[This masquerade ball dress comes with a matching shawl and detachable straps at no additional cost! Has hand beaded jewels on sweetheart bodice, skirt &amp; corset / lace up back.]]>
            </Description>
            <MSRP currency="USD">229.99</MSRP>
            <ItemType>Special Occasion Dresses</ItemType>
            <SearchTerms>Dress</SearchTerms><!--trying to add this search term-->
        </DescriptionData>
        <ProductData>
            <Clothing>
                <VariationData>
                    <Size>8</Size>
                    <Color>Pink</Color>
                    <VariationTheme>SizeColor</VariationTheme>
                </VariationData>
                <ClassificationData>
                    <ClothingType>Dress</ClothingType>
                    <Department>womens</Department>
                </ClassificationData>
            </Clothing>
        </ProductData>
    </Product>
</Message>

The error i'm getting is this

<Result>
            <MessageID>1</MessageID>
            <ResultCode>Error</ResultCode>
            <ResultMessageCode>5000</ResultMessageCode>
            <ResultDescription>XML Parsing Error at Line 24, Column 15: cvc-complex-type.2.4.a: Invalid content was found starting with element 'SearchTerms'. One of '{OtherItemAttributes, TargetAudience, SubjectContent, IsGiftWrapAvailable, IsGiftMessageAvailable, PromotionKeywords, IsDiscontinuedByManufacturer, DeliveryScheduleGroupID, DeliveryChannel, ExternalProductInformation, MaxAggregateShipQuantity, RecommendedBrowseNode, MerchantShippingGroupName, FEDAS_ID, TSDAgeWarning, TSDWarning, TSDLanguage, OptionalPaymentTypeExclusion, DistributionDesignation}' is expected.</ResultDescription>
            <AdditionalInfo>
                <SKU>test-sku-Pink-8-b 5</SKU>
            </AdditionalInfo>
        </Result>

Does anyone know why i'm getting this error?
I'm using Amazon MWS Scratchpad to submit my feed.

在此处输入图片说明

I figured this out. I had to switch the order of ItemType and SearchTerms

<SearchTerms>Dress</SearchTerms>
<ItemType>Special Occasion Dresses</ItemType>

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM