> ## 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.

# Quick Start

> Get your first API call running in 5 minutes

## Prerequisites

Before you begin, make sure you have:

<Check>**App Secret Key** - Provided by Dükkango</Check>
<Check>**Restaurant Secret Key** - Unique per vendor/branch</Check>
<Check>**HTTPS-enabled environment** - All API calls require SSL</Check>

<Note>
  Don't have your API credentials yet? Contact us at [support@dkkango.com](mailto:support@dkkango.com)
</Note>

## Integration Workflow

<Steps>
  <Step title="Obtain API Credentials">
    Get your `app_secret_key` and `rest_secret_key` from the Dükkango team.
  </Step>

  <Step title="Authenticate">
    Call `/auth/login` to get your access token.

    ```bash theme={null}
    curl -X POST https://www.xn--dkkango-n2a.com/api/integrations/auth/login \
      -H 'Content-Type: application/json' \
      -d '{
        "app_secret_key": "your-app-secret-key",
        "rest_secret_key": "your-restaurant-secret-key"
      }'
    ```

    **Response:**

    ```json theme={null}
    {
      "status": true,
      "data": {
        "access_token": "bcfb7a8a...",
        "expiration_date": "2026-01-15 23:59:59"
      }
    }
    ```
  </Step>

  <Step title="Store Your Access Token">
    Save the `access_token` securely. It's valid for 24 hours.
  </Step>

  <Step title="Make Your First API Call">
    Get your restaurant list using the access token:

    ```bash theme={null}
    curl -X GET https://www.xn--dkkango-n2a.com/api/integrations/restaurants/get \
      -H 'Access-Token: your-access-token'
    ```

    **Response:**

    ```json theme={null}
    {
      "status": true,
      "data": [
        {
          "id": "8f2b9ce2-04de-4712-842d-a39f64596fdf",
          "name": "Akat Şube"
        }
      ]
    }
    ```
  </Step>

  <Step title="Poll for Orders">
    Start polling for active orders every 30+ seconds:

    ```bash theme={null}
    curl -X GET https://www.xn--dkkango-n2a.com/api/integrations/orders/get-current \
      -H 'Access-Token: your-access-token'
    ```
  </Step>
</Steps>

## What's Next?

<CardGroup cols={2}>
  <Card title="Authentication Guide" icon="key" href="/authentication">
    Learn about token management and security
  </Card>

  <Card title="Order Lifecycle" icon="route" href="/guides/order-lifecycle">
    Understand the complete order flow
  </Card>

  <Card title="API Reference" icon="code" href="/api-reference/overview">
    Explore all available endpoints
  </Card>

  <Card title="Best Practices" icon="lightbulb" href="/guides/best-practices">
    Build a robust, production-ready integration
  </Card>
</CardGroup>

## Common Integration Pattern

Here's a typical integration workflow:

```javascript theme={null}
// 1. Authenticate
const { access_token } = await login(app_secret, rest_secret);

// 2. Start polling for orders
setInterval(async () => {
  const orders = await getOrders(access_token);
  
  for (const order of orders) {
    // 3. Acknowledge order
    await markOrderSuccess(order.payment_key, access_token);
    
    // 4. Process in your POS
    await processOrder(order);
    
    // 5. Update order status
    if (shouldAccept) {
      await acceptOrder(order.payment_key, 30, access_token);
    }
  }
}, 30000); // Every 30 seconds
```

<Warning>
  Remember to respect rate limits! The `/orders/get-current` endpoint has a 30-second cooldown.
</Warning>
