Passer au contenu principal
POST
/
api
/
events
/
sale
Suivre une Vente
curl --request POST \
  --url https://api.example.com/api/events/sale

Endpoint

POST https://track.taap.it/api/events/sale

Authentification

Utilisez votre clé API secrète :
Authorization: Bearer taapit_sk_xxxxxxxxxxxx

Corps de la requête

ChampTypeRequisDescription
trackingIdstringLe ta_tid du cookie ou paramètre URL
customerobjectInformations client
customer.externalIdstringVotre ID utilisateur/client interne
customer.emailstringAdresse email du client
customer.firstnamestringPrénom du client
customer.lastnamestringNom du client
customer.phoneNumberstringNuméro de téléphone du client
customer.avatarUrlstringURL de l’avatar du client
amountnumberMontant en unités de devise (pas en centimes)
currencystringCode devise ISO 4217 (ex: eur, usd)
metadataobjectDonnées personnalisées (paires clé-valeur)
Format du montant : Utilisez les unités de devise, pas les centimes.
  • 29.99 pour 29,99 €
  • 2999 serait interprété comme 2999 €

Exemples

curl -X POST https://track.taap.it/api/events/sale \
  -H "Authorization: Bearer taapit_sk_xxx" \
  -H "Content-Type: application/json" \
  -d '{
    "trackingId": "rLnWe1uz9t282v7g",
    "customer": {
      "externalId": "user_123",
      "email": "[email protected]"
    },
    "amount": 99.99,
    "currency": "eur",
    "metadata": {
      "orderId": "order_456",
      "plan": "pro"
    }
  }'

Réponse

{
  "ok": true
}

Codes de devise

Utilisez les codes ISO 4217 standard :
DeviseCode
Euroeur
Dollar USusd
Livre Sterlinggbp
Yen Japonaisjpy
Franc Suissechf
Dollar Canadiencad
Dollar Australienaud

Codes d’erreur

Code HTTPErreurDescription
400Invalid payloadValidation du corps de requête échouée
400Missing customer.externalIdChamp requis non fourni
401Invalid API keyClé API invalide ou révoquée
401Hostname not in allowed listOrigine non autorisée (côté client)
403This click does not belong to your workspacetrackingId appartient à un autre workspace
404Click not found for this trackingIdtrackingId n’existe pas ou a expiré