# checkData method

This method checks the validity of the data:

* if parameters match all the mandatory fields as described [in data objects reference](/products/leandisposable/enterprise-documentation/developer-documentation/api-references/data-objects)
* if parameters match the allowed values as described [in data objects reference](/products/leandisposable/enterprise-documentation/developer-documentation/api-references/data-objects)
* if the LRA is enabled to issue disposable certificates
* if the limitation of use (LoU) language (if specified) is available in the LRA configuration — see [`limitationOfUse.language`](/products/leandisposable/enterprise-documentation/developer-documentation/api-references/data-objects#limitationofuse-object)
* If the [`otpType = SMS`](/products/leandisposable/enterprise-documentation/developer-documentation/api-references/data-objects#disposablecertficate) by default the same phone number [can be used only by 1 holder](/products/leandisposable/enterprise-documentation/developer-documentation/integration-guide/lean-faq-not-unique-phone-number) in a time range of 30 days.
* if the [`otpType=EMAIL`](/products/leandisposable/enterprise-documentation/developer-documentation/api-references/data-objects#disposablecertficate) by default the same email [can be used only by 1 holder](/products/leandisposable/enterprise-documentation/developer-documentation/integration-guide/lean-faq-not-unique-phone-number) in a time range of 30 days.
* if the [`otpType=WHATSAPP`](/products/leandisposable/enterprise-documentation/developer-documentation/api-references/data-objects#disposablecertficate) by default the same phone number [can be used only by 1 holder](/products/leandisposable/enterprise-documentation/developer-documentation/integration-guide/lean-faq-not-unique-phone-number) in a time range of 30 days.
* if the [`otpType=NO_OTP`](/products/leandisposable/enterprise-documentation/developer-documentation/api-references/data-objects#disposablecertficate) the LRA has to be authorized


**For the full technical reference, see the [OpenAPI specification](/products/leandisposable/openapi/certificate/checkdata)**.

REST API
#### Endpoint


```
POST /api/certificate/{lraId}/checkData
```

#### Headers

| Name | Required | Description |
|  --- | --- | --- |
| `Content-Type` | Yes | Must be `application/json`. |
| `Authorization` | Yes | Basic Auth credentials. |


#### Path parameters

| Parameter | Type | Required | Description |
|  --- | --- | --- | --- |
| `lraId` | integer | Yes | LRA identifier. |


#### Body parameters

| Parameter | Type | Required | Description |
|  --- | --- | --- | --- |
| `disposableHolder` | object | Yes | [`DisposableHolder` object](/products/leandisposable/enterprise-documentation/developer-documentation/api-references/data-objects#disposableholder). |
| `disposableContacts` | object | Yes | [`DisposableContacts` object](/products/leandisposable/enterprise-documentation/developer-documentation/api-references/data-objects#disposablecontacts). |
| `disposableDoc` | object | Yes | [`DisposableDoc` object](/products/leandisposable/enterprise-documentation/developer-documentation/api-references/data-objects#disposabledoc). Not required for specific categories, see more details into the section. |
| `disposableCert` | object | Yes | [`DisposableCertificate` object](/products/leandisposable/enterprise-documentation/developer-documentation/api-references/data-objects#disposablecertificate). |
| `identification` | object | No | [`DisposableIdentification` object](/products/leandisposable/enterprise-documentation/developer-documentation/api-references/data-objects#disposableidentification). |
| `disposableAddress` | object | No | [`DisposableAddress` object](/products/leandisposable/enterprise-documentation/developer-documentation/api-references/data-objects#disposableaddress). |


#### Request examples

**Standard enrollment:**


```json
{
    "disposableHolder": {
        "birthCity": "Ancona",
        "birthDate": "2000-11-09",
        "citizenShip": "IT",
        "firstName": "Mario",
        "identificationCode": "RSSMRA80A01H501U",
        "identificationCountry": "IT",
        "identificationType": "ITALIAN_TAX_CODE",
        "lastName": "Rossi"
    },
    "disposableContacts": {
        "email": "user@example.com",
        "mobile": "+390000000000"
    },
    "disposableDoc": {
        "documentExpirationDate": "2029-11-09",
        "documentIssuer": "Comune di Ancona",
        "documentIssuerCountry": "IT",
        "documentIssuerDate": "2019-08-22",
        "documentNr": "AB1234567",
        "documentType": "CI"
    },
    "disposableCertificate": {
        "fullData": false,
        "otpType": "SMS",
        "password": "YOUR_PASSWORD",
        "securityCode": "YOUR_SECURITY_CODE",
        "type": "DISPOSABLE"
    },
    "identification": {
        "identificationType": "DEVISU"
    },
    "disposableAddress": {
        "ccat": "A271",
        "city": "SENIGALLIA",
        "country": "IT",
        "province": "AN",
        "street": "Via Roma 1",
        "zip": "60019"
    }
}
```

**With multi-language limitation of use:**


```json
{
    "disposableHolder": {
        "birthCity": "Ancona",
        "birthDate": "2000-11-09",
        "citizenShip": "IT",
        "firstName": "Mario",
        "identificationCode": "RSSMRA80A01H501U",
        "identificationCountry": "IT",
        "identificationType": "ITALIAN_TAX_CODE",
        "lastName": "Rossi"
    },
    "disposableContacts": {
        "email": "user@example.com",
        "mobile": "+390000000000"
    },
    "disposableDoc": {
        "documentExpirationDate": "2029-11-09",
        "documentIssuer": "Comune di Ancona",
        "documentIssuerCountry": "IT",
        "documentIssuerDate": "2019-08-22",
        "documentNr": "AB1234567",
        "documentType": "CI"
    },
    "disposableCertificate": {
        "fullData": false,
        "otpType": "SMS",
        "password": "YOUR_PASSWORD",
        "securityCode": "YOUR_SECURITY_CODE",
        "type": "DISPOSABLE",
        "limitationOfUse": {
            "withoutUsageLimitLRA": false,
            "language": "en"
        }
    },
    "identification": {
        "identificationType": "DEVISU"
    },
    "disposableAddress": {
        "ccat": "A271",
        "city": "SENIGALLIA",
        "country": "IT",
        "province": "AN",
        "street": "Via Roma 1",
        "zip": "60019"
    }
}
```

#### Response examples

**200 — Success**


```
Empty body
```

SOAP API
The SOAP interface is deprecated. Use the REST API instead.

**Method:** checkData

| **Parameter** | **Description** | **Mandatory** |
|  --- | --- | --- |
| holder | [`DisposableHolder` object](/products/leandisposable/enterprise-documentation/developer-documentation/api-references/data-objects#disposableholder) | YES |
| contacts | [`DisposableContacts` object](/products/leandisposable/enterprise-documentation/developer-documentation/api-references/data-objects#disposablecontacts) | YES |
| doc | [`DisposableDoc` object](/products/leandisposable/enterprise-documentation/developer-documentation/api-references/data-objects#disposabledoc) | YES  **Not required** if the [`DisposableIdentification`](/products/leandisposable/enterprise-documentation/developer-documentation/api-references/data-objects#disposableidentification) = **AML** |
| cert | [`DisposableCertificate` object](/products/leandisposable/enterprise-documentation/developer-documentation/api-references/data-objects#disposablecertificate) | YES |
| identification | [`DisposableIdentification` object](/products/leandisposable/enterprise-documentation/developer-documentation/api-references/data-objects#disposableidentification) | NO |
| address | [`DisposableAddres` object](/products/leandisposable/enterprise-documentation/developer-documentation/api-references/data-objects#disposableaddress) | NO |
| lraid | The LRA identification code | NO |


#### Request example


```xml
<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:ser="http://service.ws.nam/">
   <soapenv:Header/>
   <soapenv:Body>
      <ser:checkData>
         <holder>
            <birthCity>Ancona</birthCity>
            <birthDate>1994-11-09</birthDate>
            <citizenShip>IT</citizenShip>
            <firstName>Paolo</firstName>
            <identificationCode>1505312012</identificationCode>
            <identificationCountry>BG</identificationCountry>
            <identificationType>NATIONAL_IDENTITY_CARD</identificationType>
            <lastName>simonetti</lastName>
         </holder>
         <contacts>
            <email>test@namirial.it</email>
            <mobile>33011XXXXX</mobile>
         </contacts>
         <doc>
            <documentExpirationDate>2025-01-01</documentExpirationDate>
            <documentIssuer>COMUNE DI TEST</documentIssuer>
            <documentIssuerCountry>IT</documentIssuerCountry>
            <documentIssuerDate>2009-12-31</documentIssuerDate>
            <documentNr>123456</documentNr>
            <documentType>CI</documentType>
         </doc>
         <cert>
            <fullData>false</fullData>
            <otpType>SMS</otpType>
            <password>password</password>
            <securityCode>password</securityCode>
            <type>DISPOSABLE</type>
         </cert>
         <!--Optional:-->
         <identification>
            <identificationType>DEVISU</identificationType>
         </identification>
         <address>
            <ccat>B403</ccat>
            <city>CALDOGNO</city>
            <country>IT</country>
            <province>VI</province>
            <street>VIA</street>
            <zip>60060</zip>
         </address>
         <lraid>2311</lraid>
      </ser:checkData>
   </soapenv:Body>
</soapenv:Envelope>
```

#### Response example


```xml
 <soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/">
    <soap:Body>
        <ns2:checkDataResponse xmlns:ns2="http://service.ws.nam/" />
    </soap:Body>
</soap:Envelope>
```

‌**Errors**: [Check here the main errors triggered.](/products/leandisposable/enterprise-documentation/developer-documentation/api-references/lean-checkdata)

‌