API Reference
/Catalog REST API
/- Delete Product Attribute
Get Product Attributes
Create Product Attribute
Get Product Attribute
Update Product Attribute
Delete Product Attribute
Deletes an attribute of the tenant's own from the Product definition, or only takes it off one Product form, within the request. No snapshot is taken before: nothing keeps what it changes. The attributes of the platform's own cannot be deleted.
| Parameters | Effect |
|---|---|
| none | The attribute is deleted: every product loses its value, and it leaves every Product form |
onlyFromForm=true | It is only taken off the default form; it stays declared, with every value |
onlyFromForm=true&attributeSetId=3 | It is only taken off the form of attribute set 3 |
attributeSetId without onlyFromForm=true is refused.
A query parameter other than onlyFromForm and attributeSetId is refused with a 400, and nothing is deleted: a misspelt onlyFromForm would otherwise delete the attribute from every form.
204 No Content — the attribute is deleted, or taken off the form. 409 Conflict — it belongs to the platform, or a change to it is already pending.
DELETE /Metadata/Products/attributes('prod_boxmaterial')?onlyFromForm=true&attributeSetId=3 HTTP/1.1
X-API-KEY: your-api-key-here- Sales Layer Catalog APIhttps://api2.saleslayer.com/catalog/Metadata/Products/attributes('{attributeId}')
curl -i -X DELETE \
'https://api2.saleslayer.com/catalog/Metadata/Products/attributes('\''{attributeId}'\'')?onlyFromForm=true&attributeSetId=0' \
-H 'X-API-KEY: string'