> For the complete documentation index, see [llms.txt](https://docs.gameket.io/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.gameket.io/getting-started.md).

# Getting started

Welcome to the Gameket Merchant API documentation. This API enables merchants to manage products, orders, and handle transactions in the Gameket ecosystem.

### Quick Start

1. **Get API Credentials** - Contact Gameket to receive your `apiKey` and `secret`
2. **Request a Token** - POST to `/merchant/auth/check` with your credentials
3. **Use the Token** - Include the Bearer token in all subsequent requests
4. **Start Integrating** - Use the endpoints to manage your products and orders

### Base URL

```
https://api.gameket.io
```

### Key Features

* ✅ **Token-based Authentication** - JWT tokens valid for 2 hours
* ✅ **Rate Limiting** - Fair usage limits to protect the API
* ✅ **Idempotency Keys** - Prevent duplicate operations
* ✅ **Product Management** - Create, update, and manage product catalogs
* ✅ **Order Handling** - Process orders, refunds, and cancellations
* ✅ **Stock Management** - Automatic and manual stock control
* ✅ **Webhooks** - Receive real-time notifications

### Authentication

All requests (except `/merchant/auth/check`) require:

* `Authorization: Bearer {token}` header
* `x-merchant-api-key: {apiKey}` header

For write operations, also include:

* `Idempotency-Key: {unique-key}` header

### Rate Limits

| Endpoint       | Limit        | Window   |
| -------------- | ------------ | -------- |
| Token Issuance | 2 tokens     | 1 hour   |
| General Reads  | 240 requests | 1 minute |
| General Writes | 120 requests | 1 minute |

### Response Format

All responses use a standard JSON format:

**Success Response:**

```json
{
  "success": true,
  "data": { /* response data */ }
}
```

**Error Response:**

```json
{
  "success": false,
  "error": "Error message",
  "code": "ERROR_CODE",
  "requestId": "req_12345"
}
```

### Support

For API support and integration help:

* 📧 Email: <support@gameket.io>
* 📖 Full Documentation

### What's Next?

* Getting Started Guide
* Authentication Setup
* Products API
* Orders API
* API Examples
