The MCASuite REST API allows other systems to integrate into MCA Suite through a HTTP RESTful web service.  The API is designed to ease the painful process of hand entering data from one system to another system.  All responses will be in JSON format.
 
Login
 
All calls require two identifying header parameters for credentialing:

1.    X_MCASUITE_APP_ID
2.    X_MCASUITE_APP_TOKEN

Both of these values will be generated by MCA Suite and provided to our customers. Please contact your representative to get these credentials. 
 
Security
 
Along with the id and token, MCA Suite REST API whitelists all ip addresses incoming to the system.  The customer must provide the ip address of their system in order to access the API.
 
URLS: 
 
The Base REST URL will be provided to the customer upon API request.
 
Format:
 
The API will only accept json encoded parameters.
 
Testing:
 
To test the rest url and parameter, we recommend using the Rested app on Mac OS.  Alternatively, you can use the “Advanced Rest Client” extension on google Chrome.  If using the Chrome extension, please verify you use application/json as content type, and paste the json parameters into the Raw tab.

Adding a Single Transaction
 

When adding a transaction through the rest api, the transaction can be seen under Deal Tracking similar to importing with csv or adding a manual transaction on the page.


Before adding a transaction, you must set up a Collector and a Merchant number on deal tracking page.  This will identify which deal the transaction will be uploaded too.


Function:
Name: addTransaction
Type: POST
Parameters: 


Field Name
Required?
Type
Description
collector
 Yes
String
The name of the collector company
date  Yes String Date of transaction (MM/dd/yy)
merchantNumber
Yes String
Merchant number

amount

Yes Decimal


description

String - Max 30


type


String 'Upload', 'Fee' or 'Discount'
default is 'Upload' if not supplied


Return Response


Field Name
Type Description
success
Boolean true/false
error
List  List of error messages if available


Adding Multiple Transactions


Function:
Name: addTransactions
Type: POST
Parameters: 


Pass a JSON array of parameters in the single transactions through "transactions" field.  A maximum of 50 transactions can be sent at once.  All transactions without errors will be entered into the system, any transaction with errors will be shown in 'error' field response.


Example:


 "transactions": [

{

 "amount": "50.23",

 "collector": "Company A",

 "date": "12/31/2015",

 "merchantNumber": "1234"

 },

 {

 "amount": "50.23",

 "collector": "Company A",

 "date": "12/30/2015",

 "merchantNumber": "1234"

 }

 ]


Return Response


Field Name
Type Description
success
Boolean true/false
errors
List  List of error messages if available
numberUploaded int number of transactions that uploaded successfully