/v2/api/entity base and authenticated with a Bearer token.workflow_id path segment selects the workflow type (entity key le_workflow-type-entity-{workflow_id}); the new record is a work-order-based row stamped with that type. The request body is a flat object whose keys are the workflow type's fields. The standard fields are listed below; custom fields for the workflow type are supplied under the le_workflow-type-entity-{workflow_id}_custom_data object.422 with an errors map naming each field. For example, workflow type 1 (Maintenance Orders) requires number.code, start_date, and budget.currency. The record number itself is assigned by the server (submit only number.code).message is localized to the workflow type's name, e.g. "<name> Added Successfully".curl --location --globoff 'https://.daftara.com/v2/api/entity/le_workflow-type-entity-56' \
--header 'Accept: application/json' \
--header 'apikey: ' \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '{
"title": "Instance 22",
"number": {
"code": "000007",
"generated": null
},
"start_date": "01/06/2026",
"delivery_date": "04/06/2026",
"client_id": "1",
"assigned_users": [
"1",
],
"budget": {
"number": 1000,
"currency": "USD"
},
"tags": [
"tag1, tag2"
],
"description": "description",
"attachments": [],
"branch_id": 1,
"staff_id": 1,
"follow_up_status_id": null,
"le_workflow-type-entity-56_custom_data": {
"code": "Renee316",
"discount_type": "نسبة مئوية",
"discount_value": 10
}
}'{
"message": "أكواد الخصم Added Successfully",
"id": 65
}