Items | FieldCamp API
Items are the products or services billed as line items on jobs.
An item is a billable product or service. Items appear as line items
on jobs, where they roll up into subTotal, tax, and total.
The path is /api/product-service (legacy naming) even though we refer
to the resource as "Items" everywhere else.
Create once, reuse forever
Items are long-lived. Create each distinct product or service once,
store the returned id, and reference it from every job's jobItems.
There's no server-side dedup on item names. If you naïvely
POST /api/product-service for the same named item twice, you'll have
two items. Look up by name (and optionally price) client-side first.
Fields
type—Service(time-based work) orProduct(physical goods).isActive— settrue. Inactive items aren't selectable in the UI.price— the default unit price. Override per-line viaJobItem.priceif needed.
Endpoints
/api/product-servicePass your JWT API key as Authorization: Bearer <token>. Send
alongside X-API-Key: <token> for maximum compatibility.
In: header
Response Body
application/json
application/json
curl -X GET "https://example.com/api/product-service"{ "success": true, "data": { "items": [ { "name": "Standard 3-person moving crew", "description": "Up to 4 hours of on-site moving labor with 3 crew", "price": 299, "type": "Service", "isActive": true, "id": "string", "recordId": "string" } ] }}{ "success": false, "error": "Invalid or expired token"}/api/product-servicePass your JWT API key as Authorization: Bearer <token>. Send
alongside X-API-Key: <token> for maximum compatibility.
In: header
Request Body
application/json
TypeScript Definitions
Use the request body type in TypeScript.
Request body for POST /api/product-service.
Response Body
application/json
application/json
application/json
curl -X POST "https://example.com/api/product-service" \ -H "Content-Type: application/json" \ -d '{ "name": "Standard 3-person moving crew", "description": "Up to 4 hours of on-site moving labor with 3 crew", "price": 299, "type": "Service", "isActive": true }'{ "success": true, "data": { "item": { "name": "Standard 3-person moving crew", "description": "Up to 4 hours of on-site moving labor with 3 crew", "price": 299, "type": "Service", "isActive": true, "id": "string", "recordId": "string" } }}{ "success": false, "error": "jobNumber is required"}{ "success": false, "error": "Invalid or expired token"}