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

# List Posters

> Retrieve a list of all posters placed by ambassadors in your programs

Retrieve a list of all posters placed by ambassadors in your programs. This endpoint helps you track poster placements, monitor ambassador activity, and analyze poster performance.

## Overview

The List Posters endpoint returns a paginated list of all poster placements created by student ambassadors. Use this endpoint to:

* Track all poster placements across programs
* Monitor which ambassadors are most active
* Filter posters by program or student
* Build analytics dashboards for poster performance
* Export poster data for reporting

## Authentication

This endpoint requires authentication using a Bearer token in the Authorization header:

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

## Query Parameters

<ParamField body="programId" type="string" required={false}>
  Filter results to only include posters from a specific program. Useful when analyzing poster performance for individual programs.

  **Example:** `programId=prog_123abc`
</ParamField>

<ParamField body="studentId" type="string" required={false}>
  Filter results to only include posters placed by a specific student ambassador. Use this to see all posters placed by a particular ambassador.

  **Example:** `studentId=user_123abc`
</ParamField>

<ParamField body="limit" type="integer" default="50" required={false}>
  Maximum number of results to return per page. Default is 50, maximum is typically 100.

  **Example:** `limit=25`
</ParamField>

<ParamField body="offset" type="integer" default="0" required={false}>
  Number of results to skip before starting to return results. Use for pagination.

  **Example:** `offset=50` skips the first 50 results
</ParamField>

## Request Example

<RequestExample>
  ```bash theme={null}
  # Get all posters
  curl -X GET "https://vantio.app/api/v1/posters" \
    -H "Authorization: Bearer sk_your_secret_key_here"

  # Get posters from a specific program
  curl -X GET "https://vantio.app/api/v1/posters?programId=prog_123abc&limit=100" \
    -H "Authorization: Bearer sk_your_secret_key_here"

  # Get posters from a specific ambassador
  curl -X GET "https://vantio.app/api/v1/posters?studentId=user_123abc" \
    -H "Authorization: Bearer sk_your_secret_key_here"
  ```
</RequestExample>

## Response

The API returns a JSON object containing an array of poster objects:

<ResponseField name="posters" type="array" required>
  Array of poster objects, each containing information about a poster placement.
</ResponseField>

Each poster object contains:

<ResponseField name="id" type="string" required>
  Unique identifier for the poster.
</ResponseField>

<ResponseField name="program_id" type="string" required>
  ID of the program this poster belongs to.
</ResponseField>

<ResponseField name="student_id" type="string" required>
  ID of the student ambassador who placed this poster.
</ResponseField>

<ResponseField name="qr_code_url" type="string" required>
  URL to the QR code image for this poster.
</ResponseField>

<ResponseField name="location" type="string">
  Physical location where the poster was placed (if provided).
</ResponseField>

<ResponseField name="created_at" type="string" required>
  ISO 8601 timestamp of when the poster was created.
</ResponseField>

<ResponseField name="metadata" type="object">
  Additional metadata about the poster placement.
</ResponseField>

## Response Example

<ResponseExample>
  ```json theme={null}
  {
    "posters": [
      {
        "id": "poster_123abc",
        "program_id": "prog_123abc",
        "student_id": "user_123abc",
        "qr_code_url": "https://example.com/qr-codes/poster_123abc.png",
        "location": "Campus Center - Main Entrance",
        "created_at": "2024-01-15T10:30:00Z",
        "metadata": {
          "poster_type": "standard",
          "placement_date": "2024-01-15"
        }
      },
      {
        "id": "poster_456def",
        "program_id": "prog_123abc",
        "student_id": "user_456def",
        "qr_code_url": "https://example.com/qr-codes/poster_456def.png",
        "location": "Library - First Floor",
        "created_at": "2024-01-16T14:20:00Z",
        "metadata": {
          "poster_type": "premium",
          "placement_date": "2024-01-16"
        }
      }
    ]
  }
  ```
</ResponseExample>

## Use Cases

### Building a Poster Dashboard

Fetch all posters and display them in a dashboard:

```javascript theme={null}
async function fetchPosters(filters = {}) {
  const params = new URLSearchParams();
  
  if (filters.programId) params.append('programId', filters.programId);
  if (filters.studentId) params.append('studentId', filters.studentId);
  if (filters.limit) params.append('limit', filters.limit);
  if (filters.offset) params.append('offset', filters.offset);
  
  const response = await fetch(
    `https://vantio.app/api/v1/posters?${params.toString()}`,
    {
      headers: {
        'Authorization': `Bearer ${API_KEY}`
      }
    }
  );
  
  return await response.json();
}
```

### Tracking Ambassador Activity

See which ambassadors are most active in placing posters:

```javascript theme={null}
async function getAmbassadorPosterStats(programId) {
  const posters = await fetchPosters({ programId, limit: 1000 });
  
  // Count posters by student
  const stats = {};
  posters.posters.forEach(poster => {
    if (!stats[poster.student_id]) {
      stats[poster.student_id] = 0;
    }
    stats[poster.student_id]++;
  });
  
  return stats;
}
```

### Exporting Poster Data

Fetch all posters for export:

```javascript theme={null}
async function exportAllPosters(programId) {
  let allPosters = [];
  let offset = 0;
  const limit = 100;
  let hasMore = true;
  
  while (hasMore) {
    const response = await fetch(
      `https://vantio.app/api/v1/posters?programId=${programId}&limit=${limit}&offset=${offset}`,
      {
        headers: {
          'Authorization': `Bearer ${API_KEY}`
        }
      }
    );
    
    const data = await response.json();
    allPosters = [...allPosters, ...data.posters];
    
    hasMore = data.posters.length === limit;
    offset += limit;
  }
  
  return allPosters;
}
```

## Best Practices

1. **Use filters effectively** - Combine programId and studentId to narrow results
2. **Implement pagination** - Always use `limit` and `offset` for large datasets
3. **Cache poster data** - Poster lists don't change frequently
4. **Track locations** - Use metadata to store location details for analytics
5. **Monitor QR code usage** - Link posters to impressions to track scan rates

## Error Responses

<ResponseField name="401" type="object">
  **Unauthorized** - Invalid or missing API key

  ```json theme={null}
  {
    "error": "Unauthorized",
    "message": "Invalid or missing API key"
  }
  ```
</ResponseField>

## Rate Limits

This endpoint is subject to rate limiting. Check response headers for rate limit information.


## OpenAPI

````yaml GET /api/v1/posters
openapi: 3.0.0
info:
  title: Vantio API
  version: 1.0.0
  description: >-
    Public v1 API. Authenticate using your secret key in the Authorization
    header: "Bearer sk_...".
servers:
  - url: http://localhost:3000
security:
  - bearerAuth: []
tags:
  - name: Users
    description: Student directory within your programs
  - name: Referrals
    description: Signups and conversions
  - name: Posters
    description: Ambassador posters and placements
  - name: Impressions
    description: QR scans and related activity
  - name: Earnings
    description: Earnings from referrals
paths:
  /api/v1/posters:
    get:
      tags:
        - Posters
      summary: List posters
      description: Retrieve a list of all posters placed by ambassadors in your programs
      parameters:
        - in: query
          name: programId
          schema:
            type: string
          description: Filter by program ID
        - in: query
          name: studentId
          schema:
            type: string
          description: Filter by student (ambassador) ID
        - in: query
          name: limit
          schema:
            type: integer
            default: 50
          description: Maximum number of results to return
        - in: query
          name: offset
          schema:
            type: integer
            default: 0
          description: Number of results to skip
      responses:
        '200':
          description: List of posters
          content:
            application/json:
              schema:
                type: object
        '401':
          description: Unauthorized - Invalid or missing API key
      security:
        - bearerAuth: []
components:
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
      bearerFormat: API Key

````