> ## Documentation Index
> Fetch the complete documentation index at: https://developer.sandbox.co.in/llms.txt
> Use this file to discover all available pages before exploring further.

# Validate ITR

> Check an ITR JSON against the e-Filing portal's validations before you file it.

Validate the ITR JSON before you call [Submit ITR](https://developer.sandbox.co.in/api-reference/it/compliance/eri/itr/endpoints/submit-itr.md), and fix the errors the e-Filing portal reports.

## Prepare the ITR JSON

* Follow the JSON schema the Income Tax Department publishes for the form and assessment year on the [e-Filing portal](https://www.incometax.gov.in/iec/foportal/downloads/income-tax-returns).
* Include `CreationInfo` with a `Digest` field. Sandbox sets `Digest`, `SWVersionNo`, `SWCreatedBy`, `JSONCreatedBy` and `IntermediaryCity`.
* Sandbox reads the PAN from `PersonalInfo.PAN`, so use the same PAN as `tax_payer_id`.
* Sandbox treats the return as revised when the JSON has a `ReceiptNo`, and as original otherwise.
* Sandbox removes single quotes (`'`) from the JSON before it sends it to the e-Filing portal.


## OpenAPI

````yaml api-reference/it/compliance/openapi.json POST /it/compliance/eri/tax-payers/{tax_payer_id}/itrs/validate
openapi: 3.1.0
info:
  title: in-co-sandbox-it-compliance
  version: '1.0'
servers:
  - url: https://test-api.sandbox.co.in
    description: test
  - url: https://api.sandbox.co.in
    description: prod
security:
  - {}
paths:
  /it/compliance/eri/tax-payers/{tax_payer_id}/itrs/validate:
    post:
      tags:
        - in.gov.incometax.eri
        - tax-payer
        - itr
      summary: Validate ITR
      description: >-
        Check an ITR JSON against the e-Filing portal's validations before you
        submit it.


        Sandbox reads the PAN from `PersonalInfo.PAN` in the ITR JSON, so use
        the same PAN as `tax_payer_id`. Sandbox also sets `Digest`,
        `SWVersionNo`, `SWCreatedBy`, `JSONCreatedBy` and `IntermediaryCity` in
        `CreationInfo`.


        The API returns HTTP 200 even when the e-Filing portal rejects the
        request, so check `data.successFlag`. Example data is fictional.
      operationId: validateItr
      parameters:
        - name: tax_payer_id
          in: path
          description: PAN of the taxpayer.
          required: true
          example: ABCPS1234K
          schema:
            type: string
            pattern: ^[A-Z]{5}[0-9]{4}[A-Z]$
        - name: Authorization
          in: header
          description: >-
            Sandbox access token. Send the token without the `Bearer` prefix.
            For token-generation steps, see the [Quickstart
            guide](https://developer.sandbox.co.in/guides/get-started/quickstart).
          required: true
          example: '{{access_token}}'
          schema:
            type: string
        - name: x-api-key
          in: header
          description: Sandbox API key.
          required: true
          example: '{{api_key}}'
          schema:
            type: string
        - name: Content-Type
          in: header
          description: Request body format.
          required: true
          example: application/json
          schema:
            type: string
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              required:
                - ITR
              properties:
                ITR:
                  type: object
                  additionalProperties: true
                  description: >-
                    The return, keyed by form, such as `ITR1`. Follow the JSON
                    schema the Income Tax Department publishes for the form and
                    assessment year on the [e-Filing
                    portal](https://www.incometax.gov.in/iec/foportal/downloads/income-tax-returns).
                    Include `CreationInfo` with a `Digest` field.
            examples:
              ITR-1:
                summary: ITR-1
                description: Fictional example data.
                value:
                  ITR:
                    ITR1:
                      CreationInfo:
                        IntermediaryCity: Ahmedabad
                        Digest: '-'
                        SWVersionNo: 2026.0.0
                        SWCreatedBy: SW12345678
                        JSONCreatedBy: SW12345678
                        JSONCreationDate: '2026-07-15'
                      Form_ITR1:
                        FormName: ITR-1
                        Description: >-
                          For Indls having Income from Salary, Pension, family
                          pension and Interest
                        AssessmentYear: '2026'
                        SchemaVer: Ver1.0
                        FormVer: Ver1.0
                      PersonalInfo:
                        AssesseeName:
                          FirstName: RAHUL
                          SurNameOrOrgName: SHARMA
                        PAN: ABCPS1234K
                        DOB: '1990-08-15'
                        Address:
                          CountryCodeMobile: 91
                          MobileNo: 9876543210
                          EmailAddress: rahul.sharma@example.com
                          ResidenceNo: '12'
                          ResidenceName: Sunrise Apartments
                          RoadOrStreet: CG Road
                          LocalityOrArea: Navrangpura
                          CityOrTownOrDistrict: AHMEDABAD
                          StateCode: '11'
                          CountryCode: '91'
                          PinCode: 380009
                        SecondaryAdd: 'N'
                        EmployerCategory: OTH
                      FilingStatus:
                        ReturnFileSec: 11
                        ItrFilingDueDate: '2026-07-31'
                        OptOutNewTaxRegime: 'N'
                        SeventhProvisio139: 'Y'
                        IncrExpAggAmt2LkTrvFrgnCntryFlg: 'N'
                        IncrExpAggAmt1LkElctrctyPrYrFlg: 'N'
                        clauseiv7provisio139i: 'Y'
                        clauseiv7provisio139iDtls:
                          - clauseiv7provisio139iNature: '1'
                            clauseiv7provisio139iAmount: 30000
                        AsseseeRepFlg: 'N'
                      ITR1_IncomeDeductions:
                        GrossSalary: 900000
                        Salary: 900000
                        PerquisitesValue: 0
                        ProfitsInSalary: 0
                        AllwncExemptUs10:
                          TotalAllwncExemptUs10: 0
                        NetSalary: 900000
                        DeductionUs16: 75000
                        DeductionUs16ia: 75000
                        EntertainmentAlw16ii: 0
                        ProfessionalTaxUs16iii: 0
                        IncomeFromSal: 825000
                        TotalIncomeChargeableUnHP: 0
                        OthersInc:
                          OthersIncDtlsOthSrc:
                            - OthSrcNatureDesc: DIV
                              OthSrcOthAmount: 500
                              DividendInc:
                                DateRange:
                                  Upto15Of6: 500
                                  Upto15Of9: 0
                                  Up16Of9To15Of12: 0
                                  Up16Of12To15Of3: 0
                                  Up16Of3To31Of3: 0
                        IncomeOthSrc: 500
                        GrossTotIncome: 825500
                        GrossTotIncomeIncLTCG112A: 825500
                        UsrDeductUndChapVIA:
                          Section80C: 0
                          Section80CCC: 0
                          Section80CCDEmployeeOrSE: 0
                          Section80CCD1B: 0
                          Section80CCDEmployer: 0
                          Section80D: 0
                          Section80DD: 0
                          Section80DDB: 0
                          Section80E: 0
                          Section80EE: 0
                          Section80EEA: 0
                          Section80EEB: 0
                          Section80G: 0
                          Section80GG: 0
                          Section80GGA: 0
                          Section80GGC: 0
                          Section80TTA: 0
                          Section80TTB: 0
                          Section80U: 0
                          AnyOthSec80CCH: 0
                          TotalChapVIADeductions: 0
                        DeductUndChapVIA:
                          Section80C: 0
                          Section80CCC: 0
                          Section80CCDEmployeeOrSE: 0
                          Section80CCD1B: 0
                          Section80CCDEmployer: 0
                          Section80D: 0
                          Section80DD: 0
                          Section80DDB: 0
                          Section80E: 0
                          Section80EE: 0
                          Section80EEA: 0
                          Section80EEB: 0
                          Section80G: 0
                          Section80GG: 0
                          Section80GGA: 0
                          Section80GGC: 0
                          Section80TTA: 0
                          Section80TTB: 0
                          Section80U: 0
                          AnyOthSec80CCH: 0
                          TotalChapVIADeductions: 0
                        TotalIncome: 825500
                      ITR1_TaxComputation:
                        TotalTaxPayable: 22550
                        Rebate87A: 22550
                        TaxPayableOnRebate: 0
                        EducationCess: 0
                        GrossTaxLiability: 0
                        Section89: 0
                        NetTaxLiability: 0
                        IntrstPay:
                          IntrstPayUs234A: 0
                          IntrstPayUs234B: 0
                          IntrstPayUs234C: 0
                          LateFilingFee234F: 0
                          FeeFurnish234I: 0
                        TotalIntrstPay: 0
                        TotTaxPlusIntrstPay: 0
                      TaxPaid:
                        TaxesPaid:
                          AdvanceTax: 0
                          TDS: 30000
                          TCS: 0
                          SelfAssessmentTax: 0
                          TotalTaxesPaid: 30000
                        BalTaxPayable: 0
                      Refund:
                        RefundDue: 30000
                        BankAccountDtls:
                          AddtnlBankDetails:
                            - IFSCCode: HDFC0001234
                              BankName: HDFC BANK
                              BankAccountNo: '50100123456789'
                              AccountType: SB
                              UseForRefund: 'true'
                      TDSonSalaries:
                        TDSonSalary:
                          - EmployerOrDeductorOrCollectDetl:
                              TAN: AHMA12345B
                              EmployerOrDeductorOrCollecterName: ABC TECHNOLOGIES PRIVATE LIMITED
                            IncChrgSal: 825000
                            TotalTDSSal: 30000
                        TotalTDSonSalaries: 30000
                      TDSonOthThanSals:
                        TotalTDSonOthThanSals: 0
                      ScheduleTDS3Dtls:
                        TotalTDS3Details: 0
                      ScheduleTCS:
                        TotalSchTCS: 0
                      TaxPayments:
                        TotalTaxPayments: 0
                      Verification:
                        Declaration:
                          AssesseeVerName: RAHUL SHARMA
                          FatherName: SURESH SHARMA
                          AssesseeVerPAN: ABCPS1234K
                        Capacity: S
                        Place: Ahmedabad
      responses:
        '200':
          description: >-
            The e-Filing portal processed the ITR. When `data.successFlag` is
            `false`, `data.messages` and `data.errors` list the problems.
          content:
            application/json:
              schema:
                type: object
                properties:
                  code:
                    type: integer
                    description: HTTP status code.
                    examples:
                      - 200
                  timestamp:
                    type: integer
                    format: int64
                    description: Response timestamp in epoch milliseconds.
                    examples:
                      - 1793700000000
                  transaction_id:
                    type: string
                    description: Unique identifier for this API request.
                    examples:
                      - 8d3f6a2e-1b4c-4e7a-9f05-6c2b8e1d4a73
                  data:
                    type: object
                    description: Response from the e-Filing portal.
                    properties:
                      httpStatus:
                        type: string
                        description: >-
                          Status from the e-Filing portal, such as `ACCEPTED`,
                          `SUBMITTED` or `REJECTED`.
                      successFlag:
                        type: boolean
                        description: '`true` when the e-Filing portal accepted the request.'
                      messages:
                        type: array
                        description: Messages from the e-Filing portal.
                        items:
                          type: object
                          properties:
                            code:
                              type: string
                              description: e-Filing portal message code, such as `EF40010`.
                            type:
                              type: string
                              description: >-
                                Message type, such as `REMARK`, `INFO` or
                                `ERROR`.
                            desc:
                              type: string
                              description: Message text.
                            fieldName:
                              type:
                                - string
                                - 'null'
                              description: Field the message refers to, if any.
                      errors:
                        type: array
                        description: Errors and warnings from the e-Filing portal.
                        items:
                          type: object
                          properties:
                            code:
                              type: string
                              description: e-Filing portal message code, such as `EF40010`.
                            type:
                              type: string
                              description: >-
                                Message type, such as `REMARK`, `INFO` or
                                `ERROR`.
                            desc:
                              type: string
                              description: Message text.
                            fieldName:
                              type:
                                - string
                                - 'null'
                              description: Field the message refers to, if any.
                      header:
                        type: object
                        properties:
                          formName:
                            type:
                              - string
                              - 'null'
                required:
                  - code
                  - timestamp
                  - transaction_id
                  - data
              examples:
                Valid ITR:
                  summary: Valid ITR
                  description: Fictional example data.
                  value:
                    code: 200
                    timestamp: 1793700000000
                    transaction_id: c329824a-be4d-5969-bbfe-227719f32d04
                    data:
                      messages: []
                      header:
                        formName: null
                      errors: []
                      successFlag: true
                Not your client:
                  summary: Not your client
                  description: Fictional example data.
                  value:
                    code: 200
                    timestamp: 1793700000000
                    transaction_id: 25f46672-317e-5d7d-9c21-4eecdfce163d
                    data:
                      messages:
                        - code: EF500058
                          fieldName: null
                          type: ERROR
                          desc: The PAN is not a valid client for this ERI.
                      header:
                        formName: null
                      errors: []
                      successFlag: false
        '400':
          description: >-
            The e-Filing portal rejected the request as invalid, or a required
            parameter is missing.
          content:
            application/json:
              schema:
                type: object
                properties:
                  code:
                    type: integer
                    description: HTTP status code.
                  timestamp:
                    type: integer
                    format: int64
                    description: Response timestamp in epoch milliseconds.
                  transaction_id:
                    type: string
                    description: Unique identifier for this API request.
                  message:
                    type: string
                    description: Reason for the error.
                required:
                  - code
                  - timestamp
                  - transaction_id
                  - message
              examples:
                Portal rejected the request:
                  summary: Portal rejected the request
                  description: Fictional example data.
                  value:
                    code: 400
                    timestamp: 1793700000000
                    transaction_id: 5ce7e0f0-e371-515f-ac9b-00e76cca1afd
                    message: Failed to validate ITR
        '401':
          description: The `Authorization` header is missing.
          content:
            application/json:
              schema:
                type: object
                properties:
                  code:
                    type: integer
                    description: HTTP status code.
                  timestamp:
                    type: integer
                    format: int64
                    description: Response timestamp in epoch milliseconds.
                  transaction_id:
                    type: string
                    description: Unique identifier for this API request.
                  message:
                    type: string
                    description: Reason for the error.
                required:
                  - code
                  - timestamp
                  - transaction_id
                  - message
              examples:
                Missing Sandbox access token:
                  summary: Missing Sandbox access token
                  description: Fictional example data.
                  value:
                    code: 401
                    timestamp: 1793700000000
                    transaction_id: f7ed4327-53a0-53f8-bedd-3ce5c76bca02
                    message: Unauthorized
        '403':
          description: The Sandbox access token or API key is invalid or expired.
          content:
            application/json:
              schema:
                type: object
                properties:
                  code:
                    type: integer
                    description: HTTP status code.
                  timestamp:
                    type: integer
                    format: int64
                    description: Response timestamp in epoch milliseconds.
                  transaction_id:
                    type: string
                    description: Unique identifier for this API request.
                  message:
                    type: string
                    description: Reason for the error.
                required:
                  - code
                  - timestamp
                  - transaction_id
                  - message
              examples:
                Forbidden:
                  summary: Forbidden
                  description: Fictional example data.
                  value:
                    code: 403
                    timestamp: 1793700000000
                    transaction_id: f654dcc3-dfd9-5005-a053-b418f220af1b
                    message: Forbidden
        '429':
          description: The rate limit is exceeded. Retry after some time.
          content:
            application/json:
              schema:
                type: object
                properties:
                  code:
                    type: integer
                    description: HTTP status code.
                  timestamp:
                    type: integer
                    format: int64
                    description: Response timestamp in epoch milliseconds.
                  transaction_id:
                    type: string
                    description: Unique identifier for this API request.
                  message:
                    type: string
                    description: Reason for the error.
                required:
                  - code
                  - timestamp
                  - transaction_id
                  - message
        '500':
          description: >-
            Sandbox could not complete the request, or could not open a session
            with the e-Filing portal. Retry after some time.
          content:
            application/json:
              schema:
                type: object
                properties:
                  code:
                    type: integer
                    description: HTTP status code.
                  timestamp:
                    type: integer
                    format: int64
                    description: Response timestamp in epoch milliseconds.
                  transaction_id:
                    type: string
                    description: Unique identifier for this API request.
                  message:
                    type: string
                    description: Reason for the error.
                required:
                  - code
                  - timestamp
                  - transaction_id
                  - message
              examples:
                Session unavailable:
                  summary: Session unavailable
                  description: Fictional example data.
                  value:
                    code: 500
                    timestamp: 1793700000000
                    transaction_id: 7fd5a76e-f55b-5fc5-8569-602f8dba7a19
                    message: >-
                      Unable to connect to the tax department. Please try again
                      shortly.
                Internal server error:
                  summary: Internal server error
                  description: Fictional example data.
                  value:
                    code: 500
                    timestamp: 1793700000000
                    transaction_id: d3d71d59-d009-583f-b8f1-478fafa1fe9a
                    message: Internal Server Error
        '503':
          description: The e-Filing portal is unavailable. Retry after some time.
          content:
            application/json:
              schema:
                type: object
                properties:
                  code:
                    type: integer
                    description: HTTP status code.
                  timestamp:
                    type: integer
                    format: int64
                    description: Response timestamp in epoch milliseconds.
                  transaction_id:
                    type: string
                    description: Unique identifier for this API request.
                  message:
                    type: string
                    description: Reason for the error.
                required:
                  - code
                  - timestamp
                  - transaction_id
                  - message
              examples:
                Portal unavailable:
                  summary: Portal unavailable
                  description: Fictional example data.
                  value:
                    code: 503
                    timestamp: 1793700000000
                    transaction_id: d2e4fc2d-537d-532b-96e6-8193eca80486
                    message: Failed to validate ITR
      deprecated: false

````

This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.