# API Reference

Gett provides two RESTful APIs for integrating with the platform. Each API serves a different partner type and integration direction.

## Available APIs

<div className="grid grid-cols-1 md:grid-cols-2 gap-6 not-prose my-8">
  <a href="/api/marketfront" className="partner-card block rounded-xl border border-border p-6 no-underline transition-all hover:shadow-lg hover:border-primary">
    <h3 className="text-lg font-semibold mt-0 mb-2">Marketfront API</h3>
    <p className="text-base font-medium mb-2">For Distribution Partners</p>
    <p className="text-sm text-muted-foreground mb-4">Build food ordering experiences for your users. Discover stores, browse menus, validate carts, and place orders.</p>
    <span className="text-sm font-medium text-primary">View API Reference →</span>
  </a>

  <a href="/api/commerce" className="partner-card block rounded-xl border border-border p-6 no-underline transition-all hover:shadow-lg hover:border-primary">
    <h3 className="text-lg font-semibold mt-0 mb-2">Commerce Partner API</h3>
    <p className="text-base font-medium mb-2">For Commerce Partners</p>
    <p className="text-sm text-muted-foreground mb-4">Connect your POS or e-commerce platform to the Gett Network. Sync catalogs, receive orders via webhooks, and manage stores.</p>
    <span className="text-sm font-medium text-primary">View API Reference →</span>
  </a>
</div>

## Marketfront API

The Marketfront API enables distribution partners to integrate food ordering into their platforms. It powers the complete ordering flow from store discovery through order placement.

### Stores

| Endpoint | Purpose |
|----------|---------|
| [Discover Stores](/api/marketfront#discoverStores) | Find stores available at a location |
| [Get Store](/api/marketfront#getStore) | Fetch a store's full payload by id |

### Catalog

| Endpoint | Purpose |
|----------|---------|
| [Get CatalogSet](/api/marketfront#getCatalogSet) | Fetch a store's menu (immutable, cache aggressively) |

### Orders

| Endpoint | Purpose |
|----------|---------|
| [Validate Order](/api/marketfront#validateOrder) | Check availability and get accurate pricing |
| [Place Order](/api/marketfront#placeOrder) | Submit the order for fulfillment |

### Cart

| Endpoint | Purpose |
|----------|---------|
| [Cart Helpers](/api/marketfront#tag/cart) | Stateless cart add, remove, and update operations |

**Base URL**: `https://api.gett-tech.com` — your API key selects the environment (Live or Sandbox).

[Full Marketfront API Reference →](/api/marketfront)

---

## Commerce Partner API

The Commerce Partner API is the integration interface for POS systems, aggregators, and online ordering platforms. Your system remains the source of truth for catalogs and store status; Gett sends you orders.

### Endpoints

| Category | Purpose |
|----------|---------|
| [Catalog](/api/commerce#tag/catalog) | Notify catalog updates (pull model) |
| [Order Webhooks](/commerce-partners/order-webhooks) | Receive order validation and placement requests |

:::info[Coming Soon]
Store management, store status, order status updates, and self-service onboarding are on the roadmap. Integrate against the catalog notification + order webhook core loop for now.
:::

**Base URL**: `https://api.providers.gett-tech.com/v1/standard-integrated`

[Full Commerce Partner API Reference →](/api/commerce)

---

## Authentication

Both APIs use Bearer token authentication. Include your API key in every request:

```
Authorization: Bearer YOUR_API_KEY
```

API keys are managed from the [API Keys](/settings/api-keys) page in this portal.

## Not Sure Which API?

| I want to... | Use |
|--------------|-----|
| Add food ordering to my app or platform | [Marketfront API](/api/marketfront) |
| Connect my POS/e-commerce system to new demand channels | [Commerce Partner API](/api/commerce) |
