API v1.1

QuickShopPublic API

REST API מלא לאינטגרציה עם חנויות QuickShop.
הזמנות, מוצרים, מלאי, לקוחות, Storefront ומובייל - הכל בגישת API.

Base URL
https://my-quickshop.com/api/v1

התחלה מהירה

1

צרו API Key

היכנסו לאדמין → Settings → API Keys ויצרו מפתח חדש עם ה-Scopes הרלוונטיים.

2

הוסיפו את ה-Header

כל קריאה דורשת Header בשם X-API-Key עם המפתח שלכם.

3

התחילו לבנות

קראו את התיעוד המלא ותתחילו לבנות אינטגרציות מדהימות!

Example Request
curl -X GET "https://my-quickshop.com/api/v1/orders" \
  -H "X-API-Key: qs_live_xxxxxxxxxxxxxxxxxxxx"

אימות (Authentication)

כל הקריאות דורשות API Key

Scopes זמינים

orders:read
צפייה בהזמנות
orders:write
עדכון הזמנות
products:read
צפייה במוצרים וקטגוריות
products:write
עריכת מוצרים וקטגוריות
customers:read
צפייה בלקוחות
inventory:read
צפייה במלאי
inventory:write
עדכון מלאי
discounts:read
צפייה בהנחות וקופונים
discounts:write
ניהול הנחות וקופונים
analytics:read
צפייה באנליטיקס
webhooks:read
צפייה בוובהוקים
webhooks:write
ניהול וובהוקים
storefront:read
גישה ל-Storefront API (מוצרים, קטגוריות, הגדרות)
customer:read
גישה לנתוני לקוח (הזמנות, כתובות, משאלות)
customer:write
עדכון פרופיל ומשאלות
mobile:write
רישום מכשירים והתראות

Rate Limiting

  • 100 requests/minute per API key
  • • Header X-RateLimit-Remaining - כמה קריאות נשארו
  • • Header X-RateLimit-Reset - מתי יתאפס המונה

שגיאות נפוצות

401unauthorized- API key לא תקין או חסר
403forbidden- אין הרשאה (scope חסר)
404not_found- משאב לא נמצא
400invalid_request- בקשה לא תקינה
429rate_limited- חריגה ממגבלת קריאות

Endpoints

Orders

GET/api/v1/ordersרשימת הזמנות
GET/api/v1/orders/{id}פרטי הזמנה
PATCH/api/v1/orders/{id}עדכון הזמנה

Products

GET/api/v1/productsרשימת מוצרים
POST/api/v1/productsיצירת מוצר
GET/api/v1/products/{id}פרטי מוצר
PATCH/api/v1/products/{id}עדכון מוצר

Categories

GET/api/v1/categoriesרשימת קטגוריות
POST/api/v1/categoriesיצירת קטגוריה
GET/api/v1/categories/{id}פרטי קטגוריה
PATCH/api/v1/categories/{id}עדכון קטגוריה
DELETE/api/v1/categories/{id}מחיקת קטגוריה

Inventory

GET/api/v1/inventory/{id}צפייה במלאי
PATCH/api/v1/inventory/{id}עדכון מלאי

Customers

GET/api/v1/customersרשימת לקוחות

Discounts

GET/api/v1/discountsרשימת הנחות וקופונים
POST/api/v1/discountsיצירת הנחה/קופון
GET/api/v1/discounts/{id}פרטי הנחה
PATCH/api/v1/discounts/{id}עדכון הנחה
DELETE/api/v1/discounts/{id}מחיקת הנחה

Analytics

GET/api/v1/analyticsסטטיסטיקות וניתוח נתונים

Webhooks

GET/api/v1/webhooksרשימת וובהוקים
POST/api/v1/webhooksיצירת וובהוק
GET/api/v1/webhooks/{id}פרטי וובהוק
PATCH/api/v1/webhooks/{id}עדכון וובהוק
DELETE/api/v1/webhooks/{id}מחיקת וובהוק
NEW

Storefront & Mobile API

Endpoints ציבוריים לפרונט חנות ואפליקציית מובייל. אימות לקוח באמצעות Customer Session.

Storefront Config

GET/api/storefront/{slug}/configהגדרות חנות (שם, לוגו, צבעים, מטבע)
GET/api/storefront/{slug}/app-configהגדרות אפליקציית מובייל (JSON)
PUT/api/storefront/{slug}/app-configשמירת הגדרות מובייל (Admin)

Storefront Products

GET/api/storefront/{slug}/productsקטלוג מוצרים (פילטר, מיון, דפדוף)
GET/api/storefront/{slug}/products/{productSlug}פרטי מוצר + וריאנטים + תמונות

Storefront Categories

GET/api/storefront/{slug}/categoriesרשימת קטגוריות (עם ספירת מוצרים)

Customer Orders

GET/api/customer/ordersהיסטוריית הזמנות הלקוח
GET/api/customer/orders/{orderNumber}פרטי הזמנה + מעקב משלוח

Customer Profile

PUT/api/customer/updateעדכון פרופיל לקוח
GET/api/customer/addressesרשימת כתובות
POST/api/customer/addressesהוספת כתובת
DELETE/api/customer/addressesמחיקת כתובת

Wishlist

GET/api/customer/wishlistרשימת המשאלות
POST/api/customer/wishlistהוספה לרשימה
PUT/api/customer/wishlistToggle (הוסף/הסר)
GET/api/customer/wishlist/{productId}בדיקה אם מוצר ברשימה

Mobile Devices

POST/api/mobile/device/registerרישום מכשיר לפוש נוטיפיקציות
GET/api/mobile/notifications/preferencesהעדפות התראות
PUT/api/mobile/notifications/preferencesעדכון העדפות התראות

אימות לקוחות במובייל

ה-Storefront API משתמש ב-Customer Session (OTP via Email) לאימות לקוחות. Endpoints ציבוריים כמו config, products ו-categories לא דורשים אימות. Endpoints של לקוח (customer/*) דורשים session token.

דוגמאות קוד

Node.js
const API_KEY = 'qs_live_xxxx';
const BASE_URL = 'https://my-quickshop.com/api/v1';

async function getOrders() {
  const response = await fetch(`${BASE_URL}/orders`, {
    headers: {
      'X-API-Key': API_KEY,
    },
  });
  
  const { data, meta } = await response.json();
  return data;
}

async function updateInventory(productId, adjustment) {
  const response = await fetch(`${BASE_URL}/inventory/${productId}`, {
    method: 'PATCH',
    headers: {
      'X-API-Key': API_KEY,
      'Content-Type': 'application/json',
    },
    body: JSON.stringify({
      type: 'product',
      adjustment,
    }),
  });
  
  return response.json();
}
Python
import requests

API_KEY = 'qs_live_xxxx'
BASE_URL = 'https://my-quickshop.com/api/v1'
HEADERS = {'X-API-Key': API_KEY}

def get_orders(page=1, limit=50):
    response = requests.get(
        f'{BASE_URL}/orders',
        headers=HEADERS,
        params={'page': page, 'limit': limit}
    )
    return response.json()['data']

def update_order_status(order_id, status):
    response = requests.patch(
        f'{BASE_URL}/orders/{order_id}',
        headers=HEADERS,
        json={'status': status}
    )
    return response.json()

יצירת מוצר עם תמונות

POST /api/v1/products
// יצירת מוצר חדש עם הורדת תמונות לשרת
const response = await fetch('https://my-quickshop.com/api/v1/products', {
  method: 'POST',
  headers: {
    'X-API-Key': API_KEY,
    'Content-Type': 'application/json',
  },
  body: JSON.stringify({
    name: "מוצר לדוגמא",
    slug: "sample-product",
    description: "תיאור המוצר",
    price: "99.90",
    compare_price: "149.90",
    inventory: 100,
    track_inventory: true,
    category_ids: ["cat_123"],
    
    // תמונות - URL חיצוני
    images: [
      { url: "https://example.com/image1.jpg", alt: "תמונה ראשית", is_primary: true },
      { url: "https://example.com/image2.jpg" }
    ],
    
    // download_images: true = הורד וממיר ל-WebP ב-Vercel Blob
    // download_images: false (ברירת מחדל) = שמור URL כמו שהוא
    download_images: true
  })
});

// Response
{
  "success": true,
  "data": {
    "id": "prod_xxx",
    "name": "מוצר לדוגמא",
    "slug": "sample-product",
    "images": [
      { "id": "img_1", "url": "https://xxx.blob.vercel-storage.com/...", "is_primary": true }
    ]
  }
}

💡 עם download_images: true, תמונות יורדות → ממירות ל-WebP → עולות ל-Vercel Blob.
🎥 וידאו (media_type: "video") נשמר כ-URL כפי שהוא - שלחו URL מ-Cloudinary או מקור אחר.

שליפת מוצרים מה-Storefront

React Native / Expo
const STORE = 'my-store';
const BASE = 'https://my-quickshop.com/api';

// שליפת הגדרות חנות
const config = await fetch(
  `${BASE}/storefront/${STORE}/config`
).then(r => r.json());

// שליפת מוצרים עם פילטרים
const products = await fetch(
  `${BASE}/storefront/${STORE}/products?page=1&limit=20&sort=newest`
).then(r => r.json());

// שליפת מוצר בודד
const product = await fetch(
  `${BASE}/storefront/${STORE}/products/my-product`
).then(r => r.json());
Customer API (עם Session)
// הוספה לרשימת משאלות
await fetch('/api/customer/wishlist', {
  method: 'POST',
  headers: {
    'Content-Type': 'application/json',
    'Cookie': sessionCookie,
  },
  body: JSON.stringify({
    productId: 'prod_xxx'
  }),
});

// שליפת הזמנות לקוח
const orders = await fetch(
  '/api/customer/orders?page=1&limit=10',
  { headers: { 'Cookie': sessionCookie } }
).then(r => r.json());

// עדכון פרופיל
await fetch('/api/customer/update', {
  method: 'PUT',
  headers: {
    'Content-Type': 'application/json',
    'Cookie': sessionCookie,
  },
  body: JSON.stringify({
    firstName: 'דניאל',
    lastName: 'כהן',
    phone: '0501234567',
  }),
});

פורמט Response

Success Response
{
  "data": [
    {
      "id": "uuid",
      "order_number": "1001",
      "status": "processing",
      "total": 480.00,
      "created_at": "2026-01-06T10:00:00Z"
    }
  ],
  "meta": {
    "pagination": {
      "page": 1,
      "limit": 50,
      "total": 150,
      "total_pages": 3,
      "has_next": true,
      "has_prev": false
    }
  }
}
Error Response
{
  "error": {
    "code": "not_found",
    "message": "Order not found"
  }
}

מוכנים להתחיל?

צרו חשבון מפתח, קבלו API Key והתחילו לבנות אינטגרציות מדהימות.