> ## Documentation Index
> Fetch the complete documentation index at: https://docs.crbtrack.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Quick Start

> Create your first shipping order in 5 minutes

## Step 1: Get Your API Key

<Steps>
  <Step title="Sign in to the Dashboard">
    Go to [dashboard.crbtrack.com](https://dashboard.crbtrack.com) and sign in with your credentials.
  </Step>

  <Step title="Navigate to API Keys">
    Click on **Settings** → **API Keys** in the sidebar.
  </Step>

  <Step title="Generate a New Key">
    Click **Generate New API Key**. Choose a name like "My Integration" and select the countries you'll be shipping to.
  </Step>

  <Step title="Copy Your Key">
    Your API key will be displayed **only once**. Copy it and store it securely.

    <Warning>
      Never share your API key or commit it to version control. Use environment variables instead.
    </Warning>
  </Step>
</Steps>

## Step 2: Test with Sandbox

Before going live, test your integration using the sandbox environment.

<Note>
  Sandbox API keys start with `pk_test_` and production keys start with `pk_live_`.
</Note>

### Using Postman

Download our pre-configured Postman collection to test all API endpoints:

<Card title="Download Postman Bundle" icon="file-zipper" href="https://api.crbtrack.com/api/resources/postman/download">
  **ZIP file** with collection, environment, and setup instructions
</Card>

**Quick setup:**

1. Download and extract the ZIP file
2. Open Postman and click "Import"
3. Drag both JSON files into the import dialog
4. Select the "CRBTrack API" environment (gear icon)
5. Set your `apiKey` variable
6. Start testing - tracking numbers auto-chain between requests!

<Accordion title="Download individual files">
  <CardGroup cols={2}>
    <Card title="Collection Only" icon="download" href="/assets/crbtrack.postman_collection.json">
      API endpoints collection
    </Card>

    <Card title="Environment Only" icon="gear" href="/assets/crbtrack.postman_environment.json">
      Variables template
    </Card>
  </CardGroup>
</Accordion>

```bash theme={null}
# Sandbox URL
https://sandbox.crbtrack.com

# Production URL (use after testing)
https://api.crbtrack.com
```

## Step 3: Create Your First Order

<CodeGroup>
  ```bash cURL theme={null}
  curl -X POST https://sandbox.crbtrack.com/api/v1/orders/create \
    -H "X-API-Key: <YOUR_SANDBOX_KEY>" \
    -H "Content-Type: application/json" \
    -d '{
      "idempotencyKey": "my-first-order-001",
      "sender": {
        "fullName": "John Smith",
        "phone": "+1 305-555-0123",
        "email": "john.smith@example.com",
        "address": {
          "line1": "1234 Main Street",
          "city": "Miami",
          "state": "FL",
          "zipCode": "33101",
          "country": "US"
        }
      },
      "receiver": {
        "fullName": "María García",
        "phone": "+593 99 123 4567",
        "email": "maria.garcia@example.com",
        "nationalId": "1234567890",
        "idType": "cedula",
        "address": {
          "line1": "Av. 9 de Octubre 123",
          "city": "Guayaquil",
          "province": "Guayas",
          "zipCode": "090101",
          "country": "EC",
          "deliveryInstructions": "Dejar en recepción"
        }
      },
      "parcelDetails": {
        "weightLbs": 2.5,
        "lengthCm": 30,
        "widthCm": 20,
        "heightCm": 15,
        "declaredValue": 149.99,
        "currency": "USD"
      },
      "customsInfo": {
        "description": "Electronics - Mobile Phone Accessories",
        "hsCode": "8517.62"
      }
    }'
  ```

  ```javascript JavaScript theme={null}
  const response = await fetch('https://sandbox.crbtrack.com/api/v1/orders/create', {
    method: 'POST',
    headers: {
      'X-API-Key': '<YOUR_SANDBOX_KEY>',
      'Content-Type': 'application/json'
    },
    body: JSON.stringify({
      idempotencyKey: 'my-first-order-001',
      sender: {
        fullName: 'John Smith',
        phone: '+1 305-555-0123',
        email: 'john.smith@example.com',
        address: {
          line1: '1234 Main Street',
          city: 'Miami',
          state: 'FL',
          zipCode: '33101',
          country: 'US'
        }
      },
      receiver: {
        fullName: 'María García',
        phone: '+593 99 123 4567',
        email: 'maria.garcia@example.com',
        nationalId: '1234567890',
        idType: 'cedula',
        address: {
          line1: 'Av. 9 de Octubre 123',
          city: 'Guayaquil',
          province: 'Guayas',
          zipCode: '090101',
          country: 'EC',
          deliveryInstructions: 'Dejar en recepción'
        }
      },
      parcelDetails: {
        weightLbs: 2.5,
        lengthCm: 30,
        widthCm: 20,
        heightCm: 15,
        declaredValue: 149.99,
        currency: 'USD'
      },
      customsInfo: {
        description: 'Electronics - Mobile Phone Accessories',
        hsCode: '8517.62'
      }
    })
  });

  const data = await response.json();
  console.log('Tracking Number:', data.parcel.trackingNumber);
  console.log('Label URL:', data.parcel.labelUrl);
  ```

  ```python Python theme={null}
  import requests

  response = requests.post(
      'https://sandbox.crbtrack.com/api/v1/orders/create',
      headers={
          'X-API-Key': '<YOUR_SANDBOX_KEY>',
          'Content-Type': 'application/json'
      },
      json={
          'idempotencyKey': 'my-first-order-001',
          'sender': {
              'fullName': 'John Smith',
              'phone': '+1 305-555-0123',
              'email': 'john.smith@example.com',
              'address': {
                  'line1': '1234 Main Street',
                  'city': 'Miami',
                  'state': 'FL',
                  'zipCode': '33101',
                  'country': 'US'
              }
          },
          'receiver': {
              'fullName': 'María García',
              'phone': '+593 99 123 4567',
              'email': 'maria.garcia@example.com',
              'nationalId': '1234567890',
              'idType': 'cedula',
              'address': {
                  'line1': 'Av. 9 de Octubre 123',
                  'city': 'Guayaquil',
                  'province': 'Guayas',
                  'zipCode': '090101',
                  'country': 'EC',
                  'deliveryInstructions': 'Dejar en recepción'
              }
          },
          'parcelDetails': {
              'weightLbs': 2.5,
              'lengthCm': 30,
              'widthCm': 20,
              'heightCm': 15,
              'declaredValue': 149.99,
              'currency': 'USD'
          },
          'customsInfo': {
              'description': 'Electronics - Mobile Phone Accessories',
              'hsCode': '8517.62'
          }
      }
  )

  data = response.json()
  print(f"Tracking Number: {data['parcel']['trackingNumber']}")
  print(f"Label URL: {data['parcel']['labelUrl']}")
  ```
</CodeGroup>

## Step 4: Check the Response

A successful response looks like this:

```json theme={null}
{
  "success": true,
  "parcel": {
    "id": "cl123abc456def",
    "trackingNumber": "SBECUSD123456789",
    "status": "LABEL_GENERATED",
    "labelUrl": "https://labels.sandbox.crbtrack.com/SBECUSD123456789.pdf",
    "createdAt": "2024-12-21T10:30:00Z"
  }
}
```

<Info>
  In sandbox mode, tracking numbers start with `SB` to indicate they're test shipments.
</Info>

## Step 5: Download the Label

Use the `labelUrl` from the response to download the shipping label:

```bash theme={null}
curl -O "https://labels.sandbox.crbtrack.com/SBECUSD123456789.pdf"
```

## Step 6: Track the Parcel

Track your parcel using the tracking number:

```bash theme={null}
curl https://sandbox.crbtrack.com/api/v1/tracking/SBECUSD123456789 \
  -H "X-API-Key: <YOUR_SANDBOX_KEY>"
```

## Next Steps

<CardGroup cols={2}>
  <Card title="Submit a Manifest" icon="plane" href="/api-reference/manifests/submit-manifest">
    Group parcels into a shipment with an AWB
  </Card>

  <Card title="Set Up Webhooks" icon="bell" href="/guides/webhooks">
    Receive real-time status updates
  </Card>

  <Card title="Handle Errors" icon="triangle-exclamation" href="/guides/error-handling">
    Learn about error codes and retry strategies
  </Card>

  <Card title="Go to Production" icon="rocket" href="/guides/shipping-workflow">
    Complete the full shipping workflow
  </Card>
</CardGroup>
