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

Pricing Query

The pricing query is looking The pricing query results in a JSON that contains key information that will enable you to select the correct price. The hauler has the ability to create N pricing sheets that consider a few factors of the deal. Asset class is the size and type container. Material fields can be used to differentiate that various types of waste. Distance1 and Distance2 can be used in correlation with the MapItCenterLat, MapItCenterLng, MaxDistance fields and the Google Distance Matrix API both for priced sheet selection and to determine the franchisee's willingness to travel to the customer's location.

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

Arguments Req Data Type Example
command Y N/A cmdBoxTWebAPIPricing
username Y N/A to be issued
key Y N/A Value return from the initial handshake
zipPostalCode Y N/A Ie: 12345 or I1J 8U6



Box Tracker Response: A JSON with the following fields:

Field Example Explanation
status 200 See the status code section
errorString ERROR: Invalid Session Key What if anything went wrong
priceSheets [] An array of price sheet objects. Please see the Price Sheet Components page for an explanation of the price sheet
mapItCenterLat 42.989573300 These values together represent the center point of the haulers territory. It is from here that you will calculate Distance from map Center using Google Maps Distance API
mapItCenterLng -71.462634700
maxDistance 30 The maximum distance the hauler is willing to travel. Your should reject job s that are beyond this distance.
earliestBookingDate 2020-09-25 This is the date before which Box tracker will not accept requests
daysOfTheWeek An object keyed on days Articulates which days of the week the hauler will accept jobs
availabilityTable Articulates which days of the week the hauler will accept jobs This object shows the number of cans available by asset class for the next 14 days. This only matters for service type “Delivery” or “Live Load” as other work order types are not availability dependent
assetBuffer 2 The quantity of assets that must be left available
serviceTypes Delivery Types of work Orders (Delivery, Switch, Pick Up)



Sample Code ( Perl ):


     my $destination; 
     my $key = $obj->get('key');

     my %fields = (
          command        => 'cmdBoxTWebAPIPricing',
          username       => "$username",
          key            => "$key",
          zipPostalCode  => '23462' );

     my @args = ();

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

     my $queryString = join('&', @args );
     my $destination = "https://www.dumpster.software/controller.html?$queryString";

     my $response =  $ua->request(HTTP::Request->new(GET => $destination));

     my $obj = $json->decode( $response->content );

     print Data::Dumper->Dump([ $obj ]);