Skip to content

Commit b352101

Browse files
authored
chore: implement track by carrier and number docs (#31)
* void label docs * track by label id * track by carrier code and tracking number
1 parent 54b1cd6 commit b352101

1 file changed

Lines changed: 57 additions & 0 deletions

File tree

Lines changed: 57 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,57 @@
1+
Track Using Carrier Code and Tracking Number
2+
======================================
3+
[ShipEngine](www.shipengine.com) allows you to track a package for a given carrier and tracking number. Please see [our docs](https://www.shipengine.com/docs/tracking/) to learn more about tracking shipments.
4+
5+
Input Parameters
6+
-------------------------------------
7+
8+
The `trackUsingCarrierCodeAndTrackingNumber` method requires the carrier code and tracking number of the shipment being tracked.
9+
10+
Output
11+
--------------------------------
12+
The `trackUsingCarrierCodeAndTrackingNumber` method returns tracking information associated with the shipment for the carrier code and tracking number.
13+
14+
Example
15+
==============================
16+
```php
17+
use ShipEngine\ShipEngine;
18+
use ShipEngine\Message\ShipEngineException;
19+
20+
function trackUsingCarrierCodeAndTrackingNumberDemoFunction() {
21+
$client = new ShipEngine('API-Key');
22+
try {
23+
print_r($client->trackUsingCarrierCodeAndTrackingNumber('stamps_com', '9405511899223197428490'));
24+
} catch (ShipEngineException $e) {
25+
print_r($e -> getMessage());
26+
}
27+
}
28+
29+
trackUsingCarrierCodeAndTrackingNumberDemoFunction();
30+
```
31+
32+
Example Output
33+
-----------------------------------------------------
34+
35+
### Tracking Result
36+
```php
37+
Array
38+
(
39+
[tracking_number] => 9405511899223197428490
40+
[tracking_url] => https://tools.usps.com/go/TrackConfirmAction.action?tLabels=9405511899223197428490
41+
[status_code] => NY
42+
[carrier_code] => stamps_com
43+
[carrier_id] => 1
44+
[carrier_detail_code] =>
45+
[status_description] => Not Yet In System
46+
[carrier_status_code] => -2147219283
47+
[carrier_status_description] => A status update is not yet available for this tracking number. More information will become available when USPS receives the tracking information, or when the package is received by USPS.
48+
[ship_date] =>
49+
[estimated_delivery_date] =>
50+
[actual_delivery_date] =>
51+
[exception_description] =>
52+
[events] => Array
53+
(
54+
)
55+
56+
)
57+
```

0 commit comments

Comments
 (0)