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"
<?php
// Get your API credentials from your billware customer area
$apiAppId = 'your-app-id';
$apiSecret = 'your-api-secret';
$payload = json_encode([
'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 = base64_encode(hash_hmac('sha256', $payload, $apiSecret, true));
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => 'https://www.billware.de/api/v1',
CURLOPT_POST => true,
CURLOPT_POSTFIELDS => $payload,
CURLOPT_RETURNTRANSFER => true,
CURLOPT_HTTPHEADER => [
'X-Bw-Hmac: '.$apiAppId.':'.$hmac,
'X-Bw-Method: article.create',
'Content-Type: application/json',
],
]);
$response = curl_exec($curl);
curl_close($curl);
print_r(json_decode($response, true));
import crypto from 'node:crypto';
// Get your API credentials from your billware customer area
const apiAppId = 'your-app-id';
const apiSecret = 'your-api-secret';
const payload = JSON.stringify({
"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
const hmac = crypto.createHmac('sha256', apiSecret).update(payload).digest('base64');
const response = await fetch('https://www.billware.de/api/v1', {
method: 'POST',
headers: {
'X-Bw-Hmac': `${apiAppId}:${hmac}`,
'X-Bw-Method': 'article.create',
'Content-Type': 'application/json'
},
body: payload
});
console.log(await response.json());
import base64
import hashlib
import hmac
import json
import requests
# Get your API credentials from your billware customer area
api_appid = "your-app-id"
api_secret = "your-api-secret"
payload = json.dumps({
"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
signature = base64.b64encode(
hmac.new(api_secret.encode(), payload.encode(), hashlib.sha256).digest()
).decode()
response = requests.post(
"https://www.billware.de/api/v1",
data=payload,
headers={
"X-Bw-Hmac": f"{api_appid}:{signature}",
"X-Bw-Method": "article.create",
"Content-Type": "application/json",
},
)
print(response.json())
using System.Net.Http;
using System.Security.Cryptography;
using System.Text;
using System.Text.Json;
// Get your API credentials from your billware customer area
const string apiAppId = "your-app-id";
const string apiSecret = "your-api-secret";
var payload = JsonSerializer.Serialize(new
{
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
using var hmac = new HMACSHA256(Encoding.UTF8.GetBytes(apiSecret));
var signature = Convert.ToBase64String(hmac.ComputeHash(Encoding.UTF8.GetBytes(payload)));
using var client = new HttpClient();
var request = new HttpRequestMessage(HttpMethod.Post, "https://www.billware.de/api/v1")
{
Content = new StringContent(payload, Encoding.UTF8, "application/json")
};
request.Headers.Add("X-Bw-Hmac", $"{apiAppId}:{signature}");
request.Headers.Add("X-Bw-Method", "article.create");
var response = await client.SendAsync(request);
Console.WriteLine(await response.Content.ReadAsStringAsync());
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"
<?php
// Get your API credentials from your billware customer area
$apiAppId = 'your-app-id';
$apiSecret = 'your-api-secret';
$payload = json_encode([
'article_ident' => '5kjynoies71pgqv4',
]);
// The HMAC is calculated over the exact request body that is sent
$hmac = base64_encode(hash_hmac('sha256', $payload, $apiSecret, true));
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => 'https://www.billware.de/api/v1',
CURLOPT_POST => true,
CURLOPT_POSTFIELDS => $payload,
CURLOPT_RETURNTRANSFER => true,
CURLOPT_HTTPHEADER => [
'X-Bw-Hmac: '.$apiAppId.':'.$hmac,
'X-Bw-Method: article.read',
'Content-Type: application/json',
],
]);
$response = curl_exec($curl);
curl_close($curl);
print_r(json_decode($response, true));
import crypto from 'node:crypto';
// Get your API credentials from your billware customer area
const apiAppId = 'your-app-id';
const apiSecret = 'your-api-secret';
const payload = JSON.stringify({
"article_ident": "5kjynoies71pgqv4"
});
// The HMAC is calculated over the exact request body that is sent
const hmac = crypto.createHmac('sha256', apiSecret).update(payload).digest('base64');
const response = await fetch('https://www.billware.de/api/v1', {
method: 'POST',
headers: {
'X-Bw-Hmac': `${apiAppId}:${hmac}`,
'X-Bw-Method': 'article.read',
'Content-Type': 'application/json'
},
body: payload
});
console.log(await response.json());
import base64
import hashlib
import hmac
import json
import requests
# Get your API credentials from your billware customer area
api_appid = "your-app-id"
api_secret = "your-api-secret"
payload = json.dumps({
"article_ident": "5kjynoies71pgqv4",
})
# The HMAC is calculated over the exact request body that is sent
signature = base64.b64encode(
hmac.new(api_secret.encode(), payload.encode(), hashlib.sha256).digest()
).decode()
response = requests.post(
"https://www.billware.de/api/v1",
data=payload,
headers={
"X-Bw-Hmac": f"{api_appid}:{signature}",
"X-Bw-Method": "article.read",
"Content-Type": "application/json",
},
)
print(response.json())
using System.Net.Http;
using System.Security.Cryptography;
using System.Text;
using System.Text.Json;
// Get your API credentials from your billware customer area
const string apiAppId = "your-app-id";
const string apiSecret = "your-api-secret";
var payload = JsonSerializer.Serialize(new
{
article_ident = "5kjynoies71pgqv4"
});
// The HMAC is calculated over the exact request body that is sent
using var hmac = new HMACSHA256(Encoding.UTF8.GetBytes(apiSecret));
var signature = Convert.ToBase64String(hmac.ComputeHash(Encoding.UTF8.GetBytes(payload)));
using var client = new HttpClient();
var request = new HttpRequestMessage(HttpMethod.Post, "https://www.billware.de/api/v1")
{
Content = new StringContent(payload, Encoding.UTF8, "application/json")
};
request.Headers.Add("X-Bw-Hmac", $"{apiAppId}:{signature}");
request.Headers.Add("X-Bw-Method", "article.read");
var response = await client.SendAsync(request);
Console.WriteLine(await response.Content.ReadAsStringAsync());
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"
<?php
// Get your API credentials from your billware customer area
$apiAppId = 'your-app-id';
$apiSecret = 'your-api-secret';
$payload = json_encode([
'article_identifier' => 'sku',
'article_sku' => 'STALL-XL-001',
]);
// The HMAC is calculated over the exact request body that is sent
$hmac = base64_encode(hash_hmac('sha256', $payload, $apiSecret, true));
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => 'https://www.billware.de/api/v1',
CURLOPT_POST => true,
CURLOPT_POSTFIELDS => $payload,
CURLOPT_RETURNTRANSFER => true,
CURLOPT_HTTPHEADER => [
'X-Bw-Hmac: '.$apiAppId.':'.$hmac,
'X-Bw-Method: article.read',
'Content-Type: application/json',
],
]);
$response = curl_exec($curl);
curl_close($curl);
print_r(json_decode($response, true));
import crypto from 'node:crypto';
// Get your API credentials from your billware customer area
const apiAppId = 'your-app-id';
const apiSecret = 'your-api-secret';
const payload = JSON.stringify({
"article_identifier": "sku",
"article_sku": "STALL-XL-001"
});
// The HMAC is calculated over the exact request body that is sent
const hmac = crypto.createHmac('sha256', apiSecret).update(payload).digest('base64');
const response = await fetch('https://www.billware.de/api/v1', {
method: 'POST',
headers: {
'X-Bw-Hmac': `${apiAppId}:${hmac}`,
'X-Bw-Method': 'article.read',
'Content-Type': 'application/json'
},
body: payload
});
console.log(await response.json());
import base64
import hashlib
import hmac
import json
import requests
# Get your API credentials from your billware customer area
api_appid = "your-app-id"
api_secret = "your-api-secret"
payload = json.dumps({
"article_identifier": "sku",
"article_sku": "STALL-XL-001",
})
# The HMAC is calculated over the exact request body that is sent
signature = base64.b64encode(
hmac.new(api_secret.encode(), payload.encode(), hashlib.sha256).digest()
).decode()
response = requests.post(
"https://www.billware.de/api/v1",
data=payload,
headers={
"X-Bw-Hmac": f"{api_appid}:{signature}",
"X-Bw-Method": "article.read",
"Content-Type": "application/json",
},
)
print(response.json())
using System.Net.Http;
using System.Security.Cryptography;
using System.Text;
using System.Text.Json;
// Get your API credentials from your billware customer area
const string apiAppId = "your-app-id";
const string apiSecret = "your-api-secret";
var payload = JsonSerializer.Serialize(new
{
article_identifier = "sku",
article_sku = "STALL-XL-001"
});
// The HMAC is calculated over the exact request body that is sent
using var hmac = new HMACSHA256(Encoding.UTF8.GetBytes(apiSecret));
var signature = Convert.ToBase64String(hmac.ComputeHash(Encoding.UTF8.GetBytes(payload)));
using var client = new HttpClient();
var request = new HttpRequestMessage(HttpMethod.Post, "https://www.billware.de/api/v1")
{
Content = new StringContent(payload, Encoding.UTF8, "application/json")
};
request.Headers.Add("X-Bw-Hmac", $"{apiAppId}:{signature}");
request.Headers.Add("X-Bw-Method", "article.read");
var response = await client.SendAsync(request);
Console.WriteLine(await response.Content.ReadAsStringAsync());
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"
# 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"
<?php
// Get your API credentials from your billware customer area
$apiAppId = 'your-app-id';
$apiSecret = 'your-api-secret';
$payload = json_encode([
'article_ident' => '5kjynoies71pgqv4',
'article_title' => 'Hasenstall XXL',
]);
// The HMAC is calculated over the exact request body that is sent
$hmac = base64_encode(hash_hmac('sha256', $payload, $apiSecret, true));
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => 'https://www.billware.de/api/v1',
CURLOPT_POST => true,
CURLOPT_POSTFIELDS => $payload,
CURLOPT_RETURNTRANSFER => true,
CURLOPT_HTTPHEADER => [
'X-Bw-Hmac: '.$apiAppId.':'.$hmac,
'X-Bw-Method: article.update',
'Content-Type: application/json',
],
]);
$response = curl_exec($curl);
curl_close($curl);
print_r(json_decode($response, true));
import crypto from 'node:crypto';
// Get your API credentials from your billware customer area
const apiAppId = 'your-app-id';
const apiSecret = 'your-api-secret';
const payload = JSON.stringify({
"article_ident": "5kjynoies71pgqv4",
"article_title": "Hasenstall XXL"
});
// The HMAC is calculated over the exact request body that is sent
const hmac = crypto.createHmac('sha256', apiSecret).update(payload).digest('base64');
const response = await fetch('https://www.billware.de/api/v1', {
method: 'POST',
headers: {
'X-Bw-Hmac': `${apiAppId}:${hmac}`,
'X-Bw-Method': 'article.update',
'Content-Type': 'application/json'
},
body: payload
});
console.log(await response.json());
import base64
import hashlib
import hmac
import json
import requests
# Get your API credentials from your billware customer area
api_appid = "your-app-id"
api_secret = "your-api-secret"
payload = json.dumps({
"article_ident": "5kjynoies71pgqv4",
"article_title": "Hasenstall XXL",
})
# The HMAC is calculated over the exact request body that is sent
signature = base64.b64encode(
hmac.new(api_secret.encode(), payload.encode(), hashlib.sha256).digest()
).decode()
response = requests.post(
"https://www.billware.de/api/v1",
data=payload,
headers={
"X-Bw-Hmac": f"{api_appid}:{signature}",
"X-Bw-Method": "article.update",
"Content-Type": "application/json",
},
)
print(response.json())
using System.Net.Http;
using System.Security.Cryptography;
using System.Text;
using System.Text.Json;
// Get your API credentials from your billware customer area
const string apiAppId = "your-app-id";
const string apiSecret = "your-api-secret";
var payload = JsonSerializer.Serialize(new
{
article_ident = "5kjynoies71pgqv4",
article_title = "Hasenstall XXL"
});
// The HMAC is calculated over the exact request body that is sent
using var hmac = new HMACSHA256(Encoding.UTF8.GetBytes(apiSecret));
var signature = Convert.ToBase64String(hmac.ComputeHash(Encoding.UTF8.GetBytes(payload)));
using var client = new HttpClient();
var request = new HttpRequestMessage(HttpMethod.Post, "https://www.billware.de/api/v1")
{
Content = new StringContent(payload, Encoding.UTF8, "application/json")
};
request.Headers.Add("X-Bw-Hmac", $"{apiAppId}:{signature}");
request.Headers.Add("X-Bw-Method", "article.update");
var response = await client.SendAsync(request);
Console.WriteLine(await response.Content.ReadAsStringAsync());
# 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"
<?php
// Get your API credentials from your billware customer area
$apiAppId = 'your-app-id';
$apiSecret = 'your-api-secret';
$payload = json_encode([
'article_ident' => '5kjynoies71pgqv4',
]);
// The HMAC is calculated over the exact request body that is sent
$hmac = base64_encode(hash_hmac('sha256', $payload, $apiSecret, true));
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => 'https://www.billware.de/api/v1',
CURLOPT_POST => true,
CURLOPT_POSTFIELDS => $payload,
CURLOPT_RETURNTRANSFER => true,
CURLOPT_HTTPHEADER => [
'X-Bw-Hmac: '.$apiAppId.':'.$hmac,
'X-Bw-Method: article.delete',
'Content-Type: application/json',
],
]);
$response = curl_exec($curl);
curl_close($curl);
print_r(json_decode($response, true));
import crypto from 'node:crypto';
// Get your API credentials from your billware customer area
const apiAppId = 'your-app-id';
const apiSecret = 'your-api-secret';
const payload = JSON.stringify({
"article_ident": "5kjynoies71pgqv4"
});
// The HMAC is calculated over the exact request body that is sent
const hmac = crypto.createHmac('sha256', apiSecret).update(payload).digest('base64');
const response = await fetch('https://www.billware.de/api/v1', {
method: 'POST',
headers: {
'X-Bw-Hmac': `${apiAppId}:${hmac}`,
'X-Bw-Method': 'article.delete',
'Content-Type': 'application/json'
},
body: payload
});
console.log(await response.json());
import base64
import hashlib
import hmac
import json
import requests
# Get your API credentials from your billware customer area
api_appid = "your-app-id"
api_secret = "your-api-secret"
payload = json.dumps({
"article_ident": "5kjynoies71pgqv4",
})
# The HMAC is calculated over the exact request body that is sent
signature = base64.b64encode(
hmac.new(api_secret.encode(), payload.encode(), hashlib.sha256).digest()
).decode()
response = requests.post(
"https://www.billware.de/api/v1",
data=payload,
headers={
"X-Bw-Hmac": f"{api_appid}:{signature}",
"X-Bw-Method": "article.delete",
"Content-Type": "application/json",
},
)
print(response.json())
using System.Net.Http;
using System.Security.Cryptography;
using System.Text;
using System.Text.Json;
// Get your API credentials from your billware customer area
const string apiAppId = "your-app-id";
const string apiSecret = "your-api-secret";
var payload = JsonSerializer.Serialize(new
{
article_ident = "5kjynoies71pgqv4"
});
// The HMAC is calculated over the exact request body that is sent
using var hmac = new HMACSHA256(Encoding.UTF8.GetBytes(apiSecret));
var signature = Convert.ToBase64String(hmac.ComputeHash(Encoding.UTF8.GetBytes(payload)));
using var client = new HttpClient();
var request = new HttpRequestMessage(HttpMethod.Post, "https://www.billware.de/api/v1")
{
Content = new StringContent(payload, Encoding.UTF8, "application/json")
};
request.Headers.Add("X-Bw-Hmac", $"{apiAppId}:{signature}");
request.Headers.Add("X-Bw-Method", "article.delete");
var response = await client.SendAsync(request);
Console.WriteLine(await response.Content.ReadAsStringAsync());
# 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"
<?php
// Get your API credentials from your billware customer area
$apiAppId = 'your-app-id';
$apiSecret = 'your-api-secret';
$payload = json_encode([
'article_ident' => '5kjynoies71pgqv4',
]);
// The HMAC is calculated over the exact request body that is sent
$hmac = base64_encode(hash_hmac('sha256', $payload, $apiSecret, true));
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => 'https://www.billware.de/api/v1',
CURLOPT_POST => true,
CURLOPT_POSTFIELDS => $payload,
CURLOPT_RETURNTRANSFER => true,
CURLOPT_HTTPHEADER => [
'X-Bw-Hmac: '.$apiAppId.':'.$hmac,
'X-Bw-Method: article.exists',
'Content-Type: application/json',
],
]);
$response = curl_exec($curl);
curl_close($curl);
print_r(json_decode($response, true));
import crypto from 'node:crypto';
// Get your API credentials from your billware customer area
const apiAppId = 'your-app-id';
const apiSecret = 'your-api-secret';
const payload = JSON.stringify({
"article_ident": "5kjynoies71pgqv4"
});
// The HMAC is calculated over the exact request body that is sent
const hmac = crypto.createHmac('sha256', apiSecret).update(payload).digest('base64');
const response = await fetch('https://www.billware.de/api/v1', {
method: 'POST',
headers: {
'X-Bw-Hmac': `${apiAppId}:${hmac}`,
'X-Bw-Method': 'article.exists',
'Content-Type': 'application/json'
},
body: payload
});
console.log(await response.json());
import base64
import hashlib
import hmac
import json
import requests
# Get your API credentials from your billware customer area
api_appid = "your-app-id"
api_secret = "your-api-secret"
payload = json.dumps({
"article_ident": "5kjynoies71pgqv4",
})
# The HMAC is calculated over the exact request body that is sent
signature = base64.b64encode(
hmac.new(api_secret.encode(), payload.encode(), hashlib.sha256).digest()
).decode()
response = requests.post(
"https://www.billware.de/api/v1",
data=payload,
headers={
"X-Bw-Hmac": f"{api_appid}:{signature}",
"X-Bw-Method": "article.exists",
"Content-Type": "application/json",
},
)
print(response.json())
using System.Net.Http;
using System.Security.Cryptography;
using System.Text;
using System.Text.Json;
// Get your API credentials from your billware customer area
const string apiAppId = "your-app-id";
const string apiSecret = "your-api-secret";
var payload = JsonSerializer.Serialize(new
{
article_ident = "5kjynoies71pgqv4"
});
// The HMAC is calculated over the exact request body that is sent
using var hmac = new HMACSHA256(Encoding.UTF8.GetBytes(apiSecret));
var signature = Convert.ToBase64String(hmac.ComputeHash(Encoding.UTF8.GetBytes(payload)));
using var client = new HttpClient();
var request = new HttpRequestMessage(HttpMethod.Post, "https://www.billware.de/api/v1")
{
Content = new StringContent(payload, Encoding.UTF8, "application/json")
};
request.Headers.Add("X-Bw-Hmac", $"{apiAppId}:{signature}");
request.Headers.Add("X-Bw-Method", "article.exists");
var response = await client.SendAsync(request);
Console.WriteLine(await response.Content.ReadAsStringAsync());
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"
}