API დოკუმენტაცია
Public REST API — images, products, categories
გაუზიარე AI ასისტენტს
პრომპტი + სრული API docs — ჩასვი AI-ში „ჩავაშენე ephoto ჩემს საიტში“.
1. API Key — მაღაზიაზე
თითო მაღაზიას თავისი API key აქვს. Key განსაზღვრებს რომელ მაღაზიის კატალოგში იმუშავებს მოთხოვნა. შექმენი ან განაახლე API Keys.
curl https://ephoto.ge/api/v1/images \ -H "Authorization: Bearer ephk_live_xxxxxxxx" # X-Api-Key: ephk_live_xxxxxxxx ← backward-compat alias
2. Base URL
https://ephoto.ge/api/v1
3. Endpoints
/images— ფოტოს ატვირთვა + ფონის მოშორება/images— ფოტოების სია/images/:id— სტატუსი + variants/products— პროდუქტების სია/products— პროდუქტის შექმნა/products/:id— პროდუქტის მიღება/products/:id— პროდუქტის განახლება/products/:id— პროდუქტის წაშლა/categories— კატეგორიების ხე/categories— კატეგორია/categories/:id— კატეგორიის წაშლა/products/bulk— bulk status / price / delete (max 100)/products/export— CSV export (UTF-8 BOM, Excel-ready)/products/import— CSV import — upsert by SKU/products/:id/changelog— price / status / quantity change history4. ფოტოს დამუშავება
multipart upload. მაღაზიაზე ჩართული ბრენდინგი API-ზეც გამოიყენება — 2 credit, უბრენდინგ — 1.
curl -X POST https://ephoto.ge/api/v1/images \ -H "Authorization: Bearer ephk_live_xxxx" \ -F "file=@product.jpg" # optional: -F "product_id=<uuid>" # synchronous — blocks until ready, always returns status:"ready"
Request bodies
POST /products{
"title_ka": "პროდუქტი", // required
"title_en": "Product name", // optional
"sku": "ABC-001", // optional
"price": 99.90, // optional
"quantity": 5, // optional, default 0
"category_id": "uuid", // optional
"image_ids": ["uuid", "uuid"], // optional — must be status:ready
"custom_fields": { "ფერი": "თეთრი" }, // optional
"store_id": "uuid" // optional — uses first store if omitted
}PATCH /products/:idყველა ველი optional. image_ids გადაცემა ცვლის ყველა ძველ სურათს.
{
"title_ka": "განახლებული სახელი",
"price": 79.90,
"status": "draft", // "active" | "draft"
"category_id": "uuid", // null = კატეგორიის მოხსნა
"image_ids": ["uuid"] // replaces all existing images
}POST /categories{
"name": "ელექტრონიკა", // required
"name_en": "Electronics", // optional
"parent_id": "uuid", // optional — nested categories
"store_id": "uuid" // optional
}Response schemas
Image object{
"id": "uuid",
"product_id": "uuid" | null,
"status": "ready", // "queued" | "processing" | "ready" | "failed"
"width": 1024,
"height": 1024,
"created_at": "2026-06-18T...",
"variants": [
{ "variant": "full", "url": "https://ephoto.ge/...", "width": 2048, "height": 2048, "bytes": 480000 },
{ "variant": "1024", "url": "https://ephoto.ge/...", "width": 1024, "height": 1024, "bytes": 150558 },
{ "variant": "thumb", "url": "https://ephoto.ge/...", "width": 256, "height": 256, "bytes": 12400 }
]
}Product object{
"id": "uuid",
"title_ka": "პროდუქტი",
"title_en": null,
"sku": null,
"price": 99.90,
"quantity": 5,
"status": "active", // "active" | "draft"
"category": { "id": "uuid", "name": "კატეგორია" } | null,
"images": [ /* Image objects (without product_id/status/created_at) */ ],
"custom_fields": { "f_223135": "თეთრი" },
"created_at": "2026-06-18T...",
"updated_at": "2026-06-18T..."
}GET /products — pagination{
"data": [ /* Product[] */ ],
"next_cursor": "uuid" | null // pass as ?cursor= for next page
}
# example: GET /products?limit=50&cursor=<next_cursor>Bulk operations
POST /products/bulk — max 100 ids per call.
// Set status
{ "ids": ["uuid", "uuid"], "action": "set_status", "value": "active" }
// Set price (flat ₾)
{ "ids": ["uuid"], "action": "set_price", "value": 49.90 }
// Delete
{ "ids": ["uuid", "uuid"], "action": "delete" }CSV Export / Import
Export columns: sku, title_ka, title_en, price, quantity, status, category. UTF-8 BOM — Excel opens Georgian correctly.
# Export curl https://ephoto.ge/api/products/export \ -H "Authorization: Bearer ephk_live_xxxx" -o products.csv # Import (upsert by SKU) curl -X POST https://ephoto.ge/api/products/import \ -H "Authorization: Bearer ephk_live_xxxx" \ -F "file=@products.csv"
Price change log
GET /products/:id/changelog?field=price&days=90
// Response
{
"data": [
{ "field": "price", "oldValue": "99.9", "newValue": "79.9", "changedAt": "2026-06-18T..." },
...
]
}Error codes
| HTTP | code | მიზეზი |
|---|---|---|
| 401 | missing_api_key | Authorization header არ არის |
| 401 | invalid_api_key | Key არასწორია ან გაუქმებულია |
| 403 | api_plan_required | Free გეგმა — API Pro+-ზე |
| 402 | insufficient_credits | Credits ამოიწურა |
| 400 | validation_error | Request body validation (details in message) |
| 404 | not_found | Resource არ მოიძებნა ან სხვა org-ის |
| 500 | processing_failed | ფოტოს დამუშავების შეცდომა |
Rate limit
60 req/min per key. Header: X-RateLimit-Remaining
5. Embed
<img src="https://ephoto.ge/uploads/.../full.png" alt="product" /> <iframe src="https://ephoto.ge/embed/IMAGE_ID" width="400" height="400"></iframe>
ლინკი და embed — გალერეა.
7. პარტნიორ პროგრამა
დეველოპერებისთვის — მოიწვე კლიენტი /register?ref=YOUR_CODE ლინკით და მიიღე 20% net გადახდებიდან 12 თვე. პარტნიორ პროგრამა →