Modify master data
Understand how to add, modify, and delete data through Proactis APIs
Creating, updating or deleting a record using a RESTful API involves sending an HTTP request to the appropriate endpoint with the necessary data to create, modify or delete the record. We support the following operations:
- Create a new record using the
POSTmethod. - Update an existing record using the
PUTmethod. - Delete an existing record using the
DELETEmethod.
The process first requires you to check the data model of the data type you want to create, update, or delete. This helps you ensure all required properties are included in your request. Make sure to check the data model because each API has it's own. Next, you are ready to perform the operation.
Use a valid data model
Each integration may have different requirements to the request body of the operation. So, before triggering the operation, you need to know how the data should be inserted into Proactis. You can access the integration-specific model requirements using this API documentation.
Perform the operation
Let's try creating a new cost center using our Create cost center endpoint. The request body could be a XML or JSON object which conforms to the structure of the model.
- XML
- JSON
<?xml version="1.0" encoding="UTF-8"?>
<costCenter>
<name>Human Resources</name>
<description>Human Resources</description>
<online>true</online>
<erpId>HR-654</erpId>
<departments>
<department>A-1000</department>
</departments>
<id>CC-001</id>
</costCenter>
{
"name": "Human Resources",
"description": "Human Resources",
"online": true,
"erpId": "HR-654",
"departments": [
"A-1000"
],
"id": "CC-001"
}
Proactis APIs do not support bulk updates. You can work on only one object per request.
This results in a response from the endpoint, which could either be successful or a failure.
- Successful (XML)
- Failure (XML)
- Successful (JSON)
- Failure (JSON)
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<costCenter>
<id>CC-001</id>
<name>Human Resources</name>
<description>Human Resources</description>
<online>true</online>
<erpId>HR-654</erpId>
<departments>
<department>A-1000</department>
</departments>
<lastModified>2023-08-21T13:29:47.351+02:00</lastModified>
</costCenter>
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<error xmlns="http://api.proactis.com/common">
<status>NOT_FOUND</status>
<message>DEPARTMENT with ID "A-1000" not found</message>
<details/>
</error>
{
"name": "Human Resources",
"description": "Human Resources",
"online": true,
"erpId": "HR-654",
"departments": [
"A-1000"
],
"id": "CC-001",
"lastModified": "2023-08-21T11:28:35Z"
}
{
"status": "NOT_FOUND",
"message": "DEPARTMENT with ID \"A-1000\" not found",
"details": []
}
Monitor the status of your operation
The response of the request will display the status. Another option is to check the widgets in Proactis.