Perform attribute definitions
| /pim/attribute-definitions/perform Deletes attribute definitions. |
Allow to
-
Delete attribute definition by id
-
Delete attribute definition by identifier
Resource path |
/api/core/v1/pim/attribute-definitions/perform |
HTTP method |
POST |
Request content type |
|
Response content type |
|
Body parameters
Accepts PimType with ActionsType.
| The API consumer should provide only one of the attribute definitions identifiers: identifiers or ids in all actions. |
Return Type
PimType with statuses ResponsesType about each performed attribute definition.
Responses
| Code | Message | Datatype |
|---|---|---|
200 |
PimType with filled ResponsesType |
|
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. Delete attribute definition by identifier
curl
curl --location 'http://<OMN_SERVER>/api/core/v1/pim/attribute-definitions/perform' \
--header 'Authorization: Bearer <TOKEN>' \
--header 'Content-Type: application/xml' \
--data '<?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-04T10:10:16.774Z</itm>
<itm key="sourceEnv">web</itm>
</meta>
<actions>
<action dataType="attrDefinition" tid="product_tid" type="delete"/>
</actions>
</pim>'
Request 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-04T10:10:16.774Z</itm>
<itm key="sourceEnv">web</itm>
</meta>
<actions>
<action dataType="attrDefinition" tid="product_tid" 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">2023-02-14T11:29:11.613Z</itm>
<itm key="sourceEnv">web</itm>
</meta>
<responses>
<response action="delete" dataType="attrDefinition" tid="product_tid">
<description>The attribute definition has been deleted successfully</description>
<status>SUCCESS</status>
</response>
</responses>
</pim>
2. Delete attribute definition by id
curl
curl --location 'http://<OMN_SERVER>/api/core/v1/pim/attribute-definitions/perform' \
--header 'Authorization: Bearer <TOKEN>' \
--header 'Content-Type: application/xml' \
--data '<?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-04T10:10:16.774Z</itm>
<itm key="sourceEnv">web</itm>
</meta>
<actions>
<action dataType="attrDefinition" id="45260" type="delete"/>
</actions>
</pim>'
Request 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-04T10:10:16.774Z</itm>
<itm key="sourceEnv">web</itm>
</meta>
<actions>
<action dataType="attrDefinition" id="45260" 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">2023-02-14T11:35:08.230Z</itm>
<itm key="sourceEnv">web</itm>
</meta>
<responses>
<response action="delete" dataType="attrDefinition" id="45260">
<description>The attribute definition has been deleted successfully</description>
<status>SUCCESS</status>
</response>
</responses>
</pim>
Error response examples
The attribute definition does not exist
<?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">2023-02-14T11:37:25.990Z</itm>
<itm key="sourceEnv">web</itm>
</meta>
<responses>
<response action="delete" dataType="attrDefinition" id="45260">
<description>There is no attribute definition with the given tid or id</description>
<status>ERROR</status>
</response>
</responses>
</pim>
The attribute definition could not be deleted
<?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">2023-02-14T11:37:25.990Z</itm>
<itm key="sourceEnv">web</itm>
</meta>
<responses>
<response dataType="attrDefinition"
tid="product_tid"
action="delete">
<status>ERROR</status>
<description>The attribute definition could not be deleted. Reason: {errormessage}</description>
</response>
</responses>
</pim>