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

# Bulk import articles

> Create many articles from a file or an external system.

Loop over the create endpoint to import a batch of articles, for example from an
export of your previous tool.

```js JavaScript theme={null}
const articles = [
  { articleCode: 'CAM-PEEK-40', name: 'Came PEEK Ø40', unit: 'pce' },
  { articleCode: 'CAM-PEEK-50', name: 'Came PEEK Ø50', unit: 'pce' },
];

for (const article of articles) {
  const res = await fetch(`${process.env.BONX_API_URL}/articles`, {
    method: 'POST',
    headers: { 'x-api-key': process.env.BONX_API_KEY, 'Content-Type': 'application/json' },
    body: JSON.stringify(article),
  });
  if (!res.ok) console.error('Failed for', article.articleCode, await res.text());
}
```

```bash cURL theme={null}
curl -X POST "$BONX_API_URL/articles" \
  -H "x-api-key: $BONX_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{ "articleCode": "CAM-PEEK-40", "name": "Came PEEK Ø40", "unit": "pce" }'
```

> [!TIP]
>
> Process articles in batches and space out requests if your import is large.


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.