Introduction
You can use this API to integrate your systems to Add or Update Contracts inside your CustomerGauge platform.
Contracts power the currently-being-developed Won/Loss, and Account Churn widgets — be ready for the near future!
Good to know
Authentication through OAuth2 only
We only support OAuth2 authentication on this API.
Existing Accounts only:
This API only accepts Accounts that already exist in your CustomerGauge platform. You'll have to create accounts first through uploading revenue, activities, or survey transaction data.
API response format:
This API returns data in JSON format
About this API
Resource Information
Response formats | JSON |
HTTP Method | PUT |
Response family | Contracts |
Header | Authorization: Bearer XXXXX (Access Token) |
Resource URL
Europe Production Server: https://imports.api.eu.customergauge.com/contracts
US Production Server: https://imports.api.us.customergauge.com/contracts
Australia Production Server: https://imports.api.au.customergauge.com/contracts
How to call
PUT Data
Provide the data, in JSON, in the body of the PUT request.
Parameters
While the data should provided in a JSON object in the body of the PUT request, we've listed out the possibilities in the table below;
Key | Data Type | Data |
---|---|---|
reference (required to update an existing Contract) | String, max 128 characters | ab12cd34ef56 |
account (required) | String, max 255 characters | ACME Industries |
start (required) | Date, Y-m-d format | 2020-01-01 |
end | Date, Y-m-d format | 2021-12-31 |
description | String, max 150 characters | This is a descriptive text that tells you what this contract entails |
Example Request
To call this API through cURL:
curl -H "Authorization: Bearer XXXXX" -X PUT https://imports.api.eu.customergauge.com/contracts -d '{"reference":"ab12cd34ef56","account":"ACME Industries","start":"2020-01-01","end":"2021-12-31","description":""}'
Example Result
If successfully created, the HTTP response status will be "201".
If successfully updated, the HTTP response status will be "200".
Message reported on failed operation:
{ "message": "The given data was invalid.", "errors": { "account": [ "account at field is required." ], "start": [ "The start field is required." ] } }
Not the API you're looking for?
View: