API Battle: Woocommerce vs ePOS

API was supposed to make life easier, not infuriate techs to the point of madness.

I’ve looked into API for product and channel control before, gave up after reading one page which described what it does in several directions with no information on how to start using it. No simple ‘this will talk to your office database and import products’. Nothing about what technologies can be used to call/push data.

We’ve come across another company with the same WooCommerce nightmare as us. Stock management across several channels and keeping it all current. So it’s time to do some more in-depth testing.

In theory, this should allow multiple services to talk to each other, such as invoicing and parts ordering. Reading all the API’s functions, and testing a simple integration, proves its nowhere near finished nor easy to use.

Our current development tests have run into similar issues since our client doesn’t see any logs or debugging information. We see Response 401 (unauthorized) on attempted writes to the API’s target, which makes no sense on Authentication. We’ve triple checked credentials on most of the tests. This one’s really a mind boggler, and has given me a few possibilities:

  • are the permissions carried across wc-api folders? Surely this would be controlled by the APIs keys?
  • Bug in the APIs code? webhook not implemented properly for /products/categories?
  • Server misconfiguration? Possible as there are lots of HTACCESS rules for bot and spam prevention. May be worth spinning up a new instance on development VPS?

Not really sure how to continue with my own tests. I can’t test the clients any more than looking at responses, as they already have a development and big multichannel looking at it. Localhost testing has worked with adding products, with basic authorization disabled. Something not possible on external servers.

I will look at accelerating work on the VPS to get some tests done. This API lark, in theory, should make my life easier, if it works. If all goes well, this leads to our next major project.