Skip to content

API reference

The API defines 173 operation contracts in 26 groups (catalog version 2026-12-06):155 open to staff roles (each also an MCP tool), 13 for the customer portal, and 6 internal ones that only the platform itself runs. A contract whose handler is not written yet answers HTTP 501; the live catalog's implemented flag says which ones run today. This reference is generated from packages/core on every docs build, so it always matches the code that was deployed with it. The same catalog is served live atGET https://api.cemco.app/v1/ops (filtered to what the caller may run) and as OpenAPI 3.1 atGET https://api.cemco.app/v1/openapi.json. A static copy is at catalog.json.

Calling an operation

curl https://api.cemco.app/v1/ops/accounts.search \
  -H "x-api-key: $CEMCO_API_KEY" \
  -H "content-type: application/json" \
  -d '{"query": "ready mix"}'
  • Always POST with a JSON object body (send {} when there is no input). Bodies are limited in size.
  • Authenticate with a session cookie (the app, through app.cemco.app/api), an API key inx-api-key, or an OAuth bearer token (MCP clients). See Authentication.
  • Success is { "data": ... }; field names are camelCase; money is integer cents; dates are ISO 8601.
  • Every write is recorded in the audit log with the caller. Responses carry x-request-id.

Errors

A failed call returns an HTTP error status and { "error": { "code", "message", "details"? } }.

codeHTTPMeaning
unauthorized401No valid session, key or token.
forbidden403Your role cannot run this operation.
not_found404No such record or operation, or a customer asked for another account's record.
validation422The input does not match the schema; details.issues lists each field with its path.
conflict409A duplicate (serial number, contact email, ...) or a state that does not allow the change.
invalid_order409The order is not valid yet; details.missing and details.missingLabels name the signed quote, received date or balance.
internal500Something failed on our side; quote the x-request-id.
internal with details.notImplemented501The operation is in the catalog but this deployment has no handler for it yet.

Operation groups

GroupOperations
Accountssearchgetcreateupdateduplicate_checkhealth
Contactslistgetcreateupdatedeletegoogle_syncgoogle_sync_state
Sites and site readinesslistgetcreateupdatereadiness_getreadiness_update
Orderslistboardgetcreateupdateadd_lineupdate_lineremove_lineattach_signed_quoteadvanceset_financingexportadd_document
Equipment price listlistgetupsert
Installed base, warranty, training, service plans and contractslistmapgetlookup_serialidentify_nameplateregisterupdatemove_sitechange_ownerwarranty_statusadd_training_recordupdate_training_recordlist_training_recordsupsert_service_plancomplete_servicelist_service_plansupsert_service_contractlist_service_contracts
Check-inslistscheduleupdatecomplete
Service ticketsboardlistgetopenupdateset_statuslog_partsremove_partlog_time
Warranty claimslistcreateupdate
Parts catalogsearchgetupsertupdate_pricestale_pricesrecommended_sparesdeactivate
Parts quotes and orderslistgetcreateupdateadd_lineupdate_lineremove_lineplaceshipdelivercancelexport
Stock levels and ledgerreceiveadjustledgerlowset_reorder
Documentscreatelinkupdatelistgetsigned_linkdeleteresolvefinalize
Communication logloglog_emailmatch_emaillistupdatedelete
Tasks and appointmentslistgetcreateupdatecompletedelete
Agendaget
Calendar sync and iCal feedsync_statependingrecord_syncimport_eventssyncfeed_getfeed_rotatefeed_render
Expansion opportunitieslistcreateupdatehand_to_sales
Importdry_runapplyget_runlist_runsdiscard_runread_google_sheet
Dashboard and reportsdashboardinstalled_basetickets_by_root_causeparts_revenueexpiring_warrantiesaccounts_not_contacted
Searchqueryreindex
Audit loglist
Staff users, roles and API keysmelistinviteset_roleset_activeupdate_profilelist_api_keyscreate_api_keyrevoke_api_key
Portal invites and portal userscreatelistrevokelist_usersset_user_activelookupaccept
Customer portalmeordersorderorder_timelinesign_quoteexport_ordermachinesdocumentsdocument_linkrequest_serviceticketsupdate_profile
Emails and remindersoutboxretryrun_daily