Create Custom Object Instances for a Custom Component: /component/{component_uuid}/{component_record_id}/custom_objects/{obejct_uuid}
POST
https://dev-api.exsited.com/api/v3/component/{component_uuid}/{component_record_id}/custom_objects/{obejct_uuid}
Try It Out
Purpose
This API creates new instance(s) of a specified custom object for a given custom component record. A custom object instance stores structured data defined by attributes (name/value pairs) and can have a one-to-one or one-to-many relationship with the parent record.
Use Case
Use this endpoint when you want to attach custom, structured data (example: hazard information, photos, checklist items) to a specific record in a custom component. For example, during a site inspection, you might store hazard details for each inspection form using this API.
Path Parameters
| Parameter | Type | Description |
|---|---|---|
| component_uuid | UUID | Unique identifier of the custom component. |
| component_record_id | String | Unique ID of the specific record in the custom component. |
| object_uuid | UUID | Unique identifier of the custom object you want to create instances for. |
Query Parameters
No query parameter is required for this endpoint.
Request Body
One to One
One to Many
{
"custom_object_instances": {
"attributes": [
{
"name": "{{attribute_name_1}}",
"value": "{{attribute_value_1}}"
},
{
"name": "{{attribute_name_2}}",
"value": "{{attribute_value_2}}"
},
{
"name": "{{attribute_name_3}}",
"value": "{{attribute_value_3}}"
}
]
}
}
{
"custom_object_instances": [
{
"attributes": [
{ "name": "{{attribute_name_1}}", "value": "{{attribute_value_1}}" },
{ "name": "{{attribute_name_2}}", "value": "{{attribute_value_2}}" },
{ "name": "{{attribute_name_3}}", "value": "{{attribute_value_3}}" }
]
},
{
"attributes": [
{ "name": "{{attribute_name_1}}", "value": "{{attribute_value_4}}" },
{ "name": "{{attribute_name_2}}", "value": "{{attribute_value_5}}" },
{ "name": "{{attribute_name_3}}", "value": "{{attribute_value_6}}" }
]
}
]
}
| Attribute | Type | Description |
|---|---|---|
| custom_object_instances | Object / Array | The instance(s) of the custom object being created. |
| attributes | Array | List of name/value pairs storing the actual data for this instance. |
| attributes.name | String | Attribute name (must match the defined custom object’s schema). |
| attributes.value | String | Attribute value. |
Response
The response contains the created instance(s) with metadata and the stored attributes.
Response Body
One to One
One to Many
{
"custom_object_instances": {
"uuid": "{{custom_object_uuid}}",
"id": "{{custom_object_id}}",
"name": "{{custom_object_name}}",
"entity": "{{entity_type}}",
"entity_id": "{{entity_id}}",
"created_by": "{{created_by}}",
"created_on": "{{created_on}}",
"last_updated_by": "{{last_updated_by}}",
"last_updated_on": "{{last_updated_on}}",
"link": "{{custom_object_link}}",
"version": "{{version}}",
"attributes": [
{ "name": "{{attribute_name_1}}", "value": "{{attribute_value_1}}" },
{ "name": "{{attribute_name_2}}", "value": "{{attribute_value_2}}" },
{ "name": "{{attribute_name_3}}", "value": "{{attribute_value_3}}" }
]
}
}
{
"custom_object_instances": [
{
"uuid": "{{custom_object_uuid_1}}",
"id": "{{custom_object_id_1}}",
"name": "{{custom_object_name_1}}",
"entity": "{{entity_type}}",
"entity_id": "{{entity_id}}",
"created_by": "{{created_by}}",
"created_on": "{{created_on}}",
"last_updated_by": "{{last_updated_by}}",
"last_updated_on": "{{last_updated_on}}",
"link": "{{custom_object_link_1}}",
"version": "{{version}}",
"attributes": [
{ "name": "{{attribute_name_1}}", "value": "{{attribute_value_1}}" },
{ "name": "{{attribute_name_2}}", "value": "{{attribute_value_2}}" },
{ "name": "{{attribute_name_3}}", "value": "{{attribute_value_3}}" }
]
},
{
"uuid": "{{custom_object_uuid_2}}",
"id": "{{custom_object_id_2}}",
"name": "{{custom_object_name_2}}",
"entity": "{{entity_type}}",
"entity_id": "{{entity_id}}",
"created_by": "{{created_by}}",
"created_on": "{{created_on}}",
"last_updated_by": "{{last_updated_by}}",
"last_updated_on": "{{last_updated_on}}",
"link": "{{custom_object_link_2}}",
"version": "{{version}}",
"attributes": [
{ "name": "{{attribute_name_1}}", "value": "{{attribute_value_1}}" },
{ "name": "{{attribute_name_2}}", "value": "{{attribute_value_2}}" },
{ "name": "{{attribute_name_3}}", "value": "{{attribute_value_3}}" }
]
}
]
}
| Attribute | Type | Description |
|---|---|---|
| custom_object_instances | Object / Array | Created custom object instance(s). |
| uuid | UUID | Unique identifier of the custom object instance. |
| id | String | System-generated identifier for the instance. |
| name | String | Display name of the custom object. |
| entity | String | Entity type (example: customComponent). |
| entity_id | String | Identifier of the parent custom component record. |
| created_by | String | User who created the record. |
| created_on | DateTime (ISO 8601) | Timestamp when the record was created. |
| last_updated_by | String | User who last updated the record. |
| last_updated_on | DateTime (ISO 8601) | Timestamp of the last update. |
| link | String (URL) | API endpoint to fetch the record individually. |
| version | String | Version number (if versioning is enabled). |
| attributes | Array | List of name/value attribute pairs containing the stored data. |