Create task
curl --request POST \
--url http://localhost:3000/v2/tasks/ \
--header 'Content-Type: application/json' \
--data '
{
"title": "<string>",
"description": "<string>",
"contactPerson": "<string>",
"email": "jsmith@example.com",
"telephone": "<string>",
"dueDate": "2023-11-07T05:31:56Z",
"taskTypeId": "<string>",
"assigneeId": "<string>",
"userIds": [
"<string>"
],
"objectIds": [
"<string>"
],
"customerIds": [
"<string>"
],
"contactIds": [
"<string>"
],
"assignmentIds": [
"<string>"
],
"invoiceIds": [
"<string>"
],
"equipmentIds": [
"<string>"
]
}
'import requests
url = "http://localhost:3000/v2/tasks/"
payload = {
"title": "<string>",
"description": "<string>",
"contactPerson": "<string>",
"email": "jsmith@example.com",
"telephone": "<string>",
"dueDate": "2023-11-07T05:31:56Z",
"taskTypeId": "<string>",
"assigneeId": "<string>",
"userIds": ["<string>"],
"objectIds": ["<string>"],
"customerIds": ["<string>"],
"contactIds": ["<string>"],
"assignmentIds": ["<string>"],
"invoiceIds": ["<string>"],
"equipmentIds": ["<string>"]
}
headers = {"Content-Type": "application/json"}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {'Content-Type': 'application/json'},
body: JSON.stringify({
title: '<string>',
description: '<string>',
contactPerson: '<string>',
email: 'jsmith@example.com',
telephone: '<string>',
dueDate: '2023-11-07T05:31:56Z',
taskTypeId: '<string>',
assigneeId: '<string>',
userIds: ['<string>'],
objectIds: ['<string>'],
customerIds: ['<string>'],
contactIds: ['<string>'],
assignmentIds: ['<string>'],
invoiceIds: ['<string>'],
equipmentIds: ['<string>']
})
};
fetch('http://localhost:3000/v2/tasks/', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_PORT => "3000",
CURLOPT_URL => "http://localhost:3000/v2/tasks/",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'title' => '<string>',
'description' => '<string>',
'contactPerson' => '<string>',
'email' => 'jsmith@example.com',
'telephone' => '<string>',
'dueDate' => '2023-11-07T05:31:56Z',
'taskTypeId' => '<string>',
'assigneeId' => '<string>',
'userIds' => [
'<string>'
],
'objectIds' => [
'<string>'
],
'customerIds' => [
'<string>'
],
'contactIds' => [
'<string>'
],
'assignmentIds' => [
'<string>'
],
'invoiceIds' => [
'<string>'
],
'equipmentIds' => [
'<string>'
]
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "http://localhost:3000/v2/tasks/"
payload := strings.NewReader("{\n \"title\": \"<string>\",\n \"description\": \"<string>\",\n \"contactPerson\": \"<string>\",\n \"email\": \"jsmith@example.com\",\n \"telephone\": \"<string>\",\n \"dueDate\": \"2023-11-07T05:31:56Z\",\n \"taskTypeId\": \"<string>\",\n \"assigneeId\": \"<string>\",\n \"userIds\": [\n \"<string>\"\n ],\n \"objectIds\": [\n \"<string>\"\n ],\n \"customerIds\": [\n \"<string>\"\n ],\n \"contactIds\": [\n \"<string>\"\n ],\n \"assignmentIds\": [\n \"<string>\"\n ],\n \"invoiceIds\": [\n \"<string>\"\n ],\n \"equipmentIds\": [\n \"<string>\"\n ]\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("http://localhost:3000/v2/tasks/")
.header("Content-Type", "application/json")
.body("{\n \"title\": \"<string>\",\n \"description\": \"<string>\",\n \"contactPerson\": \"<string>\",\n \"email\": \"jsmith@example.com\",\n \"telephone\": \"<string>\",\n \"dueDate\": \"2023-11-07T05:31:56Z\",\n \"taskTypeId\": \"<string>\",\n \"assigneeId\": \"<string>\",\n \"userIds\": [\n \"<string>\"\n ],\n \"objectIds\": [\n \"<string>\"\n ],\n \"customerIds\": [\n \"<string>\"\n ],\n \"contactIds\": [\n \"<string>\"\n ],\n \"assignmentIds\": [\n \"<string>\"\n ],\n \"invoiceIds\": [\n \"<string>\"\n ],\n \"equipmentIds\": [\n \"<string>\"\n ]\n}")
.asString();require 'uri'
require 'net/http'
url = URI("http://localhost:3000/v2/tasks/")
http = Net::HTTP.new(url.host, url.port)
request = Net::HTTP::Post.new(url)
request["Content-Type"] = 'application/json'
request.body = "{\n \"title\": \"<string>\",\n \"description\": \"<string>\",\n \"contactPerson\": \"<string>\",\n \"email\": \"jsmith@example.com\",\n \"telephone\": \"<string>\",\n \"dueDate\": \"2023-11-07T05:31:56Z\",\n \"taskTypeId\": \"<string>\",\n \"assigneeId\": \"<string>\",\n \"userIds\": [\n \"<string>\"\n ],\n \"objectIds\": [\n \"<string>\"\n ],\n \"customerIds\": [\n \"<string>\"\n ],\n \"contactIds\": [\n \"<string>\"\n ],\n \"assignmentIds\": [\n \"<string>\"\n ],\n \"invoiceIds\": [\n \"<string>\"\n ],\n \"equipmentIds\": [\n \"<string>\"\n ]\n}"
response = http.request(request)
puts response.read_bodyTasks
Create Task
Create a new task
POST
/
tasks
/
Create task
curl --request POST \
--url http://localhost:3000/v2/tasks/ \
--header 'Content-Type: application/json' \
--data '
{
"title": "<string>",
"description": "<string>",
"contactPerson": "<string>",
"email": "jsmith@example.com",
"telephone": "<string>",
"dueDate": "2023-11-07T05:31:56Z",
"taskTypeId": "<string>",
"assigneeId": "<string>",
"userIds": [
"<string>"
],
"objectIds": [
"<string>"
],
"customerIds": [
"<string>"
],
"contactIds": [
"<string>"
],
"assignmentIds": [
"<string>"
],
"invoiceIds": [
"<string>"
],
"equipmentIds": [
"<string>"
]
}
'import requests
url = "http://localhost:3000/v2/tasks/"
payload = {
"title": "<string>",
"description": "<string>",
"contactPerson": "<string>",
"email": "jsmith@example.com",
"telephone": "<string>",
"dueDate": "2023-11-07T05:31:56Z",
"taskTypeId": "<string>",
"assigneeId": "<string>",
"userIds": ["<string>"],
"objectIds": ["<string>"],
"customerIds": ["<string>"],
"contactIds": ["<string>"],
"assignmentIds": ["<string>"],
"invoiceIds": ["<string>"],
"equipmentIds": ["<string>"]
}
headers = {"Content-Type": "application/json"}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {'Content-Type': 'application/json'},
body: JSON.stringify({
title: '<string>',
description: '<string>',
contactPerson: '<string>',
email: 'jsmith@example.com',
telephone: '<string>',
dueDate: '2023-11-07T05:31:56Z',
taskTypeId: '<string>',
assigneeId: '<string>',
userIds: ['<string>'],
objectIds: ['<string>'],
customerIds: ['<string>'],
contactIds: ['<string>'],
assignmentIds: ['<string>'],
invoiceIds: ['<string>'],
equipmentIds: ['<string>']
})
};
fetch('http://localhost:3000/v2/tasks/', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_PORT => "3000",
CURLOPT_URL => "http://localhost:3000/v2/tasks/",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'title' => '<string>',
'description' => '<string>',
'contactPerson' => '<string>',
'email' => 'jsmith@example.com',
'telephone' => '<string>',
'dueDate' => '2023-11-07T05:31:56Z',
'taskTypeId' => '<string>',
'assigneeId' => '<string>',
'userIds' => [
'<string>'
],
'objectIds' => [
'<string>'
],
'customerIds' => [
'<string>'
],
'contactIds' => [
'<string>'
],
'assignmentIds' => [
'<string>'
],
'invoiceIds' => [
'<string>'
],
'equipmentIds' => [
'<string>'
]
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "http://localhost:3000/v2/tasks/"
payload := strings.NewReader("{\n \"title\": \"<string>\",\n \"description\": \"<string>\",\n \"contactPerson\": \"<string>\",\n \"email\": \"jsmith@example.com\",\n \"telephone\": \"<string>\",\n \"dueDate\": \"2023-11-07T05:31:56Z\",\n \"taskTypeId\": \"<string>\",\n \"assigneeId\": \"<string>\",\n \"userIds\": [\n \"<string>\"\n ],\n \"objectIds\": [\n \"<string>\"\n ],\n \"customerIds\": [\n \"<string>\"\n ],\n \"contactIds\": [\n \"<string>\"\n ],\n \"assignmentIds\": [\n \"<string>\"\n ],\n \"invoiceIds\": [\n \"<string>\"\n ],\n \"equipmentIds\": [\n \"<string>\"\n ]\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("http://localhost:3000/v2/tasks/")
.header("Content-Type", "application/json")
.body("{\n \"title\": \"<string>\",\n \"description\": \"<string>\",\n \"contactPerson\": \"<string>\",\n \"email\": \"jsmith@example.com\",\n \"telephone\": \"<string>\",\n \"dueDate\": \"2023-11-07T05:31:56Z\",\n \"taskTypeId\": \"<string>\",\n \"assigneeId\": \"<string>\",\n \"userIds\": [\n \"<string>\"\n ],\n \"objectIds\": [\n \"<string>\"\n ],\n \"customerIds\": [\n \"<string>\"\n ],\n \"contactIds\": [\n \"<string>\"\n ],\n \"assignmentIds\": [\n \"<string>\"\n ],\n \"invoiceIds\": [\n \"<string>\"\n ],\n \"equipmentIds\": [\n \"<string>\"\n ]\n}")
.asString();require 'uri'
require 'net/http'
url = URI("http://localhost:3000/v2/tasks/")
http = Net::HTTP.new(url.host, url.port)
request = Net::HTTP::Post.new(url)
request["Content-Type"] = 'application/json'
request.body = "{\n \"title\": \"<string>\",\n \"description\": \"<string>\",\n \"contactPerson\": \"<string>\",\n \"email\": \"jsmith@example.com\",\n \"telephone\": \"<string>\",\n \"dueDate\": \"2023-11-07T05:31:56Z\",\n \"taskTypeId\": \"<string>\",\n \"assigneeId\": \"<string>\",\n \"userIds\": [\n \"<string>\"\n ],\n \"objectIds\": [\n \"<string>\"\n ],\n \"customerIds\": [\n \"<string>\"\n ],\n \"contactIds\": [\n \"<string>\"\n ],\n \"assignmentIds\": [\n \"<string>\"\n ],\n \"invoiceIds\": [\n \"<string>\"\n ],\n \"equipmentIds\": [\n \"<string>\"\n ]\n}"
response = http.request(request)
puts response.read_bodyBody
application/json
Task data
Task creation data
Title of the task
Description of the task
Priority of the task
Available options:
low, medium, high, urgent Name of the contact person
Email of the contact person
Telephone of the contact person
Due date of the task
Task type ID
Assignee of the task
Related User IDs
Related Object IDs
Related Customer IDs
Related Contact IDs
Related Assignment IDs
Related Invoice IDs
Related Equipment IDs
Response
Task created successfully
Was this page helpful?
⌘I

