0% found this document useful (0 votes)
22 views12 pages

Specification - Job & Invoice API (Ver 1.3) (1) (1) 1

Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
22 views12 pages

Specification - Job & Invoice API (Ver 1.3) (1) (1) 1

Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 12

Innosys Pte Ltd Specification Ver No.: 1.

Software Requirements
Specification

Job and Invoice API

Table of Contents
1. Introduction ..............................................................................................................................2
1.1 Context ........................................................................................................................................ 2
1.2 Project Scope ............................................................................................................................... 2
2. Requirement – POST Job API................................................................................................3
2.1 Context ........................................................................................................................................ 3
2.2 API URL ...................................................................................................................................... 3
2.3 API Data Fields ........................................................................................................................... 3
2.4 API Error Handling ..................................................................................................................... 4
2.5 API Sample .................................................................................................................................. 4
3. Requirement – DELETE Job API ..........................................................................................6
3.1 Context ........................................................................................................................................ 6
3.2 API URL ...................................................................................................................................... 6
3.3 API Data Fields ........................................................................................................................... 6
3.4 API Error Handling ..................................................................................................................... 6
3.5 API Sample .................................................................................................................................. 7
4. Requirement – POST Invoice API .........................................................................................7
4.1 Context ........................................................................................................................................ 7
4.2 API URL ...................................................................................................................................... 7
4.3 API Data Fields ........................................................................................................................... 7
4.4 API Error Handling ..................................................................................................................... 8
4.5 API Sample .................................................................................................................................. 9
5. Requirement – DELETE Invoice API..................................................................................11
5.1 Context ...................................................................................................................................... 11
5.2 API URL .................................................................................................................................... 11
5.3 API Data Fields ......................................................................................................................... 11
5.4 API Error Handling ................................................................................................................... 11
5.5 API Sample ................................................................................................................................ 11

1|Page
Innosys Pte Ltd Specification Ver No.: 1.3
Revision History
Author Date Reason For Changes Version
Kelvin Tan 3 Nov 22 First Version 1.0
Kelvin Tan 8 Dec 22 Add API Sample 1.1
Kelvin Tan 4 Jan 23 Correct to lowercase on sample 1.2
Kelvin Tan 13 May 24 Add samples to each API 1.3

1. Introduction

1.1 Context

Eagletainer is using MRI system for operation and Freight Master for finance. Eagletainer will input the
shipment and invoice in MRI, and would like both system to be integrated so that MRI can pass the shipment
(job) info and invoice info into Freight Master.

1.2 Project Scope


Following are the summary project scopes:
1) Create a Post Job API to save MRI job(s) into Freight Master’s Job Master
2) Create a DELETE Job API for MRI to instruct to delete previously transmitted job(s).
3) Create a Post Invoice API to save MRI invoices(s) into Freight Master’s Invoicing module.
4) Create a DELETE Invoice API for MRI to instruct to delete previously transmitted invoice(s).

2|Page
Innosys Pte Ltd Specification Ver No.: 1.3

2. Requirement – POST Job API

2.1 Context
The POST Job API is to submit the job info in order to create a new job, or update a previously submitted job
into Freight Master system. API will check the job_number to determine if the job is created before.

2.2 API URL


For UAT,
https://apiuat.freightmaster.com.sg/radserver/FM/Post_Job

For Production,
https://api.freightmaster.com.sg/radserver/FM/Post_Job

2.3 API Data Fields


Following is the request data fields (in JSON format):
Field Name Format Length M/O/C Valid Values Description
client_id String 50 M Client ID issued by Innosys
client_secret String 50 M Client Secret issued by Innosys
version String 15 M 8.1 Fixed as 8.1
job_info Object M Allow 1 or more job_info per API call
job_number String 26 M
Type of this job:
AE – Air Export
AI – Air Import
AE, AI, SE, SI, SE – Sea Export
job_type String 2 M
TR, WH, MS SI – Sea Import
TR – Transport
WH – Warehouse
MS – Miscellaneous/Other
master_number String 26 O Master AWB or OBL number
house_number String 26 O House AWB or HBL number
customer_code String 12 M
customer_name String 50 M
shipper_code String 12 O
shipper_name String 50 O
consignee_code String 12 O
consignee_name String 50 O
Either Airport Code for Air Freight or
origin_code String 6 O
UNLOCODE Sea Port code for Sea Freight
Either Airport Code for Air Freight or
destination_code String 6 O
UNLOCODE Sea Port code for Sea Freight
airline_vessel String 30 O Airline or Vessel name
flight_voyage_number String 16 O Flight or Voyage number
shipping_line_code String 50 O Shipping/carrier code or ID
Estimate Departure Date in yyyymmdd
etd Date O
format
eta Date O Estimate Arrival Date in yyyymmdd format
pcs Integer O No. of Piece or Quantity
gross_weight Decimal 14,4 O
charge_weight Decimal 14,4 O
CBM Decimal 14,6 O
3|Page
Innosys Pte Ltd Specification Ver No.: 1.3
cargo_content_1 String 50 O Cargo content line 1
cargo_content_2 String 50 O Cargo content line 2
cargo_content_3 String 50 O Cargo content line 3
cargo_content_4 String 50 O Cargo content line 4
cargo_content_5 String 50 O Cargo content line 5
remarks_1 String 50 O Remarks line 1
remarks_2 String 50 O Remarks line 2
remarks_3 String 50 O Remarks line 3
remarks_4 String 50 O Remarks line 4
remarks_5 String 50 Remarks line 5
container Object O Sub-object of job_info, allow 0 or more.
container_number String 11 M
20’, 40’, 40HC,
size String 4 O Container size
45’, OTH

Following is the response data fields:


Valid
Field Name Format Length M/O/C Description
Values
Show if the request was successfully
is_request_success Boolean M true, false
processed or not
Allow 0 or more error_info object,
error_info Object O
show only when there is error
field String 50 M Show
Error message returned in cases of
message String 500 M
rejected request

2.4 API Error Handling


When API response return a “false” value for is_request_success, the response will return the error_info
object(s) notify the error encountered. Following is the list of possible diagnostic messages returned:
Field Message
client Invalid Client ID or Client Secret
version Value provided for version is invalid
job_info There is no job_info object, there must be at least 1 job_info
object
job_number Value cannot be null, empty, or white space
job_number Job create/update not allowed, job_number already exist in
system and it is not submitted by you.
job_type Value cannot be null, empty, or white space
job_type Value provided is not in the allowed value list
customer_code Value cannot be null, empty, or white space
customer_name Value cannot be null, empty, or white space
ETD Date must be in YYYYMMDD format
ETA Date must be in YYYYMMDD format
container_number Container Number cannot be null, empty, or white space when a
container object if provided
[Fieldname]1 Value provided exceeded the allowed length
1
[Fieldname] Value provided does not match the data type
1
[Fieldname] will show the field where value has exceeded the allowed length or is in an incorrect data type.

2.5 API Sample


Post_Job API Sample:

4|Page
Innosys Pte Ltd Specification Ver No.: 1.3
{
"header":{
"client_id": "MRI00001234",
"client_secret": "lAi9B8XalK-D1kbJhakilkA",
"version": "8.1"
},
"job_info":{
"job_number": "SE2212-0001",
"job_type": "SE",
"master_number": "MBL99010001",
"house_number": "HBL99010002",
"customer_code": "ABC001",
"customer_name": "ABC Company Limited",
"shipper_code": "ABC001",
"shipper_name": "ABC Company Limited",
"consignee_code": "DEF001",
"consignee_name": "DEF Company Limited",
"origin_code": "SGSIN",
"destination_code": "USNYC",
"etd": "20221115",
"eta": "20221207",
"gross_weight": "129.3",
"cargo_content_1": "SPARE PARTS",
"container":[
{
"container_number": "OOCL12345678",
"size": "20’"
}
]
}
}

Sample Success Call:


{
"response":{
"is_request_success": "true",
}
}

Sample Call with Error:


{
"response":{
"is_request_success": "false",
"error_info":[
{
"field": "job_number",
"message": "Value cannot be null, empty, or white space"
},
{
"field": "shipper_name",

5|Page
Innosys Pte Ltd Specification Ver No.: 1.3
"message": "Value provided exceeded the allowed length"
}]
}
}

3. Requirement – DELETE Job API

3.1 Context
The DELETE Job API is to instruct to delete a previously transmitted job.

3.2 API URL


For UAT,
https://apiuat.freightmaster.com.sg/radserver/FM/Delete_Job

For Production,
https://api.freightmaster.com.sg/radserver/FM/Delete_Job

3.3 API Data Fields


Following is the request data fields (in JSON format):
Field Name Format Length M/O/C Valid Values Description
client_id String 50 M Client ID issued by Innosys
client_secret String 50 M Client Secret issued by Innosys
version String 15 M 8.1 Fixed as 8.1
job_info Object M Allow 1 or more job_info per API call
job_number String 26 M

Following is the response data fields:


Valid
Field Name Format Length M/O/C Description
Values
Show if the request was successfully
is_request_success Boolean M true, false
processed or not
Allow 0 or more error_info object,
error_info Object O
show only when there is error
field String 50 M Show
Error message returned in cases of
message String 500 M
rejected request

3.4 API Error Handling


When API response return a “false” value for is_request_success, the response will return the error_info
object(s) notify the error encountered. Following is the list of possible diagnostic messages returned:
Field Message
client Invalid Client ID or Client Secret
version Value provided for version is invalid
job_number Value cannot be null, empty, or white space
job_number3 Value does not exist in the system
3
If system detected the given job_number exists in the system but it is not originated from you, system will not delete the job and
return this message.
6|Page
Innosys Pte Ltd Specification Ver No.: 1.3
3.5 API Sample
Delete_Job API sample:
{
"header":{
"client_id": "MRI00001234",
"client_secret": "lAi9B8XalK-D1kbJhakilkA",
"version": "8.1"
},
"job_info":[
{
"job_number": "SE2212-0001"
},
{
"job_number": "SE2212-0002"
}
]
}

4. Requirement – POST Invoice API

4.1 Context
The POST Job API is to submit the invoice info in order to create a new invoice, or update a previously
submitted invoice into Freight Master system. API will check the invoice_number to determine if the job is
created before.

4.2 API URL


For UAT,
https://apiuat.freightmaster.com.sg/radserver/FM/Post_Invoice

For Production,
https://api.freightmaster.com.sg/radserver/FM/Post_Invoice

4.3 API Data Fields


Following is the request data fields (in JSON format):
Field Name Format Length M/O/C Valid Values Description
client_id String 50 M Client ID issued by Innosys
client_secret String 50 M Client Secret issued by Innosys
version String 15 M 8.1 Fixed as 8.1
invoice_info Object M Allow 1 or more job_info per API call
invoice_number String 20 M
IN – Invoice / Tax Invoice
invoice_type String 2 M IN, DN, CN DN – Debit Note
CN – Credit Note
For CN only, to indicate this CN is applying
apply_to_number String 20 O
to which invoice_number
job_number String 26 M
customer_code String 12 M

7|Page
Innosys Pte Ltd Specification Ver No.: 1.3
customer_name String 50 M
address1 String 50 O Address line 1
address2 String 50 O Address line 2
address3 String 50 O Address line 3
address4 String 50 O Address line 4
currency_code String 3 M 3 letter currency code
exchange_rate Decimal 24,8 M
invoice_date Date M Date in yyyymmdd format
credit_terms Integer M 0 for COD or Cash terms
Total amount in the mentioned
total_amount Decimal 24,2 O
currency_code
Sub-object of invoice_info, allow 1 or
items Object M
more.
item_code String 16 M Charge item code or ID
description String 100 M Charge description
Singapore’s GST Code
SR – Standard Rated
SR, ZR, OS,
tax_code2 String 4 M ZR – Zero Rated
ES33
OS – Out of Scope
ES33 - Exempted
tax_percentage Decimal 5,2 M Tax percentage, indicate 0 if none.
currency_code String 3 M 3 letter currency code of this charge item
exchange_rate Decimal 24,8 M Exchange rate of this charge item
quantity Decimal 24,8 M
unit_rate Decimal 24,8 M Unit price base on item’s currency
Amount of this item base on invoice’s
item_amount Decimal 24,8 M
currency_code
Tax amount of this item base on invoice’s
tax_amount Decimal 24,8 M
currency_code
2
This is Singapore’s Tax Code. Different company or country may have different Tax Code, please communicate with connecting
party to get their Tax Code.

Following is the response data fields:


Valid
Field Name Format Length M/O/C Description
Values
Show if the request was successfully
is_request_success Boolean M true, false
processed or not
Allow 0 or more error_info object,
error_info Object O
show only when there is error
field String 50 M Show
Error message returned in cases of
message String 500 M
rejected request

4.4 API Error Handling


When API response return a “false” value for is_request_success, the response will return the error_info
object(s) notify the error encountered. Following is the list of possible diagnostic messages returned:
Field Message
client Invalid Client ID or Client Secret
version Value provided for version is invalid
invoice_info There is no job_info object, there must be at least 1 job_info
object
invoice_info Invoice create/update not allowed, invoice_number already exist
in system and it is not submitted by you.
invoice_number Value cannot be null, empty, or white space
invoice_type Value cannot be null, empty, or white space
8|Page
Innosys Pte Ltd Specification Ver No.: 1.3
invoice_type Value provided is not in the allowed value list
apply_to_number Value provided didn’t match with any invoice_number you
previously submitted
job_number Value cannot be null, empty, or white space
job_number Value provided didn’t match with any job_number in the system
customer_code Value cannot be null, empty, or white space
customer_name Value cannot be null, empty, or white space
currency_code Value cannot be null, empty, or white space
currency_code Value provided is not in the allowed value list
exchange_rate Value cannot be null, empty, or white space
invoice_date Date must be in YYYYMMDD format
credit_terms Value cannot be null, empty, or white space
item_code Value cannot be null, empty, or white space
description Value cannot be null, empty, or white space
tax_code Value cannot be null, empty, or white space
tax_code Value provided is not in the allowed value list
tax_percentage Value cannot be null, empty, or white space
currency_code Value cannot be null, empty, or white space
currency_code Value provided is not in the allowed value list
exchange_rate Value cannot be null, empty, or white space
quantity Value cannot be null, empty, or white space
unit_rate Value cannot be null, empty, or white space
item_amount Value cannot be null, empty, or white space
tax_amount Value cannot be null, empty, or white space
[Fieldname]1 Value provided exceeded the allowed length
[Fieldname] 1 Value provided does not match the data type
1
[Fieldname] will show the field where value has exceeded the allowed length or is in an incorrect data type.

4.5 API Sample


Post_Invoice API sample:
{
"header":{
"client_id": "MRI00001234",
"client_secret": "lAi9B8XalK-D1kbJhakilkA",
"version": "8.1"
},
"invoice_info":[
{
"invoice_number": "INVSE2212-0001",
"invoice_type": "IN",
"apply_to_number": "INVSE2212-0001",
"job_number": "SESIN1902000101",
"customer_code": "ABC001",
"customer_name": "AURIC PACIFIC MARKETING PTE LTD",
"address1": "Add1",
"address2": "Add2",
"address3": "Add3",
"address4": "Add4",
"currency_code": "SGD",
"exchange_rate": "1.00000",
"invoice_date": "20230306",
"credit_terms": "30",

9|Page
Innosys Pte Ltd Specification Ver No.: 1.3
"total_amount": "150.00",
"items":[
{
"item_code": "SE001",
"description": "FREIGHT CHARGES",
"tax_code": "SR",
"tax_percentage": "8",
"currency_code": "SGD",
"exchange_rate": "1.00000",
"quantity": "1",
"unit_rate": "100",
"item_amount": "100",
"tax_amount": "8"
},
{
"item_code": "SE002",
"description": "FORKLIFT CHARGE",
"tax_code": "SR",
"tax_percentage": "8",
"currency_code": "SGD",
"exchange_rate": "1.00000",
"quantity": "1",
"unit_rate": "50",
"item_amount": "50",
"tax_amount": "4"
}]
}
]
}

Sample Success Call:


{
"response":{
"is_request_success": "true",
}
}

Sample Call with Error:


{
"response":{
"is_request_success": "false",
"error_info":[
{
"field": "invoice_number",
"message": "Value cannot be null, empty, or white space"
},
{
"field": "customer_name",
"message": "Value provided exceeded the allowed length"
}]
}
}

10 | P a g e
Innosys Pte Ltd Specification Ver No.: 1.3

5. Requirement – DELETE Invoice API

5.1 Context
The DELETE Invoice API is to instruct to delete a previously transmitted invoice.

5.2 API URL


For UAT,
https://apiuat.freightmaster.com.sg/radserver/FM/Delete_Invoice

For Production,
https://api.freightmaster.com.sg/radserver/FM/Delete_Invoice

5.3 API Data Fields


Following is the request data fields (in JSON format):
Field Name Format Length M/O/C Valid Values Description
client_id String 50 M Client ID issued by Innosys
client_secret String 50 M Client Secret issued by Innosys
version String 15 M 8.1 Fixed as 8.1
invoice_info Object M Allow 1 or more job_info per API call
invoice_number String 26 M

Following is the response data fields:


Valid
Field Name Format Length M/O/C Description
Values
Show if the request was successfully
is_request_success Boolean M true, false
processed or not
Allow 0 or more error_info object,
error_info Object O
show only when there is error
field String 50 M Show
Error message returned in cases of
message String 500 M
rejected request

5.4 API Error Handling


When API response return a “false” value for is_request_success, the response will return the error_info
object(s) notify the error encountered. Following is the list of possible diagnostic messages returned:
Field Message
client Invalid Client ID or Client Secret
version Value provided for version is invalid
invoice_number Value cannot be null, empty, or white space
4
invoice_number Value does not exist in the system
4
If system detected the given invoice_number exist in system but it is not originated from you, system will not delete the invoice and
return this message.

5.5 API Sample


Delete_Invoice API sample:

11 | P a g e
Innosys Pte Ltd Specification Ver No.: 1.3
{
"header":{
"client_id": "MRI00001234",
"client_secret": "lAi9B8XalK-D1kbJhakilkA",
"version": "8.1"
},
"invoice_info":[
{
"invoice_number": "INVSE2212-0001"
}
]
}

12 | P a g e

You might also like

pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy