Update BP Record with Attachment
The following applies to the Update BP Record with Attachment (REST API Details in Business Processes) Web Services V1:
PUT /ws/rest/service/v1/bp/record/file/{project_number}
Purpose
Update a record with attachment in a specific BP in a shell based on shell number or from company level if the project/shell number, is not provided.
The input JSON shall provide various options to be considered for fetching the data.
Path Parameter
project_number: Specify the Project number in which the records exists; if not provided, records are from Company Level.
Request Parameters
All parameters must be URL encoded. Both input & output in JSON format in the body.
Notes:
- If "adding attachment" is disabled in Upper form or Detail form, and user is trying to attach file to corresponding form. Updating record will fail.
- Only one record update with attachments is supported in this call. If the file exists in a record, that file will be ignored and will not get revised.
- If integration form has "add attachment" disabled, files will not get attached.
- If the "_attachment" (outside data list) for zip file is not provided, the record will be updated without attachment.
- Auto-Creation setting is mandatory in Shell or Company BP Setup in Admin mode.
- In input JSON options, the "project_number" specifies the shell in which the records exist; if the "project_number" is not provided, the records are from Company Level.
- The "record_no" is mandatory and is a part of data.
- The "bpname" is mandatory and is a part of options form parameter.
- The WFCurrentStepName and WFActionName are part of the "workflow_details" and are for Workflow type BPs. If the values for WFCurrentStepName and WFActionName are provided, the record will be updated and sent to next step of the workflow. If the values for WFCurrentStepName and WFActionName are not provided, the record will be updated but it will remain on the same workflow step.
- The LineItemIdentifier is part of options form parameter. The LineItemIdentifier value will be DE name present in the lineItem. That DE should be present in "data" (input record JSON) with its value.
- The "Enable Step for Integration" option in the Workflow BP setup is not available for the REST integration.
- When a data element (DE) is set to auto-populate from a Base Commit, Change Commit, or an SOV, the auto-populated values takes precedence when 0 value is sent for those DEs in CSV, Excel, or REST API. Any value specified in the input request is ignored and the auto-populated values from Base Commit, Change Commit, or SOV will be used.
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.
Adding LineItemIdentifiers in BP Design
To add a LineItemIdentifier in the BP design:
- Create a custom DE with DD: Sys Auto Sequence.
- Add this DE to the Detail Form of the BP with the line items that need to be updated.
- Go to the Company Workspace tab and switch to Admin mode.
- In the left Navigator, select Business Processes, and then open the BP.
- Click Open drop-down to open and select Data Elements to open the Data Elements Configuration window.
- Click the Auto Sequence tab and click Add.
- Select the data element added in the Detail Form and select the level as: Per Record.
- Provide the start value and click Create.
- Add the parameter "Sys Sequence counter" and click OK.
- Select Integration, select Detail, and then add the DE.
- Set the "Direction" to "Both" for that DE.
- Complete and deploy the BP.
- In the body of the request, add the DE name as Lineitem identifier and send the request.
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":{
"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"
}
],
"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":
{
"zipped_file_name" : "zip_file_name.zip",
"zipped_file_size": "746089",
"zipped_file_content" :"<base64_encoded string of zip_file_name.zip file>"
}
}
Sample Request to Delete the Line-Item
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":{
"bpname":"line6",
"LineItemIdentifier":"upwoLISAS"
},
"data":[
{
"ugenUserIDPK":null,
"_delete_bp_lineitems":"0002,0001,0003",
"record_no":"uxli6-0021",
"title":"title_m112244"
}
]
}
Sample Success Response
This is an example of an Update record with attachment response.
{
"data":[
],
"message":[
{
"_record_status":"success",
"record":{
"ugenUserIDPK":null,
"record_no":"uxli6-0021",
"title":"title_m112244"
}
}
],
"status":200
}
Sample Failed Response
This is an example of a failed response when the zip_file_size of an uploaded zip file is incorrect.
{
"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 during UpdateBPRecord call.
bitemidbudgetidsovitemiduuu_cm0_pickerxidds_codefsm_lineitem_idasm_lineitem_iduuu_latuuu_longuuu_company_account_nameuuu_company_account_codeuuu_company_acc_codepickeruuu_activity_pickerref_bpo_lineitemref_bporef_rfbrefiduuu_sovlinumotherCompanyIDuuu_costcode_pickerscheduled_valueuuu_unit_pricecurrencyiddue_dateuuu_from_dateuuu_issue_dateuuu_last_update_dateuuu_rfb_due_dateuuu_to_dateuuu_week_pickeruuu_datasourceuuu_depreciation_mtduuu_line_item_statusrow_iduuu_bid_countuuu_bidders_countuuu_planning_item_pickeruuu_proj_pickerrecord_nouuu_resc_pickeruuu_role_pickeruuu_commit_short_descend_dateuuu_creation_dateuuu_commit_breakdownuuu_timescale_unitscreator_idwpiduuu_cost_costattributeuuu_cost_external_refiduuu_cost_statusuuu_cost_cost_typeuuu_cost_descriptionuuu_cost_itemuuu_cost_owneruuu_cost_codeuuu_dm_create_dateuuu_file_create_dateuuu_file_issue_dateuuu_dm_percent_completeuuu_file_sizeuuu_file_versionuuu_dm_descriptionuuu_dm_node_pathuuu_dm_node_nameuuu_file_revision_nouuu_file_titleuuu_dm_create_byuuu_file_create_byuuu_fund_fundcategoryuuu_fund_long_descuuu_fund_descriptionuuu_fund_fundnameuuu_fund_codeuuu_descriptionuuu_resc_nwd_typeuuu_resc_interestuuu_resc_proficiencyuuu_resc_skilluuu_role_statusuuu_role_nameuuu_resc_capacityuuu_user_addressuuu_user_cityuuu_user_countryuuu_user_emailuuu_user_faxuuu_user_firstnameuuu_user_homephoneuuu_user_lastnameuuu_user_mobilephoneuuu_user_pageruuu_user_stateuuu_user_timezoneuuu_user_titleuuu_user_workphoneuuu_user_zipuuu_resc_statusuuu_resc_codeuuu_resc_nameuuu_early_finishuuu_early_start,uuu_finishuuu_late_finishuuu_late_startuuu_startuuu_act_pct_completeuuu_activity_work_hrsuuu_fixed_costuuu_floatuuu_total_costuuu_activity_iduuu_flag_completeuuu_flag_milestoneuuu_activity_resourcesuuu_dependency_typeuuu_activity_nameuuu_outline_codeuuu_cost_li_type
Related Topics
Get BP Record With Attachments
Create BP Record with Attachment
Fetch BP Record List with filter_criteria
Payment Application with Auto-populate from SOV and Commits
Asynchronous Bulk BP Operations
Fetch List of Attached Files in a BP
Download a Single Attached File in a BP
Download Multipart or Large Files
Last Published Tuesday, April 15, 2025