ინტეგრაცია

API დოკუმენტაცია

Public REST API — images, products, categories

სრული FAQ →

გაუზიარე 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

POST/imagesფოტოს ატვირთვა + ფონის მოშორება
GET/imagesფოტოების სია
GET/images/:idსტატუსი + variants
GET/productsპროდუქტების სია
POST/productsპროდუქტის შექმნა
GET/products/:idპროდუქტის მიღება
PATCH/products/:idპროდუქტის განახლება
DELETE/products/:idპროდუქტის წაშლა
GET/categoriesკატეგორიების ხე
POST/categoriesკატეგორია
DELETE/categories/:idკატეგორიის წაშლა
POST/products/bulkbulk status / price / delete (max 100)
GET/products/exportCSV export (UTF-8 BOM, Excel-ready)
POST/products/importCSV import — upsert by SKU
GET/products/:id/changelogprice / status / quantity change history

4. ფოტოს დამუშავება

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

HTTPcodeმიზეზი
401missing_api_keyAuthorization header არ არის
401invalid_api_keyKey არასწორია ან გაუქმებულია
403api_plan_requiredFree გეგმა — API Pro+-ზე
402insufficient_creditsCredits ამოიწურა
400validation_errorRequest body validation (details in message)
404not_foundResource არ მოიძებნა ან სხვა org-ის
500processing_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 თვე. პარტნიორ პროგრამა →