# Tax Code Calculation > Calculate an Italian tax code (Codice Fiscale) from surname, name, gender, date of birth, and city of birth, with a quality flag for the result. ## Endpoint `POST https://{host}:{port}/Egon/api/norm` Replace `{host}` and `{port}` with the address of your Egon instance. ## Headers | Field | Type | Required | Description | | --- | --- | --- | --- | | `token` | String | Yes | Authentication token sent in the `token` request header. | ## Request Country context, `taxfnx` function `3`, and personal identity data. | Field | Type | Required | Description | | --- | --- | --- | --- | | `par` | Object | Yes | Country context and tax-code calculation function. | | `par.iso2` | String | No | Country code, ISO 3166-1 alpha-2. One of `iso2` or `iso3` is **required**. | | `par.iso3` | String | No | Country code, ISO 3166-1 alpha-3. One of `iso2` or `iso3` is **required**. | | `par.taxfnx` | String | Yes | Tax-code configuration function. `3` Calculate tax code from identity data. Default value: `3` | | `data` | Object | Yes | Input data to validate | | `data.name` | Object | Yes | Identity and demographic data used to calculate tax code | | `data.name.full_name` | String | Yes | Surname | | `data.name.first_name` | String | Yes | First name | | `data.name.gender` | String | Yes | Gender (`1` Male, `2` Female) | | `data.name.birth_date` | String | Yes | Date of birth in `YYYYMMDD` format | | `data.name.birth_place` | String | Yes | Birth city description | ### Example request ```bash curl -X POST "https://{host}:{port}/Egon/api/norm" \ -H "token: YOUR_API_KEY" \ -H "Content-Type: application/json" \ -d '{"par":{"iso3":"ITA","taxfnx":"3"},"data":{"name":{"full_name":"Rossi","first_name":"Mario","gender":"1","birth_date":"19930219","birth_place":"Verona"}}}' ``` ## Response Calculated tax code, quality indicators for personal identity fields, and system status. | Field | Type | Required | Description | | --- | --- | --- | --- | | `data` | Object | No | Normalized and enriched validation output data | | `data.tax_code` | Object | No | Calculated Italian tax code details | | `data.tax_code.cod_description` | String | No | Calculated Italian tax code | | `quality` | Object | No | Validation quality indicators and score flags | | `quality.tax_code` | Object | No | Quality indicator result (see https://documentation.egon.com/docs/quality-indicators) | | `quality.tax_code.flag` | String | No | Quality flag | | `quality.tax_code.code` | Number | No | Quality result code | | `quality.tax_code.description` | String | No | Quality result description | | `quality.name` | Object | No | Quality indicators for personal name parsing and demographic verification | | `quality.name.person` | Object | No | Quality indicator result (see https://documentation.egon.com/docs/quality-indicators) | | `quality.name.person.flag` | String | No | Quality flag | | `quality.name.person.code` | Number | No | Quality result code | | `quality.name.person.description` | String | No | Quality result description | | `quality.name.birth_date` | Object | No | Quality indicator result (see https://documentation.egon.com/docs/quality-indicators) | | `quality.name.birth_date.flag` | String | No | Quality flag | | `quality.name.birth_date.code` | Number | No | Quality result code | | `quality.name.birth_date.description` | String | No | Quality result description | | `quality.name.birth_place` | Object | No | Quality indicator result (see https://documentation.egon.com/docs/quality-indicators) | | `quality.name.birth_place.flag` | String | No | Quality flag | | `quality.name.birth_place.code` | Number | No | Quality result code | | `quality.name.birth_place.description` | String | No | Quality result description | | `system` | Object | No | Request processing status. | | `system.ret_code` | Number | No | Processing result code. 0 means no blocking error. | | `system.des_ret_code` | String | No | Human-readable processing result. | ### Example responses **HTTP 200: Valid response** Tax code calculated successfully from personal information. ```json { "data": { "tax_code": { "cod_description": "RSSMRA93B19L781K" } }, "quality": { "tax_code": { "flag": "0", "code": 0, "description": "Ok" }, "name": { "person": { "flag": "0", "code": 0, "description": "Ok" }, "birth_date": { "flag": "0", "code": 0, "description": "Ok" }, "birth_place": { "flag": "0", "code": 0, "description": "Ok" } } }, "system": { "ret_code": 0, "des_ret_code": "Ok" } } ``` **HTTP 200: Missing par** The request is missing the required par object. ```json { "system": { "ret_code": 1, "des_ret_code": "par not found" } } ``` **HTTP 200: Missing iso2 and iso3** Iso2 or Iso3 field is missing. ```json { "system": { "ret_code": 1, "des_ret_code": "iso2 or iso3 parameter not found" } } ``` **HTTP 200: Invalid iso2** The iso2 value is not valid. ```json { "system": { "ret_code": 1, "des_ret_code": "iso2 not found" } } ``` **HTTP 200: Invalid iso3** The iso3 value is not valid. ```json { "system": { "ret_code": 1, "des_ret_code": "iso3 not found" } } ``` **HTTP 200: Missing data** The request is missing the required data object. ```json { "system": { "ret_code": 1, "des_ret_code": "data not found" } } ``` **HTTP 200: Missing token** Provide the required authentication token in the token request header. ```json { "system": { "ret_code": 1, "des_ret_code": "token not found" } } ``` **HTTP 200: Invalid token** The supplied token is invalid, expired, or not authorized for this service. ```json { "system": { "ret_code": 1, "des_ret_code": "token not valid" } } ```