7

I have a test key, account number and password on FedEx website.

I tried to test the FedEx API, but I don't know where I can go for testing on the website.

I cannot find any menus for testing. I checked my email that I received a notice with Testing URL.

I clicked the URL, and only source code is appeared.

I downloaded some source files on the website as well.

I'm wondering if I need to put the information I got into the source code from website.

Or, is there something I can test? Where can I find it?

Benji Vesterby
  • 574
  • 5
  • 21
J.K
  • 89
  • 1
  • 2
  • 9
  • What exactly are you trying to do? You seem to want to consume their api, but don't know how to use it, or what it is... What languages is your site comprised of? – Benji Vesterby Aug 18 '14 at 20:34
  • I want to test using sample code which is given on the website. I got test key, password, account number, meter number. But, I don't know how to apply for it. – J.K Aug 18 '14 at 21:17
  • In order to gain access to the FedEx API I believe that you have to have a business account through them. Once you have the business account you are able to apply for the test API key through their developer section of their site. Then from there you have to do your testing with the test API key, and then request access to their production API system. At least last time I did anything with the FedEx API that was what was required. – Benji Vesterby Aug 20 '14 at 01:24
  • Does anyone know if you have to pay for using production FedEx Web Services? FedEx APIs (beta)? Maybe indirectly, do you have to pay when you create a FedEx account? Get a production master meter? TY – Steve Dearborn Jun 26 '20 at 18:25

3 Answers3

4

I am going to give an extensive overview of how to setup a test account, because I just attempted this task myself and had quite a bit of trouble. Some of the information I am presenting was included in other answers, but I am trying to organize a complete response with an example.

Here are some reference links that are current as of February 2020.

Developer Guide

Test Server Mock Tracking Numbers

Tracking xsd

1) You must sign up for test credentials. After you login to your account on the fedex site, go to the web services development page (currently https://www.fedex.com/en-us/developer/web-services/process.html#develop). On this page you will see an option for "Get Your Test Key". Follow these instructions. After completing the steps, you will receive a developer test key, password, test account number, and test meter number. My test password was provided via email. For some reason it wasn't on the success/confirmation page with the rest of the information.

2) After completing the registration you are ready to submit a test request. The test url endpoint is https://wsbeta.fedex.com:443/web-services (which was provided in the confirmation email). I prefer to use Postman for testing. If you would also like to use Postman, here's a tutorial on how to make SOAP requests. The complete SOAP text is below. The tracking number was pulled from the Appendix F: Test Server Mock Tracking Numbers document referenced above. If you copy and paste the code below, ensure that you replace your key, password, account number, and meter number with the place holder text.

<SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/" xmlns:SOAP-ENC="http://schemas.xmlsoap.org/soap/encoding/" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns="http://fedex.com/ws/track/v18">
   <SOAP-ENV:Body>
      <TrackRequest>
         <WebAuthenticationDetail>
            <UserCredential>
               <Key>YOUR TEST KEY HERE</Key>
               <Password>YOUR TEST PASSWORD HERE</Password>
            </UserCredential>
         </WebAuthenticationDetail>
         <ClientDetail>
            <AccountNumber>YOUR ACCOUNT NUMBER HERE</AccountNumber>
            <MeterNumber>YOUR METER NUMBER HERE</MeterNumber>
         </ClientDetail>
         <TransactionDetail>
            <CustomerTransactionId>Track By Number_v18</CustomerTransactionId>
            <Localization>
               <LanguageCode>EN</LanguageCode>
            </Localization>
         </TransactionDetail>
         <Version>
            <ServiceId>trck</ServiceId>
            <Major>18</Major>
            <Intermediate>0</Intermediate>
            <Minor>0</Minor>
         </Version>
         <SelectionDetails>
            <PackageIdentifier>
               <Type>TRACKING_NUMBER_OR_DOORTAG</Type>
               <Value>231300687629630</Value>
            </PackageIdentifier>
         </SelectionDetails>
         <ProcessingOptions>INCLUDE_DETAILED_SCANS</ProcessingOptions>
      </TrackRequest>
   </SOAP-ENV:Body>
</SOAP-ENV:Envelope>

The above results in a successful request and response. This is an example of making a tracking request by tracking number. You can also make the request by other methods.

Update: using the API to get shipment information by tracking number works on the test API, but using other methods such as via customer reference or shipper reference do not. As of 3/2/2020 these filters return errors 9040 and 9045. I contacted FedEx support and the person I spoke to verified that the test API is not working for these types of filters, but they do work on the production API. I have verified that this is correct. The production site does allow you to pull information in ways other than the tracking number.

joeshmoe301
  • 1,193
  • 2
  • 11
  • 25
  • I've sent the same xml request to https://wsbeta.fedex.com:443/web-services with my credentials. However I'm getting Authentication Failed and 1000 Error code. Do you have any idea what could be the problem? – aleksa_95 Jul 17 '20 at 02:32
  • @joeshmoe301 - As of 8/7/2020 it has suddenly stopped working on production also. I had it working previously (just as you described), but recently it stopped working on production also (version 18.0.0) – turtlechief Aug 11 '20 at 22:50
  • @aleksa_95 sorry for taking so long to respond. I actually don't use this api anymore, so unfortunately I don't have any suggestions. Hopefully you have been able to figure out the issue by now. – joeshmoe301 Aug 12 '20 at 12:47
  • @turtlechief - I use postman for testing. I don't remember all of the details (because I am not using this api anymore), but I had two requests saved in postman. I ran them this morning and my request to track by reference number returned error code 9040 in the trackdetails, but my request to track by tracking number worked. – joeshmoe301 Aug 12 '20 at 12:50
3

When you get the test credentials (Key, Password, Account Number, and Meter Number) from FedEx, you can only use them through the Test Web Services (there is not a FedEx Test Shipment Website). Some of the operations which you can perform with those credentials are Rate, Ship, and Cancel shipments.

In the developer portal, you can find sample code in different languages (Java, C#, VB.net, etc). Those examples are console applications, so you may need to analyse how a FedEx request is built and do your own implementation in your application. Moreover, if you pay attention to the code, you may notice that the examples don't show how to process the web service responses, so I recommend you to serialize the responses into XML or JSON so you can better visualize where the rates, labels and tracking numbers are stored.

I am attaching a link of a sample SOAP Envelope shipment request which I hope that it helps you to get started. Fedex WSDL C# - Setting the Invoice # value

Best!

Community
  • 1
  • 1
Ozzy Garcia
  • 656
  • 5
  • 8
3

for testing the url is https://wsbeta.fedex.com:443/web-services

and if you want full documentation you should download fedex web services documentation