Get Started with the APIs

Follow this guide to connect to the portal, create your application, subscribe to APIs, and make your first call.

1. Connect to the API Portal

STEF API portals let you subscribe to STEF APIs through personal consumer applications, or applications shared within a team.

As a STEF employee, you do not need to request an account to access the portals.

Go to the portal you want to use, then, at sign-in, click the Sign in as a STEF employee button.

See the APIM instances guide for the list of available portals and their uses.

To create a consumer application shared with your team, you need to request the creation of a team by raising a JIRA APIM ticket, specifying the team name and the target portal(s).

2. Create an application

To consume an API, you must first have a consumer application. Creating one generates a credential, the identifier of your application when making calls.

  1. Click your profile in the top-right corner of the portal
  2. Click the Applications button
  3. Click the New application button
  4. Enter the name and description of your application
  5. To share this application with your team, check This is a team owned application and select the desired team
  6. Click the Create application button
  7. Note the credential generated at creation

This credential is only shown when the application is created and will not be visible afterward. Be sure to keep it safe.

3. Subscribe to an API

A consumer application can subscribe to one or more APIs depending on its needs.

Use the APIs menu to browse the catalogue of available STEF APIs.

Navigate to the products that interest you to view the technical developer documentation, which presents for each API:

  • The various supported operations
  • The definition of input and output objects
  • Code examples for consuming them

To subscribe to an API:

  1. Open the details of an API
  2. Click Use this API in the top-right corner
  3. Click the Register button for the application you want to subscribe

The subscription will then need to be approved by STEF; contact your STEF IT contact for this.

Since an application can subscribe to several APIs, repeat the subscription process for each API you want to use.

View and manage your subscriptions

To view an application's subscriptions, click your profile in the top-left corner, then Applications, then the name of your application. On the APIs tab, shown automatically, you will find the list of your subscriptions and their status.

You can also request a subscription to other APIs directly from this menu by clicking + API.

4. Consume an API

All STEF API calls pass through the STEF API Gateway to enforce access security rules, protect the backend services of the STEF information system, and collect invocation statistics.

The API Gateways are accessible via the following URLs:

To consume an API and comply with access security rules, add the HTTP header X-STEF-Client-Id to the request, set to the credential of your consumer application.

For each API published on the platform, the technical developer documentation provides code examples for invoking the API Gateway from various languages: Shell, Python, Node.js, JavaScript, Go, Java, C#, and Ruby.

Example invocation

curl -X GET "https://api.stef.com/v1/transport/orders" \
  -H "X-STEF-Client-Id: <YOUR_APPLICATION_SECRET>" \
  -H "Content-Type: application/json"

In addition to the code examples, the technical developer documentation provides forms for invoking the APIs directly from the portal, interactively, using the Try it! button.

Next steps

API Catalogue

Technical Guides

APIM Instances