Skip to main content

Making a test call to the API

In this section:

The Integration API offers special endpoints intended to test connectivity.

UAT test endpoint

<https://integrations.uat.controlant.com/api/echo>

LIVE test endpoint

<https://integrations.controlant.com/api/echo>

These endpoints will validate your API Key and can also produce all known response formats and error conditions the Integration API can return.

When everything is setup correctly you can make a test request:

Example request

curl -X POST \
     -H "Authorization: APIKey MYAPIKEY" \
     -H "Content-Type: application/json" \
     -H "x-api-version: 1" \
     -d '{"reference": "Test-Echo-Request-01"}' \
     https://integrations.uat.controlant.com/api/echo

Example response

< HTTP/1.1 200 OK
< Date: Tue, 18 Feb 2024 13:26:31 GMT
< Content-Type: application/json; charset=utf-8
< Server: Kestrel
< Content-Length: 144
< x-correlation-id: fa60ac03-c54a-4fee-9675-3c09e948083c
{
  "reference": "Test-Echo-Request-01",
  "success": true,
  "message": "Hi there :). The time is now: 2024-02-18T13:26:32.1678719+00:00"
}

Example error request

curl -X POST \
     -H "Authorization: APIKey MYAPIKEY" \
     -H "Content-Type: application/json" \
     -H "x-api-version: 1" \
     -d '{"reference": "500 Error"}' \
     https://integrations.uat.controlant.com/api/echo

Example error response

< HTTP/1.1 500 Internal Server Error
< Date: Wed, 28 Feb 2024 16:23:54 GMT
< Content-Type: application/json
< Transfer-Encoding: chunked
< Connection: keep-alive
< Server: Kestrel
< x-correlation-id: 0c9f600d-c1ec-460a-9299-c5d089a22762
{
    "errorMessage": "Internal Error in Integrations API",
    "status": 500,
    "success": false,
    "responseTime": 0
}