Brand access using REST API to push the product

This topic has 10 replies, 2 voices, and was last updated 7 months, 2 weeks ago ago by Andrew Mitchell

  • Avatar: Golden Eagle
    Shehzad Ghazi
    Participant
    April 26, 2024 at 20:47

    We are trying to use REST API to manage the brands on our website. However, when trying to access /wp-json/wc/v2/etheme_brands as documented in your help atricles, it does not work as this is an invalid rest route. Is there a newer version of the REST API? can you point us to the correct documentation?

    Thank you,
    Golden Eagle

    9 Answers
    Avatar: Andrew Mitchell
    Andrew Mitchell
    Support staff
    April 27, 2024 at 10:53

    Hello, Shehzad Ghazi,

    I hope this message finds you well. Could you please clarify which method you are utilizing to retrieve data, specifically whether you are using POST or GET methods? Additionally, it would be greatly appreciated if you could provide examples of any requests that are failing to execute.

    Thank you for your attention to this matter.

    Best Regards,

    8Theme’s Team

    Please contact administrator
    for this information.
    Avatar: Golden Eagle
    Shehzad Ghazi
    Participant
    April 29, 2024 at 16:55

    we had been using the woo brands for many years, but that plugin has limitations, and we think its better for us to use the xstore brands, as we can do lot more, like using the widgets ajax filters and all,

    we had program our erp to push the brands in woo brands effectively, update, get bata, push data, edit all that,

    you guys have real good document provided using the rest API, all the step were carefully implemented, and we assume it would work really well, but we are not getting any error nor anything but are enable the push the brands into xstore brands at all,
    we are using both push, and get just like it mentioned in the document
    https://www.8theme.com/documentation/xstore/xstore-hooks-filters/xstore-brands-api/

    also we notice, we had both the brands active, but woocommerce brand then was giving 404, so assume we had conflict, so we disable the woo brand plugin, and just kept xstore brands, and then again push it hoping it would work, but again that table is total empty.

    Avatar: Golden Eagle
    Shehzad Ghazi
    Participant
    April 29, 2024 at 17:05

    We are using a GET on https://www.mysite.com/wp-json/wc/v2/etheme_brands

    It returns a 404 error:

    {
    “code”: “rest_no_route”,
    “message”: “No route was found matching the URL and request method.”,
    “data”: {
    “status”: 404
    }
    }

    Avatar: Golden Eagle
    Shehzad Ghazi
    Participant
    April 29, 2024 at 22:47

    We also tried with GET on https://www.mysite.com/wp-json/wp/v2/etheme_brands and got:

    {
    “code”: “rest_no_route”,
    “message”: “No route was found matching the URL and request method.”,
    “data”: {
    “status”: 404
    }
    }

    Avatar: Andrew Mitchell
    Andrew Mitchell
    Support staff
    April 30, 2024 at 09:08

    Hello, Shehzad Ghazi,

    I hope this message finds you well. I am writing to request administrative and FTP access to the website that utilizes the REST API.

    Additionally, I would like to bring to your attention that non-standard REST requests may be blocked by server configurations. It is important to ensure that the server settings are optimized to allow these requests. Here are some potential issues and solutions:

    1. API Disabled: Servers may disable the REST API for security or performance reasons, which can be implemented via plugins or custom code.

    2. Server Configuration Issues: Occasionally, server configurations might prevent access to the REST API paths. It is essential to verify that the web server (such as Apache or Nginx) is configured correctly to process these requests efficiently.

    Your cooperation and assistance in providing the necessary access and ensuring the server settings are appropriately configured would be greatly appreciated.

    Best Regards,
    8Theme’s Team

    Avatar: Golden Eagle
    Shehzad Ghazi
    Participant
    April 30, 2024 at 17:23

    we have created a test site for just this purpose only

    its a exact copy of the actual site, we have disable the woo brands, and just kept xstore brands in place on testing site.

    btw our rest api is working fine while pushing the web categories, items prices, sale prices, min and max quantity, quantity sync, variations, everything relates to product.

    we push everything using the rest api, no product is created manually,

    our erp solution well with woo brands, but same erp when its trying to push xstore brands, the brand table is not getting anything that is being send out. Implemention is done using the doc provided.

    providing the details in private content area, if anything else you guys need, let me know

    Please contact administrator
    for this information.
    Avatar: Andrew Mitchell
    Andrew Mitchell
    Support staff
    May 1, 2024 at 15:32

    Hello, Shehzad Ghazi,

    We have recently conducted a test of the REST API on your demo site and everything is functioning as expected. Further details have been provided in a private content area.

    Best Regards,

    8Theme’s Team

    Please contact administrator
    for this information.
    Avatar: Golden Eagle
    Shehzad Ghazi
    Participant
    May 1, 2024 at 16:15

    so in your local Rest-API Testing you are able to push and modify the brands without any issues, you have created 2 brands, both were push using Rest-API?

    the reason why we created a test site, which is mirror copy of actualy, but we did remove in the test site the woo brands plugin, and just kept the xstore brand plugin for easy testing for you guys,

    We never did motify any plugin,

    btw, I did uninstall the same plugin, and reinstall back in, but didnt find any difference in the code. so no change was made

    Avatar: Andrew Mitchell
    Andrew Mitchell
    Support staff
    May 6, 2024 at 11:12

    Hello, Shehzad Ghazi,

    I hope this message finds you well. I am writing to inform you about the recent testing activities conducted on your staging environment regarding the addition, updating, assignment, and deletion of brands.

    Unlike the Listing or Selection features, these functionalities make changes directly on the site and therefore require special permissions for implementation. To facilitate this, we have installed the WordPress REST API Authentication plugin, which enables the necessary permissions.

    Details of these permissions and examples of adding brands can be found in the screenshots provided in the Private Content Area.

    Should you have any questions or require further assistance, please do not hesitate to contact us.

    Best regards,
    8Theme’s Team

    Please contact administrator
    for this information.
    Files is visible for topic creator and
    support staff only.
  • Viewing 10 results - 1 through 10 (of 10 total)

You must be logged in to reply to this topic.Log in/Sign up

We're using our own and third-party cookies to improve your experience and our website. Keep on browsing to accept our cookie policy.