Sales Track Live API Docs

Get Visits

Retrieve all store visits for the authenticated admin.

GET/api/integrations/crm/visits

How to Integrate at Your Website

Step-by-step guide to integrate visit tracking data into your CRM or website

1. Get Your API Keys

Contact us to get your API key and secret key for accessing visit tracking data

2. Use Our Pre-built Components

Download our ready-to-use UI components from the UI Components page - just copy and paste!

3. Connect to Your System

Add the API integration code to your website or CRM system using the examples in the right sidebar

4. Display Data

Your website will now show live visit tracking data from our system automatically

What You Get

  • Real-time visit tracking data with timestamps
  • Store and merchandiser information for each visit
  • Visit duration and location tracking
  • Performance analytics and visit patterns
  • Geographic data and route optimization insights
  • Ready-to-use UI components and code examples

Code Examples

GET /api/integrations/crm/visits
const apiKey = 'your_api_key_here';
const secretKey = 'your_secret_key_here';

async function getVisits() {
  const response = await fetch('/api/integrations/crm/visits?limit=20&date_from=2024-12-01', {
    method: 'GET',
    headers: {
      'X-API-Key': apiKey,
      'X-Secret-Key': secretKey,
      'Content-Type': 'application/json'
    }
  });

  if (!response.ok) {
    throw new Error(`HTTP error! status: ${response.status}`);
  }

  const data = await response.json();
  console.log(data.data.visits);
}

getVisits().catch(console.error);

Response Examples

{
  "success": true,
  "data": {
    "visits": [
      {
        "id": "123",
        "store_id": "store_456",
        "merchandiser_id": "merch_789",
        "visit_date": "2024-12-15T10:30:00Z",
        "duration_minutes": 45,
        "status": "completed",
        "store": {
          "id": "store_456",
          "name": "SuperMart Store",
          "address": "123 Main St, City, State"
        },
        "merchandiser": {
          "id": "merch_789",
          "fullname": "John Manager",
          "email": "john@example.com"
        },
        "createdat": "2024-12-15T10:30:00Z",
        "updatedat": "2024-12-15T11:15:00Z"
      }
    ],
    "pagination": {
      "total": 24,
      "limit": 20,
      "offset": 0,
      "has_more": true
    }
  }
}

Need Help?