Süper GelsinPartner APIv1.0.0
API Referansı
TREN
Başlangıç
  • Hemen Başla
  • Test Ortamı (Sandbox)
  • Yetkilendirme
  • Servis Limitleri
  • Test hesabı başvurusu
Ortak uçlar
  • İşletme
  • Sipariş Yaşam Döngüsü
  • Sipariş Durumları
  • Mali Belge
  • Kurye Firması Entegrasyonu
  • Müşteri Talepleri
  • Değerlendirmeler
  • Webhook
Yemek
  • Menü ve Ürün Eşleme
Çarşı
  • Çarşı'ya genel bakış
  • Katalog
  • Toplama ve Dönüş
Referans
  • Sürümleme ve Hız Sınırı
  • Hata Kodları ve Sorun Giderme
  • Changelog
  • Sıkça Sorulan Sorular
  • API Referansı
Developer Portal/Shared endpoints

Business

Business information, open or closed status, working hours and the connection notice.

Each key pair is bound to a single business; the key determines the business and the vertical, and no business identifier is sent in the request. The endpoints on this page are the same for restaurants and Çarşı businesses. Places where the vertical makes a difference are stated separately.

Endpoints on this page

Each row links to the full definition in the API reference — fields, response codes and the try-it console.

  • GET/merchant
  • PUT/merchant/status
  • PUT/merchant/working-hours
  • POST/reachability

Business information

GET /merchant is the first call and the regular monitoring call. You can measure the difference between your clock and serverTime in the response.

Request
curl "https://api.supergelsin.com/api/partner/v1/merchant" \
  -H "Authorization: Basic $(printf '%s:%s' "$API_KEY" "$API_SECRET" | base64)" \
  -H "X-Integrator: Ornek POS" \
  -H "X-Operator: kasiyer_01"
AlanTipAçıklama
merchantIdstringThe identifier of the business. This identifier is not the merchant number of a bank or payment institution; it is your business identifier on the platform.
verticalenumrestaurant or store (a Çarşı business).
statusenumThe business's own status setting: open, busy, closed. On Çarşı, busy can be read but not written.
acceptingOrdersbooleanWhether orders are being accepted right now. It reflects working hours, business status and automatic pause together.
busyobject | nullnull unless status is busy; otherwise until and extraMinutes.
autoPausedobject | nullSet when the order flow was stopped because recent orders went unanswered in a row (since, message). It can be set while the business is closed manually, too.
workingHoursobject | nullThe weekly schedule read by the order gate; null if there is no time restriction. Special days are not shown in this response. Times use the HH:MM format.
integratorstringThe X-Integrator value of this request.
serverTimeISO 8601Server time.

Open or closed status

Mark a restaurant busy
curl -X PUT "https://api.supergelsin.com/api/partner/v1/merchant/status" \
  -H "Authorization: Basic $(printf '%s:%s' "$API_KEY" "$API_SECRET" | base64)" \
  -H "X-Integrator: Ornek POS" \
  -H "X-Operator: kasiyer_01" \
  -H "Content-Type: application/json" \
  -d '{ "status": "busy", "busyMinutes": 20, "busyExtraMinutes": 15 }'

PUT /merchant/status returns the current business information (the same body as GET /merchant).

AlanTipAçıklama
statuszorunluenumOn a restaurant: open, busy, closed. On a Çarşı business only open and closed; sending busy returns 400 invalid_status.
busyMinutesintegerRestaurants only, with busy. Duration of the busy period in minutes. If omitted, the busy period has no end.
busyExtraMinutesintegerRestaurants only, with busy. Minutes added to the time shown to the customer; cut to 120.
closeReasonstring | nullRestaurants only, with closed.
  • Closing and reopening a Çarşı business resets the busy setting.
  • A restaurant whose setup is incomplete cannot be opened: 400 setup_incomplete; the message names what is missing.
  • Writing open does not remove the automatic pause; autoPaused does not change. Only re-establishing the connection removes the pause (below).

Working hours

PUT /merchant/working-hours is a partial update: only the days you send change. The workingHours value from GET /merchant can be sent to this endpoint as is. If the closing time is earlier than the opening time the shift crosses midnight and runs into the next day (for example 22:00–02:00). Working hours are a weekly schedule; use PUT /merchant/status for a temporary closure. For a business with no time restriction, GET returns workingHours: null; this endpoint does not accept null at the top level, so write the days one by one.

Request body
{
  "workingHours": {
    "mon": { "open": "09:00", "close": "23:00" },
    "sat": { "open": true, "shifts": [{ "open": "10:00", "close": "14:00" }, { "open": "17:00", "close": "23:00" }] },
    "sun": { "open": false },
    "tue": null
  }
}
Day value
AlanTipAçıklama
nullnullDeletes the day and its shifts.
{ open: false }objectCloses the day; saved shifts are kept. Not sent together with shifts.
{ open: true, shifts }objectOpens the day with the given shifts; shifts cannot be empty.
{ open, close }HH:MMA single-shift day (or a multi-shift day with shifts only). Opening and closing cannot be the same.

Errors: 400 bad_request for an invalid day key (accepted: mon…sun), for a wrong time format and for equal opening and closing times. If the restaurant is not found: 404 not_found (message: Restoran bulunamadı.); on a Çarşı business the message of the 404 response is empty.

Connection notice

Request
curl -X POST "https://api.supergelsin.com/api/partner/v1/reachability" \
  -H "Authorization: Basic $(printf '%s:%s' "$API_KEY" "$API_SECRET" | base64)" \
  -H "X-Integrator: Ornek POS" \
  -H "X-Operator: kasiyer_01" \
  -H "Content-Type: application/json" \
  -d '{ "status": "reachable" }'

POST /reachability reports that the point-of-sale software is running; status is reachable or unreachable, and it is used on both verticals. Automatic pause starts when recent orders go unanswered in a row.

Only re-establishing the connection removes the pause. A reachable notice counts as re-establishing the connection in three cases: unreachable was reported earlier, 15 minutes or more have passed since the previous notice, or it is the first notice. A reachable notice arriving less than 15 minutes after the previous one does not remove the pause; it is suitable for regular polling. An unreachable notice is recorded as a connection loss.

Multiple storefronts (virtual brands)

A restaurant owner can open several storefronts from the same kitchen with different product ranges. For the integration the rule is: each key pair is bound to a single storefront, and each storefront generates its own key in the partner console. The webhook address is per storefront too; it is written for the storefront the key is bound to.

Opening a second storefront requires a different menu. Thresholds: the menu must differ from the business's other storefronts by at least 60%; at least 5 items must belong only to that storefront; at a volume of at least 20 orders the business rating must be at least 4.3 and the rate of business-caused issues at most 5%. Changing only the name, photo or price does not count as differentiation; the comparison normalises item names. The menu rule does not apply to the first storefront.

PreviousService limitsNextOrder lifecycle
On this page
  • Business information
  • Open or closed status
  • Working hours
  • Connection notice
  • Multiple storefronts (virtual brands)