API Reference
/Catalog REST API
/- Delete Variant Attribute
Get Variant Attributes
Create Variant Attribute
Get Variant Attribute
Update Variant Attribute
Delete Variant Attribute
Deletes an attribute of the tenant's own from the Variant definition, or only takes it off one Variant 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 variant loses its value, and it leaves every Variant form |
onlyFromForm=true | It is only taken off the default Variant form; it stays declared, with every value |
onlyFromForm=true&attributeSetId=3 | It is only taken off the Variant 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/Variants/attributes('frmt_boxmaterial')?onlyFromForm=true&attributeSetId=3 HTTP/1.1
X-API-KEY: your-api-key-here- Sales Layer Catalog APIhttps://api2.saleslayer.com/catalog/Metadata/Variants/attributes('{attributeId}')
curl -i -X DELETE \
'https://api2.saleslayer.com/catalog/Metadata/Variants/attributes('\''{attributeId}'\'')?onlyFromForm=true&attributeSetId=0' \
-H 'X-API-KEY: string'