Jump to content

Issue creation products API


Deedee33

Recommended Posts

Hi all,

 

I ask your help because I have an issue, and I don't know what to do.

 

I'm trying to use prestashop API to create entities : products, customers etc ... but it's not working.

 

Repsonse is CREATED but I don't see anything in my prestashop, can you help  please ?

 

Thank you :

 

When I call API (I do it in C#) :

 

var response = client.PostAsXmlAsync(ResourceUri, xml).Result;

 

ResourceUri = {product_option_values?display=full}

 

XML = <?xml version="1.0" encoding="UTF-8"?>
<prestashop xmlns:xlink="http://www.w3.org/1999/xlink">
  <product_option_value>
    <id></id>
    <id_attribute_group>2</id_attribute_group>
    <color>#D2D6D6</color>
    <position>30</position>
    <name>
      <language id="1">Test Color</language>
    </name>
  </product_option_value>
</prestashop>
 

Reponse = {StatusCode: 201, ReasonPhrase: 'Created', Version: 1.1, Content: System.Net.Http.StreamContent, Headers:
{
  Vary: Host
  Access-Time: 1389603224
  PSWS-Version: 1.5.6.1
  Execution-Time: 0.011
  Content-Sha1: 73d77831640b396486ee37b959f837d04c358178
  Date: Mon, 13 Jan 2014 08:53:44 GMT
  Server: Apache/2.4.4
  Server: (Win64)
  Server: PHP/5.4.12
  X-Powered-By: PrestaShop Webservice
  Content-Length: 109
  Content-Type: text/xml; charset=utf-8
[spam-filter]

 

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