DevelopersAPI reference

Costing API

REST endpoints for costing in ServFlo: 1 operations with parameters, request and response fields, permissions and curl examples.

Base URL: https://app.servflo.ai/api. Every call needs Authorization: Bearer sfk_… (Authentication); {organizationId} ($ORGANIZATION_ID in the examples) is your business's id.

OperationEndpointRisk
Job costing: revenue, costs, gross profit and marginGET /organizations/{organizationId}/jobs/{jobId}/costingread

Job costing: revenue, costs, gross profit and margin

GET /organizations/{organizationId}/jobs/{jobId}/costing

The job's revenue (invoiced before tax, and what was collected) against labour (time × each technician's hourly cost), materials (cost snapshots of its material lines), purchase orders for the job (beyond what was used as material) and expenses; gross profit and margin %. With the job's purchase orders and expenses. Owners and admins only (costing.read). Read-only.

Permissioncosting.read (Owner, Admin)
Riskread, OAuth scope servflo.read. Read: reads only.
MCP tooljobCosting_get (toolset pricebook)

Parameters

NameInTypeRequiredDescription
jobIdpathstringYes

Example

curl "https://app.servflo.ai/api/organizations/$ORGANIZATION_ID/jobs/{jobId}/costing" \
  -H "Authorization: Bearer $SERVFLO_API_KEY"

Response

200: the answer's fields
FieldTypeDescription
jobIdstring
identifierstring
costingobject
costing.revenueCentsintegerInvoiced on the job (not cancelled), before tax; tips are not revenue.
costing.collectedCentsintegerThe part of that already paid (payments without their tax share).
costing.labourMinutesinteger
costing.uncostedMinutesintegerTime of technicians without an hourly cost (counted as 0).
costing.labourCentsintegerInteger cents.
costing.labourarray of object
costing.labour[].technicianIdstring or null
costing.labour[].namestring or null
costing.labour[].minutesinteger
costing.labour[].hourlyCostCentsinteger or null
costing.labour[].costCentsintegerInteger cents.
costing.materialsCentsintegerInteger cents.
costing.uncostedMaterialLinesinteger
costing.purchasesCentsintegerJob purchase orders received beyond what was used as material.
costing.expensesCentsintegerInteger cents.
costing.totalCostCentsintegerInteger cents.
costing.grossProfitCentsintegerInteger cents.
costing.marginPercentnumber or null
purchaseOrdersarray of object
purchaseOrders[].idstring
purchaseOrders[].identifierstring
purchaseOrders[].statusstring
purchaseOrders[].totalCentsintegerInteger cents.
purchaseOrders[].vendorobject
purchaseOrders[].vendor.namestring
expensesarray of object
expenses[].idstring
expenses[].datestring
expenses[].categorystring
expenses[].descriptionstring or null
expenses[].amountCentsintegerInteger cents.

On this page