Album Photos API - How To Edit Album Images With API Calls
Link: https://support.brilliantdirectories.com/support/solutions/articles/12000104780
The API allows reading, creating, updating, matching, and album images on the website.
Available API Endpoints
Below is a list of the available endpoints for Album Photos:
https://example.com/api/v2/users_portfolio/get/{photo_id}
https://example.com/api/v2/users_portfolio/create
https://example.com/api/v2/users_portfolio/update
https://example.com/api/v2/users_portfolio/delete
Using the API, the following actions can be performed:
Get an Album Photo
Read the data of a single album image based on the photo_id
Endpoint:
curl -X 'GET' \ 'https://example.com/api/v2/users_portfolio/get/{photo_id}' \ -H 'accept: application/json' \ -H 'X-Api-Key: YOUR_API_KEY'
Example Request:
https://example.com/api/v2/users_portfolio/get/5
Example Response:
{ "status": "success", "message": [ { "photo_id": "5", "user_id": "1", "file": "1-1-beautiful-home.jpg", "thumbnail": "", "title": "Living Room", "desc": "", "room_id": "0", "photo_filename": "california/beverly-hills/properties/living-room-5", "group_id": "2", "keywords": "", "photo_token": "297a5113f72f00dd70efeacbf1ea59de", "photo_date_added": "20150720124448", "photo_date_updated": "20150720124521", "status": "1", "order": "0", "orgfile": "beautiful-home.jpg", "reason_inactive": "", "matt": null, "group_cover": "0", "profile_cover": "0", "facebook_photo_id": "", "link": "", "inv_id": "", "product_category": "", "manufacturer": "", "availability": "", "price": "0.00", "product_type": "", "condition": "", "additional_fields": "", "data_type": "4", "data_id": "12", "revision_timestamp": "2015-07-20 15:45:22", "image_imported": "0", "original_image_url": "", "file_main_full_url": "https://example.com/photos/main/1-1-beautiful-home.jpg", "file_thumbnail_full_url": "https://example.directoryup.com/photos/display/1-1-beautiful-home.jpg" } ], "total": "87", "current_page": 1, "total_pages": 4, "next_page": "MipfKjI1" }
Create an Album Photo
Add a new album image to the database
Endpoint:
curl -X 'POST' \ 'https://example.com/api/v2/users_portfolio/create' \ -H 'accept: application/json' \ -H 'X-Api-Key: YOUR_API_KEY' \ -H 'Content-Type: application/x-www-form-urlencoded' \ -d 'orgfile=original-filename.jpg&profile_cover=0&facebook_photo_id=&reason_inactive=&image_imported=0&photo_id=&inv_id=&price=0&product_type=&keywords=sunset%2C%20beach%2C%20nature&thumbnail=path%2Fto%2Fthumbnail%2Fimage.jpg&photo_token=abc123def456&product_category=&order=1&user_id=1&data_type=14&data_id=1&additional_fields=%7B%7D&desc=A%20stunning%20photo%20of%20the%20sunset%20at%20the%20beach&manufacturer=&status=1&photo_filename=sunset-beach-photo&matt=0&group_cover=0&photo_date_updated=20240315123456&title=Beautiful%20sunset%20photo&link=https%3A%2F%2Fexample.com%2Fphoto&condition=&availability=&group_id=1&photo_date_added=20240315123456&file=path%2Fto%2Ffull%2Fimage.jpg&original_image_url=&room_id=1'
Example Request:
https://example.com/api/v2/users_portfolio/create
Query Parameters:
group_id | ID# of the post |
original_image_URL | Image URL of the album photo |
user_id | User ID# |
data_type | Data Type ID# |
data_id | Data ID# |
Example Response:
{ "status": "success", "message": { "photo_id": "191", "user_id": "1", "file": "", "thumbnail": "", "title": "Beautiful sunset photo", "desc": "A stunning photo of the sunset at the beach", "room_id": "", "photo_filename": "", "group_id": "", "keywords": "", "photo_token": "", "photo_date_added": "", "photo_date_updated": "", "status": "", "order": "", "orgfile": "", "reason_inactive": "", "matt": "0", "group_cover": "0", "profile_cover": "0", "facebook_photo_id": "", "link": "", "inv_id": "", "product_category": "", "manufacturer": "", "availability": "", "price": "0", "product_type": "", "condition": "", "additional_fields": null, "data_type": "4", "data_id": "12", "revision_timestamp": null, "image_imported": "0", "original_image_url": "/images/d4acbf458302a41dde4ba5227cdcba3bbd164416.jpg" } }
Update an Album Photo
Update the album photo record and its related data from the database, by specifying the photo_id
Endpoint:
curl -X 'PUT' \ 'https://example.com/api/v2/users_portfolio/update' \ -H 'accept: application/json' \ -H 'X-Api-Key: YOUR_API_KEY' \ -H 'Content-Type: application/x-www-form-urlencoded' \ -d 'orgfile=&profile_cover=0&facebook_photo_id=&reason_inactive=&image_imported=&photo_id=191&inv_id=&price=0&product_type=&keywords=&thumbnail=&photo_token=&product_category=&order=&user_id=&data_type=&data_id=&additional_fields=&desc=&manufacturer=&status=&photo_filename=&matt=0&group_cover=0&photo_date_updated=&title=Beautiful%20sunset%20photo%20-%20UPDATED&link=&condition=&availability=&group_id=&photo_date_added=&file=&original_image_url=&room_id='
Example Request:
https://example.com/api/v2/users_portfolio/update
Example Response:
{ "status": "success", "message": { "photo_id": "191", "user_id": "1", "file": "", "thumbnail": "", "title": "Beautiful sunset photo - UPDATED", "desc": "A stunning photo of the sunset at the beach", "room_id": "0", "photo_filename": "", "group_id": "0", "keywords": "", "photo_token": "", "photo_date_added": "", "photo_date_updated": "", "status": "0", "order": "0", "orgfile": "", "reason_inactive": "", "group_cover": "0", "profile_cover": "0", "facebook_photo_id": "", "link": "", "inv_id": "", "product_category": "", "manufacturer": "", "availability": "", "price": "0.00", "product_type": "", "condition": "", "additional_fields": "", "data_type": "4", "data_id": "12", "revision_timestamp": "2025-07-01 07:45:55", "image_imported": "0", "original_image_url": "/images/d4acbf458302a41dde4ba5227cdcba3bbd164416.jpg", "file_main_full_url": "https://example.com/photos/main/", "file_thumbnail_full_url": "https://example.com/photos/display/" } }
Delete an Album Photo
Delete an album photo and their related data from the database, by specifying the photo_id
Endpoint:
curl -X 'DELETE' \ 'https://example.com/api/v2/users_portfolio/delete' \ -H 'accept: application/json' \ -H 'X-Api-Key: YOUR_API_KEY' \ -H 'Content-Type: application/x-www-form-urlencoded' \ -d 'photo_id=191'
Example Request:
https://example.com/api/v2/users_portfolio/delete
Example Response:
{ "status": "success", "message": "users_portfolio record was deleted" }