Execution Statuses
The operational track a document moves along — waiting, in preparation, shipped, done. You define the list; it is a separate axis from the financial status, so a document can be paid and unshipped, or shipped and unpaid, and neither hides the other.
Use cases: Use execution statuses to run fulfilment from the document list: tag orders as they progress, and filter GET /documents by where they are.
GET
/document-execution-statusesList the execution statuses your company has defined, in display order.
Deleted statuses are omitted.
Request
curl -X GET "https://api.glance.co.il/document-execution-statuses" \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Content-Type: application/json"Response
Response
{
"success": true,
"statuses": [
{
"id": 1,
"name": "ממתין",
"color": "#9CA3AF",
"sortOrder": 0,
"isDefault": true,
"isTerminal": false
},
{
"id": 3,
"name": "נשלח",
"color": "#2563EB",
"sortOrder": 20,
"isDefault": false,
"isTerminal": true
}
]
}POST
/document-execution-statusesCreate an execution status.
Requires an owner-level key.
Body Parameters
| Name | Type | Description | |
|---|---|---|---|
name | string | required | Status name, 1-60 characters. |
color | string | Chip colour as `#RRGGBB`, or null for none. Any other format is rejected. | |
sortOrder | number | Display order. Defaults to 0. | |
isDefault | boolean | Give new documents this status at issue. Only one status can be the default — setting it here clears it from the others. | |
isTerminal | boolean | Marks the end of the operational track (e.g. delivered). Does not close the document financially. |
Request
curl -X POST "https://api.glance.co.il/document-execution-statuses" \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"name": "example_name",
"color": "example_color",
"sortOrder": 0,
"isDefault": true,
"isTerminal": true
}'Response
Response
{
"success": true,
"id": 3
}PUT
/document-execution-statuses/:idUpdate an execution status. All fields are optional.
Requires an owner-level key.
Path Parameters
| Name | Type | Description | |
|---|---|---|---|
id | number | required | The status ID. |
Body Parameters
| Name | Type | Description | |
|---|---|---|---|
name | string | Status name. | |
color | string | `#RRGGBB` or null. | |
sortOrder | number | Display order. | |
isDefault | boolean | Make this the default, clearing it from the others. | |
isTerminal | boolean | Whether this status ends the operational track. |
Request
curl -X PUT "https://api.glance.co.il/document-execution-statuses/:id" \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"name": "example_name",
"color": "example_color",
"sortOrder": 0,
"isDefault": true,
"isTerminal": true
}'Response
Response
{
"success": true
}DELETE
/document-execution-statuses/:idDelete an execution status.
A soft delete: documents already tagged with this status keep it — it describes what actually happened, and a hard delete would erase the operational history of closed documents. Requires an owner-level key. Assign a status to a document with PATCH /documents/:visibleId/execution-status.
Path Parameters
| Name | Type | Description | |
|---|---|---|---|
id | number | required | The status ID. |
Request
curl -X DELETE "https://api.glance.co.il/document-execution-statuses/:id" \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Content-Type: application/json"Response
Response
{
"success": true
}