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

# Open Restaurant

> Set restaurant status to open

## Overview

Sets a restaurant status to open, allowing it to receive new orders from customers.

## Path Parameters

<ParamField path="rest_id" type="string" required>
  Restaurant/branch UUID
</ParamField>

## Headers

<ParamField header="Access-Token" type="string" required>
  Your API access token
</ParamField>

## Response

<ResponseField name="status" type="boolean">
  `true` if successful
</ResponseField>

<ResponseField name="data" type="string">
  `"OK"` on success
</ResponseField>

## Examples

<CodeGroup>
  ```bash cURL theme={null}
  curl -X PUT https://www.xn--dkkango-n2a.com/api/integrations/restaurants/status/open/8f2b9ce2-04de-4712-842d-a39f64596fdf \
    -H 'Access-Token: your-access-token'
  ```

  ```javascript JavaScript theme={null}
  const restaurantId = '8f2b9ce2-04de-4712-842d-a39f64596fdf';

  const response = await fetch(
    `https://www.xn--dkkango-n2a.com/api/integrations/restaurants/status/open/${restaurantId}`,
    {
      method: 'PUT',
      headers: {
        'Access-Token': 'your-access-token'
      }
    }
  );

  const data = await response.json();
  // Restaurant is now open
  ```

  ```python Python theme={null}
  import requests

  restaurant_id = '8f2b9ce2-04de-4712-842d-a39f64596fdf'

  response = requests.put(
      f'https://www.xn--dkkango-n2a.com/api/integrations/restaurants/status/open/{restaurant_id}',
      headers={'Access-Token': 'your-access-token'}
  )

  data = response.json()
  # Restaurant is now open
  ```

  ```php PHP theme={null}
  <?php
  $restaurantId = '8f2b9ce2-04de-4712-842d-a39f64596fdf';
  $url = "https://www.xn--dkkango-n2a.com/api/integrations/restaurants/status/open/{$restaurantId}";

  $ch = curl_init();
  curl_setopt($ch, CURLOPT_URL, $url);
  curl_setopt($ch, CURLOPT_CUSTOMREQUEST, "PUT");
  curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
  curl_setopt($ch, CURLOPT_HTTPHEADER, array(
      'Access-Token: your-access-token'
  ));
  $response = curl_exec($ch);
  curl_close($ch);
  // Restaurant is now open
  ?>
  ```
</CodeGroup>

## Success Response (200)

```json theme={null}
{
  "status": true,
  "data": "OK"
}
```

## Error Responses

<ResponseExample>
  ```json Authentication Error (401) theme={null}
  {
    "status": false,
    "error": "yetkisiz erişim"
  }
  ```

  ```json Invalid UUID (403) theme={null}
  {
    "status": false,
    "error": "URL hatalı"
  }
  ```

  ```json Not Found (404) theme={null}
  {
    "status": false,
    "error": "restoran bulunamadı"
  }
  ```
</ResponseExample>

## When to Use

<AccordionGroup>
  <Accordion title="Daily Opening">
    Call this endpoint when restaurant opens for business.

    ```javascript theme={null}
    async function openRestaurant() {
      // Open restaurant
      await setRestaurantStatus(restaurantId, 'open');
      
      // Update UI
      showOpenStatus();
      
      // Enable order acceptance
      enableOrderProcessing();
      
      // Log event
      console.log('Restaurant opened at', new Date());
    }
    ```
  </Accordion>

  <Accordion title="After Break Period">
    Reopen after lunch break or temporary closure.

    ```javascript theme={null}
    async function endBreak() {
      await setRestaurantStatus(restaurantId, 'open');
      notifyStaff('Restaurant is now accepting orders');
    }
    ```
  </Accordion>

  <Accordion title="Manual Override">
    Staff can manually open restaurant from POS.

    ```javascript theme={null}
    async function handleOpenButton() {
      if (confirm('Open restaurant for orders?')) {
        await setRestaurantStatus(restaurantId, 'open');
        showSuccessMessage('Restaurant is now open');
      }
    }
    ```
  </Accordion>

  <Accordion title="Scheduled Opening">
    Automatically open at scheduled time.

    ```javascript theme={null}
    // Open at 11:00 AM daily
    scheduleDaily('11:00', async () => {
      await setRestaurantStatus(restaurantId, 'open');
    });
    ```
  </Accordion>
</AccordionGroup>

## What Happens

<Steps>
  <Step title="Status Updated">
    Restaurant status changes to "Open" in Dükkango platform
  </Step>

  <Step title="Visible to Customers">
    Restaurant becomes visible and accessible in customer apps
  </Step>

  <Step title="Orders Flow">
    New orders can be placed by customers and will appear in `/orders/get-current`
  </Step>
</Steps>

<Warning>
  Make sure your kitchen and staff are ready before opening the restaurant!
</Warning>

## Best Practices

<Tip>
  **Verify before opening:**

  * Kitchen is staffed and ready
  * Ingredients are stocked
  * POS system is online
  * Staff are briefed on specials/changes
</Tip>

## Related Endpoints

<CardGroup cols={2}>
  <Card title="Close Restaurant" icon="door-closed" href="/api-reference/restaurants/status-close">
    Set restaurant to closed
  </Card>

  <Card title="Check Status" icon="circle-question" href="/api-reference/restaurants/status-get">
    Get current status
  </Card>

  <Card title="Get Orders" icon="shopping-cart" href="/api-reference/orders/get-current">
    Start receiving orders
  </Card>
</CardGroup>
