API ReferenceAPI Reference

API Reference

Complete REST API documentation for developers

Harper REST API

The Harper API allows you to programmatically track conversions, retrieve attribution data, and manage your stores. Our RESTful API uses standard HTTP methods and returns JSON responses.

Base URL

https://api.harper.com/v1

All API requests must be made over HTTPS. Requests over plain HTTP will be rejected.

Quick Start

1. Get Your API Key

Navigate to Dashboard → Settings → API Keys and create a new API key.

⚠️ Security: Keep your API keys secure. Never expose them in client-side code or public repositories.

2. Make Your First Request

Use your API key in the Authorization header:

curl -X GET https://api.harper.com/v1/stores \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -H "Content-Type: application/json"

3. Handle the Response

All successful responses return JSON with a 200 OK status:

{
  "success": true,
  "data": {
    "stores": [
      {
        "id": "store_123",
        "name": "My Store",
        "platform": "shopify",
        "status": "active"
      }
    ]
  }
}

API Endpoints

Authentication

Harper uses API key authentication. Include your API key in the Authorization header with the Bearer scheme:

Authorization: Bearer wt_live_1234567890abcdef

API Key Types

  • Live keys (wt_live_...) - Use in production to track real conversions
  • Test keys (wt_test_...) - Use in development for testing without affecting live data

Response Format

Success Response

{
  "success": true,
  "data": {
    // Response data here
  },
  "meta": {
    "timestamp": "2026-01-31T06:00:00Z",
    "requestId": "req_abc123"
  }
}

Error Response

{
  "success": false,
  "error": {
    "code": "invalid_request",
    "message": "Missing required parameter: storeId",
    "details": {
      "field": "storeId",
      "reason": "required_field_missing"
    }
  },
  "meta": {
    "timestamp": "2026-01-31T06:00:00Z",
    "requestId": "req_abc123"
  }
}

HTTP Status Codes

Status CodeMeaning
200 OKRequest successful
201 CreatedResource created successfully
400 Bad RequestInvalid parameters or malformed request
401 UnauthorizedInvalid or missing API key
403 ForbiddenValid API key but insufficient permissions
404 Not FoundResource not found
429 Too Many RequestsRate limit exceeded
500 Server ErrorSomething went wrong on our end

Pagination

List endpoints support pagination using limit and cursor parameters:

GET /v1/conversions?limit=100&cursor=abc123

Response with Pagination

{
  "success": true,
  "data": {
    "conversions": [ /* array of conversions */ ],
    "hasMore": true,
    "nextCursor": "def456"
  }
}

SDKs and Libraries

We provide official SDKs to make integration easier:

JavaScript / Node.js

Official SDK for Node.js and browser

npm install @harper/sdkView Docs →

Python

Official Python client library

pip install harperView Docs →

PHP

Official PHP client library

composer require harper/sdkView Docs →

Explore the API

Need API Help?

Our developer support team is here to help with API integration questions.

Was this helpful?