Table of Contents




Revenue

Use this API to add Revenue to Accounts in your CustomerGauge platform, and benefit from the many insights CustomerGauge offers.


File


Managing Unsubscribes & Bounces

Introduction

These API methods allow you to add an e-mail address to unsubscribe, or retrieve a list of either bounced, or unsubscribed e-mail addresses.


 Unsubscribes

Bounces

 

Method type definition:

Get Method: Use this method to get (export) data from the CustomerGauge system.

Post Method: Use this method to upload (import) data to the CustomerGauge system.


Anonymizing Personal Data (GDPR)

To validate which records you're about to anonymize, use;


To anonymize those records, use:


Managing Hierarchy Levels

Introduction 

These API methods allow you to manage the hierarchy structure in your CustomerGauge system.


To retrieve your current hierarchy:


To add a new hierarchy level:


To update a hierarchy level:


To delete a hierarchy level:


Using 4.1 APIs


The APIs in our 4.1 API Suite can be outputted in XML or JSON.

 

What do you need to get started?


1. Authentication

The recommended method of authentication is OAuth2. To authenticate through OAuth2, you'll need to use the Connected Apps (Setup → Integration → Connected Apps).


Unfortunately, some platforms do not support OAuth2 authentication to call (to them) external platforms. In those cases, you would need an API Key; you can find your API Key in the Admin section of your CustomerGauge system.


2. General API URL (based on your location):


3. Method type definition:

  • Get Method: Use this method to get (export) data from the CustomerGauge system.
  • Post Method: Use this method to upload (import) data to the CustomerGauge system.
  • Put Method: Use this method to update data already existing in the CustomerGauge system
  • Delete Method: Use this method to delete data from the CustomerGauge System

Authenticating with an API Key


We highly recommend you to authenticate using OAuth 2 authentication. However, some systems don't allow for that. To help you call our APIs anyway, you can call our APIs using an API Key to authenticate with.


You can find your API Key in Admin → API IP Whitelist. Once you have obtained it, you can use the API Key in the Request Headers to authenticate.

Request HeaderHeader Value
Authorizationapi_key XXXXX


In curl, this would look something like this:

curl -H "Authorization: api_key XXXXX" -X GET "https://api.eu.customergauge.com/v4.1/ApiFamily/ApiMethod.json"
Generic

Error Codes


CustomerGauge API uses conventional HTTP response codes to indicate success or failure of an API request. In general, codes in the 2xx range indicate success, codes in the 4xx range indicate an error that resulted from the provided information (e.g. a required parameter was missing, a charge failed, etc.), and codes in the 5xx range indicate an error with CustomerGauge servers.


HTTP Status Code Summary

  • 200 OK – Everything worked as expected.
  • 400 Bad Request – Often missing a required parameter.
  • 401 Unauthorized – No valid API key provided.
  • 500, 502, 503, 504 Server errors – something went wrong on CustomerGauge end.


Example of Error Message


JSON

{"Error":{"Message":"Invalid API Key","Code":2000}}
Generic
XML
<Error><Message>Invalid API Key</Message><Code>2000</Code></Error>
JavaScript

Error Codes


CodeCategorySubcategoryReasonHTTP Status
200000API Authentication
Invalid API key401
300000General
Too many params supplied400
300001General
Invalid arguments supplied400
300002General
Module does not exist404
300003General
Method does not exist405
300004General
Required field does not supplied400
400000ModulesTransactionsFilter key doesn’t exist400
400001ModulesTransactionsDate method doesn’t support400
400002ModulesTransactionsRecord does not exist400
400003ModulesTransactionsFailed to insert record400
400004 ModulesTransactionsWrong id provided400
400005 ModulesTransactionsid not found400
400006ModulesTransactionsNo mapping found for date form completed400
400007ModulesTransactionsDate form completed value should be supplied for response upload400 
400008ModulesTransactions Date form completed value should not be supplied for non response upload400 
400009ModulesTransactionsDays can’t be more than 365400
400010ModulesTransactionsField id is required but seems to be empty400
400011ModulesTransactionsWorkflow status does not exist400
400100ModulesFileCould not find requested file.400
400101ModulesFileS3 location can not be empty.400
400102ModulesFileCould not load field configurations.400
400103ModulesFileUpload has already been processed.400
400104ModulesFileFile type could not be determined.400
400105ModulesFileFile could not be found.400
400106ModulesFileFile is not of valid file type.400
400107ModulesFileCould not parse XML correctly.400
400108ModulesFileDuplication Rule is not of an expected format.400
400109ModulesFileCould not retrieve Duplication Rule.400
400110ModulesFileCould not find posted temp file.400
400111ModulesFileFile name of posted file is not valid.400
400112ModulesFileCould not find requested file.400
400113ModulesFileFile name of requested file is not valid.400
400115ModulesFileFile data can not be empty.400
400116ModulesFileFailed loading XML.400
400120ModulesFileCould not make connection to database.400
400121ModulesFileDuplication Rule is not of an expected format.400
400122ModulesFileQuery could not be executed correctly.400
400123ModulesFileSomething went wrong while detecting duplication.400
400124ModulesFileCould not parse duplication rule correctly.400
400140ModulesFileMethod of uploading unclear; should be POST params s3 or http or upload by POST.400
400141ModulesFileFailed to retrieve list of Transactional uploads400
400142ModulesFileID required, but missing400
400143ModulesFileID can not be empty400
400160ModulesFileMethod of uploading unclear; should be POST params s3 or http or upload by POST.400
400161ModulesFileFailed to retrieve list of Contact uploads400
400162ModulesFileID required, but missing400
400180ModulesFileMethod of uploading unclear; should be POST params s3 or http or upload by POST.400
400181ModulesFileFailed to retrieve list of Historical uploads400
400182ModulesFileID required, but missing400
400183ModulesFileID can not be empty400
400184ModulesFileNo data found with passed parameters400
400201ModulesWorkflowRequired field ‘number_customergauge’ not supplied400
400300ModulesProductsCouldn’t get data from given url400
400301ModulesProductsNo data provided400
400302ModulesProductsField doesn’t exist400
400303ModulesProductsNo mapping field found for product API output400
400400ModulesListsNo mapping field found for unsubscribe API output400
400402ModulesListsEmail address is required400
400403ModulesListsEmail address already exist in the unsubscribe list400 
400404ModulesListsNo mapping field found for bounce API output400 
400500ModulesCompany SummaryNo mapping field found for company_summary API output400 
400501ModulesCompany SummaryDate method doesn’t support400
400601ModulesReasons Required field ‘reason_code’ not supplied400 
400602Modules Reasons Reason code already exist400 
400603ModulesReasons Reason code does not exist400 
400604Modules Reasons Record not inserted. Something went wrong. Please check your data.400 
400605ModulesReasons Record not updated. Something went wrong. Please check your data.400 
400606ModulesReasonsLevel 2 can’t save without having Level 1400
400607ModulesReasonsRequired field ‘good_bad’ not supplied400
400608ModulesReasonsWrong data provided on ‘good_bad’ field400
400700ModulesStreamNo data provided400
400800ModulesAnonymizeRequired field ‘id’ not supplied400
400900ModulesHierarchyParent doesn’t exist400
400901ModulesHierarchyDivision doesn’t exist400
400902ModulesHierarchyGlobal division can not be updated400
400903ModulesHierarchyGlobal division can not be deleted400
400904ModulesHierarchyParent division can not be deleted400