Stream - POST Contact

Modified on: Fri, 25 Jan, 2019 at 11:30 AM


Introduction

This API is designed to allow upload of a contact list directly into CustomerGauge's Contact List. Emails will not be sent out automatically, but will need to be sent manually using the Delivery Manager from inside of the CustomerGauge application.


Good to know

Maximum size:

Please do not upload data larger than 2MB.


Maximum number of records:

Please do not upload more than 2,000 records.


Call interval / frequency:

Multiple upload calls made in quick succession will get queued, and periodically retried, but to obtain optimum performance we recommend allowing the previous upload to finish before attempting the next one. (Uploads can take anywhere between a few seconds and several minutes depending on the size and complexity of data.)


API response format:

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


Data format:

Our Stream API accepts XML data only.


About this API

Resource Information

Response formats
JSON (default), XML
HTTP Method
POST
Response family
Stream
Header
Authorization: api_key XXXXX


Resource URL

Europe Production Server: https://api.eu.customergauge.com/v4.1/stream/contact.json

US Production Server: https://api.us.customergauge.com/v4.1/stream/contact.json

Australia Production Server: https://api.au.customergauge.com/v4.1/stream/contact.json


How to call

You can call the Stream API by passing your XML data through an HTTP POST request.


POST Data Example Values

Please follow this structure to generate your XML data:

<?xml version='1.0' encoding='UTF-8'?>
<records>
  <record>
    <Email>lee_klameth@directness.net</Email>
    <FirstName>Lee</FirstName>
    <LastName>Klameth</LastName>
  </record>
</records>



Sample File

As many clients have different data fields, you can pick up a sample copy from your system, containing all possible fields.


1. Go to Import Data (usually under the Admin or Setup menu)

2. Click on "Upload File"


3. Click on "Download Data Structure", followed by Contact List (XML).

4. Use the same structure as this sample file when calling our POST Stream/Contact API.


Example Request


curl -H "Authorization: api_key XXXXX" -X POST "https://api.eu.customergauge.com/v4.1/stream/contact.json" -d "<?xml version='1.0' encoding='utf-8'?><records><record><Email>lee_klameth@directness.net</Email><FirstName>Lee</FirstName><LastName>Klameth</LastName></record></records>"



Example Result

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

{
  "Data": true
}


Message reported on failed operation:

{
  "Error": {
    "Message": "No data provided",
    "Code": 400700
  }
}


Not the API you're looking for?

APIs of the same family:


Similar API families:


Or view:






Did you find it helpful? Yes No

Send feedback
Sorry we couldn't be helpful. Help us improve this article with your feedback.