Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 5843483
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 22, 20262026-05-22T12:09:39+00:00 2026-05-22T12:09:39+00:00

Is there any JavaScript API available for tracking Fedex and UPS packages?

  • 0

Is there any JavaScript API available for tracking Fedex and UPS packages?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-22T12:09:39+00:00Added an answer on May 22, 2026 at 12:09 pm

    I googled for something like this but couldn’t find anything. Then I decided to do it server side in ROR.

    Here it is how to get UPS and Fedex xml request and response from their test servers.

    For Fedex:

    track_no = '111111111111'  # This is a test tracking number
    
    # This XML Request body for fedex
    xml_req = 
    
    "<TrackRequest xmlns='http://fedex.com/ws/track/v3'><WebAuthenticationDetail><UserCredential><Key>YOUR_ACC_KEY</Key>
                    <Password>YOUR_ACC_PASSWORD</Password></UserCredential></WebAuthenticationDetail><ClientDetail>
                    <AccountNumber>YOUR_ACC_NUMBER</AccountNumber><MeterNumber>YOUR_ACC_METER_NUMBER</MeterNumber></ClientDetail>
                    <TransactionDetail><CustomerTransactionId>ActiveShipping</CustomerTransactionId></TransactionDetail>
                    <Version><ServiceId>trck</ServiceId><Major>3</Major><Intermediate>0</Intermediate><Minor>0</Minor></Version>
                    <PackageIdentifier><Value>#{track_no}</Value><Type>TRACKING_NUMBER_OR_DOORTAG</Type></PackageIdentifier>
                    <IncludeDetailedScans>1</IncludeDetailedScans></TrackRequest>"
    
    path = "https://gatewaybeta.fedex.com:443/xml"
    
    #this url connects to the test server of fedex
    # for live server url is:"https://gateway.fedex.com:443/xml"
    
    url = URI.parse(path)
    http = Net::HTTP.new(url.host,url.port)
    http.use_ssl = true
    http.verify_mode = OpenSSL::SSL::VERIFY_NONE
    
    response =  http.post(url.path, xml_req)
    response_body = response.body
    res = response_body.gsub(/<(\/)?.*?\:(.*?)>/, '<\1\2>')
    hash = Hash.from_xml(res.to_s)
    

    And that’s it! You will get response in hash variable, I converted xml response in to Hash because we can easily use Hash object at our view to display response data.

    For UPS:

    track_no = '1Z12345E1512345676'  # This is a test tracking number
    
    # This XML Request body for UPS
    xml_req = 
    
    '<?xml version="1.0"?><AccessRequest xml:lang="en-US"><AccessLicenseNumber>YOUR_ACC_LICENCE_NUMBER</AccessLicenseNumber>
                        <UserId>YOUR_ACC_USER_ID</UserId><Password>YOUR_ACC_PASSWORD</Password></AccessRequest>
                        <?xml version="1.0"?><TrackRequest xml:lang="en-US"><Request><TransactionReference>
                        <CustomerContext>QAST Track</CustomerContext><XpciVersion>1.0</XpciVersion></TransactionReference>
                        <RequestAction>Track</RequestAction><RequestOption>activity</RequestOption></Request>
                        <TrackingNumber>#{track_no}</TrackingNumber></TrackRequest>'
    
    path = "https://www.ups.com/ups.app/xml/Track"
    url = URI.parse(path)
    http = Net::HTTP.new(url.host,url.port)
    http.use_ssl = true
    http.verify_mode = OpenSSL::SSL::VERIFY_NONE
    
    response =  http.post(url.path, xml_req)
    response_body = response.body
    hash = Hash.from_xml(response_body.to_s)
    

    This hash variable contains the response of UPS Tracking Request in Hash format.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

The Google Finance API only have Java / Javascript. Is there any ideas on
Is there any native compression (for javascript/css files) available in ASP.NET?
I see that Google Maps Streetview is available in Javascript API . And there
Is there any way to display a Google Map (embedded via the Javascript API)
Just wondering if any know if there is any JavaScript API out there that
Is there any Chess game API , purely written in JavaScript ? No Flash!
I wanna close the browser window (similar to javascript:window.close()). Is there any correpsponding API
Is there any JavaScript method similar to the jQuery delay() or wait() (to delay
is there any javascript library that provides me with a custom event as soon
Is there any javascript algo that i can used to check for a website

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.