Skip to content

apertureless/shopware-api-client

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

99 Commits
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

πŸ› Shopware 5 API Client

npm version Build Status codecov XO code style license

Node.js module to interact with the Shopware 5 REST API.

yarn add shopware-api-client

Examples

Examples how to use the package:

ES2015

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(err)
}

console.log(articles)

Older ES πŸ˜”

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 contributions welcome

Implemented API Resources

  • /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

API Reference

  • 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

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.