Postman Collection

Requests ready to be used in one of the more common formats: Postman

As of 26. July 2024, there have been changes in the use of the environments. Please import the environments as specified in this documentation AND the updated fulfillmenttools API collection.

During development of fulfillmenttools as an API-First product the design, documentation and testing of the APIs are taking a high priority. Therefore, a wholesome Postman collection is in use and frequently updated with new requests as they appear in the API.

This page shares this resource to developers or other technical personnel in order to ease the access to the fulfillmenttools RESTful API and share concrete examples.

Available resources

Postman divides its functionality into several categories such as collections, environments, mock servers, etc... For documentation purpose fulfillmenttools provides a template environment and the collection of calls towards fulfillmenttools RESTful API. In order to work with the collection you need to import the environment into Postman and fill in the data as described below.

Step 1: Import or create fulfillmenttools environments in Postman

The environments contain variables that tell Postman where to address certain calls and which data should be used. If you want to try out an existing fulfillmenttools system using our Postman collection it is recommended to import and setup environments.

In case you just want to get a glimpse at the calls you don't necessarily need to set up an environment.

Two environments are necessary to work with Postman, one global and one tenant specific. To create the global one, download our Globals environment template and import it into Postman. See Postman documentation here how to import an environment into Postman.

The same step must be done with the tenant specific environment, an example file is available for download (don't forget to replace the ocff-example-prd with the correct projectId).

Theoretically projectId and host can be added to one environment. However, if additional tenant environments are added, the split can help.

The tenant specific environment has to contain the projectId:

VariableDescriptionExample Value

projectId

The id of the used project.

ocff-example-prd

The global environment must contain the host value:

VariableDescriptionExample Value

host

The Host of your fulfillmenttools platform environment

https://{{projectId}}.api.fulfillmenttools.com/ ------ {{projectId}} is right here, leave it like it is.

When using Postman more variables will occur in the environment. Be advised, that especially authTokens & refreshTokens will be stored in the environment of the Postman Instance you are using.

Step 2: Import fulfillmenttools API collection into Postman

Similar to setting up an environment you can import the collection of Requests into Postman. Please use this link to download the needed file and import it into Postman as described here.

fulfillmenttools API and thus the collection of calls is constantly growing. Therefore, it is a good idea to update your collection of calls sometimes to stay up to date with the latest changes.

Once you successfully imported the collection you are presented with a view similar to this:

Step 3: Define authentication Postman Vault values

To prevent the sync from sensitive data into the Postman Cloud, we use the Postman Vault. This is a local encrypted storage that is not synced to Postman. Accessible is Postman Vault in the Postman IDE in the bottom right corner with the Vault-Button.

Now three following variables has to be set. Replace {projectId} with the real project id in the shape of ocff-example-prd, so that the variables look like e.g. ocff-example-prd-user.

VariableDescriptionExample Value

{projectId}-user

The user that exists in the system, usually in the form of an email. Please include the host part of the login.

user@ocff-example-prd.com

{projectId}-password

The password of the user.

{projectId}-api-key

The api key to our IdentityProvider to generate a AuthToken

AIZaSyCvIDK187vJWfl5EICJ_g_bNyvdARhdeXw

Sometimes Postman get in trouble if the password contains quotation marks or a backslash. In this case add a backslash to escape the character.

Example: My"Nice\Password -> My\"Nice\\Password

Step 4: Make your first API Call using Postman

The documentation on how to Make your first API Call says we need to issue at least two calls in order to communicate with the API: First, we need to get an Auth Token and then use this Auth Token in our call towards the fulfillmenttools API. Let's do exactly this using Postman:

After the call has successfully been executed the response is received from the IdentityProvider containing (among other data) the actual authToken and a refreshToken which are used for calls against the fulfillmenttools API.

Both values are stored as environment variables - you do not need to copy those!

Now we can execute every call in the collection - in this example we will request the list of facilities:

Have fun!

Now you are good to go to adapt and execute the other calls or create new requests.

Last updated