{
 "openapi": "3.1.0",
 "info": {
  "title": "Vehicle Types (Supply Chain)",
  "version": "20261030b",
  "description": "The kinds of vehicle a plan may use. The inside dimensions are the load builder’s canvas: it draws exactly that rectangle and fits pallets into it."
 },
 "servers": [
  {
   "url": "https://{tenant}.tranxact.ai",
   "variables": {
    "tenant": {
     "default": "demo"
    }
   }
  }
 ],
 "components": {
  "securitySchemes": {
   "bearer": {
    "type": "http",
    "scheme": "bearer"
   }
  },
  "schemas": {
   "vehicle-types": {
    "type": "object",
    "required": [
     "code",
     "name"
    ],
    "properties": {
     "id": {
      "type": "string",
      "format": "uuid",
      "description": "Id",
      "readOnly": true
     },
     "org_id": {
      "type": "string",
      "format": "uuid",
      "description": "Org id",
      "readOnly": true
     },
     "code": {
      "type": "string",
      "description": "Code"
     },
     "name": {
      "type": "string",
      "description": "Name"
     },
     "category": {
      "type": "string",
      "description": "Category"
     },
     "inner_length_mm": {
      "type": "string",
      "format": "decimal",
      "description": "Inside length (mm)"
     },
     "inner_width_mm": {
      "type": "string",
      "format": "decimal",
      "description": "Inside width (mm)"
     },
     "inner_height_mm": {
      "type": "string",
      "format": "decimal",
      "description": "Inside height (mm)"
     },
     "door_width_mm": {
      "type": "string",
      "format": "decimal",
      "description": "Door width (mm)"
     },
     "door_height_mm": {
      "type": "string",
      "format": "decimal",
      "description": "Door height (mm)"
     },
     "max_payload_kg": {
      "type": "string",
      "format": "decimal",
      "description": "Maximum payload (kg)"
     },
     "tare_weight_kg": {
      "type": "string",
      "format": "decimal",
      "description": "Tare weight (kg)"
     },
     "max_gross_kg": {
      "type": "string",
      "format": "decimal",
      "description": "Maximum gross (kg)"
     },
     "max_volume_l": {
      "type": "string",
      "format": "decimal",
      "description": "Maximum volume (L)"
     },
     "max_pallets": {
      "type": "integer",
      "description": "Floor pallet positions"
     },
     "pallet_pattern": {
      "type": "string",
      "description": "Pallet pattern",
      "enum": [
       "straight",
       "turned",
       "pinwheel",
       "mixed"
      ]
     },
     "axle_count": {
      "type": "integer",
      "description": "Axles"
     },
     "max_axle_weight_kg": {
      "type": "string",
      "format": "decimal",
      "description": "Maximum axle weight (kg)"
     },
     "load_from": {
      "type": "string",
      "description": "Loaded from",
      "enum": [
       "rear",
       "side",
       "top",
       "rear_and_side",
       "any"
      ]
     },
     "has_tail_lift": {
      "type": "boolean",
      "description": "Has a tail lift"
     },
     "is_temperature_controlled": {
      "type": "boolean",
      "description": "Temperature controlled"
     },
     "temperature_min_c": {
      "type": "string",
      "format": "decimal",
      "description": "Minimum temperature (C)"
     },
     "temperature_max_c": {
      "type": "string",
      "format": "decimal",
      "description": "Maximum temperature (C)"
     },
     "cost_per_km": {
      "type": "string",
      "format": "decimal",
      "description": "Cost per km"
     },
     "cost_per_hour": {
      "type": "string",
      "format": "decimal",
      "description": "Cost per hour"
     },
     "fixed_cost": {
      "type": "string",
      "format": "decimal",
      "description": "Fixed cost a trip"
     },
     "currency": {
      "type": "string",
      "description": "Currency"
     },
     "co2_g_per_km": {
      "type": "string",
      "format": "decimal",
      "description": "CO2 grams per km"
     },
     "is_active": {
      "type": "boolean",
      "description": "Active"
     },
     "notes": {
      "type": "string",
      "description": "Notes"
     },
     "created_at": {
      "type": "string",
      "format": "date-time",
      "description": "Created at",
      "readOnly": true
     },
     "org_unit_id": {
      "type": "string",
      "format": "uuid",
      "description": "Org unit id",
      "readOnly": true
     },
     "xf_text_1": {
      "type": "string",
      "description": "Xf text 1",
      "readOnly": true
     },
     "xf_text_2": {
      "type": "string",
      "description": "Xf text 2",
      "readOnly": true
     },
     "xf_text_3": {
      "type": "string",
      "description": "Xf text 3",
      "readOnly": true
     },
     "xf_text_4": {
      "type": "string",
      "description": "Xf text 4",
      "readOnly": true
     },
     "xf_text_5": {
      "type": "string",
      "description": "Xf text 5",
      "readOnly": true
     },
     "xf_num_1": {
      "type": "string",
      "format": "decimal",
      "description": "Xf num 1",
      "readOnly": true
     },
     "xf_num_2": {
      "type": "string",
      "format": "decimal",
      "description": "Xf num 2",
      "readOnly": true
     },
     "xf_num_3": {
      "type": "string",
      "format": "decimal",
      "description": "Xf num 3",
      "readOnly": true
     },
     "xf_date_1": {
      "type": "string",
      "format": "date",
      "description": "Xf date 1",
      "readOnly": true
     },
     "xf_date_2": {
      "type": "string",
      "format": "date",
      "description": "Xf date 2",
      "readOnly": true
     },
     "created_by": {
      "type": "string",
      "format": "uuid",
      "description": "Created by",
      "readOnly": true
     },
     "updated_at": {
      "type": "string",
      "format": "date-time",
      "description": "Updated at",
      "readOnly": true
     },
     "updated_by": {
      "type": "string",
      "format": "uuid",
      "description": "Updated by",
      "readOnly": true
     }
    }
   }
  }
 },
 "security": [
  {
   "bearer": []
  }
 ],
 "paths": {
  "/api/scm/vehicle-types": {
   "get": {
    "summary": "list vehicle-types",
    "operationId": "list_vehicle_types_0_4",
    "responses": {
     "200": {
      "description": "OK"
     },
     "401": {
      "description": "No or bad credential"
     },
     "403": {
      "description": "Not granted"
     },
     "422": {
      "description": "Refused by validation"
     }
    }
   },
   "post": {
    "summary": "create vehicle-types",
    "operationId": "create_vehicle_types_1_4",
    "responses": {
     "200": {
      "description": "OK"
     },
     "401": {
      "description": "No or bad credential"
     },
     "403": {
      "description": "Not granted"
     },
     "422": {
      "description": "Refused by validation"
     }
    }
   }
  },
  "/api/scm/vehicle-types/{id}": {
   "get": {
    "summary": "get vehicle-types",
    "operationId": "get_vehicle_types_0_5",
    "responses": {
     "200": {
      "description": "OK"
     },
     "401": {
      "description": "No or bad credential"
     },
     "403": {
      "description": "Not granted"
     },
     "422": {
      "description": "Refused by validation"
     }
    }
   },
   "put": {
    "summary": "change vehicle-types",
    "operationId": "change_vehicle_types_1_5",
    "responses": {
     "200": {
      "description": "OK"
     },
     "401": {
      "description": "No or bad credential"
     },
     "403": {
      "description": "Not granted"
     },
     "422": {
      "description": "Refused by validation"
     }
    }
   },
   "delete": {
    "summary": "delete vehicle-types",
    "operationId": "delete_vehicle_types_2_5",
    "responses": {
     "200": {
      "description": "OK"
     },
     "401": {
      "description": "No or bad credential"
     },
     "403": {
      "description": "Not granted"
     },
     "422": {
      "description": "Refused by validation"
     }
    }
   }
  },
  "/api/scm/vehicle-types/{id}/copy": {
   "post": {
    "summary": "Copy",
    "operationId": "action_vehicle_types_0_6",
    "description": "Body keys: overrides, preview, withLines",
    "responses": {
     "200": {
      "description": "OK"
     },
     "401": {
      "description": "No or bad credential"
     },
     "403": {
      "description": "Not granted"
     },
     "422": {
      "description": "Refused by validation"
     }
    }
   }
  }
 }
}