Work Estimates
Devize lucrări (work estimates) — list, view and add them for a client.
Returns work estimates, newest first, 250 per page. Each row has: deviz_id, doc_nr, doc_date, title, client_bocp_id (0 = no client yet), client_name, workpoint_id, workpoint_name, currency, total_without_vat, total, accommodation_value_with_vat, per_diem_value_with_vat, is_finalized, document_cancelled, for_doc_type, for_doc_id, and the documents issued from it: invoice_ids, proforma_ids, sale_ids.
Filters (URL path segments):
- for_client_id:{id} — work estimates of one client.
- pl_id:{id} — work estimates of one workpoint.
- exclude:open only finalized ones, exclude:finalized only open ones.
- include:items — adds the items[] array (same shape as in the single view).
- Standard: year, yearmonth, date, datefrom, datethrough (on the document date), skipcancelled, id, minid, page. There is no modifiedafter on this route.
Responses
| Status | Description |
|---|---|
200 |
OK — response uses the shared envelope. |
400 |
Request is malformed or a required field is missing / invalid. |
401 |
Missing or invalid Basic Auth credentials. |
404 |
The requested resource does not exist. |
Returns the same fields as the list, plus items[]. Each item: item_bocp_id, type (product = stock item, service, travel), code, item_name, item_quantity, measurement_unit, item_price, item_price_with_vat, item_vat_percent, line_value, line_vat_value, line_value_with_vat, currency, item_fisademagazie_id, service_id.
Parameters
| Name | In | Type | Required | Description |
|---|---|---|---|---|
deviz_id |
path | integer | yes |
Responses
| Status | Description |
|---|---|
200 |
OK — response uses the shared envelope. |
404 |
The requested resource does not exist. |
Creates an open work estimate. Typical flow: find the client with GET /contacts/list/contact_vat_id:{CUI}/ or create it with POST /contacts/, then send its bocp_id here as client_id.
client_id: 0 is accepted (client not known yet); the response then carries a warning, and a client must be set in BOCP before the estimate is invoiced.
Item field names are the same as in the eCommerce order packet (item_name, item_quantity, item_price, item_vat_percent; name, quantity, price are accepted as aliases). The price with VAT and all line values are computed by BOCP from the net item_price and item_vat_percent.
- type: product — code must be a sellable product code that has a stock card at the estimate's workpoint.
- type: service (default) — when code matches a service code, the line is linked to that service; otherwise it is kept as free text.
- type: travel — travel cost line.
Nothing is created when any field or item is invalid: the response lists every error.
Permission: the API key needs an explicit POST grant on the devize route. Keys without it receive 403.
The response is the created work estimate (same shape as GET /devize/{deviz_id}/) plus warnings[].
Request body (JSON)
{
"client_id": 1234,
"title": "Revizie centrala termica",
"document_date": "2026-11-04",
"workpoint_id": 3,
"currency": "RON",
"items": [
{
"type": "product",
"code": "SKU-1",
"item_name": "Filtru",
"item_quantity": 2,
"item_price": 100,
"item_vat_percent": 21
},
{
"type": "service",
"code": "MANOPERA",
"item_name": "Manopera",
"item_quantity": 3,
"um": "ora",
"item_price": 80,
"item_vat_percent": 21
},
{
"type": "travel",
"item_name": "Deplasare",
"item_quantity": 1,
"item_price": 150,
"item_vat_percent": 21
}
]
}
Responses
| Status | Description |
|---|---|
200 |
OK — response uses the shared envelope. |
400 |
Request is malformed or a required field is missing / invalid. |
401 |
Missing or invalid Basic Auth credentials. |
This page is generated from openapi.json.