• Resolved assad1999

    (@assad1999)


    I have checked in my two store. The get request is working well but when I do a post request then I am getting this response:

    {

        “code”: “woocommerce_rest_product_exists”,

        “message”: “Cannot create existing product.”,

        “data”: {

            “status”: 400

    ? ? }
    }

    Even, I don’t have this product in my both stores. Could you elaborate how to fix this.

    Note;
    I am using Post Man desktop application to test the Woocommerce API and the get request working well

    Waiting for your response,
    Thanks.

Viewing 1 replies (of 1 total)
  • Plugin Support Shameem R. a11n

    (@shameemreza)

    Hi @assad1999

    The error message you’re encountering usually occurs when a product with the same SKU or ID already exists in your store. The WooCommerce API prevents the creation of duplicate products with the same SKU or ID.

    Even if you can’t see the product in your store, it might still exist in the database. I would recommend checking your trash and also any drafts you might have, as the product could be hidden there.

    If you’ve already checked these locations and you’re still experiencing this issue, please try running a database cleanup. This can be done through WooCommerce > Status > Tools > Expired Transients.

    If the problem continues, we recommend asking development questions on the #developers channel of the WooCommerce Community Slack. Many of our developers hang out there and will be able to offer insights into your question.

    Thanks!

Viewing 1 replies (of 1 total)
  • The topic ‘Rest API Post Request’ is closed to new replies.