Retrieve attribute definitions
| /pim/attribute-definitions/retrieve Retrieves information about attribute definitions. |
Resource path |
/api/core/v1/pim/attribute-definitions/retrieve |
HTTP method |
POST |
Request content type |
application/json |
Response content type |
|
Body parameters
Specified by AttributeDefinitionsRequest
-
ids: it might be used to get attribute definitions by id's
-
tids: it might be used to get attribute definitions by tid's
-
all: it might be used to get all attribute definitions. Default parameter value is false.
| If all parameter value is true, tids and ids values are ignored. |
| Attribute definitions are retrieved by tids OR ids. ids are ignored if the request contains tids and ids. |
Return Type
PimType with filled AttributeDefinitionsType. More info AttrDefinitionType
Responses
| Code | Message | Datatype |
|---|---|---|
200 |
PimType with filled AttributeDefinitionsType |
|
400 |
Invalid input provided |
|
401 |
Not authorized |
|
404 |
Not found |
|
500 |
An unknown internal error occurred |
Samples
| Please use transform endpoint to get the JSON/compact-JSON samples from the XML one. |
1. To get a list of attribute definitions by tids
curl
curl --location --request POST 'http://<OMN_SERVER>/api/core/v1/pim/attribute-definitions/retrieve' \
--header 'Authorization: Bearer <OMN_SERVER>' \
--header 'Content-Type: application/json' \
--data-raw '{
"tids": ["product_id", "product_title"]
}'
Request body
{
"tids": ["product_id", "product_title"]
}
Response body
<?xml version="1.0" encoding="UTF-8"?>
<pim xmlns="http://www.apollon.de/omn" schemaVersion="5.6.0">
<attrDefs>
<attrDef id="15210" tid="product_id" type="text">
<name>
<itm loc="en_EN">SKU product</itm>
<itm loc="de_DE">SKU Produkt</itm>
</name>
</attrDef>
<attrDef id="15211" tid="product_title" type="text">
<name>
<itm loc="en_EN">Title</itm>
<itm loc="de_DE">Titel</itm>
</name>
</attrDef>
</attrDefs>
<meta>
<itm key="messageType">request</itm>
<itm key="messageTime">2022-12-23T08:28:03.722Z</itm>
<itm key="sourceEnv">web</itm>
<itm key="itemInformationType">attrDefinition</itm>
</meta>
</pim>
2. To get a list of attribute definitions by ids
curl
curl --location --request POST 'http://<OMN_SERVER>/api/core/v1/pim/attribute-definitions/retrieve' \
--header 'Authorization: Bearer <OMN_SERVER>' \
--header 'Content-Type: application/json' \
--data-raw '{
"ids": [15210,15211]
}'
Request body
{
"ids": [15210,15211]
}
Response body
<?xml version="1.0" encoding="UTF-8"?>
<pim xmlns="http://www.apollon.de/omn" schemaVersion="5.6.0">
<attrDefs>
<attrDef id="15210" tid="product_id" type="text">
<name>
<itm loc="en_EN">SKU product</itm>
<itm loc="de_DE">SKU Produkt</itm>
</name>
</attrDef>
<attrDef id="15211" tid="product_title" type="text">
<name>
<itm loc="en_EN">Title</itm>
<itm loc="de_DE">Titel</itm>
</name>
</attrDef>
</attrDefs>
<meta>
<itm key="messageType">request</itm>
<itm key="messageTime">2022-12-23T08:33:00.633Z</itm>
<itm key="sourceEnv">web</itm>
<itm key="itemInformationType">attrDefinition</itm>
</meta>
</pim>
3. To get a list of all attribute definitions
curl
curl --location --request POST 'http://<OMN_SERVER>/api/core/v1/pim/attribute-definitions/retrieve' \
--header 'Authorization: Bearer <OMN_SERVER>' \
--header 'Content-Type: application/json' \
--data-raw '{
"all": true
}'
Request body
{
"all": true
}
Response body
<?xml version="1.0" encoding="UTF-8"?>
<pim xmlns="http://www.apollon.de/omn" schemaVersion="5.6.0">
<attrDefs>
<attrDef id="15210" tid="product_id" type="text">
<name>
<itm loc="en_EN">SKU product</itm>
<itm loc="de_DE">SKU Produkt</itm>
</name>
</attrDef>
<attrDef id="15219" tid="care_note" type="text">
<domainVals allowNewValue="false" mode="FULL" sortDirection="MANUAL">
<domainVal tid="Chlorine bleaching possible">
<itm loc="en_EN">Chlorine bleaching possible</itm>
<itm loc="de_DE">Chlorbleiche möglich</itm>
</domainVal>
...
</domainVals>
<multiValued>true</multiValued>
<name>
<itm loc="en_EN">Care note</itm>
<itm loc="de_DE">Pflegehinweis</itm>
</name>
</attrDef>
...
</attrDefs>
<meta>
<itm key="messageType">request</itm>
<itm key="messageTime">2022-12-23T07:20:36.916Z</itm>
<itm key="sourceEnv">web</itm>
<itm key="itemInformationType">attrDefinition</itm>
</meta>
</pim>