# Create a scale ticket Creates a new scale ticket with weight measurements, materials, and vehicle information Endpoint: POST /hero-api/v1/tickets Version: 1.0.0 Security: apiKey ## Request fields (application/json): - `siteId` (string, required) Unique identifier for the disposal site Example: "64318450-1ce2-499d-8a70-f313aabe1831" - `materials` (array, required) List of materials with quantities - `materials.id` (string, required) Unique identifier for the material Example: "a51b814b-1b23-4f28-8c2a-b90030340eea" - `materials.name` (string, required) Material name Example: "Paper" - `materials.quantity` (number, required) Quantity of the material Example: 100 - `materials.unitPriceCents` (number) Unit price in cents (e.g., 15.50 for $0.155) Example: 15.5 - `materials.unitOfMeasure` (string, required) Unit of measurement for the material Enum: "Ton", "Gallon", "Pound", "Kilogram", "Cubic Yard", "Cubic Meter", "Item" - `inboundFlow` (object) - `inboundFlow.ticketNumber` (string, required) Unique ticket number for this flow (inbound or outbound) Example: "INB-20240701-001" - `inboundFlow.updatedAt` (string, required) Timestamp when this flow was last updated Example: "2024-07-01T12:00:00Z" - `outboundFlow` (object) ## Response 200 fields (application/json): - `success` (boolean, required) Whether the request was successful Example: true - `disposalTicketId` (string, required) Unique identifier for the created disposal ticket Example: "123e4567-e89b-12d3-a456-426614174000" ## Response 400 fields (application/json): - `success` (boolean, required) Always false for errors - `error` (object, required) - `error.code` (string, required) Machine-readable error code Enum: "INVALID_PAYLOAD", "UNAUTHORIZED", "INTERNAL_ERROR", "VALIDATION_ERROR" - `error.message` (string, required) Human-readable error message Example: "Missing required field: siteId" - `error.details` (object) Additional error details (optional) ## Response 401 fields (application/json): - `success` (boolean, required) Always false for errors - `error` (object, required) - `error.code` (string, required) Machine-readable error code Enum: "INVALID_PAYLOAD", "UNAUTHORIZED", "INTERNAL_ERROR", "VALIDATION_ERROR" - `error.message` (string, required) Human-readable error message Example: "Missing required field: siteId" - `error.details` (object) Additional error details (optional) ## Response 422 fields (application/json): - `success` (boolean, required) Always false for errors - `error` (object, required) - `error.code` (string, required) Machine-readable error code Enum: "INVALID_PAYLOAD", "UNAUTHORIZED", "INTERNAL_ERROR", "VALIDATION_ERROR" - `error.message` (string, required) Human-readable error message Example: "Missing required field: siteId" - `error.details` (object) Additional error details (optional) ## Response 500 fields (application/json): - `success` (boolean, required) Always false for errors - `error` (object, required) - `error.code` (string, required) Machine-readable error code Enum: "INVALID_PAYLOAD", "UNAUTHORIZED", "INTERNAL_ERROR", "VALIDATION_ERROR" - `error.message` (string, required) Human-readable error message Example: "Missing required field: siteId" - `error.details` (object) Additional error details (optional)