# net.olamaelcu.livtet.biblio.shelf.addItem

> Upsert one shelf membership edge.

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

## Links

- [Documentation](https://lexicon.garden/lexicon/did:plc:e2x3ihw2ntxt7pcgzmtu3abi/net.olamaelcu.livtet.biblio.shelf.addItem)
- [Schema JSON](https://lexicon.garden/lexicon/did:plc:e2x3ihw2ntxt7pcgzmtu3abi/net.olamaelcu.livtet.biblio.shelf.addItem/schema.json)
- [Analytics](https://lexicon.garden/lexicon/did:plc:e2x3ihw2ntxt7pcgzmtu3abi/net.olamaelcu.livtet.biblio.shelf.addItem/analytics)

## Procedure (`net.olamaelcu.livtet.biblio.shelf.addItem`)

Type: procedure · POST

### Input (application/json)

- `book` (ref, required): The catalog edition to place on the shelf.
  - Reference: `com.atproto.repo.strongRef`
- `metadata` (ref): Optional position, notes and emoji for this book's place on the shelf.
  - Reference: `net.olamaelcu.livtet.biblio.defs#shelfItemMetadata`
- `shelf` (string · at-uri, required): AT-URI of the shelf record.

### Output (application/json)

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

## Schema

```json
{
  "$type": "com.atproto.lexicon.schema",
  "defs": {
    "main": {
      "description": "Upsert one shelf membership edge.",
      "input": {
        "encoding": "application/json",
        "schema": {
          "properties": {
            "book": {
              "description": "The catalog edition to place on the shelf.",
              "ref": "com.atproto.repo.strongRef",
              "type": "ref"
            },
            "metadata": {
              "description": "Optional position, notes and emoji for this book's place on the shelf.",
              "ref": "net.olamaelcu.livtet.biblio.defs#shelfItemMetadata",
              "type": "ref"
            },
            "shelf": {
              "description": "AT-URI of the shelf record.",
              "format": "at-uri",
              "type": "string"
            }
          },
          "required": [
            "shelf",
            "book"
          ],
          "type": "object"
        }
      },
      "output": {
        "encoding": "application/json",
        "schema": {
          "properties": {
            "uri": {
              "description": "AT-URI of the shelfItem record.",
              "format": "at-uri",
              "type": "string"
            }
          },
          "required": [
            "uri"
          ],
          "type": "object"
        }
      },
      "type": "procedure"
    }
  },
  "description": "Put a book on a shelf. The shelfItem rkey is <shelf rkey>-<edition rkey>, so the same pair always lands on the same record.",
  "id": "net.olamaelcu.livtet.biblio.shelf.addItem",
  "lexicon": 1
}
```
