Update API Reference
@@ -29,7 +29,7 @@ Reference data (departments and GL accounts) must be created before budget lines
|
|||||||
|
|
||||||
### Departments
|
### Departments
|
||||||
|
|
||||||
#### `POST /departments`
|
#### `POST /department/create
|
||||||
|
|
||||||
Create a department.
|
Create a department.
|
||||||
|
|
||||||
@@ -37,23 +37,32 @@ Create a department.
|
|||||||
```json
|
```json
|
||||||
{
|
{
|
||||||
"code": "ENG",
|
"code": "ENG",
|
||||||
"name": "Engineering"
|
"name": "Engineering",
|
||||||
|
"cost_center": "idk",
|
||||||
|
"active": true
|
||||||
}
|
}
|
||||||
```
|
```
|
||||||
|
|
||||||
#### `GET /departments`
|
#### `GET /department/list`
|
||||||
|
|
||||||
List all departments.
|
List all departments.
|
||||||
|
|
||||||
**Response:**
|
**Response:**
|
||||||
```json
|
```json
|
||||||
[
|
[
|
||||||
{"id": 1, "code": "ENG", "name": "Engineering"},
|
{"id": 1, "code": "ENG", "name": "Engineering", "cost_center": "idk", "active": true},
|
||||||
{"id": 2, "code": "MKT", "name": "Marketing"}
|
{"id": 2, "code": "MKT", "name": "Marketing", "cost_center": "idk", "active": true}
|
||||||
]
|
]
|
||||||
```
|
```
|
||||||
|
|
||||||
#### `DELETE /departments/{id}`
|
#### `DELETE /departments/delete`
|
||||||
|
|
||||||
|
**Request body:**
|
||||||
|
```json
|
||||||
|
{
|
||||||
|
"id": "2",
|
||||||
|
}
|
||||||
|
```
|
||||||
|
|
||||||
Delete a department by ID.
|
Delete a department by ID.
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user