Title: Create product using WooCommerce API
Last modified: October 29, 2020

---

# Create product using WooCommerce API

 *  [scheidgabriel](https://wordpress.org/support/users/scheidgabriel/)
 * (@scheidgabriel)
 * [5 years, 7 months ago](https://wordpress.org/support/topic/create-product-using-woocommerce-api/)
 * Hello there.
    I’m having a problem using the WooCommerce API to create new products.
   I can make get requests to retrieve products and orders. I can make POST requests
   to update products and orders. But I can’t make PUT requests to create new products.
   I’m doing exactly what the docs tell me to do, but it just does not work. The
   create new product API behaves exactly like the list all products API. I send
   in a PUT request, with the new product information, in JSON format, and the API
   returns to me the list of all products, and the new product I tried to create
   is not included in this list. I need help. Thanks, in advance.

Viewing 5 replies - 1 through 5 (of 5 total)

 *  Plugin Support [Stuart Duff – a11n](https://wordpress.org/support/users/stuartduff/)
 * (@stuartduff)
 * Automattic Happiness Engineer
 * [5 years, 7 months ago](https://wordpress.org/support/topic/create-product-using-woocommerce-api/#post-13596587)
 * Hi [@scheidgabriel](https://wordpress.org/support/users/scheidgabriel/),
 * Testing creating a product using the REST API I was able to create the product
   successfully on my test installation of WooCommerce. The REST API endpoint which
   I used during that testing was this one below.
 * [https://woocommerce.github.io/woocommerce-rest-api-docs/#create-a-product](https://woocommerce.github.io/woocommerce-rest-api-docs/#create-a-product)
 * With regards to testing API calls we’d recommend using to see any errors, we 
   have some information on testing API calls using an App called Postman and I’ve
   referenced that for you below too.
 * [https://github.com/woocommerce/woocommerce/wiki/Getting-started-with-the-REST-API](https://github.com/woocommerce/woocommerce/wiki/Getting-started-with-the-REST-API)
 *  Thread Starter [scheidgabriel](https://wordpress.org/support/users/scheidgabriel/)
 * (@scheidgabriel)
 * [5 years, 7 months ago](https://wordpress.org/support/topic/create-product-using-woocommerce-api/#post-13596698)
 * Hello [@stuartduff](https://wordpress.org/support/users/stuartduff/)
    First of
   all, thanks you for your answer!
 * And I misspelled on my question. I’m not able to make POST requests.
 * That is the same endpoint I’m using.
 * I use Postman for testing. But not even in Postman I can use that endpoint.
    
   I set everything up, the endpoint URL, then the following: – “Params” tab: I 
   add two keys: consumer_key and consumer_secret, and their respective values.
 * – “Authorization” tab: I select “Basic Auth”, and the username is the consumer
   key, and the password is the consumer secret.
 * – “Body” tab: I select “raw”, define it as JSON, then I write the JSON in the
   text area
 * – I define the method as POST
 * Then I hit “Send”. What the API returns is the same thing as if I used this endpoint:
   [https://woocommerce.github.io/woocommerce-rest-api-docs/#list-all-products](https://woocommerce.github.io/woocommerce-rest-api-docs/#list-all-products)
 * I get no error messages. I get nothing but the list of all products, when I should
   receive back the product I tried to create.
    I tried creating the product using
   Postman (like I described here) and I tried creating the product using the Visual
   Studio C# console application I developed to consume the API. After trying these
   2 methods, I always log in the admin panel of the WooCommerce site I’m developing
   this for, and check the products. The one I tried to create is never there.
 * My C# console app GET and PUT requests work just fine. But my POST does not. 
   I don’t know what I’m doing wrong.
    -  This reply was modified 5 years, 7 months ago by [scheidgabriel](https://wordpress.org/support/users/scheidgabriel/).
 *  [mrkhairi96](https://wordpress.org/support/users/mrkhairi96/)
 * (@mrkhairi96)
 * [5 years, 1 month ago](https://wordpress.org/support/topic/create-product-using-woocommerce-api/#post-14364435)
 * Hi [@scheidgabriel](https://wordpress.org/support/users/scheidgabriel/) ,
    I 
   facing same issue with you. When I create product, it will return list of product
   with 200 status code. Should be 201. Have you got any solution for this? Since
   the discussion already stop assuming you find any solution or hint to prevent
   this happening. Thanks.
 *  [nasik](https://wordpress.org/support/users/nasik/)
 * (@nasik)
 * [5 years ago](https://wordpress.org/support/topic/create-product-using-woocommerce-api/#post-14441269)
 * [@scheidgabriel](https://wordpress.org/support/users/scheidgabriel/) [@stuartduff](https://wordpress.org/support/users/stuartduff/)
   [@mrkhairi96](https://wordpress.org/support/users/mrkhairi96/) Have you guys 
   figured it out? Facing the same issue.
 *  [nasik](https://wordpress.org/support/users/nasik/)
 * (@nasik)
 * [5 years ago](https://wordpress.org/support/topic/create-product-using-woocommerce-api/#post-14441289)
 * Figured it out for me.
 * The problem:
    – POST request to create a product returns 200 status code and 
   a list of products instead of a new product.
 * The solution:
    – according to this link it should be a server problem. So, adding`&
   _method=POST` to the path solves a problem [https://github.com/woocommerce/woocommerce/wiki/Getting-started-with-the-REST-API#server-does-not-support-postdeleteput](https://github.com/woocommerce/woocommerce/wiki/Getting-started-with-the-REST-API#server-does-not-support-postdeleteput)
 * E.g.
    [https://example.org/wp-json/wc/v2/products?consumer_key=key&consumer_secret=secret&_method=POST](https://example.org/wp-json/wc/v2/products?consumer_key=key&consumer_secret=secret&_method=POST)

Viewing 5 replies - 1 through 5 (of 5 total)

The topic ‘Create product using WooCommerce API’ is closed to new replies.

 * ![](https://ps.w.org/woocommerce/assets/icon.svg?rev=3234504)
 * [WooCommerce](https://wordpress.org/plugins/woocommerce/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/woocommerce/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/woocommerce/)
 * [Active Topics](https://wordpress.org/support/plugin/woocommerce/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/woocommerce/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/woocommerce/reviews/)

## Tags

 * [api](https://wordpress.org/support/topic-tag/api/)
 * [create product](https://wordpress.org/support/topic-tag/create-product/)
 * [woocommerce api](https://wordpress.org/support/topic-tag/woocommerce-api/)

 * 5 replies
 * 4 participants
 * Last reply from: [nasik](https://wordpress.org/support/users/nasik/)
 * Last activity: [5 years ago](https://wordpress.org/support/topic/create-product-using-woocommerce-api/#post-14441289)
 * Status: not resolved