📦 JSON schema + sample payload
{
"$schema": "https://json-schema.org/draft/2020-12/schema",
"title": "ServiceIntake",
"type": "object",
"required": ["jobId", "customer", "job", "machine", "labor"],
"properties": {
"jobId": { "type": "string" },
"business": {
"type": "object",
"properties": {
"waveBusinessId": { "type": ["string", "null"] },
"defaultCurrency": { "type": "string", "enum": ["CAD"] }
}
},
"customer": {
"type": "object",
"properties": {
"name": { "type": "string" },
"waveCustomerId": { "type": ["string", "null"] },
"contact": {
"type": "object",
"properties": {
"name": { "type": ["string", "null"] },
"phone": { "type": ["string", "null"] },
"email": { "type": ["string", "null"] }
}
},
"billingAddress": { "type": ["string", "null"] }
}
},
"job": {
"type": "object",
"properties": {
"openedDate": { "type": "string", "format": "date" },
"serviceDate": { "type": "string", "format": "date" },
"location": { "type": "string" },
"poNumber": { "type": ["string", "null"] },
"priority": { "type": "string", "enum": ["normal", "urgent"] },
"summary": { "type": ["string", "null"] }
}
},
"machine": {
"type": "object",
"properties": {
"unitId": { "type": "string" },
"serialNumber": { "type": ["string", "null"] },
"vin": { "type": ["string", "null"] },
"makeModel": { "type": "string" },
"year": { "type": ["integer", "null"] },
"meterReading": {
"type": ["object", "null"],
"properties": {
"value": { "type": "number" },
"unit": { "type": "string", "enum": ["hours", "km"] }
}
},
"owner": { "type": ["string", "null"] }
}
},
"labor": {
"type": "array",
"items": {
"type": "object",
"properties": {
"tech": { "type": "string" },
"category": { "type": "string" },
"hours": { "type": "number" },
"overtime": { "type": "boolean" },
"rate": { "type": "number" },
"travelHours": { "type": ["number", "null"] },
"perDiem": { "type": ["number", "null"] }
}
}
},
"parts": {
"type": "array",
"items": {
"type": "object",
"properties": {
"description": { "type": "string" },
"quantity": { "type": "number" },
"unitCost": { "type": "number" },
"markupPercent": { "type": ["number", "null"] },
"taxable": { "type": "boolean" },
"supplierInvoice": { "type": ["string", "null"] }
}
}
},
"fees": {
"type": "array",
"items": {
"type": "object",
"properties": {
"type": { "type": "string" },
"description": { "type": ["string", "null"] },
"amount": { "type": "number" },
"taxable": { "type": "boolean" }
}
}
},
"taxes": {
"type": "object",
"properties": {
"gst": { "type": ["number", "null"] },
"pst": { "type": ["number", "null"] }
}
},
"totals": {
"type": "object",
"properties": {
"subtotal": { "type": ["number", "null"] },
"tax": { "type": ["number", "null"] },
"grandTotal": { "type": ["number", "null"] }
}
},
"paymentTerms": {
"type": "object",
"properties": {
"terms": { "type": "string" },
"customDays": { "type": ["number", "null"] },
"earlyPayPercent": { "type": ["number", "null"] },
"earlyPayDays": { "type": ["number", "null"] },
"depositCollected": { "type": ["number", "null"] }
}
},
"status": { "type": "string", "enum": ["draft", "ready", "posted"] }
}
}
🔌 API endpoint for agents
POST service jobs to https://j2heavyduty.com/api/intake (or /.netlify/functions/intake during testing).
Include Content-Type: application/json and provide a payload that matches the schema above.
POST /api/intake HTTP/1.1
Host: j2heavyduty.com
Content-Type: application/json
{
"jobId": "J2-20260303-001",
"customer": {
"name": "Summit Earthworks",
"contact": {
"phone": "+1-604-555-0199",
"email": "dispatch@summitearthworks.ca"
}
},
"job": {
"openedDate": "2026-03-03",
"serviceDate": "2026-03-05",
"location": "Langley Yard",
"priority": "urgent"
},
"machine": {
"unitId": "350G-Excavator",
"makeModel": "John Deere 350G",
"meterReading": {
"value": 6123,
"unit": "hours"
}
},
"labor": [
{ "tech": "Jordan", "category": "mechanic", "hours": 3.5, "rate": 165 }
]
}
On success you’ll receive 200 OK with an intakeId UUID and ISO8601 receivedAt timestamp.