Atributy
Smazat atribut
Trvalé smazání atributu pouze v případě, že nemá žádné závislosti.
DELETE
/
attributes
/
{key}
Permanently delete an unused Attribute
curl --request DELETE \
--url https://app.productlasso.com/api/v1/attributes/{key} \
--header 'Authorization: Bearer <token>'const options = {method: 'DELETE', headers: {Authorization: 'Bearer <token>'}};
fetch('https://app.productlasso.com/api/v1/attributes/{key}', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://app.productlasso.com/api/v1/attributes/{key}"
headers = {"Authorization": "Bearer <token>"}
response = requests.delete(url, headers=headers)
print(response.text){
"status_code": 123,
"error_type": "invalid_request",
"message": "<string>",
"request_id": "<string>",
"code": "<string>",
"retryable": true,
"attribute_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"attribute_key": "<string>",
"details": {},
"current_updated_at": "2023-11-07T05:31:56Z"
}{
"status_code": 123,
"error_type": "invalid_request",
"message": "<string>",
"request_id": "<string>",
"code": "<string>",
"retryable": true,
"attribute_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"attribute_key": "<string>",
"details": {},
"current_updated_at": "2023-11-07T05:31:56Z"
}{
"status_code": 409,
"error_type": "conflict",
"message": "Attribute is still in use",
"request_id": "9de9ae63-7a89-40d0-a101-47e006ea8233",
"code": "attribute_in_use",
"key": "material",
"total_count": 3,
"dependencies": {
"schemas": {
"count": 1
},
"jobs": {
"count": 2
}
}
}⌘I
Permanently delete an unused Attribute
curl --request DELETE \
--url https://app.productlasso.com/api/v1/attributes/{key} \
--header 'Authorization: Bearer <token>'const options = {method: 'DELETE', headers: {Authorization: 'Bearer <token>'}};
fetch('https://app.productlasso.com/api/v1/attributes/{key}', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://app.productlasso.com/api/v1/attributes/{key}"
headers = {"Authorization": "Bearer <token>"}
response = requests.delete(url, headers=headers)
print(response.text){
"status_code": 123,
"error_type": "invalid_request",
"message": "<string>",
"request_id": "<string>",
"code": "<string>",
"retryable": true,
"attribute_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"attribute_key": "<string>",
"details": {},
"current_updated_at": "2023-11-07T05:31:56Z"
}{
"status_code": 123,
"error_type": "invalid_request",
"message": "<string>",
"request_id": "<string>",
"code": "<string>",
"retryable": true,
"attribute_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"attribute_key": "<string>",
"details": {},
"current_updated_at": "2023-11-07T05:31:56Z"
}{
"status_code": 409,
"error_type": "conflict",
"message": "Attribute is still in use",
"request_id": "9de9ae63-7a89-40d0-a101-47e006ea8233",
"code": "attribute_in_use",
"key": "material",
"total_count": 3,
"dependencies": {
"schemas": {
"count": 1
},
"jobs": {
"count": 2
}
}
}
