API Jobs
The Job actions read and write an account's Jobs: the work staff clock their hours to, such as projects, sites or functions. get_jobs returns the Jobs, for software that copies them from Microkeeper. update_jobs adds and updates Jobs from your software, for when your software manages them and Microkeeper keeps a copy.
| Actions | get_jobs, update_jobs |
|---|---|
| Business key access | Account: Read Only to get, Read/Write to update |
This guide covers how to:
- Get the Jobs.
- Send Jobs as they change.
- Send your full list of active Jobs.
Before you start, make your keys and test your connection: see Microkeeper API.
Get the Jobs with get_jobs
Choose which Jobs with status:
mk_data | Returns |
|---|---|
{"status":"all"} | Every Job that isn't Finished |
{"status":"finished"} | Finished Jobs |
{"status":"JID","JID":["1100","1103"]} | The Jobs with these Microkeeper IDs |
{"status":"JobID","JobID":["STK-2026"]} | The Jobs with these IDs from your software |
Response
{
"success": "1",
"authenticated": "1",
"message": "Job data",
"data": {
"jobs": [
{
"JID": "1100",
"CID": "0",
"title": "Restaurant Service",
"startdate": "2026-06-01",
"enddate": "0000-00-00",
"job_access": "1",
"status": "Active",
"JobID": ""
}
]
}
}Jobs are listed by title:
| Field | What it is |
|---|---|
JID | The Job's ID in Microkeeper |
JobID | Your software's ID for the Job, or blank |
CID | The client the Job is for, or 0 for an in-house Job |
title | The Job's name |
startdate, enddate | YYYY-MM-DD, or 0000-00-00 if not set |
job_access | Who can clock onto the Job: 1 All employees, 2 Location Proximity, 0 Individual |
status | Quoted, Pending, Active or Finished. Staff can clock onto Active Jobs |
Errors
The status variable must be included,The status variable must be set to either all or finishedA list of JID must be passed,An list of JobID must be passed: send the IDs as a list.There are no Jobs in Microkeeper yet: no Jobs match.
Send Jobs with update_jobs
Set config.status_set to choose what happens to the Jobs you don't send:
skip: they're left as they are. Use it to send Jobs as they're added or changed in your software.finish_all: they're marked Finished. Use it to send your full list of active Jobs on a schedule, such as nightly.
Use skip while you test, so a short list doesn't finish the account's other Jobs.
Example
{
"config": { "status_set": "skip" },
"jobs": [
{ "JobID": "STK-2026", "title": "December Stocktake", "startdate": "2026-12-01", "enddate": "2026-12-31", "job_access": "1", "status": "Active" },
{ "JobID": "FN-118", "title": "Smith Wedding", "CID": "52", "job_access": "2", "status": "Active" },
{ "JobID": "FN-097", "title": "Jones Birthday", "status": "Finished" }
]
}How each Job is matched
Choose one way to match Jobs, and use it every time:
- By your software's ID: send
JobIDand leave outJID. A knownJobIDupdates that Job, including its title; a new one adds a Job. - By Microkeeper's ID: send the Job's
JIDto update it, orJID0to add one. With0, a Job with the same title is updated instead. Store the JIDs the response returns.
Fields
| Field | Required | What it is |
|---|---|---|
JobID or JID | One of them | See above |
title | Yes | The Job's name. Titles match exactly, including capitals. Quotes, ampersands, commas and % are removed, so match on JobID if your titles use them |
status | Send it every time | Active or Finished, or Quoted or Pending. A Job sent without it becomes Active |
CID | No | The client's ID, or 0 for an in-house Job |
startdate, enddate | No | YYYY-MM-DD |
job_access | No | 1 All employees, 2 Location Proximity, 0 Individual. New Jobs default to 1 |
On an update, CID, the dates and job_access keep their values if you leave them out.
Jobs aren't deleted, so their hours stay on record. Send a Job with Finished to stop staff clocking onto it, and with Active to reopen it.
Response
{
"success": "1",
"authenticated": "1",
"message": "Jobs updated",
"data": {
"update": { "STK-2026": 1104, "FN-118": 1105, "FN-097": 1090 }
}
}data can hold four lists. Each is there only when it has something in it:
| List | What it holds |
|---|---|
update | The Jobs added or updated |
finished | With finish_all: the JIDs of Jobs marked Finished because they weren't sent |
not_found | JIDs that aren't in Microkeeper. Fix these in your software |
duplicate | Jobs not updated because another Job already has the title. Fix these in your software |
When you send a JobID, the lists are keyed by it, with the JID as the value. Otherwise they're lists of JIDs.
Errors
These stop the request, and nothing is changed:
The status_set field must be set,status_set must be set to either finish_all or skipA list of jobs was not suppliedThe title and (JID or JobID) fields are requiredThe title for job FN-118 is blankThe status for job FN-118 is Closed which is not allowedNo jobs updated no errors found: nothing was sent to update.