Products CREATE OR UPDATE
This request is for updating an existing product for a seller or creating if it doesn't exist. If the product is valid, we will try to publish it.
curl https://dawanda.com/seller_api/products/:sku?v=1.1 \ -X PUT \ -d "@my_product.xml" \ -H "Content-Type: text/xml" \ -H "X-Dawanda-Auth: YOUR_API_KEY"
A successful request will respond with an XML response with a relative URL to the products page:
<product url="URL" status="success" />
<product url="/product/123-my-product" status="success" />
When an error has occurred, the API will respond with an appropriate HTTP Status code. The response body will contain an XML document containing a human readable error message and additional details (if any).
See also: Error Codes.
The SKU in the URL and in the XML should match. It can be different only if you want to update a product's SKU. In that case you should reference the product by the existing SKU in the URL and specify the new one in the XML. Otherwise you will get an error.
When creating or updating products, images are asynchronously downloaded from the URLs provided. However, the API issues a synchronous HTTP HEAD request to determine if the image URLs are valid. If the HTTP HEAD request returns a non-200 status code, the create/update will fail with a 422 Record Invalid error response.
When updating a product it is possible to optionally specify if the
images should also be updated by setting the
dawanda:images element to true. When the property is set, all
old images will be deleted and replaced with those from the update
request, so the state must therefore be maintained on the customer side.
If you want to unset a
shop_category, set the
0 and it will be disassociated from the product.
Allowed values for the
11: delivery within 1-2 days
12: delivery within 3-5 days
13: delivery within 6-9 days
14: delivery within 10-14 days
15: delivery within 15-21 days
21: delivery within 4 weeks
22: delivery within 5 weeks
23: delivery within 6 weeks
24: delivery within 7 weeks
25: delivery within 8 weeks
26: delivery within 9 weeks
27: delivery within 10 weeks
This request requires authentication.
Link to XML: Product.xml