IDS Web Services Documentation

Getting started with IDS Web Services

The WSDL for testing is at
http://jbtest2.internetdispatcher.org:8080/ids-beans/IDSWSRPC?wsdl

The WSDL for the Australian server is at
http://oz.internetdispatcher.org:8080/ids-beans/IDSWSRPC?wsdl

AuthToken

This is the first parameter to all web service calls.
It's made up of 3 fields, separated by '-'.
<accountId>-<userId>-<password>

as in
EXAccountID-EXUserID-EXPassword

Note The userId must be for an enabled user.

Status Values

The status reflects the stage that the trip is at within IDS.

    public static final int ACTIVE = 2;
    public static final int DISPATCHED = 3;
    public static final int PICKED_UP = 4;
    public static final int DELIVERED = 5;
    public static final int VERIFIED = 6;
    public static final int POSTED = 7;
    public static final int DELETED = 8;

RemoteTripDetailed Description

These are the fields of the java class.
Note Comments with '@PML' are specific to PML.

    public String internalId;                       // Ignore
    public String resellerId;                       // Reseller account id - @PML currently 'PMLTest'
    public String tripId;                           // Leave blank - will be set by IDS
    public long invoiceId;                          // Ignore
    public boolean invoiced;                        // Ignore
    public String serviceLevel;                     // The service level for the trip - @PML 'Return'
    public String packageType;                      // The package type for the trip - @PML The 'ProductName' in the current CSV
    public String callTakerId;
    public int status;                              // '2' for new trips.  See the Status Values above
    public boolean modified;                        // Ignore
    public String currentZone;                      // Ignore
    public String accountId;                        // Customer AccountId - @PML 'PMLAust'
    public String caller;                           // Caller's name
    public String callerPhone;                      // Caller's phone
    public String callerEmail;                      // Caller's email
    public int pieces;                              // Number of pieces in shipment - @PML The 'Quantity' in the current CSV
    public float weight;                            // The total weight of the shipment - @PML '1'
    public float declaredValueAmount;               // Ignore
    public Date callTime;                           // @PML Set to current time
    public Date readyTime;                          // The date and time that the shipment is ready
    public Date deadlineTime;                       // The date and time that the shipment is to be delivered by
    public String driver;                           // Leave blank for new trips; will be set by IDS client when dispatched
    public String billingNotes;                     // @PML This is 'MercuryReturnID' in the current CSV
    public boolean returnTrip;                      // Ignore
    public boolean dangerousGoods;                  // Ignore
    public Date pickupTime;                         // Leave blank - will be set by IDS

    // Pickup information
    public String pickupCompany;                    // Company name of the pickup @PML This is 'uc_wh_adrnam' in the current CSV
    public String pickupNotes;
    public String pickupContact;
    public String pickupPhone;
    public String pickupZone;                       // Ignore
    public String pickupEmail;                      // @PML This is 'StoreEmail' in the current CSV
    public String pickupAddressId;                  // Ignore
    public String pickupResellerId;                 // Reseller account id - @PML currently 'PMLTest'
    public String pickupAccountId;                  // Pickup company AccountId @PML PMLAust
    public String pickupDescription;                // Same as pickupCompany
    public String pickupSuite;
    public String pickupStreet;                     // @PML This is 'uc_wh_adrln1' in the current CSV
    public String pickupCity;                       // @PML This is 'uc_wh_adrcty' in the current CSV
    public String pickupProvince;                   // @PML This is 'uc_wh_adrstc' in the current CSV
    public String pickupPc;                         // @PML This is 'uc_wh_adrpsz' in the current CSV
    public String pickupCountry;                    // @PML This is 'uc_wh_ctry_name' in the current CSV

    public String deliveryCompany;                  // Company name of the delivery @PML This is 'uc_ord_rt_adrnam' in the current CSV
    public String deliveryNotes;
    public String deliveryContact;
    public String deliveryPhone;
    public String deliveryZone;                     // Ignore
    public String deliveryEmail;
    public String deliveryAddressId;                // Ignore
    public String deliveryResellerId;               // Always your reseller id @PML PMLTest
    public String deliveryAccountId;                // Delivery company AccountId @PML PMLAust
    public String deliveryDescription;              // Same as deliveryCompany
    public String deliverySuite;
    public String deliveryStreet;                   // @PML This is 'uc_ord_rt_adrln1' in the current CSV
    public String deliveryCity;                     // @PML This is 'uc_ord_rt_adrcty' in the current CSV
    public String deliveryProvince;                 // @PML This is 'uc_ord_rt_adrstc' in the current CSV
    public String deliveryPc;                       // @PML This is 'uc_ord_rt_adrpsz' in the current CSV
    public String deliveryCountry;                  // @PML This should be 'Australia'

    public float deliveryAmount;                    // Ignore
    public float miscAmount;                        // Ignore
    public float insuranceAmount;                   // Ignore
    public float weightAmount;                      // Ignore
    public Date deliveredTime;                      // This will be filled in by IDS
    public int waitTimeMins;                        // Ignore
    public float waitTimeAmount;                    // Ignore
    public float carChargeAmount;                   // Ignore
    public float redirectAmount;                    // Ignore
    public boolean skipUpdateCommonAddress;         // Ignore
    public float noGoodsAmount;                     // Ignore
    public float disbursementAmount;                // Ignore
    public float totalAmount;                       // Ignore
    public float totalTaxAmount;                    // Ignore
    public float discountAmount;                    // Ignore
    public float totalFixedAmount;                  // Ignore
    public boolean POD;                             // Set to true if a signature _must_ be captured on delivery
    public boolean mailDrop;                        // Ignore
    public String readyTimeString;                  // This is the time that the shipment is ready to be picked up
    public String clientReference;                  // @PML This is 'ProductBarcode' in the current CSV
    public boolean isDriverPaid;                    // Ignore
    public boolean isCashTrip;                      // Ignore
    public boolean isCashTripReconciled;            // Ignore
    public String podName;                          // This will be filled in by IDS
    public Date driverAssignTime;                   // This will be filled in by IDS
    public Date pickupArriveTime;                   // This will be filled in by IDS
    public Date deliveryArriveTime;                 // This will be filled in by IDS
    public long lastUpdated = 0;                    // This will be filled in by IDS
    public float totalPayrollAmount = 0;            // Ignore
    public String pallets = null;                   // Ignore
    public float length = 1f;                       // Ignore
    public float width = 1f;                        // Ignore
    public float height = 1f;                       // Ignore
    public float weightOrig = 0f;                   // Ignore
    public String sigFilename = null;               // This will be filled in by IDS
    public int board = 0;                           // Ignore
    public boolean disputed = false;                // Ignore
    public boolean carCharge = false;               // Ignore
    public boolean redirect = false;                // Ignore
    public String sortOrder = "";                   // Ignore

    // Ignore these
    public Boolean dontFinalizeFlag = false;        // Ignore
    public Date dontFinalizeDate = null;            // Ignore
    public Boolean readyToInvoiceFlag = false;      // Ignore
    public String stopGroupNumber = null;           // Ignore
    public Date driverPaidCommissionDate = null;    // Ignore
    public Boolean modifiedTripFlag = false;        // Ignore
    public Date modifiedTripDate = null;            // Ignore
    public Date receivedByIdsRouteDate = null;      // Ignore
    public Date processedByIdsRouteDate = null;     // Ignore
    public Integer priorityStatus = null;           // Ignore
    public Long priorityInvoiceId = null;           // Ignore


Adding a New Trip

Create the remoteTripDetailed object.

Populate the fields, following the guidelines above.

Call web service to save it.

Use

     public RemoteTripDetailed updateTripDetailedQuick(
			  String authToken,
			  RemoteTripDetailed trip,
			  boolean broadcastUpdateMessage)

Important Set broadcastUpdateMessage to true

If the function succeeds, a RemoteTripDetailed object will be returned, otherwise null.
Important Use this method only when adding a new trip to IDS. If updating, use the method described below.

Finding Trips

Single Trips

To find a single trip, you need the tripId.
Use this function:

     public RemoteTripDetailed findTripDetailed(
			  String authToken,
			  String tripId)

If the trip exists, a RemoteTripDetailed object will be returned, otherwise null.

Multiple Trips

Note: Java Dates map to DateTime objects in C#.

To find trips for all accounts that match the parameters, use

     public RemoteTripDetailed[] findTripsDetailedByDate(
			String authToken,
			Date from,
			Date to,
			int lowerStatus,
			int upperStatus)

To find trips for 1 account that match the parameters, use

     public RemoteTripDetailed[] findTripsDetailedByDateForAccount(
			String authToken,
			String accountId,
			Date from,
			Date to,
			int lowerStatus,
			int upperStatus)

If any trips exist, an array of RemoteTripDetailed objects will be returned.

Updating a Trip

  1. First load the trip, as above.
  2. Modify the RemoteTripDetailed object.
  3. Save the modified trip.

Use this to save it (as above in Adding a New Trip):

     public RemoteTripDetailed updateTripDetailedQuick(
			  String authToken,
			  RemoteTripDetailed trip,
			  boolean broadcastUpdateMessage)

Important Set broadcastUpdateMessage to true.

Finding Updated Trips

This will return an array of trips that have been modified in the last sinceSeconds that are within the range of the lowStatus and upperStatus (inclusive).

     public RemoteTripDetailed[] findTripsDetailedUpdatedSince(
		  	String authToken,
			String zones,
			String allKey,
			int lowStatus,
			int upperStatus,
			long sinceSeconds)

Important Set 'zones' and 'allKey' to "ALL"