Forums/API

API Overview

Brown Box
posted this on September 26, 2012 11:19

Logo2.png

Current Version API: 1.0

EnvoyRelate provides a fast and flexible API to allow you to input transactions from your web services. In order to use this you must have an EnvoyRelate account (get started here - don't forget to confirm your account in the activation email we send you) and a Group configured.

We use and accept only JSON.

All calls to the API use the following base URL – https://api.envoyrelate.com/v1/

Remember, your Unique Group Key gives update only access to your Group and it is up to you to ensure the confidentiality of this Key.

If you have any questions just lodge a request here under the 'New' button or send us an email to support@envoyrelate.com.

API METHODS

TRANSACTIONS

URL https://api.envoyrelate.com/v1/transaction/
Methods Supported POST
Description Allows you to add transactions to your EnvoyRelate Groups

PARAMETERS FOR TRANSACTIONS

The following are mandatory for a POST request
envoy_key Your EnvoyRelate Unique Group Key
email A valid email address associated with the Transaction
amount A Transaction value greater than one cent (ie 0.01)

RESPONSE CODES FOR TRANSACTIONS

RESPONSE
0     Key does not match any group
0     Please pass through a valid envoy_key parameter (no whitespaces allowed)
0     Please pass through a valid email
0     Please pass through a valid (decimal) amount value
0     Amount value can't be less than 0.01 = 1 cent
1     Transaction accepted OK
201     Bad subscription state, transaction not accepted
202     Subscription counter expired, transaction not accepted
203     Subscription limit overuse, transaction not accepted

Example JSON format minimum elements required to add a new transaction

{
    "email": "email@domain.com",
    "envoy_key": "UNIQUE_GROUP_KEY",
    "amount": "999.99"
}

 

Have a look at these other API pages to see how to use the API with standard technologies:

PHP integration code direcly posting to API

ASP.NET C# integration code example send directly to API

ASP integration code example send directly to API

 
Topic is closed for comments