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:
- Shell-level BPs based on a project_number
- Company-level BPs if the project/shell number is not provided
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:
- Only one record update with attachment is supported in this call.
- For Document-type BPs, new attachments can be added to existing line items only in the Custom Detail Form. If the attachment already exists for a record, it will be ignored and will not get revised.
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 the file exists in a record, that file will be ignored and will not get revised.
- If step 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.
- Field properties such as Read-only in step form will be retained. The Field mandatory in step form must be present in Integration Form with the direction set as "both" or "input".
- Field direction provided in Integration form will be retained.
- 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.
- If a Workflow BP record is already accepted by an assignee, the Update REST call will fail with error message: "Record has already been accepted by Task Assignee".
- 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.
- If data elements are set to auto-populate from Base Commit as well as auto-populate from SOV in the payment business process standard line items, then the values from Base commit takes precedence for auto-population. Also, the auto-populate from Base Commit or Change commit takes precedence in payment line items if 0 or no value is provided via integration.
- The "Enable Step for Integration" option in the Workflow BP setup is not available for the REST integration.
- BP records will be created successfully:
- If a single user with a specific First Name and Last Name exists in a project with a status of Active/On-hold.
- If multiple users exist with identical First Name and Last Name, but only one user's status is Active/On-hold while all other users have an Inactive status.
- BP records will not be created if multiple users exist with identical First Name and Last Name, with a status of Active/On-hold/Inactive.
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:
- If you have the appropriate DM permissions.
- If the string provided to field "dm_file_ids" is a string of comma separated file IDs.
- If the file IDs provided are valid.
- Record and line item each have up to 50 files attached from the DM.
- Example input field:
"_attachment_from_dm":{"dm_file_ids":"123,345"}
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.
bitemidbudgetidsovitemiduuu_cm0_pickerxidds_codefsm_lineitem_idasm_lineitem_iduuu_latuuu_longuuu_company_account_nameuuu_company_account_codeuuu_company_acc_codepickeruuu_activity_pickeruuu_asset_pickerref_bpo_lineitemref_bporef_rfbrefiduuu_sovlinumotherCompanyIDuuu_costcode_pickerscheduled_valueuuu_asset_cum_depreciationuuu_asset_curr_period_depuuu_asset_net_book_valueuuu_unit_pricecurrencyiddue_dateuuu_asset_calc_as_of_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_asset_nameuuu_commit_breakdownuuu_asset_codeuuu_asset_navigation_codeuuu_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_durationuuu_fixed_costuuu_floatuuu_labor_costuuu_non_labor_costuuu_total_costuuu_activity_iduuu_flag_completeuuu_flag_milestoneuuu_activity_resourcesuuu_dependency_typeuuu_activity_nameuuu_outline_codeuuu_cost_li_type
Related Topics
Create BP Record with Attachment
Payment Application with Auto-populate from SOV and Commits
Add Assignees to Workflow BP Records
Task Reassignment of Workflow Records
Bulk Reverse Auto-populate Records
Get Schedule of Values (SOVs) For Base Commit Type BPs
Terminate Workflow and Non-Workflow BP Records
Last Published Tuesday, April 15, 2025