Jump to content

Apply discont through API


setdeveloper

Recommended Posts

Hi

I need create discount in article trough Prestashop API

I think it´s neccesary use specific_prices from API but always retur error 41.

This is the result:

<?xml version="1.0" encoding="UTF-8"?>
<prestashop xlink="http://www.w3.org/1999/xlink">
<errors>
<error>
<code>
41
</code>
<message>
parameter "id_shop" required
</message>
</error>
</errors>
</prestashop>

and this is the petition:

<?xml version="1.0" encoding="UTF-8"?>   <prestashop xmlns:xlink="http://www.w3.org/1999/xlink"> 

   <specific_prices> 

   <specific_price>

    <id_shop>1</id_shop>

    <id_cart>1</id_cart>

    <id_product>469</id_product>

    <id_currency>0</id_currency>

    <id_country>0</id_country>

    <id_group>0</id_group>

    <id_customer>0</id_customer>

    <price>-1.000000</price>

    <from_quantity>1</from_quantity>

    <reduction>0.300000</reduction>

    <reduction_tax>1</reduction_tax>

    <reduction_type>percentage</reduction_type> 

    <from>0000-00-00 00:00:00</from>

   <to>0000-00-00 00:00:00</to>

    </specific_price> 

   </specific_prices>

   </prestashop>

This is the URL

https://mydomain and autentificacion/api/specific_prices?

And by post method

Any idea?

Thanks

 

 

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...