{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/lemonway/json-schema/lemonway-account-documents-output-schema.json",
  "title": "AccountDocumentsOutput",
  "x-generated": "2026-11-10",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/lemonway-accounts-admin-api-openapi.yml#/components/schemas/AccountDocumentsOutput",
  "type": "object",
  "properties": {
    "documents": {
      "description": "List of documents that changed since the entry date.",
      "type": "array",
      "items": {
        "$ref": "#/$defs/Document"
      }
    },
    "error": {
      "$ref": "#/$defs/Error"
    }
  },
  "$defs": {
    "Document": {
      "type": "object",
      "properties": {
        "id": {
          "format": "int64",
          "description": "Document ID",
          "type": "integer"
        },
        "status": {
          "format": "int32",
          "description": "Document Status<br/>0 = Document put on hold, waiting for another document.<br/>1 = Received, need manual validation.<br/>2 = Accepted.<br/>3 = Rejected.<br/>4 = Rejected. Unreadable by human (Cropped, blur, glare…).<br/>5 = Rejected. Expired (Expiration Date is passed).<br/>6 = Rejected. Wrong Type (Document not accepted).<br/>7 = Rejected. Wrong Name (Name not matching user information).<br/>8 = Rejected. Duplicated Document.<br/>",
          "enum": [
            0,
            1,
            2,
            3,
            4,
            5,
            6,
            7,
            8
          ],
          "type": "integer"
        },
        "type": {
          "format": "int32",
          "description": "Document Type<br/>0 = ID card (both sides in one file).<br/>1 = Proof of address.<br/>2 = Scan of a proof of IBAN.<br/>3 = Passport (European Union).<br/>4 = Passport (outside the European Union).<br/>5 = Residence permit (both sides in one file).<br/>6 = Other document type.<br/>7 = Official company registration document (Kbis extract or equivalent).<br/>11 = Driver licence (both sides in one file).<br/>12 = Status.<br/>13 = Selfie.<br/>14 = Other document type.<br/>15 = Other document type.<br/>16 = Other document type.<br/>17 = Other document type.<br/>18 = Other document type.<br/>19 = Other document type.<br/>20 = Other document type.<br/>21 = SDD mandate.<br/>",
          "enum": [
            0,
            1,
            2,
            3,
            4,
            5,
            6,
            7,
            11,
            12,
            13,
            14,
            15,
            16,
            17,
            18,
            19,
            20,
            21
          ],
          "type": "integer"
        },
        "validityDate": {
          "description": "Document validity date\nFormat: dd/mm/yyyy\nEmpty if unknown",
          "type": "string"
        },
        "comment": {
          "type": "string"
        }
      }
    },
    "Error": {
      "type": "object",
      "properties": {
        "code": {
          "format": "int32",
          "type": "integer"
        },
        "message": {
          "type": "string"
        },
        "psp": {
          "$ref": "#/$defs/PSP"
        }
      }
    },
    "PSP": {
      "type": "object",
      "properties": {
        "message": {
          "description": "Get the Error Message from PSP",
          "type": "string"
        }
      }
    }
  }
}