Appearance
Creation of E-invoice Header and Line
Overview
The E-invoice API enables the creation of e_invoice header and line records. This documentation provides detailed information on the endpoints, request and response formats, and field descriptions.
Create
Endpoint:/api/execbo/submitEinvoiceToPortal/submit_einv_to_portal/{company}
This API will create a new invoice header and line. Also it checks for consolidation, and creates consilidation invoice when the input satisfies the consolidation conditions.The input will decide whether to create normal invoice or consolidation invoice.
- Method: POST
- Content-Type: application/json
- Authentication: Bearer
<token>
Request Body:
json
{
"adis": "<Invoice-Additional-Discount-Amount>", //float
"afee": "<Invoice-Additional-Fee-Amount>", //float
"anum": "<Authorisation-Number-for-Certified-Exporter>", //string
"bedt": "<Billing-Period-End-Date>", //date
"bref": "<Bill-Reference-Number>", //string
"bsdt": "<Billing-Period-Start-Date>", //date
"buy_adrs": "<Buyer-Address>", //string
"ccur": "<Invoice-Currency-Code>", //string
"comp": "<Supplier-Code>", //integer
"cvat": "<Tax-Type>", //string
"dataset": "<Dataset>", //string
"doct": "<Invoice-Type>", //string
"dshp": false, //boolean
"dtrm": "<Incoterms>", //string
"esta": "<LHDN-Status>", //string
"etim": "<LHDN-Validated-Date & Time>", //datetime
"fbil": "<Frequency-of-Billing>", //string
"frm1": "<Reference-No-of-Customs-form No 1, 9, etc>", //string
"frm2": "<Reference-Number-of-Customs-Form No.2>", //string
"ftrd": "<Free-Trade-Agreement-Information>", //string
"idoc": "<Invoice-Number>", //integer
"inv_bp": "<Buyer-Code>", //string
"line": "<Line>", //intrger
"line_cnt": "<Line-Count>", //integer
"lines": [
{
"amti": "<Line-Invoice-Amount>", //float
"amtt": "<Amount-Exempted-from-Tax>", //float
"ccde": "<Product-Tariff>", //string
"ccty": "<Country-of-Orgin>", //string
"ceno": "<Tax-Exemption-Certificate-Number>", //string
"clas": "<Classification>", //string
"comp": "<Supplier-Code>", //integer
"cuni": "<Unit-of-Measure>", //string
"cvat": "<Tax-Type>", //string
"disc": "<Discount-Rate>", //float
"dqua": "<Quantity>", //float
"feea": "<Fee / Charge-Amount>", //float
"feer": "<Fee / Charge-Rate>", //float
"idoc": "<Invoice-Number>", //integer
"item": "<Item-Code>", //string
"item_desc": "<Item-Description>", //string
"ldai": "<Discount-Amount>", //float
"line": "<Line>", //integer
"pric": "<Price>", //float
"pvat": "<Tax-Rate>", //float
"stot": "<Sub-Total>", //float
"tran": "<Finance-Type>", //string
"txai": "<Tax-Amount>", //float
"reference0": "<Reference-0>", //string
"reference1": "<Reference-1>", //string
"reference2": "<Reference-2>", //string
"reference3": "<Reference-3>", //string
"reference4": "<Reference-4>", //string
"reference5": "<Reference-5>", //string
"reference6": "<Reference-6>", //string
"reference7": "<Reference-7>", //string
"reference8": "<Reference-8>", //string
"reference9": "<Reference-9>", //string
}
],
"ochg": false, //boolean
"paym": "<Payment-Mode>", //string
"pref": "<PrePayment-Reference-Number>", //string
"pydt": "<PrePayment-Date>", //date
"pytm": "<PrePayment-Time>", //datetime
"ramt": "<Rounding-Amount>", //float
"rate": "<Currency-Exchange-Rate>", //float
"sadr": "<Shipper-Address-Code>", //string
"src_type": "<Sales-Type>", //string
"stbp": "<Shipper-Code>", //string
"styp": "<Sales-Category>", //string
"tdis": "<Total-Discount-Value>", //float
"term": "<Payment-Term>", //string
"tfee": "<Total-Fee / Charge-Amount>", //float
"tnat": "<Total-Net-Amount>", //float
"tote": "<Total-Excluding-Tax>", //float
"toti": "<Total-Including-Tax>", //float
"tott": "<Total-Tax-Amount>", //float
"tpat": "<Total-Payable-Amount>", //float
"tran": "<Finance-Type>", //string
"ttat": "<Total-Tax-Amount-Per-Tax-Type>", //float
"ttax": "<Total-Taxable-Amount-Per-Tax-Type>", //float
"reference0": "<Reference-0>", //string
"reference1": "<Reference-1>", //string
"reference2": "<Reference-2>", //string
"reference3": "<Reference-3>", //string
"reference4": "<Reference-4>", //string
"reference5": "<Reference-5>", //string
"reference6": "<Reference-6>", //string
"reference7": "<Reference-7>", //string
"reference8": "<Reference-8>", //string
"reference9": "<Reference-9>", //string
}Fields Details:
| Field Name | Description | Data Type | Length |
|---|---|---|---|
| adis | Invoice Additional Discount Amount | Float | 20 |
| afee | Invoice Additional Fee Amount | Float | 20 |
| anum | Authorisation Number for Certified Exporter | String | 300 |
| bedt | Billing Period End Date | Date | 10 |
| bref | Bill-Reference-Number | String | 150 |
| bsdt | Billing Period Start Date | Date | 10 |
| buy_adrs | Buyer Address | String | 9 |
| ccur | Invoice Currency Code | String | 3 |
| comp | Supplier Code | Integer | 4 |
| cvat | Tax Type | String | 9 |
| dataset | Dataset | String | 3 |
| doct | Invoice Type | String | 2 |
| dshp | Dropshipment | Boolean | 1 |
| dtrm | Incoterms | String | 3 |
| esta | LHDN Status | String | 10 |
| etim | LHDN Validated Date & Time | DateTime | 25 |
| fbil | Frequency of Billing | String | 50 |
| frm1 | Reference No of Customs form No 1, 9, etc | String | 12 |
| frm2 | Reference Number of Customs Form No.2 | String | 12 |
| ftrd | Free Trade Agreement(FTA) Information | String | 300 |
| idoc | Invoice Number | Integer | 8 |
| inv_bp | Buyer Code | String | 9 |
| line | Line | Integer | 4 |
| line_cnt | Line Count | Integer | 4 |
| amti | Line Invoice Amount | Float | 20 |
| amtt | Amount Exempted from Tax | FLoat | 20 |
| ccde | Product Tariff | String | 25 |
| ccty | Country of Orgin | String | 3 |
| ceno | Tax Exemption Certificate Number | String | 300 |
| clas | Classification | String | 3 |
| comp | Supplier Code | Integer | 4 |
| cuni | Unit of Measure | string | 3 |
| cvat | Tax Type | String | 3 |
| disc | Discount Rate | Float | 6 |
| dqua | Quantity | Float | 20 |
| feea | Fee / Charge Amount | Float | 20 |
| feer | Fee / Charge Rate | Float | 20 |
| idoc | Invoice Number | Integer | 8 |
| item | Item Code | String | 47 |
| item_desc | Item Description | String | 300 |
| ldai | Discount Amount | Float | 20 |
| line | Line | Integer | 4 |
| pric | Price | Float | 20 |
| pvat | Tax Rate | Float | 10 |
| stot | Sub Total | Float | 20 |
| tran | Finance Type | String | 3 |
| txai | Tax Amount | Float | 20 |
| reference0 | Reference 0 | String | 100 |
| reference1 | Reference 1 | String | 100 |
| reference2 | Reference 2 | String | 100 |
| reference3 | Reference 3 | String | 100 |
| reference4 | Reference 4 | String | 100 |
| reference5 | Reference 5 | String | 100 |
| reference6 | Reference 6 | String | 100 |
| reference7 | Reference 7 | String | 100 |
| reference8 | Reference 8 | String | 100 |
| reference9 | Reference 9 | String | 100 |
| ochg | Details of other charges | Boolean | 1 |
| paym | Payment Mode | String | 3 |
| pref | PrePayment Reference Number | String | 150 |
| pydt | PrePayment Date | Date | 10 |
| pytm | PrePayment Time | DateTime | 25 |
| ramt | Rounding Amount | Float | 20 |
| rate | Currency Exchange Rate | Float | 20 |
| sadr | Shipper Address Code | String | 9 |
| src_type | Sales Type | String | 10 |
| stbp | Shipper Code | String | 9 |
| styp | Sales Category | String | 10 |
| tdis | Total Discount Value | Float | 20 |
| term | Payment Term | String | 120 |
| tfee | Total Fee / Charge Amount | Float | 20 |
| tnat | Total Net Amount | Float | 20 |
| tote | Total Excluding Tax | Float | 20 |
| toti | Total Including Tax | Float | 20 |
| tott | Total Tax Amount | Float | 20 |
| tpat | Total Payable Amount | Float | 20 |
| tran | Finance Type | String | 3 |
| ttat | Total Tax Amount Per Tax Type | Float | 20 |
| ttax | Total Taxable Amount Per Tax Type | Float | 20 |
| reference0 | Reference 0 | String | 100 |
| reference1 | Reference 1 | String | 100 |
| reference2 | Reference 2 | String | 100 |
| reference3 | Reference 3 | String | 100 |
| reference4 | Reference 4 | String | 100 |
| reference5 | Reference 5 | String | 100 |
| reference6 | Reference 6 | String | 100 |
| reference7 | Reference 7 | String | 100 |
| reference8 | Reference 8 | String | 100 |
| reference9 | Reference 9 | String | 100 |
Response Body: (Status: 200)
json
{
"adis": "<Invoice-Additional-Discount-Amount>",
"afee": "<Invoice-Additional-Fee-Amount>",
"anum": "<Authorisation-Number-for-Certified-Exporter>",
"bedt": "<Billing-Period-End-Date>",
"bref": "<Bill-Reference-Number>",
"bsdt": "<Billing-Period-Start-Date>",
"buy_adrs": "<Buyer-Address>",
"ccur":"<Invoice-Currency-Code>",
"comp": "<Supplier-Code>",
"cvat": "<Tax-Type>",
"dataset": "<Dataset>",
"doct": "<Invoice-Type>",
"dshp": false,
"dtrm":"<Incoterms>",
"esta": "<LHDN-Status>",
"etim": "<LHDN-Validated-Date & Time>",
"fbil": "<Frequency-of-Billing>",
"frm1": "<Reference-No-of-Customs-form No 1, 9, etc>",
"frm2": "<Reference-Number-of-Customs-Form No.2>",
"ftrd": "<Free-Trade-Agreement-Information>",
"idoc": "<Invoice-Number>",
"inv_bp": "<Buyer-Code>",
"line": "<Line>",
"line_cnt": "<Line-Count>",
"lines": [
{
"amti": "<Line-Invoice-Amount>",
"amtt": "<Amount-Exempted-from-Tax>",
"ccde": "<Product-Tariff>",
"ccty": "<Country-of-Orgin>",
"ceno": "<Tax-Exemption-Certificate-Number>",
"clas": "<Classification>",
"comp": "<Supplier-Code>",
"cuni": "<Unit-of-Measure>",
"cvat": "<Tax-Type>",
"disc": "<Discount-Rate>",
"dqua": "<Quantity>",
"feea": "<Fee / Charge-Amount>",
"feer": "<Fee / Charge-Rate>",
"idoc": "<Invoice-Number>",
"item": "<Item-Code>",
"item_desc": "<Item-Description>",
"ldai": "<Discount-Amount>",
"line": "<Line>",
"pric": "<Price>",
"pvat": "<Tax-Rate>",
"stot": "<Sub-Total>",
"tran": "<Finance-Type>",
"txai": "<Tax-Amount>"
}
],
"ochg": false,
"paym": "<Payment-Mode>",
"pref": "<PrePayment-Reference-Number>",
"pydt": "<PrePayment-Date>",
"pytm": "<PrePayment-Time>",
"ramt": "<Rounding-Amount>",
"rate": "<Currency-Exchange-Rate>",
"sadr":"<Shipper-Address-Code>",
"src_type": "<Sales-Type>",
"stbp": "<Shipper-Code>",
"styp": "<Sales-Category>",
"tdis": "<Total-Discount-Value>",
"term": "<Payment-Term>",
"tfee": "<Total-Fee / Charge-Amount>",
"tnat": "<Total-Net-Amount>",
"tote": "<Total-Excluding-Tax>",
"toti": "<Total-Including-Tax>",
"tott": "<Total-Tax-Amount>",
"tpat": "<Total-Payable-Amount>",
"tran": "<Finance-Type>",
"ttat": "<Total-Tax-Amount-Per-Tax-Type>",
"ttax": "<Total-Taxable-Amount-Per-Tax-Type>"
},
"result": {
"Lines": [
{
"Message": {
"amti": "<Line-Invoice-Amount>",
"amtt": "<Amount-Exempted-from-Tax>",
"ccde": "<Product-Tariff>",
"ccty": "<Country-of-Orgin>",
"ceno": "<Tax-Exemption-Certificate-Number>",
"clas": "<Classification>",
"clas_grp": "<Classification-Group>",
"created_timestamp": "<Created-timestamp>",
"created_user": "<Created-user>",
"cuni": "<Unit-of-Measure>",
"cvat": "<Tax-Type>",
"disc": "<Discount-Rate>",
"disc_reason": "<Discount-reason>",
"dqua": "<Quantity>",
"e_inv_no": "<E-Invoice-Number>",
"einv_lines_id": "<E-Invoice-Line-Id>",
"err_msg": "<Invoice-Line-Error>",
"fee_reason": "<Fees-Reason>",
"feea": "<Fee / Charge-Amount>",
"feer": "<Fee / Charge-Rate>",
"item": "<Item-Code>",
"item_desc": "<Item-Description>",
"ldai": "<Discount-Amount>",
"line": "<Line>",
"lsta": "<Invoice-Line-Status>",
"modi_lsta": "<Line-Modification-Status>",
"pric": "<Price>",
"pvat": "<Tax-Rate>",
"reference0": "<Reference-0>",
"reference1": "<Reference-1>",
"reference2": "<Reference-2>",
"reference3": "<Reference-3>",
"reference4": "<Reference-4>",
"reference5": "<Reference-5>",
"reference6": "<Reference-6>",
"reference7": "<Reference-7>",
"reference8": "<Reference-8>",
"reference9": "<Reference-9>",
"stot": "<Sub-Total>",
"txai": "<Tax-Amount>",
"updated_timestamp": "<Updated-timestamp>",
"updated_user":"<Updated-user>"
},
"Success": true
}
],
"Message": {
"adis": "<Invoice-Additional-Discount-Amount>",
"adis_reason": "<Invoice-Additional-Discount-Amount-Reason>",
"afee": "<Invoice-Additional-Fee-Amount>",
"afee_reason": "<Invoice-Additional-Fee-Amount-Reason>",
"amnt_ex": "<Amount-Exemption-from-Tax>",
"anum": "<Authorisation-Number-for-Certified-Exporter>",
"bedt": "<Billing-Period-End-Date>",
"bref": "<Bill-Reference-Number>",
"bsdt": "<Billing-Period-Start-Date>",
"buy_adrs": "<Buyer-Address>",
"buy_adrs_line0": "<Buyer-Address-Line-0>",
"buy_adrs_line1": "<Buyer-Address-Line-1>",
"buy_adrs_line2": "<Buyer-Address-Line-2>",
"buy_city": "<Buyer-City>",
"buy_cont_num": "<Buyer-Contact-Number>",
"buy_country": "<Buyer-Country-Code>",
"buy_cste": "<Buyer-State-Code>",
"buy_email": "<Buyer-Mail>",
"buy_name": "<Buyer-name>",
"buy_postal_zone": "<Buyer-Postal-Code>",
"buy_reg_army": "<Buyer-Army>",
"buy_reg_brn": "<Buyer-Registration-Number>",
"buy_reg_nric": "<Buyer-NRIC>",
"buy_reg_passport": "<Buyer-Passport>",
"buy_sst_reg": "<Buyer-SST-Registration>",
"buy_tin": "<Buyer-TIN>",
"ccur": "<Invoice-Currency-Code>",
"comp": "<Supplier-Code>",
"created_timestamp": "<Created-timestamp>",
"created_user": "<Created-user>",
"cvat": "<Tax-Type>",
"dataset": "<Dataset>",
"det_tax": "<Detail-of-Tax-Exemption>",
"doc_uuid": "<LHDN-UUID>",
"doct": "<Invoice-Type>",
"dshp": false,
"dtrm": "<Incoterms>",
"e_inv_no": "<E-Invoice-Number>",
"e_invdt": "<E-Invoice-Date & Time>",
"einv_header_id": "<E-Invoice-header-Id>",
"einv_stat": "<E-Invoice-Status>",
"err_msg": "<Error-Message>",
"esta": "<LHDN-Status>",
"etim": "<LHDN-Validated-Date & Time>",
"fbil": "<Frequency-of-Billing>",
"frm1": "<Reference-No-of-Customs-form No 1, 9, etc>",
"frm2": "<Reference-Number-of-Customs-Form No.2>",
"ftrd": "<Free-Trade-Agreement-Information>",
"idoc": "<Invoice-Number>",
"inv_bp": "<Buyer-Code>",
"inv_pdf": "<PDF-Resource-ID>",
"line_cnt": "<Line-Count>",
"modi_stat": "<Header-Modification-Status>",
"ochg": false,
"ochg_amnt": "<Details-of-other-charges - Amount>",
"ochg_reason": "<Details-of-other-charges - Reason>",
"org_e_inv_no": "<Original-E-Invoice-Reference-Number>",
"pamt": "<PrePayment-Amount>",
"paym": "<Payment-Mode>",
"pref": "<PrePayment-Reference-Number>",
"pydt": "<PrePayment-Date>",
"pytm": "<PrePayment-Time>",
"ramt": "<Rounding-Amount>",
"rate": "<Currency-Exchange-Rate>",
"reference0": "<Reference-0>",
"reference1": "<Reference-1>",
"reference2": "<Reference-2>",
"reference3": "<Reference-3>",
"reference4": "<Reference-4>",
"reference5": "<Reference-5>",
"reference6": "<Reference-6>",
"reference7": "<Reference-7>",
"reference8": "<Reference-8>",
"reference9": "<Reference-9>",
"s_line_cnt": "<Source-Line-Count>",
"sctg": "<Sales-Category>",
"ship_adrs": "<Shipper-Address-Code>",
"ship_adrs_line0": "<Shipper-Address-Line-0>",
"ship_adrs_line1": "<Shipper-Address-Line-1>",
"ship_adrs_line2": "<Shipper-Address-Line-2>",
"ship_bp": "<Shipper-Code>",
"ship_city": "<Shipper-City>",
"ship_country": "<Shipper-Country-Code>",
"ship_cste": "<Shipper State Code>",
"ship_name": "<Shipper-Name>",
"ship_postal_zone": "<Shipper-Postal-Code>",
"ship_reg_army": "<Shipper-Army>",
"ship_reg_brn": "<Shipper-Registration-Number>",
"ship_reg_nric": "<Shipper-NRIC>",
"ship_reg_passport": "<Shipper-Passport>",
"ship_tin": "<Shipper-TIN>",
"src_type": "<Sales-Type>",
"submission_uid": "<LHDN-Submission-UID>",
"sup_adrs": "<Supplier-Address-Code>",
"sup_adrs_line0": "<Supplier-Address-Line-0>",
"sup_adrs_line1": "<Supplier-Address-Line-1>",
"sup_adrs_line2": "<Supplier-Address-Line-2>",
"sup_badsca": "<Supplier-Business-Activity>",
"sup_bank_acc": "<Supplier-Bank-Account-Number>",
"sup_city": "<Supplier-City>",
"sup_cont_num": "<Supplier-Contact-Number>",
"sup_country": "<Supplirer-Country>",
"sup_cste": "<Supplier-State-Code>",
"sup_email": "<Supplier-Mail>",
"sup_msic": "<Supplier-MSIC-Code>",
"sup_name": "<Supplier-Name>",
"sup_postal_zone": "<Supplier-Postal-Code>",
"sup_reg_army": "<Supplier-Army-Identification>",
"sup_reg_brn": "<Supplier-Registration-Number>",
"sup_reg_nric": "<Supplier-NRIC>",
"sup_reg_passport": "<Supplier-Passport-Number>",
"sup_sst_reg": "<Supplier-SST-Registration>",
"sup_tin": "<Supplier-TIN>",
"sup_ttx_no": "<Supplier-Tourism-Tax-Number>",
"tdis": "<Total-Discount-Value>",
"term": "<Payment-Term>",
"tfee": "<Total Fee / Charge Amount>",
"tnat": "<Total Net Amount>",
"tote": "<Total-Excluding-Tax>",
"toti": "<Total-Including-Tax>",
"tott": "<Total-Tax-Amount>",
"tpat": "<Total-Payable-Amount>",
"tran": "<Finance-Type>",
"ttat": "<Total-Tax-Amount-Per-Tax-Type>",
"ttax": "<Total-Taxable-Amount-Per-Tax-Type>",
"updated_timestamp": "Updated-timestamp",
"updated_user": "<Updated-user>"
},
"Success": true
}Fields Details:
| Field Name | Description | Data Type | Example |
|---|---|---|---|
| amti | Line Invoice Amount | Float | 1234.56 |
| amtt | Amount Exempted from Tax | Float | 0.00 |
| ccde | Product Tariff | String | "123456" |
| ccty | Country of Origin | String | "USA" |
| ceno | Tax Exemption Certificate Number | String | "CERT123456" |
| clas | Classification | String | "A" |
| clas_grp | Classification Group | String | "GRP" |
| created_timestamp | Created Timestamp | String | "2024-07-11T12:34:56Z" |
| created_user | Created User | String | "user1" |
| cuni | Unit of Measure | String | "KG" |
| cvat | Tax Type | String | "VAT" |
| disc | Discount Rate | Float | 10.5 |
| disc_reason | Discount Reason | String | "Seasonal Sale" |
| dqua | Quantity | Float | 100.0 |
| e_inv_no | E-Invoice Number | String | "INV123456" |
| einv_lines_id | E-Invoice Line Id | String | "LINE123456" |
| err_msg | Invoice Line Error | String | "Error in line 3" |
| fee_reason | Fees Reason | String | "Service Charge" |
| feea | Fee / Charge Amount | Float | 50.0 |
| feer | Fee / Charge Rate | Float | 5.0 |
| item | Item Code | String | "ITEM123" |
| item_desc | Item Description | String | "Item Description" |
| ldai | Discount Amount | Float | 20.0 |
| line | Line | Integer | 1 |
| lsta | Invoice Line Status | String | "Approved" |
| modi_lsta | Line Modification Status | String | "Modified" |
| pric | Price | Float | 100.0 |
| pvat | Tax Rate | Float | 7.5 |
| reference0 | Reference 0 | String | "REF0" |
| reference1 | Reference 1 | String | "REF1" |
| reference2 | Reference 2 | String | "REF2" |
| reference3 | Reference 3 | String | "REF3" |
| reference4 | Reference 4 | String | "REF4" |
| reference5 | Reference 5 | String | "REF5" |
| reference6 | Reference 6 | String | "REF6" |
| reference8 | Reference 8 | String | "REF8" |
| reference9 | Reference 9 | String | "REF9" |
| stot | Sub Total | Float | 5000.0 |
| txai | Tax Amount | Float | 375.0 |
| updated_timestamp | Updated Timestamp | String | "2024-07-11T12:34:56Z" |
| updated_user | Updated User | String | "user2" |
| adis | Invoice Additional Discount Amount | Float | 15.0 |
| adis_reason | Invoice Additional Discount Amount Reason | String | "Special Offer" |
| afee | Invoice Additional Fee Amount | Float | 30.0 |
| afee_reason | Invoice Additional Fee Amount Reason | String | "Extra Service" |
| amnt_ex | Amount Exemption from Tax | String | "EX123" |
| anum | Authorisation Number for Certified Exporter | String | "AUTH123" |
| bedt | Billing Period End Date | Date | "2024-12-31" |
| bref | Bill-Reference-Number | String | "BR123456" |
| bsdt | Billing Period Start Date | Date | "2024-01-01" |
| buy_adrs | Buyer Address | String | "123 Main St" |
| buy_adrs_line0 | Buyer Address Line 0 | String | "123 Main St" |
| buy_adrs_line1 | Buyer Address Line 1 | String | "Apt 4B" |
| buy_adrs_line2 | Buyer Address Line 2 | String | "Floor 5" |
| buy_city | Buyer City | String | "New York" |
| buy_cont_num | Buyer Contact Number | String | "1234567890" |
| buy_country | Buyer Country Code | String | "US" |
| buy_cste | Buyer State Code | String | "NY" |
| buy_email | Buyer Email | String | "buyer@example.com" |
| buy_name | Buyer Name | String | "John Doe" |
| buy_postal_zone | Buyer Postal Zone | String | "10001" |
| buy_reg_army | Buyer Army | String | "ARMY123" |
| buy_reg_brn | Buyer Registration Number | String | "BRN123456" |
| buy_reg_nric | Buyer NRIC | String | "NRIC123456" |
| buy_reg_passport | Buyer Passport | String | "P1234567" |
| buy_sst_reg | Buyer SST Registration | String | "SST123456" |
| buy_tin | Buyer TIN | String | "TIN123456" |
| ccur | Invoice Currency Code | String | "USD" |
| comp | Supplier Code | Integer | 101 |
| created_timestamp | Created Timestamp | String | "2024-07-11T12:34:56Z" |
| created_user | Created User | String | "user1" |
| cvat | Tax Type | String | "VAT" |
| dataset | Dataset | String | "DS1" |
| det_tax | Detail of Tax Exemption | String | "Detailed Info" |
| doc_uuid | LHDN UUID | String | "UUID123456" |
| doct | Invoice Type | String | "IT" |
| dshp | Dropshipment | Boolean | true |
| dtrm | Incoterms | String | "CIF" |
| e_inv_no | E-Invoice Number | String | "INV123456" |
| e_invdt | E-Invoice Date & Time | DateTime | "2024-07-11T12:34:56Z" |
| einv_header_id | E-Invoice Header Id | String | "HDR123456" |
| einv_stat | E-Invoice Status | String | "Approved" |
| err_msg | Error Message | String | "Error in line 3" |
| esta | LHDN Status | String | "Validated" |
| etim | LHDN Validated Date & Time | DateTime | "2024-07-11T15:30:00Z" |
| fbil | Frequency of Billing | String | "Monthly" |
| frm1 | Reference No of Customs Form No 1, 9, etc. | String | "CUST123456" |
| frm2 | Reference Number of Customs Form No. 2 | String | "CUST789012" |
| ftrd | Free Trade Agreement (FTA) Information | String | "FTA Details Here" |
| idoc | Invoice Number | Integer | 123456 |
| inv_bp | Buyer Code | String | "BUY123456" |
| inv_pdf | PDF Resource ID | String | "PDF123456" |
| line_cnt | Line Count | Integer | 5 |
| modi_stat | Header Modification Status | String | "Modified" |
| ochg | Details of Other Charges | Boolean | true |
| org_e_inv_no | Original E-Invoice Reference Number | String | "ORGINV123456" |
| pamt | PrePayment Amount | String | "500.00" |
| paym | Payment Mode | String | "Credit Card" |
| pref | PrePayment Reference Number | String | "PRE123456" |
| pydt | PrePayment Date | Date | "2024-07-10" |
| pytm | PrePayment Time | DateTime | "2024-07-10T14:00:00Z" |
| ramt | Rounding Amount | Float | 0.05 |
| rate | Currency Exchange Rate | Float | 1.25 |
| reference0 | Reference 0 | String | "REF0001" |
| reference1 | Reference 1 | String | "REF0002" |
| reference2 | Reference 2 | String | "REF0003" |
| reference3 | Reference 3 | String | "REF0004" |
| reference4 | Reference 4 | String | "REF0005" |
| reference5 | Reference 5 | String | "REF0006" |
| reference6 | Reference 6 | String | "REF0007" |
| reference7 | Reference 7 | String | "REF0008" |
| reference8 | Reference 8 | String | "REF0009" |
| reference9 | Reference 9 | String | "REF0010" |
| s_line_cnt | Source Line Count | Integer | 3 |
| sctg | Sales Category | String | "Category A" |
| ship_adrs | Shipper Address Code | String | "SHIP123456" |
| ship_adrs_line0 | Shipper Address Line 0 | String | "123 Main St" |
| ship_adrs_line1 | Shipper Address Line 1 | String | "Apt 4B" |
| ship_adrs_line2 | Shipper Address Line 2 | String | "Floor 5" |
| ship_bp | Shipper Code | String | "SHIPBP123" |
| ship_city | Shipper City | String | "New York" |
| ship_country | Shipper Country | String | "USA" |
| ship_cste | Shipper State Code | String | "NY" |
| ship_name | Shipper Name | String | "John Doe Shipping" |
| ship_postal_zone | Shipper Postal Code | String | "10001" |
| ship_reg_army | Shipper Army | String | "ARMY123" |
| ship_reg_brn | Shipper Registration Number | String | "BRN123456" |
| ship_reg_nric | Shipper NRIC | String | "NRIC123456" |
| ship_reg_passport | Shipper Passport | String | "P1234567" |
| ship_tin | Shipper TIN | String | "TIN123456" |
| src_type | Sales Type | String | "Type A" |
| submission_uid | LHDN Submission UID | String | "UID123456" |
| sup_adrs | Supplier Address Code | String | "SUP123456" |
| sup_adrs_line0 | Supplier Address Line 0 | String | "456 Main St" |
| sup_adrs_line1 | Supplier Address Line 1 | String | "Suite 10" |
| sup_adrs_line2 | Supplier Address Line 2 | String | "Building 2" |
| sup_badsca | Supplier Business Activity | String | "Business Activity A" |
| sup_bank_acc | Supplier Bank Account Number | String | "ACC123456" |
| sup_city | Supplier City | String | "Los Angeles" |
| sup_cont_num | Supplier Contact Number | String | "9876543210" |
| sup_country | Supplier Country | String | "USA" |
| sup_cste | Supplier State Code | String | "CA" |
| sup_email | Supplier Email | String | "supplier@example.com" |
| sup_msic | Supplier MSIC Code | String | "MSIC123456" |
| sup_name | Supplier Name | String | "ABC Supplies" |
| sup_postal_zone | Supplier Postal Code | String | "90001" |
| sup_reg_army | Supplier Army Identification | String | "SUPARMY123" |
| sup_reg_brn | Supplier Registration Number | String | "SUPBRN123456" |
| sup_reg_nric | Supplier NRIC | String | "SUPNRIC123456" |
| sup_reg_passport | Supplier Passport Number | String | "SUPP1234567" |
| sup_sst_reg | Supplier SST Registration | String | "SST123456" |
| sup_tin | Supplier TIN | String | "TIN123456" |
| sup_ttx_no | Supplier Tourism Tax Number | String | "TTX123456" |
| tdis | Total Discount Value | Float | 50.00 |
| term | Payment Term | String | "Net 30" |
| tfee | Total Fee / Charge Amount | Float | 15.00 |
| tnat | Total Net Amount | Float | 1000.00 |
| tote | Total Excluding Tax | Float | 950.00 |
| toti | Total Including Tax | Float | 1050.00 |
| tott | Total Tax Amount | Float | 100.00 |
| tpat | Total Payable Amount | Float | 1100.00 |
| tran | Finance Type | String | "C" |
| ttat | Total Tax Amount Per Tax Type | Float | 25.00 |
| ttax | Total Taxable Amount Per Tax Type | Float | 80.00 |
| updated_timestamp | Updated Timestamp | String | "2024-07-11T16:45:00Z" |
| updated_user | Updated User | String | "user123" |
When a particular sequence value of Supplier code,Invoice number,Sales type and Finance type is already present in the database:
json
{
"message": "Record already exists!",
"Success": false
}When an invalid data type is passed:
json
{
"Message": "ERROR: invalid input syntax for type [data type]",
"Success": false,
}When you pass the invalid company number other than the existing company:
json
{
"Message": "ERROR: duplicate key value violates unique constraint [Company code]",
"Success": false
}When you pass the invalid buyer code:
json
{
"error": "ReferenceError: buyer_address is not defined at insert_header"
}Response Body: (Status: 401 - Unauthorized)
When there is no token or invalid token passed:
json
{
"message": "Unauthorized!"
}