Update Project
Developing
Testing Env
Testing Env
POST
/api/v1/projects/update/1
Last modified:2025-05-06 10:48:52
API Documentation
Update Project [PUT/PATCH]
URL
/api/projects/update/{id}
Request Headers
Key | Value | Required |
---|---|---|
Accept | application/json | Yes |
user-token | {{user_token}} | Yes |
secure-business-key | {{secure_business_key}} | Yes |
Accept-Language | en/ar | No |
Content-Type | string | Should be multipart/form-data |
URL Parameters
Parameter | Type | Description | Required |
---|---|---|---|
id | integer | ID of the project to update | Yes |
Request Body Parameters
Parameter | Type | Required | Example | Description | Validation |
---|---|---|---|---|---|
business_id | integer | Yes | 123 | Business ID | Must exist |
workspace_id | integer | Yes | 5 | Workspace ID | Must exist in workspaces |
name | string | Yes | "Updated Project" | Project name | max:255 |
description | string | No | "Updated description" | Project description | |
project_type | string | No | "consulting" | Type of project | Must be: executive, consulting, internal, product_development, other |
status | string | No | "active" | Project status | Must be: proposed, planning, active, postponed, completed, cancelled |
start_date | date | No | "2023-02-01" | Project start date | Valid date |
end_date | date | No | "2023-11-30" | Project end date | After or equal to start_date |
client_id | integer | No | 11 | Client ID | Must exist in clients |
branch_department_id | integer | No | 4 | Department ID | Must exist in departments |
manager_id | integer | No | 9 | Manager user ID | Must exist in users |
estimated_budget | numeric | No | 55000.00 | Estimated budget | min:0, max:999999999.99 |
cost_center_id | integer | No | 3 | Cost center ID | Must exist in cost_centers |
Response
Success (200)
{
"status_code": 200,
"code": 1020,
"hint": "Processed Successfully",
"success": true,
"data": {
"project": {
"id": 1,
"name": "Updated Project Name",
"project_code": "PRJ-202505-HYNM",
"description": "Updated project description",
"project_type": "consulting",
"status": "active",
"start_date": "2025-06-01",
"end_date": "2025-09-01",
"client_id": "3",
"branch_department_id": "2",
"manager_id": "5",
"estimated_budget": "75000.00",
"cost_center_id": "1"
},
"message": "Project updated successfully"
}
}
Request Request Example
Shell
JavaScript
Java
Swift
curl --location --request POST '/api/v1/projects/update/1' \
--header 'Accept: application/json' \
--header 'Accept-Language: en' \
--header 'user-token: ' \
--header 'secure-business-key: 4765066450c0bd66325.48403130' \
--form 'name="Updated Project Name"' \
--form 'workspace_id="8";type=must exist in workspaces table' \
--form 'description="Updated project description"' \
--form 'project_type="consulting";type=one of: executive' \
--form 'status="active";type=one of: proposed' \
--form 'start_date="2025-06-01"' \
--form 'end_date="2025-09-01";type=must be after or equal to start_date' \
--form 'client_id="3"' \
--form 'branch_department_id="2"' \
--form 'manager_id="5"' \
--form 'estimated_budget="75000";type=must be between 0 and 999999999.99' \
--form 'cost_center_id="1"'
Response Response Example
{
"status_code": 200,
"code": 1020,
"hint": "Processed Successfully",
"success": true,
"data": {
"project": {
"id": 1,
"name": "Updated Project Name",
"project_code": "PRJ-202505-HYNM",
"description": "Updated project description",
"project_type": "consulting",
"status": "active",
"start_date": "2025-06-01",
"end_date": "2025-09-01",
"client_id": "3",
"branch_department_id": "2",
"manager_id": "5",
"estimated_budget": "75000.00",
"cost_center_id": "1"
},
"message": "Project updated successfully"
}
}
Request
Header Params
Accept
stringÂ
optional
Example:
application/json
Accept-Language
stringÂ
optional
Example:
en
Content-Type
stringÂ
optional
Example:
application/json
user-token
stringÂ
optional
Example:
{{user_token}}
secure-business-key
stringÂ
optional
Example:
{{secure_business_key}}
Body Params multipart/form-data
name
stringÂ
required
Example:
Updated Project Name
workspace_id
integerÂ
required
Example:
8
description
stringÂ
optional
Example:
Updated project description
project_type
stringÂ
optional
Example:
consulting
status
stringÂ
optional
Example:
active
start_date
stringÂ
optional
Example:
2025-06-01
end_date
stringÂ
optional
Example:
2025-09-01
client_id
integerÂ
optional
Example:
3
branch_department_id
integerÂ
optional
Example:
2
manager_id
integerÂ
optional
Example:
5
estimated_budget
stringÂ
optional
Example:
75000
cost_center_id
integerÂ
optional
Example:
1