{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/homenet/json-schema/homenet-post-upsert-request-schema.json",
  "title": "PostUpsertRequest",
  "x-generated": "2026-11-16",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/_ae-authored/homenet-openapi-generated.yml#/components/schemas/PostUpsertRequest",
  "type": "object",
  "properties": {
    "export": {
      "type": "string"
    },
    "history": {
      "type": "string"
    },
    "action": {
      "type": "string",
      "description": "Top‑level action, must be \"Upsert\""
    },
    "vehicles": {
      "type": "array",
      "description": "List of vehicle objects, each containing a context and vehicle payload"
    },
    "vehicles[].context.action": {
      "type": "string",
      "description": "Per‑vehicle action, \"Insert\" or \"Update\""
    },
    "vehicles[].vehicle": {
      "type": "object",
      "description": "Canonical vehicle data (fields as shown in examples)"
    }
  },
  "required": [
    "export",
    "history",
    "action",
    "vehicles",
    "vehicles[].context.action",
    "vehicles[].vehicle"
  ]
}