POST
DocumentStatuses.Add
Add a Document Status. Matches Settings → Document Status Submit. If all_document_status_id / document_status_id > 0 is sent, updates that row (dashboard form behavior).
Permissions
- User must be logged in with a valid bearer token.
- Returned or changed records are limited by the user permissions, team access, folder access, and account settings.
Action
- Creates a DocumentStatuses record or sends the requested data after validation.
Push Service
Pushes event documentstatuses.add.created to users who should see this change.
Automation
No automation is run for this function.
Special Instructions
- Dashboard fields: all_document_statuses_en, all_document_statuses_he, all_status_statuses_color, document_status_type (default purchase_orders), all_document_status_id.
- API-friendly aliases: name_en, name_he, color / status_color, type_for.
- On create, status_order is set to max(status_order)+1 for the account.
Required Parameters
| Name | Type | Sample | Explanation |
|---|---|---|---|
name_enpost | string | In Production | English name. Alias: all_document_statuses_en. |
name_hepost | string | In Production | Hebrew / second-lang name. Alias: all_document_statuses_he. |
Optional Parameters
| Name | Type | Sample | What it gives |
|---|---|---|---|
colorpost | string | #000000 | Color hex. Aliases: all_status_statuses_color, status_color. Default #000000. |
type_forpost | string | purchase_orders | Dashboard hidden document_status_type. Default purchase_orders. |
all_document_status_idpost | int | 0 | When > 0, updates that row instead of inserting. Aliases: document_status_id, id. |
Authentication
Send the bearer token returned by Login in the request header.
Authorization: Bearer YOUR TOKEN
Sample Request
{
"url": "\/app\/DocumentStatuses.Add",
"method": "POST",
"headers": {
"Authorization": "Bearer YOUR TOKEN"
},
"body": {
"name_en": "Quality Checked",
"name_he": "Quality Checked",
"color": "#8B6914",
"type_for": "purchase_orders"
},
"url_user": "https:\/\/{user}.bull36.com\/app\/DocumentStatuses.Add",
"url_domain": "https:\/\/{domain}\/app\/DocumentStatuses.Add"
}Endpoint
POST /app/DocumentStatuses.Add
POST https://{user}.bull36.com/app/DocumentStatuses.Add
POST https://{domain}/app/DocumentStatuses.AddSample Output
{
"success": 1,
"message": "Your document status is added",
"document_status_id": 3455,
"socket_event": "documentstatuses.add.created"
}JavaScript Example
const token = 'YOUR TOKEN';
const body = new URLSearchParams({ name_en: 'Quality Checked', name_he: 'Quality Checked', color: '#8B6914' });
const res = await fetch('/app/DocumentStatuses.Add', { method: 'POST', headers: { Authorization: 'Bearer ' + token }, body });
console.log(await res.json());Error Example
{
"success": 0,
"message": "Missing required parameter: name_en"
}