Developers
Sign inGet API keys
API reference/Hospitality and services

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.

holygrail.jobs.v1.JobsService8 methodsjobs.read · jobs.write

ListJobs#

jobs.readRead
POST/holygrail.jobs.v1.JobsService/ListJobs

Request body

statusJobStatus

Unspecified lists open and done jobs.

customerIdstringcustomer_id

Response

jobsJob[]
Request
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"
}'
Response example
{
  "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"
    }
  ]
}

GetJob#

jobs.readRead
POST/holygrail.jobs.v1.JobsService/GetJob

Request body

idstring

Response

jobJob
Request
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"
}'
Response example
{
  "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#

jobs.writeWrite
POST/holygrail.jobs.v1.JobsService/CreateJob

Request body

idstring

Client-chosen UUID, so a retry creates one job.

Response

jobJob
Request
curl 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"
      }
    ]
  }
}'
Response example
{
  "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#

jobs.writeWrite
POST/holygrail.jobs.v1.JobsService/CreateJobFromQuote

CreateJobFromQuote starts a job from an issued or accepted estimate, with its customer and lines.

Request body

idstring
quoteIdstringquote_id
locationIdstringlocation_id
addressstring

Response

jobJob
Request
curl 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"
}'
Response example
{
  "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#

jobs.writeWrite
POST/holygrail.jobs.v1.JobsService/UpdateJob

Request body

idstring

Response

jobJob
Request
curl 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"
      }
    ]
  }
}'
Response example
{
  "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#

jobs.writeWrite
POST/holygrail.jobs.v1.JobsService/ScheduleVisit

ScheduleVisit books a person's time for the job, which no other booking can then overlap.

Request body

jobIdstringjob_id
idstring

Client-chosen UUID for the booking.

staffIdstringstaff_id
startsAtstringstarts_at

RFC 3339.

endsAtstringends_at
notestring

Response

visitBooking
Request
curl 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"
}'
Response example
{
  "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#

jobs.writeWrite
POST/holygrail.jobs.v1.JobsService/SetJobStatus

Request body

idstring
statusJobStatus

Open, done or cancelled. Cancelling cancels its booked visits.

Response

jobJob
Request
curl 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"
}'
Response example
{
  "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#

jobs.writeWrite
POST/holygrail.jobs.v1.JobsService/InvoiceJob

InvoiceJob makes a draft invoice from the job's lines and marks the job invoiced.

Request body

idstring
invoiceIdstringinvoice_id

Client-chosen UUID for the invoice.

Response

jobJob
Request
curl 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"
}'
Response example
{
  "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

statusJobStatus

Unspecified lists open and done jobs.

customerIdstringcustomer_id

ListJobsResponse

holygrail.jobs.v1.ListJobsResponse

jobsJob[]

GetJobRequest

holygrail.jobs.v1.GetJobRequest

idstring

GetJobResponse

holygrail.jobs.v1.GetJobResponse

jobJob

CreateJobRequest

holygrail.jobs.v1.CreateJobRequest

idstring

Client-chosen UUID, so a retry creates one job.

CreateJobResponse

holygrail.jobs.v1.CreateJobResponse

jobJob

CreateJobFromQuoteRequest

holygrail.jobs.v1.CreateJobFromQuoteRequest

idstring
quoteIdstringquote_id
locationIdstringlocation_id
addressstring

CreateJobFromQuoteResponse

holygrail.jobs.v1.CreateJobFromQuoteResponse

jobJob

UpdateJobRequest

holygrail.jobs.v1.UpdateJobRequest

idstring

UpdateJobResponse

holygrail.jobs.v1.UpdateJobResponse

jobJob

ScheduleVisitRequest

holygrail.jobs.v1.ScheduleVisitRequest

jobIdstringjob_id
idstring

Client-chosen UUID for the booking.

staffIdstringstaff_id
startsAtstringstarts_at

RFC 3339.

endsAtstringends_at
notestring

ScheduleVisitResponse

holygrail.jobs.v1.ScheduleVisitResponse

visitBooking

SetJobStatusRequest

holygrail.jobs.v1.SetJobStatusRequest

idstring
statusJobStatus

Open, done or cancelled. Cancelling cancels its booked visits.

SetJobStatusResponse

holygrail.jobs.v1.SetJobStatusResponse

jobJob

InvoiceJobRequest

holygrail.jobs.v1.InvoiceJobRequest

idstring
invoiceIdstringinvoice_id

Client-chosen UUID for the invoice.

InvoiceJobResponse

holygrail.jobs.v1.InvoiceJobResponse

jobJob

Job

holygrail.jobs.v1.Job

idstring
numberstring

"JOB-0001", assigned on creation.

statusJobStatus
locationIdstringlocation_id
customerIdstringcustomer_id
customerNamestringcustomer_name
titlestring
addressstring

Where the work is.

descriptionstring

Time and materials, priced as on an invoice. Lines copied from a quote can be changed as the work goes.

totalint64 string

The lines' total, with tax.

quoteIdstringquote_id

The quote it started from, and its number.

quoteNumberstringquote_number
invoiceIdstringinvoice_id

The invoice it ended as, and its number.

invoiceNumberstringinvoice_number
visitsBooking[]

Visits, oldest first, in responses that carry them.

createdAtstringcreated_at
statusAtstringstatus_at
quoteTotalint64 stringquote_total

The quote's total, to compare with the work done.

JobDraft

holygrail.jobs.v1.JobDraft

What can be edited on a job.

locationIdstringlocation_id
customerIdstringcustomer_id
titlestring
addressstring
descriptionstring

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.

idstring
locationIdstringlocation_id
staffIdstringstaff_id
resourceIdstringresource_id

Empty when the service needs no resource.

itemIdstringitem_id

The service booked, for an appointment: the item variant sold at the register, its name ("Haircut (Long)") and price when it was booked.

variantIdstringvariant_id
serviceNamestringservice_name
priceint64 string
startsAtstringstarts_at

RFC 3339.

endsAtstringends_at
customerIdstringcustomer_id
customerNamestringcustomer_name

The customer's name, or a walk-in's.

notestring
orderIdstringorder_id

The sale that paid for it.

createdAtstringcreated_at
statusAtstringstatus_at
depositint64 string

Paid when booking online; taken off the bill at the register.

depositStatusDepositStatusdeposit_status
customerEmailstringcustomer_email
customerPhonestringcustomer_phone
jobIdstringjob_id

For a visit, the job it is for.

InvoiceLine

holygrail.invoices.v1.InvoiceLine

idstring
variantIdstringvariant_id

The catalog variant it was picked from, if any.

descriptionstring
quantityinteger
unitPriceint64 stringunit_price
discountint64 string

Discount on this line (all units).

taxRateIdsstring[]tax_rate_ids

Tax rates to apply. In responses, taxes holds the rates as they were.

grossint64 string

Computed: quantity × unit price, then less discounts, and the tax on it.

netint64 string
taxint64 string

LineTax

holygrail.orders.v1.LineTax

taxRateIdstringtax_rate_id
namestring
rateBpintegerrate_bp
inclusiveboolean

JobStatus enum

holygrail.jobs.v1.JobStatus

JOB_STATUS_UNSPECIFIED
JOB_STATUS_OPEN
JOB_STATUS_DONE
JOB_STATUS_INVOICED
JOB_STATUS_CANCELLED

BookingKind enum

holygrail.appointments.v1.BookingKind

BOOKING_KIND_UNSPECIFIED
BOOKING_KIND_APPOINTMENT

A customer booked a service.

BOOKING_KIND_BLOCK

Time the person cannot be booked: lunch, a day off.

BOOKING_KIND_VISIT

A visit for a job: the person's time at the customer's address.

BookingStatus enum

holygrail.appointments.v1.BookingStatus

BOOKING_STATUS_UNSPECIFIED
BOOKING_STATUS_BOOKED
BOOKING_STATUS_ARRIVED

The customer is here.

BOOKING_STATUS_COMPLETED

Paid for at the register, or marked done.

BOOKING_STATUS_CANCELLED
BOOKING_STATUS_NO_SHOW

BookingSource enum

holygrail.appointments.v1.BookingSource

BOOKING_SOURCE_UNSPECIFIED
BOOKING_SOURCE_REGISTER
BOOKING_SOURCE_DASHBOARD
BOOKING_SOURCE_ONLINE

DepositStatus enum

holygrail.appointments.v1.DepositStatus

DEPOSIT_STATUS_UNSPECIFIED
DEPOSIT_STATUS_NONE
DEPOSIT_STATUS_PAID
DEPOSIT_STATUS_APPLIED

Taken off the bill at the register.

DEPOSIT_STATUS_REFUNDED
DEPOSIT_STATUS_KEPT

Kept 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.