ULIP COPT Integration Requirement

Download as pdf or txt
Download as pdf or txt
You are on page 1of 15

ULIP Integration Requirement Document

ULIP Integration Requirement Document

Version No.: 1.0

Date: 22/07/2021

Project Name: ULIP

This document contains proprietary information of NLDSL. Unauthorized access, copying and replication are
prohibited. This document must not be copied in whole or part by any means, without the written authorization
of NLDSL, Noida, India.
ULIP Integration Requirement Document

Revision History

Version Date Author Reviewer Significant Changes

1.0 22/07/2021 Anamol Kumar Baseline Version


1.0 30/07/2021 Hasan Mhad Khan API response

Doc Ref. No: ULIP Integration Doc Version No: 1.0 Page 2 of 15
ULIP Integration Requirement Document

Table of Contents
Introduction ................................................................................................................................................. 4
1.1 Purpose .................................................................................................................................... 4
The Overall Description .............................................................................................................................. 4
1.2 Data Integration between COPT System and ULIP application .............................................. 4
1.3 COPT/01 .................................................................................................................................. 4
1.3.1 Technical Approach ..................................................................................................... 5
1.4 COPT/02 .................................................................................................................................. 7
1.4.1 Technical Approach ..................................................................................................... 8
1.5 COPT/03 ................................................................................................................................ 10
1.5.1 Technical Approach ................................................................................................... 11
1.6 Data Transmission & Authentication Mechanism .................................................................. 14

Doc Ref. No: ULIP Integration Doc Version No: 1.0 Page 3 of 15
ULIP Integration Requirement Document

Introduction

1.1 Purpose

The purpose of this document is to define and provide details for accessing API for Vessel
Import export information using VCN number, be number, Shipping bill number from ULIP
system.
This document details the following points:

1. Data Integration between COPT and ULIP web service: Identification of operational
points where data integration between COPT and ULIP web service will be needed.

2. Technical Approach for performing Data Integration

The Overall Description

User will share the information such as VCN number, BE number and shipping bill
number based on data send by user ULIP system will call respective COPT API for
accessing information.

Following are the point for accessing vessel information: -

1. This API will share vessel information and import and export data based on information
provided by user.

2. ULIP will expose API for getting data from COPT API.

3. COPT/01 API will take VCN Number from user and get data from COPT API.
4. COPT/02 API will take BE number from user and get import data from COPT API.
5. COPT/03 API will take shipping bill number from user and get export data from COPT
API.

1.2 Data Integration between COPT System and ULIP application


User will share information to ULIP system based on data shared ULIP will provide data
to user.

1.3 COPT/01

Doc Ref. No: ULIP Integration Doc Version No: 1.0 Page 4 of 15
ULIP Integration Requirement Document

This API will take VCN number and connect with COPT API to get data.

S. Field Name Field Description Format Require Length


No. d/Not –
Require
d
1 vcnNo This field will have the value ^[a-zA-Z0- Required 14
of vessel number 9]{2,14}$

1.3.1 Technical Approach


1. All the data will be shared through rest web services.
2. ULIP system will provide vcn number for which detail is required.
3. We have to send secret key with header.
4. COPT API will share details of vcn number information which exist in COPT system in
encrypted text (in JSON “ResponseBody” key). COPT integration will then decrypt the
encrypted text to get JSON.
5. COPT Integration will add JSON in response key in response body.
6. ULIP system will provide the data in JSON Object format in response body.

Example:

VCN Number INCOK120100101 is shared by ULIP system, then COPT-integration will


make a request to COPT API.

Request:

The request must be of the following format, where vcn number is passed within the URL
parameters in JSON format.

https://www.ulip.dpiit.gov.in/ulip/v1.0.0/COPT/01

Curl URL

curl -X POST \
https://www.ulip.dpiit.gov.in/ulip/v1.0.0/COPT/01 \
-H 'accept: application/json' \
-H 'authorization: Bearer
eyJhbGciOiJIUzUxMiJ9.eyJzdWIiOiJ0ZXN0MSIsImlhdCI6MTYyNzY0Mz
M3OCwiYXBwcyI6ImRhdGFwdXNoIn0.WxGr7t4xCbVVJuSNmrC8zZxzE8r5z
8f66QGov2j411oaW8bIP8SZNSaLcoLReKY2F_MFDXfOWAf_NiYMmdLP8g'
\
-H 'cache-control: no-cache' \
-H 'content-type: application/json' \
-H 'postman-token: f2c362d5-24fd-33b2-f483-

Doc Ref. No: ULIP Integration Doc Version No: 1.0 Page 5 of 15
ULIP Integration Requirement Document

c72acb19fae0' \
-d '{"vcnNo": "INCOK120100101"}'

For obtaining secret key, refer Section 1.6

Response

To acknowledge the above request, ULIP will send the below response -

a) In case of invalid format

1. Invalid vcn number

{
"response": null,
"error": "true",
"code": "400",
"message": "Data format failed OR wrong value
entered at: vcnNo. Format should follow ^[a-zA-Z0-
9]{2,14}$"
}

2. In case of vcn number not exist in COPT system

{
"response": [
{
"responseStatus": "FAILURE"
}
],
"error": "false",
"code": "200",
"message": "Success"
}
a) In case vcn number exist

{
"response": [

Doc Ref. No: ULIP Integration Doc Version No: 1.0 Page 6 of 15
ULIP Integration Requirement Document

{
"response": {
"Vessel_Name": "PANTARISTE",
"Application_Type": "1",
"Ata": "28102020 03:10",
"Atd": "30102020 04:10",
"Last_Port_of_Call_Name": "SINGAPORE",
"Eta": "28102020 06:10",
"Etd": "29102020 11:10",
"Vessel_Type": "1531",
"Vcn_No": "INCOK120100101",
"Imo_Number": "9233739",
"Port_Of_Arrival_Name": "RIO DE JANEIRO",
"Shipping_line_Code": "1001860",
"Shipping_agent_Code": null
},
"responseStatus": "SUCCESS"
}
],
"error": "false",
"code": "200",
"message": "Success"
}

Status Code 200: vessel data response


Status Code 400: Bad request (Invalid json syntax, invalid json key)
Status Code 401 or 403: Unauthenticated or Unauthorized
Status Code 500: Some internal server error occurred
Status Code 502: Server is not responding.

1.4 COPT/02

This API will take be number and connect with COPT API to get data.

S. Field Name Field Description Format Require Length


No. d/Not –
Require
d
1 beNo This field will have the value [0-9]{7} Required 7
of be number

Doc Ref. No: ULIP Integration Doc Version No: 1.0 Page 7 of 15
ULIP Integration Requirement Document

1.4.1 Technical Approach


7. All the data will be shared through rest web services.
8. ULIP system will provide be number for which detail is required.
9. We have to send secret key with header.
10. COPT API will share details of be number information which exist in COPT system in
encrypted text (in JSON “ResponseBody” key). COPT integration will then decrypt the
encrypted text to get JSON.
11. COPT Integration will add JSON in response key in response body.
12. ULIP system will provide the data in JSON Object format in response body.

Example:

be Number 6603661 is shared by ULIP system, then COPT-integration will make a


request to COPT API.

Request:

The request must be of the following format, where be number is passed within the URL
parameters in JSON format.

https://www.ulip.dpiit.gov.in/ulip/v1.0.0/COPT/02

Curl URL

curl -X POST \
https://www.ulip.dpiit.gov.in/ulip/v1.0.0/COPT/02 \
-H 'accept: application/json' \
-H 'authorization: Bearer
eyJhbGciOiJIUzUxMiJ9.eyJzdWIiOiJ0ZXN0MSIsImlhdCI6MTYyNzY0Mz
M3OCwiYXBwcyI6ImRhdGFwdXNoIn0.WxGr7t4xCbVVJuSNmrC8zZxzE8r5z
8f66QGov2j411oaW8bIP8SZNSaLcoLReKY2F_MFDXfOWAf_NiYMmdLP8g'
\
-H 'cache-control: no-cache' \
-H 'content-type: application/json' \
-H 'postman-token: 0309a238-48f4-4de0-63ae-
6fbbccb5a360' \
-d '{"beNo": "6603661"}'

For obtaining secret key, refer Section 1.6

Response

To acknowledge the above request, ULIP will send the below response -

Doc Ref. No: ULIP Integration Doc Version No: 1.0 Page 8 of 15
ULIP Integration Requirement Document

a) In case of invalid format

1. Invalid be number

{
"response": null,
"error": "true",
"code": "400",
"message": "Data format failed OR wrong value entered
at: beNo. Format should follow [0-9]{7}"
}

2. In case of be number not exist in COPT system

{
"response": [
{
"response": "\"Please contact administrator\"",
"responseStatus": "ERROR"
}
],
"error": "false",
"code": "200",
"message": "Success"
}

b) In case be number exist

{
"response": [
{
"response": {
"bl_no": "FAR6650028-1-0",
"no_of_packages_qty": "84",
"goods_description": "MATERIALS UNDER
SUPPLEMENTS 1935612230737 OF 16.08.2019 AND 1935612231087
OF 21.08.2019 TO GENERAL CONTRACT NO.P135612230930 OF
23.06.2011",
"out_of_charge_no": "2036532674",
"cargo_type": "MMPS",

Doc Ref. No: ULIP Integration Doc Version No: 1.0 Page 9 of 15
ULIP Integration Requirement Document

"importer_name": "1002101",
"delivery_order_no": "DO2000005",
"be_date": null,
"mode_of_transport": "R",
"out_of_charge_date": "03022020",
"unit_of_measurement": "MT",
"type_of_packages": "PIECES",
"nature_of_cargo": "P",
"surveyor_code": null,
"vehicle_info": [],
"do_date": "03022020",
"marks_no": "NIL",
"line_no": "1",
"importer_address": null,
"country_of_origin": "RULED-ST PETERSBURG
(EX LENINGRAD)",
"be_no": "6603661",
"sub_line_no": "0",
"igm_date": "22012020",
"survey_date": null,
"igm_no": "2244915",
"cha_code": "1002101"
},
"responseStatus": "SUCCESS"
}
],
"error": "false",
"code": "200",
"message": "Success"
}

Status Code 200: cargo data response


Status Code 400: Bad request (Invalid json syntax, invalid json key)
Status Code 401 or 403: Unauthenticated or Unauthorized
Status Code 500: Some internal server error occurred
Status Code 502: Server is not responding.

1.5 COPT/03

This API will take shipping bill number and connect with COPT API to get data.

Doc Ref. No: ULIP Integration Doc Version No: 1.0 Page 10 of 15
ULIP Integration Requirement Document

S. Field Name Field Description Format Require Length


No. d/Not –
Require
d
1 Shipping_bill This field will have the value [0-9]{7} Required 7
_no of shipping bill number

1.5.1 Technical Approach


13. All the data will be shared through rest web services.
14. ULIP system will provide shipping bill number for which detail is required.
15. We have to send secret key with header.
16. COPT Integration will add JSON in response key in response body.
17. COPT API will share details of be number information which exist in COPT system in
encrypted text (in JSON “ResponseBody” key). COPT integration will then decrypt the
encrypted text to get JSON.
18. ULIP system will provide the data in JSON Object format in response body.

Example:

Shipping bill Number 5323322 is shared by ULIP system, then COPT-integration will
make a request to COPT API.

Request:

The request must be of the following format, where shipping bill number is passed within the
URL parameters in JSON format.

https://www.ulip.dpiit.gov.in/ulip/v1.0.0/COPT/03

Curl URL

curl -X POST \
https://www.ulip.dpiit.gov.in/ulip/v1.0.0/COPT/03 \
-H 'accept: application/json' \
-H 'authorization: Bearer
eyJhbGciOiJIUzUxMiJ9.eyJzdWIiOiJ0ZXN0MSIsImlhdCI6MTYyNzY0Mz
M3OCwiYXBwcyI6ImRhdGFwdXNoIn0.WxGr7t4xCbVVJuSNmrC8zZxzE8r5z
8f66QGov2j411oaW8bIP8SZNSaLcoLReKY2F_MFDXfOWAf_NiYMmdLP8g'
\
-H 'cache-control: no-cache' \
-H 'content-type: application/json' \
-H 'postman-token: 3ada4541-6463-4c8d-743a-
d7bf26cda9c1' \
-d '{"shippingBillNo": "5323322"}'

Doc Ref. No: ULIP Integration Doc Version No: 1.0 Page 11 of 15
ULIP Integration Requirement Document

For obtaining secret key, refer Section 1.6

Response

To acknowledge the above request, ULIP will send the below response -

a) In case of invalid format

1. Invalid shipping bill number

{
"response": null,
"error": "true",
"code": "400",
"message": "Data format failed OR wrong value
entered at: shippingBillNo. Format should follow [0-
9]{7}"
}

2. In case of shipping bill number not exist in COPT system

{
"response": [
{
"response": "\"Please contact administrator\"",
"responseStatus": "ERROR"
}
],
"error": "false",
"code": "200",
"message": "Success"
}

b) In case shipping bill number exist

{
"response": [
{

Doc Ref. No: ULIP Integration Doc Version No: 1.0 Page 12 of 15
ULIP Integration Requirement Document

"response": {
"egm_date": "21092020",
"egm_no": "EA202000135",
"exporter_name": "3001170-SARASWATHY METAL
INDUSTRIES",
"port_where_sb_filed": null,
"port_of_loading": null,
"cargo_type": "MMPS-METALS & METAL
PRODUCTS",
"rotation_date": "09092020",
"allow_for_shipment_date": "21092020",
"leo_date": "21092020",
"rotation_no": "203448",
"shipping_bill_date": "21092020",
"port_of_origin": null,
"shipping_bill_no": "5323322",
"vcn_no": "INCOK120090071",
"nature_of_cargo": "P",
"port_of_destination_code": null,
"vehicle_info": [
{
"truck_entry_permit_no": "GP2000131",
"truck_exit_time": "22092020",
"vehicle_number": "KL43C6141",
"truck_entry_time": "22092020"
}
]
},
"responseStatus": "SUCCESS"
}
],
"error": "false",
"code": "200",
"message": "Success"
}

Status Code 200: cargo data response


Status Code 400: Bad request (Invalid json syntax, invalid json key)
Status Code 401 or 403: Unauthenticated or Unauthorized
Status Code 500: Some internal server error occurred
Status Code 502: Server is not responding.

Doc Ref. No: ULIP Integration Doc Version No: 1.0 Page 13 of 15
ULIP Integration Requirement Document

1.6 Data Transmission & Authentication Mechanism


All data exchange would be done over secure HTTP (HTTPS). Request from ULIP's system would
be made in MPT system through a data exchange URL that has following form:

https://www.ulip.dpiit.gov.in/ulip/v1.0.0/COPT/01

Body:
{"vcnNo": "1234567890122"}

Access to above data exchange URL would be authorized by use of a security mechanism
implemented by the ULIP system. It is as follows:

• First time access: It would require a username and password [which would be shared with
user beforehand]. Once user hit with valid user id and password, ULIP system will return a
basic authorization token to user, using that token user will communicate with ULIP system
until token will not get expired.

Brief summary of HTTP Basic Authentication is as follows:

First time when User will hit ULIP secured API through username and password for access token
as follow-

curl -X POST
‘https://www.ulip.dpiit.gov.in/ulip/v1.0.0/user/login’
-H 'accept: application/json'
-H 'content-type: application/json'
-data ‘{"username":"xxxxxx","password":" XXxxx@12345"} ‘

Authorization:
Bearer
eyJhbGciOiJIUzUxMiJ9.eyJzdWIiOiJpbnRlcmNvbnQiLCJpYXQiOjE1ODU1NjYyMzcsImFwcHMi
OiJkYXRhcHVzaCJ9.jb-23DbkWpz-3ptsuuZofzH-
ce7jd0xR5WlkFfBPO_Dzjop01dSx9OamqsjsgUAryLUPtUDiMX07oHG4L2AfFQ

Upon successful authentication, the user would be logged into the ULIP system and get an access
token. Though this token user can communicate with ULIP. This token has expiry time which
represent user session. The session time out for the same to be fixed hour, generally it is for 30
minutes. If there is no request coming from user for 30 minutes, then session (token) will be
expired and user need to re authenticate.

Using The above token, user can request ULIP system for vehicle details as follow -

curl -X POST \
https://www.ulip.dpiit.gov.in/ulip/v1.0.0/COPT/01 \
-H 'accept: application/json' \

Doc Ref. No: ULIP Integration Doc Version No: 1.0 Page 14 of 15
ULIP Integration Requirement Document

-H 'authorization: Bearer
eyJhbGciOiJIUzUxMiJ9.eyJzdWIiOiJ0ZXN0MSIsImlhdCI6MTYyNTIzMDQyNywiYXBwcyI6ImRh
dGFwdXNoIn0.rhumwWJ8BWeeHe9CYmIV1UKyJk-kLHA_ovX5Zi2OwxEv-td-
KpxnfbKDI_8FZsOoggqx3Al-Du1y2qMoUD7uzA' \
-H 'cache-control: no-cache' \
-H 'content-type: application/json' \
-H 'postman-token: 8e8a19a4-ea1e-6373-f616-e2e4af9a1338' \
-d '{"vcnNo": "1234567890122"}'

Doc Ref. No: ULIP Integration Doc Version No: 1.0 Page 15 of 15

You might also like