Skip to main content

List Drops Response

Schema for paginated drop listing responses in the Intraverse Backend API v2.

Description​

The List Drops Response schema defines the structure of responses when listing drops with pagination. This includes both public drops and user-specific drops with cursor-based pagination.

Schema References​

The drop controller uses several response schemas:

  • DropsPaginationResponsePayload - For admin/organization drop listings
  • ListPublicDropsResponsePayload - For public drop listings
  • ListMyDropsResponsePayload - For user's own drops

API Endpoints​

These schemas are used by the following endpoints:

  • GET /v2/drop/list - List drops (requires permissions)
  • GET /v2/drop - List public drops (public)
  • GET /v2/drop/me/ - List user's drops (authenticated)

Authentication Requirements​

Public Drops Endpoint (GET /v2/drop)​

  • Authentication: No authentication required
  • Purpose: Public access to view available drops

User Drops Endpoint (GET /v2/drop/me/)​

  • Authentication: Dual authentication required
    • JWT Bearer Token: Authorization: Bearer <jwt_token>
    • Game Key Header: x-game-key: <client_key> or x-game-server-key: <server_key>

Admin Drops Endpoint (GET /v2/drop/list)​

  • Authentication: Dual authentication required
    • JWT Bearer Token: Authorization: Bearer <jwt_token>
    • Game Key Header: x-game-key: <client_key> or x-game-server-key: <server_key>
    • Permissions: User must have drop viewing permissions

Response Formats​

Public Drops Response​

interface ListPublicDropsResponsePayload {
// Structure defined in the drop domain DTOs
// Typically includes paginated drop data
}

User Drops Response​

interface ListMyDropsResponsePayload {
// Structure defined in the drop domain DTOs
// Typically includes paginated drop data for the authenticated user
}

Admin Drops Response​

interface DropsPaginationResponsePayload {
// Structure defined in the drop domain DTOs
// Typically includes paginated drop data with admin privileges
}

Pagination Parameters​

All list endpoints support cursor-based pagination with the following parameters:

  • size: Number of items per page (1-30)
  • key: Cursor for pagination
  • direction: 'forward' or 'backward'
  • order: 'asc' or 'desc'
  • orderBy: Field to sort by
  • query: Filter queries

Usage Examples​

List Public Drops​

// Get public drops (no authentication required)
const response = await fetch("https://api.intraverse.io//v2/drop?size=20&order=desc&orderBy=startDate", {
method: "GET",
});

const result = await response.json();
console.log("Public drops:", result);

List User's Drops​

// Get user's drops (dual authentication required)
const response = await fetch("https://api.intraverse.io//v2/drop/me/?size=10", {
method: "GET",
headers: {
Authorization: `Bearer ${accessToken}`,
"x-game-key": "your-game-client-key",
},
});

const result = await response.json();
console.log("My drops:", result);

List All Drops (Admin)​

// Get all drops (dual authentication + permissions required)
const response = await fetch("https://api.intraverse.io//v2/drop/list?size=25", {
method: "GET",
headers: {
Authorization: `Bearer ${accessToken}`,
"x-game-key": "your-game-client-key",
},
});

const result = await response.json();
console.log("All drops:", result);

Next Steps​