# pet.trezy.getPet

> Published by [trezy.pet](https://lexicon.garden/identity/did:plc:ollch4g7tes2reb5eceiwuol)

✓ This is the authoritative definition for this NSID.

## Links

- [View on Lexicon Garden](https://lexicon.garden/lexicon/did:plc:ollch4g7tes2reb5eceiwuol/pet.trezy.getPet)
- [Documentation](https://lexicon.garden/lexicon/did:plc:ollch4g7tes2reb5eceiwuol/pet.trezy.getPet/docs)
- [Examples](https://lexicon.garden/lexicon/did:plc:ollch4g7tes2reb5eceiwuol/pet.trezy.getPet/examples)

## Definitions

### `pet.trezy.getPet`

**Type**: `query`

#### Parameters

| Property | Type | Required | Description |
|----------|------|----------|-------------|
| `did` | `string` (did) | No | Whose newest pet to return. Ignored when `aturi` is given. One of the two is required — sending neither refuses, because defaulting to anything here would answer about somebody. |
| `aturi` | `string` (at-uri) | No | Hydrate ONE pet by its at-uri, as listed by pet.trezy.getPets. This is the mode the roster uses: the list call returns identifiers and each is fetched here, which keeps a large collection off the wire. Takes precedence over `did`. |

#### Output

**Encoding**: `application/json`

| Property | Type | Required | Description |
|----------|------|----------|-------------|
| `uri` | `string` (at-uri) | No |  |
| `name` | `string` | No |  |
| `error` | `string` | No | Present instead of a pet. `not found` is the ORIGINAL spelling, with a space, and it stays that way: PetPage branches on it and renaming it would break the public profile page for no gain. |
| `message` | `string` | No |  |
| `species` | `string` | No |  |
| `createdAt` | `string` (datetime) | No |  |

## Raw Schema

```json
{
  "id": "pet.trezy.getPet",
  "defs": {
    "main": {
      "type": "query",
      "output": {
        "schema": {
          "type": "object",
          "required": [],
          "properties": {
            "uri": {
              "type": "string",
              "format": "at-uri"
            },
            "name": {
              "type": "string"
            },
            "error": {
              "type": "string",
              "description": "Present instead of a pet. `not found` is the ORIGINAL spelling, with a space, and it stays that way: PetPage branches on it and renaming it would break the public profile page for no gain.",
              "knownValues": [
                "not found",
                "bad-request"
              ]
            },
            "message": {
              "type": "string"
            },
            "species": {
              "type": "string"
            },
            "createdAt": {
              "type": "string",
              "format": "datetime"
            }
          }
        },
        "encoding": "application/json"
      },
      "parameters": {
        "type": "params",
        "required": [],
        "properties": {
          "did": {
            "type": "string",
            "format": "did",
            "description": "Whose newest pet to return. Ignored when `aturi` is given. One of the two is required — sending neither refuses, because defaulting to anything here would answer about somebody."
          },
          "aturi": {
            "type": "string",
            "format": "at-uri",
            "description": "Hydrate ONE pet by its at-uri, as listed by pet.trezy.getPets. This is the mode the roster uses: the list call returns identifiers and each is fetched here, which keeps a large collection off the wire. Takes precedence over `did`."
          }
        }
      }
    }
  },
  "$type": "com.atproto.lexicon.schema",
  "lexicon": 1
}
```
