> ## Documentation Index
> Fetch the complete documentation index at: https://dkkangoyazlmteknolojiticareta.mintlify.site/llms.txt
> Use this file to discover all available pages before exploring further.

# API Reference Overview

> Complete reference for all Dükkango Integration API endpoints

## Base URL

```
https://www.xn--dkkango-n2a.com/api/integrations
```

## Authentication

All endpoints (except `/auth/login`) require the `Access-Token` header:

```
Access-Token: your-access-token-here
```

## Response Format

All API responses follow this standard format:

### Success Response

```json theme={null}
{
  "status": true,
  "data": { /* response data */ }
}
```

### Error Response

```json theme={null}
{
  "status": false,
  "error": "error_code",
  "message": "Detailed error message"
}
```

## Endpoint Categories

<CardGroup cols={2}>
  <Card title="Authentication" icon="key" href="/authentication">
    Login and obtain access tokens
  </Card>

  <Card title="Restaurants" icon="store" href="/api-reference/restaurants/get">
    Manage restaurant status and information
  </Card>

  <Card title="Foods" icon="utensils" href="/api-reference/foods/get-foods">
    Control menu items and availability
  </Card>

  <Card title="Orders" icon="shopping-cart" href="/api-reference/orders/get-current">
    Receive and manage orders
  </Card>
</CardGroup>

## Endpoint Summary

### Restaurants

| Method | Endpoint                              | Description                     |
| ------ | ------------------------------------- | ------------------------------- |
| GET    | `/restaurants/get`                    | List all accessible restaurants |
| GET    | `/restaurants/status/get/{rest_id}`   | Check restaurant status         |
| PUT    | `/restaurants/status/open/{rest_id}`  | Open restaurant                 |
| PUT    | `/restaurants/status/close/{rest_id}` | Close restaurant                |

### Foods

| Method | Endpoint                          | Description                   | Rate Limit |
| ------ | --------------------------------- | ----------------------------- | ---------- |
| GET    | `/foods/get-foods`                | Get menu items with modifiers | 30s        |
| PUT    | `/foods/status-active/{food_id}`  | Activate menu item            | -          |
| PUT    | `/foods/status-passive/{food_id}` | Deactivate menu item          | -          |

### Orders

| Method | Endpoint                      | Description                  | Rate Limit |
| ------ | ----------------------------- | ---------------------------- | ---------- |
| GET    | `/orders/get-current`         | Fetch active orders          | 30s        |
| PUT    | `/orders/success/{order_id}`  | Acknowledge order            | -          |
| PUT    | `/orders/accept/{order_id}`   | Accept order                 | -          |
| PUT    | `/orders/ontheway/{order_id}` | Mark as out for delivery     | -          |
| PUT    | `/orders/complete/{order_id}` | Complete order               | -          |
| PUT    | `/orders/cancel/{order_id}`   | Cancel order                 | -          |
| GET    | `/orders/variables`           | Get payment/shipping methods | -          |
| GET    | `/orders/cancel-reasons`      | Get cancellation reasons     | -          |

## Rate Limiting

<Warning>
  Some endpoints are rate-limited to prevent excessive API calls.
</Warning>

| Endpoint              | Cooldown   | Error Code |
| --------------------- | ---------- | ---------- |
| `/foods/get-foods`    | 30 seconds | 429        |
| `/orders/get-current` | 30 seconds | 429        |

**Rate Limit Error:**

```json theme={null}
{
  "status": false,
  "error": "çok fazla istek",
  "message": "Çok fazla istek. Lütfen 30 saniye bekleyin."
}
```

<Tip>
  Implement exponential backoff when receiving 429 errors.
</Tip>

## Common Error Codes

| HTTP Status | Error Code            | Description                         |
| ----------- | --------------------- | ----------------------------------- |
| 400         | eksik alan            | Missing required field              |
| 401         | yetkisiz erişim       | Invalid or expired token            |
| 403         | URL hatalı            | Invalid resource ID or unauthorized |
| 404         | sipariş bulunamadı    | Order not found                     |
| 404         | restoran bulunamadı   | Restaurant not found                |
| 422         | eksik alan            | Malformed request body              |
| 429         | çok fazla istek       | Rate limit exceeded                 |
| 500         | Internal server error | Server error                        |

## Data Types

### UUID Format

Restaurant IDs and order `payment_key` use UUID format:

```
8f2b9ce2-04de-4712-842d-a39f64596fdf
```

### Datetime Format

All timestamps use the format:

```
2026-01-15 23:59:59
```

### Currency

All prices are in the smallest currency unit (cents/kuruş):

```json theme={null}
{
  "price": 675  // ₺6.75
}
```

<Card title="Start Building" icon="rocket" href="/quickstart">
  Ready to integrate? Follow our quick start guide
</Card>
