Adds multiple photos to an artist’s gallery in a batch transaction
curl --request POST \
--url http://localhost:3000/api/gallery/add-photos \
--header 'Content-Type: application/json' \
--data '
{
"photos": [
{
"source": "instagram",
"url": "<string>",
"fileId": "<string>",
"thumbnailUrl": "<string>",
"tags": [
"<string>"
],
"sourceData": {}
}
]
}
'{
"success": true,
"addedPhotos": 123,
"photos": [
{
"id": "<string>",
"artistId": "<string>",
"artistName": "<string>",
"url": "<string>",
"source": "instagram",
"order": 123,
"uploadedAt": 123,
"isVisible": true,
"artistUsername": "<string>",
"thumbnailUrl": "<string>",
"sourceData": {
"instagramId": "<string>",
"permalink": "<string>",
"caption": "<string>",
"mediaType": "IMAGE",
"urlRefreshedAt": 123,
"originalFileName": "<string>",
"fileSize": 123,
"storageRef": "<string>",
"originalUrl": "<string>"
},
"tags": [
"<string>"
]
}
]
}50Show child attributes
Source of the photo
instagram, upload, url URL of the photo
Unique file identifier
Thumbnail URL
Photo tags
Additional source-specific metadata
Photos added successfully
Whether the operation was successful
Number of photos successfully added
Array of added gallery photos
Show child attributes
Unique identifier for the photo
Reference to artist who owns this photo
Denormalized artist name for performance
Primary image URL (Instagram CDN, Firebase Storage, etc.)
Source of the photo
instagram, upload, url Display order (higher numbers = newer photos = displayed first)
Timestamp when photo was added to gallery
Whether the photo is visible in the gallery
Denormalized artist username for discovery feeds
Optional thumbnail URL for performance
Additional data specific to the photo source
Show child attributes
Instagram media ID (when source is 'instagram')
Instagram permalink URL (when source is 'instagram')
Instagram media caption (when source is 'instagram')
Instagram media type (when source is 'instagram')
IMAGE, VIDEO, CAROUSEL_ALBUM Timestamp when Instagram URL was last refreshed (when source is 'instagram')
Original file name (when source is 'upload')
Size in bytes (for instagram and upload sources)
Firebase Storage reference (for instagram and upload sources)
Original URL (when source is 'url')
Optional tags for discovery/filtering
curl --request POST \
--url http://localhost:3000/api/gallery/add-photos \
--header 'Content-Type: application/json' \
--data '
{
"photos": [
{
"source": "instagram",
"url": "<string>",
"fileId": "<string>",
"thumbnailUrl": "<string>",
"tags": [
"<string>"
],
"sourceData": {}
}
]
}
'{
"success": true,
"addedPhotos": 123,
"photos": [
{
"id": "<string>",
"artistId": "<string>",
"artistName": "<string>",
"url": "<string>",
"source": "instagram",
"order": 123,
"uploadedAt": 123,
"isVisible": true,
"artistUsername": "<string>",
"thumbnailUrl": "<string>",
"sourceData": {
"instagramId": "<string>",
"permalink": "<string>",
"caption": "<string>",
"mediaType": "IMAGE",
"urlRefreshedAt": 123,
"originalFileName": "<string>",
"fileSize": 123,
"storageRef": "<string>",
"originalUrl": "<string>"
},
"tags": [
"<string>"
]
}
]
}