Create CMx Records

POST /service/v2/cm/cmx

Available: Version 25.4 and later.

Purpose

Create records for Code and Record CMx.

Prerequisites

Ensure you have Create permission for Business Process Services.

Request Format

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

{

"options":{

" cm_code": "<value>",

" class_name " : "<value>",

" copy_from_record " : "<value>"

" project_number” : “<value>”

}

"data":[ {} ]

}

Request Parameters

Specify the following parameters in the Options JSON map:

Request Parameter Required? Data Type Description
cm_code Yes String A unique ID for the CM code. For example, “CM5”.
class_name Yes String The name of the CM class. For example, “Material Inventory Manager”.
project_number Yes String The name of the project. For example, "B-0001".
copy_from_record No String Existing CM code value. For example, “Generators Parts & Supplies_7”.

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 the audit table>

}

A successful response displays a status code 200.

A failed response displays a message with a status code.

Sample Success Request

Send a request to retrieve SOVs in the following format:

{

"options": {

"cm_code": "CM5",

"class_name": "Material Inventory Manager",

// "copy_from_record": "Generators Parts & Supplies_7",

"project_number": "B-0001"

},

"data": [

{

"umatSKUMtrDP": "Ceilings",

"uuu_cm5_status": "Active",

"uuu_cm5_name": "Ceilings_11001",

"ue_bld_PropertySubClassSPD": null,

"Material_Qnty": 0.0,

"umatSKUMasterNuberRN": "1111",

"umatCategoryPD": "Ceilings",

"upmManufacturerTXT120": "Oracle"

}

]

}

Sample Success Response

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

{

"data": [

{

"uuu_cm5_status": "Active",

"ue_bld_PropertySubClassSPD": null,

"Material_Qnty": 0.0,

"upmManufacturerTXT120": "Oracle",

"umatSKUMasterNuberRN": "1111",

"umatCategoryPD": "Ceilings",

"umatSKUMtrDP": "Ceilings",

"uuu_cm5_name": "Ceilings_11001"

}

],

"message": [],

"status": 200,

"rest_audit_id": 1455

}

Supported Validation Messages and Status Codes

The following validation messages and status codes display in the response when incorrect values are provided in the request:

Field Name Use-case Scenario Status Code Error Message
cm_code Key is missing or an incorrect code. 778 CM code is not found.
cm_code No mandatory field is included in the input data. 505 Create BP failed because Record <RECORD_ID> cannot be found.
class_name The key is missing or an incorrect class. 779 Class Name is not found.
class_name Class is company-type with a valid project number. 632 Class name is not at project level.
class_name The class is project-type at the company-level. 632 Class name is not at company level.
class_name Auto-creation user is not set up at the shell-level. 662 Integration settings for default workflow or creator or BP not set.
class_name Sheet is not defined. 781 Sheet is not defined.
class_name Class name of the CMx is not defined at the company level. 632 Class name is not at company level.
class_name A partial error. 3002 Invalid input.
project_number Key is missing or an incorrect value. 602 Project/Shell Number is not correct.
project_number Project is inactive or view-only, or on-hold. 1245 Create/Update/Delete cannot be performed when project/shell status is Inactive or View-Only or On-Hold.
copy_from_record Key is missing or an incorrect value. 778 CM code is not found.