All requests for this API must be authenticated. The authentication can be achieved in the following ways:
Create an entity.
| Parameter | Type | Description |
|---|---|---|
| name | string | The name of the entity. |
| Header | Value | Description |
|---|---|---|
| Content-Type | application/json | The content type. |
| X-CSRF-Token | The value from the one.erp.csrf.token cookie. | CSRF protection token. |
The JSON payload:
{
"entity_name": "the_name",
"properties": {
"a_property": "value"
},
"children": {
"the_name_the_items": [
"entity_name": "the_items",
"properties": {
"other_property": 10
}
]
}
}
The operation was successful.
{
"operation": "insert",
"key": 10
}
There was an error deserializing the JSON message.
{
"detail": "error detail"
}
There was a business rule validation failure.
{
"eventName": "onBeforeInsert",
"entityName": "invoice",
"propertyName": "number",
"childEntityName": "invoice_item",
"childPropertyName": "price",
"childEntityIndex": 1,
"detail": "error detail"
}
The operation is not authorized.
Check if the authentication cookie is set or valid or a valid username and password are set in the URL.
All errors except for JSON message deserialization errors.
{
"detail": "error detail"
}
/rest/entity/todoRetrieve an entity.
GET /rest/entity/{name}/{key}
| Name | Type | Description |
|---|---|---|
| name | string | The name of the entity to retrieve |
| key | long | The key of the entity ro retrieve |
The operation was successful, the result will be similar to this:
{
"entity_name": "todo",
"children": {"todo_todo_item": [
{
"entity_name": "todo_item",
"properties": {
"id_organization": 1,
"date_updated": "2026-08-07T10:24:45.000Z",
"date_created": "2026-08-07T10:24:24.000Z",
"description": "Todo item 1",
"id_business_unit": 1,
"id_user": 1,
"is_completed": 0,
"key": 1,
"id_todo": 1
}
},
{
"entity_name": "todo_item",
"properties": {
"id_organization": 1,
"date_updated": "2026-08-07T10:24:45.000Z",
"date_created": "2026-08-07T10:24:38.000Z",
"description": "Todo item 2",
"id_business_unit": 1,
"id_user": 1,
"is_completed": 1,
"key": 2,
"id_todo": 1
}
},
{
"entity_name": "todo_item",
"properties": {
"id_organization": 1,
"date_updated": "2026-08-07T10:24:45.000Z",
"date_created": "2026-08-07T10:24:38.000Z",
"description": "Todo item 3",
"id_business_unit": 1,
"id_user": 1,
"is_completed": 1,
"key": 3,
"id_todo": 1
}
}
]},
"properties": {
"id_organization": 1,
"date_updated": "2026-08-07T10:24:45.000Z",
"date_created": "2026-08-07T10:24:01.000Z",
"id_business_unit": 1,
"id_user": 1,
"title": "First todo",
"is_completed": 0,
"key": 1
}
}
There was an error deserializing the JSON message.
{
"detail": "error detail"
}
The operation is not authorized.
Check if the authentication cookie is set or valid or a valid username and password are set in the URL.
All errors except for JSON message deserialization errors.
{
"detail": "error detail"
}
/rest/entity/todo/1Update an entity.
| Parameter | Type | Description |
|---|---|---|
| name | string | The name of the entity. |
| key | long | The key of the entity. |
| Header | Value | Description |
|---|---|---|
| Content-Type | application/json | The content type. |
| X-CSRF-Token | The value from the one.erp.csrf.token cookie. | CSRF protection token. |
The JSON payload:
{
"entity_name": "the_name",
"properties": {
"key": 1,
"a_property": "value"
},
"children": {
"the_name_the_items": [
"entity_name": "the_items",
"properties": {
"key": 10,
"other_property": 10
}
]
}
}
The operation was successful.
{
"operation": "update",
"key": 10
}
There was an error deserializing the JSON message.
{
"detail": "error detail"
}
There was a business rule validation failure.
{
"eventName": "onBeforeUpdate",
"entityName": "invoice",
"propertyName": "number",
"childEntityName": "invoice_item",
"childPropertyName": "price",
"childEntityIndex": 1,
"detail": "error detail"
}
The operation is not authorized.
Check if the authentication cookie is set or valid or a valid username and password are set in the URL.
All errors except for JSON message deserialization errors.
{
"detail": "error detail"
}
/rest/entity/todo/1Delete an entity.
| Parameter | Type | Description |
|---|---|---|
| name | string | The name of the entity. |
| key | long | The key of the entity. |
| Header | Value | Description |
|---|---|---|
| X-CSRF-Token | The value from the one.erp.csrf.token cookie. | CSRF protection token. |
Empty payload.
The operation was successful.
There was an error deserializing the JSON message.
{
"detail": "error detail"
}
There was a business rule validation failure.
{
"eventName": "onBeforeDelete",
"entityName": "invoice",
"propertyName": "number",
"childEntityName": "invoice_item",
"childPropertyName": "price",
"childEntityIndex": 1,
"detail": "error detail"
}
The operation is not authorized.
Check if the authentication cookie is set or valid or a valid username and password are set in the URL.
All errors except for JSON message deserialization errors.
{
"detail": "error detail"
}
/rest/entity/todo/1