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

Never expose your API keys in client-side code or public repositories. Treat them like passwords.

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

Request
curl https://api.crumbpos.com/v1/locations \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -H "Content-Type: application/json"

Node.js

index.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

main.py
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

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

We provide official SDKs for Node.js, Python, Ruby, and PHP. They handle authentication, retries, and error handling automatically. See our SDKs page.

Step 3: Explore the API

Now that you've made your first request, here are some common next steps:

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.

Next Steps