{
 "openapi": "3.1.0",
 "info": {
  "title": "Containers (Supply Chain)",
  "version": "20261030b",
  "description": "The box itself. A container without a verified gross mass does not get loaded, which is why that is a column rather than a note."
 },
 "servers": [
  {
   "url": "https://{tenant}.tranxact.ai",
   "variables": {
    "tenant": {
     "default": "demo"
    }
   }
  }
 ],
 "components": {
  "securitySchemes": {
   "bearer": {
    "type": "http",
    "scheme": "bearer"
   }
  },
  "schemas": {
   "containers": {
    "type": "object",
    "required": [
     "container_no"
    ],
    "properties": {
     "id": {
      "type": "string",
      "format": "uuid",
      "description": "Id",
      "readOnly": true
     },
     "org_id": {
      "type": "string",
      "format": "uuid",
      "description": "Org id",
      "readOnly": true
     },
     "forwarding_shipment_id": {
      "type": "string",
      "format": "uuid",
      "description": "Shipment"
     },
     "load_id": {
      "type": "string",
      "format": "uuid",
      "description": "Load"
     },
     "container_no": {
      "type": "string",
      "description": "Container number"
     },
     "iso_type": {
      "type": "string",
      "description": "ISO type"
     },
     "size_ft": {
      "type": "integer",
      "description": "Size (ft)"
     },
     "container_type": {
      "type": "string",
      "description": "Type"
     },
     "seal_no": {
      "type": "string",
      "description": "Seal number"
     },
     "seal_type": {
      "type": "string",
      "description": "Seal type"
     },
     "tare_weight_kg": {
      "type": "string",
      "format": "decimal",
      "description": "Tare weight (kg)"
     },
     "cargo_weight_kg": {
      "type": "string",
      "format": "decimal",
      "description": "Cargo weight (kg)"
     },
     "vgm_kg": {
      "type": "string",
      "format": "decimal",
      "description": "Verified gross mass (kg)"
     },
     "vgm_method": {
      "type": "string",
      "description": "VGM method",
      "enum": [
       "method_1",
       "method_2"
      ]
     },
     "vgm_certified_by": {
      "type": "string",
      "description": "Certified by"
     },
     "vgm_certified_at": {
      "type": "string",
      "format": "date-time",
      "description": "Certified at"
     },
     "volume_cbm": {
      "type": "string",
      "format": "decimal",
      "description": "Volume (m3)"
     },
     "package_count": {
      "type": "integer",
      "description": "Packages"
     },
     "temperature_c": {
      "type": "string",
      "format": "decimal",
      "description": "Temperature (C)"
     },
     "humidity_pct": {
      "type": "string",
      "format": "decimal",
      "description": "Humidity %"
     },
     "vent_setting": {
      "type": "string",
      "description": "Vent setting"
     },
     "stuffed_at": {
      "type": "string",
      "format": "date-time",
      "description": "Stuffed"
     },
     "gate_in_at": {
      "type": "string",
      "format": "date-time",
      "description": "Gated in"
     },
     "loaded_at": {
      "type": "string",
      "format": "date-time",
      "description": "Loaded"
     },
     "discharged_at": {
      "type": "string",
      "format": "date-time",
      "description": "Discharged"
     },
     "gate_out_at": {
      "type": "string",
      "format": "date-time",
      "description": "Gated out"
     },
     "emptied_at": {
      "type": "string",
      "format": "date-time",
      "description": "Emptied"
     },
     "demurrage_free_until": {
      "type": "string",
      "format": "date",
      "description": "Demurrage free until"
     },
     "detention_free_until": {
      "type": "string",
      "format": "date",
      "description": "Detention free until"
     },
     "status": {
      "type": "string",
      "description": "Status",
      "enum": [
       "planned",
       "allocated",
       "stuffing",
       "stuffed",
       "gated_in",
       "loaded",
       "on_water",
       "discharged",
       "gated_out",
       "delivered",
       "emptied",
       "returned"
      ]
     },
     "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/containers": {
   "get": {
    "summary": "list containers",
    "operationId": "list_containers_0_4",
    "responses": {
     "200": {
      "description": "OK"
     },
     "401": {
      "description": "No or bad credential"
     },
     "403": {
      "description": "Not granted"
     },
     "422": {
      "description": "Refused by validation"
     }
    }
   },
   "post": {
    "summary": "create containers",
    "operationId": "create_containers_1_4",
    "responses": {
     "200": {
      "description": "OK"
     },
     "401": {
      "description": "No or bad credential"
     },
     "403": {
      "description": "Not granted"
     },
     "422": {
      "description": "Refused by validation"
     }
    }
   }
  },
  "/api/scm/containers/{id}": {
   "get": {
    "summary": "get containers",
    "operationId": "get_containers_0_5",
    "responses": {
     "200": {
      "description": "OK"
     },
     "401": {
      "description": "No or bad credential"
     },
     "403": {
      "description": "Not granted"
     },
     "422": {
      "description": "Refused by validation"
     }
    }
   },
   "put": {
    "summary": "change containers",
    "operationId": "change_containers_1_5",
    "responses": {
     "200": {
      "description": "OK"
     },
     "401": {
      "description": "No or bad credential"
     },
     "403": {
      "description": "Not granted"
     },
     "422": {
      "description": "Refused by validation"
     }
    }
   },
   "delete": {
    "summary": "delete containers",
    "operationId": "delete_containers_2_5",
    "responses": {
     "200": {
      "description": "OK"
     },
     "401": {
      "description": "No or bad credential"
     },
     "403": {
      "description": "Not granted"
     },
     "422": {
      "description": "Refused by validation"
     }
    }
   }
  },
  "/api/scm/containers/{id}/copy": {
   "post": {
    "summary": "Copy",
    "operationId": "action_containers_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"
     }
    }
   }
  }
 }
}