TrackShipment Method
Returns tracking data for requested idValue of IdentifierType type.
Object Oriented Interface
public function doTrackShipment($idvalue);
Procedural Interface
inship_upstrack_do_trackshipment($res, $idvalue);
Remarks
The idValue parameter identifies the shipment. This identifier can be of IdentifierType type. Some identifiers apply to a single package (such as package tracking number, package reference etc.), while others apply to multiple packages or shipments (such as master tracking number, shipment reference, etc.) which they are part of. The idValue must be alphanumeric.
The following properties can be sent in the request:
- UPSServer (required)
- UPSAccessKey (required)
- UPSPassword (required)
- UPSUserId (required)
- UPSAccountNumber (required)
- IdentifierType (required)
- ShipDateStart (optional)
- ShipDateEnd (optional)
- ShipperAccountNumber (optional)
- RecipientCountryCode (optional)
- RecipientZipCode (optional)
If UPS system does not locate any data for the requested idValue, an error message will be returned. The full server reply will be saved to RawResponse.
Upon successful response, the server will return tracking events for each package included in the shipment, and other values tied to that package. For example, if a shipment contained four packages, the query response would show all four packages.
The following properties may be populated upon method return:
- ServiceTypeDescription
- ShipDate
- ScheduledDeliveryDate
- ScheduledDeliveryTime
- MasterTrackingNumber
- ShipmentReference
- SenderAddress
- RecipientAddress
- ShipperAccountNumber
- Shipment weight information (TotalWeight, WeightUnit);
- Package(s) detailed information (PackageReferences, PackageTrackingNumber, PackageMessage, PackageWeight, PackageRescheduledDeliveryTime, PackageRescheduledDeliveryDate, PackageReturnAddress1, PackageReturnAddress2, PackageReturnCity, PackageReturnState, PackageReturnCountryCode, PackageReturnZipCode)
- Tracking details for each tracking event. Tracking details for each tracking event, which can be inspected via TrackEvents collection. This information consists of: TrackEventLocation, TrackEventAddress1, TrackEventAddress2, TrackEventCity, TrackEventState, TrackEventCountryCode, TrackEventZipCode, TrackEventDate, TrackEventTime, and TrackEventStatus. These are tied to each package included in the shipment for each PackageIndex from 0 to PackageCount - 1.
If there is a problem with a specific idValue within the request, the response will raise an error that pertains to the specific idValue.
For more details on errors codes and descriptions, please refer to the Error Messages section.