generated from coulomb/repo-seed
SDK (@binect/js): - BinectClient with domain sub-clients (documents, sendings, accounts, attachments, invoices) - HTTP Basic Auth, native fetch only (no runtime dependencies) - TypeScript types matching Binect API vocabulary - Status predicates and polling helpers in helpers.ts - Structured error handling (BinectApiError, BinectAuthError) Explorer: - Standalone browser-based API explorer (explorer/index.html) - Interactive testing without code Tests: - Unit tests for client, types, errors, helpers, http - E2E tests for upload/delete and send/cancel workflows Also includes: - Architecture Decision Records (ADRs) - Example DIN 5008 letter PDFs for testing - API specification research notes Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
4.3 KiB
4.3 KiB
Binect API REST Specification
Source: https://app.binect.de/binectapi/v1_swagger_api_kernel.json Retrieved: 2026-01-14
Overview
The Binect API (v0.9.9) is a letter shipping service that handles document upload, validation, processing, and Deutsche Post delivery. The API uses HTTP Basic Authentication and HTTPS exclusively.
Base Configuration
- Base Path:
/binectapi/v1 - Host:
app.binect.de - Scheme: HTTPS only
- Authentication: HTTP Basic Auth (required for all endpoints)
- Contact: kontakt@binect.de
Core Endpoints
Documents Management
Upload & Retrieve:
POST /documents– Upload letters/serial letters with base64-encoded contentGET /documents– List shippable documents (status 2)GET /documents/errors– List erroneous documents (status 7)GET /documents/{documentID}– Fetch specific documentDELETE /documents/{documentID}– Remove document
Document Attributes:
GET /documents/{documentID}/attributes– Get all attributesPOST /documents/{documentID}/attributes– Set attributesGET /documents/{documentID}/attributes/{key}– Get specific attributePUT /documents/{documentID}/attributes/{key}– Update specific attributeDELETE /documents/{documentID}/attributes/{key}– Delete specific attribute
Document Modifications:
PUT /documents/{documentID}/transformations– Apply scaling/offset adjustmentsDELETE /documents/{documentID}/transformations– Revert to originalPUT /documents/{documentID}/coverpage– Add cover pageDELETE /documents/{documentID}/coverpage– Remove cover pageGET /documents/{documentID}/pdf– PDF previewGET /documents/{documentID}/png– PNG preview
Attachments on Documents:
GET /documents/{documentID}/attachments– Get document attachmentsPOST /documents/{documentID}/attachments– Add attachment to documentPATCH /documents/{documentID}/attachments– Update attachmentsDELETE /documents/{documentID}/attachments– Remove attachments
Sendings (Shipments)
POST /sendings– Announce documents for deliveryGET /sendings– List all shipments (statuses 3-7)PUT /sendings– Cancel unshipped lettersPOST /sendings/{documentID}– Trigger single shipmentGET /sendings/{documentID}– Get specific sendingPUT /sendings/{documentID}– Cancel specific sendingDELETE /sendings/{documentID}– Delete sendingPOST /sendings/document– Upload and immediately sendGET /sendings/status– Batch status check
Attachments (Standalone)
POST /attachments– Upload attachmentGET /attachments– List all attachmentsGET /attachments/{attachmentID}– Get specific attachmentDELETE /attachments/{attachmentID}– Delete attachmentGET /attachments/{attachmentID}/pdf– Preview attachment PDFGET /attachments/{attachmentID}/documents– Find associated documentsPATCH /attachments/{attachmentID}/documents– Attach to multiple documents
Account Management
GET /accounts– Retrieve credit/financial dataGET /accounts/personaldata– Get user detailsPATCH /accounts/personaldata– Update user detailsGET /accounts/options– Get default print optionsPUT /accounts/options– Update default print optionsGET /accounts/coworkers– List team membersGET /accounts/coworkers/{debitornumber}/journal/{month}– Coworker transactionsGET /accounts/journal/{month}– Account transactions
Invoicing
GET /invoices– List all invoicesGET /invoices/{invoiceNumber}– Fetch invoice transactionsGET /invoices/{invoiceNumber}/pdf– Download invoice PDF
Key Data Models
Document Status Codes
- 1: In preparation
- 2: Shippable
- 3: Production queue
- 4: Printing
- 5: Sent
- 6: Canceled
- 7: Erroneous
Envelope Options
- DINLANG
- C4
Franking Types
- UNSPECIFIED
- STANDARD_FRANKING
- DV_FRANKING
Production Countries
- UNSPECIFIED
- DE
- AT
Response Format Options
- FULL (default): Complete validation results
- SHORT: Minimal response; validation runs asynchronously
Constraints
- Maximum file size: 12 MB
- Pagination supported via
limitandoffsetparameters - Serial letters support token-based or page-count splitting
- Transformations and cover pages can only be applied to original documents