> ## Documentation Index
> Fetch the complete documentation index at: https://docs.alumio.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Akeneo

> Connect Alumio to Akeneo.

## Extra information

System documentation Akeneo REST API: [https://api.akeneo.com/api-reference.html](https://api.akeneo.com/api-reference.html)
System documentation Akeneo GraphQL: [https://api.akeneo.com/graphql/getting-started.html](https://api.akeneo.com/graphql/getting-started.html)

## Connector package documentation

\[details="Akeneo REST API"]

### 1. Setting up the Akeneo HTTP Client

**1.1 Steps**

1. In the Alumio Dashboard, go to Clients > HTTPS Client. Create a new HTTP Client and select the Akeneo HTTP Client as the prototype of the HTTP Client.
2. Fill in the Base URI, Client ID, Client Secret, Username, Password, and Authentication Method
   Note: We recommend using Body as an Authentication Method.
3. Press “Grant Access to Akeneo”.
4. The Key will show up and you can save the Client for use.

### 2. Subscribing to entities from Akeneo

**2.1 Steps**

1. Go to Connections -> Incoming, create a new incoming configuration and select the Akeneo Subscriber.
2. Select the entity you want to subscribe to from Akeneo.
3. (Optional) Add any request parameters needed to subscribe to the entity.
4. You can also add a transformer to modify the request parameters into something you need.
5. Select the Akeneo HTTP Client to use.
6. You can add a pagination feature to allow Alumio to fetch a paginated entity.

**2.2 General Concept**

We follow Akeneo documentation for building this connector, so you can easily use the connector based on the Akeneo API Reference.

**Entity**

This is the entity you want to subscribe to from Akeneo. Please refer to the entities in Management APIs from the Akeneo API Reference page.

**Request Parameters**

These are the parameters you can provide to get the needed Entity based on the Akeneo API Reference. Please look at the example below on how to fill the Request Parameters field when subscribing the "All Parcels" Entity.

<img src="https://mintcdn.com/alumio/99mrwtB8nAsdGlI9/images/connectors/akeneo-01.png?fit=max&auto=format&n=99mrwtB8nAsdGlI9&q=85&s=2d04c2b6f3429c2e1f2aee40b386d78c" alt="Akeneo connector screenshot 1" width="690" height="469" data-path="images/connectors/akeneo-01.png" />

* The property `path` is the path parameter of the URL. For example, the `{id}`.
* The property `query` is a defined set of parameters attached to the end of a URL.\
  Example: `www.url.com?type=true&start=0`

<img src="https://mintcdn.com/alumio/99mrwtB8nAsdGlI9/images/connectors/akeneo-02.png?fit=max&auto=format&n=99mrwtB8nAsdGlI9&q=85&s=9bcdf074fd59db1c42a2be0313bbf974" alt="Akeneo connector screenshot 2" width="690" height="223" data-path="images/connectors/akeneo-02.png" />

This is why you need to define the code property inside the path property in the Request Parameters field. The properties inside query parameters will be parsed as query parameters. The final URL will be like this `/api/rest/v1/products/123`.

**Input Transformer**

Any transformers set here will be executed after the Request Parameters are loaded. So, you can basically add any transformer to provide and manipulate the request parameters into anything you need, either as path parameters and/or as query parameters of an Entity.

**HTTP Client**

This is the HTTP Client configuration or prototype you will use to access Akeneo.

### 3. Publishing entities to Akeneo

**3.1 Steps**

1. Go to Connections -> Outgoing, create a new outgoing configuration, and select the Akeneo Publisher as the Publisher.
2. Select the action that you want the Publisher to do with the data.
3. Select the Akeneo entity where you want the data to be published.
4. Optionally, you can add any query parameters to the request.
5. You can also add any transformers to modify the data into anything you need before submitting it to Akeneo.
6. Select the HTTP Client to use.

<img src="https://mintcdn.com/alumio/99mrwtB8nAsdGlI9/images/connectors/akeneo-03.png?fit=max&auto=format&n=99mrwtB8nAsdGlI9&q=85&s=28f8e2c31878ec08d1e0734e06d3888e" alt="Akeneo connector screenshot 3" width="690" height="208" data-path="images/connectors/akeneo-03.png" />

**3.2 General Concept**

Like the Subscriber, the Publisher has similar methods on how to use it. The difference is the payload that will be submitted by the publisher originating from the data (from routes, from transformers in outgoing configuration), though you can also add or modify payload using the Request Transformer.

**Action**

Currently, we support Create (HTTP POST method), Update (HTTP PUT method), and Delete (HTTP DELETE method).

**Entity**

We support publishing to most Akeneo endpoints, but not with publishing binary files for now. Please refer to the entities in Management APIs from the Akeneo API Reference page. Based on the documentation, some endpoints may need one or more path parameters.

For example, we want to delete a Product. Please select “Delete” as the action and [“Delete a Product”](https://api.akeneo.com/api-reference.html#delete_products__code_) as the entity of the publisher.

<img src="https://mintcdn.com/alumio/99mrwtB8nAsdGlI9/images/connectors/akeneo-04.png?fit=max&auto=format&n=99mrwtB8nAsdGlI9&q=85&s=561433b99a12fa3a1a04685c4768d37b" alt="Akeneo connector screenshot 4" width="690" height="208" data-path="images/connectors/akeneo-04.png" />

<img src="https://mintcdn.com/alumio/99mrwtB8nAsdGlI9/images/connectors/akeneo-05.png?fit=max&auto=format&n=99mrwtB8nAsdGlI9&q=85&s=aba116f796b1d5307052382e2217cb08" alt="Akeneo connector screenshot 5" width="574" height="343" data-path="images/connectors/akeneo-05.png" />

As you can see, we need to add `code` in the Path, so please make sure we add `code` inside the `path` key in the data. For example:

<img src="https://mintcdn.com/alumio/99mrwtB8nAsdGlI9/images/connectors/akeneo-06.png?fit=max&auto=format&n=99mrwtB8nAsdGlI9&q=85&s=355bd398c4cd6182392d106394fe260e" alt="Akeneo connector screenshot 6" width="251" height="108" data-path="images/connectors/akeneo-06.png" />

Alumio will send an API request to Akeneo with URL `/api/rest/v1/products/123`

Another example is when we want to update several products at once. Please select “Patch” as the Action and ["Update/create Several Products"](https://api.akeneo.com/api-reference.html#patch_products) as the entity of the publisher.

<img src="https://mintcdn.com/alumio/99mrwtB8nAsdGlI9/images/connectors/akeneo-07.png?fit=max&auto=format&n=99mrwtB8nAsdGlI9&q=85&s=2d1c73c9758c34389e61061e891f17d8" alt="Akeneo connector screenshot 7" width="690" height="267" data-path="images/connectors/akeneo-07.png" />

<img src="https://mintcdn.com/alumio/99mrwtB8nAsdGlI9/images/connectors/akeneo-08.png?fit=max&auto=format&n=99mrwtB8nAsdGlI9&q=85&s=012d161d492e724fd0b557ce3de9faf1" alt="Akeneo connector screenshot 8" width="690" height="455" data-path="images/connectors/akeneo-08.png" />

Based on the documentation, we can see that the endpoint requires the product data as the body. In order to achieve this, we should provide the product data in our data in the key `payload` within Alumio.

<img src="https://mintcdn.com/alumio/99mrwtB8nAsdGlI9/images/connectors/akeneo-09.png?fit=max&auto=format&n=99mrwtB8nAsdGlI9&q=85&s=d4f22cb198618c6b6224313b23b86f11" alt="Akeneo connector screenshot 9" width="346" height="506" data-path="images/connectors/akeneo-09.png" />

Akeneo will process the request and return a response (please enable logging in HTTP Client to make this visible).

<img src="https://mintcdn.com/alumio/99mrwtB8nAsdGlI9/images/connectors/akeneo-10.png?fit=max&auto=format&n=99mrwtB8nAsdGlI9&q=85&s=81e079a4aacb2baa174cceb51336f3dc" alt="Akeneo connector screenshot 10" width="690" height="252" data-path="images/connectors/akeneo-10.png" />

You may look that in the documentation, the endpoint requires us to provide [NDJSON](http://ndjson.org/) format to send to Akeneo.

<img src="https://mintcdn.com/alumio/99mrwtB8nAsdGlI9/images/connectors/akeneo-11.png?fit=max&auto=format&n=99mrwtB8nAsdGlI9&q=85&s=441432e49a99b3d8bb3608e441f8e82c" alt="Akeneo connector screenshot 11" width="820" height="179" data-path="images/connectors/akeneo-11.png" />

Rest assured, our Akeneo connector has the capability to automatically change the JSON input to NDJSON format, based on the endpoint's documentation at Akeneo.

<img src="https://mintcdn.com/alumio/99mrwtB8nAsdGlI9/images/connectors/akeneo-12.png?fit=max&auto=format&n=99mrwtB8nAsdGlI9&q=85&s=96ff1f5d1c54266f3c72d475dd9d56bd" alt="Akeneo connector screenshot 12" width="690" height="113" data-path="images/connectors/akeneo-12.png" />

* The property `path` is the path parameter of the URL. For example, the `{id}`.
* The property `query` is a defined set of parameters attached to the end of a URL.\
  Example: `www.url.com?type=true&start=0`
* The property `payload` is the data contained within a request.

**HTTP Client**

This is the HTTP Client configuration or prototype you will use to access Akeneo.
\[/details]

\[details="Akeneo GraphQL"]

**Connector Package Documentation**

# Setting up HTTP Client Akeneo GraphQL

## Steps

* In Alumio Dashboard, go to Clients > HTTP Client. Create a new HTTP Client and select Akeneo GraphQL Client as the prototype of the HTTP Client.
* Fill in the Base URI, X-PIM-URL, Username, Password, X-PIM-Client-ID or Client ID, and Client Secret.
* Save and Continue.

# Subscribing to Entities from Akeneo GraphQL

## Steps

* Go to Connections -> Incoming and create a new incoming configuration and select Akeneo - GraphQL Subscriber as the subscriber.
* Add any Request URI that you need to add from the Base URI from Client.
* Select the HTTP Method you want to subscribe to from Akeneo GraphQL (Recommended POST).
* Add any request data in the request parameter that you needed to subscribe to the entity.
* You can optionally add a transformer to transform the request parameters into something you need.
* Select the Akeneo GraphQL HTTP Client to use.

## General Concept

We follow Akeneo GraphQL documentation on building this connector so you can easily use the connector based on Akeneo GraphQL API Reference.

**Request URI**

It’s the Endpoint you want to subscribe from Akeneo.

**Request Method**

It’s the HTTP Method that you want to use, we recommend using post as default method.

**Request Parameters**

These are the parameters you can provide to get the needed entity based on Akeneo GraphQL API Reference. Please look at the example below on how to fill the Request Parameters field when subscribing productModels.

<img src="https://mintcdn.com/alumio/99mrwtB8nAsdGlI9/images/connectors/akeneo-13.png?fit=max&auto=format&n=99mrwtB8nAsdGlI9&q=85&s=55dbb17da854eba8ad11ecd70fbfd3e7" alt="Akeneo connector screenshot 13" width="667" height="500" data-path="images/connectors/akeneo-13.png" />

**Input Transformer**

Any transformers set here will be executed after the Request Parameters are loaded. So, you basically can add any transformer to provide and transform the request parameters into anything you need either as path parameters and/or as query parameters of an entity.

**HTTP Client**

It’s the HTTP Client configuration or prototype you will use to access Akeneo GraphQL.

# Publishing Entity to Akeneo GraphQL

## Steps

* Go to Connections -> Outgoing, create a new outgoing configuration, and select Akeneo Publisher as the publisher.
* Select the Request URI you want the data to be published.
* Select the Request Method that you want the publisher to do with the data.
* Add any request data in the request parameter that you needed to subscribe to the entity.
* Select the HTTP Client to use.

## General Concept

Like the subscriber, the publisher has similar methods on how to use it.

**Request Parameters**
Please refer to the entities in Management APIs from the Akeneo GraphQL API Reference page.

Please look at the example below. For example, we want to Get Product List

<img src="https://mintcdn.com/alumio/99mrwtB8nAsdGlI9/images/connectors/akeneo-14.png?fit=max&auto=format&n=99mrwtB8nAsdGlI9&q=85&s=0eff7e8ff8ea657f1f6aad128437d41c" alt="Akeneo connector screenshot 14" width="690" height="478" data-path="images/connectors/akeneo-14.png" />

You can put the payload you want to send to Akeneo GraphQL into the Request Parameters .

**HTTP Client**

It’s the HTTP Client configuration or prototype you will use to access Akeneo GraphQL.
\[/details]
