Jobs
JobsService tracks work done for a customer away from the counter: a plumber's repair, a decorator's room, a cleaner's contract. A job can start from a quote (an estimate) or from scratch, has visits on the team's calendar, collects the time and materials used, and ends as an invoice.
Managers, admins and owners create and change jobs; everyone signed in can see them and their visits.
ListJobs#
Request body
statusJobStatusUnspecified lists open and done jobs.
customerIdstringcustomer_idResponse
jobsJob[]curl https://api.buziin.tech/holygrail.jobs.v1.JobsService/ListJobs \
-H "Authorization: Bearer $LUMORA_ACCESS_TOKEN" \
-H "Content-Type: application/json" \
-d '{
"status": "JOB_STATUS_OPEN"
}'{
"jobs": [
{
"id": "4f1c2e9a-8b3d-4e57-9a10-2c6f7d8e9b01",
"number": "",
"status": "JOB_STATUS_OPEN",
"locationId": "0193a4f2-0b10-7f62-a4c9-6d1e2b3c4f70",
"customerId": "",
"customerName": "Amina Mushi",
"title": "",
"address": "",
"description": "",
"total": "150000",
"quoteId": "",
"quoteNumber": "",
"invoiceId": "",
"invoiceNumber": "",
"createdAt": "",
"statusAt": "",
"quoteTotal": "150000"
}
]
}curl https://api.buziin.tech/holygrail.jobs.v1.JobsService/GetJob \
-H "Authorization: Bearer $LUMORA_ACCESS_TOKEN" \
-H "Content-Type: application/json" \
-d '{
"id": "4f1c2e9a-8b3d-4e57-9a10-2c6f7d8e9b01"
}'{
"job": {
"id": "4f1c2e9a-8b3d-4e57-9a10-2c6f7d8e9b01",
"number": "",
"status": "JOB_STATUS_OPEN",
"locationId": "0193a4f2-0b10-7f62-a4c9-6d1e2b3c4f70",
"customerId": "",
"customerName": "Amina Mushi",
"title": "",
"address": "",
"description": "",
"total": "150000",
"quoteId": "",
"quoteNumber": "",
"invoiceId": "",
"invoiceNumber": "",
"createdAt": "",
"statusAt": "",
"quoteTotal": "150000"
}
}CreateJob#
Request body
idstringClient-chosen UUID, so a retry creates one job.
draftJobDraftResponse
jobJobcurl https://api.buziin.tech/holygrail.jobs.v1.JobsService/CreateJob \
-H "Authorization: Bearer $LUMORA_ACCESS_TOKEN" \
-H "Content-Type: application/json" \
-d '{
"id": "4f1c2e9a-8b3d-4e57-9a10-2c6f7d8e9b01",
"draft": {
"locationId": "0193a4f2-0b10-7f62-a4c9-6d1e2b3c4f70",
"lines": [
{
"id": "4f1c2e9a-8b3d-4e57-9a10-2c6f7d8e9b01",
"quantity": 1,
"unitPrice": "150000",
"discount": 1,
"taxRateIds": [
""
],
"tax": "150000"
}
]
}
}'{
"job": {
"id": "4f1c2e9a-8b3d-4e57-9a10-2c6f7d8e9b01",
"number": "",
"status": "JOB_STATUS_OPEN",
"locationId": "0193a4f2-0b10-7f62-a4c9-6d1e2b3c4f70",
"customerId": "",
"customerName": "Amina Mushi",
"title": "",
"address": "",
"description": "",
"total": "150000",
"quoteId": "",
"quoteNumber": "",
"invoiceId": "",
"invoiceNumber": "",
"createdAt": "",
"statusAt": "",
"quoteTotal": "150000"
}
}CreateJobFromQuote#
CreateJobFromQuote starts a job from an issued or accepted estimate, with its customer and lines.
Request body
idstringquoteIdstringquote_idlocationIdstringlocation_idaddressstringResponse
jobJobcurl https://api.buziin.tech/holygrail.jobs.v1.JobsService/CreateJobFromQuote \
-H "Authorization: Bearer $LUMORA_ACCESS_TOKEN" \
-H "Content-Type: application/json" \
-d '{
"id": "4f1c2e9a-8b3d-4e57-9a10-2c6f7d8e9b01",
"locationId": "0193a4f2-0b10-7f62-a4c9-6d1e2b3c4f70"
}'{
"job": {
"id": "4f1c2e9a-8b3d-4e57-9a10-2c6f7d8e9b01",
"number": "",
"status": "JOB_STATUS_OPEN",
"locationId": "0193a4f2-0b10-7f62-a4c9-6d1e2b3c4f70",
"customerId": "",
"customerName": "Amina Mushi",
"title": "",
"address": "",
"description": "",
"total": "150000",
"quoteId": "",
"quoteNumber": "",
"invoiceId": "",
"invoiceNumber": "",
"createdAt": "",
"statusAt": "",
"quoteTotal": "150000"
}
}UpdateJob#
Request body
idstringdraftJobDraftResponse
jobJobcurl https://api.buziin.tech/holygrail.jobs.v1.JobsService/UpdateJob \
-H "Authorization: Bearer $LUMORA_ACCESS_TOKEN" \
-H "Content-Type: application/json" \
-d '{
"id": "4f1c2e9a-8b3d-4e57-9a10-2c6f7d8e9b01",
"draft": {
"locationId": "0193a4f2-0b10-7f62-a4c9-6d1e2b3c4f70",
"lines": [
{
"id": "4f1c2e9a-8b3d-4e57-9a10-2c6f7d8e9b01",
"quantity": 1,
"unitPrice": "150000",
"discount": 1,
"taxRateIds": [
""
],
"tax": "150000"
}
]
}
}'{
"job": {
"id": "4f1c2e9a-8b3d-4e57-9a10-2c6f7d8e9b01",
"number": "",
"status": "JOB_STATUS_OPEN",
"locationId": "0193a4f2-0b10-7f62-a4c9-6d1e2b3c4f70",
"customerId": "",
"customerName": "Amina Mushi",
"title": "",
"address": "",
"description": "",
"total": "150000",
"quoteId": "",
"quoteNumber": "",
"invoiceId": "",
"invoiceNumber": "",
"createdAt": "",
"statusAt": "",
"quoteTotal": "150000"
}
}ScheduleVisit#
ScheduleVisit books a person's time for the job, which no other booking can then overlap.
Request body
jobIdstringjob_ididstringClient-chosen UUID for the booking.
staffIdstringstaff_idstartsAtstringstarts_atRFC 3339.
endsAtstringends_atnotestringResponse
visitBookingcurl https://api.buziin.tech/holygrail.jobs.v1.JobsService/ScheduleVisit \
-H "Authorization: Bearer $LUMORA_ACCESS_TOKEN" \
-H "Content-Type: application/json" \
-d '{
"id": "4f1c2e9a-8b3d-4e57-9a10-2c6f7d8e9b01"
}'{
"visit": {
"id": "4f1c2e9a-8b3d-4e57-9a10-2c6f7d8e9b01",
"locationId": "0193a4f2-0b10-7f62-a4c9-6d1e2b3c4f70",
"kind": "BOOKING_KIND_APPOINTMENT",
"status": "BOOKING_STATUS_BOOKED",
"source": "BOOKING_SOURCE_REGISTER",
"staffId": "",
"resourceId": "",
"itemId": "",
"variantId": "",
"serviceName": "Amina Mushi",
"price": "150000",
"startsAt": "",
"endsAt": "",
"customerId": "",
"customerName": "Amina Mushi",
"note": "",
"orderId": "",
"createdAt": "",
"statusAt": "",
"deposit": "0",
"depositStatus": "DEPOSIT_STATUS_NONE",
"customerEmail": "amina@example.co.tz",
"customerPhone": "+255712345678",
"jobId": ""
}
}SetJobStatus#
Request body
idstringstatusJobStatusOpen, done or cancelled. Cancelling cancels its booked visits.
Response
jobJobcurl https://api.buziin.tech/holygrail.jobs.v1.JobsService/SetJobStatus \
-H "Authorization: Bearer $LUMORA_ACCESS_TOKEN" \
-H "Content-Type: application/json" \
-d '{
"id": "4f1c2e9a-8b3d-4e57-9a10-2c6f7d8e9b01",
"status": "JOB_STATUS_OPEN"
}'{
"job": {
"id": "4f1c2e9a-8b3d-4e57-9a10-2c6f7d8e9b01",
"number": "",
"status": "JOB_STATUS_OPEN",
"locationId": "0193a4f2-0b10-7f62-a4c9-6d1e2b3c4f70",
"customerId": "",
"customerName": "Amina Mushi",
"title": "",
"address": "",
"description": "",
"total": "150000",
"quoteId": "",
"quoteNumber": "",
"invoiceId": "",
"invoiceNumber": "",
"createdAt": "",
"statusAt": "",
"quoteTotal": "150000"
}
}InvoiceJob#
InvoiceJob makes a draft invoice from the job's lines and marks the job invoiced.
Request body
idstringinvoiceIdstringinvoice_idClient-chosen UUID for the invoice.
Response
jobJobcurl https://api.buziin.tech/holygrail.jobs.v1.JobsService/InvoiceJob \
-H "Authorization: Bearer $LUMORA_ACCESS_TOKEN" \
-H "Content-Type: application/json" \
-d '{
"id": "4f1c2e9a-8b3d-4e57-9a10-2c6f7d8e9b01"
}'{
"job": {
"id": "4f1c2e9a-8b3d-4e57-9a10-2c6f7d8e9b01",
"number": "",
"status": "JOB_STATUS_OPEN",
"locationId": "0193a4f2-0b10-7f62-a4c9-6d1e2b3c4f70",
"customerId": "",
"customerName": "Amina Mushi",
"title": "",
"address": "",
"description": "",
"total": "150000",
"quoteId": "",
"quoteNumber": "",
"invoiceId": "",
"invoiceNumber": "",
"createdAt": "",
"statusAt": "",
"quoteTotal": "150000"
}
}Types
The messages and enums these methods use. Field names are lowerCamelCase in JSON; the snake_case names work too. Enum values are sent as their names.
ListJobsRequest
holygrail.jobs.v1.ListJobsRequest
statusJobStatusUnspecified lists open and done jobs.
customerIdstringcustomer_idGetJobRequest
holygrail.jobs.v1.GetJobRequest
idstringCreateJobRequest
holygrail.jobs.v1.CreateJobRequest
idstringClient-chosen UUID, so a retry creates one job.
draftJobDraftCreateJobFromQuoteRequest
holygrail.jobs.v1.CreateJobFromQuoteRequest
idstringquoteIdstringquote_idlocationIdstringlocation_idaddressstringScheduleVisitRequest
holygrail.jobs.v1.ScheduleVisitRequest
jobIdstringjob_ididstringClient-chosen UUID for the booking.
staffIdstringstaff_idstartsAtstringstarts_atRFC 3339.
endsAtstringends_atnotestringSetJobStatusRequest
holygrail.jobs.v1.SetJobStatusRequest
idstringstatusJobStatusOpen, done or cancelled. Cancelling cancels its booked visits.
InvoiceJobRequest
holygrail.jobs.v1.InvoiceJobRequest
idstringinvoiceIdstringinvoice_idClient-chosen UUID for the invoice.
Job
holygrail.jobs.v1.Job
idstringnumberstring"JOB-0001", assigned on creation.
statusJobStatuslocationIdstringlocation_idcustomerIdstringcustomer_idcustomerNamestringcustomer_nametitlestringaddressstringWhere the work is.
descriptionstringlinesInvoiceLine[]Time and materials, priced as on an invoice. Lines copied from a quote can be changed as the work goes.
totalint64 stringThe lines' total, with tax.
quoteIdstringquote_idThe quote it started from, and its number.
quoteNumberstringquote_numberinvoiceIdstringinvoice_idThe invoice it ended as, and its number.
invoiceNumberstringinvoice_numbervisitsBooking[]Visits, oldest first, in responses that carry them.
createdAtstringcreated_atstatusAtstringstatus_atquoteTotalint64 stringquote_totalThe quote's total, to compare with the work done.
JobDraft
holygrail.jobs.v1.JobDraft
What can be edited on a job.
locationIdstringlocation_idcustomerIdstringcustomer_idtitlestringaddressstringdescriptionstringlinesInvoiceLine[]Booking
holygrail.appointments.v1.Booking
Booking holds a person (and a resource, when the service needs one) for a stretch of time. Booked, arrived and completed bookings hold their time; cancelled ones and no-shows free it.
idstringlocationIdstringlocation_idkindBookingKindstatusBookingStatussourceBookingSourcestaffIdstringstaff_idresourceIdstringresource_idEmpty when the service needs no resource.
itemIdstringitem_idThe service booked, for an appointment: the item variant sold at the register, its name ("Haircut (Long)") and price when it was booked.
variantIdstringvariant_idserviceNamestringservice_namepriceint64 stringstartsAtstringstarts_atRFC 3339.
endsAtstringends_atcustomerIdstringcustomer_idcustomerNamestringcustomer_nameThe customer's name, or a walk-in's.
notestringorderIdstringorder_idThe sale that paid for it.
createdAtstringcreated_atstatusAtstringstatus_atdepositint64 stringPaid when booking online; taken off the bill at the register.
customerEmailstringcustomer_emailcustomerPhonestringcustomer_phonejobIdstringjob_idFor a visit, the job it is for.
InvoiceLine
holygrail.invoices.v1.InvoiceLine
idstringvariantIdstringvariant_idThe catalog variant it was picked from, if any.
descriptionstringquantityintegerunitPriceint64 stringunit_pricediscountint64 stringDiscount on this line (all units).
taxRateIdsstring[]tax_rate_idsTax rates to apply. In responses, taxes holds the rates as they were.
taxesLineTax[]grossint64 stringComputed: quantity × unit price, then less discounts, and the tax on it.
netint64 stringtaxint64 stringLineTax
holygrail.orders.v1.LineTax
taxRateIdstringtax_rate_idnamestringrateBpintegerrate_bpinclusivebooleanJobStatus enum
holygrail.jobs.v1.JobStatus
JOB_STATUS_UNSPECIFIEDJOB_STATUS_OPENJOB_STATUS_DONEJOB_STATUS_INVOICEDJOB_STATUS_CANCELLEDBookingKind enum
holygrail.appointments.v1.BookingKind
BOOKING_KIND_UNSPECIFIEDBOOKING_KIND_APPOINTMENTA customer booked a service.
BOOKING_KIND_BLOCKTime the person cannot be booked: lunch, a day off.
BOOKING_KIND_VISITA visit for a job: the person's time at the customer's address.
BookingStatus enum
holygrail.appointments.v1.BookingStatus
BOOKING_STATUS_UNSPECIFIEDBOOKING_STATUS_BOOKEDBOOKING_STATUS_ARRIVEDThe customer is here.
BOOKING_STATUS_COMPLETEDPaid for at the register, or marked done.
BOOKING_STATUS_CANCELLEDBOOKING_STATUS_NO_SHOWBookingSource enum
holygrail.appointments.v1.BookingSource
BOOKING_SOURCE_UNSPECIFIEDBOOKING_SOURCE_REGISTERBOOKING_SOURCE_DASHBOARDBOOKING_SOURCE_ONLINEDepositStatus enum
holygrail.appointments.v1.DepositStatus
DEPOSIT_STATUS_UNSPECIFIEDDEPOSIT_STATUS_NONEDEPOSIT_STATUS_PAIDDEPOSIT_STATUS_APPLIEDTaken off the bill at the register.
DEPOSIT_STATUS_REFUNDEDDEPOSIT_STATUS_KEPTKept for a no-show or a late cancellation.
Base URL https://api.buziin.tech. Every method is POST with a JSON body; see Making requests.