Jump to content

DELETE specific_prices via Webservice API


cdurth

Recommended Posts

Hello,

I am trying to delete specific_prices objects by id.

I am getting a 404 response with Id(s) not found.

What is the correct format for this delete request?

See my attempt below. I have tried supplying the whole record, retrieved from a GET, and also just by passing the id.

I have been able to PUT & POST fine.

<prestashop xmlns:xlink="http://www.w3.org/1999/xlink">
 <specific_price>
      <id>
        <![CDATA[11]]>
      </id>
    </specific_price>
</prestashop>

> DELETE /api/specific_prices HTTP/1.1
> Host: REDACTED
> User-Agent: insomnia/2020.4.1
> Cookie: PrestaShop-<REDACTED>
> Content-Type: application/xml
> Accept: */*
> Content-Length: 1375

| <prestashop xmlns:xlink="http://www.w3.org/1999/xlink">
|  <specific_price>
|       <id>
|         <![CDATA[11]]>
|       </id>
|       <id_shop_group>
|         <![CDATA[0]]>
|       </id_shop_group>
|       <id_shop xlink:href="REDACTED">
|         <![CDATA[1]]>
|       </id_shop>
|       <id_cart>
|         <![CDATA[0]]>
|       </id_cart>
|       <id_product xlink:href="REDACTED">
|         <![CDATA[172]]>
|       </id_product>
|       <id_product_attribute>
|         <![CDATA[0]]>
|       </id_product_attribute>
|       <id_currency>
|         <![CDATA[0]]>
|       </id_currency>
|       <id_country>
|         <![CDATA[0]]>
|       </id_country>
|       <id_group>
|         <![CDATA[0]]>
|       </id_group>
|       <id_customer>
|         <![CDATA[0]]>
|       </id_customer>
|       <id_specific_price_rule>
|         <![CDATA[0]]>
|       </id_specific_price_rule>
|       <price>
|         <![CDATA[-1.000000]]>
|       </price>
|       <from_quantity>
|         <![CDATA[1]]>
|       </from_quantity>
|       <reduction>
|         <![CDATA[0.300000]]>
|       </reduction>
|       <reduction_tax>
|         <![CDATA[1]]>
|       </reduction_tax>
|       <reduction_type>
|         <![CDATA[percentage]]>
|       </reduction_type>
|       <from>
|         <![CDATA[0000-00-00 00:00:00]]>
|       </from>
|       <to>
|         <![CDATA[0000-00-00 00:00:00]]>
|       </to>
|     </specific_price>
| </prestashop>

< HTTP/1.1 404 Not Found
< Server: nginx/1.16.1
< Date: Fri, 15 Jan 2021 00:38:36 GMT
< Content-Type: text/xml;charset=utf-8
< Transfer-Encoding: chunked
< Vary: Accept-Encoding
< Access-Time: 1610671116
< X-Powered-By: PrestaShop Webservice
< PSWS-Version: 1.7.1.2
< Execution-Time: 0.02

 

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