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

# Introduction

> Welcome to the Qwoty API documentation

## Welcome to Qwoty API

<Steps>
  <Step title="Log in to Qwoty">
    Visit [qwoty.app](https://qwoty.app) and sign in to your account
  </Step>

  <Step title="Navigate to Developer Settings">
    Go to **Settings** → **Developer** → **API Tokens**
  </Step>

  <Step title="Generate a New Token">
    Click **Create API Token** and give it a descriptive name
  </Step>

  <Step title="Save Your Token">
    Copy and securely store your API token. It starts with `qwoty_`

    <Warning>
      Your API token will only be shown once. Store it securely!
    </Warning>
  </Step>
</Steps>

## Make Your First Request

Let's retrieve your payment terms using cURL:

```bash theme={null}
curl https://qwoty.app/api/payment-terms \
  -H "Authorization: Bearer qwoty_your_api_token_here"
```

<Tip>Replace `qwoty_your_api_token_here` with your actual API token</Tip>

## Example Response

```json theme={null}
{
  "success": true,
  "data": [
    {
      "id": "550e8400-e29b-41d4-a716-446655440000",
      "name": "Net 30",
      "api_name": "net_30",
      "is_active": true,
      "installments": [
        {
          "name": "Full Payment",
          "percentage": 100,
          "term": "net30",
          "order_number": 1
        }
      ]
    }
  ]
}
```

## Using Different Languages

<CodeGroup>
  ```javascript JavaScript (fetch) theme={null}
  const response = await fetch('https://qwoty.app/api/payment-terms', {
    headers: {
      Authorization: 'Bearer qwoty_your_api_token_here',
    },
  })

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

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

  headers = {
      'Authorization': 'Bearer qwoty_your_api_token_here'
  }

  response = requests.get(
      'https://qwoty.app/api/payment-terms',
      headers=headers
  )

  data = response.json()
  print(data)
  ```

  ```typescript TypeScript theme={null}
  interface PaymentTerm {
    id: string
    name: string
    api_name: string
    is_active: boolean
    installments: Array<{
      name: string
      percentage: number
      term: string
      order_number: number
    }>
  }

  const response = await fetch('https://qwoty.app/api/payment-terms', {
    headers: {
      Authorization: 'Bearer qwoty_your_api_token_here',
    },
  })

  const data: { success: boolean; data: PaymentTerm[] } = await response.json()
  ```
</CodeGroup>

## Next Steps

<CardGroup cols={2}>
  <Card icon="rocket" href="./developers/quickstart" title="Quickstart">
    Get your API key and make your first request in minutes
  </Card>

  <Card icon="key" href="./developers/authentication" title="Authentication">
    Learn how to authenticate your API requests
  </Card>

  <Card icon="book-open" href="./api-reference/overview" title="API Reference">
    Explore all available API resources and endpoints
  </Card>

  <Card icon="life-ring" href="mailto:support@qwoty.io" title="Support">
    Need help? Our team is here to assist you
  </Card>
</CardGroup>

## API Features

<AccordionGroup>
  <Accordion title="RESTful Architecture">
    Our API follows REST principles with predictable resource-oriented URLs,
    accepts JSON-encoded request bodies, and returns JSON-encoded responses.
  </Accordion>

  <Accordion title="Comprehensive Error Handling">
    Clear error messages with appropriate HTTP status codes help you quickly
    identify and resolve issues.
  </Accordion>

  <Accordion title="Workspace Isolation">
    All API operations are scoped to your workspace, ensuring data security and
    isolation.
  </Accordion>
</AccordionGroup>

## Base URL

All API requests should be made to:

```
https://qwoty.app/api
```

## Need Help?

<CardGroup cols={2}>
  <Card icon="envelope" href="mailto:support@qwoty.io" title="Email Support">
    [support@qwoty.io](mailto:support@qwoty.io)
  </Card>

  <Card icon="browser" href="https://qwoty.app" title="Dashboard">
    Access your Qwoty dashboard
  </Card>
</CardGroup>
