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

General:

Services:

Resources:

Customer Work Orders

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

Provides a list of work orders, a single work order based on a valid id, allows for update and provides the ability to delete a work order. Here you will submit the following arguments and the system will respond with a JSON that includes:

Retrieve work orders (list):

The work order list will provide a list of work orders, however, it will do so 50 records at a time. The offset argument will allow developers to control the starting point in which the database will start generating records.

Arguments Req Data Type Example
command Y N/A cmdBoxTPortalWorkOrderList
username_api Y N/A Same as the handshake
session_key_api Y N/A Provided by handshake
username_customer Y N/A To be issued
session_key_customer Y N/A Provided by customer handshake
customer_id Y int(11) Provided by customer handshake
offset Y int(11) 0

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
workOrderObjList --- An object that contains all customer work orders available to the portal

Sample Code ( Perl ):

     #!/usr/bin/perl
     use strict; 
     use LWP::UserAgent;
     use Data::Dumper; 
     use JSON;  
     use URI::Encode qw(uri_decode uri_encode); 

     my $destination; 

     my %fields = ( 
          command => "cmdBoxTPortalWorkOrderList",
          username_api => "username_api",
          session_key_api => "session_key_api",
          username_customer => "username_customer",
          session_key_customer => "session_key_customer",
          customer_id => "customer_id",
          offset => "offset"
     );  

     my @args = (); 

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

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

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

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

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

Retrieve work order (single):

Arguments Req Data Type Example
command Y N/A cmdBoxTPortalWorkOrderData
username_api Y N/A Same as the handshake
session_key_api Y N/A Provided by handshake
username_customer Y N/A To be issued
session_key_customer Y N/A Provided by customer handshake
workorder_id Y int(11) 12345
jobsite_id Y int(11) 54321

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
workOrderObj --- An object that contains all information belonging to the target work order

Sample Code ( Perl ):

     #!/usr/bin/perl
     use strict; 
     use LWP::UserAgent;
     use Data::Dumper; 
     use JSON;  
     use URI::Encode qw(uri_decode uri_encode); 

     my $destination; 

     my %fields = ( 
          command => "cmdBoxTPortalWorkOrderData",
          username_api => "username_api",
          session_key_api => "session_key_api",
          username_customer => "username_customer",
          session_key_customer => "session_key_customer",
          workorder_id => "workorder_id",
          jobsite_id => "jobsite_id"
     );  

     my @args = (); 

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

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

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

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

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

Update/Create work orders:

All original values will be provided by the work order retrieval modules (documented above). The single work oder module will also provide an array of fields that are required when attempting to update work order information. Any field marked as (if) will be required if specified by the required fields array.

This module will create a work order when the work order id passed in is equal to 0, otherwise, it will result in an update.

Arguments Req Data Type Example
command Y N/A cmdBoxTPortalSaveWorkOrder
username_api Y N/A Same as the handshake
session_key_api Y N/A Provided by handshake
username_customer Y N/A To be issued
session_key_customer Y N/A Provided by customer handshake
customer_id Y int(11) Provided by customer handshake
workorder_id Y int(11) 12345
workorder_jsid Y int(11) 54321
workorder_asset Y (if) varchar(30) 20-Open
workorder_contqty Y (if) int(2) 2
workorder_targetcont N int(11) 56789
workorder_wodate Y varchar(20) Mar 03, 2022
workorder_wotype Y (if) enum Delivery, SOS, Switch, Out, Move, Live

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

Sample Code ( Perl ):

     #!/usr/bin/perl
     use strict; 
     use LWP::UserAgent;
     use Data::Dumper; 
     use JSON;  
     use URI::Encode qw(uri_decode uri_encode); 

     my $destination; 

     my %fields = ( 
          command => "cmdBoxTPortalSaveWorkOrder",
          workorder_id => "workorder_id",
          workorder_jsid => "workorder_jsid",
          workorder_asset => "workorder_asset",
          workorder_contqty => "workorder_contqty",
          workorder_targetcont => "workorder_targetcont",
          workorder_wodate => "workorder_wodate",
          workorder_wotype => "workorder_wotype",
          username_api => "username_api",
          session_key_api => "session_key_api",
          username_customer => "username_customer",
          session_key_customer => "session_key_customer",
          customer_id => "customer_id"
     );  

     my @args = (); 

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

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

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

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

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

Delete work order:

Arguments Req Data Type Example
command Y N/A cmdBoxTPortalRemoveWorkOrder
username_api Y N/A Same as the handshake
session_key_api Y N/A Provided by handshake
username_customer Y N/A To be issued
session_key_customer Y N/A Provided by customer handshake
customer_id Y int(11) Provided by customer handshake
workorder_id Y int(11) 12345

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

Sample Code ( Perl ):

     #!/usr/bin/perl
     use strict; 
     use LWP::UserAgent;
     use Data::Dumper; 
     use JSON;  
     use URI::Encode qw(uri_decode uri_encode); 

     my $destination; 

     my %fields = ( 
          command => "cmdBoxTPortalRemoveWorkOrder",
          username_api => "username_api",
          session_key_api => "session_key_api",
          username_customer => "username_customer",
          session_key_customer => "session_key_customer",
          customer_id => "customer_id",
          workorder_id => "workorder_id"
     );  

     my @args = (); 

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

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

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

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

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