{"id":36989620,"url":"https://github.com/a-ast/akeneo-data-loader","last_synced_at":"2026-01-13T23:30:44.044Z","repository":{"id":48061384,"uuid":"188113249","full_name":"a-ast/akeneo-data-loader","owner":"a-ast","description":"Akeneo Data Loader","archived":false,"fork":false,"pushed_at":"2021-08-09T11:33:39.000Z","size":112,"stargazers_count":3,"open_issues_count":2,"forks_count":2,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-03-07T06:34:42.817Z","etag":null,"topics":["akeneo","akeneo-pim","data-im","pim"],"latest_commit_sha":null,"homepage":null,"language":"PHP","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/a-ast.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2019-05-22T21:02:13.000Z","updated_at":"2024-05-21T17:52:20.000Z","dependencies_parsed_at":"2022-08-12T17:40:59.241Z","dependency_job_id":null,"html_url":"https://github.com/a-ast/akeneo-data-loader","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/a-ast/akeneo-data-loader","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/a-ast%2Fakeneo-data-loader","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/a-ast%2Fakeneo-data-loader/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/a-ast%2Fakeneo-data-loader/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/a-ast%2Fakeneo-data-loader/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/a-ast","download_url":"https://codeload.github.com/a-ast/akeneo-data-loader/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/a-ast%2Fakeneo-data-loader/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":28405132,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-01-13T21:51:37.118Z","status":"ssl_error","status_checked_at":"2026-01-13T21:45:14.585Z","response_time":56,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.5:443 state=error: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["akeneo","akeneo-pim","data-im","pim"],"created_at":"2026-01-13T23:30:43.510Z","updated_at":"2026-01-13T23:30:44.040Z","avatar_url":"https://github.com/a-ast.png","language":"PHP","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Akeneo Data Loader\n\n[![Build Status](https://travis-ci.org/a-ast/akeneo-data-loader.svg?branch=master)](https://travis-ci.org/a-ast/akeneo-data-loader)\n\nAkeneo Data Loader helps you to load data to your Akeneo PIM via its REST API. \n\n\n## Use cases\n\n* Load YAML fixtures for testing, local development or for performance benchmarking.\n* Import product data from external systems (legacy PIM or regular data providers). \n\n## Features\n\n* Support for bulk data upload (upsert mode).\n* Simplified import of media files.\n\n### Examples\n\n#### Load from an array\n\n```php\nuse Aa\\AkeneoDataLoader\\Api;\nuse Aa\\AkeneoDataLoader\\LoaderFactory;\n\n$factory = new LoaderFactory();\n\n$apiCredentials = Api\\Credentials::create('https://your.akeneo.host/', 'clientId', 'secret', 'username', 'password');\n\n$loader = $factory-\u003ecreateByCredentials($apiCredentials);\n\n$loader-\u003eload('product', [\n    [\n        'identifier' =\u003e 'test-product',\n        'enabled'    =\u003e true,\n        'family'     =\u003e 'accessories',\n        'categories' =\u003e [\n            'master_accessories',\n            'print_accessories',\n            'suppliers',\n        ],\n        'values' =\u003e [\n            'ean'    =\u003e [[ 'locale' =\u003e  null, 'scope' =\u003e  null, 'data' =\u003e '1234567890183' ]],\n            'name'   =\u003e [[ 'locale' =\u003e  null, 'scope' =\u003e  null, 'data' =\u003e 'Test product' ]],\n            'image'  =\u003e [[ 'locale' =\u003e  null, 'scope' =\u003e  null, 'data' =\u003e '@file:asset/1111111171.jpg' ]],\n            'weight' =\u003e [[ 'locale' =\u003e  null, 'scope' =\u003e  null, 'data' =\u003e [ 'amount' =\u003e  '500.0000', 'unit' =\u003e 'GRAM' ] ]],\n        ],\n    ],\n]);\n```\n* Check [how to load media files](#LoadMediaFiles) if you wonder what does `@file:` mean.\n\n#### Load from a YAML file\n\n```php\nuse Aa\\AkeneoDataLoader\\Api;\nuse Aa\\AkeneoDataLoader\\LoaderFactory;\nuse Symfony\\Component\\Yaml\\Yaml;\n\n$factory = new LoaderFactory();\n$apiCredentials = Api\\Credentials::create('https://your.akeneo.host/', 'clientId', 'secret', 'username', 'password');\n$loader = $factory-\u003ecreateByCredentials($apiCredentials);\n\n$productData = Yaml::parse(file_get_contents('data/product.yaml'));\n\n$loader-\u003eload('product', $productData);\n```\n* [Examples of YAML files](doc/yaml-format.md)\n\n\n## How to load data using data loader\n\nAs you can see, to load data you need to know:\n\n1. Your Akeneo host and API credentials\n2. Data type\n3. Data format \n\n### 1. Akeneo host and API credentials\n\nI hope you know your Akeneo host, so use it by creating a `Credentials` object.\n\nBesides this, you need to know the name and password of the user that you going to use for connecting via API.\n\nLast, but not the least, you need the client ID and secret of an API connection.  \nYou can create a connection in you Akeneo in the `System \u003e API connection` section or \nuse the console command to generate it:\n\n```\nbin/console pim:oauth-server:create-client Import\n```  \n\n### 2. Data type\n\nData loader supports the following data types:\n\n* channel\n* category\n* attribute-group\n* attribute\n* attribute-option\n* family\n* family-variant\n* product-model\n* product\n\nand also these Enterprise Edition data types:\n\n* asset\n* asset-variation-file\n* asset-reference-file\n* reference-entity\n* reference-entity-record\n\n### 3. Data format \n\nThe data format is a [format of Akeneo REST API](https://api.akeneo.com/documentation/resources.html).\n\nCheck also [Examples of YAML files](doc/yaml-format.md) that represent the data format. \n\n## \u003ca id=\"LoadMediaFiles\"\u003e\u003c/a\u003eHow to load media files\n\nYou can simply upload a file and assign it as a value of image or file attributes.\n\n```php\n$loader-\u003eload('product', [\n    'values' =\u003e [\n        'image'  =\u003e [\n            [ \n                'locale' =\u003e 'en_US', \n                'scope'  =\u003e 'ecommerce', \n                'data'   =\u003e '@file:relative/path/to/your/asset.jpg' \n            ],\n        ],\n    ],\n]);\n\n```\n\nThe prefix `@file:` tells Akeneo Data Loader to read this media file `relative/path/to/your/asset.jpg` \nand assign it as the value of the attribute `image`.\n\nYou can specify the base directory path for media files using configuration of LoaderFactory:  \n\n```php\nuse Aa\\AkeneoDataLoader\\LoaderFactory;\nuse Aa\\AkeneoDataLoader\\Connector\\Configuration;\n\n$configuration = Configurationcreate('assets/baseDir/path');\n$factory = new LoaderFactory($configuration);\n```\n\n## How to query and modify data\n\nYou can use Data loader to modify data fetched using Akeneo API.\n\n```php\nuse Aa\\AkeneoDataLoader\\Api;\nuse Aa\\AkeneoDataLoader\\LoaderFactory;\nuse Akeneo\\Pim\\ApiClient\\AkeneoPimClientBuilder;\nuse Akeneo\\Pim\\ApiClient\\Search\\SearchBuilder;\n\n// Fetch data using Akeneo UPI\n\n$clientBuilder = new AkeneoPimClientBuilder('https://your.akeneo.host/');\n$client = $clientBuilder-\u003ebuildAuthenticatedByPassword('clientId', 'secret', 'admin', 'admin');\n\n$searchBuilder = new SearchBuilder();\n$searchBuilder-\u003eaddFilter('price', 'EMPTY');\n$searchFilters = $searchBuilder-\u003egetFilters();\n\n$products = $client-\u003egetProductApi()-\u003eall(100, ['search' =\u003e $searchFilters]);\n\n// Send modified data back\n\n$factory = new LoaderFactory();\n\n$apiCredentials = Api\\Credentials::create(\n    'https://your.akeneo.host/',\n    'clientId', 'secret', 'admin', 'admin');\n\n$loader = $factory-\u003ecreateByCredentials($apiCredentials);\n\nforeach ($products as $product) {\n    $product['enabled'] = false;\n    $loader-\u003eload('product', [$product]);\n}\n``` \n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fa-ast%2Fakeneo-data-loader","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fa-ast%2Fakeneo-data-loader","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fa-ast%2Fakeneo-data-loader/lists"}