PATCH v2/tasks/{id}

Updates tasks partially with supplied information. You may only provide the properties that needs updating instead of whole object in the body. For example, in order to update Title, just supply Title in the request body.

Request Information

URI Parameters

NameDescriptionTypeAdditional information
id

integer

Required

Body Parameters

TaskPatch
NameDescriptionTypeAdditional information
Title

Task title. This parameter is required and cannot be cleared.

string

None.

Type

IdNamePair

None.

Priority

Task priority. This parameter is required and cannot be cleared.

IdNamePair

None.

Budget

Only accepted if the task type includes budget. Required when task type requires budget.

decimal number

None.

TaskPercentageComplete

Percentage complete is only applicable when budget is greater than 0.

decimal number

None.

StartDateTime

Start date and time in ISO 8601 format. Accepted if task type includes Start Date. Time part is only accepted if task type includes start time. If no timezone information is provided, tenant's timezone will be assumed. Required if task type requires Start Date.

date

None.

DueDateTime

Due date and time in ISO 8601 format. Time part is only accepted if task type includes due time. If no timezone information is provided, tenant's timezone will be assumed. Required if task type requires Due Date.

date

None.

Description

string

None.

Customer

The customer/vendor associated with the task. Required if task type requires Customer.

CustomerRef

None.

Location

Location of task for the customer selected. Only accepted if task type includes location, required if the task type requires location.

IdNamePair

None.

SalesOrder

Sales Order related to the task. Only accepted if task type includes sales order. Required if task type requires sales order. The provided sales order must be related to the customer linked to the task and also match other status configuration based on task type settings.

SalesOrderRef

None.

Project

Project related to the task. Only accepted if task type includes project.

IdNamePair

None.

Milestone

Milestone related to the task. Milestone must be related to the project linked to the task.

IdNamePair

None.

RequestedBy

Requested By either, cane be an employee or a contact that is related to customer linked on the task. Only accepted if task type includes Requested By, required if task type requires Requested By.

TaskRequestedBy

None.

UseSubContractor

Accepts if task type can be a sub contracted work.

boolean

None.

PurchaseOrder

Purchase Order related to subcontracted task. Only accepted and requried when UseSubcontractor flag is set to true

PurchaseOrderRef

None.

Request Formats

application/json, text/json

Sample:
{
  "title": "sample string 1",
  "type": {
    "id": 1,
    "name": "sample string 2"
  },
  "priority": {
    "id": 1,
    "name": "sample string 2"
  },
  "budget": 2.0,
  "taskPercentageComplete": 3.0,
  "startDateTime": "2022-07-01T04:14:50-04:00",
  "dueDateTime": "2022-07-01T04:14:50-04:00",
  "description": "sample string 4",
  "customer": {
    "id": 1,
    "number": "sample string 2",
    "name": "sample string 3"
  },
  "location": {
    "id": 1,
    "name": "sample string 2"
  },
  "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"
  },
  "useSubContractor": true,
  "purchaseOrder": {
    "id": 1,
    "number": "sample string 2",
    "name": "sample string 3"
  }
}

application/xml, text/xml

Sample:
<TaskPatch xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.datacontract.org/2004/07/BAPI.Models.V2.Tasks">
  <Budget>2</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 4</Description>
  <DueDateTime xmlns:d2p1="http://schemas.datacontract.org/2004/07/System">
    <d2p1:DateTime>2022-07-01T20:14:50.975873Z</d2p1:DateTime>
    <d2p1:OffsetMinutes>-240</d2p1:OffsetMinutes>
  </DueDateTime>
  <Location xmlns:d2p1="http://schemas.datacontract.org/2004/07/BBM.BLL.Core">
    <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/BBM.BLL.Core">
    <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/BBM.BLL.Core">
    <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/BBM.BLL.Core">
    <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>2022-07-01T20:14:50.975873Z</d2p1:DateTime>
    <d2p1:OffsetMinutes>-240</d2p1:OffsetMinutes>
  </StartDateTime>
  <TaskPercentageComplete>3</TaskPercentageComplete>
  <Title>sample string 1</Title>
  <Type xmlns:d2p1="http://schemas.datacontract.org/2004/07/BBM.BLL.Core">
    <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>
</TaskPatch>

application/x-www-form-urlencoded

Sample:

Sample not available.

Response Information

Resource Description

IHttpActionResult

None.

Response Formats

application/json, text/json, application/xml, text/xml

Sample:

Sample not available.