Description
Delete an existing category
URI
/api/account/{accountId}/configuration/le-categories/categories/{categoryId}?v=2.0
HTTP Methods
DELETE
Response Codes
200 OK
304 Not Modified
400 Bad Request
401 Not Authorized
403 Forbidden
404 Data not found
409 Conflict
500 Internal server error
Formats
JSON
Path Parameters
Parameter | Description | Notes |
accountId | LP site id | Validation fail error code: 400 Type: String |
Query Parameters
Parameter | Description | Notes |
select | dynamic selection of response fields | Default: $all alias: id,deleted,name,order,proposed Available aliases: $all: id,deleted,name,order,proposed $summary: id,deleted,name type: YOGA 'gdata' dialect validation error: 400 supported fields: any in response body **yoga GData dialect builder url: https://github.com/skyscreamer/yoga/wiki/Using-the-Selector-Builder-GUI |
return | determine the return policy | Default: none — return the active revision with no response body. 'order’ attribute is not maintained by the server Also accepts: active — return all active (non-deleted) categories with the response body all — return all categories with the response body, including the deleted categories On both 'active’ and 'all’ the 'order’ attribute is maintained by the server |
Request Headers
Header | Description |
Authorization | Contains token string to allow request authentication and authorization. See the doc for more details. |
If-Match | Contains AC Categories current revision number |
Response Headers
Header | Description |
ac-revision | This parameter specifies the version of the data object retrieved. You can use the If-Match parameter in the request to retrieve a specifc version using this parameter's value. after the operation |
Response Body
Delete a single category data, depends on the 'return’ query parameter
Delete category example:
Initial state:
Site contains 4 categories (id/order/name triplets): 11,1,"IPhone5”; 22,2,”Nexus5”; 33,3,”Nexus6”; 44,4,”IPhone5C”
After deletion of category id 11 state:
Site contains 3 active categories (id/order/name triplets): 22,1,"Nexus5”; 33,2,”Nexus6”; 44,3,”IPhone5C”
Note that 3 out of 4 existing order values are affected by the delete operation.
Response body without return policy specified (default = NONE): no response body
Response body with return policy ACTIVE
[{ "id":22, "deleted":false, "name":"Nexus5", "order":1, "proposed":true },{ "id":33, "deleted":false, "name":"Nexus6", "order":2, "proposed":true },{ "id":44, "deleted":false, "name":"IPhone5C", "order":3, "proposed":true }] |
Response body with return policy ALL
[{ "id":11, "deleted":true, "name":"IPhone5", "order":1, "proposed":true },{ "id":22, "deleted":false, "name":"Nexus5", "order":1, "proposed":true },{ "id":33, "deleted":false, "name":"Nexus6", "order":2, "proposed":true },{ "id":44, "deleted":false, "name":"IPhone5C", "order":3, "proposed":true }] |