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

    • Installation and Setup of Woosage for Sage Accounting

      Woosage for Sage Accounting is intended to be a self-install application and everything you need to do this is contained is right here in just 4 easy steps. Install the Woosage plugin Add your subscription Identifier Authorise Woosage to access your ...
    • What is Woosage for Sage Accounting?

      Woosage is a plugin for your website that will integrate your WooCommerce shop with Sage Accounting (also known as Sage Business Cloud Accounting - formerly Sage One). Woosage Essentials Edition is available and has the following features: Imports ...
    • Create an optional Sage Accounting user for Woosage

      While this step is optional, we we recommend that you add a Woosage user to allow us to access Sage Accounting on your behalf when installing WoosageBCA or providing ongoing support. If you do not add an additional user for Woosage, then we will not ...
    • Woosage Invoice Matching

      Woosage has always matched the website customer payments to sales invoices in Sage, when the invoice has been created by Woosage. However, when the invoice has been created from a sales order the payment created when the invoice is posted is a ...
    • Woosage50 Website Cache Issues

      Woosage50 has a REST API that the Woosage50 Service uses to transfer data to and from the website via the Woosage50 plugin and it is important that the API is not cached by your website. Websites can cache pages and other data at the server level or ...