BEEP! Dart SDK
Official Dart/Flutter SDK for the BEEP! Developer API.
Installation
Add to your pubspec.yaml:
dependencies:
beep_sdk:
path: ./path/to/beep_sdk
Quick Start
import 'package:beep_sdk/beep_sdk.dart';
// Use your Secret Key (bk_test_sk_... for sandbox, bk_live_sk_... for production)
final client = BeepClient('bk_test_sk_YOUR_SECRET_KEY');
// List stores
final stores = await client.stores.list();
// Insert a product
final product = await client.catalog.insertProduct({
'storeId': 'your_store_id',
'ean': '4000000000001',
'name': 'Bio-Vollmilch 3,5%',
'brand': 'BioHof',
'price': 1.49,
'vat': 7,
});
// Don't forget to dispose when done
client.dispose();
Available Resources
| Resource | Methods | Min. Package |
|---|---|---|
client.stores |
list(), get(), register() |
DISCOVER |
client.catalog |
insertProduct(), listProducts(), getProduct(), registerToStore(), bulkImport() |
DISCOVER |
client.offers |
create(), update(), delete(), list() |
GO |
client.clickCollect |
submitOrder(), updateStatus() |
GO |
client.loyalty |
createProgram(), enroll(), addPoints(), redeemPoints(), getCustomerBalance(), getAnalytics(), syncExternal() |
GO |
client.scanAndGo |
checkIn(), startCheckout(), getPurchase(), getPurchaseHistory(), generateReceipt(), getReceiptFromToken(), getRecommendations(), configureRecommendations() |
GROW |
client.integrations |
syncPOS(), pushToPOS(), syncERP(), pushToERP(), configurePSP(), processPayment(), refundPayment() |
GROW |
client.analytics |
get(), exportSales(), exportReceipts() |
GO / GROW |
Error Handling
try {
final result = await client.scanAndGo.checkIn({'storeId': 'store_001'});
} on AuthenticationError {
print('Invalid API key');
} on PermissionError catch (e) {
print('Upgrade required: ${e.details?["requiredUpgrade"]}');
} on RateLimitError catch (e) {
print('Rate limited. Retry after ${e.retryAfter}s');
}
Documentation
Libraries
- beep_sdk
- BEEP! Dart SDK