# pub.chive.endorsement.getUserEndorsement

> Published by [chive.pub](https://lexicon.garden/identity/did:plc:7natp5xae72bddaqlkef2t4e)

✓ This is the authoritative definition for this NSID.

## Links

- [View on Lexicon Garden](https://lexicon.garden/lexicon/did:plc:7natp5xae72bddaqlkef2t4e/pub.chive.endorsement.getUserEndorsement)
- [Documentation](https://lexicon.garden/lexicon/did:plc:7natp5xae72bddaqlkef2t4e/pub.chive.endorsement.getUserEndorsement/docs)
- [Examples](https://lexicon.garden/lexicon/did:plc:7natp5xae72bddaqlkef2t4e/pub.chive.endorsement.getUserEndorsement/examples)

## Definitions

### `pub.chive.endorsement.getUserEndorsement`

**Type**: `query`

Get a user's endorsement for a specific eprint

#### Parameters

| Property | Type | Required | Description |
|----------|------|----------|-------------|
| `userDid` | `string` (did) | Yes | DID of the user |
| `eprintUri` | `string` (at-uri) | Yes | AT-URI of the eprint |

#### Output

**Encoding**: `application/json`

#### Errors

- **NotFound**

### `pub.chive.endorsement.getUserEndorsement#authorRef`

**Type**: `object`

| Property | Type | Required | Description |
|----------|------|----------|-------------|
| `did` | `string` (did) | Yes |  |
| `avatar` | `string` (uri) | No |  |
| `handle` | `string` | No |  |
| `displayName` | `string` | No |  |

### `pub.chive.endorsement.getUserEndorsement#endorsementView`

**Type**: `object`

View of an endorsement

| Property | Type | Required | Description |
|----------|------|----------|-------------|
| `cid` | `string` | Yes | Content identifier |
| `uri` | `string` (at-uri) | Yes | Endorsement AT-URI |
| `comment` | `string` | No | Optional comment |
| `endorser` | `ref` → `#authorRef` | Yes |  |
| `createdAt` | `string` (datetime) | Yes | Creation timestamp |
| `eprintUri` | `string` (at-uri) | Yes | Endorsed eprint AT-URI |
| `updatedAt` | `string` (datetime) | No | Last update timestamp |
| `contributions` | `array` | Yes | Contribution types being endorsed |

## Raw Schema

```json
{
  "id": "pub.chive.endorsement.getUserEndorsement",
  "defs": {
    "main": {
      "type": "query",
      "errors": [
        {
          "name": "NotFound"
        }
      ],
      "output": {
        "schema": {
          "ref": "#endorsementView",
          "type": "ref"
        },
        "encoding": "application/json"
      },
      "parameters": {
        "type": "params",
        "required": [
          "eprintUri",
          "userDid"
        ],
        "properties": {
          "userDid": {
            "type": "string",
            "format": "did",
            "description": "DID of the user"
          },
          "eprintUri": {
            "type": "string",
            "format": "at-uri",
            "description": "AT-URI of the eprint"
          }
        }
      },
      "description": "Get a user's endorsement for a specific eprint"
    },
    "authorRef": {
      "type": "object",
      "required": [
        "did"
      ],
      "properties": {
        "did": {
          "type": "string",
          "format": "did"
        },
        "avatar": {
          "type": "string",
          "format": "uri"
        },
        "handle": {
          "type": "string"
        },
        "displayName": {
          "type": "string"
        }
      }
    },
    "endorsementView": {
      "type": "object",
      "required": [
        "uri",
        "cid",
        "eprintUri",
        "endorser",
        "contributions",
        "createdAt"
      ],
      "properties": {
        "cid": {
          "type": "string",
          "description": "Content identifier"
        },
        "uri": {
          "type": "string",
          "format": "at-uri",
          "description": "Endorsement AT-URI"
        },
        "comment": {
          "type": "string",
          "maxLength": 1000,
          "description": "Optional comment"
        },
        "endorser": {
          "ref": "#authorRef",
          "type": "ref"
        },
        "createdAt": {
          "type": "string",
          "format": "datetime",
          "description": "Creation timestamp"
        },
        "eprintUri": {
          "type": "string",
          "format": "at-uri",
          "description": "Endorsed eprint AT-URI"
        },
        "updatedAt": {
          "type": "string",
          "format": "datetime",
          "description": "Last update timestamp"
        },
        "contributions": {
          "type": "array",
          "items": {
            "type": "string",
            "knownValues": [
              "methodological",
              "analytical",
              "theoretical",
              "empirical",
              "conceptual",
              "technical",
              "data",
              "replication",
              "reproducibility",
              "synthesis",
              "interdisciplinary",
              "pedagogical",
              "visualization",
              "societal-impact",
              "clinical"
            ]
          },
          "minLength": 1,
          "description": "Contribution types being endorsed"
        }
      },
      "description": "View of an endorsement"
    }
  },
  "$type": "com.atproto.lexicon.schema",
  "lexicon": 1,
  "revision": 1
}
```
