• Resolved nataliactivex

    (@nataliactivex)


    I’m doing a product API integration for the first time.

    I’ve already managed to integrate but I have a problem: products with zero stock are being classified as “On order” instead of “out of stock”.
    But if I go to the backoffice and edit one of these products (without making any changes, just enter and save) it is already sold out.
    Can anyone help me to get it out of stock on import?

Viewing 8 replies - 16 through 23 (of 23 total)
  • Saif

    (@babylon1999)

    Hello @nataliactivex,

    I’ve already managed to integrate but I have a problem: products with zero stock are being classified as “On order” instead of “out of stock”.

    We’re going to need more information to understand what’s going on here.

    • Are they classified as “On order” in the API call only or in the product page as well?
    • Did you happen to import these products or did you create them from your Products tab?
    • Could you please share a copy of your site’s System Status? You can find it via WooCommerce > Status. Select “Get system report” and then “Copy for support”.? Once you’ve done that, paste it here in your response.
    Thread Starter nataliactivex

    (@nataliactivex)

    You have all this information on the previous page..

    Thread Starter nataliactivex

    (@nataliactivex)

    made a mistake in the first message, I meant “On backorder” instead of “On order”

    Mirko P.

    (@rainfallnixfig)

    Hi there,

    Thanks for getting back to us.

    Is “Allow backorders?” in the product data set to “Do not allow”?


    Image link: https://snipboard.io/baflVt.jpg

    Thread Starter nataliactivex

    (@nataliactivex)

    that’s not the problem!!
    It’s on import! Did you see the code and messages I sent above?

    I’ll repeat: When I import products I want them to be marked as “out of stock” (as i sent in the code) and not as “On backorder” (how it is inserted into the database)! Just this! If I’m not explaining it well, please say it, because I don’t know what else to say!

    Mirko P.

    (@rainfallnixfig)

    Hey there,

    No problem, we are trying to help you and understand, and since this is not a paid service and there are volunteers as well in the forums, a level of friendliness and kindness is greatly appreciated.

    I’m just importing according to your manuals!

    It seems that your code is not following our REST API guidelines. For example date_created should be formatted as "date_created": "2017-03-23T17:01:14" but in your code it appears as "date_created":"\/Date(-62135596800000)\/". You can review the REST API documentation here:

    https://woocommerce.github.io/woocommerce-rest-api-docs/#introduction

    Additionally, I noticed that your POST request does not allow to register/create the product since it says that the product already exists but actually it does not exist because it is the first request. I get a 400 Bad Request in Postman:


    Image link: https://ibb.co/Khx68dL

    Kindly note that this forum is mostly focused on resolving issues with core configuration and its intended functionality, and our scope of support for this type of customization may be limited as outlined in our Support Policy.

    If you are unfamiliar with code/templates and resolving potential conflicts, select a WooExpert or Developer for assistance.

    Hope this points you in the right direction.

    Best regards.

    Thread Starter nataliactivex

    (@nataliactivex)

    Hello Mirko,

    I apologize for my lack of patience, but I am trying to explain that I have a problem with the import and it seems that only give me solutions that have nothing to do with it.

    I’m not sure where to put this question since it’s just related to the configuration of the product import script.

    Thanks

    Hello,

    I’m sorry to hear that. You can also check out the following resources to get further assistance:

    The WooCommerce Developer Resources Portal.
    WooCommerce Facebook group.
    — The #developers channel of the WooCommerce Community Slack.
    — As mentioned earlier, you can also select a WooExpert or Developer for further assistance.

    I hope this points you in the right direction.

    • This reply was modified 2 years, 1 month ago by Igor H.
Viewing 8 replies - 16 through 23 (of 23 total)
  • The topic ‘API product integration’ is closed to new replies.