Skip to content

Delete Product Attribute
Beta

Request

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.

Query parameters

ParametersEffect
noneThe attribute is deleted: every product loses its value, and it leaves every Product form
onlyFromForm=trueIt is only taken off the default form; it stays declared, with every value
onlyFromForm=true&attributeSetId=3It 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.

Response

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.

Example

DELETE /Metadata/Products/attributes('prod_boxmaterial')?onlyFromForm=true&attributeSetId=3 HTTP/1.1
X-API-KEY: your-api-key-here
Path
attributeIdstringrequired

The identifier of the attribute, matched exactly

Query
onlyFromFormboolean

True only takes the attribute off one form; left out, or false, deletes it

attributeSetIdinteger, (int32)

With onlyFromForm, the attribute set whose form it is taken off; left out, the default form

Headers
X-API-KEYstring

Tenant's API key (required)

curl -i -X DELETE \
  'https://api2.saleslayer.com/catalog/Metadata/Products/attributes('\''{attributeId}'\'')?onlyFromForm=true&attributeSetId=0' \
  -H 'X-API-KEY: string'

Responses

No Content

Response
No content