Skip to content

Getting Started with the Customer API

Using curl

If you are familiar with curl and Web APIs in general, all you need to do is to use your authentication token (API token) to simply execute commands to our API server. You, or someone in your organization, should have received the authentication token when subscribing to our service. Otherwise, please contact us via our support channels.

You can create a temporary authentication token to test the services. This can be done with the below call:

$ curl -X POST https://accelerator.shimmercat.com/presentation-api/v1/trial/ -H 'Content-type: application/json' -d '{"username": "<your_username>"}'

Once you have the authentication token you can for instance list your domains:

curl -X GET -H "Authorization: Token <your_authentication_token>"  https://accelerator.shimmercat.com/presentation-api/v1/domain/ | jq

If you are not going with curl, please check the below section Not using curl for more details. Please make sure that you have your authentication token (API token).

Not using curl

If you are not familiar with curl and would rather go for a more visual way to achieve the same result, any visual REST client can help you with the task. As an example you can use Insomnia, which is a free REST client. We have step-by-step instructions for using Insomnia in this section.

  • Step 1: Get the REST client. Go to the download page, download the client for your operating system, and install it. The free version is all you need.

  • Step 2: Create a new request. With Insomnia open, press Ctrl+N to create a new request. In the text-box that appears, enter a name for your new request, and accept. The new request is active now and you can edit it.

Insomnia image Figure 1: Before pasting curl

Now just paste the curl text you want to run. In the example below we use a command to clean cache. Insomnia will parse and split the curl command line in digestible bits, as shown in the next figure:

Insomnia image Figure 2: After pasting curl

  • Step 3: Edit the request bits. You will need to substitute the parts specified in the sub-section “Fields to replace” above. You can enter the domain by editing the field marked with the red filled circle in Figure 2. To enter your API token, click the “Header” tab (green filled circle), and look for the “Authorization” header. Here, it’s important to let the “Token” word remain in its place. For editing the URL pattern in the body of the request, just click and edit the yellow text close to where the filled purple circle is.

  • Step 4: Finally, send the request. To send the request, just press Ctrl+Enter, or use the “Send” button close to the URL in Insomnia. This should put the request in its way.