# Lean - enroll method

Use this method to enroll a lean disposable with the standard process.

The enroll methods return a [**DisposableIssued** object](/products/leandisposable/enterprise-documentation/developer-documentation/api-references/lean-enroll)

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

REST API
#### Endpoint


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

#### 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. |
| `disposableCertificate` | 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). |
| `buReId` | string | No | One Platform — Business Relation ID. |


#### 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",
        "transactionLimit": {
            "value": 0,
            "currency": "EUR"
        }
    },
    "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": "de"
        },
        "transactionLimit": {
            "value": 0,
            "currency": "EUR"
        }
    },
    "identification": {
        "identificationType": "DEVISU"
    },
    "disposableAddress": {
        "ccat": "A271",
        "city": "SENIGALLIA",
        "country": "IT",
        "province": "AN",
        "street": "Via Roma 1",
        "zip": "60019"
    }
}
```

#### Response examples

**200 — Disposable issued**


```json
{
    "cert": "LS0tLS1CRUdJTiBDRVJU...",
    "certType": "DISPOSABLE",
    "certUsageLimit": "usage limit value",
    "certSerialNumber": "76BC101898E7E2DA",
    "certIdOtp": 1234567,
    "deviceCode": "RHIDP11111111111"
}
```

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

**Method:** enroll

| **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 | [`DisposableAddress` object](/products/leandisposable/enterprise-documentation/developer-documentation/api-references/data-objects#disposableaddress) | NO |
| lraid | The LRA identification code | NO |


#### Request example


```xml
<?xml version="1.0" encoding="UTF-8"?>
<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:ser="http://service.ws.nam/">
   <soapenv:Header />
   <soapenv:Body>
      <ser:enroll>
         <holder>
            <firstName>testDummy</firstName>
            <identificationCode>123abc456def</identificationCode>
            <identificationCountry>de</identificationCountry>
            <identificationType>FOREIGN_TAX_CODE</identificationType>
            <lastName>cognomeTest</lastName>
         </holder>
         <contacts>
            <email>test@namirial.com</email>
            <mobile>00393331234567</mobile>
         </contacts>
         <doc>
            <documentExpirationDate>2020-01-01</documentExpirationDate>
            <documentIssuerDate>2010-01-01</documentIssuerDate>
            <documentIssuerCountry>IT</documentIssuerCountry>
            <documentIssuer>COMUNE DI TEST</documentIssuer>
            <documentNr>123456</documentNr>
            <documentType>CI</documentType>
         </doc>
         <cert>
            <password>PIN_TO_SET</password>
            <securityCode>SECURITY_CODE_TO_SET</securityCode>
            <type>DISPOSABLE</type>
            <transactionLimit>
              <value>0</value>
              <currency>string</currency>
            </transactionLimit>
         </cert>
         <lraid>111</lraid>
      </ser:enroll>
   </soapenv:Body>
</soapenv:Envelope>
```

#### Response example


```xml
<soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/">
   <soap:Body>
      <ns2:enrollResponse xmlns:ns2="http://service.ws.nam/">
         <return>
            <cert>LS0tLS1CRUdJTiBDRVJU.........</cert>
            <certIdOtp>226761</certIdOtp> 
            <certSerialNumber>76BC101898E7E2DA</certSerialNumber>
            <certType>DISPOSABLE</certType>
            <certUsageLimit>L utilizzo del certificato e limitato ai rapporti con ca namirial spa/The certificate may be used only for relations with the ca namirial spa</certUsageLimit>
            <deviceCode>RHIDP2310114919328</deviceCode>
         </return>
      </ns2:enrollResponse>
   </soap:Body>
</soap:Envelope>
```

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