Node.js module to interact with the Shopware REST API.
yarn add shopware-api-client
Examples how to use the package:
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)
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))
Find the docs here contributions welcome
-
/api/addresses
-
/api/articles
-
/api/caches
-
/api/categories
-
/api/countries
-
/api/customerGroups
-
/api/customers
-
/api/generateArticleImages
-
/api/media
-
/api/manufacturers
-
/api/orders
-
/api/propertyGroups
-
/api/shops
-
/api/translations
-
/api/variants
-
/api/version
- Shopware
- new Shopware([object])
- .version([callback]) π
Promise
- .getArticles([callback]) π
Promise
- .getArticleByOrdernumber(ordernumber, [callback]) π
Promise
- .getArticle(id, [callback]) π
Promise
- .deleteArticle(id, [callback]) π
Promise
- .deleteArticles(ids, [callback]) π
Promise
- .createArticle(article, [callback]) π
Promise
- .updateArticle(id, article, [callback]) π
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
- Fork it ( https://github.com/apertureless/shopware-api-client/fork )
- Create your feature branch (
git checkout -b my-new-feature
) - Commit your changes (
git commit -am 'Add some feature'
) - Push to the branch (
git push origin my-new-feature
) - Create a new Pull Request
This software is distributed under MIT license.