POST v2/tasks
Creates a new task.
Request Information
URI Parameters
None.
Body Parameters
TaskCreateParametersName | Description | Type | Additional information |
---|---|---|---|
Title | string |
Required |
|
Type |
Task Type accepts id or name. If both are provided id takes the precedence. |
IdNamePair |
None. |
Priority |
Task Priority accepts id or name. If both are provided id takes the precedence. |
IdNamePair |
None. |
Customer |
Customer to be associated with the task. Accepts id, number or name. If all of them are provided, id takes the first precedence, then the number and then the name. |
CustomerRef |
None. |
Location |
Customer Location to be associated with the task. Location is accepted only if the task type includes location. Accepts id or name. If both are provided id takes the precedence. |
IdNamePair |
None. |
Description | string |
None. |
|
Budget |
Budget is only accepted if the task type includes budget. Budget should be greater than or equal to zero. |
decimal number |
None. |
TaskPercentageComplete |
Task completed percentage is only accepted if the task type includes budget. |
decimal number |
Range: inclusive between 0 and 100 |
StartDateTime |
Start date is only accepted if the task type includes start date. Accepts time part if the task type includes time for start date. Date and time will be accepted in ISO 8601 format. |
date |
None. |
DueDateTime |
Time part for due date is accepted only if the task type includes time for due date. Date and time will be accepted in ISO 8601 format. |
date |
None. |
SalesOrder |
Sales Order to be associated with the task. Accepts id, number or name. If all of them are provided, id takes the first precedence, then the number and then the name. |
SalesOrderRef |
None. |
Project |
Project to be associated with the task, accepts id or name. If both are provided id takes the precedence. |
IdNamePair |
None. |
Milestone |
Milestone to be associated with the task, accepts id or name. If both are provided id takes the precedence. |
IdNamePair |
None. |
RequestedBy |
Requested By is only accepted if the task type includes requested by. |
TaskRequestedBy |
None. |
Assignments |
List of Assignments. |
Collection of TaskAssignment |
None. |
UseSubContractor |
Accepts only if the task type can be a subcontracted work. |
boolean |
None. |
PurchaseOrder |
Purchase Order to be associated with the task. Accepts id, number or name. If all of them are provided, id takes the first precedence, then the number and then the name. |
PurchaseOrderRef |
None. |
Request Formats
application/json, text/json
{ "title": "sample string 1", "type": { "id": 1, "name": "sample string 2" }, "priority": { "id": 1, "name": "sample string 2" }, "customer": { "id": 1, "number": "sample string 2", "name": "sample string 3" }, "location": { "id": 1, "name": "sample string 2" }, "description": "sample string 2", "budget": 3.0, "taskPercentageComplete": 4.0, "startDateTime": "2024-04-26T03:32:16-04:00", "dueDateTime": "2024-04-26T03:32:16-04:00", "salesOrder": { "id": 1, "number": "sample string 2", "name": "sample string 3" }, "project": { "id": 1, "name": "sample string 2" }, "milestone": { "id": 1, "name": "sample string 2" }, "requestedBy": { "id": 1, "name": "sample string 2", "type": "sample string 3" }, "assignments": [ { "id": 1, "name": "sample string 2", "type": "sample string 3" }, { "id": 1, "name": "sample string 2", "type": "sample string 3" } ], "useSubContractor": true, "purchaseOrder": { "id": 1, "number": "sample string 2", "name": "sample string 3" } }
application/xml, text/xml
<TaskCreateParameters xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.datacontract.org/2004/07/BAPI.Models.V2.Tasks"> <Assignments> <TaskAssignment> <Id>1</Id> <Name>sample string 2</Name> <Type>sample string 3</Type> </TaskAssignment> <TaskAssignment> <Id>1</Id> <Name>sample string 2</Name> <Type>sample string 3</Type> </TaskAssignment> </Assignments> <Budget>3</Budget> <Customer xmlns:d2p1="http://schemas.datacontract.org/2004/07/BBM.BLL.Core"> <d2p1:Id>1</d2p1:Id> <d2p1:Name>sample string 3</d2p1:Name> <d2p1:Number>sample string 2</d2p1:Number> </Customer> <Description>sample string 2</Description> <DueDateTime xmlns:d2p1="http://schemas.datacontract.org/2004/07/System"> <d2p1:DateTime>2024-04-26T07:32:16.6046604Z</d2p1:DateTime> <d2p1:OffsetMinutes>-240</d2p1:OffsetMinutes> </DueDateTime> <Location xmlns:d2p1="http://schemas.datacontract.org/2004/07/Striven.Common.Models"> <d2p1:_x003C_Id_x003E_k__BackingField>1</d2p1:_x003C_Id_x003E_k__BackingField> <d2p1:_x003C_Name_x003E_k__BackingField>sample string 2</d2p1:_x003C_Name_x003E_k__BackingField> </Location> <Milestone xmlns:d2p1="http://schemas.datacontract.org/2004/07/Striven.Common.Models"> <d2p1:_x003C_Id_x003E_k__BackingField>1</d2p1:_x003C_Id_x003E_k__BackingField> <d2p1:_x003C_Name_x003E_k__BackingField>sample string 2</d2p1:_x003C_Name_x003E_k__BackingField> </Milestone> <Priority xmlns:d2p1="http://schemas.datacontract.org/2004/07/Striven.Common.Models"> <d2p1:_x003C_Id_x003E_k__BackingField>1</d2p1:_x003C_Id_x003E_k__BackingField> <d2p1:_x003C_Name_x003E_k__BackingField>sample string 2</d2p1:_x003C_Name_x003E_k__BackingField> </Priority> <Project xmlns:d2p1="http://schemas.datacontract.org/2004/07/Striven.Common.Models"> <d2p1:_x003C_Id_x003E_k__BackingField>1</d2p1:_x003C_Id_x003E_k__BackingField> <d2p1:_x003C_Name_x003E_k__BackingField>sample string 2</d2p1:_x003C_Name_x003E_k__BackingField> </Project> <PurchaseOrder xmlns:d2p1="http://schemas.datacontract.org/2004/07/BBM.BLL.Core"> <d2p1:Id>1</d2p1:Id> <d2p1:Name>sample string 3</d2p1:Name> <d2p1:Number>sample string 2</d2p1:Number> </PurchaseOrder> <RequestedBy> <Id>1</Id> <Name>sample string 2</Name> <Type>sample string 3</Type> </RequestedBy> <SalesOrder xmlns:d2p1="http://schemas.datacontract.org/2004/07/BBM.BLL.Core"> <d2p1:Id>1</d2p1:Id> <d2p1:Name>sample string 3</d2p1:Name> <d2p1:Number>sample string 2</d2p1:Number> </SalesOrder> <StartDateTime xmlns:d2p1="http://schemas.datacontract.org/2004/07/System"> <d2p1:DateTime>2024-04-26T07:32:16.6046604Z</d2p1:DateTime> <d2p1:OffsetMinutes>-240</d2p1:OffsetMinutes> </StartDateTime> <TaskPercentageComplete>4</TaskPercentageComplete> <Title>sample string 1</Title> <Type xmlns:d2p1="http://schemas.datacontract.org/2004/07/Striven.Common.Models"> <d2p1:_x003C_Id_x003E_k__BackingField>1</d2p1:_x003C_Id_x003E_k__BackingField> <d2p1:_x003C_Name_x003E_k__BackingField>sample string 2</d2p1:_x003C_Name_x003E_k__BackingField> </Type> <UseSubContractor>true</UseSubContractor> </TaskCreateParameters>
application/x-www-form-urlencoded
Sample not available.
Response Information
Resource Description
TaskDetailName | Description | Type | Additional information |
---|---|---|---|
Id |
Task unique Id - auto generated by the system |
integer |
None. |
Title | string |
None. |
|
Type | IdNamePair |
None. |
|
Status | IdNamePair |
None. |
|
Priority | IdNamePair |
None. |
|
Customer |
Customer associated with the task |
CustomerRef |
None. |
Location |
Customer location associated with the task |
IdNamePair |
None. |
Description | string |
None. |
|
Budget | decimal number |
None. |
|
TaskPercentageComplete | decimal number |
None. |
|
StartDateTime |
Start date and time in ISO 8601 format. |
date |
None. |
DueDateTime |
Due date and time in ISO 8601 format. |
date |
None. |
SalesOrder |
Sales Order associated to the task |
SalesOrderRef |
None. |
Project |
Project associated to the task |
IdNamePair |
None. |
Milestone |
Milestone associated to the task |
IdNamePair |
None. |
RequestedBy | TaskRequestedBy |
None. |
|
InfoCustomFields |
List of task information custom fields related to task type |
Collection of CustomFieldValue |
None. |
MarkDoneCustomFields |
List of custom fields for marking task done |
Collection of CustomFieldValue |
None. |
Assignments |
List of task assignments |
Collection of TaskAssignment |
None. |
Candidates |
List of associated candidates |
Collection of IdNamePair |
None. |
Assets |
List of customer assets |
Collection of IdNamePair |
None. |
UseSubContractor | boolean |
None. |
|
PurchaseOrder |
Purchase order associated to a subcontracted task |
PurchaseOrderRef |
None. |
SubcontractedWorkStatus | IdNamePair |
None. |
|
Labels |
All the labels applied to the task |
Collection of IdNamePair |
None. |
AttachmentCount |
# of attachments task has |
integer |
None. |
DateCreated |
Created date and time will be in ISO 8601 format. |
date |
None. |
CreatedBy | StrivenUser |
None. |
|
DateModified |
Modified date and time will be in ISO 8601 format. |
date |
None. |
ModifiedBy | StrivenUser |
None. |
Response Formats
application/json, text/json
{ "id": 1, "title": "sample string 2", "type": { "id": 1, "name": "sample string 2" }, "status": { "id": 1, "name": "sample string 2" }, "priority": { "id": 1, "name": "sample string 2" }, "customer": { "id": 1, "number": "sample string 2", "name": "sample string 3" }, "location": { "id": 1, "name": "sample string 2" }, "description": "sample string 3", "budget": 4.0, "taskPercentageComplete": 5.0, "startDateTime": "2024-04-26T03:32:16-04:00", "dueDateTime": "2024-04-26T03:32:16-04:00", "salesOrder": { "id": 1, "number": "sample string 2", "name": "sample string 3" }, "project": { "id": 1, "name": "sample string 2" }, "milestone": { "id": 1, "name": "sample string 2" }, "requestedBy": { "id": 1, "name": "sample string 2", "type": "sample string 3" }, "infoCustomFields": [ { "id": 1, "name": "sample string 2", "value": "sample string 3", "valueText": "sample string 4" }, { "id": 1, "name": "sample string 2", "value": "sample string 3", "valueText": "sample string 4" } ], "markDoneCustomFields": [ { "id": 1, "name": "sample string 2", "value": "sample string 3", "valueText": "sample string 4" }, { "id": 1, "name": "sample string 2", "value": "sample string 3", "valueText": "sample string 4" } ], "assignments": [ { "id": 1, "name": "sample string 2", "type": "sample string 3" }, { "id": 1, "name": "sample string 2", "type": "sample string 3" } ], "candidates": [ { "id": 1, "name": "sample string 2" }, { "id": 1, "name": "sample string 2" } ], "assets": [ { "id": 1, "name": "sample string 2" }, { "id": 1, "name": "sample string 2" } ], "useSubContractor": true, "purchaseOrder": { "id": 1, "number": "sample string 2", "name": "sample string 3" }, "subcontractedWorkStatus": { "id": 1, "name": "sample string 2" }, "labels": [ { "id": 1, "name": "sample string 2" }, { "id": 1, "name": "sample string 2" } ], "attachmentCount": 7, "dateCreated": "2024-04-26T03:32:16-04:00", "createdBy": { "id": 1, "name": "sample string 2", "type": "sample string 3" }, "dateModified": "2024-04-26T03:32:16-04:00", "modifiedBy": { "id": 1, "name": "sample string 2", "type": "sample string 3" } }
application/xml, text/xml
<TaskDetail xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.datacontract.org/2004/07/BAPI.Models.V2.Tasks"> <Assets xmlns:d2p1="http://schemas.datacontract.org/2004/07/Striven.Common.Models"> <d2p1:IdNamePair> <d2p1:_x003C_Id_x003E_k__BackingField>1</d2p1:_x003C_Id_x003E_k__BackingField> <d2p1:_x003C_Name_x003E_k__BackingField>sample string 2</d2p1:_x003C_Name_x003E_k__BackingField> </d2p1:IdNamePair> <d2p1:IdNamePair> <d2p1:_x003C_Id_x003E_k__BackingField>1</d2p1:_x003C_Id_x003E_k__BackingField> <d2p1:_x003C_Name_x003E_k__BackingField>sample string 2</d2p1:_x003C_Name_x003E_k__BackingField> </d2p1:IdNamePair> </Assets> <Assignments> <TaskAssignment> <Id>1</Id> <Name>sample string 2</Name> <Type>sample string 3</Type> </TaskAssignment> <TaskAssignment> <Id>1</Id> <Name>sample string 2</Name> <Type>sample string 3</Type> </TaskAssignment> </Assignments> <AttachmentCount>7</AttachmentCount> <Budget>4</Budget> <Candidates xmlns:d2p1="http://schemas.datacontract.org/2004/07/Striven.Common.Models"> <d2p1:IdNamePair> <d2p1:_x003C_Id_x003E_k__BackingField>1</d2p1:_x003C_Id_x003E_k__BackingField> <d2p1:_x003C_Name_x003E_k__BackingField>sample string 2</d2p1:_x003C_Name_x003E_k__BackingField> </d2p1:IdNamePair> <d2p1:IdNamePair> <d2p1:_x003C_Id_x003E_k__BackingField>1</d2p1:_x003C_Id_x003E_k__BackingField> <d2p1:_x003C_Name_x003E_k__BackingField>sample string 2</d2p1:_x003C_Name_x003E_k__BackingField> </d2p1:IdNamePair> </Candidates> <CreatedBy xmlns:d2p1="http://schemas.datacontract.org/2004/07/BAPI.Models.V2.Core"> <d2p1:Id>1</d2p1:Id> <d2p1:Name>sample string 2</d2p1:Name> <d2p1:Type>sample string 3</d2p1:Type> </CreatedBy> <Customer xmlns:d2p1="http://schemas.datacontract.org/2004/07/BBM.BLL.Core"> <d2p1:Id>1</d2p1:Id> <d2p1:Name>sample string 3</d2p1:Name> <d2p1:Number>sample string 2</d2p1:Number> </Customer> <DateCreated xmlns:d2p1="http://schemas.datacontract.org/2004/07/System"> <d2p1:DateTime>2024-04-26T07:32:16.7222614Z</d2p1:DateTime> <d2p1:OffsetMinutes>-240</d2p1:OffsetMinutes> </DateCreated> <DateModified xmlns:d2p1="http://schemas.datacontract.org/2004/07/System"> <d2p1:DateTime>2024-04-26T07:32:16.7222614Z</d2p1:DateTime> <d2p1:OffsetMinutes>-240</d2p1:OffsetMinutes> </DateModified> <Description>sample string 3</Description> <DueDateTime xmlns:d2p1="http://schemas.datacontract.org/2004/07/System"> <d2p1:DateTime>2024-04-26T07:32:16.7222614Z</d2p1:DateTime> <d2p1:OffsetMinutes>-240</d2p1:OffsetMinutes> </DueDateTime> <Id>1</Id> <InfoCustomFields xmlns:d2p1="http://schemas.datacontract.org/2004/07/BAPI.Models.V2.Core"> <d2p1:CustomFieldValue> <d2p1:Id>1</d2p1:Id> <d2p1:Name>sample string 2</d2p1:Name> <d2p1:Value>sample string 3</d2p1:Value> <d2p1:ValueText>sample string 4</d2p1:ValueText> </d2p1:CustomFieldValue> <d2p1:CustomFieldValue> <d2p1:Id>1</d2p1:Id> <d2p1:Name>sample string 2</d2p1:Name> <d2p1:Value>sample string 3</d2p1:Value> <d2p1:ValueText>sample string 4</d2p1:ValueText> </d2p1:CustomFieldValue> </InfoCustomFields> <Labels xmlns:d2p1="http://schemas.datacontract.org/2004/07/Striven.Common.Models"> <d2p1:IdNamePair> <d2p1:_x003C_Id_x003E_k__BackingField>1</d2p1:_x003C_Id_x003E_k__BackingField> <d2p1:_x003C_Name_x003E_k__BackingField>sample string 2</d2p1:_x003C_Name_x003E_k__BackingField> </d2p1:IdNamePair> <d2p1:IdNamePair> <d2p1:_x003C_Id_x003E_k__BackingField>1</d2p1:_x003C_Id_x003E_k__BackingField> <d2p1:_x003C_Name_x003E_k__BackingField>sample string 2</d2p1:_x003C_Name_x003E_k__BackingField> </d2p1:IdNamePair> </Labels> <Location xmlns:d2p1="http://schemas.datacontract.org/2004/07/Striven.Common.Models"> <d2p1:_x003C_Id_x003E_k__BackingField>1</d2p1:_x003C_Id_x003E_k__BackingField> <d2p1:_x003C_Name_x003E_k__BackingField>sample string 2</d2p1:_x003C_Name_x003E_k__BackingField> </Location> <MarkDoneCustomFields xmlns:d2p1="http://schemas.datacontract.org/2004/07/BAPI.Models.V2.Core"> <d2p1:CustomFieldValue> <d2p1:Id>1</d2p1:Id> <d2p1:Name>sample string 2</d2p1:Name> <d2p1:Value>sample string 3</d2p1:Value> <d2p1:ValueText>sample string 4</d2p1:ValueText> </d2p1:CustomFieldValue> <d2p1:CustomFieldValue> <d2p1:Id>1</d2p1:Id> <d2p1:Name>sample string 2</d2p1:Name> <d2p1:Value>sample string 3</d2p1:Value> <d2p1:ValueText>sample string 4</d2p1:ValueText> </d2p1:CustomFieldValue> </MarkDoneCustomFields> <Milestone xmlns:d2p1="http://schemas.datacontract.org/2004/07/Striven.Common.Models"> <d2p1:_x003C_Id_x003E_k__BackingField>1</d2p1:_x003C_Id_x003E_k__BackingField> <d2p1:_x003C_Name_x003E_k__BackingField>sample string 2</d2p1:_x003C_Name_x003E_k__BackingField> </Milestone> <ModifiedBy xmlns:d2p1="http://schemas.datacontract.org/2004/07/BAPI.Models.V2.Core"> <d2p1:Id>1</d2p1:Id> <d2p1:Name>sample string 2</d2p1:Name> <d2p1:Type>sample string 3</d2p1:Type> </ModifiedBy> <Priority xmlns:d2p1="http://schemas.datacontract.org/2004/07/Striven.Common.Models"> <d2p1:_x003C_Id_x003E_k__BackingField>1</d2p1:_x003C_Id_x003E_k__BackingField> <d2p1:_x003C_Name_x003E_k__BackingField>sample string 2</d2p1:_x003C_Name_x003E_k__BackingField> </Priority> <Project xmlns:d2p1="http://schemas.datacontract.org/2004/07/Striven.Common.Models"> <d2p1:_x003C_Id_x003E_k__BackingField>1</d2p1:_x003C_Id_x003E_k__BackingField> <d2p1:_x003C_Name_x003E_k__BackingField>sample string 2</d2p1:_x003C_Name_x003E_k__BackingField> </Project> <PurchaseOrder xmlns:d2p1="http://schemas.datacontract.org/2004/07/BBM.BLL.Core"> <d2p1:Id>1</d2p1:Id> <d2p1:Name>sample string 3</d2p1:Name> <d2p1:Number>sample string 2</d2p1:Number> </PurchaseOrder> <RequestedBy> <Id>1</Id> <Name>sample string 2</Name> <Type>sample string 3</Type> </RequestedBy> <SalesOrder xmlns:d2p1="http://schemas.datacontract.org/2004/07/BBM.BLL.Core"> <d2p1:Id>1</d2p1:Id> <d2p1:Name>sample string 3</d2p1:Name> <d2p1:Number>sample string 2</d2p1:Number> </SalesOrder> <StartDateTime xmlns:d2p1="http://schemas.datacontract.org/2004/07/System"> <d2p1:DateTime>2024-04-26T07:32:16.7222614Z</d2p1:DateTime> <d2p1:OffsetMinutes>-240</d2p1:OffsetMinutes> </StartDateTime> <Status xmlns:d2p1="http://schemas.datacontract.org/2004/07/Striven.Common.Models"> <d2p1:_x003C_Id_x003E_k__BackingField>1</d2p1:_x003C_Id_x003E_k__BackingField> <d2p1:_x003C_Name_x003E_k__BackingField>sample string 2</d2p1:_x003C_Name_x003E_k__BackingField> </Status> <SubcontractedWorkStatus xmlns:d2p1="http://schemas.datacontract.org/2004/07/Striven.Common.Models"> <d2p1:_x003C_Id_x003E_k__BackingField>1</d2p1:_x003C_Id_x003E_k__BackingField> <d2p1:_x003C_Name_x003E_k__BackingField>sample string 2</d2p1:_x003C_Name_x003E_k__BackingField> </SubcontractedWorkStatus> <TaskPercentageComplete>5</TaskPercentageComplete> <Title>sample string 2</Title> <Type xmlns:d2p1="http://schemas.datacontract.org/2004/07/Striven.Common.Models"> <d2p1:_x003C_Id_x003E_k__BackingField>1</d2p1:_x003C_Id_x003E_k__BackingField> <d2p1:_x003C_Name_x003E_k__BackingField>sample string 2</d2p1:_x003C_Name_x003E_k__BackingField> </Type> <UseSubContractor>true</UseSubContractor> </TaskDetail>