Update BP Record with Attachment

PUT /ws/rest/service/v2/bp/record/file

Purpose

Update a record with attachments for the following types of BPs:

This REST service uses the Step form to update the BP record. All required fields and validation rules run against the Step form used in the workflow details. The form in the End step is a View Form, and cannot be updated.

Notes:

Prerequisite

To add attachments to line item records, the Allow Attachments to Line Items checkbox must be selected on Custom Detail Form.

Request Format

All parameters should be URL encoded. Both input & output in JSON format in the body.

Notes:

If files from the Document Manager (DM) need to be attached, the field "_attachment_from_dm" must be used. Within that field, a string of comma separated file IDs for the relevant DM files must be provided to the "dm_file_ids" field. Up to 50 files can be attached from the DM at the record and each line item level. Text Type BPs are not currently supported. Validations performed for attaching files from the DM using file IDs include:

Behavior of the Due Date (due_date) Field

When you create workflow BP records through a REST service, the system currently sets the Due Date automatically based on the Workflow Settings; the Due Date provided in the input request is ignored.

When you update workflow BP records through a REST service, you cannot change the Due Date.

Response Format

A JSON object is returned in the following format.

{

"data": [],

"message": [],

"status": <REST status code value>

}

A successful response displays a status code 200.

A failed response displays a message with a status code.

Sample Request

{

"options":{

"project_number" : "P-0002",

"bpname":"line6",

"LineItemIdentifier":"upwoLISAS",

"workflow_details":{

"WFCurrentStepName":"Step 4",

"WFActionName":"Line 3"

}

},

"data":[

{

"ugenUserIDPK":null,

"_bp_lineitems":[

{

"ugenShellPK":"/AP1",

"uuu_tab_id":"Standard",

"short_desc":"desc3_m11",

"upwoLISAS":"0001",

"uuu_line_item_status":"Active",

"_attachment_from_dm": {

"dm_file_ids": "115"

}

}

],

"record_no":"uxli6-0020",

"title":"new title",

"_attachment":[

{

"file_name":"file_1.txt",

"title":"file_title1",

"issue_date":"05/06/2018",

"revision_no":"300"

},

{

"file_name":"file_2.txt",

"title":"file_title2",

"issue_date":"05/06/2018",

"revision_no":"200"

}

],

"_attachment_from_dm": {

"dm_file_ids": "114"

}

}

],

"_attachment":

{

"zipped_file_name" : "zip_file_name.zip",

"zipped_file_size": "746089",

"zipped_file_content" :"<base64_encoded string of create.zip file>"

}

}

Delete the Line-Item Using Update Request

To delete the line-Item using update request, the field "_delete_line_item" should be used (value of which will be comma separated values of LineItemIdentifier DE) as shown in the following example:

Sample: Delete line-item input

{

"options":{

"project_number" : "P-0002",

"bpname":"line6",

"LineItemIdentifier":"upwoLISAS"

},

"data":[

{

"ugenUserIDPK":null,

"_delete_bp_lineitems":"0002,0001,0003",

"record_no":"uxli6-0021",

"title":"title_m112244"

}

]

}

Sample Success Response

{

"data":[

],

"message":[

{

"_record_status":"success",

"record":{

"ugenUserIDPK":null,

"record_no":"uxli6-0021",

"title":"title_m112244"

}

}

],

"status":200

}

Sample Failed Response

If zip_file_size of uploaded zip file is not correct, a status code and message displays in the following format:

{

"data": [],

"message": [ "Uploaded Zip file is invalid" ],

"status": 3003

}

Data Elements in Line Items

If the following Data Elements are present in the Line Items, they will not be updated.

Related Topics

Business Processes

Create BP Record

Update BP Record

Create BP Record with Attachment

Payment Application with Auto-populate from SOV and Commits

Get BP Record Permission

Update BP Record Permission

Add Assignees to Workflow BP Records

Task Reassignment of Workflow Records

Bulk Create Records

Bulk Create Workflow BPs

Bulk Update Records

Bulk Reverse Auto-populate Records

Get Schedule of Values (SOVs) For Base Commit Type BPs

Terminate Workflow and Non-Workflow BP Records

Response Error Codes



Last Published Tuesday, April 15, 2025