# com.livtet.shelf.delete

> Cascading shelf delete. `deleted` counts the cascade plus the shelf record.

- Kind: procedure
- Authority: shelf.livtet.com
- Lexicon: 1
- Published by [biblio.livtet.com](https://lexicon.garden/identity/did:plc:e2x3ihw2ntxt7pcgzmtu3abi), the NSID's authority

## Links

- [Documentation](https://lexicon.garden/lexicon/did:plc:e2x3ihw2ntxt7pcgzmtu3abi/com.livtet.shelf.delete)
- [Schema JSON](https://lexicon.garden/lexicon/did:plc:e2x3ihw2ntxt7pcgzmtu3abi/com.livtet.shelf.delete/schema.json)
- [Analytics](https://lexicon.garden/lexicon/did:plc:e2x3ihw2ntxt7pcgzmtu3abi/com.livtet.shelf.delete/analytics)

## Procedure (`com.livtet.shelf.delete`)

Type: procedure · POST

### Input (application/json)

- `shelf` (string · at-uri, required): AT-URI of the shelf record to delete.

### Output (application/json)

- `deleted` (integer, required): Number of records deleted: the shelfItems and bookStatuses filed under the shelf, plus the shelf itself.
  - Constraints: minimum: 1

## Schema

```json
{
  "$type": "com.atproto.lexicon.schema",
  "defs": {
    "main": {
      "description": "Cascading shelf delete. `deleted` counts the cascade plus the shelf record.",
      "input": {
        "encoding": "application/json",
        "schema": {
          "properties": {
            "shelf": {
              "description": "AT-URI of the shelf record to delete.",
              "format": "at-uri",
              "type": "string"
            }
          },
          "required": [
            "shelf"
          ],
          "type": "object"
        }
      },
      "output": {
        "encoding": "application/json",
        "schema": {
          "properties": {
            "deleted": {
              "description": "Number of records deleted: the shelfItems and bookStatuses filed under the shelf, plus the shelf itself.",
              "minimum": 1,
              "type": "integer"
            }
          },
          "required": [
            "deleted"
          ],
          "type": "object"
        }
      },
      "type": "procedure"
    }
  },
  "description": "Delete a shelf and everything filed under it: every shelfItem and every bookStatus whose shelf is this URI, then the shelf record itself.",
  "id": "com.livtet.shelf.delete",
  "lexicon": 1
}
```
