Süper GelsinPartner APIv1.0.0
API Reference
TREN
Getting started
  • Quick start
  • Sandbox
  • Authorization
  • Service limits
  • Test hesabı başvurusu
Shared endpoints
  • Business
  • Order lifecycle
  • Order statuses
  • Tax document
  • Courier company integration
  • Customer disputes
  • Reviews
  • Webhooks
Food delivery
  • Menu & item mapping
Çarşı (retail)
  • Çarşı overview
  • Catalogue
  • Picking and return
Reference
  • Versioning & rate limits
  • Error codes & troubleshooting
  • Changelog
  • Frequently asked questions
  • API reference
Developer Portal/Shared endpoints

Order lifecycle

Listing and reading orders, payment, status actions, cancellation and automatic cancellation.

Restaurants and Çarşı businesses use the same order endpoints. The body carries shared fields; the product lines differ by the vertical field: RestoranSiparisi for restaurant, DukkanSiparisi for store. The Çarşı-specific picking and return steps are on the Picking and return page.

Endpoints on this page

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

  • GET/orders
  • GET/orders/{id}
  • POST/orders/{id}/status
  • GET/cancel-reasons

Status flow

Restaurant
pending→preparing→ready→on_the_way→delivered(cancelled from most states)
Çarşı
pending→confirmed→preparing→on_the_way→delivered(cancelled from most states)

The actions that write the status are the same on both verticals: accept, ready, dispatch, deliver, cancel. The target status depends on the vertical (see the Writing status table below). For status names and meanings, see Order statuses.

Listing and reading orders

Pull changed orders
curl "https://api.supergelsin.com/api/partner/v1/orders?updatedSince=2026-01-31T10:00:00Z&limit=50" \
  -H "Authorization: Basic $(printf '%s:%s' "$API_KEY" "$API_SECRET" | base64)" \
  -H "X-Integrator: Ornek POS" \
  -H "X-Operator: kasiyer_01"

GET /orders is a paged list and returns { items, nextCursor }. Ordering is by updatedAt ascending, then id ascending; the list starts at the oldest change and moves forward by cursor. If nextCursor is set, send it as cursor in the next request; null means the end of the stream. Orders with incomplete payment are never listed.

AlanTipAçıklama
limitintegerPage size, 1–50; default 50.
statusstringComma-separated list of statuses. Restaurant: pending, preparing, ready, on_the_way, delivered, cancelled; Çarşı: pending, confirmed, preparing, on_the_way, delivered, cancelled and return_pending. An unknown value returns 400 invalid_query; allowed lists the permitted values.
updatedSinceISO 8601Time zone required (2026-01-31T10:00:00Z). Returns orders changed at or after this moment (the boundary is included). A value without seconds or without a time zone returns 400 invalid_query.
cursorstringThe nextCursor from the previous response. A corrupted value restarts the stream from the beginning.
  • Default: when neither status nor updatedSince is given, only active orders are returned (restaurant: pending, preparing, ready, on_the_way; Çarşı: pending, confirmed, preparing, on_the_way).
  • When updatedSince is given, all statuses come back, including delivery and cancellation changes; this is how the point of sale reconciles its own records.
  • On the next pull, pass a value a few seconds earlier than the last updatedAt you saw and remove duplicates by the id and updatedAt pair: the change time is written before the operation completes, so a newly changed order may not show up with a very close timestamp.
  • On Çarşı, status=return_pending returns orders cancelled as undeliverable whose return is awaiting confirmation; returnLines is filled on these orders.

GET /orders/{id} returns the full body of a single order. An order with incomplete payment and an order of another business receive the same 404 not_found. The webhook body (the order field) is the same object; webhooks provide low latency, and these endpoints are the source of truth (Webhooks).

Order body

Fields shared by both verticals
AlanTipAçıklama
id · refstringref is the visible order number: the last 8 characters of id, in capitals. It matches the number on the panel, the ticket and the notifications.
merchantId · verticalstringBusiness identifier and vertical (restaurant or store).
isTestbooleanIf true, this is a test order created with POST /orders/test; it does not reach the kitchen or picking screen of the business (picking results can still be written through this API).
createdAt · updatedAt · scheduledAtISO 8601updatedAt is the last change moment, for updatedSince and sync. scheduledAt is set on a future-dated (scheduled) order, otherwise null.
notestring | nullCustomer note. Removed when the customer window ends.
subtotal · deliveryFee · totalnumberAmounts.
paymentobjectCollection information (see Payment below).
cancelReason · deliveryFailedobject | nullThe cancellation reason on a cancelled order; deliveryFailed (reasonCode, completedSale, at) on an order closed as undeliverable.
invoice · courier · customerobjectInvoice link (Invoice), external courier details (Courier) and customer details.

Customer information is narrowed 2 hours after closing (the name is shortened, the phone and coordinates are removed, the address is reduced to District / Province, the note is removed); the order summary (items, amounts, payment, invoice) is not affected by this narrowing.

Restaurant (vertical: restaurant)
AlanTipAçıklama
typeenumDelivery type: delivery, pickup.
items[]arrayid (the menu item identifier), name, quantity, unitPrice, options and selectedOptions (groupName, choiceId, choiceName, price, optionType; unresolved: true if no match is found in the menu).
chargesobjectserviceFee, tip, discount, couponCode.
deliveryProviderstringWho delivers: self or an external courier company code (prefixed 3pl:).
prepobjectminutes, estimated, readyAt. The order arrives before acceptance: estimated: true means the time is an estimate; on acceptance the time is fixed and readyAt is filled.
preferencesobjectdoNotKnock, dropOffAtDoor, noCutlery.
Çarşı (vertical: store)
AlanTipAçıklama
items[]arrayclientReferenceId, sku, barcode, name, quantity, unitPrice, total, substitutionPreference (ask, similar, cancel) and pick (status, pickedQuantity, substituteName, refundAmount).
taxTotalnumberVAT total.
pickingobjectPicking summary: total, counts, unresolved, completed. The dispatch action requires completed: true.
returnLinesarray | nullSet only on an order awaiting return confirmation (cancelled as undeliverable); null otherwise. The lines are the input of POST /orders/{id}/return.

Mapping lines to your products

Map lines by identifier, never by name. On a restaurant, items[].id is the item id from the GET /menu response; for options, selectedOptions[].choiceId is the modifierGroups[].choices[].id in the menu (Menu and item mapping). On a Çarşı business, the mapping key is clientReferenceId; match the product with the identifier you sent (Catalogue).

Payment: the amount due at the door

Collection information is inside the order and is the same on both verticals. channel and dueAmount tell the cashier whether to collect money at the door.

JSON
"payment": {
  "channel": "door",           // door = collected at the door · online = paid through the platform
  "instrument": "bank_card",   // cash | bank_card | meal_card
  "method": "pos_merchant",
  "dueAmount": 250             // amount to collect at the door
}

dueAmount is the amount to be collected at the door. It is 0 when channel is online or when the order is cancelled (including undeliverable). For payment at the door it is the order total; on Çarşı it can decrease after picking ends, when the picking shortfall is deducted. The amount read before picking closes is not final; read the order again after picking ends.

Payment method codes (method)
AlanTipAçıklama
cashdoor · cashCash, at the door
cardonline · bank_cardBank and credit card, online
pos_merchantdoor · bank_cardBank and credit card, at the door
meal_card_door_multinetdoor · meal_cardMeal card (multinet), at the door
meal_card_online_multinetonline · meal_cardMeal card (multinet), online. Not enabled: it does not appear on any order.
meal_card_door_pluxeedoor · meal_cardMeal card (pluxee), at the door
meal_card_online_pluxeeonline · meal_cardMeal card (pluxee), online. Not enabled: it does not appear on any order.
meal_card_door_edenreddoor · meal_cardMeal card (edenred), at the door
meal_card_online_edenredonline · meal_cardMeal card (edenred), online. Not enabled: it does not appear on any order.
meal_card_door_setcarddoor · meal_cardMeal card (setcard), at the door
meal_card_online_setcardonline · meal_cardMeal card (setcard), online. Not enabled: it does not appear on any order.
meal_card_door_metropoldoor · meal_cardMeal card (metropol), at the door
meal_card_online_metropolonline · meal_cardMeal card (metropol), online. Not enabled: it does not appear on any order.
meal_card_door_tokenflexdoor · meal_cardMeal card (tokenflex), at the door
meal_card_online_tokenflexonline · meal_cardMeal card (tokenflex), online. Not enabled: it does not appear on any order.
meal_card_door_iwalletdoor · meal_cardMeal card (iwallet), at the door
meal_card_online_iwalletonline · meal_cardMeal card (iwallet), online. Not enabled: it does not appear on any order.

instrument is meal_card for meal-card methods. The online meal-card methods (meal_card_online_*) are not enabled at the moment. The set is closed for this version; if you meet a code you do not recognise, look at the channel and instrument fields instead of ignoring it.

Writing status

Accept an order (restaurant)
curl -X POST "https://api.supergelsin.com/api/partner/v1/orders/cm_ornek_siparis/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 '{ "action": "accept", "prepMinutes": 25 }'
Actions and target status
AlanTipAçıklama
acceptpreparing | confirmedOn a restaurant, preparing; on Çarşı, turns a pending order into confirmed. If the Çarşı order is already confirmed the result is the same and prepMinutes is ignored.
readyreadyOn a restaurant, ready. On Çarşı the status does not change: 200 if picking is closed, otherwise 409 picking_incomplete.
dispatchon_the_wayOn Çarşı it cannot be written before picking is closed; close picking first with POST /orders/{id}/picking.
deliverdeliveredDelivered.
cancelcancelledreasonCode is required; reason is an optional free-text explanation (cut to 200 characters).
Body fields
AlanTipAçıklama
actionzorunluenumaccept, ready, dispatch, deliver, cancel. Any other value returns 400 invalid_action.
prepMinutesintegerRestaurants only, with accept. Preparation time, 1–180 minutes; otherwise 400 invalid_prep_minutes. Ignored on Çarşı.
reasonCodeenumRequired for cancel; missing returns 400 reason_required, invalid returns 400 invalid_reason. Valid codes are in the GET /cancel-reasons response.
occurredAtISO 8601The moment the transition actually happened; used when the point-of-sale connection dropped or the notification was queued. Applied on restaurants only; on Çarşı it is not applied and the transition is written at the moment the request arrives. It cannot be in the future (more than 5 minutes), before the order was opened or before the previous stage, and can go back at most 24 hours; otherwise 400 invalid_occurred_at is returned and reason gives the cause.

If the target status is already in effect the result does not change and the response is 200; the same request can be repeated. The response is the current order body. An invalid transition returns 409 invalid_transition; current gives the order status and allowed the actions possible from that status.

A status written by the point-of-sale software itself is not sent back as a webhook. If a status arriving by webhook is behind your local status, ignore it; if in doubt, reconcile with GET /orders/{id}.

Cancellation and reasons

GET /cancel-reasons returns all cancellation reasons for the business's vertical: who they are attributed to (attributedTo), their effect on performance (affectsPerformance), whether they are selectable (selectable) and in which order statuses they can be chosen (allowedFrom). Only codes with selectable: true are used with the cancel action. The list is not paged.

  • Undeliverable reasons (customer_unreachable, invalid_address) are accepted only while the order is on_the_way; an order on the way cannot be cancelled with another reason.
  • Cancelling an order paid online refunds the payment to the customer. How the sale closed after an undeliverable outcome is in deliveryFailed.completedSale: on a restaurant, true means the sale is complete, and even though status is cancelled it is not cancelled at the till; it is closed as a sale paid online. On Çarşı it is always false; for an online payment the whole amount is refunded to the customer.
  • On Çarşı, the return of an order cancelled as undeliverable is confirmed with POST /orders/{id}/return (Picking and return).

Automatic cancellation of an unaccepted order

A pending order that is not accepted is cancelled automatically with the reason acceptance_timeout 12 minutes after it reaches the business; this applies on both verticals and is recorded in the business's performance. The period runs from the moment the order reaches the business; for online payment, that is the moment the payment is confirmed. accept must be written before this period ends.

On Çarşı, a future-dated (scheduled) order is not cancelled automatically. On a restaurant, a scheduled order must also be accepted within this period. Test orders (isTest: true) are outside automatic cancellation.

PreviousBusinessNextOrder statuses
On this page
  • Status flow
  • Listing and reading orders
  • Order body
  • Mapping lines to your products
  • Payment: the amount due at the door
  • Writing status
  • Cancellation and reasons
  • Automatic cancellation of an unaccepted order