{"_id":"5697512159a6692d003fada0","parentDoc":null,"category":{"_id":"569742f459a6692d003fad8f","pages":["56974f48d231880d00676e6a","56975101d231880d00676e6c","5697511369393517000c82c8","5697512159a6692d003fada0","569752668560a60d00e2c268","569752898560a60d00e2c26b","569752add231880d00676e70","569752bd8400d52d00dd56ab","569752c769393517000c82cc","56e9cf33fae86b0e00e5394f","56e9cfe2af392b170035f68f"],"project":"5668fab608f90021008e882f","version":"5668fab608f90021008e8832","__v":11,"sync":{"url":"","isSync":false},"reference":true,"createdAt":"2016-01-14T06:40:52.350Z","from_sync":false,"order":1,"slug":"api-integration-rest-api","title":"REST API (For App/Backend)"},"editedParams":true,"user":"56839cf74aecbd0d00a4659e","project":"5668fab608f90021008e882f","version":{"_id":"5668fab608f90021008e8832","__v":19,"project":"5668fab608f90021008e882f","createdAt":"2015-12-10T04:08:22.769Z","releaseDate":"2015-12-10T04:08:22.769Z","categories":["5668fab708f90021008e8833","569740f124490c3700170a64","569742b58560a60d00e2c25d","569742bd0b09a41900b2446c","569742cd69393517000c82b3","569742f459a6692d003fad8f","569743020b09a41900b2446d","5697430b69393517000c82b5","56a17776470ae00d00c30642","56a2c48a831e2a0d0069b1ad","56b535757bccae0d00e9a1cd","56e1ff6aa49fdc0e005746b5","57e1c88115bf6522002a5e4e","57fa65275ba65a17008b988f","57fbeea34002550e004c032e","58474584889b6c2d00fb86e9","58475dcc64157f0f002f1907","587e7b5158666c2700965d4e","58a349fc30852819007ba083"],"is_deprecated":false,"is_hidden":false,"is_beta":false,"is_stable":true,"codename":"","version_clean":"1.18.0","version":"1.18"},"editedParams2":true,"__v":6,"updates":[],"next":{"pages":[],"description":""},"createdAt":"2016-01-14T07:41:21.831Z","link_external":false,"link_url":"https://documenter.getpostman.com/view/2166502/liftigniter/7TFGvSV#e0e13d5e-6f9f-3cd7-c7ce-60acb1a93f2b","githubsync":"","sync_unique":"","hidden":false,"api":{"examples":{"codes":[{"language":"curl","code":"curl -H \"Content-Type: application/json\" -X \"DELETE\" -d '{\n   \"apiKey\": \"YOUR_API_KEY\", // REPLACE WITH YOUR API KEY AND DELETE THIS COMMENT\n   \"items\": [\n       {\n         \"url\" : \"https://www.liftigniter.com/beautiful-sea/\"\n       },\n       {\n         \"url\" : \"https://www.liftigniter.com/happy-times/\"\n       }\n   ]\n}' https://api.petametrics.com/v1/inventory | python -mjson.tool","name":"cURL correct request"},{"name":"cURL incorrect request that fails to specify the inventory id field","language":"curl","code":"curl -H \"Content-Type: application/json\" -X \"DELETE\" -d '{\n   \"apiKey\": \"527ccb8c-0f33-47e5-bff8-d9c2bcaef59e\", // REPLACE WITH YOUR API KEY AND DELETE THIS COMMENT\n   \"items\": [\n       {\n         \"url\" : \"https://www.liftigniter.com/beautiful-sea/\"\n       },\n       {\n         \"title\" : \"LiftIgniter Page\"\n       }\n   ]\n}' https://api.petametrics.com/v1/inventory | python -mjson.tool"},{"name":"cURL rejected because of missing organization setting","language":"curl","code":"curl -H \"Content-Type: application/json\" -X \"DELETE\" -d '{\n  \"apiKey\" : \"a6f2ae1c-b2d8-4bce-a8e4-15b00bb26fa4\",\n  \"items\" : [\n    {\n      \"url\" : \"https://www.liftigniter.com/beautiful-sea/\"\n    }\n  ]\n}' https://api.petametrics.com/v1/inventory | python -mjson.tool"}]},"method":"delete","results":{"codes":[{"name":"Response to correct request","code":"{\n    \"diagnosticMsg\": \"Items marked for deletion should be deleted within a minute.\",\n    \"inventoryIdField\": \"url\",\n    \"inventoryIdRegex\": \"(.*liftigniter\\\\.com.+?)(?:[?#]|$)\",\n    \"numItemsMarkedForDeletion\": 2,\n    \"numItemsRequestedForDeletion\": 2,\n    \"organization\": \"liftigniter\",\n    \"status\": \"2/2 items marked for delete.\",\n    \"statusCode\": 200\n}","language":"json","status":200},{"name":"Response to incorrect request that fails to specify the id field","code":"{\n    \"diagnosticMsg\": \"Some items could not be deleted, possibly because of a missing id field.\",\n    \"inventoryIdField\": \"url\",\n    \"inventoryIdRegex\": \"(.*liftigniter\\\\.com.+?)(?:[?#]|$)\",\n    \"numItemsMarkedForDeletion\": 1,\n    \"numItemsRequestedForDeletion\": 2,\n    \"organization\": \"liftigniter\",\n    \"status\": \"1/2 items marked for delete.\",\n    \"statusCode\": 400\n}","language":"json","status":400},{"code":"{\n    \"diagnosticMsg\": \"No items attempted for deletion, because we did not detect inventory settings for keytesting. This also means there is no inventory for the organization, so there is nothing to delete. To set up organization settings, contact support:::at:::liftigniter.com\",\n    \"inventoryIdField\": \"\",\n    \"inventoryIdRegex\": \"\",\n    \"organization\": \"keytesting\",\n    \"status\": \"Forbidden: 0 item deleted.\",\n    \"statusCode\": 403\n}","language":"json","status":403,"name":"Rejected because of missing organization setting"}]},"settings":"569740d169393517000c82b0","auth":"required","params":[{"_id":"569753f3c8ded91700307ba3","ref":"","in":"body","required":true,"desc":"Your LiftIgniter API key.","default":"","type":"string","name":"apiKey"},{"_id":"569753f3c8ded91700307ba2","ref":"","in":"body","required":true,"desc":"Array of items to be removed from LiftIgniter. Each item has to be a JSON object but we only need the ID of contents to identify and delete your registered inventory from LiftIgniter.","default":"","type":"array_object","name":"items"}],"url":"/inventory"},"isReference":true,"order":8,"body":"[block:callout]\n{\n  \"type\": \"info\",\n  \"title\": \"Content Identifier\",\n  \"body\": \"A version number is not necessary in DELETE operations.\\n\\nNote that if you are using a field other than url as your inventoryIdField, you need to include that field instead of url. All fields other than this field are ignored in DELETE operations. If the inventoryIdField is missing, or does not match anything in our inventory, no action occurs.\\n\\nIn our response to the deletion request, we include information on the inventoryIdField.\"\n}\n[/block]\n\n[block:callout]\n{\n  \"type\": \"warning\",\n  \"title\": \"No regex match for DELETE operations\",\n  \"body\": \"Although the inventory settings for each organization have a regex, this regex is checked only for insert and not for DELETE operations. This is so that you can change the regex and then delete items that do not match the new regex.\"\n}\n[/block]\n\n[block:callout]\n{\n  \"type\": \"warning\",\n  \"title\": \"An item can be marked for deletion even if it does not exist\",\n  \"body\": \"When the deletion request is sent, our API does not check for whether or not the item exists. Rather, it simply marks the item for deletion. If the item does not exist, this has no effect. If the item does exist, then the deletion is carried out.\\n\\nThe main advantage of this is that you can send a deletion command for a large number of items, and we can immediately accept this rather than checking for the existence of each of the items in the list you sent.\\n\\nYou can use our [inventory GET endpoint](doc:inventoryid) to check for the existence of an item prior to deletion.\"\n}\n[/block]","excerpt":"This is a `DELETE` request that removes your specified contents from LiftIgniter `Inventory` store.","slug":"inventory-1","type":"link","title":"/inventory - DELETE"}

/inventory - DELETE

This is a `DELETE` request that removes your specified contents from LiftIgniter `Inventory` store.