Getting started with SINAY APIs

In this small guide, we will allow you to retrieve your first ETA prediction from our ETA API. This guide consists in two main parts : using our Developers Platform to subscribe to our forever free plan, then making your first call.
[ no_toc ]
getting started with sinay apis for developers

Table of content

Subscribe to our forever free plan

Go to our Developers Platform

Go to our Pricing Plan page

On the Left Menu or with the button on the Top-right corner of the page. In our pricing plan page, Click “get started” in the FREE plan box.

https://developers.sinay.ai/pricinghttps://developers.sinay.ai/home

You will be requested to Log In

  • If you already have an account on the Developer Platform, proceed to next step. 
  • If you don’t have an account, Click “Sign Up” and fill in all the fields. 
    Warning : please use only your professional email and respect the password security constraints.

Congrats ! Your account has been created and your free plan activated ! Your new key will directly display on the welcome screen.

Copy your key and proceed to the next step. 
If you ever happen to loose that key, you will be able to retrieve it from “My API Keys” in the left menu.  

Retrieve an ETA prediction with Postman

Depending on your favorite API testing mean, we will provide different methods. Select the one you are most familiar with. 

You will find our APIs documentation in our public Postman workspace here : https://www.postman.com/sinayapi/workspace/sinay/overview

On the Collection Menu, select the 3 dots after “ETAC API”

Scroll down and select "Export"

This will download the collection to your computer.

Go to your own workspace and Select Import

On the top right corner of the left menu.

Import the file you just downloaded

You might have to click several times to complete all Postman import steps.

Sinay APIs authentification methods

Is made via an API Key passed in the header of the request. We recommend filling that API key value only once : either with a collection authorization setup or with an environment variable.

Environment variable (preferred method)

On the left menu, select “Environment”, then “Globals”.

Create a new global variable named “API_KEY” and fill the initial value and current value columns with the previously created API key (see previous section).

Don’t forget to save with CTRL+S or the save button 

Collection Authorization settings

Select the collection “ETAC API” and the tab “Authorization”, then paste your API key in the “Value” Field (replace the {{API_KEY}} value).

Don’t forget to save with CTRL+S or the save button

Select the Body tab in “POST ETA computation” request and click “Send”

Congrats ! You just made your first API call in Postman !

Retrieve an ETA prediction with Swagger

Depending on your favorite API testing mean, we will provide different methods. Select the one you are most familiar with. 

Open our swagger documentation

https://api.sinay.ai/doc/index.html?urls.primaryName=Etac%20API%20v1

The link can also be found on the Developers Platform.

Scroll down and click the Green button on the right “Authorize”

Paste the API key your have previously generated, and click “Authorize” again, then Close

Scroll down and click “Try it out” on the right

Then click “Execute”

Very large blue button under the body field.

Scroll down, the response will appear below the cURL command

Congrats ! You just made your first API call in Swagger !

Next steps

Send requests with your own parameters

You can now edit the parameters in the body to request for a vessel and port of your choice. Refer to the documentation for more information on the request parameters.  
If you use Postman, can find the documentation directly there by hitting the documentation icon on the top-right corner of the screen.

Else, you can find our documentation in the developer platform, for example here for the ETA API https://developers.sinay.ai/docs/etac  

Send requests to other Sinay APIs

Sinay FREE plan gives you access to four APIs : you can apply similar methods to test the three others

Find their documentation here : https://developers.sinay.ai/home

And the Postman collections here : https://www.postman.com/sinayapi/workspace/sinay/overview  

Get more information on ETA