Retour au blog
Technical

GetCAPI Developer Quick Start: Rest API & SDKs

L'équipe GetCookiesJuly 15, 202611 min de lecture
DeveloperAPISDKQuick Start
GetCAPI Developer Quick Start: Rest API & SDKs

GetCAPI Developer Quick Start: Rest API & SDKs

Date: July 15, 2026 Author: GetCookies Team Category: Technical Reading Time: 11 min


Ready to move your tracking to the server-side? GetCAPI is designed to be the most developer-friendly CAPI tool on the market. No complex GTM Server containers to manage—just a simple REST API and lightweight SDKs.

This guide walks you through sending your first purchase event to GetCAPI.

1. Get Your API Key

Sign in to getcapi.co and grab your PROD_API_KEY from the Settings tab.

2. Install the SDK

We recommend using our native SDKs for automatic retries and batching.

# Node.js
npm install @getcapi/node

# Python
pip install getcapi-python

3. Sending an Event

Here is a standard implementation for a checkout success route in Node.js.

import { GetCAPI } from '@getcapi/node';

const capi = new GetCAPI('YOUR_API_KEY');

app.post('/checkout/success', async (req, res) => {
  const order = req.body.order;
  
  // 1. Prepare user data (Hashed by SDK automatically)
  const userData = {
    email: order.customer_email,
    phone: order.customer_phone,
    clientIp: req.ip,
    userAgent: req.headers['user-agent']
  };

  // 2. Prepare event data
  const eventData = {
    eventName: 'Purchase',
    value: order.total,
    currency: 'USD',
    orderId: order.id,
    // Pass consent from GetCookies CMP
    consent: req.body.consent_prefs 
  };

  // 3. Fire and forget
  capi.track(userData, eventData);

  res.status(200).send('Order processed');
});

4. The REST API (For other languages)

If you aren't using an SDK, you can use a simple POST request.

Endpoint: POST https://api.getcapi.co/v1/event

Headers:

  • Authorization: Bearer YOUR_API_KEY
  • Content-Type: application/json

Body:

{
  "user": {
    "em": "hashed_email_here",
    "ph": "hashed_phone_here"
  },
  "event": {
    "name": "Purchase",
    "value": 99.00,
    "currency": "USD"
  },
  "metadata": {
    "domain": "yourdomain.com",
    "consent_token": "gc_tok_123"
  }
}

5. Testing with "Debug Mode"

Switch your API key to TEST_API_KEY to see events appear in the GetCAPI Real-Time Debugger without sending them to live ad platforms. This is perfect for local development and CI/CD testing.

Conclusion

GetCAPI removes the friction of server-side tracking. By moving your logic to the backend, you get a cleaner codebase, faster frontend, and 100% data accuracy.

Check out the full API Documentation

G

L'équipe GetCookies

Rédigé et tenu à jour par l'équipe GetCookies de Getia AS à Oslo, en Norvège. Cet article est une information générale sur le consentement aux cookies, pas un conseil juridique.

Analysez votre propre site gratuitement

L'offre gratuite affiche la bannière sur un site avec trois analyses de cookies par mois. Sans carte, sans appel commercial.