Trips
Update a trip task
Manages tasks within the organization-owned trip. New tasks inherit reminder defaults when neither reminder input is supplied. Updating a task replaces dependency selections and normalized target tags; omitted dependencies or target tags are cleared. A task with dependents cannot be deleted.
PUT
/
admin
/
trips
/
{tripId}
/
tasks
/
{taskId}
Update a trip task
curl --request PUT \
--url https://api.gratona.com/v1/admin/trips/{tripId}/tasks/{taskId} \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"title": "Follow up with trip participants",
"task_type": "standard",
"document_path": "<string>",
"document_name": "<string>",
"description": "Please review the updated trip details.",
"due_date": "2026-10-20T09:00:00Z",
"is_required": false,
"requires_document": false,
"requires_approval": false,
"depends_on_task_id": 1,
"sort_order": 1,
"reminder_days_before": 1,
"reminders": [
{
"days_before": 1,
"send_at_date": "2026-10-20T09:00:00Z"
}
],
"depends_on_task_ids": [
123
],
"dependency_mode": "and",
"target_role": "all",
"target_minors_only": false,
"target_guardians_only": false,
"target_tags_include": [
"<string>"
],
"target_tags_exclude": [
"<string>"
]
}
'import requests
url = "https://api.gratona.com/v1/admin/trips/{tripId}/tasks/{taskId}"
payload = {
"title": "Follow up with trip participants",
"task_type": "standard",
"document_path": "<string>",
"document_name": "<string>",
"description": "Please review the updated trip details.",
"due_date": "2026-10-20T09:00:00Z",
"is_required": False,
"requires_document": False,
"requires_approval": False,
"depends_on_task_id": 1,
"sort_order": 1,
"reminder_days_before": 1,
"reminders": [
{
"days_before": 1,
"send_at_date": "2026-10-20T09:00:00Z"
}
],
"depends_on_task_ids": [123],
"dependency_mode": "and",
"target_role": "all",
"target_minors_only": False,
"target_guardians_only": False,
"target_tags_include": ["<string>"],
"target_tags_exclude": ["<string>"]
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.put(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PUT',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
title: 'Follow up with trip participants',
task_type: 'standard',
document_path: '<string>',
document_name: '<string>',
description: 'Please review the updated trip details.',
due_date: '2026-10-20T09:00:00Z',
is_required: false,
requires_document: false,
requires_approval: false,
depends_on_task_id: 1,
sort_order: 1,
reminder_days_before: 1,
reminders: [{days_before: 1, send_at_date: '2026-10-20T09:00:00Z'}],
depends_on_task_ids: [123],
dependency_mode: 'and',
target_role: 'all',
target_minors_only: false,
target_guardians_only: false,
target_tags_include: ['<string>'],
target_tags_exclude: ['<string>']
})
};
fetch('https://api.gratona.com/v1/admin/trips/{tripId}/tasks/{taskId}', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.gratona.com/v1/admin/trips/{tripId}/tasks/{taskId}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "PUT",
CURLOPT_POSTFIELDS => json_encode([
'title' => 'Follow up with trip participants',
'task_type' => 'standard',
'document_path' => '<string>',
'document_name' => '<string>',
'description' => 'Please review the updated trip details.',
'due_date' => '2026-10-20T09:00:00Z',
'is_required' => false,
'requires_document' => false,
'requires_approval' => false,
'depends_on_task_id' => 1,
'sort_order' => 1,
'reminder_days_before' => 1,
'reminders' => [
[
'days_before' => 1,
'send_at_date' => '2026-10-20T09:00:00Z'
]
],
'depends_on_task_ids' => [
123
],
'dependency_mode' => 'and',
'target_role' => 'all',
'target_minors_only' => false,
'target_guardians_only' => false,
'target_tags_include' => [
'<string>'
],
'target_tags_exclude' => [
'<string>'
]
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"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 := "https://api.gratona.com/v1/admin/trips/{tripId}/tasks/{taskId}"
payload := strings.NewReader("{\n \"title\": \"Follow up with trip participants\",\n \"task_type\": \"standard\",\n \"document_path\": \"<string>\",\n \"document_name\": \"<string>\",\n \"description\": \"Please review the updated trip details.\",\n \"due_date\": \"2026-10-20T09:00:00Z\",\n \"is_required\": false,\n \"requires_document\": false,\n \"requires_approval\": false,\n \"depends_on_task_id\": 1,\n \"sort_order\": 1,\n \"reminder_days_before\": 1,\n \"reminders\": [\n {\n \"days_before\": 1,\n \"send_at_date\": \"2026-10-20T09:00:00Z\"\n }\n ],\n \"depends_on_task_ids\": [\n 123\n ],\n \"dependency_mode\": \"and\",\n \"target_role\": \"all\",\n \"target_minors_only\": false,\n \"target_guardians_only\": false,\n \"target_tags_include\": [\n \"<string>\"\n ],\n \"target_tags_exclude\": [\n \"<string>\"\n ]\n}")
req, _ := http.NewRequest("PUT", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
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.put("https://api.gratona.com/v1/admin/trips/{tripId}/tasks/{taskId}")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"title\": \"Follow up with trip participants\",\n \"task_type\": \"standard\",\n \"document_path\": \"<string>\",\n \"document_name\": \"<string>\",\n \"description\": \"Please review the updated trip details.\",\n \"due_date\": \"2026-10-20T09:00:00Z\",\n \"is_required\": false,\n \"requires_document\": false,\n \"requires_approval\": false,\n \"depends_on_task_id\": 1,\n \"sort_order\": 1,\n \"reminder_days_before\": 1,\n \"reminders\": [\n {\n \"days_before\": 1,\n \"send_at_date\": \"2026-10-20T09:00:00Z\"\n }\n ],\n \"depends_on_task_ids\": [\n 123\n ],\n \"dependency_mode\": \"and\",\n \"target_role\": \"all\",\n \"target_minors_only\": false,\n \"target_guardians_only\": false,\n \"target_tags_include\": [\n \"<string>\"\n ],\n \"target_tags_exclude\": [\n \"<string>\"\n ]\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.gratona.com/v1/admin/trips/{tripId}/tasks/{taskId}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Put.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"title\": \"Follow up with trip participants\",\n \"task_type\": \"standard\",\n \"document_path\": \"<string>\",\n \"document_name\": \"<string>\",\n \"description\": \"Please review the updated trip details.\",\n \"due_date\": \"2026-10-20T09:00:00Z\",\n \"is_required\": false,\n \"requires_document\": false,\n \"requires_approval\": false,\n \"depends_on_task_id\": 1,\n \"sort_order\": 1,\n \"reminder_days_before\": 1,\n \"reminders\": [\n {\n \"days_before\": 1,\n \"send_at_date\": \"2026-10-20T09:00:00Z\"\n }\n ],\n \"depends_on_task_ids\": [\n 123\n ],\n \"dependency_mode\": \"and\",\n \"target_role\": \"all\",\n \"target_minors_only\": false,\n \"target_guardians_only\": false,\n \"target_tags_include\": [\n \"<string>\"\n ],\n \"target_tags_exclude\": [\n \"<string>\"\n ]\n}"
response = http.request(request)
puts response.read_body{
"message": "Saved successfully.",
"data": {
"title": "<string>",
"task_type": "standard",
"document_path": "<string>",
"document_name": "<string>",
"description": "<string>",
"due_date": "2023-11-07T05:31:56Z",
"is_required": true,
"requires_document": true,
"requires_approval": true,
"depends_on_task_id": 123,
"sort_order": 1,
"reminder_days_before": 0,
"reminders": [
{
"days_before": 0,
"send_at_date": "2023-11-07T05:31:56Z"
}
],
"depends_on_task_ids": [
123
],
"dependency_mode": "and",
"target_role": "all",
"target_minors_only": true,
"target_guardians_only": true,
"target_tags_include": [
"<string>"
],
"target_tags_exclude": [
"<string>"
],
"id": 123,
"trip_id": 123,
"document_url": "<string>",
"created_at": "2023-11-07T05:31:56Z",
"updated_at": "2023-11-07T05:31:56Z",
"completion_count": 123,
"total_participants": 123,
"completion_percent": 123,
"depends_on_task": {
"id": 123,
"title": "<string>"
},
"target_tags": [
{
"id": 123,
"trip_task_id": 123,
"tag": "<string>",
"mode": "<string>",
"created_at": "2023-11-07T05:31:56Z",
"updated_at": "2023-11-07T05:31:56Z"
}
]
}
}{
"message": "Unauthorized",
"status": "error"
}{
"message": "Something went wrong. Please try again.",
"status": "error",
"error": "invalid_request",
"code": "DONOR_NOT_FOUND"
}{
"message": "Not Found",
"status": "error"
}{
"errors": {},
"status": "error",
"message": "The given data was invalid."
}Authorizations
bearerAuthapiKeyAuth
Path Parameters
Body
application/json
Request fields accepted by this operation. Omitted optional properties retain the behavior described above.
⌘I
Update a trip task
curl --request PUT \
--url https://api.gratona.com/v1/admin/trips/{tripId}/tasks/{taskId} \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"title": "Follow up with trip participants",
"task_type": "standard",
"document_path": "<string>",
"document_name": "<string>",
"description": "Please review the updated trip details.",
"due_date": "2026-10-20T09:00:00Z",
"is_required": false,
"requires_document": false,
"requires_approval": false,
"depends_on_task_id": 1,
"sort_order": 1,
"reminder_days_before": 1,
"reminders": [
{
"days_before": 1,
"send_at_date": "2026-10-20T09:00:00Z"
}
],
"depends_on_task_ids": [
123
],
"dependency_mode": "and",
"target_role": "all",
"target_minors_only": false,
"target_guardians_only": false,
"target_tags_include": [
"<string>"
],
"target_tags_exclude": [
"<string>"
]
}
'import requests
url = "https://api.gratona.com/v1/admin/trips/{tripId}/tasks/{taskId}"
payload = {
"title": "Follow up with trip participants",
"task_type": "standard",
"document_path": "<string>",
"document_name": "<string>",
"description": "Please review the updated trip details.",
"due_date": "2026-10-20T09:00:00Z",
"is_required": False,
"requires_document": False,
"requires_approval": False,
"depends_on_task_id": 1,
"sort_order": 1,
"reminder_days_before": 1,
"reminders": [
{
"days_before": 1,
"send_at_date": "2026-10-20T09:00:00Z"
}
],
"depends_on_task_ids": [123],
"dependency_mode": "and",
"target_role": "all",
"target_minors_only": False,
"target_guardians_only": False,
"target_tags_include": ["<string>"],
"target_tags_exclude": ["<string>"]
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.put(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PUT',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
title: 'Follow up with trip participants',
task_type: 'standard',
document_path: '<string>',
document_name: '<string>',
description: 'Please review the updated trip details.',
due_date: '2026-10-20T09:00:00Z',
is_required: false,
requires_document: false,
requires_approval: false,
depends_on_task_id: 1,
sort_order: 1,
reminder_days_before: 1,
reminders: [{days_before: 1, send_at_date: '2026-10-20T09:00:00Z'}],
depends_on_task_ids: [123],
dependency_mode: 'and',
target_role: 'all',
target_minors_only: false,
target_guardians_only: false,
target_tags_include: ['<string>'],
target_tags_exclude: ['<string>']
})
};
fetch('https://api.gratona.com/v1/admin/trips/{tripId}/tasks/{taskId}', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.gratona.com/v1/admin/trips/{tripId}/tasks/{taskId}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "PUT",
CURLOPT_POSTFIELDS => json_encode([
'title' => 'Follow up with trip participants',
'task_type' => 'standard',
'document_path' => '<string>',
'document_name' => '<string>',
'description' => 'Please review the updated trip details.',
'due_date' => '2026-10-20T09:00:00Z',
'is_required' => false,
'requires_document' => false,
'requires_approval' => false,
'depends_on_task_id' => 1,
'sort_order' => 1,
'reminder_days_before' => 1,
'reminders' => [
[
'days_before' => 1,
'send_at_date' => '2026-10-20T09:00:00Z'
]
],
'depends_on_task_ids' => [
123
],
'dependency_mode' => 'and',
'target_role' => 'all',
'target_minors_only' => false,
'target_guardians_only' => false,
'target_tags_include' => [
'<string>'
],
'target_tags_exclude' => [
'<string>'
]
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"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 := "https://api.gratona.com/v1/admin/trips/{tripId}/tasks/{taskId}"
payload := strings.NewReader("{\n \"title\": \"Follow up with trip participants\",\n \"task_type\": \"standard\",\n \"document_path\": \"<string>\",\n \"document_name\": \"<string>\",\n \"description\": \"Please review the updated trip details.\",\n \"due_date\": \"2026-10-20T09:00:00Z\",\n \"is_required\": false,\n \"requires_document\": false,\n \"requires_approval\": false,\n \"depends_on_task_id\": 1,\n \"sort_order\": 1,\n \"reminder_days_before\": 1,\n \"reminders\": [\n {\n \"days_before\": 1,\n \"send_at_date\": \"2026-10-20T09:00:00Z\"\n }\n ],\n \"depends_on_task_ids\": [\n 123\n ],\n \"dependency_mode\": \"and\",\n \"target_role\": \"all\",\n \"target_minors_only\": false,\n \"target_guardians_only\": false,\n \"target_tags_include\": [\n \"<string>\"\n ],\n \"target_tags_exclude\": [\n \"<string>\"\n ]\n}")
req, _ := http.NewRequest("PUT", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
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.put("https://api.gratona.com/v1/admin/trips/{tripId}/tasks/{taskId}")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"title\": \"Follow up with trip participants\",\n \"task_type\": \"standard\",\n \"document_path\": \"<string>\",\n \"document_name\": \"<string>\",\n \"description\": \"Please review the updated trip details.\",\n \"due_date\": \"2026-10-20T09:00:00Z\",\n \"is_required\": false,\n \"requires_document\": false,\n \"requires_approval\": false,\n \"depends_on_task_id\": 1,\n \"sort_order\": 1,\n \"reminder_days_before\": 1,\n \"reminders\": [\n {\n \"days_before\": 1,\n \"send_at_date\": \"2026-10-20T09:00:00Z\"\n }\n ],\n \"depends_on_task_ids\": [\n 123\n ],\n \"dependency_mode\": \"and\",\n \"target_role\": \"all\",\n \"target_minors_only\": false,\n \"target_guardians_only\": false,\n \"target_tags_include\": [\n \"<string>\"\n ],\n \"target_tags_exclude\": [\n \"<string>\"\n ]\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.gratona.com/v1/admin/trips/{tripId}/tasks/{taskId}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Put.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"title\": \"Follow up with trip participants\",\n \"task_type\": \"standard\",\n \"document_path\": \"<string>\",\n \"document_name\": \"<string>\",\n \"description\": \"Please review the updated trip details.\",\n \"due_date\": \"2026-10-20T09:00:00Z\",\n \"is_required\": false,\n \"requires_document\": false,\n \"requires_approval\": false,\n \"depends_on_task_id\": 1,\n \"sort_order\": 1,\n \"reminder_days_before\": 1,\n \"reminders\": [\n {\n \"days_before\": 1,\n \"send_at_date\": \"2026-10-20T09:00:00Z\"\n }\n ],\n \"depends_on_task_ids\": [\n 123\n ],\n \"dependency_mode\": \"and\",\n \"target_role\": \"all\",\n \"target_minors_only\": false,\n \"target_guardians_only\": false,\n \"target_tags_include\": [\n \"<string>\"\n ],\n \"target_tags_exclude\": [\n \"<string>\"\n ]\n}"
response = http.request(request)
puts response.read_body{
"message": "Saved successfully.",
"data": {
"title": "<string>",
"task_type": "standard",
"document_path": "<string>",
"document_name": "<string>",
"description": "<string>",
"due_date": "2023-11-07T05:31:56Z",
"is_required": true,
"requires_document": true,
"requires_approval": true,
"depends_on_task_id": 123,
"sort_order": 1,
"reminder_days_before": 0,
"reminders": [
{
"days_before": 0,
"send_at_date": "2023-11-07T05:31:56Z"
}
],
"depends_on_task_ids": [
123
],
"dependency_mode": "and",
"target_role": "all",
"target_minors_only": true,
"target_guardians_only": true,
"target_tags_include": [
"<string>"
],
"target_tags_exclude": [
"<string>"
],
"id": 123,
"trip_id": 123,
"document_url": "<string>",
"created_at": "2023-11-07T05:31:56Z",
"updated_at": "2023-11-07T05:31:56Z",
"completion_count": 123,
"total_participants": 123,
"completion_percent": 123,
"depends_on_task": {
"id": 123,
"title": "<string>"
},
"target_tags": [
{
"id": 123,
"trip_task_id": 123,
"tag": "<string>",
"mode": "<string>",
"created_at": "2023-11-07T05:31:56Z",
"updated_at": "2023-11-07T05:31:56Z"
}
]
}
}{
"message": "Unauthorized",
"status": "error"
}{
"message": "Something went wrong. Please try again.",
"status": "error",
"error": "invalid_request",
"code": "DONOR_NOT_FOUND"
}{
"message": "Not Found",
"status": "error"
}{
"errors": {},
"status": "error",
"message": "The given data was invalid."
}