Update Work Order

Update work order. You can update relevant information of the work order, including the work order title, site IDs, etc., by specifying the woId.

Request Format

POST https://{apigw-address}/work-management-cmms/v1.0/cmms/work-order/update

Request Parameters (URI)

Request Parameters (Header)

Name

Required/Optional

Data Type

Description

authorization

Required

String

Access token. The format of the parameter’s string is Bearer {your token}. Refer to Log In or Refresh Access Token to learn how to get the access token.

Request Parameters (Body)

Name

Required/Optional

Data Type

Description

woId

Required

String

Work order ID, used to identify the work order to be updated by specifying this ID.

title

Optional

String

Specifies the updated value for the work order title.

description

Optional

String

Specifies the updated value for the work order description.

siteId

Optional

String

Specifies the updated value for site IDs.

deviceId

Optional

String

Specifies the updated value for device IDs (comma-separated).

woStatus

Optional

Integer

Specifies the updated value for work order status.

priority

Optional

Integer

Specifies the updated value for work order priority. Available options:

  • 1: High

  • 2: Medium

  • 3: Low

workType

Optional

String

Specifies the updated value for work order type.

assignee

Optional

User structure

Specifies the updated value for assignee. See User Structure.

followers

Optional

List<User>

Specifies the updated value for follower list. See User Structure.

parentId

Optional

String

Specifies the updated value for parent work order ID.

plannedStartTime

Optional

String

Specifies the updated value for the planned start time of the parent work order. Format: yyyy-MM-dd HH:mm:ss

plannedEndTime

Optional

String

Specifies the updated value for the planned end time of the parent work order. Format: yyyy-MM-dd HH:mm:ss

actualStartTime

Optional

String

Specifies the updated value for the actual start time of the parent work order. Format: yyyy-MM-dd HH:mm:ss

actualEndTime

Optional

String

Specifies the updated value for the actual end time of the parent work order. Format: yyyy-MM-dd HH:mm:ss

fileIds

Optional

List<String>

Specifies the updated value for the attachment ID list.

tags

Optional

List<String>

Specifies the updated value for the user-defined tag list.

customizedParam

Optional

List<Param>.

Specifies the updated value for the user-defined fields. See Param Structure.

User Structure

Name

Data Type

Description

userId

String

User ID. How to Get UserId>>

username

String

Username.

Param Structure

Name

Data Type

Description

key

String

User-defined field identifier, must be registered in work management form.

value

String

User-defined field value.

Response Parameters

Name

Data Type

Description

count

Integer

Number of successfully updated work orders.

Examples

Request Example

url: https://{apigw-address}/work-management-cmms/v1.0/cmms/work-order/update
method: POST
Header:
   authorization: Bearer your_token
requestBody:
{
    "woId":"yourwoId",
    "title":"New Work Order Title"
}

Response Example

{
    "code": 0,
    "data": {
        "count": 1
    }
}