The PII Fields Classification API is a utility API designed to provide detailed field-level metadata for a specific version of an Attestr product or service. While the Consent Data Categories API returns the list of supported Data Categories and Data Types across one or more services, this API provides the complete list of input and output fields associated with a particular product version. Additionally, the API identifies whether a field contains Personal Identifiable Information (PII) and, where applicable, returns the corresponding Data Category and Data Type mappings. This enables customers to implement privacy-aware integrations, consent orchestration, dynamic form generation, field-level governance, and regulatory compliance workflows more effectively.
Request
| Type | URL | Version |
|---|
| POST | https://api.attestr.com/api/{version/public/consent/fields | Use "v3" for DPDA compliant version |
Request Body Parameters
| Type | Name | Description | Optional (default) | Min Version | Max Version |
|---|
| String | type | Provide the consent purpose. Allowed values are -
kyc_verification
background_verification
Read more at Consent Purpose | Required | v3 | |
| String | service | Product / Service code for which fields are required to be fetched. | Required | v3 | |
| Object | options | Reserved for future use. Used for specifying service specific options which helps to decide the associated PII fields | Optional | v3 | |
| Type | Name | Value / Description | Optional | Min Version | Max Version |
|---|
| String | Content-Type | application/json | Required | v3 | |
| String | Authorization | Basic {authToken} | Required | v3 | |
If you do not have the authentication token, please refer to Register App to generate one.
Sample Request Payload
Response
Http Status 200
| Key | Description | Type | Min Version | Max Version |
|---|
| input | List of input fields. Each field has the following three properties.
isPII - Indicates if the field contains a personally identifiable information
PIICategory - If the field is PII, this property provides the name of the data category. For more information on data categories, refer to Consent Data Categories
PIIType - If the field is PII, this property provides the specific data type under the category that best matches to the field. | Array<Object> | v3 | |
| values | List of output fields. Structure is similar to Input fields, except that this contains the output fields for the specific API version. | Array<Object> | v3 | |
Sample Response
Sample response for valid input
Error Response
| Parameter | Type | Description |
|---|
| code | Number | Unique error codes for different errors. Always available. |
| httpStatusCode | String | Standard HTTP status code for the error |
| message | String | Error message describing the error. Always Available. |
| details | String | Detail error message. Available only for certain types of errors. |
Error Codes
| HTTP Status | Error Code | Error Message |
|---|
| 400 | 4001 | Malformed data or missing required parameter values |
| 400 | 4005 | Operation could not be performed due to low credits balance |
| 401 | 4016 | Invalid client authorization |
| 403 | 4031 | Unauthorized access |
| 403 | 4035 | Requested service is not provisioned for your account |
| 403 | 4039 | Client's IP address is not whitelisted |
| 403 | 4035 | Requested service is not provisioned for your account |
| 429 | 4291 | Maximum account rate limit exceeded |
| 429 | 4292 | Maximum API rate limit exceeded |
| 429 | 4293 | Maximum account daily limit exceeded |
| 429 | 4294 | Maximum API daily limit exceeded |
| 500 | 5001 | Request could not be processed |
Sample Error Response
Get Free Trial
Create a free account Or “Talk to Us” for price information and other queries.