Task V2

Task V2 represents an updated version of the Task object and is the recommended standard for future use. To enable Task V2, the API request payload must include a compatibility section specifying TaskObject version 2.0:

"Compatibility": { "TaskObject": "2.0" }

All of the existing properties and operations of Task are compatible with Task V2.

HowTo's

Complete tasks that are part of a workflow

1 - Validate task before completion

// POST https://api.maximizer.com/octopus/Validate
// Authorization: Bearer <token>
//  Use the Task/Validate endpoint before completing a task. If the task belongs to a workflow, is the last task required to complete that workflow, is being completed in this request, and the workflow has branch actions configured, the response will mark Options["Workflow/Result"] as mandatory.
//  The client should then include that option in the subsequent Update request to provide the workflow result required for branching.
{
    "Task": {
        "Data": {
            "Key": "VGFzawkxMjg0",
            "Completed": true
        }
    },
    "Compatibility": {
        "TaskObject": "2.0"
    }
}

Example: Mandatory response example

// Request →
// POST https://api.maximizer.com/octopus/Validate
// Authorization: Bearer <token>
{
    "Task": {
        "Data": {
            "Key": "VGFzawkxMjg0", // Last task in a workflow that has branch actions 
            "Completed": true // Task is being completed
        }
    },
    "Compatibility": {
        "TaskObject": "2.0"
    }
}
// Response ←
{
    "Code": 0,
    "Task": {
        "Data": {
            "Key": "VGFzawkxMjg0",
            "Completed": true
        },
        "Validation": {
            "Options": {
                "Workflow/Result": {
                    "Mandatory": true
                }
            }
        }
    }
}

2 - Read available workflow/result for task

// POST https://api.maximizer.com/octopus/Read
// Authorization: Bearer <token>
//  Use Task FieldOptions to retrieve the valid Options["Workflow/Result"] values for a workflow task. If the task belongs to a workflow with branch actions configured, the response will return the workflow result values defined in those branch actions.
//  This helper is exposed at the Task level for simplicity, because the value is needed when completing the final task in the workflow.
{
    "Task": {
        "FieldOptions": {
            "Options": {
                "Workflow/Result": [
                    {
                        "Value": 1,
                        "DisplayValue": 1
                    }
                ]
            }
        },
        "Data": {
            "Key": "VGFzawkxMjg0"
        }
    },
    "Compatibility": {
        "TaskObject": "2.0"
    }
}

Example: Response example

// Request →
// POST https://api.maximizer.com/octopus/Read
// Authorization: Bearer <token>
{
    "Task": {
        "FieldOptions": {
            "Options": {
                "Workflow/Result": [
                    {
                        "Value": 1,
                        "DisplayValue": 1
                    }
                ]
            }
        },
        "Data": {
            "Key": "VGFzawkxMjg0"
        }
    },
    "Compatibility": {
        "TaskObject": "2.0"
    }
}
// Response ←
{
    "Code": 0,
    "Task": {
        "FieldOptions": {
            "Options": {
                "Workflow/Result": [
                    {
                        "Value": "A new policy is needed",
                        "DisplayValue": "A new policy is needed"
                    },
                    {
                        "Value": "Policy was canceled",
                        "DisplayValue": "Policy was canceled"
                    }
                ]
            }
        }
    }
}

3 - Update task with workflow/result

// POST https://api.maximizer.com/octopus/Update
// Authorization: Bearer <token>
{
    "Task": {
        "Data": {
            "Key": "VGFzawkxMjkx",
            "Completed": true
        },
        "Options": {
            "Workflow/Result": "Policy was canceled"
        }
    },
    "Compatibility": {
        "TaskObject": "2.0"
    }
}

Example: No workflow/result provided example

// Request →
// POST https://api.maximizer.com/octopus/Update
// Authorization: Bearer <token>
{
    "Task": {
        "Data": {
            "Key": "VGFzawkxMjkx",
            "Completed": true
        }
    },
    "Compatibility": {
        "TaskObject": "2.0"
    }
}
// Response ←
{
    "Code": -1,
    "Msg": [
        {
            "Message": "Task: failed to validate update to Task. Workflow/Result is mandatory",
            "ErrorCode": -10003
        }
    ]
}

Example: Invalid workflow/result example

// Request →
// POST https://api.maximizer.com/octopus/Update
// Authorization: Bearer <token>
{
    "Task": {
        "Data": {
            "Key": "VGFzawkxMjkx",
            "Completed": true
        },
        "Options": {
            "Workflow/Result": "Some invalid result"
        }
    },
    "Compatibility": {
        "TaskObject": "2.0"
    }
}
// Response ←
{
    "Code": -1,
    "Msg": [
        {
            "Message": "Task: failed to validate new Task. Workflow/Result does not match any configured branch action",
            "ErrorCode": -60054
        }
    ]
}

Example: Successful response example

// Request →
// POST https://api.maximizer.com/octopus/Update
// Authorization: Bearer <token>
{
    "Task": {
        "Data": {
            "Key": "VGFzawkxMjkx",
            "Completed": true
        },
        "Options": {
            "Workflow/Result": "Policy was canceled"
        }
    },
    "Compatibility": {
        "TaskObject": "2.0"
    }
}
// Response ←
{
    "Code": 0,
    "Task": {
        "Data": {
            "Key": "VGFzawkxMjkx",
            "Completed": true
        }
    }
}

Create - Recurring Task - Daily

// POST https://api.maximizer.com/octopus/Create
// Authorization: Bearer <token>
{
    "Task": {
        "Data": {
            "Key": null,
            "Activity": "Daily Recurring Task",
            "DateTime": "2026-05-06",
            "IconType": 0,
            "AssignedTo": {
                "Uid": "MASTER"
            },
            "Recurrence": {
                "Pattern": {
                    "Type": "daily",
                    "Interval": 1, // indicates the number of units between each occurrence based on pattern type
                    "Regenerating": true
                },
                "Range": {
                    "StartDate": "2026-05-06"
                }
            },
            "Completed": false
        }
    },
    "Compatibility": {
        "TaskObject": "2.0"
    },
    "Globalization": {
        "TimeZone": "$CURRENTUSER()",
        "TimeZoneDesignator": true
    }
}

Create - Recurring Task - Daily (skip weekends)

// POST https://api.maximizer.com/octopus/Create
// Authorization: Bearer <token>
{
    "Task": {
        "Data": {
            "Key": null,
            "Activity": "Daily Recurring Task (Skip Weekends)",
            "DateTime": "2026-05-06",
            "IconType": 0,
            "AssignedTo": "VXNlcglNQVNURVI=",
            "Recurrence": {
                "Pattern": {
                    "Type": "weekly",
                    "Interval": 1,
                    "DaysOfWeek": [
                        "monday",
                        "tuesday",
                        "wednesday",
                        "thursday",
                        "friday"
                    ],
                    "FirstDayOfWeek": "sunday",
                    "Regenerating": true
                },
                "Range": {
                    "StartDate": "2026-05-06"
                }
            },
            "Completed": false
        }
    },
    "Compatibility": {
        "TaskObject": "2.0"
    },
    "Globalization": {
        "TimeZone": "$CURRENTUSER()",
        "TimeZoneDesignator": true
    }
}

Create - Recurring Task - Weekly

// POST https://api.maximizer.com/octopus/Create
// Authorization: Bearer <token>
{
    "Task": {
        "Data": {
            "Key": null,
            "Activity": "Weekly Recurring Task",
            "DateTime": "2026-05-06",
            "Alarm": null,
            "Priority": null,
            "IconType": 0,
            "Category": null,
            "Result": null,
            "AssignedTo": "VXNlcglNQVNURVI=",
            "Recurrence": {
                "Key": null,
                "Pattern": {
                    "Type": "weekly",
                    "Interval": 1, // indicates the number of units between each occurrence based on pattern type
                    "DaysOfWeek": [
                        "monday"
                    ],
                    "FirstDayOfWeek": "sunday",
                    "Regenerating": true
                },
                "Range": {
                    "StartDate": "2026-05-06"
                }
            },
            "Completed": false,
            "LeadKey": null,
            "AbEntryKey": null,
            "WithKey": null
        }
    },
    "Compatibility": {
        "TaskObject": "2.0"
    },
    "Globalization": {
        "TimeZone": "$CURRENTUSER()",
        "TimeZoneDesignator": true
    }
}

Create - Recurring Task - Monthly

// POST https://api.maximizer.com/octopus/Create
// Authorization: Bearer <token>
{
    "Task": {
        "Data": {
            "Key": null,
            "Activity": "Monthly Recurring Task",
            "DateTime": "2026-05-06",
            "IconType": 0,
            "AssignedTo": "VXNlcglNQVNURVI=",
            "Recurrence": {
                "Key": null,
                "Pattern": {
                    "Type": "absoluteMonthly",
                    "Interval": 1, // indicates the number of units between each occurrence based on pattern type
                    "DayOfMonth": 5,
                    "Regenerating": true
                },
                "Range": {
                    "StartDate": "2026-05-06"
                }
            },
            "Completed": false
        }
    },
    "Compatibility": {
        "TaskObject": "2.0"
    },
    "Globalization": {
        "TimeZone": "$CURRENTUSER()",
        "TimeZoneDesignator": true
    }
}

Create - Recurring Task - Yearly

// POST https://api.maximizer.com/octopus/Create
// Authorization: Bearer <token>
{
    "Task": {
        "Data": {
            "Key": null,
            "Activity": "Yearly Recurring Task",
            "DateTime": "2026-05-06",
            "Alarm": null,
            "Priority": null,
            "IconType": 0,
            "Category": null,
            "Result": null,
            "AssignedTo": "VXNlcglNQVNURVI=",
            "Recurrence": {
                "Key": null,
                "Pattern": {
                    "Type": "absoluteYearly",
                    "Interval": 1, // indicates the number of units between each occurrence based on pattern type
                    "Month": 5,
                    "DayOfMonth": 6,
                    "Regenerating": true
                },
                "Range": {
                    "StartDate": "2026-05-06"
                }
            },
            "Completed": false,
            "LeadKey": null,
            "AbEntryKey": null,
            "WithKey": null
        }
    },
    "Compatibility": {
        "TaskObject": "2.0"
    },
    "Globalization": {
        "TimeZone": "$CURRENTUSER()",
        "TimeZoneDesignator": true
    }
}

Read - Recurring Task occurrence in series

// POST https://api.maximizer.com/octopus/Read
// Authorization: Bearer <token>
{
    "Compatibility": {
        "TaskObject": "2.0"
    },
    "Task": {
        "Criteria": {
            "SearchQuery": {
                "RecurrenceKey": {
                    "$EQ": "UmVjdXJyZW5jZVRhc2sJMjI=" // pass the recurrence key
                }
            }
        },
        "Scope": {
            "Fields": {
                "Key": 1,
                "Activity": 1,
                "DateTime": 1,
                "Recurrence": {
                    "Key": 1,
                    "Pattern": {
                        "Type": 1,
                        "Interval": 1
                    },
                    "Range": {
                        "StartDate": 1
                    }
                },
                "RecurrenceType": {
                    "DisplayValue": 1
                },
                "Completed": 1,
                "CompletionDate": 1,
                "CompletedBy": 1
            }
        }
    }
}

Read - Recurring Task thru Activity

// POST https://api.maximizer.com/octopus/Read
// Authorization: Bearer <token>
{
    "Activity": {
        "Scope": {
            "Fields": {
                "Key": 1,
                "RecurrenceKey": 1,
                "RecurrenceType": {
                    "Value": 1,
                    "DisplayValue": 1
                }
            }
        },
        "Criteria": {
            "SearchQuery": {
                "$AND": [
                    {
                        "RecurrenceKey": {
                            "$EQ": "UmVjdXJyZW5jZVRhc2sJMjI="
                        }
                    }
                ]
            }
        }
    }
}

Update - Set New Recurring Task pattern

// POST https://api.maximizer.com/octopus/Update
// Authorization: Bearer <token>
{
    "Compatibility": {
        "TaskObject": "2.0"
    },
    "Task": {
        "Data": {
            "Key": "VGFzawkyNjA1MDYwMDAwMDAwMDUzNTAzNzIwVAkw",
            "Recurrence": {
                "Key": "UmVjdXJyZW5jZVRhc2sJMTk=",
                "Pattern": {
                    "Type": "weekly",
                    "Interval": 1,
                    "DaysOfWeek": [
                        "monday",
                        "wednesday",
                        "friday"
                    ],
                    "FirstDayOfWeek": "sunday",
                    "Regenerating": true
                },
                "Range": {
                    "StartDate": "2026-05-06"
                }
            }
        }
    }
}

Update - Remove Recurring Task pattern

// POST https://api.maximizer.com/octopus/Update
// Authorization: Bearer <token>
{
    "Compatibility": {
        "TaskObject": "2.0"
    },
    "Task": {
        "Data": {
            "Key": "VGFzawkyNjA1MDYwMDAwMDAwMDU3MzgwMzAwVAkw",
            "Recurrence": null
        }
    }
}

Update - Complete Task

// POST https://api.maximizer.com/octopus/Update
// Authorization: Bearer <token>
{
    "Compatibility": {
        "TaskObject": "2.0"
    },
    "Task": {
        "Data": {
            "Key": "VGFzawkyNjA1MDYwMDAwMDAwMDU2NTA1MjkwVAkw",
            "Completed": true
        }
    }
}

MetaData

Read Task V2 metadata (simple)

// POST https://api.maximizer.com/octopus/Read
// Authorization: Bearer <token>
{
    "Schema": {
        "Scope": {
            "Fields": 1
        },
        "Criteria": {
            "SearchQuery": {
                "Key": {
                    "$TREE": "/Task"
                }
            }
        }
    },
    "Compatibility": {
        "SchemaObject": "1.0",
        "TaskObject": "2.0"
    }
}

Read Task V2 metadata (more)

// POST https://api.maximizer.com/octopus/Read
// Authorization: Bearer <token>
{
    "Schema": {
        "Scope": {
            "Fields": {
                "Key": 1,
                "Alias": 1,
                "Type": 1,
                "Name": 1,
                "AppliesTo": 1,
                "Sortable": 1,
                "Queryable": 1,
                "Mandatory": 1,
                "Attributes": 1,
                "DisplayValue": 1
            }
        },
        "Criteria": {
            "SearchQuery": {
                "Key": {
                    "$TREE": "/Task"
                }
            }
        }
    },
    "Compatibility": {
        "SchemaObject": "1.0",
        "TaskObject": "2.0"
    }
}

FieldOptions

Read Task V2 Field Options

// POST https://api.maximizer.com/octopus/Read
// Authorization: Bearer <token>
{
    "Task": {
        "FieldOptions": {
            "Status": [
                {
                    "Key": 1,
                    "Value": 1,
                    "DisplayValue": 1
                }
            ],
            "Subject": [
                {
                    "Key": 1,
                    "Value": 1,
                    "DisplayValue": 1
                }
            ],
            "CompletedBy": [
                {
                    "Key": 1,
                    "DisplayValue": 1
                }
            ]
        },
        "Options": {
            "IncludeDisabled": false
        }
    },
    "Compatibility": {
        "SchemaObject": "1.0",
        "TaskObject": "2.0"
    }
}

Task V2 CRUD

Create - Task V2

// POST https://api.maximizer.com/octopus/Create
// Authorization: Bearer <token>
{
    "Task": {
        "Data": {
            "Key": null,
            "AbEntryKey": "QWJFbnRyeQkyMjA1MDUyNTIyMjczODY2NDAwMjlDCTE=",
            "DateTime": "2019-01-01",
            "Alarm": "2019-01-01",
            "SnoozeUntil": "2019-01-01",
            "Priority": "Hi",
            "Completed": false,
            "IconType": 1,
            "Activity": "Test Task Description",
            "AssignedTo": {
                "Uid": "MASTER"
            },
            "Status": "60002",
            "ActionPlanKey": "QWN0aW9uUGxhbgkyMTAyMjQyNTAxMjQyNDM4MzAwMDlQCTg="
        },
        "Options": {
            "ReadAfterSave": true
        }
    },
    "Compatibility": {
        "AbEntryKey": "2.0",
        "TaskObject": "2.0"
    }
}

Read - Task V2

// POST https://api.maximizer.com/octopus/Read
// Authorization: Bearer <token>
{
    "Task": {
        "Scope": {
            "Fields": {
                "Key": 1,
                "AssignedTo": {
                    "UID": 1
                },
                "DateTime": 1,
                "Alarm": 1,
                "SnoozeUntil": 1,
                "Priority": 1,
                "Completed": 1,
                "IconType": 1,
                "Activity": 1,
                "Status": 1,
                "AbEntryKey": 1,
                "LeadKey": 1,
                "WorkflowKey": 1,
                "WorkflowTaskTemplateKey": 1,
                "WorkflowInstanceKey": 1
            }
        },
        "Criteria": {
            "SearchQuery": {
                "Key": {
                    "$EQ": "VGFzawkzOA=="
                }
            }
        }
    },
    "Compatibility": {
        "AbEntryKey": "2.0",
        "TaskObject": "2.0"
    }
}

Update - Task V2

// POST https://api.maximizer.com/octopus/Update
// Authorization: Bearer <token>
{
    "Task": {
        "Data": {
            "Key": "Task_v2_key",
            "DateTime": "2019-01-01",
            "SnoozeUntil": "2019-01-01",
            "Priority": "Hi",
            "Completed": true,
            "Activity": "Test Task Description Updated"
        }
    },
    "Compatibility": {
        "TaskObject": "2.0"
    }
}

Delete - Task V2

// POST https://api.maximizer.com/octopus/Delete
// Authorization: Bearer <token>
{
    "Task": {
        "Data": {
            "Key": "Task_v2_key"
        }
    },
    "Compatibility": {
        "TaskObject": "2.0"
    }
}