Zum Inhalt springen

Lösungen

Freelancer & Selbstständige Rechnungen und Belege ohne Shop eBay Verkäufe automatisch abrechnen Shopify Bestellungen direkt aus dem Shop WooCommerce WordPress-Shop anbinden

Artikel

article.create

Legt einen neuen Artikel an.

Daten

Felder Beschreibung Erlaubte Werte Standard
external_ident Wurde der Artikel z. B. von eBay importiert, ist das die eindeutige Kennung aus der Quelle String ""
external_account_name Wurde der Artikel z. B. von eBay importiert, ist das der Name des eBay-Kontos String ""
article_title Pflicht Artikeltitel String
article_subtitle Untertitel des Artikels String ""
article_description Artikelbeschreibung String ""
article_nr Artikelnummer; ist sie leer oder nicht gesetzt, wird eine Artikelnummer erzeugt String Generated Number
article_sku SKU des Artikels String ""
article_ean EAN des Artikels String ""
article_unit Kennung der Einheit des Artikels "unit_ppu" Preis je Stück "unit_hour" Einheit sind Stunden "unit_lump" Pauschal "unit_kg" Einheit sind Kilogramm "unit_ppu"
article_type Quelle des Artikels, z. B. "amazon". "csv" für den CSV-Import, das Programm, aus dem die Datei stammt, steht in external_account_name, z. B. "Billbee" String "billware"
article_price Nettopreis des Artikels Float 0.0000
article_tax_rate Steuersatz des Artikels Float 0.0000
article_purchase_price Einkaufspreis des Artikels Float 0.0000

Codebeispiele

# Get your API credentials from your billware customer area
API_APPID="your-app-id"
API_SECRET="your-api-secret"

PAYLOAD='{"article_title":"Kaninchenstall XL","article_subtitle":"Mit extra Auslauf und wetterfestem Dach","article_description":"Ein hochwertiger, wetterfester Kaninchenstall aus Holz mit extra großem Auslaufbereich.","article_nr":"KAN-XL-2025","article_sku":"STALL-XL-001","article_ean":"4012345678901","article_unit":"unit_ppu","article_type":"billware","article_price":129.99,"article_tax_rate":19,"article_purchase_price":75}'

# The HMAC is calculated over the exact request body that is sent
HMAC=$(printf '%s' "$PAYLOAD" | openssl dgst -sha256 -hmac "$API_SECRET" -binary | base64)

curl -X POST "https://www.billware.de/api/v1" \
  -H "X-Bw-Hmac: $API_APPID:$HMAC" \
  -H "X-Bw-Method: article.create" \
  -H "Content-Type: application/json" \
  -d "$PAYLOAD"

Rückgabewerte

Felder Beschreibung
article_ident Kennung des angelegten Artikels

Beispielantworten

	// SUCCESS 
{
	"response":true,
	"data":{
		"article_ident":"3Nq073q94902a962"
	},
	"method":"article.create",
	"message":"article created"
}

// ERROR 
{
	"response":false,
	"data": null,
	"method":"article.create",
	"message":"article_title is required"
}
	

article.read

Liefert die Daten eines Artikels.

Daten

Artikel über article_ident finden (Standard)
Felder Beschreibung Erlaubte Werte
article_ident Pflicht Kennung des Artikels String
Artikel über SKU oder EAN finden (optional)
Felder Wert Beschreibung Erlaubte Werte
article_identifier Pflicht entweder "sku" oder "ean" Wie der Artikel gefunden wird String
article_sku / article_ean Pflicht SKU oder EAN des Artikels Kennung des Artikels String
Hinweis

Da EANs und SKUs in der Datenbank nicht eindeutig sein müssen, können auch mehrere Artikel zurückkommen.

Codebeispiele

article.read (by article_ident)

# Get your API credentials from your billware customer area
API_APPID="your-app-id"
API_SECRET="your-api-secret"

PAYLOAD='{"article_ident":"5kjynoies71pgqv4"}'

# The HMAC is calculated over the exact request body that is sent
HMAC=$(printf '%s' "$PAYLOAD" | openssl dgst -sha256 -hmac "$API_SECRET" -binary | base64)

curl -X POST "https://www.billware.de/api/v1" \
  -H "X-Bw-Hmac: $API_APPID:$HMAC" \
  -H "X-Bw-Method: article.read" \
  -H "Content-Type: application/json" \
  -d "$PAYLOAD"

article.read (by SKU / EAN)

# Get your API credentials from your billware customer area
API_APPID="your-app-id"
API_SECRET="your-api-secret"

PAYLOAD='{"article_identifier":"sku","article_sku":"STALL-XL-001"}'

# The HMAC is calculated over the exact request body that is sent
HMAC=$(printf '%s' "$PAYLOAD" | openssl dgst -sha256 -hmac "$API_SECRET" -binary | base64)

curl -X POST "https://www.billware.de/api/v1" \
  -H "X-Bw-Hmac: $API_APPID:$HMAC" \
  -H "X-Bw-Method: article.read" \
  -H "Content-Type: application/json" \
  -d "$PAYLOAD"

Rückgabewerte

Felder Beschreibung Typ
article_ident Kennung des Artikels String
date_created Datum und Uhrzeit, wann der Artikel angelegt wurde Datum als String
date_created_user Datum, wann der Artikel angelegt wurde, im Format des Kontos, z. B. "19.10.2018" Datum als String
article_nr Artikelnummer String
article_title Titel des Artikels String
article_subtitle Untertitel des Artikels String
article_description Beschreibung des Artikels String
article_type Quelle des Artikels, z. B. "amazon" String
article_unit Kennung der Einheit des Artikels, z. B. "unit_ppu", "unit_lump", "unit_hour", "unit_kg" String
article_price Nettopreis des Artikels Float
article_price_total Bruttopreis des Artikels Float
article_tax_rate Steuersatz des Artikels Float
article_purchase_price Einkaufspreis des Artikels Float
article_sku SKU des Artikels String
article_ean EAN des Artikels String
sales Array mit Verkaufszahlen des Artikels Array
count Verkäufe dieses Artikels insgesamt Float
price Verkäufe mal Nettopreis des Artikels Float
price_total Verkäufe mal Bruttopreis des Artikels Float

Beispielantworten

	// SUCCESS 
{
	"response":true,
	"data":{
		"article_ident":"1953989A44067fK5",
		"date_created":"2018-10-19 10:14:35",
		"date_created_user":"19.10.2018",
		"article_nr":"ART-001",
		"article_title":"Testarticle",
		"article_subtitle":"",
		"article_description":"",
		"article_type":"billware",
		"article_unit":"unit_ppu",
		"article_price":12.0000,
		"article_price_total":14.28,
		"article_tax_rate":19.0000,
		"article_purchase_price":5.9500,
		"article_sku":"",
		"article_ean":"",
		"sales":{
			"count":3,
			"price":36,
			"price_total":42.84
		}
	},
	"method":"article.read",
	"message":"read article with ident: 1953989A44067fK5"
}

article.update

Ändert ein oder mehrere Felder eines Artikels.

Daten

Felder Beschreibung Erlaubte Werte
article_ident Pflicht Kennung des Artikels String
validate Der Aufruf kehrt ohne Änderung zurück, wenn der angegebene Wert schon existiert. Sonst wird der Artikel geändert. Siehe Beispiel unten. Feld Beispiel: article_nr
[Weitere Felder] Siehe article.create

Schreibgeschützt

Felder Beschreibung
address_ident Interne Kennung
external_ident Interne Kennung
external_account_name Interne Kennung
date_created_user Wird automatisch berechnet, ändere stattdessen date_created (UTC)
date_updated Wird automatisch berechnet
date_updated_user Wird automatisch berechnet

Codebeispiele

# Get your API credentials from your billware customer area
API_APPID="your-app-id"
API_SECRET="your-api-secret"

PAYLOAD='{"article_ident":"5kjynoies71pgqv4","article_title":"Hasenstall XXL"}'

# The HMAC is calculated over the exact request body that is sent
HMAC=$(printf '%s' "$PAYLOAD" | openssl dgst -sha256 -hmac "$API_SECRET" -binary | base64)

curl -X POST "https://www.billware.de/api/v1" \
  -H "X-Bw-Hmac: $API_APPID:$HMAC" \
  -H "X-Bw-Method: article.update" \
  -H "Content-Type: application/json" \
  -d "$PAYLOAD"

Antwortdaten

Felder Beschreibung Typ
response Gibt an, ob die Aktion erfolgreich war true false
data Array mit den Antwortdaten Array
article_ident Die Kennung des geänderten Artikels String
[fields] Alle geänderten und bereinigten Felder
method article.update String
message Zusätzliche Information zur Anfrage String

Beispielantworten

	// SUCCESS after updating the article price
{
	"response":true,
	"data": {
		"article_ident" : "30Wp80787u99z2qv",
		"article_price" : "12.0000" 
	},
	"method":"article.update",
	"message":"article updated"
}

// ERROR 
{
	"response":false,
	"data": null,
	"method":"article.update",
	"message":"article not found"
}
	

article.delete

Löscht einen bestehenden Artikel.

Daten

Felder Beschreibung Erlaubte Werte
article_ident Pflicht Kennung des Artikels String

Codebeispiele

# Get your API credentials from your billware customer area
API_APPID="your-app-id"
API_SECRET="your-api-secret"

PAYLOAD='{"article_ident":"5kjynoies71pgqv4"}'

# The HMAC is calculated over the exact request body that is sent
HMAC=$(printf '%s' "$PAYLOAD" | openssl dgst -sha256 -hmac "$API_SECRET" -binary | base64)

curl -X POST "https://www.billware.de/api/v1" \
  -H "X-Bw-Hmac: $API_APPID:$HMAC" \
  -H "X-Bw-Method: article.delete" \
  -H "Content-Type: application/json" \
  -d "$PAYLOAD"

Beispielantworten

	// SUCCESS 
{
	"response":true,
	"data":null,
	"method":"article.delete",
	"message":"article deleted"
}

// ERROR 
{
	"response":false,
	"data": null,
	"method":"article.delete",
	"message":"article not found"
}
	

article.exists

Prüft, ob ein Artikel existiert.

Daten

Felder Beschreibung Erlaubte Werte
article_ident Pflicht Kennung des Artikels String

Codebeispiele

# Get your API credentials from your billware customer area
API_APPID="your-app-id"
API_SECRET="your-api-secret"

PAYLOAD='{"article_ident":"5kjynoies71pgqv4"}'

# The HMAC is calculated over the exact request body that is sent
HMAC=$(printf '%s' "$PAYLOAD" | openssl dgst -sha256 -hmac "$API_SECRET" -binary | base64)

curl -X POST "https://www.billware.de/api/v1" \
  -H "X-Bw-Hmac: $API_APPID:$HMAC" \
  -H "X-Bw-Method: article.exists" \
  -H "Content-Type: application/json" \
  -d "$PAYLOAD"

Beispielantworten

	// SUCCESS 
{
	"response":true,
	"data": {
		"article_ident" : "30Wp80787u99z2qv"
	},
	"method":"article.exists",
	"message":"article does exist"
}

// ERROR 
{
	"response":false,
	"data": null,
	"method":"article.exists",
	"message":"article does not exist"
}