Insurance
Reference
Data Formats

Data Formats

⚠️

The formats on this page are the validation rules of insurance requests.

Insurance requests use the same formats whichever provider you work with. Translation into a provider's own format happens on the Lunixi side; you only send the formats on this page.

General rules

  • Field names are English camelCase; enum values are UPPER_SNAKE_CASE (TICKET_CANCELLATION, FLIGHT).
  • If there is no value, the field is not sent at all. Empty text, text standing in for null, and placeholder values such as "yok" ("none") are not accepted.
  • Numeric codes are not used instead of enums; enum values are text.
  • All values on this page are examples.

Amount

Amounts are integers in minor units (kuruş for TRY).

ValidInvalid
12500 (125.00 TRY)125.5 (decimal), "12500" (text), "₺125" (currency sign)
  • An amount must be within the safe integer range (at most 253 − 1).
  • Each amount field has its own lower bound; for example the ticket amount (priceAmount) is at least 1.

Currency

Three-letter ISO 4217 code: TRY, USD, EUR, GBP.

Timestamp

ISO 8601, time zone required.

ValidInvalid
2025-12-23T12:50:00+03:002025-12-23T12:50 (no time zone)
2025-12-23T09:50:00Z2025-12-23 12:50 (space separator, no time zone)
2025-12-23T12:50+03:002025-02-30T10:00:00+03:00 (day not in the calendar)
  • Format: YYYY-MM-DDTHH:MM, optional seconds (:SS) and fraction of a second (at most 6 digits), followed by Z or ±HH:MM.
  • The date and time separator is T.
  • Days that do not exist in the calendar (30 February) and times such as 24:00 are not accepted.
  • A timestamp without a time zone is rejected with a separate reason, so you know what to fix.

Date

ISO 8601 YYYY-MM-DD; a day that exists in the calendar. Example: 1990-01-31.

Fields such as date of birth cannot be in the future.

Phone

E.164: +, country code and number; 8-15 digits in total, and the country code does not start with 0.

ValidInvalid
+90555111223305551112233, 5551112233, +90 555 111 22 33

Email

A single @, no spaces; at least one dot in the domain; at most 180 characters. Whether the address can receive mail is not checked.

Identity number

A person's identity is sent in two fields: identityType and identityNumber. If one is sent, the other is required too.

identityTypeidentityNumber format
TCKN11 digits, the first digit cannot be 0; check digits are validated.
VKN10 digits; the check digit is validated.
PASSPORTUpper-case letters and digits, 5-20 characters.

Which identity types are accepted depends on the type and on the person's role; it is stated in the type's schema (Insurance Types).

TCKN is the Turkish national identity number and VKN the Turkish tax identification number. Check digits:

  • TCKN: 10th digit = ((sum of the 1st, 3rd, 5th, 7th and 9th digits × 7) − (sum of the 2nd, 4th, 6th and 8th digits)) mod 10. 11th digit = sum of the first 10 digits mod 10.
  • VKN: For each of the first 9 digits, with digit position i (starting at 1), t = (digit + 10 − i) mod 10; if t = 9 then v = 9, otherwise v = (t × 2^(10 − i)) mod 9. Last digit = (10 − (Σv mod 10)) mod 10.

Do not use a real person's identity number in tests.

Codes

DataFormatExample
CountryISO 3166-1 alpha-2, upper caseTR
ProvinceTurkish province plate code, two digits, 01-8134
DistrictLunixi reference code—
AirportIATA, three upper-case lettersESB
Flight numberAirline code (two-character IATA or three-letter ICAO) + 1-4 digits + optional single letterXY123
Country listJSON array; each entry ISO 3166-1 alpha-2, no duplicates["DE", "FR"]
Reference codeNo spaces, 1-64 characters—
UAVT address code10 digits, as text—

Reference codes (district, brand, model, vehicle type, product category) are Lunixi's own codes; provider identifiers are not accepted. Valid codes come from the reference endpoints: Insurance Types › Reference codes. A code with a valid format that is not recognized is rejected with an explicit error during the quote.

IMEI

The IMEI of a mobile phone: 15 digits, the last digit being the Luhn check digit.

ValidInvalid
15 digits with a correct check digitWritten with separators or spaces, 16-digit IMEISV, wrong check digit

The IMEI is personal data; it is not sent in the basket item's insuranceContext. Do not use a real device's IMEI in tests.

Licence plate

A Turkish licence plate, without spaces and in upper case: province code (01-81), letter group and number group. Letters are Latin A-Z.

LettersNumber group
14 digits
23 or 4 digits
32 or 3 digits
ValidInvalid
Province code, letters and digits written together, in upper caseWritten with spaces or hyphens, lower case, Turkish letters, province code outside 01-81

A foreign plate is sent only for a type that accepts the foreign-plate vehicle scenario (registrationScenario: FOREIGN_PLATE): no spaces, upper-case Latin letters and digits, 2-15 characters. Remove separators (spaces, hyphens) before sending. For a vehicle not yet registered, no plate is sent; the plate province code (plateCityCode, 01-81) is sent instead. Other types accept only Turkish plates. The plate is personal data; it is not sent in the basket item's insuranceContext.

Vehicle documents and identifiers

The names and formats of vehicle fields are the same for every vehicle type. Which vehicle fields a type needs is written in the type's schema (Insurance Types).

FieldFormat
registrationDocumentThe vehicle registration document. An object with two fields: serial and number; both are required.
registrationDocument.serialThe registration document's serial code: 1-4 upper-case Latin letters.
registrationDocument.numberThe registration document's number: 4-10 digits. It is a JSON string; leading zeros are kept.
chassisNumberChassis number (VIN): 17 characters, upper-case Latin letters and digits; the letters I, O and Q are not used.
engineNumberEngine number: 3-30 characters, upper-case Latin letters and digits; it can contain hyphens (-) inside, not at the start or end. No spaces.
driverIdentityNumberThe driver's Turkish identity number: TCKN format (Identity number).
tagInstallationCodeThe installation code of the vehicle identification tag (UTTS): no spaces, upper-case Latin letters and digits, 4-32 characters.
seatCountNumber of seats, driver included: a JSON number, 1-100.

The registration document, chassis number, engine number, installation code and the driver's identity number count as personal data; they are not sent in the basket item's insuranceContext. Do not use a real vehicle's documents in tests.

Home address and building

In the home types the address is a single field: uavtAddressCode.

FieldFormat
uavtAddressCodeUAVT address code: the national address code of the independent unit (flat), 10 digits. It is a JSON string; leading zeros are kept.
outerDoorNumberOuter door number (only at the building step of the address chain): starts with a digit; digits, letters, /, -, . and spaces; at most 16 characters. E.g. 12, 12A, 12/1.
areaSqmGross area, square metres: a JSON number, integer, 1-100000.
floorCountTotal number of floors of the building: a JSON number, 1-200.
constructionYearConstruction year: a JSON number between 1800 and the current year. The next year is not accepted.

You can find the code step by step from the address chain: Insurance Types › UAVT address chain. The UAVT address code and the codes of the address chain count as personal data; they are not sent in the basket item's insuranceContext. Do not use a real home's address code in tests.

Model year

A JSON number between 1950 and the year after the current year. Text such as "2022" is not accepted.

Text

  • Leading and trailing spaces are removed; text is normalized to Unicode NFC. Length limits apply to the cleaned text.
  • Empty text is not accepted.
  • In single-line fields, control characters including line breaks are not accepted.
  • Placeholder values such as "yok" ("none") are not accepted (case-insensitive). If there is no value, do not send the field.
  • The maximum length of each text field is stated in the type's schema.

ID prefixes

Lunixi IDs are prefixed and opaque. Format: prefix + 32 lower-case hexadecimal digits.

PrefixID
insq_Quote
inss_Selection
inso_Order
insp_Policy
insclm_Claim
insl_Lead
  • Store an ID as is and send it back unchanged; do not attach meaning to its content.
  • The prefix distinguishes the kind: an order ID sent where a quote ID is expected is treated like an ID that does not exist.

Basket item insurance fields

Which insurance is offered is resolved from the insurance fields of the basket items in the payment request. The fields, the rules, the item category dictionary and the insuranceContext keys are on the Basket Items page. Timestamps, dates and codes in these fields follow the formats on this page.

The basket item's insurance pre-fill data (insuranceData) uses the formats on this page too: IMEI, plate, identity number and the other personal fields are not sent in insuranceContext, but can be sent in insuranceData. Pre-fill data that does not fit a format does not stop the payment; that item's pre-fill data is not used: Basket Items › Insurance pre-fill data.