0% found this document useful (0 votes)
58 views13 pages

FAME - FedEx Developer Portal

Uploaded by

coinget06
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
58 views13 pages

FAME - FedEx Developer Portal

Uploaded by

coinget06
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 13

FEDEX DEVELOPER PORTAL

Register within the FedEx Developer Portal

1. Navigate to the FedEx Developer Portal https://developer.fedex.com/api/en-us/home.html


(Chrome is recommended)

2. Scroll down and select Sign Up or Log In

3. Select

4. Complete your personal information on the next screen and select

5. Enter user ID inf ormation and select

Create an Organization

1 Select (If you do not see ‘Create an Organization’, select My

Projects)

2 Enter an organization name


3 You may enter email addresses to invite users. This may also be done from the Manage

Organization screen

4 Select

Create a Project
1. Click on My Projects and then click on + Create a Project

2. Assign a name to your project. Select Next to continue

3. Select the applicable APIs. Any APIs not selected will not function with the project.

4. Read and accept the terms and conditions; then click I Accept

5. Conf igure your project: From the drop-down select United States, which will give you a global
test key. You do not need to specify each country you are shipping to

a. If a test account is needed for SmartPost or Freight LTL, select the corresponding Yes
radio button

6. Notif ications: Select notification preference and click to agree to terms of use

7. Click Create
POSTMAN

Install Postman
 You may need admin rights to install, so please request them if your system
NOTE requires. Postman is approved for CTCs to use; however, it is not approved
f or CTCs to create logins or share workspaces. DO NOT create a login or
account when starting the software.
1. Download the appropriate version from https://www.getpostman.com/downloads/ and run the
installer

2. When you start the application, it will ask you to create an account or sign in. DO NOT create an
account. Click the small gray link at the bottom, Skip and go to the app
Create an Environment
An environment allows you to store variables. You will create an environment, rename that
environment, add variables, and give values to the variables. Finally, set your environment to active.

1. Select File→New; then select

2. By def ault, your environment is called New Environment and is highlighted when first
created. To rename hover over the name and click the edit pencil. See # 2
3. Add a new variable in the variable column. See # 3
4. Enter a value in the current value column. See # 4
 Entering a value in the Initial Value column is only needed when sharing the environment as
NOTE part of a collection.

3 4

In the below example the environment is renamed to Testing and the variables Key, Secret, url, and
account have been added. Add these variables by typing in the Add a new variable location.

 The values f or the variables are found at the FedEx Developer Portal. You will need to
NOTE log in, go to “My Projects” and select the project for the values you need. On the Test
Key tab of Project Overview, you will find the values for the variables we have created.

5. Navigate to Project Overview of the FedEx Developer Portal


API Key will be the value for Key (see#1)
Secret Key will be the value for Secret (see#2) Note: Click the eye to see the value
Shipping Account is the test account number for account (see#3)
The URL next to Test URL will be the value for url (see#4)

1 2 3

Copy the data from the portal and paste into Postman for each of the variables

When you have completed adding your variables save the environment by clicking Save (5) near
the top right of the application. You also need to set the environment to active by selecting it in the drop-
down menu (6). Use the image below as an example.

Now that your environment is built, you will need to create a collection to store your API requests
Create a Collection and Add a New Request

A collection is a f older to organize your API requests. You can create multiple collections and
organize your requests as desired. To create a new collection, click File → New or click the New button.

1. Click New and select

2. By default, your collection is called New Collection and is highlighted when first created. To
rename hover over the name and click the edit pencil. In this document the Collection is names
Testing.

3. Add a request to the collection by either right-clicking on the name of the collection in the
navigation frame or hovering over the name of the collection. You can also click the ellipsis and
select Add Request. In this document we add three requests OAuth, Track, Ship. Add these to
f ollow along.

4. Rename your new request by hovering over New Request and clicking the edit pencil

5. To build your request you will need


a. Method
b. URL and endpoint
c. Headers
d. Body
 These items are f ound on the FedEx Developer Portal → API Catalog and in the
NOTE documentation for each specific endpoint. The f irst request is an API Authorization,
also called Oauth. This request returns a token which is used for the remainder of
any desired requests. For specific examples see the requests included in this guide.

Create API Authorization request

1. Create a new request and name it appropriately. In this example it is called OAuth. To create a
new request, see the “Create a Collection” and “Add a New Request” section of this document.

Note: To build your request you will need


a. Method
b. URL and endpoint
c. Headers
d. Body
These items are f ound on the FedEx Developer Portal. Copy or type the information into Postman
to build your API request

2. Navigate to the API catalog and select Docs for API Authorization

3. Use the navigation menu on the left to select the available endpoint for the API Authorization API
 From the documentation page you will find the data to build your request. Find the
NOTE data listed below in points a through d and then copy or type that data into the
corresponding location within Postman.

a. Method is POST (see #1)


b. URL and endpoint: select the drop-down for the entire URL and endpoint (see #2). If you
have a variable set up for the URL, then only select the endpoint.

The endpoint is /oauth/token

The entire URL is


https://developer.fedex.com/api/en-us/catalog/authorization/v1/oauth/token

 Headers and body are key value pairs, so you will need the name and the
NOTE corresponding value

c. Headers (see #3)


Name is content-type, and the value is application/x-www-form-urlencoded
d. Body (see #4)
Name of grant_type and value of client_credentials
Name of client_id and value of your API key
Name of client_secret value of your secret key

 Your API key and Secret Key are found on the project overview test key tab. You
NOTE can copy the key and place in Postman or use a variable to store your keys. To see
how to create a variable or find you keys, see the “Create an Environment” section
of this guide

1
2
3

4. Copy the data and put into Postman in the corresponding location.
a. Method
i. Click the drop-down and select the method, in this case POST (see #1)

b. URL and endpoint


i. If using a variable enter the variable and then the endpoint; otherwise, enter the
entire URL (see #2)
Entire URL and endpoint

Using a variable and endpoint

c. Headers
i. Click the Headers tab (see #3)
ii. Enter the Key. In this case enter: content-type
iii. Enter the value f or the Key. In this case enter: application/x-www-form-
urlencoded

d. Body
i. Click the Body tab (see #4)
ii. Select x-www-form-urlencoded from the drop-down or radio button
iii. Enter the three required key names and values:
Name grant_type and value of client_credentials
Name client_id and value of your API key
Name client_secret value of your secret key

 The values f or API Key and Secret Key are on the FedEx Developer Portal →
NOTE Project Overview. The below example uses variables. Variables are case-sensitive.
Postman uses {{ }} double curly brackets to identify variables. To see how to create
a variable, see the “Create an Environment” section of this document

5. With Method, URL and endpoint, Header, and Body information entered, you are ready to send
the API Authorization request. Click the blue Send button. Don’t forget to save your request by
clicking the Save button.
 A successful request will return a 200 OK status with data displayed in the response window.
NOTE access_token contains the token that will be used when sending all other API requests. token_type is
what kind of token was received. expires_in is how long the token is usable. In this case the token will
expire in 3599 seconds or just under one hour. When an API request is made and the token ID expired,
a 401 error Not Authorized will be returned with a message “Access token expired”. Developers may
use this response to initiate a new Authorization API request to obtain a new token

The value of the token is everything within the quotes

You might also like