Difference between revisions of "SNIPER IMDG API"
Line 50: | Line 50: | ||
"op" : "ser", | "op" : "ser", | ||
"unno" : "0015" | "unno" : "0015" | ||
− | } | + | }<nowiki> |
− | <nowiki> | + |
Revision as of 18:16, 7 January 2019
Contents
Introduction
This wiki will provide instruction and examples on how to use SNIPER IMDG API.
What is International Maritime Dangerous Goods Code (IMDG)?
The International Maritime Dangerous Goods or IMDG Code was adopted in 1965 as per the SOLAS (Safety for Life at Sea) Convention of 1960 under the IMO. The IMDG Code was formed to prevent all types of pollutions at sea.
The IMDG code also ensures that the goods transported through seaways are packaged in such a way that they can be safely transported. The dangerous goods code is a uniform code. This means that the code is applicable to all cargo-carrying ships around the world.
SNIPER IMDG API
The HTTP application programming interface (HTTP API) is the easiest way to integrate with IMDG API using standardized REST interface.
Base URL
Submit all requests to the base URL. All the requests are submitted through the HTTP POST method. We strongly recommend you to submit all requests to SNIPER IMDG API over HTTPS so the traffic is encrypted and the privacy is ensured.
Base URL: http://sampledomain.com/api.php
Content-Type & Accept header
SNIPER IMDG API supports JSON Content-Types and Accept criteria that should be specified in the header. If the Content-Type is not specified you will receive a General error. Depending which Accept type is chosen in the deader for the request, the same one will be applied in the response.
Content-Type: application/json Accept header: application/json
Authorization
We support Bearer Authentication that involves security tokens called bearer tokens.
Example: Authorization header: Bearer VUNH0lBAc2N6MHJk
GET IMDG Data by UN No.
In a few simple steps, we will explain how to get IMDG Data by UN No. using SNIPER IMDG API.
Firstly, you'll need a valid SNIPER IMDG account. inside your account, you can find your token.
The request should like:
POST /api.php HTTP/1.1 Host: imdg.domain.com Content-Type: application/json Authorization: Bearer VUNH0lBAc2N6MHJk cache-control: no-cache { "op" : "ser", "unno" : "0015" }<nowiki>