Shell Python Node.js Java PHP
« Go to main menu

Bank Referral APIs

POST Lead/Create v2

data = {
  "firstName": "John",
  "lastName": "Smith",
  "company": "MMIS Test CL12301",
  "zip": "12345",
  "city": "SCHENECTADY",
  "state": "NY",
  "address1": "123 Main Street",
  "phone": "1234567890",
  "email": "johnsmith@emai.com",
  "leadType": "Bank Referral",
  "leadSource": "WEB",
  "bestContactTime": "9AM to 10 AM",
  "chosenContactTime": "10AM",
  "annualVolume": "300000",
  "averageTicket": "20",
  "mcc": "5651",
  "branch": "00001-1010807",
  "comments": "Example comment.",
  "fields": [
    {"name": "linkBackId", "value": "984000001"},
    {"name": "legalName", "value": "John Business Supplies, Co."},
    {"name": "mobilePhone", "value": "1234567890"},
    {"name": "ownerFirstName", "value": "John"},
    {"name": "ownerLastName", "value": "Smith"},
    {"name": "ownerStreetAddress", "value": "123 Main Street"},
    {"name": "ownerCity", "value": "SCHENECTADY"},
    {"name": "ownerState", "value": "NY"},
    {"name": "ownerZip", "value": "12345"},
    {"name": "existingBankClient", "value": "Yes"},
    {"name": "dateAccountOpened", "value": "2019-01-10"},
    {"name": "organizationType", "value": "Sole Ownership"},
    {"name": "yearBusinessStarted", "value": "2017"},
    {"name": "faceToFaceVolume", "value": "70"},
    {"name": "internetVolume", "value": "20"},
    {"name": "phoneSalesVolume", "value": "10"},
    {"name": "rating", "value": "Good"},
    {"name": "referralDivision", "value": "SMALL BUSINESS SEGMENT"},
    {"name": "currentProcessor", "value": "Test Processor"}
  ],
  "boardingHierarchy": {
    "agentChainNumber": "327970001886",
    "salesforcePartnerId" : "a140g0000098WaqAAE"
  }
}

endpoint = "marketplace/v2/lead/create"

r = requests.post(url + endpoint, json=data, headers=headers)
print(r)

ENDPOINT="$URLmarketplace/v2/lead/create"
curl -X POST -H "date: $DATE" -H "Authorization: $HMAC_AUTH" -H "Content-Type:application/json" --data '{
  "firstName": "John",
  "lastName": "Smith",
  "company": "MMIS Test CL12301",
  "zip": "12345",
  "city": "SCHENECTADY",
  "state": "NY",
  "address1": "123 Main Street",
  "phone": "1234567890",
  "email": "johnsmith@emai.com",
  "leadType": "Bank Referral",
  "leadSource": "WEB",
  "bestContactTime": "9AM to 10 AM",
  "chosenContactTime": "10AM",
  "annualVolume": "300000",
  "averageTicket": "20",
  "mcc": "5651",
  "branch": "00001-1010807",
  "comments": "Example comment.",
  "fields": [
    {"name": "linkBackId", "value": "984000001"},
    {"name": "legalName", "value": "John Business Supplies, Co."},
    {"name": "mobilePhone", "value": "1234567890"},
    {"name": "ownerFirstName", "value": "John"},
    {"name": "ownerLastName", "value": "Smith"},
    {"name": "ownerStreetAddress", "value": "123 Main Street"},
    {"name": "ownerCity", "value": "SCHENECTADY"},
    {"name": "ownerState", "value": "NY"},
    {"name": "ownerZip", "value": "12345"},
    {"name": "existingBankClient", "value": "Yes"},
    {"name": "dateAccountOpened", "value": "2019-01-10"},
    {"name": "organizationType", "value": "Sole Ownership"},
    {"name": "yearBusinessStarted", "value": "2017"},
    {"name": "faceToFaceVolume", "value": "70"},
    {"name": "internetVolume", "value": "20"},
    {"name": "phoneSalesVolume", "value": "10"},
    {"name": "rating", "value": "Good"},
    {"name": "referralDivision", "value": "SMALL BUSINESS SEGMENT"},
    {"name": "currentProcessor", "value": "Test Processor"}
  ],
  "boardingHierarchy": {
    "agentChainNumber": "327970001886",
    "salesforcePartnerId" : "a140g0000098WaqAAE"
  }
}' $ENDPOINT
var options = {
    method: 'POST',
    url: url + 'marketplace/v2/lead/create',
    headers: getAuthenticationHeaders(),
    body: {
        "firstName": "John",
        "lastName": "Smith",
        "company": "MMIS Test CL12301",
        "zip": "12345",
        "city": "SCHENECTADY",
        "state": "NY",
        "address1": "123 Main Street",
        "phone": "1234567890",
        "email": "johnsmith@emai.com",
        "leadType": "Bank Referral",
        "leadSource": "WEB",
        "bestContactTime": "9AM to 10 AM",
        "chosenContactTime": "10AM",
        "annualVolume": "300000",
        "averageTicket": "20",
        "mcc": "5651",
        "branch": "00001-1010807",
        "comments": "Example comment.",
        "fields": [
          {"name": "linkBackId", "value": "984000001"},
          {"name": "legalName", "value": "John Business Supplies, Co."},
          {"name": "mobilePhone", "value": "1234567890"},
          {"name": "ownerFirstName", "value": "John"},
          {"name": "ownerLastName", "value": "Smith"},
          {"name": "ownerStreetAddress", "value": "123 Main Street"},
          {"name": "ownerCity", "value": "SCHENECTADY"},
          {"name": "ownerState", "value": "NY"},
          {"name": "ownerZip", "value": "12345"},
          {"name": "existingBankClient", "value": "Yes"},
          {"name": "dateAccountOpened", "value": "2019-01-10"},
          {"name": "organizationType", "value": "Sole Ownership"},
          {"name": "yearBusinessStarted", "value": "2017"},
          {"name": "faceToFaceVolume", "value": "70"},
          {"name": "internetVolume", "value": "20"},
          {"name": "phoneSalesVolume", "value": "10"},
          {"name": "rating", "value": "Good"},
          {"name": "referralDivision", "value": "SMALL BUSINESS SEGMENT"},
          {"name": "currentProcessor", "value": "Test Processor"}
        ],
        "boardingHierarchy": {
          "agentChainNumber": "327970001886",
          "salesforcePartnerId" : "a140g0000098WaqAAE"
        }
    },
    json: true
    };
request(options, function (error, response, body) {
  if (error) throw new Error(error);
  console.log(response);
});
// Don't forget to add your HMAC Authorization Headers
try {
  String jsonString = "{\n      \"firstName\": \"John\",\n      \"lastName\": \"Smith\",\n      \"company\": \"MMIS Test CL12301\",\n      \"zip\": \"12345\",\n      \"city\": \"SCHENECTADY\",\n      \"state\": \"NY\",\n      \"address1\": \"123 Main Street\",\n      \"phone\": \"1234567890\",\n      \"email\": \"johnsmith@emai.com\",\n      \"leadType\": \"Bank Referral\",\n      \"leadSource\": \"WEB\",\n      \"bestContactTime\": \"9AM to 10 AM\",\n      \"chosenContactTime\": \"10AM\",\n      \"annualVolume\": \"300000\",\n      \"averageTicket\": \"20\",\n      \"mcc\": \"5651\",\n      \"branch\": \"00001-1010807\",\n      \"comments\": \"Example comment.\",\n      \"fields\": [\n        {\"name\": \"linkBackId\", \"value\": \"984000001\"},\n        {\"name\": \"legalName\", \"value\": \"John Business Supplies, Co.\"},\n        {\"name\": \"mobilePhone\", \"value\": \"1234567890\"},\n        {\"name\": \"ownerFirstName\", \"value\": \"John\"},\n        {\"name\": \"ownerLastName\", \"value\": \"Smith\"},\n        {\"name\": \"ownerStreetAddress\", \"value\": \"123 Main Street\"},\n        {\"name\": \"ownerCity\", \"value\": \"SCHENECTADY\"},\n        {\"name\": \"ownerState\", \"value\": \"NY\"},\n        {\"name\": \"ownerZip\", \"value\": \"12345\"},\n        {\"name\": \"existingBankClient\", \"value\": \"Yes\"},\n        {\"name\": \"dateAccountOpened\", \"value\": \"2019-01-10\"},\n        {\"name\": \"organizationType\", \"value\": \"Sole Ownership\"},\n        {\"name\": \"yearBusinessStarted\", \"value\": \"2017\"},\n        {\"name\": \"faceToFaceVolume\", \"value\": \"70\"},\n        {\"name\": \"internetVolume\", \"value\": \"20\"},\n        {\"name\": \"phoneSalesVolume\", \"value\": \"10\"},\n        {\"name\": \"rating\", \"value\": \"Good\"},\n        {\"name\": \"referralDivision\", \"value\": \"SMALL BUSINESS SEGMENT\"},\n        {\"name\": \"currentProcessor\", \"value\": \"Test Processor\"}\n      ],\n      \"boardingHierarchy\": {\n        \"agentChainNumber\": \"327970001886\",\n        \"salesforcePartnerId\" : \"a140g0000098WaqAAE\"\n      }\n  }";

  StringEntity payload = new StringEntity(jsonString);

  HttpResponse response = doPost("marketplace/v2/lead/create", payload);
  int statusCode = response.getStatusLine().getStatusCode();
  String response_string = EntityUtils.toString(response.getEntity());
  JSONArray json = new JSONArray(response_string);  
  System.out.println("json:" + json.toString());

} catch (Exception e) {
  e.printStackTrace();
}
<?php
# Don't forget to add your HMAC Authorization Headers

$data = array (
          'firstName' => 'John',
          'lastName' => 'Smith',
          'company' => 'MMIS Test CL12301',
          'zip' => '12345',
          'city' => 'SCHENECTADY',
          'state' => 'NY',
          'address1' => '123 Main Street',
          'phone' => '1234567890',
          'email' => 'johnsmith@emai.com',
          'leadType' => 'Bank Referral',
          'leadSource' => 'WEB',
          'bestContactTime' => '9AM to 10 AM',
          'chosenContactTime' => '10AM',
          'annualVolume' => '300000',
          'averageTicket' => '20',
          'mcc' => '5651',
          'branch' => '00001-1010807',
          'comments' => 'Example comment.',
          'fields' => 
          array (
            0 => 
            array (
              'name' => 'linkBackId',
              'value' => '984000001',
            ),
            1 => 
            array (
              'name' => 'legalName',
              'value' => 'John Business Supplies, Co.',
            ),
            2 => 
            array (
              'name' => 'mobilePhone',
              'value' => '1234567890',
            ),
            3 => 
            array (
              'name' => 'ownerFirstName',
              'value' => 'John',
            ),
            4 => 
            array (
              'name' => 'ownerLastName',
              'value' => 'Smith',
            ),
            5 => 
            array (
              'name' => 'ownerStreetAddress',
              'value' => '123 Main Street',
            ),
            6 => 
            array (
              'name' => 'ownerCity',
              'value' => 'SCHENECTADY',
            ),
            7 => 
            array (
              'name' => 'ownerState',
              'value' => 'NY',
            ),
            8 => 
            array (
              'name' => 'ownerZip',
              'value' => '12345',
            ),
            9 => 
            array (
              'name' => 'existingBankClient',
              'value' => 'Yes',
            ),
            10 => 
            array (
              'name' => 'dateAccountOpened',
              'value' => '2019-01-10',
            ),
            11 => 
            array (
              'name' => 'organizationType',
              'value' => 'Sole Ownership',
            ),
            12 => 
            array (
              'name' => 'yearBusinessStarted',
              'value' => '2017',
            ),
            13 => 
            array (
              'name' => 'faceToFaceVolume',
              'value' => '70',
            ),
            14 => 
            array (
              'name' => 'internetVolume',
              'value' => '20',
            ),
            15 => 
            array (
              'name' => 'phoneSalesVolume',
              'value' => '10',
            ),
            16 => 
            array (
              'name' => 'rating',
              'value' => 'Good',
            ),
            17 => 
            array (
              'name' => 'referralDivision',
              'value' => 'SMALL BUSINESS SEGMENT',
            ),
            18 => 
            array (
              'name' => 'currentProcessor',
              'value' => 'Test Processor',
            ),
          ),
          'boardingHierarchy' => 
          array (
            'agentChainNumber' => '327970001886',
            'salesforcePartnerId' => 'a140g0000098WaqAAE',
          ),
        );

$data_json = json_encode($data);
$headers = array(
    'date: ' . $date,
    'Authorization: ' . $hmacAuth,
    'Content-Type: application/json',
    'Content-Length: ' . strlen($data_json)
);

$ch = curl_init();
curl_setopt($ch, CURLOPT_URL, $url . "marketplace/v2/lead/create");
curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
curl_setopt($ch, CURLOPT_POST, 1);
curl_setopt($ch, CURLOPT_HTTPHEADER, $headers);
curl_setopt($ch, CURLOPT_POSTFIELDS, $data_json);
$res = curl_exec($ch);
echo($res);

?>

The above command returns JSON structured like this for success response:

    {
      "referralId": "kr3gr",
      "message": ""
    }

Error Response for any Required fields json { "error": [ { "errorType": "Schema validation", "location": "lastName", "errorMessage": "Last Name is required field" } ] }

This endpoint is used to collect information about the merchant to create a Salesforce lead.

Request

POST marketplace/v2/lead/create

The endpoint takes a JSON object as input, which contains following information.

Parameter Required Data Type Character Limit Salesforce Field Short Description
firstName string 40 FirstName First Name.
lastName string 80 LastName Last Name.
company string 255 Company Company Name /DBA Name.
email string 320 Email Merchant Email.
phone string 15 phone Merchant Phone Number.
address1 string 255 street Company Address Line 1.
city string 40 City Company City.
state string 80 State Company State.
zip string 20 PostalCode Company Zip.
leadType string 100 Lead_Type_c__c Type of lead Possible Values: "Bank Referral", "Self Sourced", "Merchant Refer A Friend".
leadSource string 100 LeadSource Source of Lead Information. Possible Values: "Web", "Branch Referral", "Direct Mail/Email", "Online", "Customer referral", "Bank", "Bank Partner", "Bank Referral".
businessType string 150 Type_of_Business__c Type of Business.
mcc string 4 MCC__c Merchant Category Information.
annualVolume string Currency(15, 2) MC_V_Ann_Vol__c Annual Card Volume of Company.
averageTicket string Currency(6, 0) Average_Credit_Ticket__c Average Transaction Information of Business.
preferredContactTime Date Preferred_Time_to_Contact__c Preferred date/time by Merchant.
branchEmployeeName string 50 Branch_Emp_Name__c Branch Employee Name.
branchEmployeePhone string 15 Branch_Phone__c Branch Employee Phone.
branchEmployeeEmail string 320 Branch_Emp_Email_Address__c Branch Employee Email.
branch string 30 Branch__c Branch Number.
branchName string 75 Branch_Name__c Branch Name.
comments string 1500 Comments__c Additional comments on lead.
campaignId string 18
fields Array Array of fields.
name string Field Name - Please Check the possible values.
value string Value of the field.
boardingHierarchy object This information is mandatory only if API user have to support multiple partners/clients. If API user have to support only one specific partner/client in those cases partner and agent information can be setup along with the developer portal key itself.
salesforcePartnerId string 18 Bank_Lookup__c Partner Id.
agentChainNumber string 15 Hierarchy_Agent__c Agent chain

Possible Values of Name in fields

The fields is an Array of key-value pair Objects. Each Object must have name & value key/fields. Example: [ {"name": "country", "value":"Argentina"}, {"name": "title", "value":"Director"} ]

name Character Limit Salesforce Field Description Comments
"bankReferralId" 50 Referral_ID__c
"referralBusinessUnit" 60 Referral_Business_Unit__c
"country" 80 Country Business country.
"legalName" 200 Legal_Name__c Business legal Name.
"title" 128 Title Title of the Contact.
"mobilePhone" 15 MobilePhone Mobile Phone of the Contact.
"ownerFirstName" 40 Owner_First_Name__c First Name of the Owner.
"ownerLastame" 80 Owner_Last_Name__c Last Name of the Owner.
"ownerStreetAddress" 100 Home_Street__c Address of the Owner.
"ownerCity" 25 Home_City__c City of the Owner.
"ownerState" 25 Home_State__c State of the Owner.
"ownerZip" 10 Home_Zip__c Zip of the Owner.
"annualRevenue" Customer_Annual_Revenue__c Business annual revenue. This is a picklist in salesforce
"organizationType" Organization_Type__c Type of the Organization. This is a picklist in salesforce
"yearBusinessStarted" Year_Business_Started__c Year Business Started. This is a picklist in salesforce
"faceToFaceVolume" 3 Swiped__c % of Sales Activity - Swiped.
"phoneSalesVolume" 3 Phone_Mail_Sales__c % of Sales Activity - Telephone.
"internetVolume" Percent(3, 0) Internet__c % of Sales Activity - Internet.
"linkBackId" 10 Link_Back_ID__c Linkback number information for Lead.
"chainId" 15 Chain_ID__c If the Lead is for child Location of Same Merchant, Then Provide Parent Merchant Id Information of Lead.
"recordTypeId" 18 RecordTypeId Salesforce Id of the Record Type.
"uid" 40 CU_Merchant_Number__c South Hierarchy Information of Lead, This field is specifically for the leads that are getting created for Canada.
"referralRegion" 60 Referral_Region__c Bank/ Branch Referral Region of which Lead is created.
"branchName" 75 Branch_Name__c Branch Name Information.
"branchEmployeeNumber" 25 Branch_Emp__c Branch Employee Number.
"branchChannelType" 18 BranchChannelType__c Salesforce ID of Branch Channel Object.
"branchSubChannel" 18 BranchSubchannel__c Salesforce ID of Branch Sub Channel Object.
"groupCode" 18 Group_Code__c Group Code Information for Lead.
"personalId" 20 Personal_ID__c User CNPJ # or CPF # for Brazil (This Field is specific for Brazil). This is a picklist in salesforce
"originatingRegion" Originating_Region__c Orginating region for Lead Ex : FDI. This is specific for International Merchants.
"tobaccoCigarettes" 1 Tobacco_Cigarettes__c Tobacco Cigarattes (Specific to brazil) - true or false.
"currency" currencyIsoCode ISO 4217 currency code of the merchant’s currency, By Defualt it will be USD. This is a picklist in salesforce
"existingBankClient" Account_with_Bank__c Is Merchant an existing Client of Bank. This is a picklist in salesforce
"dateAccountOpened" Date_Account_Opened__c if Existing Client, Date of Account Opened. This is a picklist in salesforce
"currentProcessor" Current_Processor__c Current Processor of Business if any. This is a picklist in salesforce
"rating" Rating Rating. This is a picklist in salesforce
"referralDivision" 60 Referral_Division__c Oraganization Information of Referral.
"campaignName" 150 Campaign_Custom__c Campaign Name that leads needs to link.
"businessConsultantAMAId" 10 AMA_ID_selected__c
"chosenContactTime" 1500 Banker_Notes__c
"bestContactTime" Best_Call_Time__c This is a picklist in salesforce
"district" 40 District__c
"highestTicket" Currency(13, 0) Highest_Ticket_Sale__c
"industry" Industry This is a picklist in salesforce
"isKiosk" 1 isKiosk__c
"ldeRepName" 100 Lead_Specialist__c
"linknumber" 50 Link_Number__c
"mapProjectedRevenue" Currency(16, 0) Map_Revenue__c
"mapVolume" Number(10, 0) Map_Volume__c
"personalId" 20 Personal_ID__c
"referralbusiness" 60 Referral_Business__c
"accountExecutiveID" 12 Referring_FDC_Rep_ID__c
"salesChannel" Sales_Channel__c This is a picklist in salesforce
"salutation" Salutation This is a picklist in salesforce
"territory" Territory__c This is a picklist in salesforce
"region" Region__c This is a picklist in salesforce
"annualCardVolume" Credit_Card_Volume__c This is a picklist in salesforce
"keyedBy" 80 Keyed_By__c
"marketingOfferCode" 255 Marketing_Offer_Code__c
"marketingPpcKeyword" 50 Marketing_PPC_Keyword__c
"campaignOfferCode" 150 Original_Marketing_Activity__c
"referralMarket" 60 Referral_Market__c
"landingPageUrl" 255 Landing_Page_URL__c
"referralUrl" 255 Referral_URL__c
"acquiringPage" 255 Acquiring_Page__c
"acquiringForm" 255 Acquiring_Form__c
"socialClickId" 255 Social_clickid__c
"heapId" 16 HeapId__c
"ipAddress" 255 IP_Address__c
"lastClickCampaign" 255 Last_Click_Campaign__c
"lastClickContent" 255 Last_Click_Content__c
"lcLanding" 1000 LC_Landing__c
"lastClickMedium" 255 Last_Click_Medium__c
"lcReferrer" 255 LC_Referrer__c
"lastClickSource" 255 Last_Click_Source__c
"lcTerm" 255 LC_Term__c
"allTrafficSources" 255 All_Traffic_Sources__c

Success Response

The endpoint returns an object containing information about the newly created Salesforce lead.

Parameter Data Type Response Description
referralId string Y Referral Id details that is created.
message string Y Additional information regarding lead created.

Error Response for Schema Validation (Required fields)

Parameter Data Type Description
error array An array of objects
error object Collection of 3 strings.
↳↳ errorType string Type of an error. Possible value: "Schema validation"
↳↳ location string Name of the missing field. Possible value: "lastName"
↳↳ errorMessage string Error message. Possible value: "Last Name is required field"

Error Response of any Data Validation

Parameter Data Type Description
error array An array of objects
error object Collection of 2 strings.
↳↳ errorType string Type of an error. Possible value: "Data Validation Error"
↳↳ errorMessage string Error message. Possible value: "Data validation failed for email input."

GET referrals

When user creates lead using POST v2/create/lead, in that response FDMP provides “referralId” . User will use that “referralId” to get the details of Referral.

# Don't forget to add your HMAC Authorization Headers
endpoint = "/marketplace/v1/referrals/:referralId"

r = requests.get(url + endpoint, headers=headers)
print(r)
# Don't forget to add your HMAC Authorization Headers
ENDPOINT="$URL/marketplace/v1/referrals/:referralId"
curl -X GET -H "date: $DATE" -H "Authorization: $HMAC_AUTH" $ENDPOINT
// Don't forget to add your HMAC Authorization Headers
var options = {
  method: 'GET',
  url: url + '/marketplace/v1/referrals/:referralId',
  headers: getAuthenticationHeaders()
};

request(options, function (error, response, body) {
  if (error) throw new Error(error);
  console.log(response);

});
// Don't forget to add your HMAC Authorization Headers
HttpResponse response = null;
try {
  response = doGet("/marketplace/v1/referrals/:referralId");
  int statusCode = response.getStatusLine().getStatusCode();
  String response_string = EntityUtils.toString(response.getEntity());
  System.out.println("json:" + response_string);
} catch (Exception e) {
  e.printStackTrace();
}
<?php
# Don't forget to add your HMAC Authorization Headers

$ch = curl_init();
curl_setopt($ch, CURLOPT_URL, $url . "/marketplace/v1/referrals/:referralId");
curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
curl_setopt($ch, CURLOPT_HTTPHEADER, $headers);
$res = curl_exec($ch);
echo($res);

?>

The above command returns JSON structured like this (partial response):

{
    "referral": {
        "zip": "68114",
        "city": "Omaha",
        "state": "NE",
        "address1": "123 do not ship",
        "company": "MMIS Test CL129012",
        "firstName": "Jon",
        "lastName": "Consumer",
        "phone": "4022233134",
        "email": "devtest@gmail.com",
        "mcc": "5651",
        "leadSource": "FILE",
        "businessType": "Direct",
        "branchEmployeeName": "Test Name",
        "branchEmployeePhone": "2121212121",
        "branchEmployeeEmail": "devtest@firstdata.com",
        "comments": "Testing New Payload Flow",
        "annualVolume": "100000.0000000",
        "averageTicket": "100.00",
        "leadType": "Bank Referral",
        "status": "Created",
        "salesForceOwnerId": "00570000004fyv5AAA",
        "leadId": "00Q5C000002jnmFUAQ",
        "dealId": "2018789380",
        "fields": [
            {
                "code": "COUNTRY",
                "name": "country",
                "label": "Country",
                "value": "USA",
                "isDynamic": "N"
            },
            {
                "code": "MOBILEPHONE",
                "name": "mobilePhone",
                "label": "Mobile Phone",
                "value": "3092135467",
                "isDynamic": "N"
            },
            {
                "code": "ANNUALREVENUE",
                "name": "annualRevenue",
                "label": "Annual Revenue",
                "value": "3000000",
                "isDynamic": "N"
            },
            {
                "code": "LEGALNAME",
                "name": "legalName",
                "label": "Legal Name",
                "value": "MMIS TEST CNLegal",
                "isDynamic": "N"
            },
            {
                "code": "YEARBUSINESSSTARTED",
                "name": "yearBusinessStarted",
                "label": "Year Business Started",
                "value": "2018",
                "isDynamic": "N"
            }
        ],
        "agentId": "327970001886",
        "partnerId": "a075C000001VL4tQAG",
        "createdBy": "FDMPUSER",
        "createdDate": "Mon Dec 09 23:15:55 UTC 2019"
    }
}

Request

GET /marketplace/v1/referrals/:referralId

Parameter Required Data Type Default Description
no input

Response

This endpoint returns an referral objects, with the following parameters.

Parameter Data Type Description
leadType string Lead type. Possible Values: "Bank Referral", "Self Sourced", "Merchant Refer A Friend".
leadSource string Source of lead information. Possible Values: "API", "WEB", "FILE".
leadId string Lead Id Created in Salesforce.
dealId string Deal ID of lead created.
company string Company name (DBA name).
firstName string Contact/merchant first name.
lastName string Contact/merchant last name.
address1 string Business street address.
city string Business city.
state string Business state.
zip string Business zip/postal code.
email string Contact/merchant email address.
phone string Contact/merchant phone number.
annualVolume string Annual credit card transaction volume.
averageTicket string Estimated or actual average ticket price.
businessType string Type of Business.
mcc string Merchant Category Code (refer to: GET MCC/Category).
branchEmployeeName string Branch employee name.
branchEmployeePhone string Branch employee phone number.
branchEmployeeEmail string Branch employee Email.
agentId string Additional comments on lead.
partnerId string Additional comments on lead.
status string Status of the Lead in Salesforce.
comments string Additional comments on lead.
createdBy string Additional comments on lead.
createdDate string Time stamp.
fields array Array of Objects, where each Object is a collection of 5 "strings".

Description of fields object collection

Parameter Data Type Description
code string Additional field code.
name string Additional field name.
label string Additional field label.
value string Additional field value.
isDynamic string Possible Values: "N" - "Y"

GET Referral Dealid History

# Don't forget to add your HMAC Authorization Headers
endpoint = url + "marketplace/v2/referral/:dealid/history"
r = requests.get(endpoint, headers=headers)
print(r)

# Don't forget to add your HMAC Authorization Headers
ENDPOINT="$URL/marketplace/v2/referral/:dealid/history"
curl -X GET -H "date: $DATE" -H "Authorization: $HMAC_AUTH" $ENDPOINT
// Don't forget to add your HMAC Authorization Headers
var options = {
  method: 'GET',
  url: url + 'marketplace/v2/referral/:dealid/history',
  headers: getAuthenticationHeaders()
};

request(options, function (error, response, body) {
  if (error) throw new Error(error);
  console.log(response);

});
// Don't forget to add your HMAC Authorization Headers
HttpResponse response = null;
try {
  response = doGet("marketplace/v2/referral/:dealid/history");
  int statusCode = response.getStatusLine().getStatusCode();
  String response_string = EntityUtils.toString(response.getEntity());
  System.out.println("json:" + response_string);
} catch (Exception e) {
  e.printStackTrace();
}
<?php
# Don't forget to add your HMAC Authorization Headers

$ch = curl_init();
curl_setopt($ch, CURLOPT_URL, $url . "marketplace/v2/referral/:dealid/history");
curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
curl_setopt($ch, CURLOPT_HTTPHEADER, $headers);
$res = curl_exec($ch);
echo($res);

?>

The above command returns JSON structured like this:

{
  "applicationHistory": [
    {
      "actionStatus": "Review Order",
      "createdBy": "Amit Phatak",
      "date": "November 27, 2019 10:04:17 AM EST",
      "comment": ""
    }
  ]
}

This endpoint retrieves the history of the referral dealid

Request

GET marketplace/v2/referral/:dealid/history

In the URL, use the dealid to get the history.

Parameter Required
dealId

Response

This endpoint returns an object with an arraycontaining the history.

Parameter Type Description
applicationHistory Array
actionStatus string
createdBy string
date string
comment string

POST Salesforce/Read/Document

# Don't forget to add your HMAC Authorization Headers

# Note: the "document" string below is an incomplete example 
data = {
         "parentId": "00P5C000001alFfUAI",
         "bcId": "FA13F9G",
         "title": "sample.pdf"
       }

endpoint = "marketplace/v1/salesforce/read/document"

r = requests.post(url + endpoint, json=data, headers=headers)
print(r)
# Don't forget to add your HMAC Authorization Headers

# Note: the "document" string below is an incomplete example 
ENDPOINT="$URL/marketplace/v1/salesforce/read/document"
curl -X POST -H "date: $DATE" -H "Authorization: $HMAC_AUTH" -H "Content-Type:application/json" --data '
  '{
     "parentId": "00P5C000001alFfUAI",
     "bcId": "FA13F9G",
     "title": "sample.pdf"
   }' $ENDPOINT
// Don't forget to add your HMAC Authorization Headers

// Note: the "document" string below is an incomplete example 
var options = { method: 'POST',
  url: url + 'marketplace/v1/salesforce/read/document',
  headers: getAuthenticationHeaders(),
  body: {
          "parentId": "00P5C000001alFfUAI",
          "bcId": "FA13F9G",
          "title": "sample.pdf"
        },
  json: true
};

request(options, function (error, response, body) {
  if (error) throw new Error(error);
  console.log(body);
});
// Don't forget to add your HMAC Authorization Headers

// Note: the value for the "document" parameter in the string below is an incomplete example 
try {
  String jsonString = "{\n  \"parentId\": \"00P5C000001alFfUAI\",\n  \"bcId\": \"FA13F9G\",\n  \"title\": \"sample.pdf\"\n}";


  StringEntity payload = new StringEntity(jsonString);

  HttpResponse response = doPost("marketplace/v1/salesforce/read/document", payload);
  int statusCode = response.getStatusLine().getStatusCode();
  String response_string = EntityUtils.toString(response.getEntity());
  JSONObject json = new JSONObject(response_string);
  System.out.println("json:" + json.toString());

} catch (Exception e) {
  e.printStackTrace();
}
<?php
# Don't forget to add your HMAC Authorization Headers

# Note: the "document" string below is an incomplete example
$data = array (
          'parentId' => '00P5C000001alFfUAI',
          'bcId' => 'FA13F9G',
          'title' => 'sample.pdf',
        );

$data_json = json_encode($data);
$headers = array(
    'date: ' . $date,
    'Authorization: ' . $hmacAuth,
    'Content-Type: application/json',
    'Content-Length: ' . strlen($data_json)
);

$ch = curl_init();
curl_setopt($ch, CURLOPT_URL, $url . "marketplace/v1/salesforce/read/document");
curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
curl_setopt($ch, CURLOPT_POST, 1);
curl_setopt($ch, CURLOPT_HTTPHEADER, $headers);
curl_setopt($ch, CURLOPT_POSTFIELDS, $data_json);
$res = curl_exec($ch);
curl_close($ch);

?>


The above command returns JSON structured like this:

{
  "attachment": {
    "parentId": "00P5C000001alFfUAI",
    "createdBy": "FA13F9G",
    "documentBase64Value": "LS0tLS0tLS0tLS0t"
  }
}

This endpoint allows us to fetch attachment for a given criteria.

Request

POST marketplace/v1/salesforce/read/document

The endpoint takes a JSON object as input.

Parameter Required Data Type
parentId string
bcId string
title string

Response

The endpoint returns an object containing documentBase64Value for a given parentId and bcId.

Parameter Data Type
attachment object
parentId string
createdBy string
documentBase64Value string

POST Branches

# Don't forget to add your HMAC Authorization Headers

# Note: the "document" string below is an incomplete example 
data = {
         "userName": "test.leadgen1@firstdata.com.snapsit2"
       }

endpoint = "marketplace/v1/branches"

r = requests.post(url + endpoint, json=data, headers=headers)
print(r)
# Don't forget to add your HMAC Authorization Headers

# Note: the "document" string below is an incomplete example 
ENDPOINT="$URL/marketplace/v1/branches"
curl -X POST -H "date: $DATE" -H "Authorization: $HMAC_AUTH" -H "Content-Type:application/json" --data '
  '{
     "userName": "test.leadgen1@firstdata.com.snapsit2"
   }' $ENDPOINT
// Don't forget to add your HMAC Authorization Headers

// Note: the "document" string below is an incomplete example 
var options = { method: 'POST',
  url: url + 'marketplace/v1/branches',
  headers: getAuthenticationHeaders(),
  body: {
          "userName": "test.leadgen1@firstdata.com.snapsit2"
        },
  json: true
};

request(options, function (error, response, body) {
  if (error) throw new Error(error);
  console.log(body);
});
// Don't forget to add your HMAC Authorization Headers

// Note: the value for the "document" parameter in the string below is an incomplete example 
try {
  String jsonString = "{\n  \"userName\": \"test.leadgen1@firstdata.com.snapsit2\"\n}";


  StringEntity payload = new StringEntity(jsonString);

  HttpResponse response = doPost("marketplace/v1/branches", payload);
  int statusCode = response.getStatusLine().getStatusCode();
  String response_string = EntityUtils.toString(response.getEntity());
  JSONObject json = new JSONObject(response_string);
  System.out.println("json:" + json.toString());

} catch (Exception e) {
  e.printStackTrace();
}
<?php
# Don't forget to add your HMAC Authorization Headers

# Note: the "document" string below is an incomplete example
$data = array (
          'parentId' => '00P5C000001alFfUAI',
          'bcId' => 'FA13F9G',
          'title' => 'sample.pdf',
        );

$data_json = json_encode($data);
$headers = array (
             'userName' => 'test.leadgen1@firstdata.com.snapsit2',
           );

$ch = curl_init();
curl_setopt($ch, CURLOPT_URL, $url . "marketplace/v1/branches");
curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
curl_setopt($ch, CURLOPT_POST, 1);
curl_setopt($ch, CURLOPT_HTTPHEADER, $headers);
curl_setopt($ch, CURLOPT_POSTFIELDS, $data_json);
$res = curl_exec($ch);
curl_close($ch);

?>


The above command returns JSON structured like this:

{
    "branches": [
        {
            "name": "Branch #91",
            "branchNumber": "91",
            "addressLine1": "400 Tate Avenue",
            "city": "Hayes Center",
            "state": "NE",
            "zip": "69032",
            "phone": "308.286.3276",
            "addressLine2": "addressLine2",
            "addressLine3": "addressLine3",
            "fax": "1212121212",
            "division": "division",
            "region": "region",
            "description": "description",
            "salesForceOwnerId": "0050g000005bUPyAAM",
            "salesForceBranchId": "a0V5B000008X5cgUAC",
            "salesforcePartnerId": "a0770000004BDTDAA4",
            "agentChainNumber": "945970002883"
        }
    ]
}

This endpoint allows us to fetch attachment for a given criteria.

Request

POST marketplace/v1/branches

The endpoint takes a JSON object as input.

Parameter Required Data Type
userName string

Response

The endpoint returns an object with corresponding details.

Parameter Data Type
branches array
name string
branchNumber string
addressLine1 string
city string
state string
zip string
phone string
addressLine2 string
addressLine3 string
fax string
division string
region string
description string
salesForceOwnerId string
salesForceBranchId string
salesforcePartnerId string
agentChainNumber string

GET Referral Fields

# Don't forget to add your HMAC Authorization Headers
endpoint = url + "marketplace/v1/referral/fields/company/:companyId"
r = requests.get(endpoint, headers=headers)
print(r)

# Don't forget to add your HMAC Authorization Headers
ENDPOINT="$URL/marketplace/v1/referral/fields/company/:companyId"
curl -X GET -H "date: $DATE" -H "Authorization: $HMAC_AUTH" $ENDPOINT
// Don't forget to add your HMAC Authorization Headers
var options = {
  method: 'GET',
  url: url + 'marketplace/v1/referral/fields/company/:companyId',
  headers: getAuthenticationHeaders()
};

request(options, function (error, response, body) {
  if (error) throw new Error(error);
  console.log(response);

});
// Don't forget to add your HMAC Authorization Headers
HttpResponse response = null;
try {
  response = doGet("marketplace/v1/referral/fields/company/:companyId");
  int statusCode = response.getStatusLine().getStatusCode();
  String response_string = EntityUtils.toString(response.getEntity());
  System.out.println("json:" + response_string);
} catch (Exception e) {
  e.printStackTrace();
}
<?php
# Don't forget to add your HMAC Authorization Headers

$ch = curl_init();
curl_setopt($ch, CURLOPT_URL, $url . "marketplace/v1/referral/fields/company/:companyId");
curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
curl_setopt($ch, CURLOPT_HTTPHEADER, $headers);
$res = curl_exec($ch);
echo($res);

?>

The above command returns JSON structured like this:

{
  "fields": [
    {
      "code": "OWNER_ADDRESS_ZIP",
      "name": "owner_address_zip",
      "type": "String",
      "label": "Owner Zip",
      "fieldOrder": 1,
      "validationRules": [
        {
          "validationRule": "IS_ZIP",
          "value": "Y"
        }
      ]
    },
    {
      "code": "OWNER_ADDRESS_STATE",
      "name": "owner_address_state",
      "type": "String",
      "label": "Owner State",
      "fieldOrder": 5,
      "validationRules": [
        {
          "validationRule": "MAX_LENGTH",
          "value": "2"
        }
      ]
    }
  ]
}

This endpoint retrieves the fields for the companyId

Request

GET marketplace/v1/referral/fields/company/:companyId

In the URL, use the companyId to get the fields.

Parameter Required Data Type
companyId int

Response

This endpoint returns an object with an arraycontaining the fields.

Parameter Type
fields Array
code string
name string
type string
label string
fieldOrder int
validationRules Array
validationRule string
value string

POST Referral/v1/leads/status

# Don't forget to add your HMAC Authorization Headers

# Note: the "document" string below is an incomplete example 
data = {
           "referralIds": [
               "V7LxQ", "QyLyV", "VAJOQ", "r8qx5", "52KjV", "VPZRr", "5DepV", "Vnyz5", "Q4WaV", "5OAaQ", 
               "VemXV", "VvKlQ", "rm2p5", "rJnzr", "V1W7r", "r0WvQ", "rq7gV", "rB0zV", "VYdE5", "VjnnV", 
               "VGeXr", "VpyZQ", "rWgqr", "VR6MV", "VoA2r", "Q9Wl5", "r3W1r", "5M2RV", "5b0jQ", "VlP9V", 
               "QzXe5", "QkDZr", "QxNo5", "QEmqQ", "5LPo5", "rXNOV", "QdJm5", "rN8KV", "rgeJV", "QKD1r", 
               "VwgpV", "Qabzr", "QZXB5", "V6W2Q", "V7WxV", "QydyV", "VAWOr", "r8BxV", "52WjV", "ABCDE", 
               "5DJpQ", "Vn8zr"
               ]
       }

endpoint = "referral/v1/leads/status"

r = requests.post(url + endpoint, json=data, headers=headers)
print(r)
# Don't forget to add your HMAC Authorization Headers

# Note: the "document" string below is an incomplete example 
ENDPOINT="$URL/referral/v1/leads/status"
curl -X POST -H "date: $DATE" -H "Authorization: $HMAC_AUTH" -H "Content-Type:application/json" --data '
  "{
       "referralIds": [
           "V7LxQ", "QyLyV", "VAJOQ", "r8qx5", "52KjV", "VPZRr", "5DepV", "Vnyz5", "Q4WaV", "5OAaQ", 
           "VemXV", "VvKlQ", "rm2p5", "rJnzr", "V1W7r", "r0WvQ", "rq7gV", "rB0zV", "VYdE5", "VjnnV", 
           "VGeXr", "VpyZQ", "rWgqr", "VR6MV", "VoA2r", "Q9Wl5", "r3W1r", "5M2RV", "5b0jQ", "VlP9V", 
           "QzXe5", "QkDZr", "QxNo5", "QEmqQ", "5LPo5", "rXNOV", "QdJm5", "rN8KV", "rgeJV", "QKD1r", 
           "VwgpV", "Qabzr", "QZXB5", "V6W2Q", "V7WxV", "QydyV", "VAWOr", "r8BxV", "52WjV", "ABCDE", 
           "5DJpQ", "Vn8zr"
           ]
   }' $ENDPOINT
// Don't forget to add your HMAC Authorization Headers

// Note: the "document" string below is an incomplete example 
var options = { method: 'POST',
  url: url + 'referral/v1/leads/status',
  headers: getAuthenticationHeaders(),
  body: {
            "referralIds": [
                "V7LxQ", "QyLyV", "VAJOQ", "r8qx5", "52KjV", "VPZRr", "5DepV", "Vnyz5", "Q4WaV", "5OAaQ", 
                "VemXV", "VvKlQ", "rm2p5", "rJnzr", "V1W7r", "r0WvQ", "rq7gV", "rB0zV", "VYdE5", "VjnnV", 
                "VGeXr", "VpyZQ", "rWgqr", "VR6MV", "VoA2r", "Q9Wl5", "r3W1r", "5M2RV", "5b0jQ", "VlP9V", 
                "QzXe5", "QkDZr", "QxNo5", "QEmqQ", "5LPo5", "rXNOV", "QdJm5", "rN8KV", "rgeJV", "QKD1r", 
                "VwgpV", "Qabzr", "QZXB5", "V6W2Q", "V7WxV", "QydyV", "VAWOr", "r8BxV", "52WjV", "ABCDE", 
                "5DJpQ", "Vn8zr"
                ]
        },
  json: true
};

request(options, function (error, response, body) {
  if (error) throw new Error(error);
  console.log(body);
});
// Don't forget to add your HMAC Authorization Headers

// Note: the value for the "document" parameter in the string below is an incomplete example 
try {
  String jsonString = "{\n  \"referralIds\": [\n    \"V7LxQ\",\n    \"QyLyV\",\n    \"VAJOQ\",\n    \"r8qx5\",\n    \"52KjV\",\n    \"VPZRr\",\n    \"5DepV\",\n    \"Vnyz5\",\n    \"Q4WaV\",\n    \"5OAaQ\",\n    \"VemXV\",\n    \"VvKlQ\",\n    \"rm2p5\",\n    \"rJnzr\",\n    \"V1W7r\",\n    \"r0WvQ\",\n    \"rq7gV\",\n    \"rB0zV\",\n    \"VYdE5\",\n    \"VjnnV\",\n    \"VGeXr\",\n    \"VpyZQ\",\n    \"rWgqr\",\n    \"VR6MV\",\n    \"VoA2r\",\n    \"Q9Wl5\",\n    \"r3W1r\",\n    \"5M2RV\",\n    \"5b0jQ\",\n    \"VlP9V\",\n    \"QzXe5\",\n    \"QkDZr\",\n    \"QxNo5\",\n    \"QEmqQ\",\n    \"5LPo5\",\n    \"rXNOV\",\n    \"QdJm5\",\n    \"rN8KV\",\n    \"rgeJV\",\n    \"QKD1r\",\n    \"VwgpV\",\n    \"Qabzr\",\n    \"QZXB5\",\n    \"V6W2Q\",\n    \"V7WxV\",\n    \"QydyV\",\n    \"VAWOr\",\n    \"r8BxV\",\n    \"52WjV\",\n    \"ABCDE\",\n    \"5DJpQ\",\n    \"Vn8zr\"\n  ]\n}";


  StringEntity payload = new StringEntity(jsonString);

  HttpResponse response = doPost("referral/v1/leads/status", payload);
  int statusCode = response.getStatusLine().getStatusCode();
  String response_string = EntityUtils.toString(response.getEntity());
  JSONObject json = new JSONObject(response_string);
  System.out.println("json:" + json.toString());

} catch (Exception e) {
  e.printStackTrace();
}
<?php
# Don't forget to add your HMAC Authorization Headers

# Note: the "document" string below is an incomplete example
$data = array (
          'referralIds' => 
          array (
            0 => 'V7LxQ',
            1 => 'QyLyV',
            2 => 'VAJOQ',
            3 => 'r8qx5',
            4 => '52KjV',
            5 => 'VPZRr',
            6 => '5DepV',
            7 => 'Vnyz5',
            8 => 'Q4WaV',
            9 => '5OAaQ',
            10 => 'VemXV',
            11 => 'VvKlQ',
            12 => 'rm2p5',
            13 => 'rJnzr',
            14 => 'V1W7r',
            15 => 'r0WvQ',
            16 => 'rq7gV',
            17 => 'rB0zV',
            18 => 'VYdE5',
            19 => 'VjnnV',
            20 => 'VGeXr',
            21 => 'VpyZQ',
            22 => 'rWgqr',
            23 => 'VR6MV',
            24 => 'VoA2r',
            25 => 'Q9Wl5',
            26 => 'r3W1r',
            27 => '5M2RV',
            28 => '5b0jQ',
            29 => 'VlP9V',
            30 => 'QzXe5',
            31 => 'QkDZr',
            32 => 'QxNo5',
            33 => 'QEmqQ',
            34 => '5LPo5',
            35 => 'rXNOV',
            36 => 'QdJm5',
            37 => 'rN8KV',
            38 => 'rgeJV',
            39 => 'QKD1r',
            40 => 'VwgpV',
            41 => 'Qabzr',
            42 => 'QZXB5',
            43 => 'V6W2Q',
            44 => 'V7WxV',
            45 => 'QydyV',
            46 => 'VAWOr',
            47 => 'r8BxV',
            48 => '52WjV',
            49 => 'ABCDE',
            50 => '5DJpQ',
            51 => 'Vn8zr',
          ),
        );

$data_json = json_encode($data);
$headers = array(
    'date: ' . $date,
    'Authorization: ' . $hmacAuth,
    'Content-Type: application/json',
    'Content-Length: ' . strlen($data_json)
);

$ch = curl_init();
curl_setopt($ch, CURLOPT_URL, $url . "referral/v1/leads/status");
curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
curl_setopt($ch, CURLOPT_POST, 1);
curl_setopt($ch, CURLOPT_HTTPHEADER, $headers);
curl_setopt($ch, CURLOPT_POSTFIELDS, $data_json);
$res = curl_exec($ch);
curl_close($ch);

?>


The above command returns JSON structured like this:

{
  "message": "Successfully found current lead status for 49 referral(s)",
  "error": [
    {
      "errorType": "REFERRALS_OUTSIDE_THRESHOLD_LIMIT",
      "errorMessage": "Input referrals count is more than threshold limit of 50. Lead status is not fetched for referrals: [5DJpQ, Vn8zr]"
    },
    {
      "errorType": "LEAD_STATUS_NOT_FOUND",
      "errorMessage": "Lead Status not found for referrals: [ABCDE]"
    }
  ],
  "leads": [
    {
      "referralId": "grNEQ",
      "leadId": "00Q5C000002MrJ0UAK",
      "dealId": "2018785729",
      "currentStatus": "Open",
      "statusComments": "Bank Referral Timing"
    },
    {
      "referralId": "bQdj5",
      "leadId": "00Q5C000002MrYxUAK",
      "dealId": "2018785731",
      "opportunityId": "0065C000004bG5AQAU",
      "currentStatus": "Closed Lost"
    },
    {
      "referralId": "52WjV",
      "leadId": "00Q5C000002jq4HUAQ",
      "dealId": "2018790385",
      "currentStatus": "Open"
    },
    {
      "referralId": "r8BxV",
      "leadId": "00Q5C000002jq4RUAQ",
      "dealId": "2018790387",
      "currentStatus": "Open"
    },
    {
      "referralId": "VAWOr",
      "leadId": "00Q5C000002jq4WUAQ",
      "dealId": "2018790388",
      "currentStatus": "Open"
    },
    {
      "referralId": "QydyV",
      "leadId": "00Q5C000002jq4bUAA",
      "dealId": "2018790389",
      "currentStatus": "Open"
    },
    {
      "referralId": "V7WxV",
      "leadId": "00Q5C000002jq4gUAA",
      "dealId": "2018790390",
      "currentStatus": "Open"
    },
    {
      "referralId": "V6W2Q",
      "leadId": "00Q5C000002jq4lUAA",
      "dealId": "2018790391",
      "currentStatus": "Open"
    },
    {
      "referralId": "QZXB5",
      "leadId": "00Q5C000002jq4qUAA",
      "dealId": "2018790392",
      "currentStatus": "Open"
    },
    {
      "referralId": "Qabzr",
      "leadId": "00Q5C000002jq4vUAA",
      "dealId": "2018790393",
      "currentStatus": "Open"
    },
    {
      "referralId": "VwgpV",
      "leadId": "00Q5C000002jq50UAA",
      "dealId": "2018790394",
      "currentStatus": "Open"
    },
    {
      "referralId": "QKD1r",
      "leadId": "00Q5C000002jq5KUAQ",
      "dealId": "2018790398",
      "currentStatus": "Open"
    },
    {
      "referralId": "rgeJV",
      "leadId": "00Q5C000002jq5ZUAQ",
      "dealId": "2018790401",
      "currentStatus": "Open"
    },
    {
      "referralId": "rN8KV",
      "leadId": "00Q5C000002jq5jUAA",
      "dealId": "2018790403",
      "currentStatus": "Open"
    },
    {
      "referralId": "QdJm5",
      "leadId": "00Q5C000002jq5oUAA",
      "dealId": "2018790404",
      "currentStatus": "Open"
    },
    {
      "referralId": "rXNOV",
      "leadId": "00Q5C000002jqOGUAY",
      "dealId": "2018790414",
      "currentStatus": "Open"
    },
    {
      "referralId": "5LPo5",
      "leadId": "00Q5C000002jqOLUAY",
      "dealId": "2018790415",
      "currentStatus": "Open"
    },
    {
      "referralId": "QEmqQ",
      "leadId": "00Q5C000002jqOVUAY",
      "dealId": "2018790417",
      "currentStatus": "Open"
    },
    {
      "referralId": "QxNo5",
      "leadId": "00Q5C000002jqOzUAI",
      "dealId": "2018790423",
      "currentStatus": "Open"
    },
    {
      "referralId": "QkDZr",
      "leadId": "00Q5C000002jqPEUAY",
      "dealId": "2018790424",
      "currentStatus": "Open"
    },
    {
      "referralId": "QzXe5",
      "leadId": "00Q5C000002jqPYUAY",
      "dealId": "2018790426",
      "currentStatus": "Open"
    },
    {
      "referralId": "VlP9V",
      "leadId": "00Q5C000002jqPdUAI",
      "dealId": "2018790427",
      "currentStatus": "Open"
    },
    {
      "referralId": "5b0jQ",
      "leadId": "00Q5C000002jqPiUAI",
      "dealId": "2018790428",
      "currentStatus": "Open"
    },
    {
      "referralId": "5M2RV",
      "leadId": "00Q5C000002jqPnUAI",
      "dealId": "2018790429",
      "currentStatus": "Open"
    },
    {
      "referralId": "r3W1r",
      "leadId": "00Q5C000002jqPsUAI",
      "dealId": "2018790430",
      "currentStatus": "Open"
    },
    {
      "referralId": "Q9Wl5",
      "leadId": "00Q5C000002jqPxUAI",
      "dealId": "2018790431",
      "currentStatus": "Open"
    },
    {
      "referralId": "VoA2r",
      "leadId": "00Q5C000002jqQ2UAI",
      "dealId": "2018790432",
      "currentStatus": "Open"
    },
    {
      "referralId": "VR6MV",
      "leadId": "00Q5C000002jqQ7UAI",
      "dealId": "2018790433",
      "currentStatus": "Open"
    },
    {
      "referralId": "rWgqr",
      "leadId": "00Q5C000002jqQlUAI",
      "dealId": "2018790440",
      "currentStatus": "Open"
    },
    {
      "referralId": "VpyZQ",
      "leadId": "00Q5C000002jqR5UAI",
      "dealId": "2018790444",
      "currentStatus": "Open"
    },
    {
      "referralId": "VGeXr",
      "leadId": "00Q5C000002jqRAUAY",
      "dealId": "2018790445",
      "currentStatus": "Open"
    },
    {
      "referralId": "VjnnV",
      "leadId": "00Q5C000002jqRFUAY",
      "dealId": "2018790446",
      "currentStatus": "Open"
    },
    {
      "referralId": "VYdE5",
      "leadId": "00Q5C000002jqRKUAY",
      "dealId": "2018790447",
      "currentStatus": "Open"
    },
    {
      "referralId": "rB0zV",
      "leadId": "00Q5C000002jqRUUAY",
      "dealId": "2018790449",
      "currentStatus": "Open"
    },
    {
      "referralId": "rq7gV",
      "leadId": "00Q5C000002jqRZUAY",
      "dealId": "2018790450",
      "currentStatus": "Open"
    },
    {
      "referralId": "r0WvQ",
      "leadId": "00Q5C000002jqTQUAY",
      "dealId": "2018790465",
      "currentStatus": "Open"
    },
    {
      "referralId": "V1W7r",
      "leadId": "00Q5C000002jqZrUAI",
      "dealId": "2018790474",
      "currentStatus": "Open"
    },
    {
      "referralId": "rJnzr",
      "leadId": "00Q5C000002jqakUAA",
      "dealId": "2018790479",
      "currentStatus": "Open"
    },
    {
      "referralId": "rm2p5",
      "leadId": "00Q5C000002jqhqUAA",
      "dealId": "2018790592",
      "currentStatus": "Open"
    },
    {
      "referralId": "VvKlQ",
      "leadId": "00Q5C000002jqhvUAA",
      "dealId": "2018790593",
      "currentStatus": "Open"
    },
    {
      "referralId": "VemXV",
      "leadId": "00Q5C000002jqiyUAA",
      "dealId": "2018790604",
      "currentStatus": "Open"
    },
    {
      "referralId": "5OAaQ",
      "leadId": "00Q5C000002jqjSUAQ",
      "dealId": "2018790607",
      "currentStatus": "Open"
    },
    {
      "referralId": "Q4WaV",
      "leadId": "00Q5C000002jqjXUAQ",
      "dealId": "2018790608",
      "currentStatus": "Open"
    },
    {
      "referralId": "Vnyz5",
      "currentStatus": "Open"
    },
    {
      "referralId": "5DepV",
      "currentStatus": "Open"
    },
    {
      "referralId": "VPZRr",
      "leadId": "00Q5C000002jrB3UAI",
      "dealId": "2018790668",
      "currentStatus": "Open"
    },
    {
      "referralId": "52KjV",
      "leadId": "00Q5C000002jrB8UAI",
      "dealId": "2018790669",
      "currentStatus": "Open"
    },
    {
      "referralId": "r8qx5",
      "leadId": "00Q5C000002jrBDUAY",
      "dealId": "2018790670",
      "currentStatus": "Open"
    },
    {
      "referralId": "VAJOQ",
      "leadId": "00Q5C000002jrBSUAY",
      "dealId": "2018790672",
      "currentStatus": "Open"
    }
  ]
}

This endpoint allows us to fetch current status of referral ids.

Request

POST referral/v1/leads/status

The endpoint takes a JSON object as input containing an array of referralIds.

Parameter Required Data Type Description
referralIds Array Array of referral ids.

Response

The endpoint returns an object containing lead status which serves as the confirmation of status.

Parameter Data Type Description Possible Values
message string Success message with number of referrals fetched.
errorType string Error Code.
errorMessage string Error Message.
referralId string Referral ID.
leadId string Lead ID.
dealId string Deal ID. 2018790678
opportunityId string Opportunity ID.
currentStatus string Current Lead Status.
statusComments string Lost reason code of lead.

Possible Values of errorCode/errorMessage

Error Code Error Message
REFERRALS_OUTSIDE_THRESHOLD_LIMIT Input referrals count is more than threshold limit of 50. Lead status is not fetched for referrals: [5DJpQ, Vn8zr].
LEAD_STATUS_NOT_FOUND Lead Status not found for referrals: [yAbcd].
INVALID_INPUT_REQUEST Invalid input Request. Please input valid referrals.
REFERRAL_NOT_FOUNDS Referrals not found.
SYSTEM_ERROR Lead Status API failed with system error.### Possible Values of errorCode/errorMessage.

Possible Values of currentStatus

Status Name Description
Open When Lead is created.
Qualify When Lead is converted to Opportunity.
Proposal When Contract is Created for the opportunity.
Sold When Merchant Signed the contract.
Closed Won When Contract is Credit Approved.
Closed Lost When Contract is Declined by Credit.
Unqualified Unqualified.

Possible Values of message

Message Description
Successfully found current lead status for (referral count) referral(s)
API rate limit exceeded Have 200 threshold limit per consumer to access lead status API service. This message will show up once 200 trigger limit exceeded on the leads status API for specific consumer.

Possible Values of statusComments

Status Name Description
Customer Unreachable Lead Unqualified Reason Code.
Do Not Call Lead Unqualified Reason Code.
Duplicate Lead Unqualified Reason Code/Opportunity won/lost reason code.
Merchant already processing with partnership Lead Unqualified Reason Code.
Merchant refused to engage in sales discussion Lead Unqualified Reason Code.
Merchant wants a non-merchant product Lead Unqualified Reason Code.
Misdirect Call - Service Related Lead Unqualified Reason Code.
Restricted business type Lead Unqualified Reason Code.
Suspect Lead Unqualified Reason Code/Opportunity won/lost reason code.
Bank Referral Timing Opportunity won/lost reason code.
Chain Reassignment to Marietta Opportunity won/lost reason code.
Dead - No Opportunity Opportunity won/lost reason code.
Not properly qualified - Customer need not established Opportunity won/lost reason code.
Not properly qualified – No clear buying process Opportunity won/lost reason code.
Not properly qualified - Not acceptable credit risk Opportunity won/lost reason code.
Not properly qualified - Pre-wired for competition Opportunity won/lost reason code.
Outsold by competition - Functionality/Capability Opportunity won/lost reason code.
Outsold by competition - Relationship Opportunity won/lost reason code.
Outsold by competition – Risk Mitigation Opportunity won/lost reason code.
Outsold by competition - Value Opportunity won/lost reason code.
Qualified Out – Expected Price Level Not Acceptable Opportunity won/lost reason code.
Qualified Out – No Solution To Meet Customer Requirements Opportunity won/lost reason code.
Qualified Out - Not Acceptable Credit Risk Opportunity won/lost reason code.
Qualified Out - Other Opportunity won/lost reason code.
Qualified Out – Pre-wired For Competition Opportunity won/lost reason code.
Qualified Out - Price Does Not Meet Solution Requirements Opportunity won/lost reason code.