Getting Started with API Integration
This guide walks you through setting up a direct API integration with the Gett platform. You'll learn how to authenticate, set up your development environment, and make your first API calls.
What You Can Build
With the API integration, you have complete control over the user experience:
- Find Stores — Search for stores by location, cuisine, or keyword
- Browse Menus — Display complete CatalogSets with sections, items, and customization options
- Manage Carts — Add, update, and remove items with full modifier support
- Process Orders — Validate and place orders with delivery or pickup fulfillment
- Handle Payments — Secure payment processing with PCI-compliant infrastructure
Key Concepts
| Concept | Description |
|---|---|
| Store | A merchant/restaurant offering food delivery |
| CatalogSet | The complete menu structure (immutable, highly cacheable) |
| Catalog | A specific menu within a CatalogSet (e.g., "Lunch Menu") with availability windows |
| Section | A menu category (e.g., "Appetizers") containing items |
| Item | A purchasable food product with pricing and optional modifiers |
| ModifierGroup | Customization options for items (e.g., "Size", "Toppings") |
| Cart | Shopping cart with line items (managed by your application) |
| Order | A validated cart submitted for fulfillment |
Prerequisites
| Requirement | Description |
|---|---|
| Partner Account | Contact our partnerships team to register |
| API Key | Secret key for server-to-server authentication |
| Partner ID | Your unique identifier |
| Backend Server | A server to make authenticated API calls |
Your API key is a secret. Never expose it in client-side code, mobile apps, or public repositories. Always make API calls from your backend server.
Step 1: Get Your Credentials
After registering as a partner, you'll receive:
| Credential | Environment | Purpose |
|---|---|---|
| Sandbox API Key | Development | Testing and development |
| Sandbox Partner ID | Development | Identifies your sandbox integration |
| Production API Key | Live | Production deployments |
| Production Partner ID | Live | Identifies your production integration |
Step 2: Set Up Your Environment
Environment Variables
# .env (never commit this file!)
GETT_API_KEY=your_sandbox_api_key_here
GETT_PARTNER_ID=partner_abc123
GETT_API_URL=https://api-sandbox.gett-tech.com/v1
Base URLs
| Environment | Base URL |
|---|---|
| Sandbox | https://api-sandbox.gett-tech.com/v1 |
| Production | https://api.gett-tech.com/v1 |
Step 3: Make Your First API Call
Find Stores
Search for stores available for delivery at a given address:
curl -X POST https://api-sandbox.gett-tech.com/v1/stores \
-H "Authorization: Bearer $GETT_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"location": {
"address": "123 Test Street, New York, NY 10001"
}
}'
Response:
{
"stores": [
{
"storeId": "store_abc123",
"catalogSetId": "catalogset_xyz789",
"name": "Pizza Palace",
"cuisineTypes": ["Italian", "Pizza"],
"rating": 4.5,
"isOpen": true,
"isAcceptingOrders": true,
"deliveryInfo": {
"fee": 2.99,
"estimatedMinutes": "25-35"
}
}
],
"totalCount": 42,
"hasMore": true
}
Get a Store's Menu
Fetch the CatalogSet (this is cacheable!):
curl https://api-sandbox.gett-tech.com/v1/catalogsets/catalogset_xyz789 \
-H "Authorization: Bearer $GETT_API_KEY"
Step 4: Test in Sandbox
The sandbox environment provides test data for development:
Test Addresses
| Address | Location | Available Stores |
|---|---|---|
123 Test Street, New York, NY 10001 | NYC | Multiple test stores |
456 Demo Avenue, Los Angeles, CA 90001 | LA | Multiple test stores |
Test Stores
| Store ID | Name | Features |
|---|---|---|
store_pizza_test | Pizza Palace | Full menu, delivery & pickup |
store_burger_test | Burger Barn | Simple menu, delivery only |
store_sushi_test | Sushi Supreme | Complex menu, pickup only |
Test Payment Cards
| Card Number | Result |
|---|---|
4111 1111 1111 1111 | Successful payment |
4000 0000 0000 0002 | Payment declined |
4000 0000 0000 9995 | Insufficient funds |
Use any future expiration date and any 3-digit CVV. See Payments for more details on payment integration.
Step 5: Implement the Order Flow
A typical order flow involves these API calls:
See the Orders documentation for request/response details.
Caching Strategy
| Data Type | Cache Strategy |
|---|---|
| Store results | Never cache - reflects real-time store state |
| CatalogSets | Cache aggressively - use ETags for validation |
| Cart state | Managed by your application |
| Validation tokens | Expire after 15 minutes |
See CatalogSets for ETag caching details.
Going to Production
When you're ready to go live:
- Switch to your Production API Key
- Update the base URL to
https://api.gett-tech.com/v1 - Remove any test data references
- Verify the integration with a small batch of real orders
Security Best Practices
- Store API keys in environment variables or a secret manager
- Never commit API keys to version control
- Rotate keys periodically
- Use separate keys for sandbox and production
All API requests must include your API key:
-H "Authorization: Bearer YOUR_API_KEY"
Rate Limits
| Endpoint Type | Limit |
|---|---|
| Read operations | 1000/min |
| Write operations | 100/min |
| Stores | 60/min |
Sandbox limits are higher (5x) for testing.
Next Steps
- Stores — Store discovery and search
- CatalogSets — Working with menus and caching
- Orders — Validate and place orders
- Cart Helpers — Stateless cart management
- Payments — Payment integration options
- API Reference — Complete endpoint documentation