Create a hierarchy
Learn more about how to use the Create hierarchy API to create a hierarchy and, optionally, its first version and first connection.
Use the Create a Hierarchy to create a hierarchy definition. If versioning is enabled, you can also create the initial hierarchy version and the first hierarchy connection in the same request. This operation requires the MDM.Data.Hierarchy permission with the CREATE privilege.
HTTP method and endpoint
Use the following HTTP method and endpoint path to submit the request:
POST https://<environment>.reltio.com/reltio/api/{tenantId}/hierarchies/
Request headers
The following request headers must be included.
| Header | Value | Required |
|---|---|---|
Authorization | Bearer <token> | Yes |
Query parameters
The following table describes the query parameters and their values.
| Parameter | Type | Required | Description | Accepted values / Default |
|---|---|---|---|---|
options | String | No | Controls whether the connections in the request are validated against the structural rules configured for the hierarchy type. If you omit this option, the operation validates the requested connections and returns an error if any of them violate a structural rule. | ignoreValidation skips structural validation. By default, validation is performed. |
Request body
The request body is a JSON object with the hierarchy definition and, optionally, the first connection.
| Field | Type | Required | Description | |
|---|---|---|---|---|
type | — | String | Yes | The hierarchy type name as defined in the business configuration. |
name | — | String | Yes | The name of the hierarchy. It must be unique within the tenant. |
hasVersioning | — | Boolean | No | Indicates whether the hierarchy is versioned. |
version | — | Object | Yes, if hasVersioning=true | The object that describes the version to create. |
name | String | No | The name of the version. It must be unique within the hierarchy. | |
effectiveStartDate | String | No | Optional. The start effective date of the version in ISO 8601 date format. | |
effectiveEndDate | String | No | Optional. The end effective date of the version in ISO 8601 date format. | |
description | String | No | Optional. The description of the version. | |
context | String | No | Optional. Additional context for the version. | |
firstConnection | — | Object | Yes | The first connection in the hierarchy. Defines the parent-child edge created with the hierarchy. |
firstConnection.parent | Object | Yes | The object that defines the parent in the first connection in the hierarchy. Note: Do not pass both parentId and the parent crosswalk (type, value, and sourcetable) object for the same connection. | |
type | String | Yes, when you use crosswalk for parent entity | The source type of the crosswalk that refers to the parent. Example:configuration/sources/XYZ | |
value | String | Yes, when you use crosswalk for parent entity | The value of the crosswalk that refers to the parent. Example:I12345 | |
sourceTable | String | No | Source table of the crosswalk that refers to the parent. Example:Users | |
firstConnection.parentID | String | Yes, when you use an entity ID for the parent. | Entity ID of the parent. If you passparentId, the parent is created with the Reltio crosswalk. Either the parent or the child must be part of the hierarchy being modified. Example:0ABlXju | |
firstConnection.child | Object | Yes | Object that defines the child in the first connection in the hierarchy. Note: Do not pass both childId and the child crosswalk (type, value, and sourcetable) object for the same connection. | |
type | String | Yes, when you use crosswalk for child entity | The source type of the crosswalk that refers to the child. Example: configuration/sources/XYZ | |
value | String | Yes, when you use crosswalk for child entity | The value of the crosswalk that refers to the child. Example: I54321 | |
sourceTable | String | No | Source table of the crosswalk that refers to the child. Example:Users | |
firstConnection.childID | — | String | Yes, when you use an entity ID for the child. | Entity ID of the child. If you passchildId, the child is created with the Reltio crosswalk. Either the parent or the child must be part of the hierarchy being modified. Example:1XErCw7G |
startDate | — | String | No | Optional. The start effective date of the connection. Format: YYYY-MM-DD. |
endDate | — | String | No | Optional. The end effective date of the connection. Format: YYYY-MM-DD. |
Example request
Use the following example to see how a complete request is structured with headers.
POST /
Authorization: Bearer <token>
{
"type": "configuration/hierarchyTypes/TypeProduct",
"name": "Product Hierarchy",
"hasVersioning": true,
"version": {
"name": "Version 1",
"status": "ACTIVE",
"effectiveStartDate": "2024-01-01",
"effectiveEndDate": "2026-12-31",
"description": "longDescription",
"context": "longContextDescription"
},
"firstConnection": {
"parent": {
"type": "configuration/sources/XYZ",
"value": "I12345",
"sourceTable": "USERS"
},
"child": {
"type": "configuration/sources/Reltio",
"value": "cldId"
},
"startDate": "2024-01-01",
"endDate": "2026-12-32"
}
}
Response fields
The following table describes the fields returned in the response body.
| Field | Type | Description | |
|---|---|---|---|
type | — | String | The hierarchy type name as defined in the business configuration. |
name | — | String | The name of the hierarchy. |
hasVersioning | — | Boolean | Indicates whether the hierarchy is versioned. |
hierarchyId | — | String | The ID of the created hierarchy. |
instanceId | — | String | The ID of the created hierarchy instance. |
version | — | Object | Optional. The created hierarchy version. |
versionId | String | The ID of the created version. | |
name | String | The name of the version. | |
status | String | Optional. The status of the version. | |
effectiveStartDate | String | Optional. The start effective date of the version in ISO 8601 date format. | |
effectiveEndDate | String | Optional. The end effective date of the version in ISO 8601 date format. | |
description | String | Optional. The description of the version. | |
context | String | Optional. Additional context for the version. | |
firstConnection | Object | Optional. The created first hierarchy connection. Repeats the request firstConnection (parent and child identification, startDate, andendDate) and includes connectionId. | |
connectionId | String | The ID of the created connection. | |
startDate | String | Optional. The start effective date of the connection in ISO 8601 date format. | |
endDate | String | Optional. The end effective date of the connection in ISO 8601 date format. | |
createdBy | — | String | The username of the user who created the hierarchy. |
createdTime | — | String | The time when the hierarchy was created, in ISO 8601 date-time format. |
updatedBy | — | String | The username of the user who last updated the hierarchy. |
updatedTime | — | String | The time when the hierarchy was last updated, in ISO 8601 date-time format. |
Example response
The following example shows the response body.
{
"type": "configuration/hierarchyTypes/TypeProduct",
"name": "Product Hierarchy",
"hasVersioning": true,
"hierarchyId": "0ABlc0A",
"instanceId": "0ABlc0A.0ABlgGQ",
"version": {
"versionId": "0ABlgGQ",
"name": "Version 1",
"status": "ACTIVE",
"effectiveStartDate": "2024-01-01",
"effectiveEndDate": "2026-12-31",
"description": "longDescription",
"context": "longContextDescription"
},
"firstConnection": {
"connectionId": "0ABmA6E",
"parent": {
"type": "configuration/sources/XYZ",
"value": "I12345",
"sourceTable": "USERS"
},
"child": {
"type": "configuration/sources/Reltio",
"value": "cldId"
},
"startDate": "2024-01-01",
"endDate": "2026-12-32"
},
"createdBy": "email@reltio.com",
"createdTime": "2025-04-01T13:30:00",
"updatedBy": "email@reltio.com",
"updatedTime": "2025-04-01T13:30:00"
}
Error codes and recommended actions
| HTTP status | Description | Recommended action |
|---|---|---|
400 Bad Request | The request contains invalid or missing parameters. | Review the error message, correct the request as indicated, and submit the request again. For example, if the error identifies a duplicate version name, specify a unique name before resubmitting the request. |