Rehberler

İlk Entegrasyon

Sıfırdan başlayan bir hesabı sipariş alır hâle getiren en kısa yol.

Ön koşullar

Panelden alınmış bir API anahtarı ve HTTPS isteği atabilen bir sunucu yeterli — başka bir şey gerekmiyor.

Adımlar

  1. İşletmeyi oluştur

    POST /web-api/v1/businesses. Dönen id, bir sonraki adımda businessId olarak kullanılır.

    cURL
    curl -X POST https://api.v1.fastsiparis.com/web-api/v1/businesses \
      -H "Authorization: Bearer POSENTEGRA_API_KEY" \
      -H "Content-Type: application/json" \
      -d '{ "name": "Merkez İşletme" }'
  2. Restoranı oluştur

    POST /web-api/v1/restaurants. Gövdedeki businessId, bir önceki adımda dönen değerdir. Var olan bir restoranı bağlamak için POST /web-api/v1/businesses/{businessId}/restaurants ucunu restaurantId gövdesiyle kullanın.

    cURL
    curl -X POST https://api.v1.fastsiparis.com/web-api/v1/restaurants \
      -H "Authorization: Bearer POSENTEGRA_API_KEY" \
      -H "Content-Type: application/json" \
      -d '{
        "businessId": "{businessId}",
        "name": "Serdivan Şubesi",
        "description": "Serdivan AVM yanı"
      }'
  3. Paketi ata

    POST /web-api/v1/restaurants/{restaurantId}/assign-package. Uygun paketleri GET /web-api/v1/user/packages/available ile listeleyin.

    cURL
    curl -X POST https://api.v1.fastsiparis.com/web-api/v1/restaurants/{restaurantId}/assign-package \
      -H "Authorization: Bearer POSENTEGRA_API_KEY" \
      -H "Content-Type: application/json" \
      -d '{
        "userPackageId": "{userPackageId}",
        "businessName": "PosEntegra"
      }'
  4. Platform entegrasyonunu ekle

    POST /web-api/v1/restaurants/{restaurantId}/integrations ile entegrasyonu ekleyin; config alanları platformun size verdiği kimlik bilgileridir. Ardından POST /web-api/v1/restaurants/integrations/update-status ucuna providerId göndererek aktif edin.

    cURL
    curl -X POST https://api.v1.fastsiparis.com/web-api/v1/restaurants/{restaurantId}/integrations \
      -H "Authorization: Bearer POSENTEGRA_API_KEY" \
      -H "Content-Type: application/json" \
      -d '{
        "integrationId": "{integrationId}",
        "config": {
          "restaurantId": "{restaurantId}",
          "apiKey": "",
          "secretKey": "",
          "supplierId": ""
        }
      }'
    
    curl -X POST https://api.v1.fastsiparis.com/web-api/v1/restaurants/integrations/update-status \
      -H "Authorization: Bearer POSENTEGRA_API_KEY" \
      -H "Content-Type: application/json" \
      -d '{
        "field": "status",
        "status": true,
        "providerId": "{providerId}"
      }'
  5. Siparişleri dinle

    GET /web-api/v1/orders ile çekin ya da webhook kurun.

    cURL
    curl https://api.v1.fastsiparis.com/web-api/v1/orders \
      -H "Authorization: Bearer POSENTEGRA_API_KEY"

Kurulumu doğrula

İki kontrol yeterli: GET /web-api/v1/restaurants/{restaurantId}/integrations bağlı platformu döndürmeli; GET /web-api/v1/orders 200 dönmeli (liste boş olabilir).

Entegrasyon durumu pasifken sipariş düşmez.

Sonraki adım