{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/iasig-md/json-schema/iasig-md-post-v1-create-order-request-schema.json",
  "title": "PostV1CreateOrderRequest",
  "x-generated": "2026-11-12",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/_ae-authored/iasig-md-openapi-generated.yml#/components/schemas/PostV1CreateOrderRequest",
  "type": "object",
  "properties": {
    "customer": {
      "type": "object",
      "description": "Customer details"
    },
    "customer.name": {
      "type": "string",
      "description": "Customer name"
    },
    "customer.email": {
      "type": "string",
      "description": "Customer email"
    },
    "customer.phone": {
      "type": "string",
      "description": "Customer phone"
    },
    "products": {
      "type": "array",
      "description": "Order products"
    },
    "product": {
      "type": "object",
      "description": "Product parameters"
    },
    "product.product": {
      "type": "string",
      "description": "Product type"
    },
    "product.vehicle": {
      "type": "string",
      "description": "MD vehicle certificate number (provide this or foreign_vehicle)"
    },
    "product.foreign_vehicle": {
      "type": "object",
      "description": "Foreign vehicle payload (use instead of vehicle for non-MD plates)"
    },
    "product.start_date": {
      "type": "string",
      "description": "Start date in yyyy-mm-dd format"
    },
    "product.duration": {
      "type": "number",
      "description": "Duration in days"
    },
    "product.category": {
      "type": "string",
      "description": "Category (A–D)"
    },
    "product.emission_class": {
      "type": "string",
      "description": "Euro emission class"
    },
    "product.emission_proof_declared": {
      "type": "boolean",
      "description": "True when customer declared holding an official document that proves the class"
    },
    "foreign_vehicle.registration_country": {
      "type": "string",
      "description": "ISO2 registration country (must not be MD)"
    },
    "foreign_vehicle.category": {
      "type": "string",
      "description": "EU vehicle category"
    },
    "foreign_vehicle.plate_number": {
      "type": "string",
      "description": "Real vehicle plate number"
    },
    "foreign_vehicle.vin": {
      "type": "string",
      "description": "17-character VIN"
    },
    "foreign_vehicle.make": {
      "type": "string",
      "description": "Vehicle make"
    },
    "foreign_vehicle.model": {
      "type": "string",
      "description": "Vehicle model"
    },
    "foreign_vehicle.max_authorized_mass": {
      "type": "number",
      "description": "Max authorized mass in kg"
    },
    "foreign_vehicle.places": {
      "type": "number",
      "description": "Number of seats"
    }
  },
  "required": [
    "customer",
    "customer.phone",
    "products",
    "product",
    "product.product",
    "product.vehicle",
    "product.foreign_vehicle",
    "product.start_date",
    "product.duration",
    "product.category",
    "foreign_vehicle.registration_country",
    "foreign_vehicle.category",
    "foreign_vehicle.plate_number",
    "foreign_vehicle.vin"
  ]
}