Skip to content
On this page

API Basics

This section describes how to use the W2 RESTful API





The W2 REST API uses basic authentication. You will need to add a basic authorization header with your api key base 64 encoded to all requests.

Header KeyHeader Pattern
AuthorizationBasic Base64EncodedW2ApiKey

API Versioning

To call a specific version of the API append the API version query option to the end of the URL like this:

We strongly recommend that you provide a version number with all of your requests. A request without a version number will default to the latest version of the API so you might experience changes you are not prepared for.

HTTP Status Codes

The W2 RESTful API closely adheres to the standard use of HTTP status codes. You can expect to find one of the following status codes in your response data.

Http ResponseHttp StatuscodeDescription
Retrieved (OK)200A 200 response indicates that the request has succeeded and the resource has been retrieved.
Created201An 201 response indicates that the request has succeeded and a resource was created.
OK No Content204A 204 response indicates that the request has succeeded and there was nothing to return.
Bad Request400A Bad request response indicates that due to invalid properties provided, the server was unable to process the request.
Unauthorised401An unauthorised response suggests that missing valid authentication and therefore the request could not be processed.
Forbidden403A forbidden error suggests that the server understands the request however authorization is denied. Please contact our support team in order to gain access.
Not Found404A not found error suggests the resource does not exist.
Internal Server Error500An Internal server error suggests that there is a problem with the server. Please contact our support team.