Keystone Developers
Open Keystone
API reference

Console API

Photos

5 endpoints.

GET/api/v1/admin/businesses/{business_id}/photos

Get business photo library

Get business library photos. Pagination via cursor (string) and limit.

Authentication

Authorization: Bearer <token>.

Parameters

NameInTypeDescription
business_idrequiredpathstring (uuid)
cursorquerystring | null
limitqueryintegerdefault 20

Responses

200Successful Response
application/jsonSuccessResponse_list_PhotoData__
FieldTypeDescription
request_idrequiredstring
successtruedefault true
datarequiredPhotoData[]
PhotoData[] fields
FieldTypeDescription
idrequiredstring
business_idrequiredstring
photo_urlstring | null
public_urlstring | null

Public CDN URL of the original (no auth); null when the photo isn't CDN-addressable.

photo_sourcerequiredstring
original_filenamestring | null
alt_textstring | null

The photo's alt text as the site shows it: the owner's, else (never set) the alt of the page it was scraped from; null when it has none.

photo_metadataPhotoMetadata | null
PhotoMetadata fields

PhotoMetadata (not expanded)

media_kindenum

video when the stored file is a video (kept with the photos), else image.

one of "image", "video" · default "image"
is_deletedbooleandefault false
created_atinteger | null
metadataResponseMetadata | null
ResponseMetadata fields
FieldTypeDescription
paginationPaginationMetadata | null
PaginationMetadata fields
FieldTypeDescription
limitrequiredinteger
next_cursorstring | null
prev_cursorstring | null
has_morerequiredboolean
has_prevbooleandefault false
total_countinteger | null
status_countsobject | null
object | null fields

Map of string to integer

lifecycle_countsLifecycleCounts | null
LifecycleCounts fields
FieldTypeDescription
allintegerdefault 0
leadintegerdefault 0
prospectintegerdefault 0
customerintegerdefault 0
former_customerintegerdefault 0
classification_countsClassificationCounts | null
ClassificationCounts fields
FieldTypeDescription
signalobject
object fields

Nested object (not expanded)

touchobject
object fields

Nested object (not expanded)

stageobject
object fields

Nested object (not expanded)

metaResponseMeta | null
ResponseMeta fields
FieldTypeDescription
totalinteger | null
total_countinteger | null
pageinteger | null
per_pageinteger | null
  • 400Bad request
  • 401Unauthorized
  • 403Forbidden
  • 404Not found
  • 422Validation error
  • 500Internal server error
  • 503Service unavailable

Error bodies: ErrorResponse. See Errors.

GET/api/v1/admin/businesses/{business_id}/photos/{photo_id}

Get photo metadata

Metadata (incl. ``public_url``) for one photo — the JSON counterpart of the byte-serving ``…/photos/get/{photo_id}``. 404 for missing, deleted, or cross-tenant photos. Declared after the literal ``/photos/*`` routes so it never shadows them.

Authentication

Authorization: Bearer <token>.

Parameters

NameInTypeDescription
business_idrequiredpathstring (uuid)
photo_idrequiredpathstring (uuid)

Responses

200Successful Response
application/jsonSuccessResponse_PhotoData_
FieldTypeDescription
request_idrequiredstring
successtruedefault true
datarequiredPhotoData
PhotoData fields

PhotoData, expanded above.

metadataResponseMetadata | null
ResponseMetadata fields

ResponseMetadata, expanded above.

metaResponseMeta | null
ResponseMeta fields

ResponseMeta, expanded above.

  • 400Bad request
  • 401Unauthorized
  • 403Forbidden
  • 404Not found
  • 422Validation error
  • 500Internal server error
  • 503Service unavailable

Error bodies: ErrorResponse. See Errors.

GET/api/v1/admin/businesses/{business_id}/photos/get/{photo_id}

Serve photo file from GCS

Fetch photo bytes from GCS and return as binary response. Keystone's admin or a member.

Authentication

Authorization: Bearer <token>.

Parameters

NameInTypeDescription
business_idrequiredpathstring (uuid)
photo_idrequiredpathstring (uuid)

Responses

200Successful Response
application/octet-streamstring (binary)
  • 400Bad request
  • 401Unauthorized
  • 403Forbidden
  • 404Not found
  • 422Validation error
  • 500Internal server error
  • 503Service unavailable

Error bodies: ErrorResponse. See Errors.

GET/api/v1/admin/businesses/{business_id}/photos/search-unsplash

Search Unsplash

Search Unsplash. Requires UNSPLASH_ACCESS_KEY.

Authentication

Authorization: Bearer <token>.

Parameters

NameInTypeDescription
business_idrequiredpathstring (uuid)
queryrequiredquerystring

Search term

pagequeryintegerdefault 1
limitqueryintegerdefault 30

Responses

200Successful Response
application/jsonSuccessResponse_UnsplashSearchData_
FieldTypeDescription
request_idrequiredstring
successtruedefault true
datarequiredUnsplashSearchData
UnsplashSearchData fields
FieldTypeDescription
itemsrequiredUnsplashSearchResultItem[]
UnsplashSearchResultItem[] fields

UnsplashSearchResultItem (not expanded)

pageintegerdefault 1
total_pagesinteger | null
metadataResponseMetadata | null
ResponseMetadata fields

ResponseMetadata, expanded above.

metaResponseMeta | null
ResponseMeta fields

ResponseMeta, expanded above.

  • 400Bad request
  • 401Unauthorized
  • 403Forbidden
  • 404Not found
  • 422Validation error
  • 500Internal server error
  • 503Service unavailable

Error bodies: ErrorResponse. See Errors.

POST/api/v1/admin/businesses/{business_id}/photos/upload

Upload photo to business library

Upload a photo (multipart/form-data). Requires GCS bucket configured.

Authentication

Authorization: Bearer <token>.

Parameters

NameInTypeDescription
business_idrequiredpathstring (uuid)

Request bodyrequired

multipart/form-dataBody_upload_photo_api_v1_admin_businesses__business_id__photos_upload_post
FieldTypeDescription
filerequiredstring

Image file

Responses

201Successful Response
application/jsonSuccessResponse_PhotoData_
FieldTypeDescription
request_idrequiredstring
successtruedefault true
datarequiredPhotoData
PhotoData fields

PhotoData, expanded above.

metadataResponseMetadata | null
ResponseMetadata fields

ResponseMetadata, expanded above.

metaResponseMeta | null
ResponseMeta fields

ResponseMeta, expanded above.

  • 400Bad request
  • 401Unauthorized
  • 403Forbidden
  • 404Not found
  • 422Validation error
  • 500Internal server error
  • 503Service unavailable

Error bodies: ErrorResponse. See Errors.