Getting Started
This guide will walk you through setting up your development environment, getting your API credentials, and making your first API call.
Prerequisites
Before you begin, make sure you have:
- A Crumb account with API access enabled
- Basic familiarity with REST APIs and JSON
- A tool for making HTTP requests (cURL, Postman, or your preferred HTTP client)
Step 1: Get Your API Keys
API keys are available in your Crumb dashboard under Settings → Developers → API Keys.
You'll receive two keys:
- Test API Key: Use this for development. Prefixed with
sk_test_ - Live API Key: Use this for production. Prefixed with
sk_live_
Keep your keys secure
Step 2: Make Your First Request
Let's verify your setup by fetching your location information. Replace YOUR_API_KEY with your test API key.
cURL
curl https://api.crumbpos.com/v1/locations \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Content-Type: application/json" Node.js
const response = await fetch('https://api.crumbpos.com/v1/locations', {
headers: {
'Authorization': 'Bearer YOUR_API_KEY',
'Content-Type': 'application/json'
}
});
const data = await response.json();
console.log(data); Python
import requests
response = requests.get(
'https://api.crumbpos.com/v1/locations',
headers={
'Authorization': 'Bearer YOUR_API_KEY',
'Content-Type': 'application/json'
}
)
print(response.json()) Response
{
"data": [
{
"id": "loc_abc123",
"type": "location",
"attributes": {
"name": "Downtown Store",
"address": "123 Main St",
"city": "San Francisco",
"state": "CA",
"timezone": "America/Los_Angeles",
"created_at": "2024-01-15T10:30:00Z"
}
}
],
"meta": {
"total": 1,
"page": 1,
"per_page": 20
}
} Using our SDKs
Step 3: Explore the API
Now that you've made your first request, here are some common next steps:
Browse Endpoints
See all available API endpoints
Set Up Webhooks
Receive real-time event notifications
Common Use Cases
Sync Orders to Your System
Many integrations start by syncing order data. Use the /orders endpoint to fetch orders, or set up webhooks to receive real-time notifications.
Update Menu Items
The /menu endpoints let you programmatically update items, prices, and availability. Perfect for syncing with your inventory system.
Process Payments
Create payment intents, process refunds, and retrieve transaction history with the /payments endpoints.