HeadHoncho

Get job money

Get job money is a read in the HeadHoncho API. What a job made and where the money went: money in, parts and fees, the profit, each person's share, and every payment and expense line.

Read as Markdown

The request

Reference for Get job money, HeadHoncho API v1. It is a read, sent to the base address https://api.headhoncho.app.

GET /api/v1/jobs/{job_id}/money

The key needs the Money area at read. An answered call costs 1 credit; a refusal costs nothing. See credits.

Send your key as Authorization: Bearer hh_live_.... See API keys.

Parameters

NameKindRequiredDescriptionExample
job_idid, in the pathYesThe job id, or its number.job_1138

Try it with your key

Paste your key and change the values. The box builds the call as a cURL line and a fetch line, ready to copy. It never sends anything itself.

Your key stays in this page and is never sent anywhere. Copy the line below and run it yourself.

What comes back

summary: quoted, collected, still_owed, money_in (and whether it is the quote or what came in), parts, fees, profit and the company's share. shares: one per person paid on the job, with the rate, the working and whether it is projected or posted, then the company. lines: every payment, expense, fee and cut, voided ones included and marked. checks: whether the shares and fees add back to money in, to the cent.

It never changes a record. It only reads the companies the key reaches.

Every field in the answer

Types are read from the example answer. Money is a plain number in the company's currency. A time carries its offset from UTC (Z is UTC). Ids are opaque text. A field with no line of its own here has its name spelled out; the common fields mean the same on every page.

FieldTypeMeaning
jobobjectThe job.
job.idid (text)The id of this record. Ids are opaque text: keep them exactly as given.
job.numberwhole numberThe number people say out loud, such as the job number.
job.statustextThe job status.
currencytextThe three-letter currency code (ISO 4217). Every money value in the answer is in it.
summaryobjectThe summary.
summary.quotedmoney (number)The price quoted for the job. In the company's currency.
summary.collectedmoney (number)The money received on the job so far. In the company's currency.
summary.still_owedmoney (number)The still owed. In the company's currency.
summary.money_inmoney (number)The money in. In the company's currency.
summary.money_in_basistextWhich money counted as money in.
summary.partsmoney (number)The parts. In the company's currency.
summary.feesmoney (number)What the payment processor kept. In the company's currency.
summary.profitmoney (number)The job's profit, worked out the way the app works it out. In the company's currency.
summary.company_sharemoney (number)The company share. In the company's currency.
summary.technicians_totalmoney (number)The technicians total. In the company's currency.
shareslist of objectsThe shares.
shares[].worker_idid (text)The id of the worker.
shares[].nametextThe name, as the app shows it.
shares[].roletextThe role: what this person does on a job.
shares[].ratetextHow the cut is worked out, in words.
shares[].workingtextThe sum, shown the way the app shows it.
shares[].sharemoney (number)The share. In the company's currency.
shares[].parts_paidmoney (number)The parts paid. In the company's currency.
shares[].payoutmoney (number)The payout. In the company's currency.
shares[].projectedtrue or falseTrue while the figure is an estimate that the job has not closed on yet.
lineslist of objectsThe lines, oldest first.
lines[].idid (text)The id of this record. Ids are opaque text: keep them exactly as given.
lines[].kindtextWhat sort of thing this is.
lines[].ondate (YYYY-MM-DD)The date it happened, as a date in the company's time zone.
lines[].amountmoney (number)The amount. In the company's currency.
lines[].methodtextHow it was paid, such as card or cash.
lines[].whotextThe person it concerns.
lines[].memotextA free-text note on the line. Empty when there is none.
lines[].voidedtrue or falseTrue when the line was voided. A voided line counts in no figure.
lines[].typetextWhat sort of thing this is.
checksobjectThe checks.
checks.adds_uptrue or falseTrue when the figures agree with each other.
checks.payoutsmoney (number)The payouts. In the company's currency.
checks.feesmoney (number)What the payment processor kept. In the company's currency.
checks.money_inmoney (number)The money in. In the company's currency.

One derivation

This is the arithmetic the job's Money tab shows, computed by the same function, so the API and the screen cannot disagree. A share is projected until the job closes and the cut is posted.

Voided lines

A voided payment or expense is listed with voided: true and its reason, and counts in no figure.

Errors that apply

CodeStatusWhat it means
`missing_key`401Send your key as Authorization: Bearer hh_live_...
`unknown_key`401That key is not one we issued, or it was revoked.
`no_access`403This credential does not reach that. Ask the person who made it for access.
`not_found`404No such record in the companies this credential reaches.
`invalid`422Some fields were refused. See fields.
`no_credits`402Out of credits. Top up on Settings › Credits, or turn on auto top-up.