New:Microsoft Teams Notifications Are Now Available in Socket.Learn more →
Get Started

@beel_es/sdk

Package Overview
Dependencies
Maintainers
1
Versions
7
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@beel_es/sdk

Official TypeScript SDK for the BeeL API - Fully typed wrapper over OpenAPI-generated code

Source
npmnpm
Version
1.0.0
Version published
Weekly downloads
634
875.38%
Maintainers
1
Weekly downloads
 
Created
Source

BeeL TypeScript SDK

npm TypeScript License: MIT

Official TypeScript/JavaScript SDK for the BeeL invoicing API. Fully typed.

Installation

npm install @beel/sdk

Quick Start

import { BeeL } from '@beel/sdk';

// The client validates your API key on creation
const beel = await BeeL.create('beel_sk_live_...');

// List invoices
const invoices = await beel.invoices.list();

// Get a specific invoice
const invoice = await beel.invoices.get('550e8400-e29b-41d4-a716-446655440000');

Usage

Invoices

// List with filters
const invoices = await beel.invoices.list({
  query: { page: 1, limit: 20, status: 'paid' }
});

// Create
const created = await beel.invoices.create({
  body: {
    customer_id: 'uuid',
    issue_date: '2026-03-10',
    lines: [{ description: 'Service', quantity: 1, unit_price: 100 }]
  }
});

// Issue, send, mark paid
await beel.invoices.issue('invoice-id');
await beel.invoices.sendEmail('invoice-id', { body: { to: 'client@example.com' } });
await beel.invoices.markPaid('invoice-id', { body: { payment_date: '2026-03-10' } });

// Download PDF
const pdf = await beel.invoices.downloadPdf('invoice-id');

Customers

const customers = await beel.customers.list();
const created = await beel.customers.create({ body: { name: 'ACME', nif: 'B12345678' } });
await beel.customers.update('id', { body: { email: 'new@acme.com' } });
await beel.customers.delete('id');

Products

const products = await beel.products.list();
const results = await beel.products.search({ query: { q: 'hosting' } });

Series

const series = await beel.series.list();
await beel.series.setDefault('series-id');

Configuration

const tax = await beel.config.getTaxConfiguration();
const vf = await beel.config.getVeriFactuConfiguration();

Error Handling

import { BeeL, BeeLError } from '@beel/sdk';

try {
  const beel = await BeeL.create('invalid_key');
} catch (e) {
  if (e instanceof BeeLError) {
    console.error(e.message);    // "Invalid API key..."
    console.error(e.statusCode); // 401
  }
}

Configuration

// Production (default)
const beel = await BeeL.create('beel_sk_live_...');

// Test environment
const beel = await BeeL.create({
  apiKey: 'beel_sk_live_...',
  baseUrl: 'https://test.beel.es/api',
});

// Skip validation (for tests)
const beel = await BeeL.create({
  apiKey: 'beel_sk_live_...',
  skipValidation: true,
});

Requirements

  • Node.js 18+ or any modern runtime with fetch
  • TypeScript 5.0+ (optional but recommended)

Keywords

beel

FAQs

Package last updated on 11 Mar 2026

Related posts