Ricky logorickyDocs

Upload a location photo

POST
/knowledge/locations/{location_id}/photo

Begins an upload in three steps: this call answers the location and an upload_url; PUT the bytes there; then call POST /knowledge/locations/{location_id}/photo/complete. A location has one photo: uploading another replaces it when the upload completes, and until then the current one stays.

Scope: knowledge:write.

Authorization

bearerAuth
headerAuthorizationBearer <token>

An organization API key, rky_live_…, created in Settings → API. Send it only from a server.

location_id*string

Location ID.

Formatuuid
Idempotency-Key?string

Optional. A value you choose, unique per logical write, 8–200 characters: a UUID or an ID from your system such as order-10482-ready. Retrying with the same key and body replays the first response instead of repeating the write.

Length8 <= length <= 200

Request Body

application/json
  1. body

Begins an upload. Ricky answers where to PUT the bytes.

mime_type*string

File type: JPEG or PNG, up to 5 MB.

Value in"image/jpeg""image/png"
size_bytes*integer

Exact size of the file you will upload.

Range1 <= value <= 9007199254740991

Response Body

Success.

application/json
  1. response
data*

A location, with its current photo, and where to put the bytes of the next one.

curl -X POST 'https://getricky.ai/api/v1/knowledge/locations/497f6eca-6276-4993-bfeb-53cbbbba6f08/photo' \  -H 'Idempotency-Key: order-10482-ready' \  -H 'Content-Type: application/json' \  -d '{  "mime_type": "image/jpeg",  "size_bytes": 482133}'
{  "data": {    "location": {      "id": "c3d4e5f6-a7b8-4c9d-8e0f-1a2b3c4d5e6f",      "name": "Casa Nativa Albrook",      "address": "Albrook Mall, local 214, Panamá",      "latitude": 8.9733,      "longitude": -79.5511,      "street": "Albrook Mall, local 214",      "city": "Panamá",      "state": "Panamá",      "postal_code": null,      "country": "Panamá",      "country_code": "PA",      "phone": "+50760000000",      "email": "albrook@example.com",      "hours": "Lunes a sábado, 10:00 a 20:00",      "photo": {        "mime_type": "image/jpeg",        "size_bytes": 482133,        "download_url": null      }    },    "upload_url": "https://storage.example.com/upload/sign/media/d9e0f1a2-b3c4-4d5e-8f6a-7b8c9d0e1f2a/knowledge/locations/c3d4e5f6-a7b8-4c9d-8e0f-1a2b3c4d5e6f/f1a2b3c4-d5e6-4f7a-8b9c-0d1e2f3a4b5c.jpg?token=…"  }}