0
votes

I am integrating the Carrier (USPS, UPS, DHL, FeDex) API with my application. For that i need to find different statuses for that shipment like is it delivered or not, which is getting me properly. Similarly, i need to check whether the shipment required the signature or not? How do i came to know this using the different API?

Regards, Salil Gaikwad

2

2 Answers

0
votes

Not all APIs support the same functionality. All will tell you the current status and some will provide the shipper/recipient information but I don't believe any will tell you if it was sent signature required.

0
votes

E.g. for FedEx if you want to know about parcel's tracking events (delivered or not, any problems, delivery time and many other info) use this service endpoint - https://ws.fedex.com:443/web-services/track. The request to FedEx will be look like this (C# sample):

    TrackRequest request = new TrackRequest();
    request.WebAuthenticationDetail = new WebAuthenticationDetail();
    request.WebAuthenticationDetail.UserCredential = new WebAuthenticationCredential()
    {
        Key = "ApiKey",
        Password = "PasswordKey"
    };
    request.ClientDetail = new ClientDetail
    {
        AccountNumber = "...",
        MeterNumber = "..."
    };
    request.TransactionDetail = new TransactionDetail();

    request.PackageIdentifier = new TrackPackageIdentifier();
    request.PackageIdentifier.Value = "parcel tracking number";
    request.PackageIdentifier.Type = TrackIdentifierType.TRACKING_NUMBER_OR_DOORTAG;

    request.IncludeDetailedScans = true;
    request.IncludeDetailedScansSpecified = true;
    request.Version = new VersionId();

When you receive from FedEx - TrackReply, you should check TrackDetails array. There will be tracking info. As for other carriers, the common idea is the same. Almost every carrier use tracking number.