Web Marketing Tool
Reseller
Chris B.
API Integration
Login

Added: 08/09/2010   |   Updated: 11 Months 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/admin/createapi.php

Variables (POST/GET):

Field Required Version Description
email Yes 2.2 The new members email address
password Yes 2.2 The new members password
fname Yes 2.2 The new members first name
lname Yes 2.2 The new members last name
phone Yes 2.2 The new members phone number
url Yes 2.2 The URL a contact is redirected to after filling out the form on the new members capture page
address Yes 2.2 The new members street address
city Yes 2.2 The new members city
state Yes 2.2 The new members state
zipcode Yes 2.2 The new members zipcode
country Yes 2.2 The new members country
username Yes 2.2 The new members username for the software.  Must be unique.  An members capture page will be your-domain.com/USERNAME
apikey Yes 2.2 The API Key found on the "Advanced Features" page in your software's members area. The API Key is used to authenticate the request.
membership No 3.31 The ID of the membership the new member should be assigned to.  If not provided this value defaults to 1.
parent No 3.31 The username or email of an existing member which referred the new member.  If not provided this value defaults to the admin's username.
notify No 4.02 If 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.
createcontact No 4.94 If 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.
flag No 4.94 If a contact is created (see above) this allows you to specify the id of the flag to flag the contact.
var# No 4.92 Allows setting the value of a member variable. # should be replaced with the id of the member variable being populated.

Sample URL:
your-domain.com/admin/createapi.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/admin/memberapi.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:

Field Required Version Description
oldemail No* 2.2 *Either this field or the email field is required.  The email address of the member being updated.  Same as the email field.
email No* 3.31 *Either this field or the oldemail field is required.  The email address of the member being updated.  Same as the oldemail field.
action No 3.31 The action being performed.  See below for more details.  If not provided it defaults to 1.
apikey Yes 2.2 The 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
Field Required Version Description
newemail Yes 2.2 The new email address of the member
fname Yes 2.2 The new first name of the member
lname Yes 2.2 The new last name of the member
username Yes 2.2 The new username which should be assigned to the member.
newpassword Yes 2.2 The new password which should be assigned to the member.
Action = 2  Change an members membership
Field Required Version Description
membership Yes 4.0 The id of the membership which the member should be assigned to.
Action = 3  Suspend or approve an member
Field Required Version Description
approved Yes 4.03 Should either be 0 or 1.  0 changes the members status to suspended.  1 changes the members status to active.
Sample URL:
your-domain.com/admin/memberapi.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/admin/deleteapi.php

Variables (POST/GET):

Field Required Version Description
email Yes 2.2 The email address of the member being deleted.
password No* 2.2 This 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.
apikey Yes 2.2 The 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/admin/deleteapi.php?email=promote@webmarketingtool.com&password=test&apikey=XXXX

 

 

 

GET MEMBER API KEY

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

Variables (POST/GET):

Field Required Version Description
email Yes 4.9 The email address of the member that you are retrieving the API key for.
password Yes 4.9 The 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/admin/memberkeyapi.php?email=promote@webmarketingtool.com&password=test

 

 

 

CUSTOM QUERY API

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

Variables (POST/GET):

Field Required Version Description
apikey Yes 4.92 The API Key found on the "Advanced Features" page in your software's members area. The API Key is used to authenticate the request.
query Yes 4.92 The 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/admin/memberkeyapi.php?apikey=XXXXXXXX&query=SELECT+%2A+FROM+affiliate+WHERE+aid%3E1

 

 

 

UPDATE CONTACT

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

Variables (POST/GET):

Field Required Version Description
apikey Yes 2.2 The API Key found on the "Advanced Features" page in your software's members area. The API Key is used to authenticate the request.
email Yes 2.2 The email address of the contact being updated.
group No 2.2 The 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.
addgroup No 4.03 The id of a contact group the contact should be assigned to in addition to any existing contact groups the contact is already assigned to.
newemail No 4.03 The new email address which should be assigned to the contact.
ausername No 4.03 The 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).
aid No 4.03 The 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).
aemail No 4.03 The 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/admin/updatecontactapi.php?email=sales@webmarketingtool.com&group=1&apikey=XXXX

 

 

GET CONTACTS

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

Variables (POST/GET):

Field Required Version Description
apikey Yes 4.21 The API Key found on the "Advanced Features" page in your software's members area. The API Key is used to authenticate the request.
sync No 4.21 If 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.
limit No 4.21 The 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.
device No 4.21 A 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.
group No 4.21 The 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.
ausername No* 4.21 The username of the member that this contact belongs to.  Either ausername, aid or aemail is required.
aid No* 4.21 The id of the member that this contact belongs to.  Either ausername, aid or aemail is required.
aemail No* 4.21 The 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/admin/getcontactsapi.php?email=sales@webmarketingtool.com&apikey=XXXX

 

GET CONTACT

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

Variables (POST/GET):

Field Required Version Description
apikey Yes 4.1 The API Key found on the "Advanced Features" page in your software's members area. The API Key is used to authenticate the request.
email Yes 4.1 The email address of the contact being retrieved.
ausername No* 4.1 The 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.
aid No* 4.1 The 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
aemail No* 4.1 The 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/admin/getcontactapi.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):

Field Required Version Description
apikey Yes 4.1 The API Key found on the "Advanced Features" page in your software's members area. The API Key is used to authenticate the request.
email Yes 4.1 The email address of the contact being retrieved.
ausername No* 4.1 The username of the member that this contact belongs to.  If neither ausername, aid, nor aemail is provided then an error will be thrown.
aid No* 4.1 The id of the member that this contact belongs to.  If neither ausername, aid, nor aemail is provided then an error will be thrown.
aemail No* 4.1 The email of the member that this contact belongs to.  If neither ausername, aid, nor aemail is provided then an error will be thrown.
subject Yes 4.1 Title of the email that is being sent
message Yes 4.1 Content 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/admin/smsapi.php

Variables (POST/GET):

Field Required Version Description
apikey Yes 4.1 The API Key found on the "Advanced Features" page in your software's members area. The API Key is used to authenticate the request.
username No* 4.1 The 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.
email No* 4.3 The 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.
affid No* 4.3 The 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.
credits Yes 4.1 The 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/admin/smsapi.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):

Field Required Version Description
apikey Yes 4.21 The API Key found on the "Advanced Features" page in your software's members area. The API Key is used to authenticate the request.
user No* 4.21 Either user OR affid OR email is required.  The username of the member that the form should belong to.
affid No* 4.21 Either user OR affid OR email is required.  The id of the member that the form should belong to.
email No* 4.21 Either user OR affid OR email is required.  The email of the member that the form should belong to.
action Yes 4.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
Field Required Version Description
templateid Yes 4.2 The id of the form template from which the custom fields should be retrieved.
Action = 3  Get HTML Code For A Specific Form Template
Field Required Version Description
templateid Yes 4.2 The id of the form template from which the html code should be retrieved.
ftc# No 4.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.
group No 4.2 The contact group that the contact should be assigned to after filling out the form.  If not provided the default value is: 1
redirect No 4.2 The 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.
campaign No 4.2 The 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):

Field Required Version Description
apikey Yes 4.22 The API Key found on the "Advanced Features" page in your software's members area. The API Key is used to authenticate the request.
user No* 4.22 Either user OR affid OR email is required.  The username of the member that the form should belong to.
affid No* 4.22 Either user OR affid OR email is required.  The id of the member that the form should belong to.
email No* 4.22 Either user OR affid OR email is required.  The email of the member that the form should belong to.
mneid Yes 4.22 The 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):

Field Required Version Description
apikey Yes 4.22 The API Key found on the "Advanced Features" page in your software's members area. The API Key is used to authenticate the request.
user No* 4.22 Either user OR affid OR email is required.  The username of the member that the form should belong to.
affid No* 4.22 Either user OR affid OR email is required.  The id of the member that the form should belong to.
email No* 4.22 Either user OR affid OR email is required.  The email of the member that the form should belong to.
acid Yes 4.22 The id of the ad coop to apply shares to
qty Yes 4.22 The quantity of shares to be added
expire No 4.22 The 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):

Field Required Version Description
apikey Yes 4.93 The API Key found on the "Advanced Features" page in your software's members area. The API Key is used to authenticate the request.
sid No* 4.93 Either sid OR qid is required. ID of the survey to retrieve.
qid No* 4.93 Either 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!


SUBSCRIPTION PRICES
Reseller: Chris Brevig
|
PRODUCT PRICES
Login
(502) 225-3237