API Referansı

Entegrasyonlar

Restoranın bağlı olduğu platformların eklenmesi, listelenmesi ve durum güncellemesi.
Taban URL
https://api.v1.fastsiparis.com
POST/web-api/v1/restaurants/integrations/update-statuskoleksiyon

Entegrasyon Durumunu Güncelle

Bir entegrasyonu açar veya kapatır. Gövdede zorunlu `field`, `status` (boolean) ve hangi entegrasyonun güncelleneceğini belirten `providerId` alanları beklenir.

Gövde Alanları

AdTipZorunlu
fieldstringEvet
statusbooleanEvet
providerIdstringEvet

Header'lar

AdDeğer
AuthorizationBearer POSENTEGRA_API_KEY
Content-Typeapplication/json

İstek Gövdesi

JSON
{
    "field": "status",
    "status": true,
    "providerId": "e117f602-8edf-4ab0-a878-1f82cbd11d35"
  }

Kod Örneği

curl --request POST \
  --url 'https://api.v1.fastsiparis.com/web-api/v1/restaurants/integrations/update-status' \
  --header 'Authorization: Bearer POSENTEGRA_API_KEY' \
  --header 'Content-Type: application/json' \
  --data '{    "field": "status",    "status": true,    "providerId": "e117f602-8edf-4ab0-a878-1f82cbd11d35"  }'

Yanıtlar

200OK
JSON
{
  "success": true,
  "data": {
    "field": "status",
    "status": true,
    "providerId": "e117f602-8edf-4ab0-a878-1f82cbd11d35"
  }
}
POST/web-api/v1/restaurants/{restaurantId}/integrationskoleksiyon

Restoran Entegrasyonu Ekle veya Güncelle

Restorana platform entegrasyonu ekler veya var olanı günceller.

Parametreler

AdKonumTipZorunluSeçenekler
restaurantIdpathstringEvet

Gövde Alanları

AdTipZorunlu
integrationIdstringHayır
configobjectEvet

Header'lar

AdDeğer
AuthorizationBearer POSENTEGRA_API_KEY
Content-Typeapplication/json

İstek Gövdesi

JSON
{
  "integrationId": "",
  "config": {
    "restaurantId":"",
     "apiKey": "",
    "secretKey": "",
    "supplierId": ""

  }
}

Kod Örneği

curl --request POST \
  --url 'https://api.v1.fastsiparis.com/web-api/v1/restaurants/{restaurantId}/integrations' \
  --header 'Authorization: Bearer POSENTEGRA_API_KEY' \
  --header 'Content-Type: application/json' \
  --data '{  "integrationId": "",  "config": {    "restaurantId":"",     "apiKey": "",    "secretKey": "",    "supplierId": ""  }}'

Yanıtlar

GET/web-api/v1/restaurants/{restaurantId}/integrationskoleksiyon

Restoran Entegrasyonlarını Listele

Restoranın bağlı olduğu platformları ve durumlarını döndürür.

Parametreler

AdKonumTipZorunluSeçenekler
restaurantIdpathstringEvet

Header'lar

AdDeğer
AuthorizationBearer POSENTEGRA_API_KEY

Kod Örneği

curl --request GET \
  --url 'https://api.v1.fastsiparis.com/web-api/v1/restaurants/{restaurantId}/integrations' \
  --header 'Authorization: Bearer POSENTEGRA_API_KEY'

Yanıtlar