Integration into Your Site


This section walks through the steps to integrate the Shipium API using the Javascript Local API. The integration can be also be implemented on the server side by directly calling the API. For details on calling the Shipium API directly, see the API documentation.

Embedding and configuration

The API can be configured globally on your site or exclusively on the pages you wish to integrate with the Shipium service. These will typically be the product detail and order confirmation pages.

In summary, you will do the following:

  1. Include a script tag for the client script within the block of your website.
  2. Add a configuration block to initialize the client with your API Key.

Both of these are shown in the example below:

  <script crossorigin src=""></script>
      apiKey: 'API_KEY_PROVIDED_BY_SHIPIUM',                      // Required
      authUrl: '',      // Optional, defaults to staging
      shiptimeUrl: '<<api_url>>',  // Optional, defaults to staging