Classification Nodes API
Provides operations on OMN Classification nodes.
Query classification nodes
| /pim/nodes/query Gets node ids. |
Allow to query classification nodes ids by:
-
product tid
-
product id
-
attribute definition id
-
attribute definition tid
-
attribute id
Resource path |
/api/core/v1/pim/nodes/query |
HTTP method |
POST |
Request content type |
application/json; |
Response content type |
application/json; |
| API restriction for users without admin role - endpoint is not available. |
Body parameters
Specified by NodesQueryRequest
Return Type
Specified by NodesRequest
Responses
| Code | Message | Datatype |
|---|---|---|
200 |
Found classification nodes ids. |
|
400 |
Invalid input provided |
|
401 |
Not authorized |
|
500 |
An unknown internal error occurred |
Samples
Query classification nodes
curl --location --request POST 'https://<OMN_SERVER>/api/core/v1/pim/nodes/retrieve' \
--header 'Authorization: Bearer <TOKEN>' \
--header 'Content-Type: application/json' \
--data-raw '{
"productId": 123
}'
{
"productId": 18765
}
{
"productTid": "A239A197-5287-494A-B5EE-36F3EB0E95AB"
}
{
"attributeId": "986655"
}
{
"attributeDefinitionId": "778554"
}
{
"attributeDefinitionTid": "7D534991-B623-418C-A7CB-A273C877A37D"
}
{
"ids": [756362, 34345, 43213],
"level": 1
}
Retrieve classification nodes
| /pim/nodes/retrieve Returns nodes structure with attributes. |
Resource path |
/api/core/v1/pim/nodes/retrieve |
HTTP method |
POST |
Request content type |
application/json |
Response content type |
|
| API restriction for users without admin role - endpoint is not available. |
Body parameters
Specified by NodesRequest
Return Type
PimType with filled ClassificationNodesType. Represents flatten tree structure
Responses
| Code | Message | Datatype |
|---|---|---|
200 |
PimType with list of nodes |
|
500 |
Error in ResponseType |
Samples
| Please use transform endpoint to get the JSON/compact-JSON samples from the XML one. |
Get a root node of the classification by tid/id
curl --location --request POST 'https://<OMN_SERVER>/api/core/v1/pim/nodes/retrieve' \
--header 'Authorization: Bearer <TOKEN>' \
--header 'Content-Type: application/json' \
--data-raw '{
"classificationId": 18765
}'
{
"classificationId": 18765
}
{
"classificationTid": "Standard"
}
<?xml version="1.0" encoding="UTF-8"?>
<pim xmlns="http://www.apollon.de/omn" schemaVersion="5.6.0">
<meta>
<itm key="messageType">request</itm>
<itm key="messageTime">2022-09-27T12:41:38.795Z</itm>
<itm key="sourceEnv">web</itm>
<itm key="itemInformationType">node</itm>
</meta>
<nodes>
<node id="15270"
path="/"
tid="Standard">
<name/>
</node>
</nodes>
</pim>
Get children of node by path
curl --location --request POST 'https://<OMN_SERVER>/api/core/v1/pim/nodes/retrieve' \
--header 'Authorization: Bearer <TOKEN>' \
--header 'Content-Type: application/json' \
--data-raw '{
"path": "/Root",
"level": 1
}'
{
"path": "/Standard",
"level": 1
}
<?xml version="1.0" encoding="UTF-8"?>
<pim xmlns="http://www.apollon.de/omn" schemaVersion="5.6.0">
<meta>
<itm key="messageType">request</itm>
<itm key="messageTime">2022-09-27T12:41:38.795Z</itm>
<itm key="sourceEnv">web</itm>
<itm key="itemInformationType">node</itm>
</meta>
<nodes>
<node id="15271" parentId="15270" path="/Standard/Bekleidung" tid="Bekleidung">
<name/>
</node>
<node id="114740" parentId="15270" path="/Standard/Test" tid="Test">
<name/>
</node>
</nodes>
</pim>
Get nodes by ids
curl --location --request POST 'https://<OMN_SERVER>/api/core/v1/pim/nodes/retrieve' \
--header 'Authorization: Bearer <TOKEN>' \
--header 'Content-Type: application/json' \
--data-raw '{
"ids": [114740]
}'
{
"ids": [114740]
}
<?xml version="1.0" encoding="UTF-8"?>
<pim xmlns="http://www.apollon.de/omn" schemaVersion="5.6.0">
<meta>
<itm key="messageType">request</itm>
<itm key="messageTime">2022-09-27T12:41:38.795Z</itm>
<itm key="sourceEnv">web</itm>
<itm key="itemInformationType">node</itm>
</meta>
<nodes>
<node id="114740" parentId="15270" path="/Standard/Test" tid="Test">
<name/>
</node>
</nodes>
</pim>
Error responses
<?xml version="1.0" encoding="UTF-8"?>
<response xmlns="http://www.apollon.de/omn">
<details>
<itm key="supportId">3de17988-a17c-4341-bf57-024753d636c8</itm>
</details>
<issues>
<itm key="code">1001</itm>
<itm key="description">Invalid input provided</itm>
<itms type="details">
<itm key="errorMessage">Path or ids array or classificationId should be provided to get nodes</itm>
</itms>
</issues>
<status>ERROR</status>
</response>
<?xml version="1.0" encoding="UTF-8"?>
<response xmlns="http://www.apollon.de/omn">
<details>
<itm key="supportId">1737617c-3718-411a-b113-5121d8b679bb</itm>
</details>
<issues>
<itm key="code">1001</itm>
<itm key="description">Invalid input provided</itm>
<itms type="details">
<itm key="errorMessage">The level should not be 0</itm>
</itms>
</issues>
<status>ERROR</status>
</response>
Persist classification nodes
| /pim/nodes/persist Saves nodes structure. Several nodes could be persisted. |
Resource path |
/api/core/v1/pim/nodes/persist |
HTTP method |
POST |
Request content type |
|
Response content type |
|
| API restriction for users without admin role - endpoint is not available. |
Body parameters
Accepts PimType with ClassificationNodesType
Return Type
PimType with statuses ResponsesType about each persisted node.
Responses
| Code | Message | Datatype |
|---|---|---|
200 |
PimType with responses |
|
500 |
Error in ResponseType |
Samples
| Please use transform endpoint to get the JSON/compact-JSON samples from the XML one. |
Create a node
curl
curl --location --request POST 'https://<OMN_SERVER>/api/core/v1/pim/nodes/persist' \
--header 'Authorization: Bearer <TOKEN>' \
--header 'Content-Type: application/xml; charset=UTF-8;' \
--data-raw '<?xml version="1.0" encoding="UTF-8"?>
<pim xmlns="http://www.apollon.de/omn" schemaVersion="5.6.0">
<nodes>
<node
parentId="123"
tid="Accessories">
<name>
<itm loc="en_EN">Accessories EN</itm>
<itm loc="de_DE">Accessories DE</itm>
<itm loc="fr_FR">Accessories FR</itm>
</name>
</node>
</nodes>
</pim>'
<?xml version="1.0" encoding="UTF-8"?>
<pim xmlns="http://www.apollon.de/omn" schemaVersion="5.6.0">
<nodes>
<node
parentId="123"
tid="Accessories">
<name>
<itm loc="en_EN">Accessories EN</itm>
<itm loc="de_DE">Accessories DE</itm>
<itm loc="fr_FR">Accessories FR</itm>
</name>
</node>
</nodes>
</pim>
<?xml version="1.0" encoding="UTF-8"?>
<pim xmlns="http://www.apollon.de/omn" schemaVersion="5.6.0">
<nodes>
<node
parentPath="/Standard/Bekleidung"
tid="Accessories">
<name>
<itm loc="en_EN">Accessories EN</itm>
<itm loc="de_DE">Accessories DE</itm>
<itm loc="fr_FR">Accessories FR</itm>
</name>
</node>
</nodes>
</pim>
<?xml version="1.0" encoding="UTF-8"?>
<pim xmlns="http://www.apollon.de/omn" schemaVersion="5.6.0">
<meta>
<itm key="messageType">request</itm>
<itm key="messageTime">2022-10-21T08:22:23.363Z</itm>
<itm key="sourceEnv">web</itm>
</meta>
<responses>
<response action="create"
dataType="classNode"
id="110140"
path="/Standard/Bekleidung/Accessories"
tid="Accessories">
<status>SUCCESS</status>
<description>Node has been saved</description>
</response>
</responses>
</pim>
Create a root node
curl
curl --location --request POST 'https://<OMN_SERVER>/api/core/v1/pim/nodes/persist' \
--header 'Authorization: Bearer <TOKEN>' \
--header 'Content-Type: application/xml; charset=UTF-8;' \
--data-raw '<?xml version="1.0" encoding="UTF-8"?>
<pim xmlns="http://www.apollon.de/omn" schemaVersion="5.6.0">
<nodes>
<node
classificationTid="Standart"
tid="Standart">
<name>
<itm loc="en_EN">Standart EN</itm>
<itm loc="de_DE">Standart DE</itm>
</name>
</node>
</nodes>
</pim>'
<?xml version="1.0" encoding="UTF-8"?>
<pim xmlns="http://www.apollon.de/omn" schemaVersion="5.6.0">
<nodes>
<node
classificationTid="Standart"
tid="Standart">
<name>
<itm loc="en_EN">Standart EN</itm>
<itm loc="de_DE">Standart DE</itm>
</name>
</node>
</nodes>
</pim>
<?xml version="1.0" encoding="UTF-8"?>
<pim xmlns="http://www.apollon.de/omn" schemaVersion="5.6.0">
<meta>
<itm key="messageType">request</itm>
<itm key="messageTime">2022-10-21T08:22:23.363Z</itm>
<itm key="sourceEnv">web</itm>
</meta>
<responses>
<response action="create"
dataType="classNode"
id="11040"
path="/Standard"
tid="Standart">
<status>SUCCESS</status>
<description>Node has been saved</description>
</response>
</responses>
</pim>
Update a node
curl
curl --location --request POST 'https://<OMN_SERVER>/api/core/v1/pim/nodes/persist' \
--header 'Authorization: Bearer <TOKEN>' \
--header 'Content-Type: application/xml; charset=UTF-8;' \
--data-raw '<?xml version="1.0" encoding="UTF-8"?>
<pim xmlns="http://www.apollon.de/omn" schemaVersion="5.6.0">
<nodes>
<node path="/Standard" tid="Standard">
<name>
<itm loc="en_EN">Standard EN 1</itm>
<itm loc="fr_FR">Standard FR 1</itm>
</name>
</node>
</nodes>
</pim>'
Several nodes could be persisted.
<?xml version="1.0" encoding="UTF-8"?>
<pim xmlns="http://www.apollon.de/omn" schemaVersion="5.6.0">
<nodes>
<node path="/Standard" tid="Standard">
<name>
<itm loc="en_EN">Standard EN 1</itm>
<itm loc="fr_FR">Standard FR 1</itm>
</name>
</node>
</nodes>
</pim>
<?xml version="1.0" encoding="UTF-8"?>
<pim xmlns="http://www.apollon.de/omn" schemaVersion="5.6.0">
<nodes>
<node id="654332" tid="Standard">
<name>
<itm loc="en_EN">Standard EN 1</itm>
<itm loc="fr_FR">Standard FR 1</itm>
</name>
</node>
</nodes>
</pim>
<?xml version="1.0" encoding="UTF-8"?>
<pim xmlns="http://www.apollon.de/omn" schemaVersion="5.6.0">
<meta>
<itm key="messageType">request</itm>
<itm key="messageTime">2022-10-21T08:22:23.363Z</itm>
<itm key="sourceEnv">web</itm>
</meta>
<responses>
<response action="update"
dataType="classNode"
id="654332"
path="/Standard"
tid="Standart">
<status>SUCCESS</status>
<description>Node has been saved</description>
</response>
</responses>
</pim>
Error responses
<?xml version="1.0" encoding="UTF-8"?>
<pim xmlns="http://www.apollon.de/omn" schemaVersion="5.6.0">
<meta>
<itm key="messageType">request</itm>
<itm key="messageTime">2022-11-04T13:56:20.501Z</itm>
<itm key="sourceEnv">web</itm>
</meta>
<responses>
<response action="create" dataType="classNode" tid="AAAA12">
<status>ERROR</status>
<description>An error occurred while node creation. Parent node path: null, or id: 1147412, node: AAAA12, the reason: Node with id 1147412 does not exist.</description>
</response>
</responses>
</pim>
<?xml version="1.0" encoding="UTF-8"?>
<pim xmlns="http://www.apollon.de/omn" schemaVersion="5.6.0">
<meta>
<itm key="messageType">request</itm>
<itm key="messageTime">2022-11-04T13:56:20.501Z</itm>
<itm key="sourceEnv">web</itm>
</meta>
<responses>
<response action="create" dataType="classNode" tid="AAAA11">
<status>ERROR</status>
<description>An error occurred while node creation. Parent node path: /Root/node1, or id: null, node: AAAA11, the reason: Node with path '[Root, node1]' does not exist.</description>
</response>
</responses>
</pim>
<?xml version="1.0" encoding="UTF-8"?>
<pim xmlns="http://www.apollon.de/omn" schemaVersion="5.6.0">
<meta>
<itm key="messageType">request</itm>
<itm key="messageTime">2022-11-04T13:57:20.483Z</itm>
<itm key="sourceEnv">web</itm>
</meta>
<responses>
<response action="update"
dataType="classNode"
id="1147423"
path="/Standard/AAAA1/AAAA12"
tid="AAAA12">
<status>ERROR</status>
<description>Node with id 1147423 does not exist.</description>
</response>
</responses>
</pim>
<?xml version="1.0" encoding="UTF-8"?>
<pim xmlns="http://www.apollon.de/omn" schemaVersion="5.6.0">
<meta>
<itm key="messageType">request</itm>
<itm key="messageTime">2022-11-04T13:57:20.483Z</itm>
<itm key="sourceEnv">web</itm>
</meta>
<responses>
<response action="update"
dataType="classNode"
path="/Standard/AAAA1/AAAA12/Gürtel"
tid="Gürtel">
<status>ERROR</status>
<description>Node with path '[Standard, AAAA1, AAAA12, Gürtel]' does not exist.</description>
</response>
</responses>
</pim>
<?xml version="1.0" encoding="UTF-8"?>
<response xmlns="http://www.apollon.de/omn">
<details>
<itm key="supportId">bb58d0b5-231a-4097-bd05-9c447615899c</itm>
</details>
<issues>
<itm key="code">1010</itm>
<itm key="description">Access to the requested resource endpoint is forbidden</itm>
<itms type="details">
<itm key="errorMessage">Nodes persist API is restricted for users</itm>
</itms>
</issues>
<status>ERROR</status>
</response>
<?xml version="1.0" encoding="UTF-8"?>
<pim xmlns="http://www.apollon.de/omn" schemaVersion="5.6.0">
<meta>
<itm key="messageType">request</itm>
<itm key="messageTime">2022-11-04T13:48:55.442Z</itm>
<itm key="sourceEnv">web</itm>
</meta>
<responses>
<response action="create" dataType="classNode" tid="AAAA111">
<status>ERROR</status>
<description>An error occurred while node creation. Parent node path: null, or id: null, node: AAAA111, the reason: No classification by name: Standard1</description>
</response>
</responses>
</pim>
Perform actions on classification nodes
| /pim/nodes/perform Deletes nodes. |
Available action types:
-
Delete
Resource path |
/api/core/v1/pim/nodes/perform |
HTTP method |
POST |
Request content type |
|
Response content type |
|
Body parameters
PimType with ActionTypes
Some actions require additional info that should be provided in MetaType in key/value way.
ActionType's type is required and be provided.
Possible values:
-
delete
ActionType's dataType is - classNode
|
Tables legend
"As <action> attribute" describes, that parameter is in the xml attribute of <action> tag. Otherwise, parameter should be in ItemType. "Required groups" - one of parameter in the one group is required e.g. entity identifier (e.g. tid or id or path) |
| Parameter Name | As <action> attribute | Required | Type | Description | Format |
|---|---|---|---|---|---|
id |
X |
X G1 |
Long |
id of the node that should be deleted |
|
path |
X |
X G1 |
string |
path of the node that should be deleted |
Return Type
PimType with filled ResponsesType
Response types contains status information about each action passed to perform.
Responses
| Actions are processed separately. Exceptions thrown during the execution of actions will be reported in ResponseType. |
| Code | Message | Datatype |
|---|---|---|
200 |
PimType with filled ResponsesType. |
|
400 |
Invalid input provided |
|
500 |
An unknown internal error occurred |
Samples
| Please use transform endpoint to get the JSON/compact-JSON samples from the XML one. |
Delete
curl
curl --location --request POST 'https://<OMN_SERVER>/api/core/v1/pim/nodes/perform' \
--header 'Authorization: Bearer <TOKEN>' \
--header 'Content-Type: application/json' \
--data-raw '<?xml version="1.0" encoding="UTF-8"?>
<pim xmlns="http://www.apollon.de/omn" schemaVersion="5.6.0">
<actions>
<action dataType="classNode" id="759365" type="delete"/>
</actions>
</pim>'
<?xml version="1.0" encoding="UTF-8"?>
<pim xmlns="http://www.apollon.de/omn" schemaVersion="5.6.0">
<actions>
<action dataType="classNode" id="759365" type="delete"/>
</actions>
</pim>
<?xml version="1.0" encoding="UTF-8"?>
<pim xmlns="http://www.apollon.de/omn" schemaVersion="5.6.0">
<actions>
<action dataType="classNode" path="/Root/Node1/Node1.1/" type="delete"/>
</actions>
</pim>
<?xml version="1.0" encoding="UTF-8"?>
<pim xmlns="http://www.apollon.de/omn" schemaVersion="5.6.0">
<meta>
<itm key="messageType">request</itm>
<itm key="messageTime">2022-06-04T13:24:53.286Z</itm>
<itm key="sourceEnv">web</itm>
</meta>
<responses>
<response dataType="classNode"
id="759365"
action="delete">
<status>SUCCESS</status>
<description>The node has been deleted successfully</description>
</response>
</responses>
</pim>
Error responses
<?xml version="1.0" encoding="UTF-8"?>
<pim xmlns="http://www.apollon.de/omn" schemaVersion="5.6.0">
<meta>
<itm key="messageType">request</itm>
<itm key="messageTime">2022-06-04T13:36:54.983Z</itm>
<itm key="sourceEnv">web</itm>
</meta>
<responses>
<response dataType="classNode"
id="4444"
action="delete">
<status>ERROR</status>
<description>There is no node with the given path or id</description>
</response>
</responses>
</pim>
<?xml version="1.0" encoding="UTF-8"?>
<pim xmlns="http://www.apollon.de/omn" schemaVersion="5.6.0">
<meta>
<itm key="messageType">request</itm>
<itm key="messageTime">2022-06-04T13:38:16.444Z</itm>
<itm key="sourceEnv">web</itm>
</meta>
<responses>
<response dataType="classNode"
id="4444"
action="delete">
<status>ERROR</status>
<description>The node could not be deleted. Reason: {errormessage}</description>
</response>
</responses>
</pim>
<?xml version="1.0" encoding="UTF-8"?>
<pim xmlns="http://www.apollon.de/omn" schemaVersion="5.6.0">
<meta>
<itm key="messageType">request</itm>
<itm key="messageTime">2022-10-11T12:14:28.978Z</itm>
<itm key="sourceEnv">web</itm>
</meta>
<responses>
<response dataType="classNode">
<status>ERROR</status>
<description>Nodes delete API is restricted for the user</description>
</response>
</responses>
</pim>