{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/bynn-com/json-schema/bynn-com-post-nfc-schema.json",
  "title": "postNfc",
  "description": "NFC data submission",
  "x-generated": "2026-11-03",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/bynn-com-openapi.json#/components/schemas/postNfc",
  "type": "object",
  "properties": {
    "session_id": {
      "type": "string",
      "description": "Unique session token"
    },
    "can": {
      "type": "string",
      "description": "Card Access Number (CAN) for PACE authentications."
    },
    "authenticationStatus": {
      "type": "object",
      "description": "Authentication status from NFC chip",
      "properties": {
        "chipAuth": {
          "type": "boolean",
          "description": "Chip authentication status"
        },
        "paceAuth": {
          "type": "boolean",
          "description": "PACE authentication status"
        },
        "passiveAuth": {
          "type": "boolean",
          "description": "Passive authentication status"
        }
      },
      "required": [
        "chipAuth",
        "paceAuth",
        "passiveAuth"
      ]
    },
    "cameraImage": {
      "type": "string",
      "description": "Base64 strict encoded camera image of the document"
    },
    "faceImageBase64": {
      "type": "string",
      "description": "Base64 strict encoded face image from NFC chip"
    },
    "certificateInfo": {
      "type": "object",
      "description": "Document certificate information",
      "properties": {
        "documentSignerCertificate": {
          "type": "object",
          "description": "Document signer certificate details",
          "properties": {
            "algorithm": {
              "type": "string",
              "description": "Certificate algorithm"
            },
            "issuer": {
              "type": "string",
              "description": "Certificate issuer"
            },
            "serialNumber": {
              "type": "string",
              "description": "Certificate serial number"
            },
            "subject": {
              "type": "string",
              "description": "Certificate subject"
            },
            "validFrom": {
              "type": "string",
              "description": "Certificate valid from date"
            },
            "validTo": {
              "type": "string",
              "description": "Certificate valid to date"
            }
          }
        }
      }
    },
    "dateOfBirth": {
      "type": "string",
      "description": "Date of birth (YYMMDD format)"
    },
    "dateOfExpiry": {
      "type": "string",
      "description": "Document expiry date (YYMMDD format)"
    },
    "documentNumber": {
      "type": "string",
      "description": "Document number"
    },
    "gender": {
      "type": "string",
      "description": "Gender",
      "enum": [
        "MALE",
        "FEMALE",
        "OTHER"
      ]
    },
    "givenNames": {
      "type": "string",
      "description": "Given names from document"
    },
    "surname": {
      "type": "string",
      "description": "Surname from document"
    },
    "nationality": {
      "type": "string",
      "description": "Nationality code (3-letter)"
    },
    "issuer": {
      "type": "string",
      "description": "Document issuing country code (3-letter)"
    },
    "personalNumber": {
      "type": "string",
      "description": "Personal identification number"
    },
    "hashVerification": {
      "type": "object",
      "description": "Hash verification data",
      "properties": {
        "algorithmUsed": {
          "type": "string",
          "description": "Hash algorithm used"
        },
        "dg1Hash": {
          "type": "string",
          "description": "Base64 strict Data Group 1 hash"
        },
        "dg2Hash": {
          "type": "string",
          "description": "Base64 strict Data Group 2 hash"
        },
        "dg3Hash": {
          "type": "string",
          "description": "Base64 strict Data Group 3 hash"
        },
        "dg4Hash": {
          "type": "string",
          "description": "Base64 strict Data Group 4 hash"
        },
        "dg5Hash": {
          "type": "string",
          "description": "Base64 strict Data Group 5 hash"
        },
        "dg6Hash": {
          "type": "string",
          "description": "Base64 strict Data Group 6 hash"
        },
        "dg7Hash": {
          "type": "string",
          "description": "Base64 strict Data Group 7 hash"
        },
        "dg8Hash": {
          "type": "string",
          "description": "Base64 strict Data Group 8 hash"
        },
        "dg9Hash": {
          "type": "string",
          "description": "Base64 strict Data Group 9 hash"
        },
        "dg10Hash": {
          "type": "string",
          "description": "Base64 strict Data Group 10 hash"
        },
        "dg11Hash": {
          "type": "string",
          "description": "Base64 strict Data Group 11 hash"
        },
        "dg12Hash": {
          "type": "string",
          "description": "Base64 strict Data Group 12 hash"
        },
        "dg13Hash": {
          "type": "string",
          "description": "Base64 strict Data Group 13 hash"
        },
        "dg14Hash": {
          "type": "string",
          "description": "Base64 strict Data Group 14 hash"
        },
        "dg15Hash": {
          "type": "string",
          "description": "Base64 strict Data Group 15 hash"
        },
        "dg16Hash": {
          "type": "string",
          "description": "Base64 strict Data Group 16 hash"
        },
        "faceImageHash": {
          "type": "string",
          "description": "Base64 strict Face image hash"
        },
        "sodHash": {
          "type": "string",
          "description": "Base64 strict Security Object Data hash"
        }
      },
      "required": [
        "algorithmUsed",
        "dg1Hash",
        "dg2Hash",
        "dg14Hash",
        "faceImageHash",
        "sodHash"
      ]
    },
    "locationData": {
      "type": "object",
      "description": "Location data",
      "properties": {
        "accuracy": {
          "type": "number",
          "format": "float",
          "description": "Location accuracy in meters"
        },
        "altitude": {
          "type": "number",
          "format": "float",
          "description": "Altitude in meters"
        },
        "latitude": {
          "type": "number",
          "format": "float",
          "description": "Latitude coordinate"
        },
        "longitude": {
          "type": "number",
          "format": "float",
          "description": "Longitude coordinate"
        },
        "provider": {
          "type": "string",
          "description": "Location provider",
          "enum": [
            "gps",
            "network",
            "passive"
          ]
        },
        "timestamp": {
          "type": "integer",
          "format": "int32",
          "description": "Location timestamp in milliseconds"
        }
      }
    },
    "mrzData": {
      "type": "string",
      "description": "Complete MRZ data as multi-line string"
    },
    "rawDG1": {
      "type": "string",
      "description": "Data Group 1 - MRZ information"
    },
    "rawDG2": {
      "type": "string",
      "description": "Data Group 2 - Encoded face image (Biometrics)"
    },
    "rawDG3": {
      "type": "string",
      "description": "Data Group 3 - Fingerprint data (Biometrics)"
    },
    "rawDG4": {
      "type": "string",
      "description": "Data Group 4 - Iris data (Biometrics)"
    },
    "rawDG5": {
      "type": "string",
      "description": "Data Group 5 - Displayed portrait"
    },
    "rawDG6": {
      "type": "string",
      "description": "Data Group 6 - Reserved for future use"
    },
    "rawDG7": {
      "type": "string",
      "description": "Data Group 7 - Displayed signature"
    },
    "rawDG8": {
      "type": "string",
      "description": "Data Group 8 - Data features"
    },
    "rawDG9": {
      "type": "string",
      "description": "Data Group 9 - Structure features"
    },
    "rawDG10": {
      "type": "string",
      "description": "Data Group 10 - Substance features"
    },
    "rawDG11": {
      "type": "string",
      "description": "Data Group 11 - Additional personal details"
    },
    "rawDG12": {
      "type": "string",
      "description": "Data Group 12 - Additional document details"
    },
    "rawDG13": {
      "type": "string",
      "description": "Data Group 13 - Optional details"
    },
    "rawDG14": {
      "type": "string",
      "description": "Data Group 14 - Security infos"
    },
    "rawDG15": {
      "type": "string",
      "description": "Data Group 15 - Active authentication public key"
    },
    "rawDG16": {
      "type": "string",
      "description": "Data Group 16 - Persons to notify"
    },
    "rawSOD": {
      "type": "string",
      "description": "SOD - Security Object Data"
    }
  },
  "required": [
    "authenticationStatus",
    "faceImageBase64",
    "dateOfBirth",
    "dateOfExpiry",
    "documentNumber",
    "gender",
    "givenNames",
    "surname",
    "nationality",
    "issuer",
    "hashVerification",
    "rawDG1",
    "rawDG2",
    "rawDG14",
    "rawDG15",
    "rawSOD"
  ]
}