Skip to content

Enriched E-Invoice APIs#

Einvoice APIs#

E-way bill APIs#

All the APIs pertaining to E-way bill

Note

All the E-way bill APIs as well in this module are called with E-invoice headers.

Headers#

Header Key Name Description
Content-Type It used to indicate the media type of the resource in the request
for example: application/json for json document exchange
accept It used to request the media type of the resource expected in the response
for example: application/json for json document exchange
X-FLYNN-N-IRP-GSP-CODE GSP Identifier: enum (“vay”)
X-FLYNN-N-IRP-GSTIN GSTIN of the taxpayer
X-FLYNN-N-IRP-USERNAME Portal username associated with taxpayer GSTIN for the GSP, Non-sensitive
X-FLYNN-N-IRP-PWD Portal password associated with GSTIN and Username for the GSP, Non-Sensitive

Optionally if you want to encrypt the password you can use following headers instead of X-FLYNN-N-IRP-PWD

Header Key Name Description
X-FLYNN-S-REK Request Encryption Key - refer here
optional, to be used when you want to encrypt the password
X-FLYNN-S-IRP-PWD Portal password associated with GSTIN and Username for the GSP, Sensitive

With, addition to the headers described above also set all required headers to make an authenticated API call.

required headers for all e-invoice API calls

  • Content-Type
  • accept
  • X-FLYNN-N-ORG-ID
  • X-FLYNN-N-USER-TOKEN
  • X-FLYNN-N-IRP-GSP-CODE
  • X-FLYNN-N-IRP-GSTIN
  • X-FLYNN-N-IRP-USERNAME
  • X-FLYNN-S-IRP-PWD / X-FLYNN-N-IRP-PWD
  • X-FLYNN-S-REK (optional, use it in case if you wish to encrypt the password in the header)

Common Errors#

There could be multiple types of errors when interacting with enriched e-invoice APIs. However, the structure of the error payload would remain same.

For example, on submitting duplicate document number and document date

Http Status Code: 502

{
  "error": {
    "message": "err-irp-returned-error",
    "args": {
      "details": [
        {
          "ErrorCode": "2150",
          "ErrorMessage": "Duplicate IRN"
        }
      ],
      "data": null
    }
  }
}

Common Errors for v3.0 API#

There could be multiple types of errors when interacting with enriched e-invoice APIs. However, the structure of the error payload would remain same.

For example, on submitting duplicate document number and document date

Http Status Code: 502

    {
        "status": "0",
        "data": null,
        "error": {
        "message": "err-irp-returned-error",
        "type": "Irp",
        "args": {
            "details": [
                {
                "ErrorCode": "2150",
                "ErrorMessage": "Duplicate IRN"
                }
            ]
        }
    },
    "info": [
        {
            "InfCd": "DUPIRN",
            "Desc": {
                "AckNo": 162310048475409,
                "AckDt": "2023-07-10 14:01:00",
                "Irn": "3acec8e1fd2e860a076ebc1c3b7c738466ccd1461d2ac7982916e6247ec38ce2"
            }
        }
    ],
    "additionalInfo": {
        "details": {
            "AckNo": "162310048475409",
            "AckDt": "2023-07-10 14:01:00",
            "Irn": "3acec8e1fd2e860a076ebc1c3b7c738466ccd1461d2ac7982916e6247ec38ce2",
            "SignedInvoice": "eyJhbGciOiJSUzI1NiIsImtpZCI6IjE1MTNCODIxRUU0NkM3NDlBNjNCODZFMzE4QkY3MTEwOTkyODdEMUYiLCJ4NXQiOiJGUk80SWU1R3gwbW1PNGJqR0w5eEVKa29mUjgiLCJ0eXAiOiJKV1QifQ.eyJkYXRhIjoie1wiQWNrTm9cIjoxNjIzMTAwNDg0NzU0MDksXCJBY2tEdFwiOlwiMjAyMy0wNy0xMCAxNDowMDo0N1wiLFwiSXJuXCI6XCIzYWNlYzhlMWZkMmU4NjBhMDc2ZWJjMWMzYjdjNzM4NDY2Y2NkMTQ2MWQyYWM3OTgyOTE2ZTYyNDdlYzM4Y2UyXCIsXCJWZXJzaW9uXCI6XCIxLjFcIixcIlRyYW5EdGxzXCI6e1wiVGF4U2NoXCI6XCJHU1RcIixcIlN1cFR5cFwiOlwiQjJCXCIsXCJSZWdSZXZcIjpcIk5cIixcIklnc3RPbkludHJhXCI6XCJOXCJ9LFwiRG9jRHRsc1wiOntcIlR5cFwiOlwiSU5WXCIsXCJOb1wiOlwiUkFNSVJOSU5WMDY5XCIsXCJEdFwiOlwiMjEvMDYvMjAyMVwifSxcIlNlbGxlckR0bHNcIjp7XCJHc3RpblwiOlwiMjRBQUFQSTMxODJNMDAyXCIsXCJMZ2xObVwiOlwiSktMIFB2dC4gTHRkXCIsXCJUcmRObVwiOlwiSktMIFB2dC4gTHRkXCIsXC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kw0AGeV5f-wdTf-jrKI0CdAah8C2kCsJHhrzC6pkaCdPVqy7n2IoBEO7i2Sjxx3WJuyMWJiy19uYskDpYrseZGPOHP_zHtTCMEulZLB6cnArz1traREaG-rTfD6nOihSWF3ajQCf1UQ5_Kq-wnhg2gJUGgnSoNQnVU8QS4GGHqMXFYuXVaVej1lfd9z4gu_KRPqwDBrTvSjxxG6Yr2ND7w",
            "Status": "ACT",
            "EwbNo": null,
            "EwbDt": null,
            "EwbValidTill": null,
            "Remarks": null
        }
    },
    "alert": null
    }