{"items":[{"type":"link","label":"Scale API","link":"/scale","routeSlug":"/scale","content":{"contentType":"overview","meta":{"name":"Scale API"},"children":[{"nodeType":"container","panels":[{"title":"Download OpenAPI description","titleTranslationKey":"download.description.title","children":[{"kind":"download","label":"scale.json","url":"/_bundle/scale.json?download"},{"kind":"download","label":"scale.yaml","url":"/_bundle/scale.yaml?download"}]},{"title":"Overview","titleTranslationKey":"info.title","children":[]},{"title":"Languages","titleTranslationKey":"languages.title","children":[{"kind":"languages","options":[{"key":"curl","title":"curl","lang":"curl"},{"key":"javascript","title":"JavaScript","lang":"JavaScript"},{"key":"node","title":"Node.js","lang":"Node.js"},{"key":"python","title":"Python","lang":"Python"},{"key":"java","title":"Java","lang":"Java"},{"key":"csharp","title":"C#","lang":"C#"},{"key":"php","title":"PHP","lang":"PHP"},{"key":"go","title":"Go","lang":"Go"},{"key":"ruby","title":"Ruby","lang":"Ruby"},{"key":"r","title":"R","lang":"R"},{"key":"payload","title":"Payload","lang":"Payload"}]}]},{"title":"Servers","titleTranslationKey":"servers.title","children":[{"kind":"servers","servers":[{"url":"/_mock/scale","description":"Mock server","isMockServer":true},{"url":"https://api.haulerhero.com","description":"Hauler Hero production server"}],"mode":"default"}]}],"children":[{"nodeType":"overview-section-wrapper","children":[{"nodeType":"header","level":1,"label":"Scale API (1.0.0)","showPageActions":true},{"nodeType":"overview-section-wrapper","children":[{"nodeType":"markdoc","content":[{"$$mdtype":"Node","type":"paragraph","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"The Scale API lets partners push scale tickets — with materials, quantities, and inbound/outbound flow data — into the Hauler Hero platform. See the "},"children":[]},{"$$mdtype":"Node","type":"link","inline":true,"attributes":{"href":"/scale-integration"},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"Scale API Integration Guide"},"children":[]}]},{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":" for setup, workflow, and field requirements."},"children":[]}]}]}]}],"sectionId":"/scale"}],"sectionId":"/scale"}]}]}},{"label":"Create a scale ticket","deprecated":false,"httpVerb":"post","isAdditionalOperation":false,"isWebhook":false,"type":"link","link":"/scale/other/addscaleticket","routeSlug":"/scale/other/addscaleticket","metadata":{"seo":{"title":"Create a scale ticket","description":"Creates a new scale ticket with weight measurements, materials, and vehicle information"}},"content":{"contentType":"item","itemVariant":"httpItem","meta":{"sourceId":"addScaleTicket","name":"Create a scale ticket","isWebhook":false,"pointer":"/paths/~1hero-api~1v1~1tickets/post","hasSamples":true},"children":[{"nodeType":"container","children":[{"nodeType":"header","level":2,"label":"Create a scale ticket","isWebhook":false,"showPageActions":true}],"panels":[]},{"nodeType":"container","children":[{"nodeType":"header","level":4,"label":"Request","labelTranslationKey":"request","deepLinkSuffix":"request"},{"nodeType":"markdoc","content":"Creates a new scale ticket with weight measurements, materials, and vehicle information"},{"nodeType":"security","requirements":[{"schemes":[{"name":"apiKey","scopes":[],"type":"apiKey","in":"header","paramName":"HERO-API-KEY","description":[{"$$mdtype":"Node","type":"paragraph","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"API key for authenticating requests."},"children":[]}]}]},{"$$mdtype":"Node","type":"paragraph","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"To obtain an API key:"},"children":[]}]}]},{"$$mdtype":"Node","type":"list","attributes":{"ordered":false,"marker":"-"},"children":[{"$$mdtype":"Node","type":"item","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"Contact your account manager"},"children":[]}]}]},{"$$mdtype":"Node","type":"item","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"Email: api-support@haulerhero.com"},"children":[]}]}]}]},{"$$mdtype":"Node","type":"paragraph","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"Include in request header: "},"children":[]},{"$$mdtype":"Node","type":"code","inline":true,"attributes":{"content":"HERO-API-KEY: your_api_key_here"},"children":[]}]}]}]}]}]},{"nodeType":"item-content","variant":"body","label":"Request Body","labelTranslationKey":"body","required":true,"mediaTypes":["application/json"],"mediaTypeSchemas":{"application/json":{"schemaId":"components/schemas/CreateScaleTicketRequest","exampleIds":["paths/~1hero-api~1v1~1tickets/post/requestBody/content/application~1json/examples/basicTicket"]}},"schemaId":"components/schemas/CreateScaleTicketRequest","exampleIds":["paths/~1hero-api~1v1~1tickets/post/requestBody/content/application~1json/examples/basicTicket"],"pointer":"/paths/~1hero-api~1v1~1tickets/post/requestBody"}],"panels":[{"children":[{"kind":"code-sample","source":{"kind":"code-sample","operationType":"http","method":"POST","path":"/hero-api/v1/tickets","servers":[{"url":"/_mock/scale","description":"Mock server","isMockServer":true},{"url":"https://api.haulerhero.com","description":"Hauler Hero production server"}],"parameters":{"path":[],"query":[],"querystring":[],"header":[],"cookie":[]},"security":[{"schemes":[{"id":"apiKey","type":"apiKey","name":"HERO-API-KEY","in":"header"}],"scopes":[]}],"requestBody":{"application/json":{"schemaId":"components/schemas/CreateScaleTicketRequest","exampleIds":["paths/~1hero-api~1v1~1tickets/post/requestBody/content/application~1json/examples/basicTicket"]}},"responseCodes":["200","400","401","422","500"],"pointer":"/hero-api/v1/tickets","href":"other/addscaleticket","openApiOperationId":"addScaleTicket","summary":"Create a scale ticket"},"isWebhook":false,"hideReplay":false,"servers":[{"url":"/_mock/scale","description":"Mock server","isMockServer":true},{"url":"https://api.haulerhero.com","description":"Hauler Hero production server"}],"schemaId":"components/schemas/CreateScaleTicketRequest","exampleIds":["paths/~1hero-api~1v1~1tickets/post/requestBody/content/application~1json/examples/basicTicket"],"mediaTypes":["application/json"],"mediaTypeSchemas":{"application/json":{"schemaId":"components/schemas/CreateScaleTicketRequest","exampleIds":["paths/~1hero-api~1v1~1tickets/post/requestBody/content/application~1json/examples/basicTicket"]}},"examples":[{}]}]}]},{"nodeType":"container","children":[{"nodeType":"header","level":4,"label":"Responses","labelTranslationKey":"responses","deepLinkSuffix":"responses"},{"nodeType":"item-content","variant":"responses","responses":[{"code":"200","description":"Scale ticket created successfully","mediaType":"application/json","mediaTypes":["application/json"],"mediaTypeContent":{"application/json":{"schemaId":"components/schemas/CreateScaleTicketResponse","exampleIds":["paths/~1hero-api~1v1~1tickets/post/responses/200/content/application~1json/example"]}},"schemaId":"components/schemas/CreateScaleTicketResponse","exampleIds":["paths/~1hero-api~1v1~1tickets/post/responses/200/content/application~1json/example"]},{"code":"400","description":"Bad request - Invalid payload or missing required fields","mediaType":"application/json","mediaTypes":["application/json"],"mediaTypeContent":{"application/json":{"schemaId":"components/schemas/ErrorResponse","exampleIds":["paths/~1hero-api~1v1~1tickets/post/responses/400/content/application~1json/example"]}},"schemaId":"components/schemas/ErrorResponse","exampleIds":["paths/~1hero-api~1v1~1tickets/post/responses/400/content/application~1json/example"]},{"code":"401","description":"Unauthorized - Invalid or missing authentication","mediaType":"application/json","mediaTypes":["application/json"],"mediaTypeContent":{"application/json":{"schemaId":"components/schemas/ErrorResponse","exampleIds":["paths/~1hero-api~1v1~1tickets/post/responses/401/content/application~1json/example"]}},"schemaId":"components/schemas/ErrorResponse","exampleIds":["paths/~1hero-api~1v1~1tickets/post/responses/401/content/application~1json/example"]},{"code":"422","description":"Validation exception - Business rule violation","mediaType":"application/json","mediaTypes":["application/json"],"mediaTypeContent":{"application/json":{"schemaId":"components/schemas/ErrorResponse","exampleIds":["paths/~1hero-api~1v1~1tickets/post/responses/422/content/application~1json/example"]}},"schemaId":"components/schemas/ErrorResponse","exampleIds":["paths/~1hero-api~1v1~1tickets/post/responses/422/content/application~1json/example"]},{"code":"500","description":"Internal server error","mediaType":"application/json","mediaTypes":["application/json"],"mediaTypeContent":{"application/json":{"schemaId":"components/schemas/ErrorResponse","exampleIds":["paths/~1hero-api~1v1~1tickets/post/responses/500/content/application~1json/example"]}},"schemaId":"components/schemas/ErrorResponse","exampleIds":["paths/~1hero-api~1v1~1tickets/post/responses/500/content/application~1json/example"]}],"pointer":"/paths/~1hero-api~1v1~1tickets/post/responses"}],"panels":[{"children":[{"kind":"response","headerTitle":"Response","responseCodes":[{"code":"200","schemaId":"components/schemas/CreateScaleTicketResponse","exampleIds":["paths/~1hero-api~1v1~1tickets/post/responses/200/content/application~1json/example"],"mediaTypes":["application/json"],"mediaTypeContent":{"application/json":{"schemaId":"components/schemas/CreateScaleTicketResponse","exampleIds":["paths/~1hero-api~1v1~1tickets/post/responses/200/content/application~1json/example"]}}},{"code":"400","schemaId":"components/schemas/ErrorResponse","exampleIds":["paths/~1hero-api~1v1~1tickets/post/responses/400/content/application~1json/example"],"mediaTypes":["application/json"],"mediaTypeContent":{"application/json":{"schemaId":"components/schemas/ErrorResponse","exampleIds":["paths/~1hero-api~1v1~1tickets/post/responses/400/content/application~1json/example"]}}},{"code":"401","schemaId":"components/schemas/ErrorResponse","exampleIds":["paths/~1hero-api~1v1~1tickets/post/responses/401/content/application~1json/example"],"mediaTypes":["application/json"],"mediaTypeContent":{"application/json":{"schemaId":"components/schemas/ErrorResponse","exampleIds":["paths/~1hero-api~1v1~1tickets/post/responses/401/content/application~1json/example"]}}},{"code":"422","schemaId":"components/schemas/ErrorResponse","exampleIds":["paths/~1hero-api~1v1~1tickets/post/responses/422/content/application~1json/example"],"mediaTypes":["application/json"],"mediaTypeContent":{"application/json":{"schemaId":"components/schemas/ErrorResponse","exampleIds":["paths/~1hero-api~1v1~1tickets/post/responses/422/content/application~1json/example"]}}},{"code":"500","schemaId":"components/schemas/ErrorResponse","exampleIds":["paths/~1hero-api~1v1~1tickets/post/responses/500/content/application~1json/example"],"mediaTypes":["application/json"],"mediaTypeContent":{"application/json":{"schemaId":"components/schemas/ErrorResponse","exampleIds":["paths/~1hero-api~1v1~1tickets/post/responses/500/content/application~1json/example"]}}}],"examples":[]}]}]},{"nodeType":"container","children":[{"nodeType":"feedback","pageSlug":"/other/addscaleticket"}],"panels":[]}]},"httpPath":"/hero-api/v1/tickets"}],"store":{"schemaStore":{"components/schemas/CreateScaleTicketRequest":{"id":"components/schemas/CreateScaleTicketRequest","kind":"json-schema","title":"CreateScaleTicketRequest","data":{"type":"object","required":["siteId","materials"],"properties":{"siteId":{"type":"string","format":"uuid","description":"Unique identifier for the disposal site","example":"64318450-1ce2-499d-8a70-f313aabe1831"},"materials":{"type":"array","items":{"$ref":"#/components/schemas/MaterialItem"},"minItems":1,"description":"List of materials with quantities"},"inboundFlow":{"$ref":"#/components/schemas/FlowData"},"outboundFlow":{"$ref":"#/components/schemas/FlowData"},"customFields":{"type":"object","description":"Optional map of custom key-value pairs for additional integration-specific data not covered by standard fields","additionalProperties":{"type":"string"},"example":{"driverName":"John","routeName":"Route 1","vehicleId":"TRK-042","customerReference":"PO-98765"}}}}},"components/schemas/CreateScaleTicketResponse":{"id":"components/schemas/CreateScaleTicketResponse","kind":"json-schema","title":"CreateScaleTicketResponse","data":{"type":"object","required":["success","disposalTicketId"],"properties":{"success":{"type":"boolean","description":"Whether the request was successful","example":true},"disposalTicketId":{"type":"string","format":"uuid","description":"Unique identifier for the created disposal ticket","example":"123e4567-e89b-12d3-a456-426614174000"}}}},"components/schemas/MaterialItem":{"id":"components/schemas/MaterialItem","kind":"json-schema","title":"MaterialItem","data":{"type":"object","required":["id","name","quantity","unitOfMeasure"],"properties":{"id":{"type":"string","format":"uuid","description":"Unique identifier for the material","example":"a51b814b-1b23-4f28-8c2a-b90030340eea"},"name":{"type":"string","description":"Material name","example":"Paper"},"quantity":{"type":"number","description":"Quantity of the material","example":100},"unitPriceCents":{"type":"number","format":"double","description":[{"$$mdtype":"Node","type":"paragraph","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"Unit price in cents (e.g., 15.50 for $0.155)"},"children":[]}]}]}],"example":15.5},"unitOfMeasure":{"type":"string","description":"Unit of measurement for the material","example":"Ton","enum":["Ton","Gallon","Pound","Kilogram","Cubic Yard","Cubic Meter","Item"]}}}},"components/schemas/FlowData":{"id":"components/schemas/FlowData","kind":"json-schema","title":"FlowData","data":{"type":"object","required":["ticketNumber","updatedAt"],"properties":{"ticketNumber":{"type":"string","description":"Unique ticket number for this flow (inbound or outbound)","example":"INB-20240701-001"},"updatedAt":{"type":"string","format":"date-time","description":"Timestamp when this flow was last updated","example":"2024-07-01T12:00:00Z"}}}},"components/schemas/ErrorResponse":{"id":"components/schemas/ErrorResponse","kind":"json-schema","title":"ErrorResponse","data":{"type":"object","required":["success","error"],"properties":{"success":{"type":"boolean","description":"Always false for errors","example":false},"error":{"type":"object","required":["code","message"],"properties":{"code":{"type":"string","description":"Machine-readable error code","example":"INVALID_PAYLOAD","enum":["INVALID_PAYLOAD","UNAUTHORIZED","INTERNAL_ERROR","VALIDATION_ERROR"]},"message":{"type":"string","description":"Human-readable error message","example":"Missing required field: siteId"},"details":{"type":"object","description":"Additional error details (optional)","additionalProperties":true}}}}}}},"exampleStore":{"paths/~1hero-api~1v1~1tickets/post/requestBody/content/application~1json/examples/basicTicket":{"value":{"siteId":"64318450-1ce2-499d-8a70-f313aabe1831","materials":[{"id":"a51b814b-1b23-4f28-8c2a-b90030340eea","name":"Paper","quantity":100,"unitPriceCents":15.5,"unitOfMeasure":"Ton"}],"inboundFlow":{"ticketNumber":"INB-20240701-001","updatedAt":"2024-07-01T12:00:00Z"},"outboundFlow":{"ticketNumber":"OUT-20250701-001","updatedAt":"2025-07-01T12:00:00Z"},"customFields":{"driverName":"John","routeName":"Route 1"}},"key":"basicTicket","summary":"Basic scale ticket with inbound and outbound flows","id":"paths/~1hero-api~1v1~1tickets/post/requestBody/content/application~1json/examples/basicTicket"},"paths/~1hero-api~1v1~1tickets/post/responses/200/content/application~1json/example":{"value":{"success":true,"disposalTicketId":"123e4567-e89b-12d3-a456-426614174000"},"id":"paths/~1hero-api~1v1~1tickets/post/responses/200/content/application~1json/example"},"paths/~1hero-api~1v1~1tickets/post/responses/400/content/application~1json/example":{"value":{"success":false,"error":{"code":"INVALID_PAYLOAD","message":"Missing required field: siteId"}},"id":"paths/~1hero-api~1v1~1tickets/post/responses/400/content/application~1json/example"},"paths/~1hero-api~1v1~1tickets/post/responses/401/content/application~1json/example":{"value":{"success":false,"error":{"code":"UNAUTHORIZED","message":"Invalid API key"}},"id":"paths/~1hero-api~1v1~1tickets/post/responses/401/content/application~1json/example"},"paths/~1hero-api~1v1~1tickets/post/responses/422/content/application~1json/example":{"value":{"success":false,"error":{"code":"VALIDATION_ERROR","message":"Material ID does not exist in the system"}},"id":"paths/~1hero-api~1v1~1tickets/post/responses/422/content/application~1json/example"},"paths/~1hero-api~1v1~1tickets/post/responses/500/content/application~1json/example":{"value":{"success":false,"error":{"code":"INTERNAL_ERROR","message":"An unexpected error occurred while processing the scale ticket"}},"id":"paths/~1hero-api~1v1~1tickets/post/responses/500/content/application~1json/example"}},"securitySchemeStore":{"apiKey":{"id":"apiKey","type":"apiKey","description":[{"$$mdtype":"Node","type":"paragraph","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"API key for authenticating requests."},"children":[]}]}]},{"$$mdtype":"Node","type":"paragraph","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"To obtain an API key:"},"children":[]}]}]},{"$$mdtype":"Node","type":"list","attributes":{"ordered":false,"marker":"-"},"children":[{"$$mdtype":"Node","type":"item","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"Contact your account manager"},"children":[]}]}]},{"$$mdtype":"Node","type":"item","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"Email: api-support@haulerhero.com"},"children":[]}]}]}]},{"$$mdtype":"Node","type":"paragraph","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"Include in request header: "},"children":[]},{"$$mdtype":"Node","type":"code","inline":true,"attributes":{"content":"HERO-API-KEY: your_api_key_here"},"children":[]}]}]}],"in":"header","paramName":"HERO-API-KEY"}},"servers":[{"url":"/_mock/scale","isMockServer":true,"description":"Mock server"},{"url":"https://api.haulerhero.com","description":"Hauler Hero production server"}]},"options":{"hideSidebar":true,"mockServer":{"url":"/_mock/scale","position":"first","description":"Mock server"},"disableRouter":true,"downloadUrls":[{"url":"/_bundle/scale.json?download"},{"url":"/_bundle/scale.yaml?download"}],"excludeFromSearch":false,"specType":"openapi","markdocOptions":{"tags":{},"nodes":{},"components":{}},"metadata":{"title":"Scale API","description":"The Scale API lets partners push scale tickets — with materials, quantities, and inbound/outbound flow data — into the Hauler Hero platform. See the [Scale API Integration Guide](/scale-integration) for setup, workflow, and field requirements.\n"}},"baseSlug":"/scale","routesMapping":{}}