Skip to content
Last updated

Lean - getDisposableContract method

This method returns:

  • the disposable contract (Mod_NAMCA22D)
  • the privacy document url
  • the T&C document url

The disposable contract (Mod_NAMCA22D)

For the full technical reference, see the OpenAPI specification.

Endpoint

POST /api/document/{lraId}/getDisposableContract

Headers

NameRequiredDescription
Content-TypeYesMust be application/json.
AuthorizationYesBasic Auth credentials.

Path parameters

ParameterTypeRequiredDescription
lraIdintegerYesLRA identifier.

Body parameters

ParameterTypeRequiredDescription
languageCodearrayYesLanguage(s) of the document. ISO 639-1 alpha-2 codes.
docTypesarrayYesDocument type(s). 1 = PDF, 2 = TXT.
productTypestringYesDisposable certificate type. Allowed values defined in DisposableType.
countrystringNoCountry where the end user is located. ISO 3166-1 alpha-2. If omitted, the default template for the specified languageCode is returned.
disposableHolderobjectNoDisposableHolder object.
disposableContactsobjectNoDisposableContacts object.
disposableDocobjectNoDisposableDoc object.

Request example

{
    "languageCode": ["IT"],
    "docTypes": [2],
    "disposableHolder": {
        "birthCity": "Ancona",
        "firstName": "Mario",
        "identificationCode": "RSSMRA80A01H501U",
        "identificationCountry": "IT",
        "identificationType": "ITALIAN_TAX_CODE",
        "lastName": "Rossi"
    },
    "disposableDoc": {
        "documentExpirationDate": "2029-11-09",
        "documentIssuer": "Comune di Ancona",
        "documentIssuerDate": "2019-08-22",
        "documentNr": "AB1234567",
        "documentType": "CI"
    },
    "disposableContacts": {
        "email": "user@example.com",
        "mobile": "+390000000000"
    },
    "productType": "DISPOSABLE_30_DAYS"
}

Response examples

200 — Contract returned

[
    {
        "languageCode": "IT",
        "docTypes": 2,
        "doc": "encoded file",
        "privacy_link": "https://docs.namirialtsp.com/documents/Mod_NAM_GDPR03D_ITA_IT.pdf",
        "termsAndConditions_link": "https://docs.namirialtsp.com/documents/Mod_NAM_CA01D_ITA_IT.pdf",
        "checkBoxes": [
            "Al fine di perfezionare la sottoscrizione del Modulo di richiesta con firma elettronica, è necessario accettare i termini e le condizioni della fornitura richiesta contrassegnando con segno di spunta le caselle sottostanti:",
            "(1) Io sottoscritto/a dichiaro quanto indicato nel QUADRO E - AUTOCERTIFICAZIONE E SOTTOSCRIZIONE DA PARTE DEL TITOLARE.",
            "(2) Io sottoscritto/a accetto le Condizioni Generali di Contratto (Mod.NAM CA01) e le clausole vessatorie riportate nel QUADRO F – CLAUSOLE VESSATORIE"
        ]
    }
]

Error codes

The main errors that can be found within this method are (all return HTTP 500):

Error codeDescription
2Some required fields are missing
2083Contract template not found
2084The specified language was not found
10094Product does not exist

For authentication errors, see Authentication.

For details on how to handle errors, see How to handle errors.