> ## Documentation Index
> Fetch the complete documentation index at: https://docs.zenflow.com.ar/llms.txt
> Use this file to discover all available pages before exploring further.

# Quickstart

> Get up and running with the ZenFlow API in minutes

# Quickstart

This guide will help you make your first API call to ZenFlow in under 5 minutes.

## Step 1: Get Your API Key

1. Log in to your [ZenFlow Dashboard](https://backoffice.zenflow.com.ar)
2. Navigate to **Settings** > **API Keys**
3. Click **Create API Key**
4. Give your key a name and select the required scopes
5. Copy and securely store your API key

<Warning>
  Your API key secret is only shown once. Store it securely - you won't be able
  to see it again.
</Warning>

## Step 2: Make Your First Request

Let's retrieve your orders to make sure everything is working:

<CodeGroup>
  ```bash cURL theme={null}
  curl -X GET "https://api.zenflow.com.ar/api/v1/orders" \
    -H "X-API-Key: zenflow_live_your_api_key_here" \
    -H "Content-Type: application/json"
  ```

  ```javascript Node.js theme={null}
  const response = await fetch("https://api.zenflow.com.ar/api/v1/orders", {
    method: "GET",
    headers: {
      "X-API-Key": "zenflow_live_your_api_key_here",
      "Content-Type": "application/json",
    },
  });

  const data = await response.json();
  console.log(data);
  ```

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

  response = requests.get(
      'https://api.zenflow.com.ar/api/v1/orders',
      headers={
          'X-API-Key': 'zenflow_live_your_api_key_here',
          'Content-Type': 'application/json'
      }
  )

  data = response.json()
  print(data)
  ```
</CodeGroup>

You should receive a response like:

```json theme={null}
{
  "success": true,
  "data": {
    "orders": [],
    "pagination": {
      "total": 0,
      "page": 1,
      "limit": 50,
      "total_pages": 0
    }
  }
}
```

## Step 3: Create Your First Order

Now let's create an order:

<CodeGroup>
  ```bash cURL theme={null}
  curl -X POST "https://api.zenflow.com.ar/api/v1/orders" \
    -H "X-API-Key: zenflow_live_your_api_key_here" \
    -H "Content-Type: application/json" \
    -d '{
      "order_tenant_id": "ORD-001",
      "assembly_date": "2024-01-15",
      "order_detail": [
        {
          "barcode": "7891234567890",
          "quantity": 2
        }
      ]
    }'
  ```

  ```javascript Node.js theme={null}
  const response = await fetch("https://api.zenflow.com.ar/api/v1/orders", {
    method: "POST",
    headers: {
      "X-API-Key": "zenflow_live_your_api_key_here",
      "Content-Type": "application/json",
    },
    body: JSON.stringify({
      order_tenant_id: "ORD-001",
      assembly_date: "2024-01-15",
      order_detail: [
        {
          barcode: "7891234567890",
          quantity: 2,
        },
      ],
    }),
  });

  const data = await response.json();
  console.log(data);
  ```

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

  response = requests.post(
      'https://api.zenflow.com.ar/api/v1/orders',
      headers={
          'X-API-Key': 'zenflow_live_your_api_key_here',
          'Content-Type': 'application/json'
      },
      json={
          'order_tenant_id': 'ORD-001',
          'assembly_date': '2024-01-15',
          'order_detail': [
              {
                  'barcode': '7891234567890',
                  'quantity': 2
              }
          ]
      }
  )

  data = response.json()
  print(data)
  ```
</CodeGroup>

## Step 4: Set Up Webhooks (Optional)

To receive real-time notifications when orders are updated, set up a webhook:

```bash theme={null}
curl -X POST "https://api.zenflow.com.ar/api/v1/webhooks" \
  -H "X-API-Key: zenflow_live_your_api_key_here" \
  -H "Content-Type: application/json" \
  -d '{
    "name": "Order Updates",
    "url": "https://your-server.com/webhooks/zenflow",
    "events": ["order.created", "order.updated", "order.completed"]
  }'
```

<Note>
  Make sure to store the webhook secret returned in the response - you'll need
  it to verify webhook signatures.
</Note>

## Next Steps

<CardGroup cols={2}>
  <Card title="API Reference" icon="book" href="/api-reference/overview">
    Explore all available endpoints
  </Card>

  <Card title="ERP Integration Guide" icon="plug" href="/guides/erp-integration">
    Learn how to integrate with your ERP
  </Card>

  <Card title="Webhooks Guide" icon="webhook" href="/guides/webhooks">
    Set up real-time notifications
  </Card>

  <Card title="Integrations" icon="puzzle-piece" href="/integrations/overview">
    Connect with Mercado Libre, Tiendanube and more
  </Card>
</CardGroup>
