Resources & CRUD

The six resources follow the same CRUD shape: list a collection, fetch one by id, create, update and delete. All data is scoped to your company automatically.

The verbs

MethodPathDoes
GET/v1/projectsList (paged, filterable)
GET/v1/projects/{id}Fetch one
POST/v1/projectsCreate — returns 201
PATCH/v1/projects/{id}Partial update
DELETE/v1/projects/{id}Delete

The same pattern applies to workers, clients, estimates, subcontractors and equipment.

Listing: paging & filters

Lists accept ?limit (default 50, max 100) and ?offset. The meta object reports the full total so you can page. Most collections also accept a ?q text search and a ?status filter; some add resource-specific filters such as ?client_id, ?trade_id or ?category_id.

GET /v1/workers?status=ACTIVE&q=ivan&limit=25&offset=0

Sparse fieldsets

On reads, ask for only the fields you need with ?fields=. Smaller payloads, less parsing:

GET /v1/projects?fields=id,name,status

Conditional GET (ETag)

Read responses carry an ETag. Send it back as If-None-Match and, if nothing changed, you get an empty 304 Not Modified instead of the full body.

Creating & updating

Write bodies are JSON. POST requires the resource’s name/title field; PATCH is a partial merge — only the fields you send change, the rest are preserved. Writes run the same validation as the web UI.

POST /v1/clients
Authorization: Bearer redz_live_...
Content-Type: application/json

{ "name": "Acme Builders", "status": "ACTIVE" }

→ 201 Created
{ "data": { "id": 512, "created": true, "dry_run": false } }
Business rules still apply. A project’s billing mode locks once it leaves draft; an estimate is editable only while in draft (else 409); creating a project or worker beyond your plan quota returns 402 rather than silently upgrading you.

Deleting

Delete honours the ERP’s dependency rules. If a record is referenced by protected history you get 409 delete_blocked instead of losing linked data. Preview the outcome first with a dry run (see Tools & specs) — it reports what would be removed and what would be kept.

Feature-gated resources

Projects, workers and clients ship with the API add-on. Estimates, subcontractors and equipment endpoints additionally require their matching add-on; without it the endpoint returns 402 feature_off.

Документация

Частые вопросы

Read meta.total from the first response, then repeat the request increasing ?offset by your ?limit until offset reaches total. Limit is capped at 100 per page.

No. PATCH is a partial merge: fields you omit keep their stored values. Send only what you want to change.

The record is referenced by protected historical data (for example a converted estimate that backs a project budget, or equipment with a billed rental). Resolve or undo the dependency first.