Skip to main content
GET
/
flash
/
by-artist-ids
Get Flash Designs by Artist IDs
curl --request GET \
  --url http://localhost:3000/api/flash/by-artist-ids
{
  "results": [
    {
      "artistId": "<string>",
      "designs": [
        {
          "source": "instagram",
          "sourceData": {
            "instagramId": "<string>",
            "permalink": "<string>",
            "mediaType": "IMAGE",
            "url": "<string>",
            "caption": "<string>",
            "thumbnailUrl": "<string>",
            "urlRefreshedAt": 123,
            "storageRef": "<string>",
            "fileSize": 123
          },
          "id": "<string>",
          "artistId": "<string>",
          "artistName": "<string>",
          "artistUsername": "<string>",
          "price": {
            "type": "fixed",
            "amount": "<string>"
          },
          "size": {
            "unit": "in",
            "minSize": "<string>",
            "maxSize": "<string>"
          },
          "styles": [
            "<string>"
          ],
          "isAvailable": true,
          "isVisible": true,
          "createdAt": 123,
          "updatedAt": 123,
          "order": 123,
          "sessionDuration": {
            "blocks": 123
          },
          "viewCount": 123,
          "bookmarkCount": 123,
          "tags": [
            "<string>"
          ],
          "notes": "<string>"
        }
      ]
    }
  ]
}

Overview

This endpoint fetches flash designs for multiple artist IDs in a single request. It’s primarily used by the explore page to efficiently load designs from filtered artists.

Key Features

  • Batch Processing: Handles multiple artist IDs in one request
  • Chunked Queries: Automatically handles Firestore’s 10-item limit for in queries
  • Flexible Limiting: Optional limit per artist (unlimited by default)
  • Availability Filtering: Option to show only available designs
  • Grouped Results: Returns data grouped by artist for easy processing

Use Cases

  • Explore Page: Display flash designs from artists in a specific area
  • Artist Discovery: Show designs from multiple artists simultaneously
  • Marketplace Views: Bulk loading of available designs

Query Parameters

Required Parameters

  • artistIds (string): Comma-separated list of artist IDs
    • Example: "artist1,artist2,artist3"
    • No limit on the number of artist IDs

Optional Parameters

  • limit (integer): Number of designs per artist
    • Default: No limit (returns all designs)
    • Example: 3 (returns up to 3 designs per artist)
  • onlyAvailable (boolean): Filter for available designs only
    • Default: true
    • Set to false to include unavailable designs

Response Format

The endpoint returns an array of ArtistFlashGroup objects, where each group contains:
  • artistId: The artist’s unique identifier
  • designs: Array of flash listings for that artist
Only artists with flash designs are included in the response.

Performance Considerations

  • Efficient Querying: Uses parallel chunked queries for scalability
  • Sorted Results: Designs are sorted by order (newest first) within each artist group
  • Public Endpoint: No authentication required, suitable for public discovery

Example Usage

Get all available designs from specific artists

GET /api/flash/by-artist-ids?artistIds=artist1,artist2,artist3&onlyAvailable=true

Get limited designs per artist

GET /api/flash/by-artist-ids?artistIds=artist1,artist2&limit=5&onlyAvailable=true

Include unavailable designs

GET /api/flash/by-artist-ids?artistIds=artist1&onlyAvailable=false

Error Handling

  • 400 Bad Request: Missing or invalid artistIds parameter
  • 500 Internal Server Error: Database or server errors
The endpoint gracefully handles cases where some artists have no flash designs by simply excluding them from the results.

Query Parameters

artistIds
string
required

Comma-separated list of artist IDs

Example:

"artist1,artist2,artist3"

limit
integer

Number of designs per artist (optional, no limit if not provided)

Required range: x >= 1
Example:

3

onlyAvailable
boolean
default:true

Only return available designs

Response

Flash designs grouped by artist

results
object[]
required