AllProWebTools API Version 5.2 (Current 12-01-2019)

View our past versions features and new version changes.
Post Reply
User avatar
Benjaminh326
AllPro Provider
AllPro Provider
Posts: 29
meble kuchenne Mikołów Knurów Czechowice-Dziedzice
Joined: Wed May 08, 2019 10:35 am
Website: www.allprowebtools.com

AllProWebTools API Version 5.2 (Current 12-01-2019)

Post by Benjaminh326 »

API Key Authentication
Uses API Key and API Auth for authentication. These values are unique to each AllProWebTools account and can be found by logging into the AllProWebTools account and choosing "Settings" from the main menu and then clicking on "Administrator". The API Key and Auth will be shown in the center of the screen.

API Key Authentication provides access to account-level API calls such as:
* Signup Boxes
* New Orders

Authentication is accomplished by sending the following header variables in the request:
* Apwt-Apikey
* Apwt-Apiauth

Example implementation using PHP:

Code: Select all

$url = 'https://api.allprowebtools.com/root/get-signup-box.php?boxid=1';

$ch = curl_init();
curl_setopt($ch, CURLOPT_URL, $url);
curl_setopt($ch, CURLOPT_POST, 1);
curl_setopt($ch, CURLOPT_POSTFIELDS,$vars);  //Post Fields
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);

$headers = [
    'Host: api.allprowebtools.com',
    'Connection: Keep-Alive',
    'Accept-Encoding: gzip',
    'Cache-Control: no-cache',
    'Upgrade-Insecure-Requests: 1',
    'User-Agent: Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/73.0.3683.103 Safari/537.36',
    'Accept: text/html,application/xhtml+xml,application/xml;q=0.9,image/webp,image/apng,*/*;q=0.8,application/signed-exchange;v=b3',
    'Accept-Language: en-US,en;q=0.9',
    'Apwt-Apikey: 00myallprowebtoolsdemo255',
    'Apwt-Apiauth: myallprowebtools',
    'Content-Type: multipart/form-data; charset=utf-8',
    'Referer: http://www.example.com/index.php' //Your referrer address
];

curl_setopt($ch, CURLOPT_HTTPHEADER, $headers);

$server_output = curl_exec ($ch);

curl_close ($ch);

print  $server_output;
User Authentication

Uses an active user's login and password and support code for authentication. These values are unique to each AllProWebTools account user and are the same credentials each user uses to login to their account.

The Support Code is found at the bottom of every screen of the console after a user logs in - it is always in the dark blue footer.

More information is available here

User Authentication provides access to user-level API calls such as:
* Tasking
* Timecards
* CRM Records
* Chatting through AllProWebTools, SMS, and Facebook
* Sending Emails
* Business Summary Report
* App Notification Settings
* Getting Company Information
* List all users
* List all partners

Authentication is accomplished by sending the following header variables in the request:
* Apwt-User
* Apwt-Password
* Apwt-Support-Code

Example implementation using PHP:

Code: Select all

$url = 'https://api.allprowebtools.com/root/get-signup-box.php?boxid=1';

$ch = curl_init();
curl_setopt($ch, CURLOPT_URL, $url);
curl_setopt($ch, CURLOPT_POST, 1);
curl_setopt($ch, CURLOPT_POSTFIELDS,$vars);  //Post Fields
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);

$headers = [
    'Host: api.allprowebtools.com',
    'Connection: Keep-Alive',
    'Accept-Encoding: gzip',
    'Cache-Control: no-cache',
    'Upgrade-Insecure-Requests: 1',
    'User-Agent: Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/73.0.3683.103 Safari/537.36',
    'Accept: text/html,application/xhtml+xml,application/xml;q=0.9,image/webp,image/apng,*/*;q=0.8,application/signed-exchange;v=b3',
    'Accept-Language: en-US,en;q=0.9',
    'Apwt-Support-Code: 220-4',
    'Apwt-User: john',
    'Apwt-Password: demo',
    'Content-Type: multipart/form-data; charset=utf-8',
    'Referer: http://www.example.com/index.php' //Your referrer address
];

curl_setopt($ch, CURLOPT_HTTPHEADER, $headers);

$server_output = curl_exec ($ch);

curl_close ($ch);

print  $server_output;
Sign-up Box
Get a specific sign-up box.
URL to call: https://api.allprowebtools.com/root/get-signup-box.php
Values to POST or add as a URL query to the API:
  • "boxid" : the ID of the sign-up box you wish to obtain - required
Returned: HTML of the sign-up box form.

List Signup Boxes
Get a list of all sign-up boxes.
URL to call: https://api.allprowebtools.com/root/sig ... s-list.php
Returned: JSON of id's and names of sign-up boxes.

Code: Select all

$url = 'https://api.allprowebtools.com/root/signup-boxes-list.php';

$ch = curl_init();
curl_setopt($ch, CURLOPT_URL, $url);
curl_setopt($ch, CURLOPT_POST, 1);
curl_setopt($ch, CURLOPT_POSTFIELDS,$vars);  //Post Fields
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);

$headers = [
    'Host: api.allprowebtools.com',
    'Connection: Keep-Alive',
    'Accept-Encoding: gzip',
    'Cache-Control: no-cache',
    'Upgrade-Insecure-Requests: 1',
    'User-Agent: Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/73.0.3683.103 Safari/537.36',
    'Accept: text/html,application/xhtml+xml,application/xml;q=0.9,image/webp,image/apng,*/*;q=0.8,application/signed-exchange;v=b3',
    'Accept-Language: en-US,en;q=0.9',
    'Apwt-Support-Code: 220-4',
    'Apwt-User: john',
    'Apwt-Password: demo',
    'Content-Type: multipart/form-data; charset=utf-8',
    'Referer: http://www.example.com/get-signup-boxes.php' //Your referrer address
];

curl_setopt($ch, CURLOPT_HTTPHEADER, $headers);

$server_output = curl_exec ($ch);

curl_close ($ch);

print  $server_output;

New Orders
URL to call: https://api.allprowebtools.com/root/new-order.php
Values to POST or add as a URL query to the API:
  • "firstname" : The first name of the buyer - optional
  • "lastname" : The last name of the buyer - optional
  • "address1" : Buyer's street address - optional
  • "address2" : Second line of the street address (i.e. Apartment number) - optional
  • "city" : Buyer's city for their address - optional
  • "state" : Buyer's state for their address (in two letter format; i.e. FL, NY, CA, etc.) - optional
  • "zip" : Buyer's zip code - optional
  • "email" : Buyer's email address - required
  • "phone" : Buyer's phone number - optional
  • "order_amount" : The dollar amount for the order (i.e. 117.45) - required
  • "invoice_num" : The invoice number for the order - required
  • "external_pdf" : URL to PDF location - optional

Code: Select all

$url = 'https://api.allprowebtools.com/root/new-order.php';

$fields = array(
	'firstname' => urlencode('John'),
	'lastname' => urlencode('Doe'),
	'address1' => urlencode('123 center st'),
	'address2' => urlencode(''),
	'city' => urlencode('Anytown'),
	'zip' => urlencode('99999'),
	'email' => '[email protected]',
	'phone' => urlencode('800-555-1212'),
	'order_amount' => urlencode('6.55'),
	'invoice_num' => urlencode('99')
	'external_pdf' => 'https://www.w3.org/WAI/ER/tests/xhtml/testfiles/resources/pdf/dummy.pdf'
);

foreach($fields as $key=>$value) { $fields_string .= $key.'='.$value.'&'; }
rtrim($fields_string, '&');

$ch = curl_init();
curl_setopt($ch, CURLOPT_URL, $url);
curl_setopt($ch, CURLOPT_POST, count($fields));
curl_setopt($ch, CURLOPT_POSTFIELDS, $fields_string);  //Post Fields
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);

$headers = [
    'Host: api.allprowebtools.com',
    'Connection: Keep-Alive',
    'Accept-Encoding: gzip',
    'Cache-Control: no-cache',
    'Upgrade-Insecure-Requests: 1',
    'User-Agent: Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/73.0.3683.103 Safari/537.36',
    'Accept: text/html,application/xhtml+xml,application/xml;q=0.9,image/webp,image/apng,*/*;q=0.8,application/signed-exchange;v=b3',
    'Accept-Language: en-US,en;q=0.9',
    'Apwt-Apikey: 00myallprowebtoolsdemo255',
    'Apwt-Apiauth: myallprowebtools',
    'Content-Type: application/x-www-form-urlencoded; charset=utf-8',
    'Referer: http://www.example.com/index.php' //Your referrer address
];

curl_setopt($ch, CURLOPT_HTTPHEADER, $headers);

$server_output = curl_exec ($ch);

curl_close ($ch);

print  $server_output;



Returned: JSON encoded array with key "status" equaling "ok"
If there is an error, JSON encoded array with key "status" equaling "error" and key "msg" detailing the issue.
Post Reply