PHPackages                             aa/akeneo-data-loader - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [Utility &amp; Helpers](/categories/utility)
4. /
5. aa/akeneo-data-loader

ActiveLibrary[Utility &amp; Helpers](/categories/utility)

aa/akeneo-data-loader
=====================

Akeneo PIM Data Loader

31302[1 PRs](https://github.com/a-ast/akeneo-data-loader/pulls)PHP

Since May 26Pushed 4y ago1 watchersCompare

[ Source](https://github.com/a-ast/akeneo-data-loader)[ Packagist](https://packagist.org/packages/aa/akeneo-data-loader)[ RSS](/packages/aa-akeneo-data-loader/feed)WikiDiscussions master Synced 2mo ago

READMEChangelogDependenciesVersions (7)Used By (0)

Akeneo Data Loader
==================

[](#akeneo-data-loader)

[![Build Status](https://camo.githubusercontent.com/ec0d122d855271f9e50346a907fb8eeb6a59c2fdb0f91d63d47ff1116c19c74b/68747470733a2f2f7472617669732d63692e6f72672f612d6173742f616b656e656f2d646174612d6c6f616465722e7376673f6272616e63683d6d6173746572)](https://travis-ci.org/a-ast/akeneo-data-loader)

Akeneo Data Loader helps you to load data to your Akeneo PIM via its REST API.

Use cases
---------

[](#use-cases)

- Load YAML fixtures for testing, local development or for performance benchmarking.
- Import product data from external systems (legacy PIM or regular data providers).

Features
--------

[](#features)

- Support for bulk data upload (upsert mode).
- Simplified import of media files.

### Examples

[](#examples)

#### Load from an array

[](#load-from-an-array)

```
use Aa\AkeneoDataLoader\Api;
use Aa\AkeneoDataLoader\LoaderFactory;

$factory = new LoaderFactory();

$apiCredentials = Api\Credentials::create('https://your.akeneo.host/', 'clientId', 'secret', 'username', 'password');

$loader = $factory->createByCredentials($apiCredentials);

$loader->load('product', [
    [
        'identifier' => 'test-product',
        'enabled'    => true,
        'family'     => 'accessories',
        'categories' => [
            'master_accessories',
            'print_accessories',
            'suppliers',
        ],
        'values' => [
            'ean'    => [[ 'locale' =>  null, 'scope' =>  null, 'data' => '1234567890183' ]],
            'name'   => [[ 'locale' =>  null, 'scope' =>  null, 'data' => 'Test product' ]],
            'image'  => [[ 'locale' =>  null, 'scope' =>  null, 'data' => '@file:asset/1111111171.jpg' ]],
            'weight' => [[ 'locale' =>  null, 'scope' =>  null, 'data' => [ 'amount' =>  '500.0000', 'unit' => 'GRAM' ] ]],
        ],
    ],
]);
```

- Check [how to load media files](#LoadMediaFiles) if you wonder what does `@file:` mean.

#### Load from a YAML file

[](#load-from-a-yaml-file)

```
use Aa\AkeneoDataLoader\Api;
use Aa\AkeneoDataLoader\LoaderFactory;
use Symfony\Component\Yaml\Yaml;

$factory = new LoaderFactory();
$apiCredentials = Api\Credentials::create('https://your.akeneo.host/', 'clientId', 'secret', 'username', 'password');
$loader = $factory->createByCredentials($apiCredentials);

$productData = Yaml::parse(file_get_contents('data/product.yaml'));

$loader->load('product', $productData);
```

- [Examples of YAML files](doc/yaml-format.md)

How to load data using data loader
----------------------------------

[](#how-to-load-data-using-data-loader)

As you can see, to load data you need to know:

1. Your Akeneo host and API credentials
2. Data type
3. Data format

### 1. Akeneo host and API credentials

[](#1-akeneo-host-and-api-credentials)

I hope you know your Akeneo host, so use it by creating a `Credentials` object.

Besides this, you need to know the name and password of the user that you going to use for connecting via API.

Last, but not the least, you need the client ID and secret of an API connection.
You can create a connection in you Akeneo in the `System > API connection` section or use the console command to generate it:

```
bin/console pim:oauth-server:create-client Import

```

### 2. Data type

[](#2-data-type)

Data loader supports the following data types:

- channel
- category
- attribute-group
- attribute
- attribute-option
- family
- family-variant
- product-model
- product

and also these Enterprise Edition data types:

- asset
- asset-variation-file
- asset-reference-file
- reference-entity
- reference-entity-record

### 3. Data format

[](#3-data-format)

The data format is a [format of Akeneo REST API](https://api.akeneo.com/documentation/resources.html).

Check also [Examples of YAML files](doc/yaml-format.md) that represent the data format.

How to load media files
---------------------------------------------------------------

[](#how-to-load-media-files)

You can simply upload a file and assign it as a value of image or file attributes.

```
$loader->load('product', [
    'values' => [
        'image'  => [
            [
                'locale' => 'en_US',
                'scope'  => 'ecommerce',
                'data'   => '@file:relative/path/to/your/asset.jpg'
            ],
        ],
    ],
]);
```

The prefix `@file:` tells Akeneo Data Loader to read this media file `relative/path/to/your/asset.jpg`and assign it as the value of the attribute `image`.

You can specify the base directory path for media files using configuration of LoaderFactory:

```
use Aa\AkeneoDataLoader\LoaderFactory;
use Aa\AkeneoDataLoader\Connector\Configuration;

$configuration = Configurationcreate('assets/baseDir/path');
$factory = new LoaderFactory($configuration);
```

How to query and modify data
----------------------------

[](#how-to-query-and-modify-data)

You can use Data loader to modify data fetched using Akeneo API.

```
use Aa\AkeneoDataLoader\Api;
use Aa\AkeneoDataLoader\LoaderFactory;
use Akeneo\Pim\ApiClient\AkeneoPimClientBuilder;
use Akeneo\Pim\ApiClient\Search\SearchBuilder;

// Fetch data using Akeneo UPI

$clientBuilder = new AkeneoPimClientBuilder('https://your.akeneo.host/');
$client = $clientBuilder->buildAuthenticatedByPassword('clientId', 'secret', 'admin', 'admin');

$searchBuilder = new SearchBuilder();
$searchBuilder->addFilter('price', 'EMPTY');
$searchFilters = $searchBuilder->getFilters();

$products = $client->getProductApi()->all(100, ['search' => $searchFilters]);

// Send modified data back

$factory = new LoaderFactory();

$apiCredentials = Api\Credentials::create(
    'https://your.akeneo.host/',
    'clientId', 'secret', 'admin', 'admin');

$loader = $factory->createByCredentials($apiCredentials);

foreach ($products as $product) {
    $product['enabled'] = false;
    $loader->load('product', [$product]);
}
```

###  Health Score

24

—

LowBetter than 32% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity15

Limited adoption so far

Community11

Small or concentrated contributor base

Maturity43

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 99.2% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

### Community

Maintainers

![](https://www.gravatar.com/avatar/0838477bd5a8b5ea070b5779c0595de0c34860cb3d77599ff8274138f145f060?d=identicon)[AAstakhov](/maintainers/AAstakhov)

---

Top Contributors

[![a-ast](https://avatars.githubusercontent.com/u/6177375?v=4)](https://github.com/a-ast "a-ast (128 commits)")[![ab-kily](https://avatars.githubusercontent.com/u/9202344?v=4)](https://github.com/ab-kily "ab-kily (1 commits)")

---

Tags

akeneoakeneo-pimdata-impim

### Embed Badge

![Health badge](/badges/aa-akeneo-data-loader/health.svg)

```
[![Health](https://phpackages.com/badges/aa-akeneo-data-loader/health.svg)](https://phpackages.com/packages/aa-akeneo-data-loader)
```

###  Alternatives

[magepal/magento2-customeraccountlinksmanager

Customer Account Links Manager for Magento2 allows you to quickly and easily remove unwanted links from customer account dashboard

4084.9k](/packages/magepal-magento2-customeraccountlinksmanager)[nystudio107/craft3-multi-environment

Efficient and flexible multi-environment config for Craft 3 CMS

7218.3k4](/packages/nystudio107-craft3-multi-environment)[bazo/geotools

Geo Tools for PHP 5.4

1373.5k](/packages/bazo-geotools)[tomatophp/filament-helpers

Helper Class Generator to manage your forms and table inside your filament app

127.9k](/packages/tomatophp-filament-helpers)[trilobit-gmbh/contao-headerfootercode-bundle

Contao 4 / Contao 5 header- and footer code bundle

105.5k](/packages/trilobit-gmbh-contao-headerfootercode-bundle)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
