Port API
Updated over a week ago

All APIs require authentication, which is delegated to Auth0. Before any of the following external APIs can be accessed, the requestor needs to authenticate using a client id and client secret. The returned bearer token is then added to the request headers.

Usage

To use this API, an account is required to obtain an Access Token by authenticating. All requests must be formatted as JSON and contain the following headers:

Header Name

Header Value

Optional

Comments

Authorization

Bearer <access-token>

false

Content-Type

application/json

false

Each response will have the following structure, where data field will contain the actual data payload.

Property Name

Property Type

Can be Empty

Success

bool

false

ErrorMessage

String?

true

Data

Payload Data Type

true

Example response including data

{
"success": true,
"errorMessage": null,
"data": {
"uniqueCode": "RS_00000003"
}
}

Response Codes

Http Response Code

Description

200

Successful

400

Bad Request – Missing/invalid input parameters

401

Unauthenticated – the authentication access token is missing or expired

403

Unauthorized – the user is logged in successfully, however does not have permission to access the requested resource.

500

Unexpected error – please contact support along with any returned error messages

Get Port

Get a port identified by its RS Port Code.

Request Uri: [HttpGet] /api/Port/v1/{portCode}

Request: empty

Response:

Property Name

Property Type

Can Be Empty

Comments

UniqueCode

string

false

Name

string

false

UNPortCode

string

false

PortCode

bool

false

CountryUniqueCode

String?

true

CountryName

String?

true

IsCountrySanctioned

Bool

false

Get All Ports

Get a list of all Ports.

Request Uri: [HttpGet] /api/Port/v1

Request: empty

Response:

Property Name

Property Type

Can Be Empty

Comments

Ports

Port[]

true

Ports:

Property Name

Property Type

Can Be Empty

Comments

UniqueCode

string

false

Name

string

false

UNPortCode

string

false

PortCode

bool

false

CountryUniqueCode

String?

true

CountryName

String?

true

IsCountrySanctioned

Bool

false

Did this answer your question?