Web Marketing Tool
Reseller
WMT .
API Integration
Login

Added: 08/09/2010   |   Updated: 4 Years Ago

API OVERVIEW

Below are instructions on how your developer can integrate a third party system/software to communicate with our software.  One example of a possible use is to have it so that once a member joins or pays at a third party site their account is automatically created within your membership site.

CREATE MEMBER

URL To Send Request To:
your-domain.com/api/createmember.php

Variables (POST/GET):

FieldRequiredVersionDescription
emailYes2.2The new members email address
passwordYes2.2The new members password
fnameYes2.2The new members first name
lnameYes2.2The new members last name
phoneYes2.2The new members phone number
urlYes2.2The URL a contact is redirected to after filling out the form on the new members capture page
addressYes2.2The new members street address
cityYes2.2The new members city
stateYes2.2The new members state
zipcodeYes2.2The new members zipcode
countryYes2.2The new members country
usernameYes2.2The new members username for the software.  Must be unique.  An members capture page will be your-domain.com/USERNAME
apikeyYes2.2The API Key found on the "Advanced Features" page in your software's members area. The API Key is used to authenticate the request.
membershipNo3.31The ID of the membership the new member should be assigned to.  If not provided this value defaults to 1.
parentNo3.31The username or email of an existing member which referred the new member.  If not provided this value defaults to the admin's username.
notifyNo4.02If provided with a value of 1 it will send out notification emails as defined in the software settings.  If not provided, or if it has a value other than 1, then no notification emails are sent.
createcontactNo4.94If provided with a value of y it will create a contact for the parent with the same details (email, name, etc) as the member being created.
flagNo4.94If a contact is created (see above) this allows you to specify the id of the flag to flag the contact.
var#No4.92Allows setting the value of a member variable. # should be replaced with the id of the member variable being populated.

Sample URL:
your-domain.com/api/createmember.php?fname=Chris&lname=TEST&email=test@test.com&password=test123&phone=555-555-5555&URL=http://mysite.com&username=apitest&address=address&city=city&state=KY&zipcode=zip&country=USA&apikey=XXXX

 

UPDATE MEMBER

URL To Send Request To:
your-domain.com/api/member.php

Variables (POST/GET):
Which variables are available to you depends on which action you specify.  Below are a list of the variables always available:

FieldRequiredVersionDescription
oldemailNo*2.2*Either this field or the email field is required.  The email address of the member being updated.  Same as the email field.
emailNo*3.31*Either this field or the oldemail field is required.  The email address of the member being updated.  Same as the oldemail field.
actionNo3.31The action being performed.  See below for more details.  If not provided it defaults to 1.
apikeyYes2.2The API Key found on the "Advanced Features" page in your software's members area. The API Key is used to authenticate the request.

Below are separate tables for each action showing the additional variables available for that action:

Action = 1  Edit a member's details
FieldRequiredVersionDescription
newemailYes2.2The new email address of the member
fnameYes2.2The new first name of the member
lnameYes2.2The new last name of the member
usernameYes2.2The new username which should be assigned to the member.
newpasswordYes2.2The new password which should be assigned to the member.
Action = 2  Change an members membership
FieldRequiredVersionDescription
membershipYes4.0The id of the membership which the member should be assigned to.
Action = 3  Suspend or approve an member
FieldRequiredVersionDescription
approvedYes4.03Should either be 0 or 1.  0 changes the members status to suspended.  1 changes the members status to active.
Sample URL:
your-domain.com/api/member.php?oldemail=sales@webmarketingtool.com&newemail=promote@webmarketingtool.com&fname=Chris&lname=TestUp&username=christest&oldpassword=test&newpassword=test&apikey=XXXX

 

 

DELETE MEMBER

URL To Send Request To:
your-domain.com/api/deletemember.php

Variables (POST/GET):

FieldRequiredVersionDescription
emailYes2.2The email address of the member being deleted.
passwordNo*2.2This field is required for versions 4.02 and earlier.  Beginning with version 4.03 this field is no longer used.  In versions 4.02 and earlier this should be the existing password of the member that is being deleted.  If this does not match their existing password then the member is not deleted.
apikeyYes2.2The API Key found on the "Advanced Features" page in your software's members area. The API Key is used to authenticate the request.

Sample URL:
your-domain.com/api/deletemember.php?email=promote@webmarketingtool.com&password=test&apikey=XXXX

 

 

 

GET MEMBER API KEY

URL To Send Request To:
your-domain.com/api/memberkey.php

Variables (POST/GET):

FieldRequiredVersionDescription
emailYes4.9The email address of the member that you are retrieving the API key for.
passwordYes4.9The password of the member that you are retrieving the API key for.
RETURN:
Returns the api key for the member if it is successful.  Otherwise it returns an error message describing the issue. All error message start with the words "ERROR: Invalid" (exa: ERROR: Invalid Password)

Sample URL:
your-domain.com/api/memberkey.php?email=promote@webmarketingtool.com&password=test

 

 

 

CUSTOM QUERY API

URL To Send Request To:
your-domain.com/api/query.php

Variables (POST/GET):

FieldRequiredVersionDescription
apikeyYes4.92The API Key found on the "Advanced Features" page in your software's members area. The API Key is used to authenticate the request.
queryYes4.92The query that should be executed and the results retrieved. NOTE: It only allows select queries and does not allow other queries.
RETURN:
If successful returns json code containing all of the values returned from the query. Otherwise it returns an error message describing the issue.

Sample URL:
your-domain.com/api/query.php?apikey=XXXXXXXX&query=SELECT+%2A+FROM+affiliate+WHERE+aid%3E1

 

 

 

UPDATE CONTACT

URL To Send Request To:
your-domain.com/api/editcontact.php

Variables (POST/GET):

FieldRequiredVersionDescription
apikeyYes2.2The API Key found on the "Advanced Features" page in your software's members area. The API Key is used to authenticate the request.
emailYes2.2The email address of the contact being updated.
groupNo2.2The id of the contact group the contact should be assigned to.  Using this method removes the contact from whatever primary contact group it is assigned to and makes this group the new primary contact group.
addgroupNo4.03The id of a contact group the contact should be assigned to in addition to any existing contact groups the contact is already assigned to.
newemailNo4.03The new email address which should be assigned to the contact.
ausernameNo4.03The username of the member that this contact belongs to.  If neither ausername, aid, nor aemail is provided then the changes are made to all contact that have a matching email (meaning if a contact with the same email belongs to several members, all of those contacts would be updated at once).
aidNo4.03The id of the members that this contact belongs to.  If neither ausername, aid, nor aemail is provided then the changes are made to all contacts that have a matching email (meaning if a contact with the same email belongs to several members, all of those contacts would be updated at once).
aemailNo4.03The email of the member that this contact belongs to.  If neither ausername, aid, nor aemail is provided then the changes are made to all contacts that have a matching email (meaning if a contact with the same email belongs to several members, all of those contacts would be updated at once).
RETURN:
Returns "Success" if the update is successful.  Otherwise it returns an error message describing the issue.

Sample URL:
your-domain.com/api/editcontact.php?email=sales@webmarketingtool.com&group=1&apikey=XXXX

 

 

GET CONTACTS

URL To Send Request To:
your-domain.com/api/contacts.php

Variables (POST/GET):

FieldRequiredVersionDescription
apikeyYes4.21The API Key found on the "Advanced Features" page in your software's members area. The API Key is used to authenticate the request.
syncNo4.21If not provided or set to 0 will deliver all contacts.  If set to 1, will only retrieve contacts that have been updated since last call by device (see below). If not provided, default is 1.
limitNo4.21The maximum amount of contacs that are returned.  Contacts are sorted by date with most recent contacts listed first.  If not provided or set to 0 then it is reset to be 100.  A greater maximum value than 2000 is not accepted.
deviceNo4.21A numeric value for the device being used.  For custom devices (not build as products sold by WMT) use a value of 1000 or greater.  Can be used for many purposes (don't let title limit it), but a device could be a separate website, call center, etc, that needs to be able to retrieve most recent updates.  If not provided, then does not filter contacts by sync.
groupNo4.21The id of the group.  If not provided, or set to -1 then returns contacts belonging to all groups.  If set to 0 returns inactive contacts.
ausernameNo*4.21The username of the member that this contact belongs to.  Either ausername, aid or aemail is required.
aidNo*4.21The id of the member that this contact belongs to.  Either ausername, aid or aemail is required.
aemailNo*4.21The email of the member that this contact belongs to.  Either ausername, aid or aemail is required.

RETURN:
If successful returns json code containing all of the values stored for the contacts.  Otherwise it returns an error message describing the issue.

Sample URL:
your-domain.com/api/contacts.php?email=sales@webmarketingtool.com&apikey=XXXX

 

GET CONTACT

URL To Send Request To:
your-domain.com/api/contact.php

Variables (POST/GET):

FieldRequiredVersionDescription
apikeyYes4.1The API Key found on the "Advanced Features" page in your software's members area. The API Key is used to authenticate the request.
emailYes4.1The email address of the contact being retrieved.
ausernameNo*4.1The username of the member that this contact belongs to.  If neither ausername, aid, nor aemail is provided then the first contact found matching the email provided is retrieved.
aidNo*4.1The id of the member that this contact belongs to.  If neither ausername, aid, nor aemail is provided then the first contact found matching the email provided is retrieved
aemailNo*4.1The email of the member that this contact belongs to.  If neither ausername, aid, nor aemail is provided then the first contact found matching the email provided is retrieved
RETURN:
If successful returns json code containing all of the values stored for the contact.  Otherwise it returns an error message describing the issue.

Sample URL:
your-domain.com/api/contact.php?email=sales@webmarketingtool.com&apikey=XXXX&aid=1

 

 

EMAIL CONTACT

URL To Send Request To:
your-domain.com/admin/emailcontactapi.php

Variables (POST/GET):

FieldRequiredVersionDescription
apikeyYes4.1The API Key found on the "Advanced Features" page in your software's members area. The API Key is used to authenticate the request.
emailYes4.1The email address of the contact being retrieved.
ausernameNo*4.1The username of the member that this contact belongs to.  If neither ausername, aid, nor aemail is provided then an error will be thrown.
aidNo*4.1The id of the member that this contact belongs to.  If neither ausername, aid, nor aemail is provided then an error will be thrown.
aemailNo*4.1The email of the member that this contact belongs to.  If neither ausername, aid, nor aemail is provided then an error will be thrown.
subjectYes4.1Title of the email that is being sent
messageYes4.1Content of the email that is being sent
RETURN:
Returns "Success" if the update is successful. Otherwise it returns an error message describing the issue.

Sample PHP Code:



ADD SMS CREDITS

URL To Send Request To:
your-domain.com/api/sms.php

Variables (POST/GET):

FieldRequiredVersionDescription
apikeyYes4.1The API Key found on the "Advanced Features" page in your software's members area. The API Key is used to authenticate the request.
usernameNo*4.1The username of the member that the credits should be added to. If neither username, affid, nor email is provided then an error will be thrown.
emailNo*4.3The email of the member that the credits should be added to. If neither username, affid, nor email is provided then an error will be thrown.
affidNo*4.3The id of the member that the credits should be added to. If neither username, affid, nor email is provided then an error will be thrown.
creditsYes4.1The amount of sms credits to add to the members account.
RETURN:
Returns "Success" if the update is successful. Otherwise it returns an error message describing the issue.

Sample URL:
your-domain.com/api/sms.php?username=demo&credits=50&apikey=XXXX



GET FORM TEMPLATE CODE

URL To Send Request To:
your-domain.com/admin/formtemplatesapi.php

Variables (POST/GET):

FieldRequiredVersionDescription
apikeyYes4.21The API Key found on the "Advanced Features" page in your software's members area. The API Key is used to authenticate the request.
userNo*4.21Either user OR affid OR email is required.  The username of the member that the form should belong to.
affidNo*4.21Either user OR affid OR email is required.  The id of the member that the form should belong to.
emailNo*4.21Either user OR affid OR email is required.  The email of the member that the form should belong to.
actionYes4.21 

Below are separate tables for each action showing the additional variables available for that action:
Action = 1  Get Available Form Templates (no additional fields required)
Action = 2  Get Custom Fields For A Specific Form Template
FieldRequiredVersionDescription
templateidYes4.2The id of the form template from which the custom fields should be retrieved.
Action = 3  Get HTML Code For A Specific Form Template
FieldRequiredVersionDescription
templateidYes4.2The id of the form template from which the html code should be retrieved.
ftc#No4.2# is the id of the custom form field returned in action 2.  If this is provided then it uses the value provided for the custom form field.  Otherwise it uses the default value specified for the custom form field.
groupNo4.2The contact group that the contact should be assigned to after filling out the form.  If not provided the default value is: 1
redirectNo4.2The url that a contact should be redirected to after filling out the form.  If not provided uses the value set under advanced features, or if that is blank, uses the value set under my personal info for the member.
campaignNo4.2The campaign that the contact should be assigned to after filling out the form.
RETURN:
If there is an error it returns an error message or "0".
Action 1: Returns JSON code containing a list of id's for the available form templates.

Sample URL:
your-domain.com/admin/formtemplatesapi.php?affid=1&action=1&apikey=XXXX
 



Member Notification Email

URL To Send Request To:
your-domain.com/admin/membernotifyemailapi.php

Variables (POST/GET):

FieldRequiredVersionDescription
apikeyYes4.22The API Key found on the "Advanced Features" page in your software's members area. The API Key is used to authenticate the request.
userNo*4.22Either user OR affid OR email is required.  The username of the member that the form should belong to.
affidNo*4.22Either user OR affid OR email is required.  The id of the member that the form should belong to.
emailNo*4.22Either user OR affid OR email is required.  The email of the member that the form should belong to.
mneidYes4.22The id of the member notification email to send
RETURN:
If there is an error it returns an error message or "0".  If it is successful it returns 1.

Sample URL:
your-domain.com/admin/membernotifyemailapi.php?affid=1&mneid=1&apikey=XXXX







Ad Coop API

URL To Send Request To:
your-domain.com/admin/adcoopapi.php

Variables (POST/GET):

FieldRequiredVersionDescription
apikeyYes4.22The API Key found on the "Advanced Features" page in your software's members area. The API Key is used to authenticate the request.
userNo*4.22Either user OR affid OR email is required.  The username of the member that the form should belong to.
affidNo*4.22Either user OR affid OR email is required.  The id of the member that the form should belong to.
emailNo*4.22Either user OR affid OR email is required.  The email of the member that the form should belong to.
acidYes4.22The id of the ad coop to apply shares to
qtyYes4.22The quantity of shares to be added
expireNo4.22The amount of days after today that the shares should expire.  If not provided uses the amount of days specified for the ad coop
RETURN:
If there is an error it returns an error message or "0".  If it is successful it returns 1.

Sample URL:
your-domain.com/admin/adcoopapi.php?affid=1&acid=1&qty=1&expires=30&apikey=XXXX






Get Surveys

URL To Send Request To:
your-domain.com/admin/surveyapi.php

Variables (POST/GET):

FieldRequiredVersionDescription
apikeyYes4.93The API Key found on the "Advanced Features" page in your software's members area. The API Key is used to authenticate the request.
sidNo*4.93Either sid OR qid is required. ID of the survey to retrieve.
qidNo*4.93Either sid OR qid is required. ID of the question to retrieve.
RETURN:
Returns survey or question data as JSON

Sample URL:
your-domain.com/admin/surveyapi.php?sid=SURVEYID&apikey=XXXXXXXX



How to Use the API

First, to use the API requires php knowledge.  If you do not have php knowledge, and do not have a developer on your team with the knowledge, we can set it up for you as a support request.

Step 1: Get Your API Key
The first step is to get your API key.  You will find the API key in Advanced Features under the "Misc" tab.

Step 2: Create the PHP Code
After you have the API key you are ready to create the php code that calls the API.  In the box below is sample php code you could use for calling the API to create a new member.  All you would need to do is replace the values for the variables listed at the top with your own values:


Questions And Answers

Do you have an API to connect on my system,so whenever my members will not pay on my system it will cancel automatically all of his landing pages and are we later able to enable him?


If I provide the API key to a third party affiliate program, will a new member signup in that program automatically create an account in my site for that member?


What is an API?





webmarketingtool.com Webutation DMCA.com Protection Status Authorize.net GoDaddy
Valid HTML! Valid CSS!


Reseller: WMT
|
Login
(502) 225-3237