DevelopersAPI reference

Inventory API

REST endpoints for inventory in ServFlo: 16 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
List stock locationsGET /organizations/{organizationId}/inventory/locationsread
Create a warehouse or truckPOST /organizations/{organizationId}/inventory/locationswrite
Get a location with its stockGET /organizations/{organizationId}/inventory/locations/{locationId}read
Update a locationPATCH /organizations/{organizationId}/inventory/locations/{locationId}write
Delete a locationDELETE /organizations/{organizationId}/inventory/locations/{locationId}sensitive
List stock levelsGET /organizations/{organizationId}/inventory/stockread
The stock ledgerGET /organizations/{organizationId}/inventory/movementsread
My truck's stockGET /organizations/{organizationId}/inventory/my-truckread
Set a reorder pointPATCH /organizations/{organizationId}/inventory/levelswrite
Adjust stockPOST /organizations/{organizationId}/inventory/adjustmentswrite
Record a stock countPOST /organizations/{organizationId}/inventory/countswrite
Transfer stock between locationsPOST /organizations/{organizationId}/inventory/transferswrite
Parts requests from techniciansGET /organizations/{organizationId}/parts-requestsread
A parts requestGET /organizations/{organizationId}/parts-requests/{partsRequestId}read
Move a parts request alongPATCH /organizations/{organizationId}/parts-requests/{partsRequestId}write
Fulfil a parts request from stockPOST /organizations/{organizationId}/parts-requests/{partsRequestId}/fulfilwrite

List stock locations

GET /organizations/{organizationId}/inventory/locations

Warehouses and trucks with item, low-stock and negative counts (and stock value with costing.read). A technician sees only their own truck(s). Read-only.

Permission: inventory.read (Owner, Admin, Dispatcher, Technician (own truck), Member); risk read (OAuth scope servflo.read).

Permissioninventory.read
Riskread, OAuth scope servflo.read. Read: reads only.
MCP toolinventoryLocations_list (toolset pricebook)

Parameters

NameInTypeRequiredDescription
includeInactivequeryboolean or enumNo

Example

curl "https://app.servflo.ai/api/organizations/$ORGANIZATION_ID/inventory/locations" \
  -H "Authorization: Bearer $SERVFLO_API_KEY"

Response

200: the answer's fields

An array of objects:

FieldTypeDescription
idstring
organizationIdstring
kindenumWAREHOUSE, or TRUCK (a technician's van, stocked from a warehouse). One of WAREHOUSE, TRUCK.
namestring
technicianIdstring or null
addressstring or null
isDefaultboolean
activeboolean
createdAtstring (date-time)
updatedAtstring (date-time)
technicianobject or null
technician.idstring
technician.namestring
technician.colorstring
itemCountintegerItems with stock (or negative stock) here.
lowCountintegerItems at or below their reorder point, or negative.
negativeCountinteger
stockValueCentsintegerInteger cents. Present only for roles with costing.read.

Create a warehouse or truck

POST /organizations/{organizationId}/inventory/locations

Adds a location. The first warehouse becomes the default. A TRUCK names its technician: material that technician uses on a job is drawn from it. Returns the location.

Permissioninventory.manage (Owner, Admin, Dispatcher)
Riskwrite, OAuth scope servflo.write. Write: creates or changes records inside the business; nothing leaves it.
MCP toolinventoryLocations_create (toolset pricebook)

Request body

FieldTypeRequiredDescription
namestringYesUp to 200 characters.
technicianIdstring or nullNoTRUCK only: the technician whose truck it is.
addressstring or nullNoUp to 500 characters.
isDefaultbooleanNoWAREHOUSE only: material used on a job whose technician has no truck comes from here.
activebooleanNoRetired locations (false) are hidden.
kindenumYesWAREHOUSE, or TRUCK (a technician's van, stocked from a warehouse). One of WAREHOUSE, TRUCK.

Example

curl -X POST "https://app.servflo.ai/api/organizations/$ORGANIZATION_ID/inventory/locations" \
  -H "Authorization: Bearer $SERVFLO_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"name":"Dana Whitfield","kind":"WAREHOUSE"}'

Response

201: the answer's fields
FieldTypeDescription
idstring
organizationIdstring
kindenumWAREHOUSE, or TRUCK (a technician's van, stocked from a warehouse). One of WAREHOUSE, TRUCK.
namestring
technicianIdstring or null
addressstring or null
isDefaultboolean
activeboolean
createdAtstring (date-time)
updatedAtstring (date-time)
technicianobject or null
technician.idstring
technician.namestring
technician.colorstring

Get a location with its stock

GET /organizations/{organizationId}/inventory/locations/{locationId}

One warehouse or truck with every stock level there (status, reorder point, suggested order). A technician gets 404 for any location but their own truck. Read-only.

Permission: inventory.read (Owner, Admin, Dispatcher, Technician (own truck), Member); risk read (OAuth scope servflo.read).

Permissioninventory.read
Riskread, OAuth scope servflo.read. Read: reads only.
MCP toolinventoryLocations_get (toolset pricebook)

Parameters

NameInTypeRequiredDescription
locationIdpathstringYes

Example

curl "https://app.servflo.ai/api/organizations/$ORGANIZATION_ID/inventory/locations/{locationId}" \
  -H "Authorization: Bearer $SERVFLO_API_KEY"

Response

200: the answer's fields
FieldTypeDescription
idstring
organizationIdstring
kindenumWAREHOUSE, or TRUCK (a technician's van, stocked from a warehouse). One of WAREHOUSE, TRUCK.
namestring
technicianIdstring or null
addressstring or null
isDefaultboolean
activeboolean
createdAtstring (date-time)
updatedAtstring (date-time)
technicianobject or null
technician.idstring
technician.namestring
technician.colorstring
levelsarray of object
levels[].idstring
levels[].organizationIdstring
levels[].itemIdstring
levels[].locationIdstring
levels[].onHandnumber
levels[].reorderPointnumber or null
levels[].reorderQtynumber or null
levels[].updatedAtstring (date-time)
levels[].itemobject
levels[].item.idstring
levels[].item.codestring or null
levels[].item.namestring
levels[].item.unitstring
levels[].item.kindstring
levels[].item.costCentsintegerInteger cents. Present only for roles with costing.read.
levels[].item.vendorIdstring or null
levels[].item.vendorobject or null
levels[].item.categoryIdstring or null
levels[].locationobject
levels[].location.idstring
levels[].location.namestring
levels[].location.kindenumWAREHOUSE, or TRUCK (a technician's van, stocked from a warehouse). One of WAREHOUSE, TRUCK.
levels[].location.technicianobject or null
levels[].statusenumNEGATIVE below zero (allowed, flagged), OUT at 0, LOW at or below the reorder point. One of NEGATIVE, OUT, LOW, OK.
levels[].lowboolean
levels[].suggestedQuantitynumberWhat to order when low: the reorder quantity, else enough to clear the point.
levels[].stockValueCentsintegerInteger cents. Present only for roles with costing.read.
lowCountinteger
stockValueCentsintegerInteger cents. Present only for roles with costing.read.

Update a location

PATCH /organizations/{organizationId}/inventory/locations/{locationId}

Renames, reassigns a truck's technician, makes a warehouse the default, or retires it (active: false). Returns it.

Permissioninventory.manage (Owner, Admin, Dispatcher)
Riskwrite, OAuth scope servflo.write. Write: creates or changes records inside the business; nothing leaves it.
MCP toolinventoryLocations_update (toolset pricebook)

Parameters

NameInTypeRequiredDescription
locationIdpathstringYes

Request body

FieldTypeRequiredDescription
namestringNoUp to 200 characters.
technicianIdstring or nullNoTRUCK only: the technician whose truck it is.
addressstring or nullNoUp to 500 characters.
isDefaultbooleanNoWAREHOUSE only: material used on a job whose technician has no truck comes from here.
activebooleanNoRetired locations (false) are hidden.

Example

curl -X PATCH "https://app.servflo.ai/api/organizations/$ORGANIZATION_ID/inventory/locations/{locationId}" \
  -H "Authorization: Bearer $SERVFLO_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"name":"Dana Whitfield","technicianId":"technician_id","address":"string"}'

Response

200: the answer's fields
FieldTypeDescription
idstring
organizationIdstring
kindenumWAREHOUSE, or TRUCK (a technician's van, stocked from a warehouse). One of WAREHOUSE, TRUCK.
namestring
technicianIdstring or null
addressstring or null
isDefaultboolean
activeboolean
createdAtstring (date-time)
updatedAtstring (date-time)
technicianobject or null
technician.idstring
technician.namestring
technician.colorstring

Delete a location

DELETE /organizations/{organizationId}/inventory/locations/{locationId}

Destructive: deletes a location that never held stock or received an order (409 otherwise: retire it with active: false, the ledger is kept).

Permissioninventory.manage (Owner, Admin, Dispatcher)
Risksensitive, OAuth scope servflo.sensitive. Sensitive: moves money, deletes, sends or shows something to a customer, or grants or revokes access.
MCP toolinventoryLocations_delete (toolset pricebook)
ApprovalOver MCP, this tool always waits for your approval in ServFlo. See Approvals.

Parameters

NameInTypeRequiredDescription
locationIdpathstringYes

Example

curl -X DELETE "https://app.servflo.ai/api/organizations/$ORGANIZATION_ID/inventory/locations/{locationId}" \
  -H "Authorization: Bearer $SERVFLO_API_KEY"

Response

200: the answer's fields
FieldTypeDescription
oktrue

List stock levels

GET /organizations/{organizationId}/inventory/stock

Stock per item and location, filtered by location, item or text; lowOnly is the Low stock view (at or below the reorder point, or negative). A technician sees only their truck. Paged with a total. Read-only.

Permission: inventory.read (Owner, Admin, Dispatcher, Technician (own truck), Member); risk read (OAuth scope servflo.read).

Permissioninventory.read
Riskread, OAuth scope servflo.read. Read: reads only.
MCP toolinventory_stock (toolset pricebook)

Parameters

NameInTypeRequiredDescription
locationIdquerystringNo
itemIdquerystringNo
queryquerystringNoFree-text search over the list's names, numbers and contact details. Up to 200 characters.
lowOnlyqueryboolean or enumNo
limitqueryintegerNoPage size, 1–200. Default 50.
offsetqueryintegerNoRows to skip; the answer's total counts every match. Default 0.

Example

curl "https://app.servflo.ai/api/organizations/$ORGANIZATION_ID/inventory/stock" \
  -H "Authorization: Bearer $SERVFLO_API_KEY"

Response

200: the answer's fields
FieldTypeDescription
itemsarray of object
items[].idstring
items[].organizationIdstring
items[].itemIdstring
items[].locationIdstring
items[].onHandnumber
items[].reorderPointnumber or null
items[].reorderQtynumber or null
items[].updatedAtstring (date-time)
items[].itemobject
items[].item.idstring
items[].item.codestring or null
items[].item.namestring
items[].item.unitstring
items[].item.kindstring
items[].item.costCentsintegerInteger cents. Present only for roles with costing.read.
items[].item.vendorIdstring or null
items[].item.vendorobject or null
items[].item.categoryIdstring or null
items[].locationobject
items[].location.idstring
items[].location.namestring
items[].location.kindenumWAREHOUSE, or TRUCK (a technician's van, stocked from a warehouse). One of WAREHOUSE, TRUCK.
items[].location.technicianobject or null
items[].statusenumNEGATIVE below zero (allowed, flagged), OUT at 0, LOW at or below the reorder point. One of NEGATIVE, OUT, LOW, OK.
items[].lowboolean
items[].suggestedQuantitynumberWhat to order when low: the reorder quantity, else enough to clear the point.
items[].stockValueCentsintegerInteger cents. Present only for roles with costing.read.
totalinteger

The stock ledger

GET /organizations/{organizationId}/inventory/movements

Stock movements newest first, filtered by item, location, job, purchase order or kind; each with the signed quantity and the balance after. Append-only. A technician sees their own truck's. Read-only.

Permission: inventory.read (Owner, Admin, Dispatcher, Technician (own truck), Member); risk read (OAuth scope servflo.read).

Permissioninventory.read
Riskread, OAuth scope servflo.read. Read: reads only.
MCP toolinventory_movements (toolset pricebook)

Parameters

NameInTypeRequiredDescription
itemIdquerystringNo
locationIdquerystringNo
jobIdquerystringNo
purchaseOrderIdquerystringNo
kindqueryenumNoRECEIVE (purchase receipt), TRANSFER_OUT / TRANSFER_IN (the two halves of a transfer), USE (on a job), RETURN (back from a job), ADJUST (correction or count). One of RECEIVE, TRANSFER_OUT, TRANSFER_IN, USE, RETURN, ADJUST.
limitqueryintegerNoPage size, 1–200. Default 50.
offsetqueryintegerNoRows to skip; the answer's total counts every match. Default 0.

Example

curl "https://app.servflo.ai/api/organizations/$ORGANIZATION_ID/inventory/movements" \
  -H "Authorization: Bearer $SERVFLO_API_KEY"

Response

200: the answer's fields
FieldTypeDescription
itemsarray of object
items[].idstring
items[].itemIdstring
items[].locationIdstring
items[].kindenumRECEIVE (purchase receipt), TRANSFER_OUT / TRANSFER_IN (the two halves of a transfer), USE (on a job), RETURN (back from a job), ADJUST (correction or count). One of RECEIVE, TRANSFER_OUT, TRANSFER_IN, USE, RETURN, ADJUST.
items[].quantitynumberSigned: positive into the location, negative out of it.
items[].balanceAfternumberThe location's on-hand after this movement.
items[].costCentsintegerInteger cents. Present only for roles with costing.read.
items[].jobIdstring or null
items[].purchaseOrderIdstring or null
items[].transferIdstring or null
items[].userIdstring or null
items[].reasonstring or null
items[].createdAtstring (date-time)
items[].itemobject
items[].item.idstring
items[].item.codestring or null
items[].item.namestring
items[].item.unitstring
items[].locationobject
items[].location.idstring
items[].location.namestring
items[].location.kindenumWAREHOUSE, or TRUCK (a technician's van, stocked from a warehouse). One of WAREHOUSE, TRUCK.
items[].jobobject or null
items[].job.idstring
items[].job.identifierstring
items[].purchaseOrderobject or null
items[].purchaseOrder.idstring
items[].purchaseOrder.identifierstring
totalinteger

My truck's stock

GET /organizations/{organizationId}/inventory/my-truck

The caller's own truck(s) (the trucks of their linked technician) with every stock level; empty when they have none. Read-only.

Permission: inventory.read (Owner, Admin, Dispatcher, Technician (own truck), Member); risk read (OAuth scope servflo.read).

Permissioninventory.read
Riskread, OAuth scope servflo.read. Read: reads only.
MCP toolinventory_myTruck (toolset pricebook)

Example

curl "https://app.servflo.ai/api/organizations/$ORGANIZATION_ID/inventory/my-truck" \
  -H "Authorization: Bearer $SERVFLO_API_KEY"

Response

200: the answer's fields

An array of objects:

FieldTypeDescription
idstring
organizationIdstring
kindenumWAREHOUSE, or TRUCK (a technician's van, stocked from a warehouse). One of WAREHOUSE, TRUCK.
namestring
technicianIdstring or null
addressstring or null
isDefaultboolean
activeboolean
createdAtstring (date-time)
updatedAtstring (date-time)
technicianobject or null
technician.idstring
technician.namestring
technician.colorstring
levelsarray of object
levels[].idstring
levels[].organizationIdstring
levels[].itemIdstring
levels[].locationIdstring
levels[].onHandnumber
levels[].reorderPointnumber or null
levels[].reorderQtynumber or null
levels[].updatedAtstring (date-time)
levels[].itemobject
levels[].item.idstring
levels[].item.codestring or null
levels[].item.namestring
levels[].item.unitstring
levels[].item.kindstring
levels[].item.costCentsintegerInteger cents. Present only for roles with costing.read.
levels[].item.vendorIdstring or null
levels[].item.vendorobject or null
levels[].item.categoryIdstring or null
levels[].locationobject
levels[].location.idstring
levels[].location.namestring
levels[].location.kindenumWAREHOUSE, or TRUCK (a technician's van, stocked from a warehouse). One of WAREHOUSE, TRUCK.
levels[].location.technicianobject or null
levels[].statusenumNEGATIVE below zero (allowed, flagged), OUT at 0, LOW at or below the reorder point. One of NEGATIVE, OUT, LOW, OK.
levels[].lowboolean
levels[].suggestedQuantitynumberWhat to order when low: the reorder quantity, else enough to clear the point.
levels[].stockValueCentsintegerInteger cents. Present only for roles with costing.read.
lowCountinteger
stockValueCentsintegerInteger cents. Present only for roles with costing.read.

Set a reorder point

PATCH /organizations/{organizationId}/inventory/levels

Sets the reorder point and reorder quantity of an item at a location (null clears them). Stock is not changed (use adjustments). Returns the level.

Permissioninventory.manage (Owner, Admin, Dispatcher)
Riskwrite, OAuth scope servflo.write. Write: creates or changes records inside the business; nothing leaves it.
MCP toolinventory_setLevel (toolset pricebook)

Request body

FieldTypeRequiredDescription
itemIdstringYesA MATERIAL or EQUIPMENT item (GET /pricebook/items).
locationIdstringYes
reorderPointnumber or nullNoLow at or below this. 0–1000000.
reorderQtynumber or nullNoHow many to order. 0–1000000.

Example

curl -X PATCH "https://app.servflo.ai/api/organizations/$ORGANIZATION_ID/inventory/levels" \
  -H "Authorization: Bearer $SERVFLO_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"itemId":"item_id","locationId":"location_id"}'

Response

200: the answer's fields
FieldTypeDescription
idstring
organizationIdstring
itemIdstring
locationIdstring
onHandnumber
reorderPointnumber or null
reorderQtynumber or null
updatedAtstring (date-time)
itemobject
item.idstring
item.codestring or null
item.namestring
item.unitstring
item.kindstring
item.costCentsintegerInteger cents. Present only for roles with costing.read.
item.vendorIdstring or null
item.vendorobject or null
item.vendor.idstring
item.vendor.namestring
item.categoryIdstring or null
locationobject
location.idstring
location.namestring
location.kindenumWAREHOUSE, or TRUCK (a technician's van, stocked from a warehouse). One of WAREHOUSE, TRUCK.
location.technicianobject or null
location.technician.idstring
location.technician.namestring
location.technician.colorstring
statusenumNEGATIVE below zero (allowed, flagged), OUT at 0, LOW at or below the reorder point. One of NEGATIVE, OUT, LOW, OK.
lowboolean
suggestedQuantitynumberWhat to order when low: the reorder quantity, else enough to clear the point.
stockValueCentsintegerInteger cents. Present only for roles with costing.read.

Adjust stock

POST /organizations/{organizationId}/inventory/adjustments

Adds (positive) or removes (negative) stock at a location with a reason (damage, found, correction): an ADJUST movement in the ledger. Negative stock is allowed and flagged. Returns the movement and the new level.

Permissioninventory.manage (Owner, Admin, Dispatcher)
Riskwrite, OAuth scope servflo.write. Write: creates or changes records inside the business; nothing leaves it.
MCP toolinventory_adjust (toolset pricebook)

Request body

FieldTypeRequiredDescription
itemIdstringYes
locationIdstringYes
quantitynumberYesUnits of the item; may be fractional. -1000000–1000000.
reasonstringYesWhy (required). Up to 1000 characters.

Example

curl -X POST "https://app.servflo.ai/api/organizations/$ORGANIZATION_ID/inventory/adjustments" \
  -H "Authorization: Bearer $SERVFLO_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"itemId":"item_id","locationId":"location_id","quantity":1,"reason":"string"}'

Response

201: the answer's fields
FieldTypeDescription
movementobject
movement.idstring
movement.itemIdstring
movement.locationIdstring
movement.kindenumRECEIVE (purchase receipt), TRANSFER_OUT / TRANSFER_IN (the two halves of a transfer), USE (on a job), RETURN (back from a job), ADJUST (correction or count). One of RECEIVE, TRANSFER_OUT, TRANSFER_IN, USE, RETURN, ADJUST.
movement.quantitynumberSigned: positive into the location, negative out of it.
movement.balanceAfternumberThe location's on-hand after this movement.
movement.costCentsintegerInteger cents. Present only for roles with costing.read.
movement.jobIdstring or null
movement.purchaseOrderIdstring or null
movement.transferIdstring or null
movement.userIdstring or null
movement.reasonstring or null
movement.createdAtstring (date-time)
levelobject
level.itemIdstring
level.locationIdstring
level.onHandnumber
negativebooleanThe location is below zero now (allowed, flagged).

Record a stock count

POST /organizations/{organizationId}/inventory/counts

Sets each counted item at a location to what was counted (an ADJUST movement for each difference; unchanged items are not moved). Returns what changed.

Permissioninventory.manage (Owner, Admin, Dispatcher)
Riskwrite, OAuth scope servflo.write. Write: creates or changes records inside the business; nothing leaves it.
MCP toolinventory_count (toolset pricebook)

Request body

FieldTypeRequiredDescription
locationIdstringYes
countsarray of objectYesUp to 1000 items.
counts[].itemIdstringYes
counts[].countednumberYes-1000000–1000000.
reasonstring or nullNoDefaults to "Stock count". Up to 1000 characters.

Example

curl -X POST "https://app.servflo.ai/api/organizations/$ORGANIZATION_ID/inventory/counts" \
  -H "Authorization: Bearer $SERVFLO_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"locationId":"location_id","counts":[{"itemId":"item_id","counted":1}]}'

Response

201: the answer's fields
FieldTypeDescription
countedinteger
adjustedinteger
linesarray of object
lines[].itemIdstring
lines[].beforenumber
lines[].countednumber
lines[].adjustmentnumber

Transfer stock between locations

POST /organizations/{organizationId}/inventory/transfers

Moves stock from one location to another (a warehouse restocking a truck): a TRANSFER_OUT and a TRANSFER_IN per line, sharing a transferId, in one transaction. The source may go negative (flagged). Returns the new levels.

Permissioninventory.manage (Owner, Admin, Dispatcher)
Riskwrite, OAuth scope servflo.write. Write: creates or changes records inside the business; nothing leaves it.
MCP toolinventory_transfer (toolset pricebook)

Request body

FieldTypeRequiredDescription
fromLocationIdstringYes
toLocationIdstringYes
linesarray of objectYesUp to 500 items.
lines[].itemIdstringYes
lines[].quantitynumberYesAt most 1000000.
reasonstring or nullNoUp to 1000 characters.

Example

curl -X POST "https://app.servflo.ai/api/organizations/$ORGANIZATION_ID/inventory/transfers" \
  -H "Authorization: Bearer $SERVFLO_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"fromLocationId":"fromLocation_id","toLocationId":"toLocation_id","lines":[{"itemId":"item_id","quantity":1}]}'

Response

201: the answer's fields
FieldTypeDescription
transferIdstring
linesarray of object
lines[].itemIdstring
lines[].quantitynumber
lines[].fromOnHandnumber
lines[].toOnHandnumber

Parts requests from technicians

GET /organizations/{organizationId}/parts-requests

What technicians asked for from the app (PRQ-n), newest first: for a job or to restock their truck, with the lines, the technician, the job and the truck. open=true lists REQUESTED, ORDERED and READY. Read-only.

Permissioninventory.manage (Owner, Admin, Dispatcher)
Riskread, OAuth scope servflo.read. Read: reads only.
MCP toolpartsRequests_list (toolset scheduling)

Parameters

NameInTypeRequiredDescription
statusqueryenumNoOne of REQUESTED, ORDERED, READY, DONE, CANCELLED.
openquerybooleanNo
technicianIdquerystringNo

Example

curl "https://app.servflo.ai/api/organizations/$ORGANIZATION_ID/parts-requests" \
  -H "Authorization: Bearer $SERVFLO_API_KEY"

Response

200: the answer's fields

An array of objects:

FieldTypeDescription
idstringParts request id.
organizationIdstring
identifierstringPRQ-n, unique per organization.
kindenumFor a job, or to restock the truck. One of JOB, RESTOCK.
statusenumREQUESTED → ORDERED (from a supplier) → READY (waiting for pickup) → DONE (on the truck), or CANCELLED. One of REQUESTED, ORDERED, READY, DONE, CANCELLED.
technicianIdstring or null
requestedByUserIdstring
jobIdstring or null
truckIdstring or nullThe technician's truck (inventory location).
neededBystring or nullYYYY-MM-DD
notestring or null
officeNotestring or nullThe office's answer to the technician.
statusChangedAtstring (date-time)
createdAtstring (date-time)
updatedAtstring (date-time)
technicianobject or null
technician.idstringTechnician id (GET /technicians).
technician.namestring
technician.colorstringCalendar colour, #rrggbb.
jobobject or null
job.idstring
job.identifierstringJOB-n
job.customerobject
job.customer.namestring
truckobject or null
truck.idstring
truck.namestring
linesarray of object
lines[].idstring
lines[].itemIdstring or nullThe pricebook item, when it is one.
lines[].descriptionstring
lines[].quantitynumber
lines[].itemobject or null
lines[].item.codestring or null
lines[].item.namestring

A parts request

GET /organizations/{organizationId}/parts-requests/{partsRequestId}

One parts request with its lines. Read-only.

Permissioninventory.manage (Owner, Admin, Dispatcher)
Riskread, OAuth scope servflo.read. Read: reads only.
MCP toolpartsRequests_get (toolset scheduling)

Parameters

NameInTypeRequiredDescription
partsRequestIdpathstringYes

Example

curl "https://app.servflo.ai/api/organizations/$ORGANIZATION_ID/parts-requests/{partsRequestId}" \
  -H "Authorization: Bearer $SERVFLO_API_KEY"

Response

200: the answer's fields
FieldTypeDescription
idstringParts request id.
organizationIdstring
identifierstringPRQ-n, unique per organization.
kindenumFor a job, or to restock the truck. One of JOB, RESTOCK.
statusenumREQUESTED → ORDERED (from a supplier) → READY (waiting for pickup) → DONE (on the truck), or CANCELLED. One of REQUESTED, ORDERED, READY, DONE, CANCELLED.
technicianIdstring or null
requestedByUserIdstring
jobIdstring or null
truckIdstring or nullThe technician's truck (inventory location).
neededBystring or nullYYYY-MM-DD
notestring or null
officeNotestring or nullThe office's answer to the technician.
statusChangedAtstring (date-time)
createdAtstring (date-time)
updatedAtstring (date-time)
technicianobject or null
technician.idstringTechnician id (GET /technicians).
technician.namestring
technician.colorstringCalendar colour, #rrggbb.
jobobject or null
job.idstring
job.identifierstringJOB-n
job.customerobject
job.customer.namestring
truckobject or null
truck.idstring
truck.namestring
linesarray of object
lines[].idstring
lines[].itemIdstring or nullThe pricebook item, when it is one.
lines[].descriptionstring
lines[].quantitynumber
lines[].itemobject or null
lines[].item.codestring or null
lines[].item.namestring

Move a parts request along

PATCH /organizations/{organizationId}/parts-requests/{partsRequestId}

Tells the technician: sets the status (REQUESTED → ORDERED → READY → DONE, or CANCELLED from any open status) and an optional officeNote ('At Ferguson, counter 2'); the technician's phone is told when it is ordered, ready or cancelled. 409 for a closed request.

Permissioninventory.manage (Owner, Admin, Dispatcher)
Riskwrite, OAuth scope servflo.write. Write: creates or changes records inside the business; nothing leaves it.
MCP toolpartsRequests_update (toolset scheduling)

Parameters

NameInTypeRequiredDescription
partsRequestIdpathstringYes

Request body

FieldTypeRequiredDescription
statusenumYesOne of REQUESTED, ORDERED, READY, DONE, CANCELLED.
officeNotestring or nullNoUp to 2000 characters.

Example

curl -X PATCH "https://app.servflo.ai/api/organizations/$ORGANIZATION_ID/parts-requests/{partsRequestId}" \
  -H "Authorization: Bearer $SERVFLO_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"status":"REQUESTED"}'

Response

200: the answer's fields
FieldTypeDescription
idstringParts request id.
organizationIdstring
identifierstringPRQ-n, unique per organization.
kindenumFor a job, or to restock the truck. One of JOB, RESTOCK.
statusenumREQUESTED → ORDERED (from a supplier) → READY (waiting for pickup) → DONE (on the truck), or CANCELLED. One of REQUESTED, ORDERED, READY, DONE, CANCELLED.
technicianIdstring or null
requestedByUserIdstring
jobIdstring or null
truckIdstring or nullThe technician's truck (inventory location).
neededBystring or nullYYYY-MM-DD
notestring or null
officeNotestring or nullThe office's answer to the technician.
statusChangedAtstring (date-time)
createdAtstring (date-time)
updatedAtstring (date-time)
technicianobject or null
technician.idstringTechnician id (GET /technicians).
technician.namestring
technician.colorstringCalendar colour, #rrggbb.
jobobject or null
job.idstring
job.identifierstringJOB-n
job.customerobject
job.customer.namestring
truckobject or null
truck.idstring
truck.namestring
linesarray of object
lines[].idstring
lines[].itemIdstring or nullThe pricebook item, when it is one.
lines[].descriptionstring
lines[].quantitynumber
lines[].itemobject or null
lines[].item.codestring or null
lines[].item.namestring

Fulfil a parts request from stock

POST /organizations/{organizationId}/parts-requests/{partsRequestId}/fulfil

Moves stock: transfers the request's pricebook lines from fromLocationId (a warehouse, GET /inventory/locations) onto the technician's truck as an ordinary transfer, then marks the request DONE. Lines without a pricebook item are left to the office. 400 when the technician has no truck or stock is short.

Permissioninventory.manage (Owner, Admin, Dispatcher)
Riskwrite, OAuth scope servflo.write. Write: creates or changes records inside the business; nothing leaves it.
MCP toolpartsRequests_fulfil (toolset scheduling)

Parameters

NameInTypeRequiredDescription
partsRequestIdpathstringYes

Request body

FieldTypeRequiredDescription
fromLocationIdstringYes
officeNotestring or nullNoUp to 2000 characters.

Example

curl -X POST "https://app.servflo.ai/api/organizations/$ORGANIZATION_ID/parts-requests/{partsRequestId}/fulfil" \
  -H "Authorization: Bearer $SERVFLO_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"fromLocationId":"fromLocation_id"}'

Response

200: the answer's fields
FieldTypeDescription
idstringParts request id.
organizationIdstring
identifierstringPRQ-n, unique per organization.
kindenumFor a job, or to restock the truck. One of JOB, RESTOCK.
statusenumREQUESTED → ORDERED (from a supplier) → READY (waiting for pickup) → DONE (on the truck), or CANCELLED. One of REQUESTED, ORDERED, READY, DONE, CANCELLED.
technicianIdstring or null
requestedByUserIdstring
jobIdstring or null
truckIdstring or nullThe technician's truck (inventory location).
neededBystring or nullYYYY-MM-DD
notestring or null
officeNotestring or nullThe office's answer to the technician.
statusChangedAtstring (date-time)
createdAtstring (date-time)
updatedAtstring (date-time)
technicianobject or null
technician.idstringTechnician id (GET /technicians).
technician.namestring
technician.colorstringCalendar colour, #rrggbb.
jobobject or null
job.idstring
job.identifierstringJOB-n
job.customerobject
job.customer.namestring
truckobject or null
truck.idstring
truck.namestring
linesarray of object
lines[].idstring
lines[].itemIdstring or nullThe pricebook item, when it is one.
lines[].descriptionstring
lines[].quantitynumber
lines[].itemobject or null
lines[].item.codestring or null
lines[].item.namestring

On this page