> ## Documentation Index
> Fetch the complete documentation index at: https://docs.lolboost.gg/llms.txt
> Use this file to discover all available pages before exploring further.

# Listings

> Manage seller listings.

# Listings

Create clear titles, accurate descriptions, correct prices, and keep stock synchronized to prevent double sales.

## Account listing fields

For account listings, `POST /api/v1/accounts` and `PATCH /api/v1/accounts/{identifier}` support account details as top level fields or inside `parameters` / `game_data`.

Recommended keys include `rank`, `division`, `flex_rank`, `flex_division`, `level`, `blue_essence`, `riot_points`, `winrate_percent`, `champion_count`, `skin_count`, `champions`, `skins`, `roles` and `in_game_name`.

You can send rank and division separately, or together as one value.

```json theme={null}
{
  "external_id": "seller-account-123",
  "title": "EUW Iron IV Account",
  "price": 1999,
  "parameters": {
    "rank": "Iron IV",
    "level": 30,
    "blue_essence": 25000,
    "riot_points": 350,
    "champion_count": 45,
    "skin_count": 8
  }
}
```

This is also valid:

```json theme={null}
{
  "parameters": {
    "rank": "Gold",
    "division": "II"
  }
}
```

## Listing images

Images are uploaded first, then attached to the account listing with `image_ids`.

### 1. Upload an image

Send a multipart request to `POST /api/v1/images`. Use `file` as the multipart field name. `image` is also accepted.

```bash theme={null}
curl -X POST "https://lolboost.gg/api/v1/images" \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -F "file=@/path/to/account-image.png"
```

Example response:

```json theme={null}
{
  "data": {
    "id": 123,
    "image_id": 123,
    "url": "https://lolboost.gg/public/uploads/accounts-gallery/account-image.png"
  }
}
```

Use the returned `id` or `image_id` in the next account request.

### 2. Attach images to an account

```json theme={null}
{
  "external_id": "seller-account-123",
  "title": "EUW Iron IV Account",
  "price": 1999,
  "image_ids": [123]
}
```

Multiple images are supported:

```json theme={null}
{
  "image_ids": [123, 124, 125]
}
```

For compatibility, `image_ids` can also be sent as a comma separated string or as objects:

```json theme={null}
{
  "image_ids": "123,124,125"
}
```

```json theme={null}
{
  "image_ids": [{ "id": 123 }, { "image_id": 124 }]
}
```

If your images are already hosted somewhere public, you can use `image_urls` instead:

```json theme={null}
{
  "external_id": "seller-account-123",
  "image_urls": ["https://example.com/account.png"]
}
```
