API: Task
POST /api/v3/task
Request parameter:
Parameter | Type | In | Description |
---|---|---|---|
contact | int | json | id of Contact related to task |
subject | string | json | task subject |
Request data:
Metadata: object.
Parameter | Type | Description |
---|---|---|
status | int | Response status (same as in http code) |
Data: object.data
Parameter | Out Type | In Type | Description |
---|---|---|---|
id | int | Task id | |
subject | string | string(150) | Task subject |
info | string|null | string(150) | Task description/info |
user | array | int|null | Task related user (default 1=Admin) |
user[id] | int | User id | |
user[first_name] | string | User first name | |
user[last_name] | string | User last name | |
contact | array | int | Related API: Contact |
contact[id] | int | Related contact id | |
contact[name_1] | string | Related contact name 1 | |
contact[name_2] | string|null | Related contact name 2 | |
start_date | string(date)|null | string(date)|null | Task start date |
start_hour | int|null | int(0->23)|null | Task start hour |
start_time | int|null | int(0->60)|null | Task start minute |
end_date | string(date)|null | string(date)|null | Task end date |
end_hour | int|null | int(0->23)|null | Task end hour |
end_time | int|null | int(0->60)|null | Task end minute |
priority | array | int|null | Task priority (default 1=No) |
priority[id] | int | Task priority id | |
priority[name] | string | Task priority name in DE language | |
priority[name_e] | string | Task priority name in EN language | |
priority[name_i] | string | Task priority name in IT language | |
priority[name_f] | string | Task priority name in FR language | |
status | array | int|null | Task status (default 1=Open) |
status[id] | int | Task status id | |
status[name] | string | Task status name in DE language | |
status[name_e] | string | Task status name in EN language | |
status[name_i] | string | Task status name in IT language | |
status[name_f] | string | Task status name in FR language | |
policy | array | int|null | Related /wiki/spaces/BROK/pages/693051 |
policy[id] | int|null | Related policy id | |
policy[nr] | string|null | Related policy nr |
Response (Error):
Parameter | Type | Description |
---|---|---|
code | integer | An error code |
error | string | A message containing some information about the error |
errors | array | List of errors devided by field in associative array {field_name:error message} |
Request
curl -X POST https://public.brokerstar.biz/api/v3/task -d '{ "contact":17556, "subject":"new meeting", "start_date":"2021-11-20", "start_hour":11, "start_time":1, "policy":37140, "status": 2, "priority":2, "info": "Fill task description" }' --header 'Authorization: Bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzUxMiJ9.eyJpYXQiOjE2NTg[...]cm5hbWUiOiJkZW1vLWRlIn0.VTVp[...]cqIg' -
Response (Success)
200 OK { "data": { "id": 2, }, "status": 200 }
Response (Error)
403 Forbidden { "error": "You have no access to contact id:123", "code": 403 }
Response (Error)
403 Forbidden { "error": "You have no access to policy id:123", "code": 403 }
Or one of
- /wiki/spaces/BROK/pages/693181 #Authentication defaults