Play around with the API endpoints!

Thanks to Postman, easily make calls to the PIM API.You just have to follow these simple steps and you are ready to go!

But first, what is Postman?

Postman is a free client application that allows making calls to any API very easily. We use it internally at Akeneo. It helps us develop and test our API. If you want more details, do not hesitate to browse their website.

With Postman, you can share your endpoints in collections with whomever you want. And that is what we are sharing with you today: our whole collection of endpoints for you to play with!

Prerequisites

An Akeneo PIM is already installed (v1.7)

This can seem pretty obvious. But yeah! You will need a PIM already installed if you want to make calls with the API.


You already followed the Admin getting started guide

You will need to have the rights to access the API, as well as a generated client id and its secret to authenticate yourself when making calls to the API.


1

Install Postman

Download the Postman application (which is free by the way) from their official website.

If you do not wish to download an application, there is a Chrome extension also available (on the same website).

2

Import the collection and the environment template into Postman

Download the two files below.


In Postman, click the Import button and drop the two files you just downloaded in the pop-in that should look like this.



As a result, you will see a new collection in the Collection tab, on the left side of your screen.



A new environment should also have been created in the dropdown in the top right corner.

3

Set up your environment

Click on the gear wheel in the top right corner, and then select Manage environments.


In the following pop-in select the environment called Akeneo PIM API environment.


Then change the value of the following keys:

  • url with the url where your 1.7 PIM is hosted,
  • clientId with your client id that has been generated for this PIM,
  • secret with the secret corresponding to this client id,
  • username with your PIM username,
  • password with your PIM password.

Do not forget to save your changes by clicking the Update button.

4

Launch the authentication request

In the Akeneo PIM API collection, select the request named Authentication by password.


Then, hit the blue Send button.


In the response area, you should get an answer similar to the one below.

The authentication token only lasts for one hour. This means that after one hour your token will expire. And you will receive an error message that looks like this.
Don't panic! You just have to send the Authentication by password request again and you'll be all good!

5

Play around!

You are all set up! You can now send whatever request you want by selecting it in the collection and launching it.

In this collection the requests have been pre-crafted to work with the demo dataset. So do not hesitate to change the requests according to the dataset loaded in your PIM!

If you have trouble using Postman, do not hesitate to browse their really complete documentation.


Found a typo or a hole in the documentation and feel like contributing?
Join us on Github!