Contacts
Sales: 603-546-6751
Email: sales@cairnapps.com

General:

Services:

Resources:

Direct Booking

The Direct Booking query attempts a credit card charge if the card data is present then books the work order. Hauler's will be notified by email when the order succeeds.

Requests processed in TEST mode will not show up on Box Tracker, however, the response will include a url that can be used to test the inputs.

Endpoint: https://www.dumpster.software/controller.html

Arguments Req Data Type Example
command Y N/A cmdBoxTWebAPIDirectBooking
key Y N/A Value returned from the handshake
username Y N/A To be issued
name Y varchar(150) John Smith or ABC Company
billingAddress1 Y varchar(100) 123 Main Street
billingAddress2 N varchar(100) Apt 2
billingCity Y varchar(100) Yourtown
billingStateProv Y varchar(2) VA or AB
billingZipPostal Y varchar(10) 12345 or H7J1Y6
billingContry Y varchar(5) USA or CAN
billingPhone Y varchar(50) 1234567890
billingEmail Y varchar(255) johnsmith@somedomain.com
jobName N varchar(100) Complex 1
jobAddress Y varchar(100) 123 Main Street
jobCity Y varchar(50) Yourtown
jobStateProv Y varchar(2) VA or AB
jobZipPostal Y varchar(10) 12345 or H7J1Y6
jobLatitude Y decimal(18,14) 42.972452000 – from Google Maps API
jobLongitude Y decimal(18,14) -71.481386600 – from Google Maps API
distanceByRoad Y varchar(20) 9.2 mi or 9.2 km - from Google Distance API
dateRequested Y varchar(20) YYYY-MM-DD as 2020-05-31
serviceType Y enum Delivery, SOS, Switch, Out, Move, Live
assetClass Y varchar(30) 20-Open
hazards N text Watch out for children in the yard
priceSheetID Y int(11) Selected from the pricing query
note N text Please place on right side of driveway by the red door
txnClass N string Parish Name
Mode* Y enum TEST || LIVE

If your hauler is using Box Tracker's billing system and it's associated merchant services the following fields will be required as indicated below.

ccardFName Y varchar(100) John
ccardLName Y varchar(100) Smith
ccardBillingAddress1 Y varchar(100) 123 Main Street
ccardBillingAddress2 N varchar(100) Apt 2
ccardBillingCity Y varchar(100) Yourtown
ccardBillingStateProv Y varchar(2) VA or AB
ccardBillingZipPostal Y varchar(10) 12345 or H7J1Y6
ccardNumber Y varchar(20) 4111111111111111
ccardExp Y varchar(4) MMYY ie: 0422
ccardCVV Y varchar(5) 123

Box Tracker Response: A JSON with the following fields:

Field Example Explaination
status 200 See the Status Codes section
errorString ERROR: Invalid Session Key What, if anything, went wrong
time 1594413406 Unix Time Stamp (EST ) when the request was created
testURL https//www.dumpster.software/test-api/VdQ0ITtW3p8AyC9N29VJhiKv8hpWPIaptZN0U9T6aYQHkbZLsD.html If the request was made with the mode set To 'TEST' Box Tracker will return a link to a page that will validate your request
OrderID 8660 Work Order ID ( Confirmation Number ) searchable on the Box Tracker Dispatch screen.
OrderDate 01 Jun, 2022 Date the order wwas booked for
OrderAddress 123 Main Street Delivery Address
OrderCity Smithfield Delivery City
OrderState VA Delivery State
OrderZip 23430 Delivery Zip / Postal Code

*In TEST mode, the system will return a url with which you can validate the variables sent to Box Tracker. Mode TEST posts will not render for the hauler.

Sample Code ( Perl ):


     my %fields = (
          command                  => cmdBoxTWebAPIDirectBooking, 
          username                 => $username, 
          key                      => $key, 
          name                     => 'Dave Smally', 
          billingAddress1          => '88 Main Street', 
          billingAddress2          => 'Apt 2', 
          billingCity              => 'Smithfield', 
          billingStateProv         => 'VA', 
          billingZipPostal         => '12345', 
          billingCountry           => 'USA', 
          billingPhone             => '1234567890', 
          billingEmail             => 'johns@somedomain.com', 
          jobName                  => 'Clean out', 
          jobAddress               => '88 Main Street', 
          jobCity                  => 'Yourtown', 
          jobStateProv             => 'VA', 
          jobZipPostal             => '12345', 
          jobLatitude              => '42.9815689', 
          jobLongitude             => '-71.4862495', 
          distanceByRoad           => '18 mi', 
          dateRequested            => "2020-05-23", 
          serviceType              => 'Delivery', 
          assetClass               => '20-open', 
          containerID              => '', 
          material                 => 'C & D',
          hazards                  => 'Low wires', 
          priceSheetID             => '44', 
          note                     => 'Call first', 
          ccardFName               => 'John', 
          ccardLName               => 'Smith', 
          ccardBillingAddress1     => '123 Main Street', 
          ccardBillingAddress2     => 'Apt 2',
          ccardBillingCity         => 'Yourtown', 
          ccardBillingStateProv    => 'VA', 
          ccardBillingZipPostal    => '12345', 
          ccardNumber              => '4111111111111111', 
          ccardExp                 => '0422', 
          ccardCVV                 => '123',  
          mode                     => 'TEST');

     @args = (); 

     foreach my $key ( keys %fields ) {
          my $value = uri_encode( $fields{ $key } ); 
          push @args, "$key=$value"; 
     }

     $queryString = join('&', @args ); 

     $destination = "https://www.dumpster.software/controller.html?$queryString"; 
     $response =  $ua->request(HTTP::Request->new(GET => $destination));
     $obj = $json->decode( $response->content );