100% found this document useful (1 vote)
1K views50 pages

Production Comparisons

The document outlines the technical specifications for the Digital Invoicing API (DI API) from Pakistan Revenue Automation (PRAL), detailing its purpose, data sharing modes, and web methods for integration with the Federal Board of Revenue (FBR). It includes information on API security, sample JSON data formats for both sandbox and production environments, and error codes related to sales and purchases. The document is intended for internal use and contains confidential information that should not be shared without PRAL's approval.

Uploaded by

saqib
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
100% found this document useful (1 vote)
1K views50 pages

Production Comparisons

The document outlines the technical specifications for the Digital Invoicing API (DI API) from Pakistan Revenue Automation (PRAL), detailing its purpose, data sharing modes, and web methods for integration with the Federal Board of Revenue (FBR). It includes information on API security, sample JSON data formats for both sandbox and production environments, and error codes related to sales and purchases. The document is intended for internal use and contains confidential information that should not be shared without PRAL's approval.

Uploaded by

saqib
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/ 50

Technical Specification for DI API

Confidential Information:
The information provided in this document is intended solely for the DI API from PRAL. The contents of this
document may not be reproduced or divulged outside the intended organizations without the express
written permission of PRAL.

PAKISTAN REVENUE AUTOMATION (PVT.) LTD


PRAL – Head office, Software Technology Park-III, Plot No. 156, Service Road (North), Industrial Area, I-9/3,
Islamabad. Pakistan
DI API Technical Specification

Document Information
Category Information
Document Technical Specifications Document
Project-Module Title Technical Specification for DI API
Version 1.10
Author Muhammad Umair Siddique
Status Issued
Reviewer(s) Mehboob Ur Rehman, Sohail Anjum
Review Date 7-April-2025
Updated By Muhammad Umair Siddique
Updated Date 24-May-2025
Approver
Issue Date
Distribution SD Wing
Document Category Internal External
Privacy Level Public PRAL Confidential Customer Confidential
Disclaimer This document contains confidential information. Do not distribute this
document without prior approval from PRAL.

Review History
Sr. # Reviewer R/V Date Remarks
Mehboob Ur Rehman,
1. 7-Apr-25 Initial Document
Sohail Anjum
2. Naseem Ahmed Razzaq 09-May-25 Sample Json & Error Codes Updated
3. Naseem Ahmed Razzaq 22-May-25 Sample Json & Error Codes Updated
Sample Jason for Sandbox &
4. Naseem Ahmed Razzaq 01-Jun-25 Production Updated
ST ATL API production (Added)
Updates:
Sales Error Codes
Purchase Error Codes
5. Arslan Nazir 03-Jun-25
Scenarios for Sandbox Testing
Applicable Scenarios based on
Business Activity
6. Adeel Abbasi 10-Jun-25 Fields description Updated
7. Naseem Ahmed Razzaq 18-Jun-25 SRO URL Update

2
Document Version :1.0 PRAL © 2025 – All rights reserved Page 2 of 50
DI API Technical Specification

Contents
1. Purpose ................................................................................................................................................. 4
2. Data Sharing Mode ............................................................................................................................... 5
3. Web API................................................................................................................................................. 5
3.1. Web API Security........................................................................................................................... 5
3.2. Web Methods Details ................................................................................................................... 5
4. Digital Invoicing API............................................................................................................................... 6
4.1. Web method for Digital Invoicing - Post ....................................................................................... 6
4.2. Web method for Digital Invoicing - Validate............................................................................... 14
5. Digital Invoicing Reference APIs.......................................................................................................... 21
5.1. Web method for Digital Invoicing – Province Code .................................................................... 22
5.2. Web method for Digital Invoicing – Document Type ID ............................................................. 23
5.3. Web method for Digital Invoicing – Item Code .......................................................................... 24
5.4. Web method for Digital Invoicing – SRO Item ID ........................................................................ 25
5.5. Web method for Digital Invoicing – Transaction Type ID ........................................................... 26
5.6. Web method for Digital Invoicing – ID of the UOM .................................................................... 27
5.7. Web method for Digital Invoicing – SRO Schedule ..................................................................... 28
5.8. Web method for Digital Invoicing – ID of The Rate .................................................................... 29
5.9. Web method for Digital Invoicing – HS Code with UOM ............................................................ 30
5.10. Web method for Digital Invoicing – SRO Item ID .................................................................... 31
5.11 Web method for Digital Invoicing – STATL ................................................................................. 32
5.12 Web method for Digital Invoicing – STATL ................................................................................. 33
6. Digital Invoicing Logo & QR Code Printing .......................................................................................... 34
7. Sales Error Codes ................................................................................................................................ 35
8. Purchase Error Codes .......................................................................................................................... 40
9. Scenarios for Sandbox Testing ............................................................................................................ 45
10. Applicable Scenarios based on Business Activity ............................................................................ 46

3
Document Version :1.0 PRAL © 2025 – All rights reserved Page 3 of 50
DI API Technical Specification

1. Purpose
The purpose of this document is to facilitate Supply Chain Operators to understand the
methods for Digital Invoice Data sharing with FBR.

Figure 1 - Invoice Focalization Process

ERP or equivalent software will be integrated with FBR as per the following steps:
• Each ERP or equivalent software will register in the FBR system from which it wants to
upload the invoice data.
• Taxpayers will integrate their ERP/System with FBR Digital Invoicing System as per
provided details in the Section (3) Integration Steps with FBR.

4
Document Version :1.0 PRAL © 2025 – All rights reserved Page 4 of 50
DI API Technical Specification

2. Data Sharing Mode


Digital Invoicing sharing mode will be real-time using Web API shared by FBR. The Data
Format of this service will be as per object models referred below in this document.

3. Web API
This Web API resides on PRAL ESP (Enterprise Service Platform) and is exposed with
methods to facilitate Digital Invoicing sharing between Supply Chain Operators and FBR.

3.1. Web API Security


This Web API is secured and will require a security token to be passed in the header of
each request. This security token will be issued by PRAL and given to Supply Chain
Operators along with all URLs to access the web API. This security token will have a validity
of 5 Years, and a new token will be requested by the Supply Chain Operators upon expiry,
and a new security token will automatically be issued to access these services.

Figure 1 below illustrates how to pass this token in the header of each request using
Postman.

Figure 2 Security Key added with the word "Bearer" will be passed on in Value of parameter
Authorization

3.2. Web Methods Details


Web APIs expose different web methods for data sharing. The details of these web
methods are as follows.
• Digital Invoicing API
• Digital Invoicing Reference APIs

5
Document Version :1.0 PRAL © 2025 – All rights reserved Page 5 of 50
DI API Technical Specification

4. Digital Invoicing API


• Web method for Digital Invoicing - Post
• Web method for Digital Invoicing - Validate
Note: DI data acquisition API URL's are mentioned in this document will remain the same for
Sandbox and Production routing will be based on the security token being used.

4.1. Web method for Digital Invoicing - Post


The first web method (postinvoicedata) will be used on a real time basis. The API
consumer will have to send object model mentioned below. This method will take
following parameters and will return JSON response as shown in example below.
URL: https://gw.fbr.gov.pk/di_data/v1/di/postinvoicedata

4.1.1. Sample JSON Data (For Sandbox Only):


Input Parameters of the first web method (postinvoicedata) will be as follows:
Note: Invoice Header will only be added once in the object model.

{
"invoiceType": "Sale Invoice",

"invoiceDate": "2025-04-21",

"sellerNTNCNIC": "0786909",
"sellerBusinessName": "Company 8",

"sellerProvince": "Sindh",

"sellerAddress": "Karachi",

"buyerNTNCNIC": "1000000000000",

"buyerBusinessName": "FERTILIZER MANUFAC IRS NEW",

"buyerProvince": "Sindh",

"buyerAddress": "Karachi",

"buyerRegistrationType": "Registered",

"invoiceRefNo": "",

"scenarioId": "SN001",

6
Document Version :1.0 PRAL © 2025 – All rights reserved Page 6 of 50
DI API Technical Specification

"items": [
{

"hsCode": "0101.2100",

"productDescription": "product Description",

"rate": "18%",

"uoM": "Numbers, pieces, units",

"quantity": 1,

"totalValues": 0,

"valueSalesExcludingST":1000,

"fixedNotifiedValueOrRetailPrice":0,

"salesTaxApplicable": 18,

"salesTaxWithheldAtSource":0,

"extraTax": "",

"furtherTax": 120,

"sroScheduleNo": "",

"fedPayable": 0,

"discount": 0,

"saleType": "Goods at standard rate (default)",

"sroItemSerialNo": ""

7
Document Version :1.0 PRAL © 2025 – All rights reserved Page 7 of 50
DI API Technical Specification

4.1.2. Sample JSON Data (For Production):


Input Parameters of the first web method (postinvoicedata) will be as follows:
Note: Invoice Header will only be added once in the object model.

{
"invoiceType": "Sale Invoice",
"invoiceDate": "2025-04-21",
"sellerNTNCNIC": "0786909",
"sellerBusinessName": "Company 8",
"sellerProvince": "Sindh",
"sellerAddress": "Karachi",
"buyerNTNCNIC": "1000000000000",
"buyerBusinessName": "FERTILIZER MANUFAC IRS NEW",
"buyerProvince": "Sindh",
"buyerAddress": "Karachi"
"buyerRegistrationType": "Unregistered",
"invoiceRefNo": "",
"items": [
{

"hsCode": "0101.2100",
"productDescription": "product Description",
"rate": "18%",
"uoM": "Numbers, pieces, units",
"quantity": 1,
"totalValues": 0,
"valueSalesExcludingST": 1000,
"fixedNotifiedValueOrRetailPrice": 0,
"salesTaxApplicable": 180,
8
Document Version :1.0 PRAL © 2025 – All rights reserved Page 8 of 50
DI API Technical Specification

"salesTaxWithheldAtSource": 0,
"extraTax": "",
"furtherTax": 120,
"sroScheduleNo": "",
"fedPayable": 0,
"discount": 0,
"saleType": "Goods at standard rate (default)",
"sroItemSerialNo": ""
}
]
}

Invoice Field Description

Json
JSON Field required sample data Description
DataType
• Sales Invoice
InvoiceType String Required "Sale Invoice"
• Debit Note
Date when the
invoiceDate date Required "2025-04-21"
invoice was issued.
sellerNTNCNIC string Required "0786909" Seller NTN/CNIC
sellerBusinessName string Required "General business" Seller Business Name
sellerProvince string Required "Punjab" Seller province
Seller business
sellerAddress string Required "Rawalpindi"
Address
Required
(Optional in
buyerNTNCNIC string 1234567890123 Buyer Registration No
case of
Unregistered)
buyerBusinessName string Required "John Doe" Buyer Business Name
buyerProvince string Required "Sindh" Buyer Province Name
buyerAddress string Required "Karachi" Buyer Address

9
Document Version :1.0 PRAL © 2025 – All rights reserved Page 9 of 50
DI API Technical Specification

Type of Buyer
buyeRegistrationType string Required "Unregistered"
Registration
Required only
7327556DI1744111990654 Reference Invoice no
invoiceRefNo String in case of
for the debit
debit note
Required for
scenarioId String "SN001" Scenario ID / Number
Sandbox only

Invoice Items Field Description

Json
JSON Field required sample data Description
DataType
HS Code is applicable to
hsCode String Required "0101.2100" manufacturer-cum-retailer
issuing electronic invoices
"product
productDescription String Required Product detail
Description"
Tax Rate (ratE_DESC from
rate String Required 18%
reference API 5.8)
uoM String Required "KG" Unit of Measurement
quantity Int Required 1 Item Quantity
Total Sales Value (Including
totalValues Double Required 0
Tax)
valueSalesExcludingST Double Required 1000 Sales Value Excluding sales tax
Fixed Notification Value /
fixedNotifiedValueOrRetailPrice Double Required 0
Retail Price (Item Based)
Amount of Sales Tax/ FED in
salesTaxApplicable Int Required 180 sales tax mode
(Excluding Further & Extra tax)
salesTaxWithheldAtSource Double Required 0 Sales Tax Withheld at source
extraTax Double Optional 0.00 Extra Tax
furtherTax Double Optional 120 Further Tax
sroScheduleNo String Optional "SRO123" SRO Schedule No
fedPayable Double Optional 0 Federal excise duty payable
discount Double Optional 70.00 Discount

10
Document Version :1.0 PRAL © 2025 – All rights reserved Page 10 of 50
DI API Technical Specification

saleType String Required "Goods at Type of Sale


standard
rate
(default)"
sroItemSerialNo String Optional "" Item serial number

4.1.3. Sample JSON Valid Response:


{

"invoiceNumber": "7000007DI1747119701593",
"dated": "2025-05-13 12:01:41",
"validationResponse": {
"statusCode": "00",
"status": "Valid",
"error": "",
"invoiceStatuses": [
{
"itemSNo": "1",
"statusCode": "00",
"status": "Valid",
"invoiceNo": "7000007DI1747119701593-1",
"errorCode": "",
"error": ""
}
]
}
}

11
Document Version :1.0 PRAL © 2025 – All rights reserved Page 11 of 50
DI API Technical Specification

4.1.4. Sample JSON Invalid Response 1:

"dated": "2025-05-13 13:09:05",

"validationResponse": {

"statusCode": "01",

"status": "Invalid",

"errorCode": "0052",

"error": "Provide proper HS Code with invoice no. null",

"invoiceStatuses": null

4.1.5. Sample JSON Invalid Response 2:

"dated": "2025-05-13 13:10:00",

"validationResponse": {

"statusCode": "00",

"status": "invalid",

"error": "",

"invoiceStatuses": [

"itemSNo": "1",

12
Document Version :1.0 PRAL © 2025 – All rights reserved Page 12 of 50
DI API Technical Specification

"statusCode": "01",

"status": "Invalid",

"invoiceNo": null,

"errorCode": "0046",

"error": "Provide rate."

S. No Field Message
1. Invoice Number Invoice Number issued by FBR System
2. Status Code 00 – Valid
01 – Invalid
3. Exception Details of the errors
4. Invoice Status Item Serial Number
Statuscode (00 valid, 01 Invalid)
Status (“Valid or invalid)
Invoice Number (Invoice Number Issued by FBR
System)
Error Code
Remarks:

4.1.6. HTTP Status Codes:

S. No Status Code Message


1. 200 Ok
2. 401 Unauthorized
3. 500 Internal Server Error (Contact Administrator)

13
Document Version :1.0 PRAL © 2025 – All rights reserved Page 13 of 50
DI API Technical Specification

4.2. Web method for Digital Invoicing - Validate


The second web method (validateinvoicedata) will be used on a real time basis. API
consumer will have to send object model mentioned below. This method will take
following parameters and will return Json response as shown in example below.
URL: https://gw.fbr.gov.pk/di_data/v1/di/validateinvoicedata_sb

4.2.1. Sample JSON Data (For Sandbox Only):


Input Parameters of the first web method validate) will be as follows:
Note: Invoice Header will only be added once in the object model.

{
"invoiceType": "Sale Invoice",

"invoiceDate": "2025-04-21",

"sellerNTNCNIC": "0786909",
"sellerBusinessName": "Company 8",

"sellerProvince": "Sindh",

"sellerAddress": "Karachi",

"buyerNTNCNIC": "1000000000000",

"buyerBusinessName": "FERTILIZER MANUFAC IRS NEW",

"buyerProvince": "Sindh",

"buyerAddress": "Karachi",

"buyerRegistrationType": "Registered",

"invoiceRefNo": "",

"scenarioId": "SN001",

"items": [
{

"hsCode": "0101.2100",

"productDescription": "product Description",

"rate": "18%",

14
Document Version :1.0 PRAL © 2025 – All rights reserved Page 14 of 50
DI API Technical Specification

"uoM": "Numbers, pieces, units",

"quantity": 1,

"totalValues": 0,

"valueSalesExcludingST":1000,

"fixedNotifiedValueOrRetailPrice":0,

"salesTaxApplicable": 18,

"salesTaxWithheldAtSource":0,

"extraTax": "",

"furtherTax": 120,

"sroScheduleNo": "",

"fedPayable": 0,

"discount": 0,

"saleType": "Goods at standard rate (default)",

"sroItemSerialNo": ""

15
Document Version :1.0 PRAL © 2025 – All rights reserved Page 15 of 50
DI API Technical Specification

4.2.2. Sample JSON Data (For Production):


Input Parameters of the first web method validate) will be as follows:
Note: Invoice Header will only be added once in the object model.

{
"invoiceType": "Sale Invoice",
"invoiceDate": "2025-04-21",
"sellerNTNCNIC": "0786909",
"sellerBusinessName": "Company 8",
"sellerProvince": "Sindh",
"sellerAddress": "Karachi",
"buyerNTNCNIC": "1000000000000",
"buyerBusinessName": "FERTILIZER MANUFAC IRS NEW",
"buyerProvince": "Sindh",
"buyerAddress": "Karachi"
"buyerRegistrationType": "Unregistered",
"invoiceRefNo": "",
"items": [
{

"hsCode": "0101.2100",
"productDescription": "product Description",
"rate": "18%",
"uoM": "Numbers, pieces, units",
"quantity": 1,
"totalValues": 0,
"valueSalesExcludingST": 1000,
"fixedNotifiedValueOrRetailPrice": 0,
"salesTaxApplicable": 180,
16
Document Version :1.0 PRAL © 2025 – All rights reserved Page 16 of 50
DI API Technical Specification

"salesTaxWithheldAtSource": 0,
"extraTax": "",
"furtherTax": 120,
"sroScheduleNo": "",
"fedPayable": 0,
"discount": 0,
"saleType": "Goods at standard rate (default)",
"sroItemSerialNo": ""
}
]
}

Invoice Field Description

Json
JSON Field required sample data Description
DataType
• Sales Invoice
InvoiceType string Required "Sale Invoice"
• Debit Note
Date when the
invoiceDate date Required "2025-04-21"
invoice was issued.
sellerNTNCNIC string Required "0786909" Seller NTN/CNIC
sellerBusinessName string Required "General business" Seller Business Name
sellerProvince string Required "Punjab" Seller province
Seller business
sellerAddress string Required "Rawalpindi"
Address
Required
(Optional in
buyerNTNCNIC string 1234567890123 Buyer Registration No
case of
Unregistered)
buyerBusinessName string Required "John Doe" Buyer Business Name
buyerProvince string Required "Sindh" Buyer Province Name
buyerAddress string Required "Karachi" Buyer Address
Type of Buyer
buyeRegistrationType string Required "Unregistered"
Registration

17
Document Version :1.0 PRAL © 2025 – All rights reserved Page 17 of 50
DI API Technical Specification

Required only
7327556DI1744111990654 Reference Invoice no
invoiceRefNo String in case of
for the debit
debit note
Required for
scenarioId String "SN001" Scenario ID / Number
Sandbox only

Invoice Items Field Description

Json
JSON Field required sample data Description
DataType
HS Code is applicable to
hsCode String Required "0101.2100" manufacturer-cum-retailer
issuing electronic invoices
"product
productDescription String Required Product detail
Description"
Tax Rate (ratE_DESC from
rate String Required 18%
reference API 5.8)
uoM String Required "KG" Unit of Measurement
quantity Int Required 1 Item Quantity
Total Sales Value (Including
totalValues Double Required 0
Tax)
valueSalesExcludingST Double Required 1000 Sales Value Excluding sales tax
Fixed Notification Value /
fixedNotifiedValueOrRetailPrice Double Required 0
Retail Price (Item Based)
Amount of Sales Tax/ FED in
salesTaxApplicable Int Required 180 sales tax mode
(Excluding Further & Extra tax)
salesTaxWithheldAtSource Double Required 0 Sales Tax Withheld at source
extraTax Double Optional 0.00 Extra Tax
furtherTax Double Optional 120 Further Tax
sroScheduleNo String Optional "SRO123" SRO Schedule No
fedPayable Double Optional 0 Federal excise duty payable
discount Double Optional 70.00 Discount
"Goods at
standard
saleType String Required Type of Sale
rate
(default)"
sroItemSerialNo String Optional "" Item serial number

18
Document Version :1.0 PRAL © 2025 – All rights reserved Page 18 of 50
DI API Technical Specification

4.2.3. Sample Json Response (In Case of Valid):


{

"dated": "2025-05-13 13:13:07",

"validationResponse": {

"statusCode": "00",

"status": "Valid",

"errorCode": null,

"error": "",

"invoiceStatuses": [

"itemSNo": "1",

"statusCode": "00",

"status": "Valid",

"errorCode": null,

"error": ""

}
]
}

19
Document Version :1.0 PRAL © 2025 – All rights reserved Page 19 of 50
DI API Technical Specification

4.2.4. Sample Json Response (In Case of Invalid):


{

"dated": "2025-05-13 13:13:54",

"validationResponse": {

"statusCode": "00",

"status": "Invalid",

"errorCode": null,

"error": "",

"invoiceStatuses": [

"itemSNo": "1",

"statusCode": "01",

"status": "Invalid",

"errorCode": "0046",

"error": "Provide rate."

20
Document Version :1.0 PRAL © 2025 – All rights reserved Page 20 of 50
DI API Technical Specification

S. No Field Message
1. Status Code 00 - Valid
01 – Invalid
2. Exception Details of the errors
3. Invoice Status Item Serial Number
Statuscode (00 valid, 01 Invalid)
Status (“Valid or invalid)
Invoice Number (Invoice Number Issued by FBR
System)
Error Code
Remarks:

4.2.5. Http Status Codes:

S. No Status Code Message


1. 200 Ok
2. 401 Unauthorized
3. 500 Internal Server Error (Contact Administrator)

5. Digital Invoicing Reference APIs


• Web method for Digital Invoicing – Province Code
• Web method for Digital Invoicing – Document Type
• Web method for Digital Invoicing – Item Code
• Web method for Digital Invoicing – SRO item ID
• Web method for Digital Invoicing – Transaction Type ID
• Web method for Digital Invoicing – UOM ID
• Web method for Digital Invoicing – SRO ID
• Web method for Digital Invoicing – Sale Type To Rate
• Web method for Digital Invoicing – HS_UOM
• Web method for Digital Invoicing – SRO item ID
• Web method for Digital Invoicing – STATL
• Web method for Digital Invoicing – STATL (Get_Reg_Type)

21
Document Version :1.0 PRAL © 2025 – All rights reserved Page 21 of 50
DI API Technical Specification

5.1. Web method for Digital Invoicing – Province Code

This Web method (provinces) HTTP meth Get will be used on a real time basis. API
consumer will have to send object model mentioned below. This method will take
following parameters and will return Json response as shown in example below.
URL: https://gw.fbr.gov.pk/pdi/v1/provinces

5.1.1. Sample JSON Data:


API requires no request input.

5.1.2. Sample Json Response:

[ {
"stateProvinceCode": 7,
"stateProvinceDesc": "PUNJAB"
},
{
"stateProvinceCode": 8,
"stateProvinceDesc": "SINDH"
}
]

S. No Field Description
1. StateprovinceCode Province code
2. stateprovinceDesc Description on the province
5.1.3. Http Status Codes:

S. No Status Code Message


1. 200 Ok
2. 401 Unauthorized
3. 500 Internal Server Error (Contact Administrator)

22
Document Version :1.0 PRAL © 2025 – All rights reserved Page 22 of 50
DI API Technical Specification

5.2. Web method for Digital Invoicing – Document Type ID


This Web method (doctypecode) HTTP meth Get will be used on a real time basis. API
consumer will have to send object model mentioned below. This method will take
following parameters and will return Json response as shown in example below.
URL: https://gw.fbr.gov.pk/pdi/v1/doctypecode

5.2.1. Sample JSON Data:


API requires no request input.

5.2.2. Sample Json Response:

[{
"docTypeId": 4,
"docDescription": "Sale Invoice"
},
{
"docTypeId": 9,
"docDescription": "Debit Note"
}]

S. No Field Description
1. docTypeId Id for the document type
2. docDescription Description of the document type

5.2.3. Http Status Codes:

S. No Status Code Message


1. 200 Ok
2. 401 Unauthorized
3. 500 Internal Server Error (Contact Administrator)

23
Document Version :1.0 PRAL © 2025 – All rights reserved Page 23 of 50
DI API Technical Specification

5.3. Web method for Digital Invoicing – Item Code


This Web method (itemdesccode) HTTP meth Get will be used on a real time basis. API
consumer will have to send object model mentioned below. This method will take
following parameters and will return Json response as shown in example below.
URL: https://gw.fbr.gov.pk/pdi/v1/itemdesccode

5.3.1. Sample JSON Data:


API requires no request input.

5.3.2. Sample Json Response:

[{
"hS_CODE": "8432.1010",
"description": "NUCLEAR REACTOR, BOILERS, MACHINERY AND
MECHANICAL APPLIANCES; PARTS THEREOF. - AGRICULTURAL,
HORTICULTURAL OR FORESTRY MACHINERY FOR SOIL PREPARATION OR
CULTI- VATION; LAWN OR SPORTS GROUND ROLLERS. - CHISEL
PLOUGHS"
},
{
"hS_CODE": "0304.7400",
"description": "FISH AND CRUSTACEANS, MOLLUSCS AND OTHER
AQUATIC INVERTEBRATES - FISH FILLETS AND OTHER FISH MEAT
(WHETHER OR NOT MINCED), FRESH, CHILLED OR FROZEN. - HAKE
(MERLUCCIUS SPP., UROPHYCIS SPP.)"
}]

S. No Field Description
1. Hs_Code HS Code
2. description Description of the HSCode

5.3.3. Http Status Codes:

S. No Status Code Message


1. 200 Ok
2. 401 Unauthorized
3. 500 Internal Server Error (Contact Administrator)

24
Document Version :1.0 PRAL © 2025 – All rights reserved Page 24 of 50
DI API Technical Specification

5.4. Web method for Digital Invoicing – SRO Item ID


This Web method (sroitemcode) HTTP meth Get will be used on a real time basis. API
consumer will have to send object model mentioned below. This method will take
following parameters and will return Json response as shown in example below.
URL: https://gw.fbr.gov.pk/pdi/v1/sroitemcode

5.4.1. Sample JSON Data:


API requires no request input.

5.4.2. Sample Json Response:

[
{
"srO_ITEM_ID": 724,
"srO_ITEM_DESC": "9"
},
{
"srO_ITEM_ID": 728,
"srO_ITEM_DESC": "1"
}
]
S. No Field Description
1. Sro_ITEM_ID SRO item id
2. srO_ITEM_DESC SRO Item Description

5.4.3. Http Status Codes:

S. No Status Code Message


1. 200 Ok
2. 401 Unauthorized
3. 500 Internal Server Error (Contact Administrator)

25
Document Version :1.0 PRAL © 2025 – All rights reserved Page 25 of 50
DI API Technical Specification

5.5. Web method for Digital Invoicing – Transaction Type ID


This Web method (transtypecode) HTTP meth Get will be used on a real time basis. API
consumer will have to send object model mentioned below. This method will take
following parameters and will return Json response as shown in example below.
URL: https://gw.fbr.gov.pk/pdi/v1/transtypecode

5.5.1. Sample JSON Data:


API requires no request input.

5.5.2. Sample Json Response:

[
{
"transactioN_TYPE_ID": 82,
"transactioN_DESC": "DTRE goods"
},
{
"transactioN_TYPE_ID": 87,
"transactioN_DESC": "Special procedure cottonseed"
},
{
"transactioN_TYPE_ID": 111,
"transactioN_DESC": "Electricity Supplied to marble/granite
industry"
}
]
S. No Field Description
1. transactioN_TYPE_ID Transaction type id
2. transaction_DESC Description of the transaction type
5.5.3. Http Status Codes:

S. No Status Code Message


1. 200 Ok
2. 401 Unauthorized
3. 500 Internal Server Error (Contact Administrator)

26
Document Version :1.0 PRAL © 2025 – All rights reserved Page 26 of 50
DI API Technical Specification

5.6. Web method for Digital Invoicing – ID of the UOM


This Web method (uom) HTTP meth Get will be used on a real time basis. API consumer
will have to send object model mentioned below. This method will take following
parameters and will return Json response as shown in example below.
URL: https://gw.fbr.gov.pk/pdi/v1/uom

5.6.1. Sample JSON Data:


API requires no request input.

5.6.2. Sample Json Response:

[
{
"uoM_ID": 77,
"description": "Square Metre"
},
{
"uoM_ID": 13,
"description": "KG"
}
]
S. No Field Description
1. UOM_ID ID of the UOM
2. Description Description of the UOM
5.6.3. Http Status Codes:

S. No Status Code Message


1. 200 Ok
2. 401 Unauthorized
3. 500 Internal Server Error (Contact Administrator)

27
Document Version :1.0 PRAL © 2025 – All rights reserved Page 27 of 50
DI API Technical Specification

5.7. Web method for Digital Invoicing – SRO Schedule


This Web method (SroSchedule) HTTP meth Get will be used on a real time basis. API
consumer will have to send object model mentioned below. This method will take
following parameters and will return Json response as shown in example below.
URL: https://gw.fbr.gov.pk/pdi/v1/SroSchedule?rate_id=413&date=04-Feb-
2024&origination_supplier_csv=1

5.7.1. Sample JSON Data:

S. No Field Description
1. rate_id Rate id
2. date date
3. Origination_supplier_csv Origination of supplier

5.7.2. Sample Json Response:

[
{
"srO_ID": 7,
"srO_DESC": "Zero Rated Gas"
},
{
"srO_ID": 8,
"srO_DESC": "5th Schedule"
}

]
S. No Field Description
1. SRO_ID ID of the SRO
2. srO_DESC Description of the SRO
5.7.3. Http Status Codes:
S. No Status Code Message
1. 200 Ok
2. 401 Unauthorized
3. 500 Internal Server Error (Contact Administrator)

28
Document Version :1.0 PRAL © 2025 – All rights reserved Page 28 of 50
DI API Technical Specification

5.8. Web method for Digital Invoicing – ID of The Rate


This Web method (SaleTypeToRate) HTTP meth Get will be used on a real time basis. API
consumer will have to send object model mentioned below. This method will take
following parameters and will return Json response as shown in example below.
URL: https://gw.fbr.gov.pk/pdi/v2/SaleTypeToRate?date=24-Feb-
2024&transTypeId=18&originationSupplier=1

5.8.1. Sample JSON Data:


API requires the following input as a query string.
S. No Field Description
1. date Date
2. transTypeId ID of the transaction type
3. originationSuppl Province ID

5.8.2. Sample Json Response:

[
{
"ratE_ID": 734,
"ratE_DESC": "18% along with rupees 60 per kilogram",
"ratE_VALUE": 18
}
,
{
"ratE_ID": 280,
"ratE_DESC": "0%",
"ratE_VALUE": 0
}
]
S. No Field Description
1. Rate_ID ID of the rate
2. rate_DESC Description of the rate
3. Rate_VALUE Value of the rate
5.8.3. Http Status Codes:

S. No Status Code Message


1. 200 Ok
2. 401 Unauthorized
3. 500 Internal Server Error (Contact Administrator)

29
Document Version :1.0 PRAL © 2025 – All rights reserved Page 29 of 50
DI API Technical Specification

5.9. Web method for Digital Invoicing – HS Code with UOM


This Web method (HS_UOM) HTTP method Get will be used on a real time basis. API
consumer will have to send object model mentioned below. This method will take
following parameters and will return Json response as shown in example below.
URL: https://gw.fbr.gov.pk/pdi/v2/HS_UOM?hs_code=5904.9000&annexure_id=3

5.9.1. Sample JSON Data:


API requires the following input as a query string.
S. No Field Description
1. Hs_code HS code
2. Annexureid Sales annexure id

5.9.2. Sample Json Response:

[
{
"uoM_ID": 77,
"description": "Square Meter"
}
]

]
S. No Field Description
1. uoM_ID ID of the unit of measure
2. description Description of the unit of measure
5.9.3. Http Status Codes:

S. No Status Code Message


1. 200 Ok
2. 401 Unauthorized
3. 500 Internal Server Error (Contact Administrator)

30
Document Version :1.0 PRAL © 2025 – All rights reserved Page 30 of 50
DI API Technical Specification

5.10. Web method for Digital Invoicing – SRO Item ID


This Web method (SROItem) HTTP meth Get will be used on a real time basis. API consumer
will have to send object model mentioned below. This method will take following
parameters and will return Json response as shown in example below.
URL: https://gw.fbr.gov.pk/pdi/v2/SROItem?date=2025-03-25&sro_id=389

5.10.1. Sample JSON Data:


API requires the following input as a query string.
S. No Field Description
1. Date Date
2. Sro_id Sro id

5.10.2. Sample Json Response:

[
{
"srO_ITEM_ID": 17853,
"srO_ITEM_DESC": "50"
},
{
"srO_ITEM_ID": 17854,
"srO_ITEM_DESC": "51"
}

]
S. No Field Description
1. Sro_ITEM_ID Item id
2. Sro_ITEM_DESC Description of the Item
5.10.3. Http Status Codes:

S. No Status Code Message


1. 200 Ok
2. 401 Unauthorized
3. 500 Internal Server Error (Contact Administrator)

31
Document Version :1.0 PRAL © 2025 – All rights reserved Page 31 of 50
DI API Technical Specification

5.11 Web method for Digital Invoicing – STATL


This Web method (statl) HTTP meth Get will be used on a real time basis. API consumer
will have to send object model mentioned below. This method will take following
parameters and will return Json response as shown in example below.
URL: https://gw.fbr.gov.pk/dist/v1/statl

Sample JSON Request:


Request: {"regno":"0788762","date":"2025-05-18"}

Response:

{
"status code": "01",

"status": "In-Active"
}

or

{
"status code": "02",

"status": "In-Active"
}

32
Document Version :1.0 PRAL © 2025 – All rights reserved Page 32 of 50
DI API Technical Specification

5.12 Web method for Digital Invoicing – STATL


This Web method (Get_Reg_Type) HTTP meth Get will be used on a real time basis. API
consumer will have to send object model mentioned below. This method will take
following parameters and will return Json response as shown in example below.
URL: https://gw.fbr.gov.pk/dist/v1/Get_Reg_Type

Sample JSON Request:

{"Registration_No":"0788762"}

Response:

"statuscode": "01",

"REGISTRATION_NO": "0788762",

"REGISTRATION_TYPE": "unregistered"

or

"statuscode": "00",

"REGISTRATION_NO": "0788762",

"REGISTRATION_TYPE": "Registered"

33
Document Version :1.0 PRAL © 2025 – All rights reserved Page 33 of 50
DI API Technical Specification

6. Digital Invoicing Logo & QR Code Printing


The below Digital Invoicing System logo and QR code must be printed on each invoice issued by
the taxpayers.

Ensure the following specifications for QR Code Printing:

QR Code Version: 2.0 (25×25)


QR Code Dimensions: 1.0 x 1.0 Inch.

Use FBR Digital Invoicing System image to print on receipts

34
Document Version :1.0 PRAL © 2025 – All rights reserved Page 34 of 50
DI API Technical Specification

7. Sales Error Codes


MESSAGE
MESSAGE_DESC BRIEF_MSG_DESC
CODE
Seller not registered for sales tax,
Seller is not registered for sales tax, please provide
0001 please provide valid
valid seller registration/NTN.
registration/NTN.
Buyer Registration Number or NTN is not in proper
Invalid Buyer Registration No or NTN
0002 format, please provide buyer registration number in
:
13 digits or NTN in 7 or 9 digits
Invoice type is not valid or empty, please provide valid
0003 Provide proper invoice type.
invoice type
Invoice date is not in proper format, please provide
please provide date in valid format
0005 invoice date in "YYYY-MM-DD" format. For example:
01-DEC-2021
2025-05-25

0006 Sale invoice not exist. Sales invoice does not exist against STWH

Wrong Sale type is selected with Selected invoice type is not associated with proper
0007
invoice no (Invoice no) registration number, please select actual invoice type
ST withheld at source should either ST withheld at source is not equal to zero or sales tax,
0008 be zero or same as sales tax/fed in st please enter ST withheld at source zero or equal to
mode. sales tax

Buyer Registration Number cannot be empty, please


0009 Provide Buyer registration No.
provide proper buyer registration number

Buyer Name cannot be empty, please provide valid


0010 Provide Buyer Name.
buyer name
Buyer Registration type cannot be empty, please
0012 Provide Buyer Registration Type
provide valid Buyer Registration type
Invoice type cannot be empty, please provide valid
0011 Provide invoice type.
invoice type
Sale type cannot be empty/null, please provide valid
0013 Provide valid Sale type.
sale type
Please provide Sales Tax/FED in ST Sales Tax/FED cannot be empty, please valid provide
0018
Mode Sales Tax/FED
HS Code cannot be empty, please provide valid HS
0019 Please provide HSCode
Code

0020 Please provide Rate Rate field cannot be empty, please provide Rate

35
Document Version :1.0 PRAL © 2025 – All rights reserved Page 35 of 50
DI API Technical Specification

Please provide Value of Sales Excl. ST Value of Sales Excl. ST /Quantity cannot be empty,
0021
/Quantity Please provide valid Value of Sales Excl. ST /Quantity
ST withheld at Source or STS Withheld cannot be
Please provide ST withheld at Source
0022 empty, Please provide valid ST withheld at Source or
or STS Withheld
STS Withheld
Sales Tax cannot be empty, Please provide valid Sales
0023 Please provide Sales Tax
Tax
Sales Tax withheld cannot be empty, Please provide
0024 Please provide ST withheld
valid Sales Tax withheld
Invoice Reference No. is mandatory requirement for
0026 Invoice Reference No. is required. debit/credit note. Please provide valid Invoice
Reference No.

Reason is mandatory requirement for debit/credit


0027 Reason is required.
note. Please provide valid reason for debit/credit note

Reason is selected as "Others". Please provide valid


0028 Reason Remarks are required.
remarks against this reason
Invoice date must be greater or Debit/Credit note date should be equal or greater
0029
equal to original invoice no. from original invoice date

Unregistered distributer type not Unregistered distributer type not allowed before
0030
allowed before date system cut of date

0031 Provide Sales Tax Sales Tax is not mentioned, please provide Sales Tax

STWH can only be created for User is not FTN holder, STWH can only be created for
0032
GOV/FTN Holders. GOV/FTN Holders without sales invoice.

{0} only allowed within {1} days of Debit/Credit note can only be added within 180 days
0034
invoice date of the original invoice of original invoice date
{0} date must be greater or equal to Note Date must be greater or equal to original invoice
0035
original invoice date. date
Total {1} value of {0} invoice(s) is
Credit Note Value of Sale must be less or equal to the
0036 greater than {1} of original invoice.
value of Sale in original invoice.
Value of Sales
Total {1} value of {0} invoice(s) is
Credit Note Value of ST Withheld must be less or
0037 greater than {1} of original invoice.ST
equal to the value of ST Withheld in original invoice.
Withheld as WH Agent

36
Document Version :1.0 PRAL © 2025 – All rights reserved Page 36 of 50
DI API Technical Specification

For registered users, STWH invoice fields must be


0039 Sale invoice not exist.
same as sale invoice

Invoice number cannot be empty, please provide


0041 Provide invoice No.
invoice number.
Invoice date cannot be empty, please provide invoice
0042 Provide invoice date.
date.
Invoice date is not valid, please provide valid invoice
0043 Provide valid Date.
date.

0044 Provide HS Code. HS Code cannot be empty, please provide HS Code

Rate cannot be empty, please provide valid rate as per


0046 Provide rate.
selected Sales Type.

Please provide valid Sales Tax


Please provide valid Sales Tax withheld. For sale type
withheld. For sale type 'Cotton
0050 'Cotton ginners', Sales Tax Withheld must be equal to
ginners', Sales Tax Withheld must be
Sales Tax or zero
equal to Sales Tax or zero
Please provide valid HS Code against HS Code that does not match with provided sale type,
0052
invoice no: Please provide valid HS Code against sale type
Provided buyer registration type is Buyer Registration Type is invalid, please provide valid
0053
invalid Buyer Registration Type
Please Provide ST Withheld as WH Sales tax withheld cannot be empty or invalid format.
0055
Agent Please provide valid sales tax withheld.

0056 Buyer not exists in steel sector. Buyer does not exist in steel sector

Reference invoice for debit/ credit note does not


0057 Reference Invoice does not exist.
exists. Please provide valid Invoice Reference No.
Buyer and Seller Registration number are same, this
0058 Self-invoicing not allowed
type of invoice is not allowed

0064 Reference invoice already exist. Credit note is already added to a invoice

{1} of {0} invoice is greater than {1} Sales Tax value of Debit Note is greater than original
0067
of original invoice. invoice's sales tax
{1} of {0} invoice is less than {1} of Sales Tax value of Credit Note is less than original
0068
original invoice. invoice's sales tax according to the rate.
STWH cannot be created for User is not registered, STWH is allowed only for
0070
unregistered buyers. registered user

37
Document Version :1.0 PRAL © 2025 – All rights reserved Page 37 of 50
DI API Technical Specification

Entry of {0} against the declared


0071 Credit note allowed to add only for specific users
invoice is not allowed.

Sale Origination Province of Supplier cannot be empty,


Provide Sale Origination Province of
0073 please provide valid Sale Origination Province of
Supplier
Supplier.

Destination of Supply cannot be empty, please


0074 Provide Destination of Supply
provide valid Destination of Supply

SRO/Schedule Number cannot be empty, please


0077 Provide SRO/Schedule No.
provide valid SRO/Schedule Number

Item serial number cannot be empty, please provide


0078 Provide Item Sr. No.
valid item serial number

If Value of Sales Excl. ST greater than If sales value is greater than 20,000 than rate 5% is
0079
{0}. Rate {1} not allowed. not allowed
Further Tax' cannot be empty, please provide valid
0080 Please provide Further Tax
Further Tax
Please provide Input Credit not 'Input Credit not Allowed' cannot be empty, please
0081
Allowed provide ‘Input Credit not Allowed'
The Seller is not registered for sales
The Seller is not registered for sales tax. Please
0082 tax. Please provide a valid
provide a valid registration/NTN.
registration/NTN.

Seller Reg No. doesn’t match. Please provide valid


0083 Mismatch Seller Registration No.
Seller Registration Number

Please provide Total Value of Sales Total Value of Sales is not provided, please provide
0085
(In case of PFAD only) valid Total Value of Sales (In case of PFAD only)
You are not an EFS license holder
You are not an EFS license holder who has imported
0086 who has imported Compressor Scrap
Compressor Scrap in the last 12 months.
in the last 12 months.
Petroleum Levy rates not configured Petroleum Levy rates not configured properly. Please
0087
properly. update levy rates properly
Alphanumeric and (-) contained Invoice number is not valid, please provide valid
0088 invoice No. is allowed. (-) should be invoice number in alphanumeric format. For example:
in between Alphanumeric string. Inv-001
FED Charged cannot be empty, please provide valid
0089 Please provide FED Charged
FED Charged

38
Document Version :1.0 PRAL © 2025 – All rights reserved Page 38 of 50
DI API Technical Specification

Fixed / notified value or Retail Price cannot be empty,


Please provide Fixed / notified value
0090 please provide valid Fixed / notified value or Retail
or Retail Price
Price

0091 Extra tax must be empty. Extra tax must be empty.

Purchase type cannot be empty, please provide valid


0092 Provide Valid Sale Type.
purchase type
Selected Sale Type are not allowed Selected Sale is are not allowed to Manufacturer.
0093
to Manufacturer. Please select proper sale type

Please provide Extra Tax Extra Tax cannot be empty, please provide valid extra
0095
tax

For selected HSCode only KWH UOM


0096 For provided HS Code, only KWH UOM is allowed
is allowed.

0097 Provide UOM KG. Please provide UOM in KG

Please provide Quantity / Electricity Quantity / Electricity Unit cannot be empty, please
0098
Units provide valid Quantity / Electricity Unit
UOM is not valid. UOM must be according to given HS
0099 Provide uom.
Code
Cotton Ginners allowed against Registered user cannot add sale invoice. Only cotton
0100
registered buyers only. ginner sale type is allowed for registered users.
Please Use Toll Manufacturing Sale Sale type is not selected properly, please use Toll
0101
Type for Steel Sector. Manufacturing Sale Type for Steel Sector.
Calculated tax not matched in 3rd The calculated sales tax not calculated as per 3rd
0102
schedule schedule calculation formula
Calculated tax not matched for potassium chlorate.
The calculated tax for Potassium
0103 Calculated value doesn’t match according to
Chlorate does not match.
potassium chlorate for sales potassium invoices.
Calculated percentage of sales tax not matched.
The calculated percentage sales tax
0104 Calculation must be correct with respect to provided
does not match.
rate
The calculated sales tax for the
0105 The calculated sales tax for the quantity is incorrect.
quantity is incorrect.
The Buyer is not registered for sales
The Buyer is not registered for sales tax. Please
0106 tax. Please provide a valid
provide a valid registration/NTN.
registration/NTN.
Buyer Reg No. doesn’t match. Please provide valid
0107 Mismatch Buyer Registration No.
Buyer Registration Number

39
Document Version :1.0 PRAL © 2025 – All rights reserved Page 39 of 50
DI API Technical Specification

Seller Reg No. is not valid. Please provide valid Seller


0108 Invalid Seller Registration No or NTN
Registration Number/NTN
Wrong invoice type is selected in Invoice type is not selected properly, please select
0109
invoice no proper invoice type
Wrong purchase type is selected Purchase type is not selected properly, please provide
0111
with invoice no proper purchase type
System is unable to parse date.
Date is not in proper format, please provide date in
0113 Please provide date in valid format
"YYYY-MM-DD" format. For example: 2025-05-25
dd-MMM-yy.
Discount Value is not valid at item 1 | Total Value is
not valid at item 1 | Fed Payable Value is not valid at
Provided decimal value is not valid at item 1 | Extra Tax Value is not valid at item 1 | Further
0300
field Tax Value is not valid at item 1 |
SalesTaxWithheldAtSource Value is not valid at item 1
| Quantity Value is not valid at item 1

8. Purchase Error Codes


MESSAGE
MESSAGE_DESC BRIEF_MSG_DESC
CODE
NTN/Reg. No is invalid/Null, please provide valid
0156 Invalid NTN / Reg No. provided.
NTN/Reg. No.
The Buyer is not registered for sales
The Buyer is not registered for sales tax. Please
0157 tax. Please provide a valid
provide valid Registration/NTN.
registration/NTN..
Buyer Reg No. doesn’t match. Please provide valid
0158 Mismatch Buyer Registration No.
Buyer Registration Number
FTN holder as seller not allowed for
0159 FTN Holder as Seller is not allowed for purchases
purchases.
Buyer Name cannot be empty, please provide valid
0160 Provide Buyer Name.
buyer name
Invoice Date must be greater or Invoice Date must be greater or equal to original sale
0161
equal to {0} invoice date

Sale Type cannot be empty/Invalid, please provide


0162 Provide Sale Type.
valid Sale Type

Selected Sale Type are not allowed


0163 Provided Sale Type is not allowed for Manufacturer.
to Manufacturer.
40
Document Version :1.0 PRAL © 2025 – All rights reserved Page 40 of 50
DI API Technical Specification

For selected HSCode only KWH UOM


0164 For provided HS Code, only KWH UOM is allowed
is allowed.

0165 Provide UOM KG. Please provide UOM in KG

Please provide Quantity / Electricity Quantity / Electricity Unit cannot be empty, please
0166
Units provide valid Quantity / Electricity Unit
Value of Sales Excl. ST cannot be empty/Invalid, please
0167 Provide Value of Sales Excl. ST
provide valid Value of Sales Excl. ST
Cotton Ginners allowed against Only cotton ginner purchase type is allowed for
0168
registered buyers only. registered users.
STWH can only be created for User is not FTN holder, STWH can only be created for
0169
GOV/FTN Holders. GOV/FTN Holders without purchase invoice.
If Value of Sales Excl. ST greater than If Value of Sales Excl. ST greater than 20000 than rate
0170
{0}. Rate {1} not allowed. 5% is not allowed.
You are not an EFS license holder
You are not an EFS license holder who has imported
0171 who has imported Compressor Scrap
Compressor Scrap in the last 12 months.
in the last 12 months.
Petroleum Levy rates not configured Petroleum Levy rates not configured properly. Please
0172
properly. update levy rates properly
Alphanumeric and (-) contained Invoice number is not valid, please provide valid
0173 invoice No. is allowed. (-) should be invoice number in alphanumeric format. For example:
in between Alphanumeric string. Inv-001
Sales Tax cannot be empty, please provide valid Sales
0174 Please provide Sales Tax
Tax
Fixed / notified value or Retail Price cannot be empty,
Please provide Fixed / notified value
0175 please provide valid Fixed / notified value or Retail
or Retail Price
Price
ST withheld at Source cannot be empty, please
0176 Please provide ST withheld at Source
provide valid ST withheld at Source
Further Tax cannot be empty, please provide valid
0177 Please provide Further Tax
further tax

NTN/Reg. No is invalid/Null, please provide valid


0156 Invalid NTN / Reg No. provided.
NTN/Reg. No.

The Buyer is not registered for sales


The Buyer is not registered for sales tax. Please
0157 tax. Please provide a valid
provide valid Registration/NTN.
registration/NTN..

41
Document Version :1.0 PRAL © 2025 – All rights reserved Page 41 of 50
DI API Technical Specification

Buyer Reg No. doesn’t match. Please provide valid


0158 Mismatch Buyer Registration No.
Buyer Registration Number

FTN holder as seller not allowed for


0159 FTN Holder as Seller is not allowed for purchases
purchases.

Buyer Name cannot be empty, please provide valid


0160 Provide Buyer Name.
buyer name

Invoice Date must be greater or Invoice Date must be greater or equal to original sale
0161
equal to {0} invoice date

Sale Type cannot be empty/Invalid, please provide


0162 Provide Sale Type.
valid Sale Type

Selected Sale Type are not allowed


0163 Provided Sale Type is not allowed for Manufacturer.
to Manufacturer.

For selected HSCode only KWH UOM


0164 For provided HS Code, only KWH UOM is allowed
is allowed.

0165 Provide UOM KG. Please provide UOM in KG

Please provide Quantity / Electricity Quantity / Electricity Unit cannot be empty, please
0166
Units provide valid Quantity / Electricity Unit

Value of Sales Excl. ST cannot be empty/Invalid, please


0167 Provide Value of Sales Excl. ST
provide valid Value of Sales Excl. ST

Cotton Ginners allowed against Only cotton ginner purchase type is allowed for
0168
registered buyers only. registered users.
STWH can only be created for User is not FTN holder, STWH can only be created for
0169
GOV/FTN Holders. GOV/FTN Holders without purchase invoice.
If Value of Sales Excl. ST greater than If Value of Sales Excl. ST greater than 20000 than rate
0170
{0}. Rate {1} not allowed. 5% is not allowed.
You are not an EFS license holder
You are not an EFS license holder who has imported
0171 who has imported Compressor Scrap
Compressor Scrap in the last 12 months.
in the last 12 months.
Petroleum Levy rates not configured Petroleum Levy rates not configured properly. Please
0172
properly. update levy rates properly

42
Document Version :1.0 PRAL © 2025 – All rights reserved Page 42 of 50
DI API Technical Specification

Alphanumeric and (-) contained Invoice number is not valid, please provide valid
0173 invoice No. is allowed. (-) should be invoice number in alphanumeric format. For example:
in between Alphanumeric string. Inv-001
Sales Tax cannot be empty, please provide valid Sales
0174 Please provide Sales Tax
Tax
Fixed / notified value or Retail Price cannot be empty,
Please provide Fixed / notified value
0175 please provide valid Fixed / notified value or Retail
or Retail Price
Price
ST withheld at Source cannot be empty, please
0176 Please provide ST withheld at Source
provide valid ST withheld at Source

Further Tax cannot be empty, please provide valid


0177 Please provide Further Tax
further tax

NTN/Reg. No is invalid/Null, please provide valid


0156 Invalid NTN / Reg No. provided.
NTN/Reg. No.
The Buyer is not registered for sales
The Buyer is not registered for sales tax. Please
0157 tax. Please provide a valid
provide valid Registration/NTN.
registration/NTN..
Buyer Reg No. doesn’t match. Please provide valid
0158 Mismatch Buyer Registration No.
Buyer Registration Number

FTN holder as seller not allowed for


0159 FTN Holder as Seller is not allowed for purchases
purchases.
Buyer Name cannot be empty, please provide valid
0160 Provide Buyer Name.
buyer name
Invoice Date must be greater or Invoice Date must be greater or equal to original sale
0161
equal to {0} invoice date
Sale Type cannot be empty/Invalid, please provide
0162 Provide Sale Type.
valid Sale Type
Selected Sale Type are not allowed
0163 Provided Sale Type is not allowed for Manufacturer.
to Manufacturer.

For selected HSCode only KWH UOM


0164 For provided HS Code, only KWH UOM is allowed
is allowed.

0165 Provide UOM KG. Please provide UOM in KG

43
Document Version :1.0 PRAL © 2025 – All rights reserved Page 43 of 50
DI API Technical Specification

Please provide Quantity / Electricity Quantity / Electricity Unit cannot be empty, please
0166
Units provide valid Quantity / Electricity Unit

Value of Sales Excl. ST cannot be empty/Invalid, please


0167 Provide Value of Sales Excl. ST
provide valid Value of Sales Excl. ST
Cotton Ginners allowed against Only cotton ginner purchase type is allowed for
0168
registered buyers only. registered users.
STWH can only be created for User is not FTN holder, STWH can only be created for
0169
GOV/FTN Holders. GOV/FTN Holders without purchase invoice.
If Value of Sales Excl. ST greater than If Value of Sales Excl. ST greater than 20000 than rate
0170
{0}. Rate {1} not allowed. 5% is not allowed.
You are not an EFS license holder
You are not an EFS license holder who has imported
0171 who has imported Compressor Scrap
Compressor Scrap in the last 12 months.
in the last 12 months.

Petroleum Levy rates not configured Petroleum Levy rates not configured properly. Please
0172
properly. update levy rates properly

Alphanumeric and (-) contained Invoice number is not valid, please provide valid
0173 invoice No. is allowed. (-) should be invoice number in alphanumeric format. For example:
in between Alphanumeric string. Inv-001
Sales Tax cannot be empty, please provide valid Sales
0174 Please provide Sales Tax
Tax
Fixed / notified value or Retail Price cannot be empty,
Please provide Fixed / notified value
0175 please provide valid Fixed / notified value or Retail
or Retail Price
Price

44
Document Version :1.0 PRAL © 2025 – All rights reserved Page 44 of 50
DI API Technical Specification

9. Scenarios for Sandbox Testing


Sale Type (Purchase type in case of
Scenario Description
Cotton Ginners)
SN001 Goods at standard rate to registered buyers Goods at Standard Rate (default)
SN002 Goods at standard rate to unregistered buyers Goods at Standard Rate (default)
SN003 Sale of Steel (Melted and Re-Rolled) Steel Melting and re-rolling
SN004 Sale by Ship Breakers Ship breaking
SN005 Reduced rate sale Goods at Reduced Rate
SN006 Exempt goods sale Exempt Goods
SN007 Zero rated sale Goods at zero-rate
SN008 Sale of 3rd schedule goods 3rd Schedule Goods
Cotton Spinners purchase from Cotton Ginners
SN009 Cotton Ginners
(Textile Sector)
SN010 Mobile Operators adds Sale (Telecom Sector) Telecommunication services
SN011 Toll Manufacturing sale by Steel sector Toll Manufacturing
SN012 Sale of Petroleum products Petroleum Products
SN013 Electricity Supply to Retailers Electricity Supply to Retailers
SN014 Sale of Gas to CNG stations Gas to CNG stations
SN015 Sale of mobile phones Mobile Phones
SN016 Processing / Conversion of Goods Processing/ Conversion of Goods
SN017 Sale of Goods where FED is charged in ST mode Goods (FED in ST Mode)
SN018 Sale of Services where FED is charged in ST mode Services (FED in ST Mode)
SN019 Sale of Services Services
SN020 Sale of Electric Vehicles Electric Vehicle
SN021 Sale of Cement /Concrete Block Cement /Concrete Block
SN022 Sale of Potassium Chlorate Potassium Chlorate
SN023 Sale of CNG CNG Sales
SN024 Goods sold that are listed in SRO 297(1)/2023 Goods as per SRO.297(|)/2023
Drugs sold at fixed ST rate under serial 81 of
SN025 Non-Adjustable Supplies
Eighth Schedule Table 1
SN026 Sale to End Consumer by retailers Goods at Standard Rate (default)
SN027 Sale to End Consumer by retailers 3rd Schedule Goods
SN028 Sale to End Consumer by retailers Goods at Reduced Rate

45
Document Version :1.0 PRAL © 2025 – All rights reserved Page 45 of 50
DI API Technical Specification

10. Applicable Scenarios based on Business Activity


Business
Sr. Sector Scenarios
Activity
SN001, SN002, SN005, SN006, SN007, SN015, SN016, SN017, SN021,
1 Manufacturer All Other Sectors
SN022, SN024
2 Manufacturer Steel SN003, SN004, SN011
SN001, SN002, SN005, SN006, SN007, SN015, SN016, SN017, SN021,
3 Manufacturer FMCG
SN022, SN024, SN008
SN001, SN002, SN005, SN006, SN007, SN015, SN016, SN017, SN021,
4 Manufacturer Textile
SN022, SN024, SN009
SN001, SN002, SN005, SN006, SN007, SN015, SN016, SN017, SN021,
5 Manufacturer Telecom
SN022, SN024, SN010
SN001, SN002, SN005, SN006, SN007, SN015, SN016, SN017, SN021,
6 Manufacturer Petroleum
SN022, SN024, SN012
Electricity SN001, SN002, SN005, SN006, SN007, SN015, SN016, SN017, SN021,
7 Manufacturer
Distribution SN022, SN024, SN013
SN001, SN002, SN005, SN006, SN007, SN015, SN016, SN017, SN021,
8 Manufacturer Gas Distribution
SN022, SN024, SN014
SN001, SN002, SN005, SN006, SN007, SN015, SN016, SN017, SN021,
9 Manufacturer Services
SN022, SN024, SN018, SN019
SN001, SN002, SN005, SN006, SN007, SN015, SN016, SN017, SN021,
10 Manufacturer Automobile
SN022, SN024, SN020
SN001, SN002, SN005, SN006, SN007, SN015, SN016, SN017, SN021,
11 Manufacturer CNG Stations
SN022, SN024, SN023
SN001, SN002, SN005, SN006, SN007, SN015, SN016, SN017, SN021,
12 Manufacturer Pharmaceuticals
SN022, SN024, SN025
SN001, SN002, SN005, SN006, SN007, SN015, SN016, SN017, SN021,
13 Manufacturer Wholesale / Retails
SN022, SN024, SN026, SN027, SN028, SN008
SN001, SN002, SN005, SN006, SN007, SN015, SN016, SN017, SN021,
16 Importer All Other Sectors
SN022, SN024
SN001, SN002, SN005, SN006, SN007, SN015, SN016, SN017, SN021,
17 Importer Steel
SN022, SN024, SN003, SN004, SN011
SN001, SN002, SN005, SN006, SN007, SN015, SN016, SN017, SN021,
18 Importer FMCG
SN022, SN024, SN008
SN001, SN002, SN005, SN006, SN007, SN015, SN016, SN017, SN021,
19 Importer Textile
SN022, SN024, SN009
SN001, SN002, SN005, SN006, SN007, SN015, SN016, SN017, SN021,
20 Importer Telecom
SN022, SN024, SN010
SN001, SN002, SN005, SN006, SN007, SN015, SN016, SN017, SN021,
21 Importer Petroleum
SN022, SN024, SN012
Electricity SN001, SN002, SN005, SN006, SN007, SN015, SN016, SN017, SN021,
22 Importer
Distribution SN022, SN024, SN013

46
Document Version :1.0 PRAL © 2025 – All rights reserved Page 46 of 50
DI API Technical Specification

SN001, SN002, SN005, SN006, SN007, SN015, SN016, SN017, SN021,


23 Importer Gas Distribution
SN022, SN024, SN014
SN001, SN002, SN005, SN006, SN007, SN015, SN016, SN017, SN021,
24 Importer Services
SN022, SN024, SN018, SN019
SN001, SN002, SN005, SN006, SN007, SN015, SN016, SN017, SN021,
25 Importer Automobile
SN022, SN024, SN020
SN001, SN002, SN005, SN006, SN007, SN015, SN016, SN017, SN021,
26 Importer CNG Stations
SN022, SN024, SN023
SN001, SN002, SN005, SN006, SN007, SN015, SN016, SN017, SN021,
27 Importer Pharmaceuticals
SN022, SN024, SN025
SN001, SN002, SN005, SN006, SN007, SN015, SN016, SN017, SN021,
28 Importer Wholesale / Retails
SN022, SN024, SN026, SN027, SN028, SN008
SN001, SN002, SN005, SN006, SN007, SN015, SN016, SN017, SN021,
31 Distributor All Other Sectors
SN022, SN024, SN026, SN027, SN028, SN008
32 Distributor Steel SN003, SN004, SN011, SN026, SN027, SN028, SN008
33 Distributor FMCG SN008, SN026, SN027, SN028, SN008
34 Distributor Textile SN009, SN026, SN027, SN028, SN008
35 Distributor Telecom SN010, SN026, SN027, SN028, SN008
36 Distributor Petroleum SN012, SN026, SN027, SN028, SN008
Electricity
37 Distributor SN013, SN026, SN027, SN028, SN008
Distribution
38 Distributor Gas Distribution SN014, SN026, SN027, SN028, SN008
39 Distributor Services SN018, SN019, SN026, SN027, SN028, SN008
40 Distributor Automobile SN020, SN026, SN027, SN028, SN008
41 Distributor CNG Stations SN023, SN026, SN027, SN028, SN008
42 Distributor Pharmaceuticals SN025, SN026, SN027, SN028, SN008
43 Distributor Wholesale / Retails SN001, SN002, SN026, SN027, SN028, SN008
SN001, SN002, SN005, SN006, SN007, SN015, SN016, SN017, SN021,
46 Wholesaler All Other Sectors
SN022, SN024, SN026, SN027, SN028, SN008
47 Wholesaler Steel SN003, SN004, SN011, SN026, SN027, SN028, SN008
48 Wholesaler FMCG SN008, SN026, SN027, SN028, SN008
49 Wholesaler Textile SN009, SN026, SN027, SN028, SN008
50 Wholesaler Telecom SN010, SN026, SN027, SN028, SN008
51 Wholesaler Petroleum SN012, SN026, SN027, SN028, SN008
Electricity
52 Wholesaler SN013, SN026, SN027, SN028, SN008
Distribution
53 Wholesaler Gas Distribution SN014, SN026, SN027, SN028, SN008
54 Wholesaler Services SN018, SN019, SN026, SN027, SN028, SN008
55 Wholesaler Automobile SN020, SN026, SN027, SN028, SN008
56 Wholesaler CNG Stations SN023, SN026, SN027, SN028, SN008

47
Document Version :1.0 PRAL © 2025 – All rights reserved Page 47 of 50
DI API Technical Specification

57 Wholesaler Pharmaceuticals SN025, SN026, SN027, SN028, SN008


58 Wholesaler Wholesale / Retails SN001, SN002, SN026, SN027, SN028, SN008
SN001, SN002, SN005, SN006, SN007, SN015, SN016, SN017, SN021,
61 Exporter All Other Sectors
SN022, SN024
SN001, SN002, SN005, SN006, SN007, SN015, SN016, SN017, SN021,
62 Exporter Steel
SN022, SN024, SN003, SN004, SN011
SN001, SN002, SN005, SN006, SN007, SN015, SN016, SN017, SN021,
63 Exporter FMCG
SN022, SN024, SN008
SN001, SN002, SN005, SN006, SN007, SN015, SN016, SN017, SN021,
64 Exporter Textile
SN022, SN024, SN009
SN001, SN002, SN005, SN006, SN007, SN015, SN016, SN017, SN021,
65 Exporter Telecom
SN022, SN024, SN010
SN001, SN002, SN005, SN006, SN007, SN015, SN016, SN017, SN021,
66 Exporter Petroleum
SN022, SN024, SN012
Electricity SN001, SN002, SN005, SN006, SN007, SN015, SN016, SN017, SN021,
67 Exporter
Distribution SN022, SN024, SN013
SN001, SN002, SN005, SN006, SN007, SN015, SN016, SN017, SN021,
68 Exporter Gas Distribution
SN022, SN024, SN014
SN001, SN002, SN005, SN006, SN007, SN015, SN016, SN017, SN021,
69 Exporter Services
SN022, SN024, SN018, SN019
SN001, SN002, SN005, SN006, SN007, SN015, SN016, SN017, SN021,
70 Exporter Automobile
SN022, SN024, SN020
SN001, SN002, SN005, SN006, SN007, SN015, SN016, SN017, SN021,
71 Exporter CNG Stations
SN022, SN024, SN023
SN001, SN002, SN005, SN006, SN007, SN015, SN016, SN017, SN021,
72 Exporter Pharmaceuticals
SN022, SN024, SN025
SN001, SN002, SN005, SN006, SN007, SN015, SN016, SN017, SN021,
73 Exporter Wholesale / Retails
SN022, SN024, SN026, SN027, SN028, SN008
SN001, SN002, SN005, SN006, SN007, SN015, SN016, SN017, SN021,
76 Retailer All Other Sectors
SN022, SN024, SN026, SN027, SN028, SN008
77 Retailer Steel SN003, SN004, SN011
78 Retailer FMCG SN026, SN027, SN028, SN008
79 Retailer Textile SN009, SN026, SN027, SN028, SN008
80 Retailer Telecom SN010, SN026, SN027, SN028, SN008
81 Retailer Petroleum SN012, SN026, SN027, SN028, SN008
Electricity
82 Retailer SN013, SN026, SN027, SN028, SN008
Distribution
83 Retailer Gas Distribution SN014, SN026, SN027, SN028, SN008
84 Retailer Services SN018, SN019, SN026, SN027, SN028, SN008
85 Retailer Automobile SN020, SN026, SN027, SN028, SN008
86 Retailer CNG Stations SN023, SN026, SN027, SN028, SN008

48
Document Version :1.0 PRAL © 2025 – All rights reserved Page 48 of 50
DI API Technical Specification

87 Retailer Pharmaceuticals SN025, SN026, SN027, SN028, SN008


88 Retailer Wholesale / Retails SN026, SN027, SN028, SN008
Service SN001, SN002, SN005, SN006, SN007, SN015, SN016, SN017, SN021,
91 All Other Sectors
Provider SN022, SN024, SN018, SN019
Service
92 Steel SN003, SN004, SN011, SN018, SN019
Provider
Service
93 FMCG SN008, SN018, SN019
Provider
Service
94 Textile SN009, SN018, SN019
Provider
Service
95 Telecom SN010, SN018, SN019
Provider
Service
96 Petroleum SN012, SN018, SN019
Provider
Service Electricity
97 SN013, SN018, SN019
Provider Distribution
Service
98 Gas Distribution SN014, SN018, SN019
Provider
Service
99 Services SN018, SN019
Provider
Service
100 Automobile SN020, SN018, SN019
Provider
Service
101 CNG Stations SN023, SN018, SN019
Provider
Service
102 Pharmaceuticals SN025, SN018, SN019
Provider
Service
103 Wholesale / Retails SN026, SN027, SN028, SN008, SN018, SN019
Provider
SN001, SN002, SN005, SN006, SN007, SN015, SN016, SN017, SN021,
106 Other All Other Sectors
SN022, SN024
SN001, SN002, SN005, SN006, SN007, SN015, SN016, SN017, SN021,
107 Other Steel
SN022, SN024, SN003, SN004, SN011
SN001, SN002, SN005, SN006, SN007, SN015, SN016, SN017, SN021,
108 Other FMCG
SN022, SN024, SN008
SN001, SN002, SN005, SN006, SN007, SN015, SN016, SN017, SN021,
109 Other Textile
SN022, SN024, SN009
SN001, SN002, SN005, SN006, SN007, SN015, SN016, SN017, SN021,
110 Other Telecom
SN022, SN024, SN010
SN001, SN002, SN005, SN006, SN007, SN015, SN016, SN017, SN021,
111 Other Petroleum
SN022, SN024, SN012
Electricity SN001, SN002, SN005, SN006, SN007, SN015, SN016, SN017, SN021,
112 Other
Distribution SN022, SN024, SN013

49
Document Version :1.0 PRAL © 2025 – All rights reserved Page 49 of 50
DI API Technical Specification

SN001, SN002, SN005, SN006, SN007, SN015, SN016, SN017, SN021,


113 Other Gas Distribution
SN022, SN024, SN014
SN001, SN002, SN005, SN006, SN007, SN015, SN016, SN017, SN021,
114 Other Services
SN022, SN024, SN018, SN019
SN001, SN002, SN005, SN006, SN007, SN015, SN016, SN017, SN021,
115 Other Automobile
SN022, SN024, SN020
SN001, SN002, SN005, SN006, SN007, SN015, SN016, SN017, SN021,
116 Other CNG Stations
SN022, SN024, SN023
SN001, SN002, SN005, SN006, SN007, SN015, SN016, SN017, SN021,
117 Other Pharmaceuticals
SN022, SN024, SN025
SN001, SN002, SN005, SN006, SN007, SN015, SN016, SN017, SN021,
118 Other Wholesale / Retails
SN022, SN024, SN026, SN027, SN028, SN008

50
Document Version :1.0 PRAL © 2025 – All rights reserved Page 50 of 50

You might also like