API access

Table of contents

Introduction

Ongoing WMS exposes several Application Programming Interfaces (APIs) which allow third parties to integrate directly with Ongoing WMS. We have a developer page which contains technical information about our APIs.

There are four APIs:

  1. Goods owner REST API
  2. Automation REST API
  3. Goods owner SOAP API (legacy)
  4. Automation SOAP API (legacy)

If you want to connect an AI tool (such as ChatGPT, Claude or GitHub Copilot) to Ongoing WMS, instead of building your own integration, see Connecting an AI tool to Ongoing WMS, which uses the Model Context Protocol (MCP).

The goods owner APIs are used when a specific goods owner wants to integrate with Ongoing WMS, for instance if the goods owner wants to integrate their web shop with Ongoing WMS. An API user for the goods owner API only has access to a single goods owner.

The automation APIs are used when the external system needs very fine-grained control over Ongoing WMS, for instance if you want to integrate a storage lift with Ongoing WMS. Crucially, an API user for the automation API has access to all goods owners.

Ongoing WMS supports both authentication via OAuth (a client ID and client secret) and Basic (a username and password) for the REST APIs (goods owner and automation). We recommend OAuth since it is more secure and lets you limit access to only the scopes (resources) that are actually needed, but it is up to the integrator to determine which authentication method they want to use. See Authentication for REST APIs for more information. Below we describe how to proceed depending on which authentication method you choose.

Setting up access to the goods owner API

Step 1: Allowing API access to the goods owner

Go to Administration ⇒ API for goods owners:

Settings menu with circled button

There you will see a list of all your goods owners. You can also see which goods owners have been granted access to the API:

List of goods owners where some already have API access.

Let's say you want to grant access to Demo Goods Owner. Click on the icon next to its name, and then press Allow API access:

How to allow API access

Step 2: Creating API users

When API access has been allowed for a goods owner, you will now be able to create API users. This is also done in Administration ⇒ API for goods owners.

Note that each API user can only belong to one goods owner.

After you have selected a goods owner in Administration ⇒ API for goods owners, click Add new goods owner API user. In the dialog that opens, there is a drop-down at the top for the authentication type. Choose OAuth or Basic depending on which you want to use.

OAuth (client ID and client secret)

Select the scopes that the client should have access to. Scopes control which resources can be read and/or written, so you should only select the scopes the integration actually needs. In the example below the API user is granted access to read all resources but only to write (create, update and delete) articles and orders.

List of scopes to choose from, controlling read and write access to resources

Then fill in an email address and select the type of integration, i.e., the name of the external system. If you can't find the correct system in the list, select Other and type in the name directly below. Click Create when you are done.

Getting an access token (OAuth)

After saving, an email is sent to the address on the user containing the client ID, the list of selected scopes, and a one-time link to a page where the client secret is shown. The client secret is only shown once, so make sure to store it in a safe place (for example a password manager or secrets vault) before leaving that page. The client ID is not a secret and can always be found again on the API user, so only the client secret needs to be stored securely.

To call the REST API, you first need to exchange the client ID and client secret for an access token. See authenticating with OAuth on the developer page for details on how to do this. The access token is valid for one hour; after that you need to request a new one using the same client ID and client secret.

Rotating client credentials (OAuth)

If you need to replace a client's credentials, for instance because the client secret may have been compromised, you can press the button to send a new one-time link. This generates a new client ID and client secret and sends them to the same email address.

Button for sending a new one-time link with a new client ID and client secret

Note: doing this immediately makes the current client ID and client secret unusable, so make sure to update any integrations with the new credentials once you receive them.

Basic (username and password)

Fill in a username. Note that it must start with "WSI" (which stands for "Web Service Integration"). Then fill in an email address and select the type of integration, i.e., the name of the external system. If you can't find the correct system in the list, select Other and type in the name directly below (in the example, we have filled in "Your System"). Then click Create.

Form filled out with API user info and integration info

By default, an email is sent to the address you filled in with a link where the user can choose their own password. If you'd rather set the password yourself, uncheck Send an email to the user and allow them to choose their own password and fill in a password directly instead.

If all went well, you will see the new user in the list:

List of all current API users

Access to invoice data and other special scopes

Some resources and actions in the API are restricted by default, both when using OAuth and Basic. To access them, you need to either select the corresponding scope (OAuth) or check the corresponding checkbox (Basic) on the API user.

Invoice data: by default, an API user for the goods owner APIs cannot access any invoice data. That means that any call to GetInvoicesByQuery or to the /invoiceCharges endpoint will be blocked. To allow access, for OAuth users select the goodsowner:invoices:read scope; for Basic users check Allow this user to see invoicing information in the API on the API user instead.

Automatic printouts: on some API calls you can specify that a printout should be triggered automatically using the Ongoing printer service. To allow this, for check the Allow this user to trigger automatic printouts via the API checkbox.

Goods owner returns: to use the Goods Owner Returns REST API, which allows returning goods to the warehouse, check the Allow this user to access the Goods Owner Returns REST API checkbox.

Automation API

To create an API user for the Automation API, go to Administration ⇒ API for automation. Then click Create new user. Just like for the goods owner API, choose the authentication type in the drop-down at the top of the dialog: OAuth or Basic, see Step 2 above for details on both options and how to get an access token for OAuth. Then enter the following information

Then click Create.