Befehle Artikel

Felder

public int? id;
public int? mainDetailId;
public int? taxId;
public int? priceGroupId;
public int? filterGroupId;
public int? configuratorSetId;
public string name;
public string description;
public string descriptionLong;
public int pseudoSales;
public bool notification;
public bool active;
public int pseudeSales;
public bool highlight;
public bool lastStock;
public bool crossBundleLook;
public string template;
public int mode;
public string availableFrom;
public string availableTo;
/* seo */
public String keywords;
public String metaTitle;
/* history */
public String added;
public String changed;
/* price */
public bool priceGroupActive;
public List<PropertyValue> propertyValues;
public ArticleMainDetail mainDetail = new ArticleMainDetail();
public Supplier supplier = new Supplier();
public Tax tax = new Tax();
public PropertyGroup propertyGroup;
public List<CustomerGroup> customerGroups;
public List<Image> images;
public String configuratorSet;
public List<Link> links;
public List<Download> downloads;
// public Category categories
public List<ArticleDetail> details;
public List<SeoCategory> seoCategories;
public List<Category> categories;
public List<SimilarArticle> similar;
public List<RelatedArticle> related;
public List<Translation> translations;

Alle Artikel abrufen

ShopwareApi shopwareApi = new ShopwareApi("API-URL", "USER", "API-KEY");
List<ArticleMain> articles = shopwareApi.getArticleRessource().getAll();

Artikel anhand der ID abfragen

ShopwareApi shopwareApi = new ShopwareApi("API-URL", "USER", "API-KEY");
ArticleMain article = shopwareApi.getArticleRessource().get(1);

Artikel anhand der Bestellnummer abfragen

ShopwareApi shopwareApi = new ShopwareApi("API-URL", "USER", "API-KEY");
ArticleMain article = shopwareApi.getArticleRessource().getByOrdernumber(20003);

Artikel erstellen

ShopwareApi shopwareApi = new ShopwareApi("API-URL", "USER", "API-KEY");
ArticleMain article = new ArticleMain();
article.name = "Ein neuer Artikel";
article.mainDetail.number = "L001";
article.supplier = "LENZ.de";
article.tax.tax = 19;

shopwareApi.getArticleRessource().add(article);

Artikel aktualisieren

Aktualisiert eine einzige Bestellung. Achtung: Alle nicht geänderten Werte bleiben bestehen.

ShopwareApi shopwareApi = new ShopwareApi("API-URL", "USER", "API-KEY");
ArticleMain article = new ArticleMain();
article.id = 1;
article.name = "Neuer Titel";
shopwareApi.getArticleRessource().update(article);