Jump to content

Bug: PrestaShop POST request returns all product attributes


Cloudio

Recommended Posts

Hi, as you read by the title i'm trying to update the catalog of my shop by using the Webservice API

Here's the problem when i send the POST request:

<?xml version="1.0" encoding="UTF-8"?>
<prestashop xmlns:xlink="http://www.w3.org/1999/xlink">
    <product_option_values>
        <product_option_value id="8159" xlink:href="https://www.sciarasouani.it/api/product_option_values/8159"/>
        <product_option_value id="8160" xlink:href="https://www.sciarasouani.it/api/product_option_values/8160"/>
        <product_option_value id="8161" xlink:href="https://www.sciarasouani.it/api/product_option_values/8161"/>
        <product_option_value id="8162" xlink:href="https://www.sciarasouani.it/api/product_option_values/8162"/>
        <product_option_value id="8163" xlink:href="https://www.sciarasouani.it/api/product_option_values/8163"/>
        <product_option_value id="8164" xlink:href="https://www.sciarasouani.it/api/product_option_values/8164"/>
        <product_option_value id="8165" xlink:href="https://www.sciarasouani.it/api/product_option_values/8165"/>
        <product_option_value id="8166" xlink:href="https://www.sciarasouani.it/api/product_option_values/8166"/>
        <product_option_value id="8167" xlink:href="https://www.sciarasouani.it/api/product_option_values/8167"/>
        <product_option_value id="8168" xlink:href="https://www.sciarasouani.it/api/product_option_values/8168"/>
        <product_option_value id="8169" xlink:href="https://www.sciarasouani.it/api/product_option_values/8169"/>
        <product_option_value id="8170" xlink:href="https://www.sciarasouani.it/api/product_option_values/8170"/>
        <product_option_value id="8171" xlink:href="https://www.sciarasouani.it/api/product_option_values/8171"/>
        <product_option_value id="8172" xlink:href="https://www.sciarasouani.it/api/product_option_values/8172"/>
		.  .  .
    </product_option_values>

The URL request looks like this:

https://sciarasouani.it/api/product_option_values?ws_key=API_KEY&Account=API_KEY

and the body of the request like this:

<?xml version="1.0" encoding="UTF-8"?>
<prestashop xmlns:xlink="http://www.w3.org/1999/xlink">
    <product_option_value>
        <id_attribute_group>
           85
        </id_attribute_group>
        <position>
            1
        </position>
        <name>
            <language id="1">
                GUER_64203
            </language>
        </name>
    </product_option_value>
</prestashop>

I've tried to wrap the body params ↑ into CDATA but it gives the same result as if i'm doing a GET request of all product_option_values

Please help me out! Thank you in advance
 

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...