Update Non-System DEs on Terminated Records

PUT /ws/rest/service/v2/bp/record/cleanup/terminatedrecords

Available: 26.4 and later

Purpose

To allow users to edit non-system DEs on terminated records.

Prerequisites

Ensure that the integration user has the Update permissions for Business Process Services to process the requests. For more information, see Creating Integration Users.

Request Format

Send a request as a JSON Map with the following structure:

{

"options": {

"bpname": "<value>",

"project_number" : "<value>"},

},

"data": [

{

"record_no":["<value>",

"<value>"

}

]

}

Request Parameters

Specify the following parameter in the Options JSON map:

Request Parameter Required? Data Type Description
record_no Yes String BP record number
bpname Yes String

BP name of a terminated record

Request Parameters - Date [ ]

Specify the following parameter in the Options JSON map:

Request Parameter Required? Data Type Description
record_no No String BP record number
bpname No String

BP name of a terminated record

Response Format

A JSON object is returned in the following format.

{

"data": [ ],

"message": [<list of messages>],

"status": <REST status code value>,

"rest_audit_id": <ID from rest audit table>

}

A successful response displays a status code 200.

A failed response displays a message with a status code.

Sample Request

To update a terminated record for the Submittals BP of Project PRJ-004, send a request in the following format:

{

"options": {

"bpname": "Submittals",

"project_number" : "PRJ-004"

},

"data": [

{

"testText": "update text",

"record_no": "SUB-006"

}

]

}

Sample Success Response

A successful response with status code 200 displays in the following format:

{

"data": [],

"message": [

"[SUB-006] Updated successfully."

],

"status": 200,

"rest_audit_id": 45

}

Sample Failed Response 1

A failed response displays with the corresponding status code in the following format:

{

"data": [],

"message": [

"[SUB-002] Record is not in terminated status",

"[SUB-006] Updated successfully.",

"[SUB-004] The request contains one or more predefined system data elements which cannot be updated.",

"[SUB-007] The request contains one or more data elements of an unsupported data type."

],

"status": 12773,

"rest_audit_id": 46

}

Supported Validation Messages and Status Codes

The following messages and status codes can display in the response:

Field Name Use-case Scenario Status Code Error Message
project_number When project number is not provided 13001 Specified project number does not exist
project_number Project status is inactive 602 Project status is Inactive
project_number Multiple project numbers specified in input parameter   1245 Project/Shell Number is not correct
bpname BP name is not specified 603 Business Process Name is required
bpname BP name does not exist 603 Business Process Name is not correct
bpname Specified BP is Inactive 3006 Business Process is not Active
record_no Record number is not specified 17004 Record number is required
record_no Specified record number does not exist 12756 [Record Numbers] do not exist
record_no Specified record is not in Terminated status 12780 Record is not in terminated status
record_no Only a partial list of records is successfully updated 12773 [List of record numbers] updated successfully

Error records include a message that indicates why the record update failed.

  When the request contains an unsupported data type   12774 The request contains one or more data elements of an unsupported data type
  When the request contains a predefined or system DE   12775 The request contains one or more predefined system data elements which cannot be updated
  Only record_no is provided   12777 No eligible data elements found to update
  The request contains line item data. 12778 Line item data cannot be updated
  Duplicate records are found in the system. 12779 Duplicate records found
  Duplicate records are found in the JSON request. 12798 Duplicate records found in the request