Getting Started

The Legentic Mohawk Automation (API) is a direct connection to Legentic data. It allows you to create automated connections and queries based on your claims and fraud cases. 

Note:

The Legentic Mohawk Automation API is a standalone product. Because of its very nature, the implementation in the API can be slight, but distinctly different from the results you see in the Mohawk browser search. It’s important to check your results and built automation and integrations that work with the API.

 

First things first

In order to get started, you will need an API key. Contact the team at support@legentic.com and we can set this up for you. We will need to first fix some paperwork and a signed document that the proper use rules are adhered to. 

The API key you receive should look something like this:

<YOUR_API_KEY> = <company name>-xxxxxxxxxxxxxxxxxxxxxxxxxxxxx

 

Download the latest documentation

Now, you can download the latest documentation by running the following CURL command.

Europe

curl  -X GET "https://api.mohawkanalytics.com/classifiedads/<COUNTRY>/v1/swagger" 
      -H  "API-Key: <YOUR_API_KEY>" > gb-swagger.yml

North America (MX, US, CA)

curl  -X GET "https://api-us.mohawkanalytics.com/classifiedads/<COUNTRY>/v1/swagger" 
      -H  "API-Key: <YOUR_API_KEY>" > mx-swagger.yml

Where you replace <COUNTRY> with your specifically relevant two-letter country code (i.e., no, mx, nl, etc.) and where you replace <YOUR_API_KEY> with your personal API key. Finally, you are free to choose a name for the file, which we’ve called "gb-swagger.yml" and "mx-swagger.yml" here. 

 

Visualize the documentation

Use a tool of choice to visualize the documentation file.

For the examples below, we will use the United Kingdom API: using "gb" prefix.

We suggest importing the documentation file you just downloaded in the Swagger Editor, a free online tool, which can be found here: Swagger Editor.

You are now ready to start using the API. Which will look something like this: 

 

 

Your first query: the "health" path

Checking the /health path in Python:

import requests
url = 'https://api.mohawkanalytics.com/classifiedads/gb/v1/health'

headers = {'API-Key':'<YOUR_API_KEY>'}
resp = requests.get(url, headers=headers)

print(resp.status_code)

As a CURL command:

curl  -X 'GET' \
      'https://api.mohawkanalytics.com/classifiedads/gb/v1/health' \
      -H 'accept: */*' \
      -H 'API-Key: <YOUR_API_KEY>'

 

Your second query: the "free text" path

Making a /free-text search in our database in Python:

import requests
url = 'https://api.mohawkanalytics.com/classifiedads/gb/v1/free_text'

headers = {'API-Key': '<YOUR_API_KEY>'}

data = {'free_text':'gucci bag', "limit": 20, "offset": 0, "select": None}
resp = requests.post(url, data=data, headers=headers)

print(resp.json())

And as a CURL command:

curl  -X 'POST' \
      'https://api.mohawkanalytics.com/classifiedads/no/v1/free_text' \
      -H 'accept: application/json' \
      -H 'API-Key: <YOUR_API_KEY>' \
      -H 'Content-Type: application/x-www-form-urlencoded' \
      -d 'free_text=gucci&limit=20&offset=0&select=&date_start=&date_end='

You are now ready to continue your journey into automating your internal processes using our Mohawk Automation (API).

 

Other remarks

We provide API keys for customers and testing. We limit our API keys by volume. Standard we give a 100,000 limit per month - which is circa 10,000 calls with a standard limit of 10 responses per request (configurable through the API).

We limit our API with a validity end date for testing customers' purposes, after which that API key is no longer useable. 

You can find more information in the related articles.

We suggest you start with reading how to integrate in an automated fashion here: https://help.legentic.com/help/claims-automation