Ubercart shipping API, get the package object with php to send the tracking number to the client as email I have an online shop implemented in Ubercart 6.x-2.4 and Drupal 6.19

All cool everything works but I'm struggling to do custom things

What I want to do is after saving the shipment data (i'm insterested in sending the Client that the package has been sent and he has to receive by email the tracking number)

So I added a predicate that does just that, but I don't know how to get the shipment object associated with the order and get that tracking number. I just know that there is an API somewhere...
Are you managing to save the tracking number to the order? With a bit of preprocess magic you could probably get the number as a variable to the invoice template that already gets sent out.

EDIT:

Something like the below would work, that I did to get extra data displayed in an invoice. I did this in my theme, so replace that with your own theme name (and the other capitalised bits). 

    function [THEMENAME]_preprocess_uc_order(&amp;$variables) {
        $variables['tracking_number'] = 
           db_fetch_object(db_query("QUERY TO GET TRACKING NUMBER"))-&gt;COLUMNNAME;
    }


Then if you put uc_order.tpl.php (needed as a dummy file so your theme can override other templates) and your own custom template into your theme directory then you are able to reference it in the template with a simple call like print $tracking_number;