Introduction

This API is designed to get a list of uploaded Revenue Files.


Good to know

API response format:

Our APIs return data in either JSON or XML format (depending on request by .json or .xml).


About this API

Resource information

Response formatsJSON (default), XML
HTTP MethodGET
Response familyFile
HeaderAuthorization: Bearer XXXXX


Resource URL

Europe Production Server: https://api.eu.customergauge.com/v4.1/file/company-revenue.json

US Production Server: https://api.us.customergauge.com/v4.1/file/company-revenue.json

Australia Production Server: https://api.au.customergauge.com/v4.1/file/company-revenue.json


Authentication

OAuth2 Authentication is used to connect to this API. In order to create the Connected App, which is needed to generate the Access Token, Administrator access to CustomerGauge is needed. Once you've created your Connected App, you can acquire a Bearer Access Token by calling our OAuth2/Token API:

curl -X POST -H "Content-Type: application/x-www-form-urlencoded"
-d "grant_type=client_credentials&client_id={{ Client ID }}&client_secret={{ Client Secret }}"
https://auth.{{ apiRegion }}.customergauge.com/oauth2/token

The acquired Bearer Access Token is used in the Authorization header in your API request.


How to call

Parameters

id 
optional
File upload id
Example Values: 12
date_range_from 
optional
Filter the data from date
Example Values: 2012-09-01
date_range_to
optional
Filter the data to date
Example Values: 2012-10-01
start
optional
default: 0
Example Values: 10
limit
optional
 default: 1000
Example Values: 200. Maximum is 1000


Upload File Example Request

Post your file by calling our API as if posted from a form.


curl -H "Authorization: Bearer XXXXX" "https://api.eu.customergauge.com/v4.1/file/company-revenue.json"


Example Result

Data states if successful or not. Message reported on successful operation:

Js

{
    "id": "123",
    "status": "Processed",
    "source_filename": "RevenueUploadTemplate_5May2019.xlsx",
    "date_upload": "2019-05-15 11:35:54",
    "total_records": "3",
    "successful_records": "3",
    "unsuccessful_records": "0",
    "logs": []
}


Message reported no matching data:

Js

{
    "Error": {
        "Message": "No data found with passed parameters.",
        "Code": 400184
    }
}


Not the API you're looking for?

Related APIs:

View: