Reputation: 89
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?
Upvotes: 7
Views: 24935
Reputation: 1428
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.
Test Server Mock Tracking Numbers
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.
Upvotes: 4
Reputation: 303
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
Upvotes: 3
Reputation: 656
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!
Upvotes: 3