Woosage50 API

Woosage50 API

Introduction

Woosage50 has its own REST API that is used by the Woosage50 Service to transfer data between the website and Sage.

The Woosage50 API is an extension of the WordPress API and uses the endpoint https://WEBSITE-URL/wp-json/woosage/v1/ where WEBSITE-URL is the URL of the website where the Woosage50 plugin is installed.

The API was developed to replace the use of the WooCommerce API to ensure only the relevant data is being transmitted, in order to speed up processing and place less of a burden on the website. It performs a wide range of functions relating to orders processing, stock updates and products, using the HTTP GET and POST methods. 

Note: The Woosage50 API does not use the PUT, PATCH or DELETE HTTP methods

Authentication

In order for the Woosage50 Service to access the API it has to be authenticated each time it is used using API keys passed with each call. There are two keys that are created in WooCommerce (see this article) and then stored in an encrypted configuration file that is used by the Woosage50 Service and supplied during installation.

The default method of of authentication (i.e. how the keys are passed to, and authenticated by, the website) is referred to as OAUTH 1.0, whereby the keys are encoded and passed in the Request Headers.  Alternatively, the keys can be passed as  an encoded parameter.

The Woosage50 API offers a basic authentication method that can be used where the server or website security settings prevent the above being used. This method can either encode the keys as a username & password string in the headers or pass the keys as parameters. 

The authentication method and means of passing the keys is held in an encrypted config file that is created prior to the installation by the Woosage Support team and once set this should not require changing unless the website is moved to another server or security settings are changed,

Errors

As mentioned above, REST API errors should only occur when changes are made to the server or website security settings. However, if the service or website is unavailable then REST API error 10026 may occur.  The details of the cause of the error will be reported in the log and via email with the following message.

There was a REST API error. If this persists please contact Woosage Support.

The error may be temporary (i.e. the website is down) and may resolve itself during subsequent processing cycles. If not, then support@woosage.com giving details of full error message, including the details of the cause.



    • Related Articles

    • New Releases of Woosage

      From time to time we release new versions of the Woosage application to add new features and to ensure compatibility with the applications it interacts with (mainly Sage and WooCommerce). Installing a New Version Installing a new version is simply a ...
    • Woosage50 vs. Woosage

      Woosage50 is the replacement for Woosage and is designed to improve efficiency and usability. Like Woosage it is available in two variants: Essentials - Basic order processing with some additions, such as Sage reference in website orders and website ...
    • Moving Woosage

      Sometimes it is necessary to move Woosage to another PC or server and this is a fairly straight forward process. Download the latest version of the installer from here  Copy the database (woosage.db) from the existing server ...
    • Activating your Woosage Subscription

      Activating your Woosage Subscription To activate your subscription you will need your Subscription ID. This is an 18 digit code that you will have received in an email when you subscribed. If you can't locate you subscription ID, email ...
    • How Woosage Works

      All of the processing is done by the Woosage Service, which runs in the background on a windows PC on the same local network as Sage. The Woosage Service handles all communications with Sage and the website. The system is depicted in the following ...