Data_SubmitRecords (Post)
- Last UpdatedNov 13, 2025
- 3 minute read
| Post | Data_SubmitRecords |
Resource Path:/api/v1/data
| Name | Description | Data Type |
|---|---|---|
| requestOrigin | Optional. Prevents infinite loops in requests by determining the original caller. | string |
Request
POST 'https://localhost:9003/api/v1/data?requestOrigin=Client' \
--header 'Content-Type: application/json' \
--data-raw '[
{
"Module": "Downtime",
"Location": "ACME.Rocky Mine.Mining.ROM.Downtime",
"Start Time": "2022-07-08T05:52:55Z",
"End Time": "2022-07-10T07:52:55Z",
"Cause Location":"ACME.Rocky Mine.Mining.ROM",
"Classification":"1006",
"Cause":"100061",
"Effect":null,
"Comments":"Record_TC141111",
"Eff. %": "0.2",
"Deleted": "False",
"Rate Setpoint": "500",
"SubFields": "1234",
"SubFields Target": "234"
},
{
"Module": "Downtime",
"Location": "ACME.Rocky Mine.Mining.ROM.Downtime",
"Start Time": "2022-07-08T05:52:55Z",
"End Time": "2022-07-11T07:52:55Z",
"Cause Location":"ACME.Rocky Mine.Mining.ROM",
"Classification":"1006",
"Cause":"100061",
"Effect":null,
"Comments":"Record_TC1411121",
"Eff. %": "0.2",
"Deleted": "False",
"Rate Setpoint": "500",
"SubFields": "1234",
"SubFields Target": "234"
}
]'Response
[
{
"Id": 21,
"RecordAction": "Insert"
},
{
"Id": 22,
"RecordAction": "Insert"
}
]Request | POST with Merge Criteria
POST 'https://localhost:9003/api/v1/data/' \
--header 'Content-Type: application/json' \
--data-raw '[
{
"Module": "Downtime",
"Location": "ACME.Rocky Mine.Train Loadout.Downtime",
"Start Time": "2019-10-21T05:52:55Z",
"Cause Location":"ACME.Rocky Mine.Train Loadout",
"Classification":"1006",
"Cause":"100021",
"SetId":"9"
},
{
"Module": "Downtime",
"Location": "ACME.Rocky Mine.Train Loadout.Downtime",
"Start Time": "2019-10-11T05:52:55Z",
"Cause Location":"ACME.Rocky Mine.Train Loadout",
"Classification":"1006",
"Cause":"100021",
"KeyFieldNames":"Start Time"
}
]'Response
[
{
"Id": 9,
"RecordAction": "Update"
},
{
"Id": 11,
"RecordAction": "Update"
}
]You can do bulk addition and modification of records through this method for all the application modules.
To submit a new record, use ID = 0.
If SetId > 0
The request is handled as an Update and no fields must be specified in MergeCriteria. Merge using SetId or KeyFieldNames. See example 2 in the Example section.
If SetId = 0 and no Merge field is specified
The request is handled as an Insert.
If SetId = 0 and Merge fields are specified
The application tries to find the record that corresponds to the merge criteria.
If only one record is found, the operation is handled as an Update. If no record is found, it's handled as an Insert. If multiple records correspond to the merge criteria are found, a business error occurs.
For the action parameter, when you select Movement, Adjustment, Survey, or MaterialRequirement the action is immediately performed in the application. When you select MovementEvent, AdjustmentEvent, or SurveyEvent, the action is performed when the record is reprocessed. Most action types are relevant only to Inventory. MaterialRequirement is specific to Planning.
The location parameter specifies the exact reporting point that you are inserting into the record for most modules. Do not use the parent folder. You can use different locations for different SubmitData records.
In the Inventory module, the location can be any movement configuration item, including the default AdhocMaterialMovement item or any Routine movemement item in Studio. It can also be a dynamic material movement. In case of an adjustment, the location is relevant to the equipment.
For keyFieldNames parameter, use the filter keyword nothing if you are searching for fields that don't have a value. The fields are required to be filterable to be used as merge criteria.
Specify additional fields as a set of name-value pair. The name is the display name of the field to insert or update, and value is the field value to submit for the name field.