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

Articles

article.create

Create a new article.

Data

Fields Description Accepted Types Defaults To
external_ident If the article was imported from e.g. ebay, this is the unique identifier provided by the source String ""
external_account_name If the article was imported from e.g. ebay, this is the name of the ebay account String ""
article_title Required Article title String
article_subtitle Article subtitle String ""
article_description Article description String ""
article_nr Article Number, if empty or not set an article number will be generated String Generated Number
article_sku Article SKU String ""
article_ean Article EAN String ""
article_unit Unit identifier of the article "unit_ppu" Price per unit "unit_hour" Units are hours "unit_lump" Lump "unit_kg" Units are kilograms "unit_ppu"
article_type Indicates the source of the article, e.g. "amazon" String "billware"
article_price Net price of the article Float 0.0000
article_tax_rate Tax rate of the article Float 0.0000
article_purchase_price Purchase price of the article Float 0.0000

Code Examples

# 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"

Return Values

Fields Description
article_ident Identifier of the created article

Example Responses

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

Get the details of an article.

Data

Find article by article_ident (default)
Fields Description Accepted Types
article_ident Required Identifier of the article String
Find article by SKU or EAN (optional)
Fields Value Description Accepted Types
article_identifier Required either "sku" or "ean" In which way the article is identified String
article_sku / article_ean Required SKU or EAN of the article Identifier of the article String
Note

Since EANs and SKUs do not necessarily have to be unique in the database, multiple articles may also be returned.

Code Examples

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"

Return Values

Fields Description Type
article_ident Identifier of the article String
date_created Date and time when the article was created Date as String
date_created_user Date when the article was created in user format, e.g. "19.10.2018" Date as String
article_nr Article number String
article_title Title of the article String
article_subtitle Subtitle of the article String
article_description Description of the article String
article_type Source of the article, e.g. "amazon" String
article_unit Unit identifier of the article, e.g. "unit_ppu", "unit_lump", "unit_hour", "unit_kg" String
article_price Net price of the article Float
article_price_total Gross price of the article Float
article_tax_rate Tax rate of the article Float
article_purchase_price Purchase price of the article Float
article_sku Article SKU String
article_ean Article EAN String
sales Array with article statistics Array
count total sales of this article Float
price sales times the net price of the article Float
price_total sales times the gross price of the article Float

Example Responses

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

Update one or more attributes of an article.

Data

Fields Description Accepted Types
article_ident Required Identifier of the article String
validate Call will return without updating if the specified value already exists. Otherwise the article will be updated. See example below. Field Example: article_nr
[Other Fields] See article.create

Write protected

Fields Description
address_ident Internal identifier
external_ident Internal identifier
external_account_name Internal identifier
date_created_user Calculated automatically, update date_created instead (UTC)
date_updated Calculated automatically
date_updated_user Calculated automatically

Code Examples

# 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"

Response Data

Fields Description Type
response Indicating if the action was successful true false
data Array with response data Array
article_ident The identifier of the updated article String
[fields] All the updated and sanitized fields
method article.update String
message Additional information about the request String

Example Responses

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

Delete an existing article.

Data

Fields Description Accepted Types
article_ident Required Identifier of the article String

Code Examples

# 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"

Example Responses

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

Check if an article exists.

Data

Fields Description Accepted Types
article_ident Required Identifier of the article String

Code Examples

# 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"

Example Responses

	// 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"
}