# Enroll disposable certificate

Enrolls a disposable certificate for the holder. Returns certIdOtp and deviceCode required by sendOtp and validate. See enroll.

Endpoint: POST /api/certificate/{lraId}/enroll
Version: 26.1.0.3
Security: basicAuth, sslCertificate

## Path parameters:

  - `lraId` (string, required)
    Local Registration Authority (LRA) identifier.

## Request fields (application/json):

  - `disposableHolder` (object, required)

  - `disposableHolder.firstName` (string, required)
    First name of the holder (UTF-8). See [allowed characters rules](https://docs.namirial.app/products/leandisposable/enterprise-documentation/developer-documentation/integration-guide/lean-faq-allowed-characters).

  - `disposableHolder.lastName` (string, required)
    Last name of the holder (UTF-8). See [allowed characters rules](https://docs.namirial.app/products/leandisposable/enterprise-documentation/developer-documentation/integration-guide/lean-faq-allowed-characters).

  - `disposableHolder.identificationType` (string, required)
    Type of identification document. Together with identificationCode and identificationCountry it composes the certificate serial number.
    Enum: "ITALIAN_TAX_CODE", "FOREIGN_TAX_CODE", "PASSPORT", "PERSONAL_NUMBER", "NATIONAL_IDENTITY_CARD", "DRIVING_LICENSE", "RESIDENCE_PERMIT", "RESIDENCE_PERMIT_TEMP", "EMBASSY_DOCUMENT", "AM"

  - `disposableHolder.identificationCode` (string, required)
    Unique code of the identification document. Together with identificationType and identificationCountry it composes the certificate serial number. See [allowed characters rules](https://docs.namirial.app/products/leandisposable/enterprise-documentation/developer-documentation/integration-guide/lean-faq-allowed-characters).

  - `disposableHolder.identificationCountry` (string, required)
    Country where identification was issued. ISO 3166-1 alpha-2 code.

  - `disposableHolder.birthDate` (string)
    Date of birth in ISO 8601 format (yyyy-MM-dd). Example: 1980-01-01. Note: the date is not validated semantically by the backend.
    Example: "1980-01-01"

  - `disposableHolder.birthCity` (string)
    City of birth. See [allowed characters rules](https://docs.namirial.app/products/leandisposable/enterprise-documentation/developer-documentation/integration-guide/lean-faq-allowed-characters).

  - `disposableHolder.citizenShip` (string)
    Citizenship country. ISO 3166-1 alpha-2 code.

  - `disposableContacts` (object)
    Required if otpType=SMS (provide mobile) or otpType=EMAIL (provide email).

  - `disposableContacts.email` (string)
    Email address of the holder. Required if otpType=EMAIL.

  - `disposableContacts.mobile` (string)
    Mobile phone number in E.164 format with + prefix (e.g. +390000000000). Required if otpType=SMS.

  - `disposableDoc` (object, required)
    Identity document information.

Not required if one of the following conditions is true:
- DisposableIdentification.identificationType is AML
- DisposableHolder.identificationType is one of: PASSPORT, PERSONAL_NUMBER, NATIONAL_IDENTITY_CARD, DRIVING_LICENSE, RESIDENCE_PERMIT, RESIDENCE_PERMIT_TEMP, EMBASSY_DOCUMENT

  - `disposableDoc.documentType` (string, required)
    Identity document type. See [allowed values](https://docs.namirial.app/products/leandisposable/enterprise-documentation/developer-documentation/api-references/data-objects#disposabledoc).
    Enum: "CI", "PASS", "PA", "RP", "CIE", "RT", "DC", "AT"

  - `disposableDoc.documentNr` (string, required)
    Document number.

  - `disposableDoc.documentIssuer` (string)
    Entity that issued the document.

  - `disposableDoc.documentIssuerDate` (string, required)
    Date on which the document was issued. ISO 8601 format yyyy-MM-dd. Other formats are not accepted.

  - `disposableDoc.documentIssuerCountry` (string, required)
    Country where document was issued. ISO 3166-1 alpha-2 code.

  - `disposableDoc.documentExpirationDate` (string, required)
    Date on which the document was expires. ISO 8601 format yyyy-MM-dd. Other formats are not accepted.

  - `disposableCertificate` (object, required)

  - `disposableCertificate.password` (string, required)
    Certificate PIN.

  - `disposableCertificate.securityCode` (string, required)
    Certificate security code.

  - `disposableCertificate.fullData` (boolean)
    Enroll with full profile. Default: false.

  - `disposableCertificate.withoutUsageLimitLRA` (boolean)
    Omit LRA limitation of use (LoU). Default: false.

  - `disposableCertificate.type` (string)
    Disposable certificate type.
    Enum: "DISPOSABLE", "DISPOSABLE_30_DAYS", "LONG_LIVED", "DISPOSABLE_FEA"

  - `disposableCertificate.otpType` (string)
    OTP delivery method. See [allowed values](https://docs.namirial.app/products/leandisposable/enterprise-documentation/developer-documentation/api-references/lean-enum-types#disposableotptype). Default: SMS.
    Enum: "SMS", "EMAIL", "NO_OTP", "EXTERNAL_OTP"

  - `disposableCertificate.transactionLimit` (object)

  - `disposableCertificate.transactionLimit.value` (integer)
    Maximum transaction value.

  - `disposableCertificate.transactionLimit.currency` (string)
    Currency code. ISO 4217.

  - `disposableCertificate.limitationOfUse` (object)

  - `disposableCertificate.limitationOfUse.withoutUsageLimitLRA` (boolean)
    Omit LRA limitation of use. Default: false.

  - `disposableCertificate.limitationOfUse.language` (string)
    Language of the limitation of use text. ISO 639-1 alpha-2 code.

  - `identification` (object)

  - `identification.identificationType` (string, required)
    Identification method type.
    Enum: "DEVISU", "CNS", "FIRMA", "THIRDPARTY", "WEB", "CIE", "SPID", "AML", "ALTRO"

  - `disposableAddress` (object)

  - `disposableAddress.country` (string, required)
    Country.

  - `disposableAddress.province` (string, required)
    Province.

  - `disposableAddress.city` (string, required)
    City.

  - `disposableAddress.ccat` (string)
    Cadastral code.

  - `disposableAddress.street` (string, required)
    Street address.

  - `disposableAddress.zip` (string, required)
    Zip/postal code.

  - `buReId` (string)
    Business Relation Identifier for One Platform integration.

## Response 200 fields (application/json):

  - `cert` (string)
    Base64-encoded DER certificate.

  - `certType` (string)
    Certificate type, as specified in disposableCertificate.type.
    Enum: "DISPOSABLE", "DISPOSABLE_30_DAYS", "LONG_LIVED", "DISPOSABLE_FEA"

  - `certUsageLimit` (string)
    Limitation of use (LoU) text embedded in the certificate.

  - `certSerialNumber` (string)
    Certificate serial number (hex).
    Example: "60F2373BFCEB569E"

  - `certIdOtp` (integer,null)
    OTP certificate identifier. Pass this value to sendOtp and validate. null if otpType=NO_OTP or otpType=EXTERNAL_OTP.
    Example: 1234567

  - `deviceCode` (string)
    Device code associated with the issued certificate. Pass this value to sendOtp and validate.
    Example: "RHIDP0000000000000"

## Response 500 fields (application/json):

  - `code` (integer, required)
    Application error code.
    Example: 242

  - `message` (string, required)
    Human-readable error description. For validation errors (code 242), includes field-level details in the format Input parameter invalid: [{field=..., message=...}].
    Example: "Input parameter invalid: [{field=disposableHolder, message=must not be null}]"


