Four Js Development Tools Forum

Discussions by product => GWS => Topic started by: Simon B. on November 25, 2020, 12:51:59 pm



Title: Woocommerce REST API
Post by: Simon B. on November 25, 2020, 12:51:59 pm
Hi all,

We have the need for our Genero system to start communicating with a Wordpress ecommerce site using the Woocommerce REST API, documentation found here : https://docs.woocommerce.com/document/woocommerce-rest-api

Now we are complete newbies to web services so are liasing with Four J's support here in the UK, but we thought it would be worth asking if anybody had any experience working with the Woocommerce API and Genero, and if you could give us any pointers or examples to get us started. It's not clear from the Woocommerce documentation for a start as to whether it supports the OpenAPI standards (so we can use fglrestful) or whether we'd have to write client code ourselves.

Any help that anyone can give would be most appreciated.

Thanks in advance!

Simon


Title: Re: Woocommerce REST API
Post by: Susobh S. on November 28, 2020, 01:03:47 pm
Hi Simon,

Upon looking through the given URL and the developer docs, seem like they don't provide the OpenAPI specification, Instead they provide their own API index.
Thus I believe you cannot use the fglrestful for generating the client stubs. Will need to write the client code using the com.HTTPRequest methods.
http://4js.com/online_documentation/fjs-fgl-manual-html/#fgl-topics/c_gws_ComHTTPRequest_methods.html

com.HTTPRequest has all the functions that you want.


Thanks And Regards
Susobh Sugathan



Title: Re: Woocommerce REST API
Post by: Richard H. on January 27, 2021, 05:11:05 pm
I believe it is possible to write your own OpenAPI.json file that describes the other, non-OpenAPI service.  Then you could use fglrestful to generate your Genero client.  I've not tried it myself yet, time pressures forbid it until we have a need.