Transactions - POST Mailqueue

Modified on: Wed, 18 Sep, 2019 at 12:39 PM


Introduction

This API is designed to allow upload of a single data file directly into CustomerGauge for immediate processing (Mail queue) and email sending.

Depending on active rules and data types (usually order_date field) customer emails will be sent immediately.


This API will load emails into the "Mail queue", and may start immediate processing. Make sure you test this before bulk uploads!


Good to know

API response format:

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


Required fields & field validations:

Based on your system's configuration, some fields may be required, or need to be in a specific format.

Contact your Customer Success Manager when in doubt.


Usually, the following validations apply:

  • Datetime is required and in YYYY-mm-dd H:i:s format.
  • Email is required for the upload to be valid


About this API

Resource Information

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


Resource URL

Europe Production Server: https://api.eu.customergauge.com/v4.1/transactions/mailqueue.json

US Production Server: https://api.us.customergauge.com/v4.1/transactions/mailqueue.json

Australia Production Server: https://api.au.customergauge.com/v4.1/transactions/mailqueue.json


How to call

POST Data

Post data as key value based on upload mapping.


POST Data Example Values


Key
Data
CustomerNumber
1143
Email
lee_klameth@directness.net
FirstName
Lee
LastName
Klameth


Sample file

As many clients have different data fields, you can pick up a sample copy from your system – this will contain the field names to be used as Key (as displayed above).

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 Transactional (XML).


4. Use the xml tag labels as key names.


Example Request

To call the API through cURL:

curl -H "Authorization: api_key XXXXX" -X POST https://api.eu.customergauge.com/v4.1/transactions/mailqueue.json? -d CustomerNumber=1143 -d Email=lee_klameth@directness.net -d FirstName=Lee -d LastName=Klameth


Example Result

Message reported on successful operation:

{
  "Data": true
}


Message reported on failed operation:

{
  "Error": {
    "Message": "Field email is required but seems to be empty.",
    "Code": 40003
  }
}



Not the API you're looking for?

Related APIs:


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.