Retrieve classifications

/pim/classes/retrieve Retrieve classifications information without or with nodes and nodes attributes.

The endpoint could provide information about classifications, nodes and nodes attributes.

Table 1. Details

Resource path

/api/core/v1/pim/classes/retrieve

HTTP method

POST

Request content type

application/json

Response content type

  • application/xml; charset=UTF-8;

  • application/json

  • application/json+compact

Body parameters

Specified by ClassificationRequest

  • ids: it might be used to get classifications by id's

  • tids: it might be used to get classifications by tid's

  • withNodes: it might be used to get classifications with nodes

  • flatNodes: it might be used to get classification nodes in flat structure. By default parameter value is true.

  • By default withNodes parameter value is false.

  • If withNodes parameter value is true nodes are returned with all attributes.

  • To gel all classifications ids and tids parameters should be absent or empty.

Return Type
Responses
Table 2. Http response codes
Code Message Datatype

200

PimType with filled ClassificationsType

PimType

400

Invalid input provided

ResponseType

401

Not authorized

ResponseType

404

Not found

ResponseType

500

An unknown internal error occurred

ResponseType

Samples
Please use transform endpoint to get the JSON/compact-JSON samples from the XML one.
1. To get a list of classifications by tids without nodes
curl
curl --location --request POST 'http://<OMN_SERVER>/api/core/v1/pim/classes/retrieve' \
--header 'Authorization: Bearer <TOKEN>' \
--header 'Content-Type: application/json' \
--header 'Accept: application/xml (or application/json)' \
--data-raw '{
    "tids":["Standard", "Standart"]
}'
Request body
{
    "tids":["Standard", "Standart"]
}
Response body XML
<?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-12-21T08:44:09.377Z</itm>
        <itm key="sourceEnv">web</itm>
        <itm key="itemInformationType">classification</itm>
    </meta>
    <classes>
        <class tid="Standard">
            <name/>
        </class>
        <class tid="Standart">
            <name/>
        </class>
    </classes>
</pim>
Response body JSON
{
  "meta": {
    "messageType": "request",
    "messageTime": "2022-12-21T08:44:09.377Z",
    "sourceEnv": "web",
    "itemInformationType": "classification"
  },
  "classes": {
    "entries": [
      {
        "name": {},
        "tid": "Standard"
      },
      {
        "name": {},
        "tid": "Standart"
      }
    ]
  },
  "schemaVersion": "5.6.0"
}
2. To get a list of classifications by ids without nodes
curl
curl --location --request POST 'http://<OMN_SERVER>/api/core/v1/pim/classes/retrieve' \
--header 'Authorization: Bearer <TOKEN>' \
--header 'Content-Type: application/json' \
--header 'Accept: application/xml (or application/json)' \
--data-raw '{
    "ids":[15360, 1]
}'
Request body
{
    "ids":[15360, 1]
}
Response body XML
<?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-12-21T08:48:01.469Z</itm>
        <itm key="sourceEnv">web</itm>
        <itm key="itemInformationType">classification</itm>
    </meta>
    <classes>
        <class tid="Standard">
            <name/>
        </class>
        <class tid="Standart">
            <name/>
        </class>
    </classes>
</pim>
Response body JSON
{
  "meta": {
    "messageType": "request",
    "messageTime": "2022-12-21T08:44:09.377Z",
    "sourceEnv": "web",
    "itemInformationType": "classification"
  },
  "classes": {
    "entries": [
      {
        "name": {},
        "tid": "Standard"
      },
      {
        "name": {},
        "tid": "Standart"
      }
    ]
  },
  "schemaVersion": "5.6.0"
}
3. To get a list of classifications by tids with nodes and attributes in flat structure
curl
curl --location --request POST 'http://<OMN_SERVER>/api/core/v1/pim/classes/retrieve' \
--header 'Authorization: Bearer <TOKEN>' \
--header 'Content-Type: application/json' \
--data-raw '{
    "tids":["Standard"],
    "withNodes":true
}'
Request body
{
    "tids":["Standard"],
    "withNodes":true
}
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-12-21T09:06:52.939Z</itm>
        <itm key="sourceEnv">web</itm>
        <itm key="itemInformationType">classification</itm>
    </meta>
    <classes>
        <class tid="Standard">
            <name/>
        </class>
    </classes>
    <nodes>
        <node class="Standard" id="15370" path="/Standard">
            <name/>
            <attr inheritance="visible"
               key="gender"
               level="p"
               localized="true"
               restriction="optional">
                <domainVals allowNewValue="false" sortDirection="MANUAL">
                    <domainVal tid="female">
                        <itm loc="en_EN">female</itm>
                        <itm loc="de_DE">weiblich</itm>
                    </domainVal>
                </domainVals>
            </attr>
        </node>
        <node class="Standard"
            id="15371"
            parentId="15370"
            parentPath="/Standard"
            path="/Standard/Bekleidung">
            <name/>
        </node>
    </nodes>
</pim>
4. To get a list of classifications by tids with nodes and attributes in tree structure
curl
curl --location --request POST 'http://<OMN_SERVER>/api/core/v1/pim/classes/retrieve' \
--header 'Authorization: Bearer <TOKEN>' \
--header 'Content-Type: application/json' \
--data-raw '{
    "tids":["Standard"],
    "withNodes":true,
    "flatNodes": false
}'
Request body
{
    "tids":["Standard"],
    "withNodes":true,
    "flatNodes": false
}
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-12-21T09:15:21.161Z</itm>
        <itm key="sourceEnv">web</itm>
        <itm key="itemInformationType">classification</itm>
    </meta>
    <classes>
        <class tid="Standard">
            <name/>
            <node class="Standard" id="15370" path="/Standard">
                <name/>
                <attr inheritance="visible"
                   key="gender"
                   level="p"
                   localized="true"
                   restriction="optional">
                    <domainVals allowNewValue="false" sortDirection="MANUAL">
                        <domainVal tid="female">
                            <itm loc="en_EN">female</itm>
                            <itm loc="de_DE">weiblich</itm>
                        </domainVal>
                    </domainVals>
                </attr>
                <node class="Standard"
                    id="15371"
                    parentId="15370"
                    parentPath="/Standard"
                    path="/Standard/Bekleidung">
                    <name/>
                </node>
            </node>
        </class>
    </classes>
</pim>
5. To get a list of all classifications
curl
Absent tids and ids lists
curl --location --request POST 'http://<OMN_SERVER>/api/core/v1/pim/classes/retrieve' \
--header 'Authorization: Bearer <TOKEN>' \
--header 'Content-Type: application/json' \
--data-raw '{

}'
Absent ids and empty tids lists
curl --location --request POST 'http://<OMN_SERVER>/api/core/v1/pim/classes/retrieve' \
--header 'Authorization: Bearer <TOKEN>' \
--header 'Content-Type: application/json' \
--data-raw '{
    "tids": []
}'
Absent tids and empty ids list
curl --location --request POST 'http://<OMN_SERVER>/api/core/v1/pim/classes/retrieve' \
--header 'Authorization: Bearer <TOKEN>' \
--header 'Content-Type: application/json' \
--data-raw '{
    "ids": []
}'
Request bodies
{
}
{
  "tids": []
}
{
  "ids": []
}
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-12-21T09:24:29.058Z</itm>
        <itm key="sourceEnv">web</itm>
        <itm key="itemInformationType">classification</itm>
    </meta>
    <classes>
        <class tid="Standart">
            <name/>
        </class>
        <class tid="Standard">
            <name/>
        </class>
    </classes>
</pim>

Welcome to the AI Chat!

Write a prompt to get started...