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:

  1. product tid

  2. product id

  3. attribute definition id

  4. attribute definition tid

  5. attribute id

Table 1. Details

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
Table 2. Http response codes
Code Message Datatype

200

Found classification nodes ids.

NodesRequest

400

Invalid input provided

ResponseType

401

Not authorized

ResponseType

500

An unknown internal error occurred

ResponseType

Samples
Query classification nodes
curl
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
}'
Request body. By product id
{
    "productId": 18765
}
Request body. By product tid
{
    "productTid": "A239A197-5287-494A-B5EE-36F3EB0E95AB"
}
Request body. By attribute id
{
    "attributeId": "986655"
}
Request body. By attribute definition id
{
    "attributeDefinitionId": "778554"
}
Request body. By attribute definition tid
{
    "attributeDefinitionTid": "7D534991-B623-418C-A7CB-A273C877A37D"
}
Response body
{
    "ids": [756362, 34345, 43213],
    "level": 1
}

Retrieve classification nodes

/pim/nodes/retrieve Returns nodes structure with attributes.
Table 3. Details

Resource path

/api/core/v1/pim/nodes/retrieve

HTTP method

POST

Request content type

application/json

Response content type

  • application/xml; charset=UTF-8;

  • application/json

  • application/json+compact

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
Table 4. Http response codes
Code Message Datatype

200

PimType with list of nodes

PimType

500

Error in ResponseType

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
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
}'
Request body. By id
{
    "classificationId": 18765
}
Request body. By tid
{
    "classificationTid": "Standard"
}
Response body
<?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
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
}'
Request body
{
    "path": "/Standard",
    "level": 1
}
Response body
<?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
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]
}'
Request body
{
    "ids": [114740]
}
Response body
<?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
No path or id or classificationId in the request
<?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>
Level should not be 0
<?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.
Table 5. Details

Resource path

/api/core/v1/pim/nodes/persist

HTTP method

POST

Request content type

  • application/xml; charset=UTF-8;

  • application/json

  • application/json+compact

Response content type

  • application/xml; charset=UTF-8;

  • application/json

  • application/json+compact

API restriction for users without admin role - endpoint is not available.
Body parameters
Return Type

PimType with statuses ResponsesType about each persisted node.

Responses
Table 6. Http response codes
Code Message Datatype

200

PimType with responses

PimType

500

Error in ResponseType

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>'
Request body. By parent id
<?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>
Request body. By parent path
<?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>
Response body
<?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>'
Request body
<?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>
Response body
<?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.

Request body. By path
<?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>
Request body. By id
<?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>
Response body
<?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
Creation. No parent node by id
<?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>
Creation. No parent node by path
<?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>
Update. No node by id
<?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>
Update. No node by path
<?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>
No access to the endpoint
<?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>
No classification by identifier
<?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:

  1. Delete

Table 7. Details

Resource path

/api/core/v1/pim/nodes/perform

HTTP method

POST

Request content type

  • application/xml; charset=UTF-8;

  • application/json

  • application/json+compact

Response content type

  • application/xml; charset=UTF-8;

  • application/json

  • application/json+compact

Body parameters

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:

  1. 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)

Table 8. Delete action parameters
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.
Table 9. Http response codes
Code Message Datatype

200

PimType with filled ResponsesType.

PimType

400

Invalid input provided

ResponseType

500

An unknown internal error occurred

ResponseType

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>'
Request body. By id
<?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>
Request body. By path
<?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>
Response body
<?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
No node by identifier
<?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>
Exception during removing
<?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>
No access to the endpoint action
<?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>

Welcome to the AI Chat!

Write a prompt to get started...