Materials API REST endpoints for materials in ServFlo: 4 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 .
GET /organizations/{organizationId}/materials
Parts and supplies with unit, unit cost (cents) and stock. Seeded with five on first read. Read-only.
Permission catalog.read (Owner, Admin, Dispatcher, Technician, Member)Risk read, OAuth scope servflo.read. Read: reads only.MCP tool materials_list (toolset pricebook)
curl "https://app.servflo.ai/api/organizations/ $ORGANIZATION_ID /materials" \
-H "Authorization: Bearer $SERVFLO_API_KEY "
200: the answer's fields An array of objects:
Field Type Description idstring Material id. organizationIdstring namestring unitstring unitCostCentsinteger The unit PRICE billed (the original API's name), in integer cents. inStocknumber createdAtstring (date-time) updatedAtstring (date-time)
POST /organizations/{organizationId}/materials
Adds a material. A blank unit becomes "ea". Returns it.
Permission catalog.write (Owner, Admin)Risk write, OAuth scope servflo.write. Write: creates or changes records inside the business; nothing leaves it.MCP tool materials_create (toolset pricebook)
Field Type Required Description namestring Yes unitstring No Up to 50 characters. unitCostCentsinteger No Money in integer cents (12500 = 125.00). -100000000–100000000. inStocknumber No -1000000000–1000000000.
curl -X POST "https://app.servflo.ai/api/organizations/ $ORGANIZATION_ID /materials" \
-H "Authorization: Bearer $SERVFLO_API_KEY " \
-H "Content-Type: application/json" \
-d '{"name":"Dana Whitfield"}'
201: the answer's fields Field Type Description idstring Material id. organizationIdstring namestring unitstring unitCostCentsinteger The unit PRICE billed (the original API's name), in integer cents. inStocknumber createdAtstring (date-time) updatedAtstring (date-time)
PATCH /organizations/{organizationId}/materials/{materialId}
Changes the fields sent. Material already recorded on jobs keeps its frozen cost. Returns it.
Permission catalog.write (Owner, Admin)Risk write, OAuth scope servflo.write. Write: creates or changes records inside the business; nothing leaves it.MCP tool materials_update (toolset pricebook)
Name In Type Required Description materialIdpath string Yes
Field Type Required Description namestring No unitstring No Up to 50 characters. unitCostCentsinteger No Money in integer cents (12500 = 125.00). -100000000–100000000. inStocknumber No -1000000000–1000000000.
curl -X PATCH "https://app.servflo.ai/api/organizations/ $ORGANIZATION_ID /materials/{materialId}" \
-H "Authorization: Bearer $SERVFLO_API_KEY " \
-H "Content-Type: application/json" \
-d '{"name":"Dana Whitfield","unit":"string","unitCostCents":12500}'
200: the answer's fields Field Type Description idstring Material id. organizationIdstring namestring unitstring unitCostCentsinteger The unit PRICE billed (the original API's name), in integer cents. inStocknumber createdAtstring (date-time) updatedAtstring (date-time)
DELETE /organizations/{organizationId}/materials/{materialId}
Destructive: deletes the material from the catalog; lines already recorded on jobs keep their description and cost.
Permission catalog.write (Owner, Admin)Risk sensitive, OAuth scope servflo.sensitive. Sensitive: moves money, deletes, sends or shows something to a customer, or grants or revokes access.MCP tool materials_delete (toolset pricebook)Approval Over MCP, this tool always waits for your approval in ServFlo. See Approvals .
Name In Type Required Description materialIdpath string Yes
curl -X DELETE "https://app.servflo.ai/api/organizations/ $ORGANIZATION_ID /materials/{materialId}" \
-H "Authorization: Bearer $SERVFLO_API_KEY "
200: the answer's fields Field Type Description oktrue