> ## Documentation Index
> Fetch the complete documentation index at: https://mintlify.com/No-Country-simulation/S02-26-Equipo-33-Web-App/llms.txt
> Use this file to discover all available pages before exploring further.

# My Listings

> Get all horse listings for the authenticated seller

## Authentication

Required - JWT Bearer token with `seller` or `admin` role

```bash theme={null}
Authorization: Bearer YOUR_JWT_TOKEN
```

## Response

<ResponseField name="success" type="boolean">
  Indicates if the request was successful
</ResponseField>

<ResponseField name="data" type="array">
  Array of horse listings owned by the authenticated user, sorted by creation date (newest first)

  <ResponseField name="_id" type="string">
    Horse unique identifier
  </ResponseField>

  <ResponseField name="seller_id" type="string">
    Seller ID (matches authenticated user)
  </ResponseField>

  <ResponseField name="name" type="string">
    Horse name
  </ResponseField>

  <ResponseField name="age" type="number">
    Horse age in years
  </ResponseField>

  <ResponseField name="breed" type="string">
    Horse breed
  </ResponseField>

  <ResponseField name="discipline" type="string">
    Primary discipline
  </ResponseField>

  <ResponseField name="pedigree" type="string">
    Pedigree information
  </ResponseField>

  <ResponseField name="location" type="object">
    <ResponseField name="country" type="string">
      Country location
    </ResponseField>

    <ResponseField name="region" type="string">
      Region/state
    </ResponseField>

    <ResponseField name="city" type="string">
      City
    </ResponseField>

    <ResponseField name="coordinates" type="object">
      <ResponseField name="lat" type="number">
        Latitude
      </ResponseField>

      <ResponseField name="lng" type="number">
        Longitude
      </ResponseField>
    </ResponseField>
  </ResponseField>

  <ResponseField name="price" type="number">
    Listing price
  </ResponseField>

  <ResponseField name="currency" type="string">
    Currency code (USD, EUR, ARS, BRL, MXN)
  </ResponseField>

  <ResponseField name="photos" type="array">
    Array of photos

    <ResponseField name="_id" type="string">
      Photo ID
    </ResponseField>

    <ResponseField name="url" type="string">
      Photo URL
    </ResponseField>

    <ResponseField name="caption" type="string">
      Photo caption
    </ResponseField>

    <ResponseField name="is_cover" type="boolean">
      Whether this is the cover photo
    </ResponseField>

    <ResponseField name="uploaded_at" type="string">
      Upload timestamp
    </ResponseField>
  </ResponseField>

  <ResponseField name="videos" type="array">
    Array of videos

    <ResponseField name="_id" type="string">
      Video ID
    </ResponseField>

    <ResponseField name="url" type="string">
      Video URL
    </ResponseField>

    <ResponseField name="embed_url" type="string">
      Auto-generated embed URL
    </ResponseField>

    <ResponseField name="video_type" type="string">
      Type: training, competition, other
    </ResponseField>

    <ResponseField name="title" type="string">
      Video title
    </ResponseField>

    <ResponseField name="description" type="string">
      Video description
    </ResponseField>

    <ResponseField name="recorded_at" type="string">
      Recording date
    </ResponseField>

    <ResponseField name="uploaded_at" type="string">
      Upload timestamp
    </ResponseField>
  </ResponseField>

  <ResponseField name="status" type="string">
    Listing status: active, sold, paused, draft
  </ResponseField>

  <ResponseField name="views_count" type="number">
    Number of views
  </ResponseField>

  <ResponseField name="created_at" type="string">
    Creation timestamp
  </ResponseField>

  <ResponseField name="updated_at" type="string">
    Last update timestamp
  </ResponseField>
</ResponseField>

## Notes

* Returns all listings regardless of status (active, draft, sold, paused)
* Results are sorted by creation date, newest first
* Only returns listings owned by the authenticated user
* No pagination - returns all user's listings

## Examples

<CodeGroup>
  ```bash cURL theme={null}
  curl -X GET "https://api.horsetrust.com/api/horses/my-listings" \
    -H "Authorization: Bearer YOUR_JWT_TOKEN"
  ```

  ```javascript JavaScript theme={null}
  const response = await fetch('https://api.horsetrust.com/api/horses/my-listings', {
    method: 'GET',
    headers: {
      'Authorization': 'Bearer YOUR_JWT_TOKEN'
    }
  });

  const data = await response.json();
  console.log(data);
  ```

  ```python Python theme={null}
  import requests

  response = requests.get(
      'https://api.horsetrust.com/api/horses/my-listings',
      headers={
          'Authorization': 'Bearer YOUR_JWT_TOKEN'
      }
  )

  data = response.json()
  print(data)
  ```
</CodeGroup>

<ResponseExample>
  ```json Response theme={null}
  {
    "success": true,
    "data": [
      {
        "_id": "507f1f77bcf86cd799439011",
        "seller_id": "507f191e810c19729de860ea",
        "name": "Thunder",
        "age": 8,
        "breed": "Thoroughbred",
        "discipline": "Show Jumping",
        "pedigree": "Sire: Storm Cat, Dam: Winning Colors",
        "location": {
          "country": "Argentina",
          "region": "Buenos Aires",
          "city": "San Isidro",
          "coordinates": {
            "lat": -34.4708,
            "lng": -58.5247
          }
        },
        "price": 45000,
        "currency": "USD",
        "photos": [
          {
            "_id": "65f1a2b3c4d5e6f7g8h9i0j1",
            "url": "https://cdn.horsetrust.com/photos/abc123.jpg",
            "caption": "Thunder at competition",
            "is_cover": true,
            "uploaded_at": "2026-03-01T10:00:00Z"
          }
        ],
        "videos": [
          {
            "_id": "65f1a2b3c4d5e6f7g8h9i0j2",
            "url": "https://youtube.com/watch?v=abc123",
            "embed_url": "https://www.youtube.com/embed/abc123",
            "video_type": "competition",
            "title": "Thunder jumping 1.40m",
            "recorded_at": "2026-02-15T00:00:00Z",
            "uploaded_at": "2026-03-01T10:00:00Z"
          }
        ],
        "status": "active",
        "views_count": 234,
        "created_at": "2026-03-01T10:00:00Z",
        "updated_at": "2026-03-05T15:30:00Z"
      },
      {
        "_id": "507f1f77bcf86cd799439012",
        "seller_id": "507f191e810c19729de860ea",
        "name": "Silver Star",
        "age": 6,
        "breed": "Andalusian",
        "discipline": "Dressage",
        "location": {
          "country": "Argentina",
          "region": "Córdoba",
          "city": "Villa Carlos Paz"
        },
        "price": 38000,
        "currency": "USD",
        "photos": [
          {
            "_id": "65f1a2b3c4d5e6f7g8h9i0j3",
            "url": "https://cdn.horsetrust.com/photos/def456.jpg",
            "is_cover": true,
            "uploaded_at": "2026-02-20T14:00:00Z"
          },
          {
            "_id": "65f1a2b3c4d5e6f7g8h9i0j4",
            "url": "https://cdn.horsetrust.com/photos/def457.jpg",
            "is_cover": false,
            "uploaded_at": "2026-02-20T14:00:00Z"
          },
          {
            "_id": "65f1a2b3c4d5e6f7g8h9i0j5",
            "url": "https://cdn.horsetrust.com/photos/def458.jpg",
            "is_cover": false,
            "uploaded_at": "2026-02-20T14:00:00Z"
          }
        ],
        "videos": [],
        "status": "draft",
        "views_count": 12,
        "created_at": "2026-02-20T14:00:00Z",
        "updated_at": "2026-02-25T10:15:00Z"
      }
    ]
  }
  ```
</ResponseExample>

## Error Responses

### 401 - Unauthorized

```json theme={null}
{
  "success": false,
  "message": "Authentication required"
}
```

### 403 - Forbidden

```json theme={null}
{
  "success": false,
  "message": "Seller role required"
}
```

### 500 - Server Error

```json theme={null}
{
  "success": false,
  "message": "Server error"
}
```
