- Knowledge Base - https://help.fbr.gov.pk -

Liberated Model – API References Help

Web Methods

  1. RefData
    • post /ref-data/sendOTP
    • post /ref-data/verifyOTP
    • post /ref-data/RegisterThirdPartyTaxPayer
    • get /workflow/getwealthstatement
    • get /workflow/CheckCalculation
    • get /ref-data/attachmenttype
    • get /ref-data/attribute
    • get /ref-data/directors
    • get /ref-data/intermediary
    • get /ref-data/payments
    • get /ref-data/profile
  2. Utils
    • post /utils/validateamountcodes
  3. WorkFlow
    • post /workflow/submit

RefData

post /ref-data/sendOTP

Send OTP

Query parameters

Registration No.

Query Parameter — format: string

Client ID

Query Parameter — format: string

Return type

String [SendOTPEntity]

Example data

Content-Type: application/json

  {

“registrationNo”: “string”,

“clientId”: “string”

  }

Sample Test for Method “Send OTP” using Postman

  1. In postman select the “Post” Method.
  2. Paste provided a URL for this method.
  3. Click on Auth.
    • Select Token type as “bearer token”
    • Enter Access token in the token field
  4. Copy the script provided above and paste it into the body of the postman.
  5. Click on the “Send” button.

Produces

This API call produces the following media types according to the Accept request header; the media type will be conveyed by the Content-Type response header.

Responses

200

successful operation

post /ref-data/verifyOTP

Verify OTP

Query parameters

Registration No.

Query Parameter — format: string

OTP

Query Parameter — format: string

Client ID

Query Parameter — format: string

Return type

String [VerifyOTPEntity]

Example data

Content-Type: application/json 

  {

“registrationNo”: “string”,

“otp”: “000001”,

“clientId”: “string”

  }

Sample Test for Method “Verify OTP” using Postman

  1. In postman select the “Post” Method.
  2. Paste provided a URL for this method.
  3. Click on Auth.
    • Select Token type as “bearer token”
    • Enter Access token in the token field
  4. Copy the script provided above and paste it into the body of the postman.
  5. Click on the “Send” button.

Produces

This API call produces the following media types according to the Accept request header; the media type will be conveyed by the Content-Type response header.

Responses

200

successful operation

post /ref-data/RegisterThirdPartyTaxPayer

Register Third Party Taxpayer

Query parameters

Registration No.

Query Parameter — format: string

Client ID

Query Parameter — format: string

TaxPayer Type

Query Parameter — format: string

Return type

String [RegistrationEntity]

Example data

Content-Type: application/json

  {

“registrationNo”: “string”,

“clientId”: “string”,

“taxPayerType”: “1”

  }

Sample Test for Method “Register Third Party Taxpayer” using Postman

  1. In postman select the “Post” Method.
  2. Paste provided URL for this method.
  3. Click on Auth.
    • Select Token type as “bearer token”
    • Enter Access token in the token field.
  4. Copy the script provided above and paste it into the body of the postman.
  5. Click on the “Send” button.

Produces

This API call produces the following media types according to the Accept request header; the media type will be conveyed by the Content-Type response header.

Responses

200

successful operation

get /workflow/getWealthstatement

Get Previous Year Wealth Statement

Query parameters

Registration No.

Query Parameter — format: string

TaxPeriod

Query Parameter — format: string

Return type

String [WealthStatementEntity]

Example data

Content-Type: application/json

[

  {

“amountCode”: “string”,

“description”: string,

“repetition”: string,

“amount”: “number”

}

 ]

Sample Test for Method “Previous Year Wealth Statement” using Postman

  1. In postman select the “Get” method.
  2. Paste provided a URL for this method.
  3. Click on Auth.
    • Select Token type as “bearer token”
    • Enter Access token in the token field
  4. Click on Params
    • Write attribute name “RegistrationNo” in the key field
    • Enter value in the Value field
    • Write attribute name “TaxYear” in key field
    • Enter value in the Value field
  5. Click on the “Send” button.

Produces

This API call produces the following media types according to the Accept request header; the media type will be conveyed by the Content-Type response header.

Responses

200

successful operation

get /workflow/CheckCalculation

Check Calculations

Query parameters

Registration No.

Query Parameter — format: string

TaxPeriod

Query Parameter — format: string

Return type

String [CalculationEntity]

Example data

Content-Type: application/json

[

  {

“RegistrationNo”: “string”,

“TaxPeriod”: “string”

  }

 ]

Sample Test for Method “Check Calculations” using Postman

  1. In postman select the “Get” method.
  2. Paste provided a URL for this method.
  3. Click on Auth.
    • Select Token type as “bearer token”
    • Enter Access token in the token field
  4. Click on Params
    • Write attribute name “RegistrationNo” in the key field
    • Enter value in the value field
    • Write attribute name “TaxPeriod” in key field
    • Enter value in the value field
  5. Click on the “Send” button.

Produces

This API call produces the following media types according to the Accept request header; the media type will be conveyed by the Content-Type response header.

Responses

200

successful operation

geT /ref-data/attachmenttype

Get Attachments

Query parameters

TaskCode (optional)

Query Parameter — format: int64

Return type

array[AttachmentEntity]

Example data

Content-Type: application/json

[

  {

    “documentDescription”: “string”,

    “processRuleID”: 0,

“documentCode”: “string”

  },

  {

    “documentDescription”: “string”,

    “processRuleID”: 0,

“documentCode”: “string”

}

]

Sample Test for Method “Get Attachment Type” using Postman

  1. In postman select the “Get” method.
  2. Paste provided a URL for this method. [19]
  3. Click on Auth.
    • Select Token type as “bearer token”
    • Enter Access token in the token field [20]
  4. Click on Params.
    • Write attribute name “TaskCode” in key field
    • Enter value in the Value field
  5. Click on the “Send” button. [21]

Produces

This API call produces the following media types according to the Accept request header; the media type will be conveyed by the Content-Type response header.

Responses

200

successful operation

get/ref-data​/attribute

GetAttributeValues

Query parameters

AttributeID (optional)

Query Parameter — format: int32

Return type

array[AttributeEntity]

Example data

Content-Type: application/json

   {

    “attributeDescription”: “string”,

    “valueDescription”: “string”,

    “valueCode”: 0,

“attributeID”: 0

  },

  {

    “attributeDescription”: “string”,

    “valueDescription”: “string”,

    “valueCode”: 0,

“attributeID”: 0

  }

]

Sample Test for Method “Get Attribute” using Postman

  1. In postman select the “Get” Method.
  2. Paste provided a URL for this method.
  3. Click on Auth(if not provided already).
    • Select Token type as “bearer token”
    • Enter Access token in the token field
  4. Click on Params.
    • Write attribute name “AttributeID” in key field
    • Enter value in the Value field
  5. Click on the “Send” button. [22]

Produces

This API call produces the following media types according to the Accept request header; the media type will be conveyed by the Content-Type response header.

Responses

200

successful operation

get /ref-data/directors

Get directors

Query parameters

RegistrationNo (optional)

Query Parameter — format: string

Return type

array[DirectorEntity]

Example data

Content-Type: application/json

[

  {

    “registrationNo”: “string”,

    “directorRegistrationNo”: “string”,

    “companyName”: “string”,

    “directorName”: “string”

  },

{

    “registrationNo”: “string”,

    “directorRegistrationNo”: “string”,

    “companyName”: “string”,

    “directorName”: “string”

  },

{

    “registrationNo”: “string”,

    “directorRegistrationNo”: “string”,

    “companyName”: “string”,

    “directorName”: “string”

  }

]

Sample Test for Method “Get Directors” using Postman

  1. In postman select the “Get” Method.
  2. Paste provided a URL for this method.
  3. Click on Auth(if not provided already).
    • Select Token type as “bearer token”
    • Enter Access token in the token field
  4. Click on Params.
    • Write attribute name “RegistrationNo” in key field
    • Enter value in the Value field
  5. Click on the “Send” button [23]

Produces

This API call produces the following media types according to the Accept request header; the media type will be conveyed by the Content-Type response header.

Responses

200

successful operation

get /ref-data/intermediary

Get intermediary

Query parameters

RegistrationNo (optional)

Query Parameter — format: string

Return type

array[IntermediaryEntity]

Example data

Content-Type: application/json

[

  {

    “registrationNo”: “string”,

    “intermediaryRegistrationNo”: “string”,

    “intermediaName”: “string”,

    “clientName”: “string”

  }

]

Sample Test for Method “Get Intermidiatory” using Postman

  1. In postman select the “Get” Method.
  2. Paste provided a URL for this method.
  3. Click on Auth(if not provided already).
    • Select Token type as “bearer token”
    • Enter Access token in the token field
  4. Click on Params.
    • Write attribute name “RegistrationNo” in key field
    • Enter value in the Value field
  5. Click on the “Send” button [24]

Produces

This API call produces the following media types according to the Accept request header; the media type will be conveyed by the Content-Type response header.

Responses

200

successful operation

get /ref-data/payments

Get all Payments

Query parameters

RegistrationNo

Query Parameter — format: string

TaxYear

Query Parameter — format: string

Return type

array[PaymentEntity]

Example data

Content-Type: application/json

[

  {

“cprno”: “string”,

“amountCode”: “number”,

“taxMonth”: “integer”,

“branchCode”: number,

“registrationNo”: “integer”,

“amount”: numeric,

“paymentDate”: “2020-09-03T11:02:46”,

“taxYear”: “string”,

“payerName”: “string”,

“payerRegistrationNo”: “integer”,

“payerNTN”: “integer”

  }

]

Sample Test for Method “Get Payment” using Postman

  1. In postman select the “Get” Method.
  2. Paste provided a URL for this method.
  3. Click on Auth(if not provided already).
    • Select Token type as “bearer token”
    • Enter Access token in the token field
  4. Click on Params.
    • Write attribute name “RegistrationNo” in key field
    • Enter a value in the Value field
    • Write attribute name “TaxYear” in key field
    • Enter value in the Value field
  5. Click on the “Send” button [25]

Produces

This API call produces the following media types according to the Accept request header; the media type will be conveyed by the Content-Type response header.

Responses

200

successful operation

get /ref-data/profile

Get profile

Query parameters

RegistrationNo (optional)

Query Parameter — format: string

Return type

array[ProfileEntity]

Example data

Content-Type: application/json

[

  {

    “registrationNo”: “string”,

    “personCode”: “string”

  }

]

Sample Test for Method “Get Profile” using Postman

  1. In postman select the “Get” Method.
  2. Paste given URL to get profile. [26]
  3. Click on Auth.
    • Select Token type as “bearer token”
    • Enter Access token in the token field [27]
  4. Click on Params.
    • Write attribute name “RegistrationNo” in key field
    • Enter value in the value field
  5. Click on the “Send” button [28]

Produces

This API call produces the following media types according to the Accept request header; the media type will be conveyed by the Content-Type response header.

Responses

200

successful operation

Utils

post /utils/validateamountcodes

Verify amount codes

Request body

body AmountCode (optional)

Body Parameter —

Return type

array[AmountCode]

Example data

Content-Type: application/json

{

“amountCodes”: [

{

“testAmountCode”: “string”

}

],

“taxPeriod”: “string”,

“personCode”: 0

}

Produces

This API call produces the following media types according to the Accept request header; the media type will be conveyed by the Content-Type response header.

Responses

200

successful operation

WorkFlow

post /workflow/submit

(SubmitWorkFlow)

Request body

body IncomeTax Model (optional)

Body Parameter —

Consumes

Request body

body IncomeTax Model (optional)

Body Parameter —

{

“registrationNo”: “string”,

“taxYear”: 0,

“startDate”: “2019-12-17T05:08:38.359Z”,

“endDate”: “2019-12-17T05:08:38.359Z”,

“employment”: {

“salaries”: [

{

“amountCode”: “string”,

“repetition”: true,

“identifierValue”: “string”,

“contentValue”: “string”,

“totalAmount”: 0,

“amountExemptfromTax_SubjecttoFixed_FinalTax”: 0,

“amountSubjecttoNormalTax”: 0

}

]

},

“property”: {

“propertyReceipts_Deductions”: [

{

“amountCode”: “string”,

“repetition”: true,

“identifierValue”: “string”,

“contentValue”: “string”,

“totalAmount”: 0,

“amountExemptfromTax_SubjecttoFixed_FinalTax”: 0,

“amountSubjecttoNormalTax”: 0

}

]

},

“business”: {

“manufacturing_TradingItems”: [

{

“amountCode”: “string”,

“repetition”: true,

“identifierValue”: “string”,

“contentValue”: “string”,

“totalAmount”: 0,

“amountExemptfromTax_SubjecttoFixed_FinalTax”: 0,

“amountSubjecttoNormalTax”: 0

}

],

“otherRevenues”: [

{

“amountCode”: “string”,

“repetition”: true,

“identifierValue”: “string”,

“contentValue”: “string”,

“totalAmount”: 0,

“amountExemptfromTax_SubjecttoFixed_FinalTax”: 0,

“amountSubjecttoNormalTax”: 0

}

],

“managements”: [

{

“amountCode”: “string”,

“repetition”: true,

“identifierValue”: “string”,

“contentValue”: “string”,

“totalAmount”: 0,

“amountExemptfromTax_SubjecttoFixed_FinalTax”: 0,

“amountSubjecttoNormalTax”: 0

}

],

“administratives”: [

{

“amountCode”: “string”,

“repetition”: true,

“identifierValue”: “string”,

“contentValue”: “string”,

“totalAmount”: 0,

“amountExemptfromTax_SubjecttoFixed_FinalTax”: 0,

“amountSubjecttoNormalTax”: 0

}

],

“sellingAndFinancialExpenses”: [

{

“amountCode”: “string”,

“repetition”: true,

“identifierValue”: “string”,

“contentValue”: “string”,

“totalAmount”: 0,

“amountExemptfromTax_SubjecttoFixed_FinalTax”: 0,

“amountSubjecttoNormalTax”: 0

}

],

“inadmissible_AdmissibleDeductions”: [

{

“amountCode”: “string”,

“repetition”: true,

“identifierValue”: “string”,

“contentValue”: “string”,

“totalAmount”: 0,

“amountExemptfromTax_SubjecttoFixed_FinalTax”: 0,

“amountSubjecttoNormalTax”: 0

}

],

“businessAdjustments”: [

{

“amountCode”: “string”,

“repetition”: true,

“identifierValue”: “string”,

“contentValue”: “string”,

“totalAmount”: 0,

“amountExemptfromTax_SubjecttoFixed_FinalTax”: 0,

“amountSubjecttoNormalTax”: 0

}

],

“businessAsset_Equity_Liabilities”: [

{

“amountCode”: “string”,

“repetition”: true,

“identifierValue”: “string”,

“contentValue”: “string”,

“amount”: 0

}

],

“transactionsBelowPKR50MillionwithNonResidents”: [

{

“amountCode”: “string”,

“repetition”: true,

“identifierValue”: “string”,

“contentValue”: “string”,

“receipts”: 0,

“payments”: 0

}

]

},

“capitalAssets”: {

“capitalGains_Losses”: [

{

“amountCode”: “string”,

“repetition”: true,

“identifierValue”: “string”,

“contentValue”: “string”,

“totalAmount”: 0,

“amountExemptfromTax_SubjecttoFixed_FinalTax”: 0,

“amountSubjecttoNormalTax”: 0

}

],

“longTerms”: [

{

“amountCode”: “string”,

“repetition”: true,

“identifierValue”: “string”,

“contentValue”: “string”,

“totalAmount”: 0,

“amountExemptfromTax_SubjecttoFixed_FinalTax”: 0,

“amountSubjecttoNormalTax”: 0

}

],

“shortTerms”: [

{

“amountCode”: “string”,

“repetition”: true,

“identifierValue”: “string”,

“contentValue”: “string”,

“totalAmount”: 0,

“amountExemptfromTax_SubjecttoFixed_FinalTax”: 0,

“amountSubjecttoNormalTax”: 0

}

],

“capitalAssetsAdjustments”: [

{

“amountCode”: “string”,

“repetition”: true,

“identifierValue”: “string”,

“contentValue”: “string”,

“totalAmount”: 0,

“amountExemptfromTax_SubjecttoFixed_FinalTax”: 0,

“amountSubjecttoNormalTax”: 0

}

]

},

“otherSources”: {

“otherResourceReceipt_Deductions”: [

{

“amountCode”: “string”,

“repetition”: true,

“identifierValue”: “string”,

“contentValue”: “string”,

“totalAmount”: 0,

“amountExemptfromTax_SubjecttoFixed_FinalTax”: 0,

“amountSubjecttoNormalTax”: 0

}

]

},

“foreignSources_Agriculture”: {

“foreignSources”: [

{

“amountCode”: “string”,

“repetition”: true,

“identifierValue”: “string”,

“contentValue”: “string”,

“totalAmount”: 0,

“amountExemptfromTax_SubjecttoFixed_FinalTax”: 0,

“amountSubjecttoNormalTax”: 0

}

],

“agricultures”: [

{

“amountCode”: “string”,

“repetition”: true,

“identifierValue”: “string”,

“contentValue”: “string”,

“totalAmount”: 0,

“amountExemptfromTax_SubjecttoFixed_FinalTax”: 0,

“amountSubjecttoNormalTax”: 0

}

]

},

“taxChargeable_Payments”: {

“deductibleAllowances”: [

{

“amountCode”: “string”,

“repetition”: true,

“identifierValue”: “string”,

“contentValue”: “string”,

“amount”: 0,

“inadmissible”: 0,

“admissible”: 0

}

],

“taxChargeables”: [

{

“amountCode”: “string”,

“repetition”: true,

“identifierValue”: “string”,

“contentValue”: “string”,

“amount”: 0

}

],

“taxCredits”: [

{

“amountCode”: “string”,

“repetition”: true,

“identifierValue”: “string”,

“contentValue”: “string”,

“eligibleAmount”: 0,

“ineligibleAmount”: 0,

“taxCredit”: 0

}

],

“taxReductions”: [

{

“amountCode”: “string”,

“repetition”: true,

“identifierValue”: “string”,

“contentValue”: “string”,

“amount”: 0

}

],

“adjustableTaxes”: [

{

“amountCode”: “string”,

“repetition”: true,

“identifierValue”: “string”,

“contentValue”: “string”,

“receipts_Value”: 0,

“taxCollected_Deducted”: 0,

“taxChargeable”: 0

}

],

“final_Fixed_Minimum_Average_Relevant_ReducedTaxes”: [

{

“amountCode”: “string”,

“repetition”: true,

“identifierValue”: “string”,

“contentValue”: “string”,

“receipts_Value”: 0,

“taxCollected_Deducted”: 0,

“taxChargeable”: 0

}

],

“computations”: [

{

“amountCode”: “string”,

“repetition”: true,

“identifierValue”: “string”,

“contentValue”: “string”,

“totalAmount”: 0,

“amountExemptfromTax_SubjecttoFixed_FinalTax”: 0,

“amountSubjecttoNormalTax”: 0

}

]

},

“amortizations”: [

{

“amountCode”: “string”,

“repetition”: true,

“identifierValue”: “string”,

“contentValue”: “string”,

“remainingUsefulYears”: 0,

“extentofUse”: 0,

“amortization”: 0,

“getwDVBF”: 0

}

],

“depreciations”: [

{

“amountCode”: “string”,

“repetition”: true,

“identifierValue”: “string”,

“contentValue”: “string”,

“wdvbf”: 0,

“deleteion”: 0,

“addition”: 0,

“newAddition”: 0,

“extentofUse”: 0,

“initialAllowance”: 0,

“depreciation”: 0,

“wdvcf”: 0

}

],

“minimumTaxes”: [

{

“amountCode”: “string”,

“repetition”: true,

“identifierValue”: “string”,

“contentValue”: “string”,

“receipts_Value”: 0,

“taxCollected_Deducted_Paid”: 0,

“taxChargeable”: 0,

“attributableTaxableIncome”: 0,

“taxonAttributableTaxableIncome”: 0,

“differenceofMinimumTaxChargeable”: 0

}

],

“optionOutofPTRs”: [

{

“amountCode”: “string”,

“repetition”: true,

“identifierValue”: “string”,

“contentValue”: “string”,

“receipts_Value”: 0,

“taxCollected_Deducted_Paid”: 0,

“taxChargeable”: 0,

“attributableTaxableIncome”: 0,

“taxonAttributableTaxableIncome”: 0,

“differenceIfLessthanOrEqualsZero”: 0

}

],

“cprs”: [

“string”

],

“attributes”: [

{

“attributeId”: 0,

“valueCode”: “string”

}

],

“attachments”: [

{

“fileName”: “string”,

“documentCode”: “string”,

“file”: “string”

}

],

“personalAssets_Liabilities”: {

“personalExpenses”: [

{

“amountCode”: “string”,

“repetition”: true,

“identifierValue”: “string”,

“contentValue”: “string”,

“amount”: 0

}

],

“personalAsset_Liabilities”: [

{

“amountCode”: “string”,

“repetition”: true,

“identifierValue”: “string”,

“contentValue”: “string”,

“amount”: 0

}

],

“reconciliationofNetAssets”: [

{

“amountCode”: “string”,

“repetition”: true,

“identifierValue”: “string”,

“contentValue”: “string”,

“amount”: 0

}

]

},

“intermitRegistrationNo”: “string”

}

 Sample Test for Method “Submit Return” using Postman

  1. In post man select “Post” Method.
  2. Paste given url for get profile. [29]
  3. Copy the script provided above and paste it into the body of postman
  4. Click on “Send” button [30]

Produces

This API call produces the following media types according to the Accept request header; the media type will be conveyed by the Content-Type response header.

Responses

default

successful operation

Click on the following links to view related articles for Liberated Model:

Technical Support: