# shopware-api-client

> node client for shopware api

Latest version **1.6.0** (published 2018-11-18) · MIT license · 0 weekly downloads

## Install

```sh
npm install shopware-api-client
pnpm add shopware-api-client
yarn add shopware-api-client
bun add shopware-api-client
```

## Health

**Score 15/100 (F)** — status: abandoned.

Positive: no vulnerabilities.

Warnings: low downloads; no types; no esm support.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 1.6.0 |
| Published | 2018-11-18 |
| First published | 2017-02-18 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Node | >=6.9.0 |
| Dependencies | 2 |
| Unpacked size | 75.1 KB |
| Known vulnerabilities | 0 (+1 in 1 direct dependencies) |
| Install scripts | no |
| GitHub stars | 32 |
| Author | Jakub Juszczak |
| Maintainers | apertureless |
| Keywords | es6, shopware, api, client, rest, async |

## Links

- npm: https://www.npmjs.com/package/shopware-api-client
- Repository: https://github.com/apertureless/shopware-api-client
- Homepage: https://github.com/apertureless/shopware-api-client#readme
- Issues: https://github.com/apertureless/shopware-api-client/issues
- npm.io page: https://npm.io/package/shopware-api-client

## Dependencies (2)

- [request](https://npm.io/package/request.md) ^2.87.0
- [request-promise-native](https://npm.io/package/request-promise-native.md) ^1.0.4

## Alternatives

- [launchdarkly-js-client-sdk](https://npm.io/package/launchdarkly-js-client-sdk.md) — 2.5M weekly downloads
- [@elastic/elasticsearch](https://npm.io/package/@elastic/elasticsearch.md) — 2.1M weekly downloads
- [@c8y/client](https://npm.io/package/@c8y/client.md) — 15.3K weekly downloads
- [@signaldb/maverickjs](https://npm.io/package/@signaldb/maverickjs.md) — 1.7K weekly downloads
- [@bbc/http-transport-cache](https://npm.io/package/@bbc/http-transport-cache.md) — 1.2K weekly downloads

## Recent versions

- 1.6.0 (latest) — 2018-11-18
- 1.5.0 — 2018-11-15
- 1.4.0 — 2018-06-27
- 1.3.0 — 2018-02-05
- 1.2.0 — 2018-01-03
- 1.1.4 — 2017-10-28
- 1.1.3 — 2017-10-04
- 1.1.2 — 2017-05-21
- 1.1.1 — 2017-03-25
- 1.1.0 — 2017-03-04
- 1.0.2 — 2017-02-22
- 1.0.1 — 2017-02-22
- 1.0.0 — 2017-02-22
- 0.6.0 — 2017-02-21
- 0.5.0 — 2017-02-20
- … 4 more at https://npm.io/package/shopware-api-client/versions

## README

# 🛍 Shopware API Client

[![npm version](https://badge.fury.io/js/shopware-api-client.svg)](https://badge.fury.io/js/shopware-api-client)
[![Build Status](https://travis-ci.org/apertureless/shopware-api-client.svg?branch=master)](https://travis-ci.org/apertureless/shopware-api-client)
[![codecov](https://codecov.io/gh/apertureless/shopware-api-client/branch/master/graph/badge.svg)](https://codecov.io/gh/apertureless/shopware-api-client)
[![XO code style](https://img.shields.io/badge/code_style-XO-5ed9c7.svg)](https://github.com/sindresorhus/xo)
[![license](https://img.shields.io/github/license/mashape/apistatus.svg)](https://github.com/apertureless/shopware-api-client/blob/master/LICENSE.txt)

Node.js module to interact with the [Shopware REST API](https://shopware.com/).

```bash
yarn add shopware-api-client
```

## Examples
Examples how to use the package:

### ES2015

```javascript
import Shopware from 'shopware-api-client'

const shop = new Shopware({
    host: 'YOUR HOST',
    user: 'YOUR USER',
    apiKey: 'YOUR APIKEY'
})

let articles

try {
  articles = await shop.getArticles()
} catch (err) {
  console.log(error)
}

console.log(articles)
```

### Older ES 😔

```javascript
const Shopware = require('shopware-api-client')
const shop = new Shopware({
  host: 'YOUR HOST',
  user: 'YOUR USER',
  apiKey: 'YOUR APIKEY'
})

shop.getArticles()
  .then(articles => console.log(articles))
  .catch(err => console.log(err))

```

## Docs
Find the [docs here](https://apertureless.github.io/shopware-api-client/#/) *contributions welcome*

## Implemented API Resources

- [x] `/api/addresses`
- [x] `/api/articles`
- [x] `/api/caches`
- [x] `/api/categories`
- [x] `/api/countries`
- [x] `/api/customerGroups`
- [x] `/api/customers`
- [x] `/api/generateArticleImages`
- [x] `/api/media`
- [x] `/api/manufacturers`
- [x] `/api/orders`
- [x] `/api/propertyGroups`
- [x] `/api/shops`
- [x] `/api/translations`
- [x] `/api/variants`
- [x] `/api/version`


## API Reference

- Shopware
  - [new Shopware([object])](https://github.com/apertureless/shopware-api-client/tree/master/docs#new_shopware)
  - [.version([callback])](https://github.com/apertureless/shopware-api-client/tree/master/docs#version) 🔀 `Promise`
  - [.getArticles([callback])](https://github.com/apertureless/shopware-api-client/tree/master/docs#getArticles) 🔀 `Promise`
  - [.getArticleByOrdernumber(ordernumber, [callback])](https://github.com/apertureless/shopware-api-client/tree/master/docs#getArticleByOrdernumber) 🔀 `Promise`
  - [.getArticle(id, [callback])](https://github.com/apertureless/shopware-api-client/tree/master/docs#getArticle) 🔀 `Promise`
  - [.deleteArticle(id, [callback])](https://github.com/apertureless/shopware-api-client/tree/master/docs#deleteArticle) 🔀 `Promise`
  - [.deleteArticles(ids, [callback])](https://github.com/apertureless/shopware-api-client/tree/master/docs#deleteArticles) 🔀 `Promise`
  - [.createArticle(article, [callback])](https://github.com/apertureless/shopware-api-client/tree/master/docs#createArticle) 🔀 `Promise`
  - [.updateArticle(id, article, [callback])](https://github.com/apertureless/shopware-api-client/tree/master/docs#updateArticle) 🔀 `Promise`
  - .updateArticles(articles, [callback]) 🔀 `Promise`
  - .getCategories([callback]) 🔀 `Promise`
  - .getCategory(id, [callback]) 🔀 `Promise`
  - .createCategory(category, [callback]) 🔀 `Promise`
  - .updateCategory(id, category, [callback]) 🔀 `Promise`
  - .deleteCategory(id, [callback]) 🔀 `Promise`
  - .getVariants([callback]) 🔀 `Promise`
  - .getVariants([callback]) 🔀 `Promise`
  - .getVariant(id, [callback]) 🔀 `Promise`
  - .updateVariant(id, body, [callback]) 🔀 `Promise`
  - .createVariant(body, [callback]) 🔀 `Promise`
  - .deleteVariant(id, [callback]) 🔀 `Promise`
  - .deleteVariants(ids, [callback]) 🔀 `Promise`
  - .generateArticleImages(articleId, [callback]) 🔀 `Promise`
  - .listMedia([callback]) 🔀 `Promise`
  - .getMedia(id, [callback]) 🔀 `Promise`
  - .updateMedia(id, body, [callback]) 🔀 `Promise`
  - .createMedia(body, [callback]) 🔀 `Promise`
  - .deleteMedia(id, [callback]) 🔀 `Promise`
  - .getOrders([callback]) 🔀 `Promise`
  - .getOrderByOrdernumber(ordernumber, [callback]) 🔀 `Promise`
  - .getOrder(id, [callback]) 🔀 `Promise`
  - .updateOrder(id, body, [callback]) 🔀 `Promise`
  - .getAddresses([callback]) 🔀 `Promise`
  - .getAddress(id, [callback]) 🔀 `Promise`
  - .createAddress(body, [callback]) 🔀 `Promise`
  - .updateAddress(id, body, [callback]) 🔀 `Promise`
  - .deleteAddress(id, [callback]) 🔀 `Promise`
  - .getCustomers([callback]) 🔀 `Promise`
  - .getCustomer(id, [callback]) 🔀 `Promise`
  - .createCustomer(body, [callback]) 🔀 `Promise`
  - .updateCustomer(id, body, [callback]) 🔀 `Promise`
  - .deleteCustomer(id, [callback]) 🔀 `Promise`
  - .getCaches([callback]) 🔀 `Promise`
  - .getCache(id, [callback]) 🔀 `Promise`
  - .deleteCache(id, [callback]) 🔀 `Promise`
  - .deleteCaches([callback]) 🔀 `Promise`
  - .getCountries([callback]) 🔀 `Promise`
  - .getCountry(id, [callback]) 🔀 `Promise`
  - .updateCountry(id, body, [callback]) 🔀 `Promise`
  - .createCountry(body, [callback]) 🔀 `Promise`
  - .deleteCountry(id, [callback]) 🔀 `Promise`
  - .getCustomerGroups([callback]) 🔀 `Promise`
  - .getCustomerGroup(id, [callback]) 🔀 `Promise`
  - .createCustomerGroup(body, [callback]) 🔀 `Promise`
  - .updateCustomerGroup(id, body, [callback]) 🔀 `Promise`
  - .deleteCustomerGroup(id, [callback]) 🔀 `Promise`
  - .getManufacturers([callback]) 🔀 `Promise`
  - .getManufacturer(id, [callback]) 🔀 `Promise`
  - .createManufacturer(body, [callback]) 🔀 `Promise`
  - .updateManufacturer(id, body, [callback]) 🔀 `Promise`
  - .deleteManufacturer(id, [callback]) 🔀 `Promise`
  - .getPropertyGroups([callback]) 🔀 `Promise`
  - .getPropertyGroup(id, [callback]) 🔀 `Promise`
  - .createPropertyGroup(body, [callback]) 🔀 `Promise`
  - .updatePropertyGroup(id, body, [callback]) 🔀 `Promise`
  - .deletePropertyGroup(id, [callback]) 🔀 `Promise`
  - .getShops([callback]) 🔀 `Promise`
  - .getShop(id, [callback]) 🔀 `Promise`
  - .createShop(body, [callback]) 🔀 `Promise`
  - .updateShop(id, body, [callback]) 🔀 `Promise`
  - .deleteShop(id, [callback]) 🔀 `Promise`
  - .getTranslations([callback]) 🔀 `Promise`
  - .getTranslation(id, [callback]) 🔀 `Promise`
  - .createTranslation(id, body, [callback]) 🔀 `Promise`
  - .updateTranslation(id, body, [callback]) 🔀 `Promise`
  - .updateTranslations(body, [callback]) 🔀 `Promise`
  - .deleteTranslation(id, [callback]) 🔀 `Promise`

## Contributing

1. Fork it ( https://github.com/apertureless/shopware-api-client/fork )
2. Create your feature branch (`git checkout -b my-new-feature`)
3. Commit your changes (`git commit -am 'Add some feature'`)
4. Push to the branch (`git push origin my-new-feature`)
5. Create a new Pull Request

## License

This software is distributed under [MIT license](LICENSE.txt).

---
_Source: https://npm.io/package/shopware-api-client · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
