1. How to be a member of Avnet API Portal?

  1. Click the SIGN UP on the top right of the page to go to the Sign up page

  2. Provide the necessary information into the Sign Up form

  3. Type into the captcha and click SIGN UP button to sign up to Avnet API Portal

  4. Please contact your Avnet Sales representative if you need further assistance

How To Guide:

2. How to consume an API on Avnet API Portal

Here are the general steps to consume an API on Avnet API Portal

  1. SIGN UP on Avnet API Portal

  2. BROWSE APIs and find out the API Product you are interested in

  3. Find out the API you are interested in from the API list in the API Product

  4. Download the API Definition on the API detail page and build your client code. Please refer to session 3. How to download API definitions.

  5. Submit the Subscription request on the API Product page.

  6. You will receive the email notification "Your subscription request for Avnet <API Product> activated" once your subscription request was approved

  7. Logon to Avnet API Portal and go to the Profile page and get the Subscription Key. Please refer to session 4. How to get the Subscription Key

  8. Create a Client Secret if you have no it yet. Please refer to the session 6. How to create Client Secret

  9. Create a program to get an Access Token, please refer to the session 7. How to get Access Token

  10. Make the API calls from your programs using the Subscription Key( 5.How to pass Subscription Key in the request) and Access Token(8. How to pass Access Token in the request)

3. How to download API definitions

  1. Logon on to Avnet API Portal and go to API detail page

  2. Select the standard and format you need from the dropdown list and the download process will be kicked off automatically

  3. Then you can import the API definition into your client tools or built your clients from the definition

4. How to get the Subscription Key

  1. In the API Product page, type into the Subscription name and click SUBSCRIBE to submit the subscription key request.

  2. The Subscription key will be in "Submitted" state after the request submitted.

  3. Avnet API owner will review your request and approve/reject the request

  4. You will receive an email notification when your request was approved/rejected

  5. Once your subscription request was approved, Logon to Avnet API Portal and go to the Profile page, click the "Show" to get the Subscription Key

5.How to pass Subscription Key in the request

The Subscription Key is mandatory when call the Avnet APIs. Avnet API supports the following options to pass the Subscription Keys:

  1. Pass the Subscription Key using the HTTP Header field Ocp-Apim-Subscription-Key

    Ocp-Apim-Subscription-Key: <Subscription Key Value>

  2. If your application doesn't support customized HTTP Header field, then you can pass the Subscription Key using the HTTP query parameter subscription-key

    @subscription-key=<Subscription Key Value>

6. How to create Client Secret

Client Secret is required when get the Access Token. Here are the steps for creating the Client Secret

  1. After you received the email notification "Your subscription request for Avnet <API Product> activated"

  2. Logon to Avnet API Portal and go to the Profile page

  3. Click the Button "Create New Secret" to create the client secret.

Notes:

  1. Client secret values cannot be viewed, except for immediately after creation. Be sure to save the secret when created before leaving the page

  2. You can create 2 client secret values at most, so please remove the expired one or an old one when you need to create a new one.

  3. Please not share your client secrets to any others

Picture

7. How to get Access Token

oAuth 2 authorization is required for Avnet partners when call the Avnet APIs. Here are the steps for getting the Authorization details and Access token:

  1. Submit the Subscription request on the API Product page

  2. You will receive the email notification "Your subscription request for Avnet <API Product> activated" once your subscription request approved

  3. Logon to Avnet API Portal and go to the Profile page and get the Subscription Key and Authorization details following the instructions

  4. Get an Access Token by making a call to the Token URL with the following mandatory fields:

    • grant_type:        client_credentials

    • token_url:        https://apigw.avnet.com/external/getToken/oauth2/v2.0/token

    • client_id:         Please see the Client ID from the Authorization Details on the Profile page

    • client_secret:    Please see the Secret Value from the Authorization Details on the Profile page. The secret value can only

      be viewed just after the creation, so please be sure to save it when created before leaving the page.

    • scope:         Please see the Scope value from the Authorization Details on the Profile page.

  5. The access token will be returned, then you can make the following APIs calls with this access tokent.

8. How to pass Access Token in the request

Avnet APIs use the "Bearer" OAuth Access Token. The bearer token is passed through the HTTP header field Authorization.

Authorization: Bearer <tokenValue>

9. How to renew Subscription Key

The Subscription Key will need to be renewed every 6 months per the Avnet security policy. Here are the steps for the renewal.

  1. Logon to Avnet API Portal and go to the Profile page

  2. Got the Subscriptions session

  3. Click Show to to show the Primary key / Secondary key

  4. Click Regenerate to generate a new Primary key / Secondary key, then you will see a new key value generated

Notes:

  1. Avnet API Portal provides a Primary key and Secondary key pair for each subscription, and either one will work to call the APIs.

  2. The old Primary key or Secondary key will be expired immediately after a new corresponding key regenerated. That means, after you regenerated the Primary key, the old Primary key will be expired immediately, but the Secondary key is still available. And the same goes for the Secondary key.

  3. With the Primary key and Secondary key pair, the recommended renewal flow will be:

    1. Use the Primary key to call the APIs in your system under the normal conditions.

    2. Before the Primary key expired, update your system to use the Secondary key and then Regenerate the Primary key

    3. Update your system to use the new Primary key before the Secondary key expired

    4. Regenerate the Secondary key

  4. Please well plan the switching between the Primary key and Secondary key to avoid impact to your system during the renewal

10. How to renew Client Secret

The Client Secret Key will need to be renewed every 6 months per the Avnet security policy. Here are the steps for the renewal.

  1. Logon to Avnet API Portal and go to the Profile page

  2. Got the Authorization details session

  3. Click the button "Create New Secret" to create a new secret

  4. Configure the new secret value to your system

  5. Remove the old secret value

Notes:

  1. Avnet API Portal allows up to 2 secret values to support the secret renewal

  2. Client secret values cannot be viewed, except for immediately after creation. Be sure to save the secret when created before leaving the page

  3. You can create a new secret value and apply it to your system if the old one was forgotten, and please remove the old one once all your systems are configured using the new secret value.

  4. Please not share your client secrets to any others

  5. Please well plan the switching between the old secret and new secret to avoid impact to your system during the renewal