Title: Create Product API call issue
Last modified: November 5, 2018

---

# Create Product API call issue

 *  Resolved [rsabr](https://wordpress.org/support/users/rsabr/)
 * (@rsabr)
 * [7 years, 7 months ago](https://wordpress.org/support/topic/create-product-api-call-issue/)
 * Hello,
 * I am trying to use API to create a product with success but the problem I am 
   having is that the API will generate the id of the product automatically and 
   I need to assign the id value on my own so I tried adding the id parameter to
   the json and it throws an error that the product already exists which is not 
   the case.
    I have used a plugin before that allows me to import products from
   a CSV and in that process I am able to assign the product ID to be used.
 * Can you please provide some advice on how to create product through API but choose
   the ID to assign to the product?
 * I have also tried to create the product and to later change product with the 
   new id but that does not work either.
 * The page I need help with: _[[log in](https://login.wordpress.org/?redirect_to=https%3A%2F%2Fwordpress.org%2Fsupport%2Ftopic%2Fcreate-product-api-call-issue%2F%3Foutput_format%3Dmd&locale=en_US)
   to see the link]_

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

 *  [alexsbbc](https://wordpress.org/support/users/alexsbbc/)
 * (@alexsbbc)
 * [7 years, 7 months ago](https://wordpress.org/support/topic/create-product-api-call-issue/#post-10849955)
 * Product IDs are auto generated.
 * This is what a SKU is for. Include your ID in the SKU field.
 * Then, either keep a mapping of SKU –> Product ID on your end, or have someone
   extend the API for you to allow you update records via SKU rather than product
   ID.
 * Hope this helps.
 *  Thread Starter [rsabr](https://wordpress.org/support/users/rsabr/)
 * (@rsabr)
 * [7 years, 7 months ago](https://wordpress.org/support/topic/create-product-api-call-issue/#post-10849970)
 * Hi,
    Thanks for you response but the application I am trying to integrate this
   to is old and this will not be possible for some very specific reasons. I was
   hoping this would be possible to do in WC API since that plug-in I mentioned 
   does it in some way.
 *  Plugin Support [Hannah S.L.](https://wordpress.org/support/users/fernashes/)
 * (@fernashes)
 * Automattic Happiness Engineer
 * [7 years, 7 months ago](https://wordpress.org/support/topic/create-product-api-call-issue/#post-10851946)
 * This is a fairly complex development topic. I’m going to leave it open for a 
   bit to see if anyone is able to chime in to help you out.

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

The topic ‘Create Product API call issue’ 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/)
 * [product id](https://wordpress.org/support/topic-tag/product-id/)

 * 3 replies
 * 3 participants
 * Last reply from: [Hannah S.L.](https://wordpress.org/support/users/fernashes/)
 * Last activity: [7 years, 7 months ago](https://wordpress.org/support/topic/create-product-api-call-issue/#post-10851946)
 * Status: resolved