Taxes | FieldCamp API
List the tax codes you apply to estimate and invoice line items.
Tax codes are IDs you reference from a line item's taxes array on an
estimate or invoice. Each code has a name (e.g. "VAT 20%") and a decimal
rate. Jobs carry a single tax total that you send yourself, not tax codes.
Usage pattern
Fetch once at startup, cache, and map by name when you build the items
array for an invoice. Each line item takes
taxes: [{ taxId, taxName, taxRate, taxAmount }]. taxRate and taxAmount
default to 0, so if you leave them out the line's tax is stored as zero.
A document-level tax uses a different shape: { taxId, name, rate }.
const { data } = await fc.get('/api/taxes');
const taxByName = Object.fromEntries(data.data.taxes.map(t => [t.name, t.id]));
const vatId = taxByName['VAT 20%'];Endpoints
Send your key on the Authorization header here
This is a legacy route rather than a /api/v1/... one, and it authenticates
slightly differently. Your fc_live_ key does work — it authenticates as the
user who created it — but only when sent on the Authorization header:
curl https://api.fieldcamp.ai/api/taxes \
-H "Authorization: Bearer fc_live_..."X-Api-Key is not read on these routes, and per-key scopes are not enforced
here — the key acts with its creator's own access. On the /api/v1/... routes
both header forms work and scopes are checked, so prefer a v1 endpoint whenever
one exists for what you need.
/api/taxesAuthorization
BearerAuth Your FieldCamp API key (starts with fc_live_). Send it as Authorization: Bearer fc_live_… — or as the X-Api-Key: fc_live_… header. Create a key in Settings → API. This is an API key, not a login JWT.
In: header
Query Parameters
Response Body
application/json
application/json
application/json
application/json
curl -X GET "https://example.com/api/taxes"{ "success": true, "code": "success.created", "message": "Client created successfully", "data": null}