API: Task

Create Task


POST /api/v3/task

Request parameter:

ParameterTypeInDescription
contactintjsonid of Contact related to task
subjectstringjsontask subject

Request data:

Metadata: object.

ParameterTypeDescription
statusintResponse status (same as in http code)

Data:  object.data

ParameterOut TypeIn TypeDescription
idint
Task id
subjectstringstring(150)Task subject
infostring|nullstring(150)Task description/info
userarrayint|nullTask related user (default 1=Admin)
user[id]int
User id
user[first_name]string
User first name
user[last_name]string
User last name
contactarrayintRelated 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_datestring(date)|nullstring(date)|nullTask start date
start_hourint|nullint(0->23)|nullTask start hour
start_timeint|nullint(0->60)|nullTask start minute
end_datestring(date)|nullstring(date)|nullTask end date
end_hourint|nullint(0->23)|nullTask end hour
end_timeint|nullint(0->60)|nullTask end minute
priorityarrayint|nullTask 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
statusarrayint|nullTask 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
policyarrayint|nullRelated /wiki/spaces/BROK/pages/693051
policy[id]int|null
Related policy id
policy[nr]string|null
Related policy nr

Response (Error):

ParameterTypeDescription
codeintegerAn error code
errorstringA message containing some information about the error 
errorsarrayList 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