Skip to content

Baul (baul.redbroomsoftware.com)

B2B distribution and last-mile logistics platform — manages clients, product catalogs, delivery orders, driver dispatch, route generation, and public shipment tracking.

URL: https://baul.redbroomsoftware.comStatus: LIVE Tier: T2 (vertical SaaS primitive)

T1 apps are indispensable horizontal primitives. T2 apps are vertical SaaS or single-domain primitives — primitive-like in their domain but not universal dependencies.

What you can integrate

  • Delivery confirmation events — receive delivery.confirmed when a driver marks an order as delivered, to trigger downstream invoicing or inventory updates
  • Client and catalog reads — list distribution clients and their active product catalogs
  • Dispatch lifecycle — create and track delivery orders through driver assignment, en-route, and delivered stages
  • Public tracking — token-based read-only endpoint for recipients to track their shipment without authentication
  • Referral program — hook into referral events for partner-driven growth flows

Authentication

http
Authorization: Bearer <api_key>
Content-Type: application/json

User identity flows through Camino SSO. Server-to-server partners use per-account API keys. The /api/tracking/[token] endpoint is public (no auth required).

Endpoints

MethodPath
GET, POST, PATCH/api/access
GET, POST/api/badges
GET/api/catalog
GET/api/catalog/:slug
POST/api/client-subscriptions
GET, POST/api/clients
GET/api/dashboard/stats
POST/api/deliveries
GET, POST, PATCH/api/delivery-orders
POST/api/delivery-orders/by-subscription

50 total — 6 admin/cron/internal (hidden) — +34 more primary endpoints not shown. Source: src/routes/api/**/+server.{ts,js} in the baul repo.

Events emitted

EventReceiversDescription
baul.creditnote.issuedconstanzaBaúl credit note stamped — Constanza posts contra-revenue/contra-COGS pólizas (S458)
delivery.confirmedcaminoDelivery completed with proof of delivery (photos, signature)
deposit.completedconstanza, colectiva, caminoCash deposit completed at bank with proof (photo of slip, GPS). Baul physical layer event. Triggers expense creation in Constanza and agreement reconciliation in Colectiva.
handoff.completedcamino, colectiva, constanza, agora, agente, caracol, cosmos-pet, madrigueraGeneric physical handoff completed with proof. Covers document delivery, product returns, sample collection, key handoff, equipment transfer. Baul physical layer event.
inventory.in_transitcaracolA Baúl delivery order has been dispatched and is en route — Caracol surfaces an in-transit status on the linked movement. Fire-and-forget; Caracol may show location + ETA when provided.
inventory.pickup_discrepancycaracolThe driver pickup count was short at Baúl pickup time — Caracol surfaces a banner so the user can accept_short_pickup or dispute. Carries per-product expected vs actual counts.

Events consumed

EventSendersDescription
company.ecosystem_linkedagenteEmitted by Agente when a company is linked to an RBS ecosystem org (ecosystemOrgId set). Consumed by Baúl to auto-set operators.ecosystem_company_id.
payment.completedcolectivaA payment transaction was fully completed in Colectiva — source apps confirm the payment for delivery orders, subscriptions, or escrow. Used by baul to confirm delivery payment, mancha for reservation payment, constanza for accounting, and cosmos-pet for vet clinic subscription payments.
payment.failedcolectivaA payment attempt failed in Colectiva — notifies source apps (baul, mancha) to surface the failure to the user and offer retry.
payment.refundedcolectiva, comalA payment was refunded by Colectiva — voluntary refund initiated by a tenant app or by Colectiva ops, OR an involuntary MP-platform-side refund. Receivers branch on paymentReferenceType. For voluntary refunds with proration, isPartial=true and proration block carries period bounds. paymentLayer is the primary routing discriminator; receivers MUST check it before paymentReferenceType.
shipment.receivedagente[auto-derived] shipment.received event
subscription.createdcolectivaA new subscription record was created in Colectiva — baul receives this to link delivery service with the tenant's subscription. Distinct from subscription.activated (which fires after first payment succeeds).
subscription.payment_failedcamino, colectivaA subscription payment attempt failed — receiver apps surface a payment-failed banner to the tenant operator and may restrict feature access.

Webhook signature

Standard ecosystem HMAC-SHA256 over the raw body with a 5-minute timestamp window. See Webhooks.

OpenAPI

Coming in the OpenAPI generator phase — see /reference/openapi.

SDK

See /sdk/ for @r-bsoftware/ecosystem-sdk helpers.

Gotchas

  • Baul emits only one event (delivery.confirmed) and consumes only two subscription lifecycle events — the narrowest ecosystem surface of any T2 app. If you need richer order lifecycle events, Camino CRM will aggregate them from delivery.confirmed for cross-app reporting.
  • Route generation (/api/cron/generate-routes) is an internal cron endpoint — not a developer-facing API. Do not call it directly.
  • The public tracking token is single-use per shipment and is generated at dispatch time. Expose it to the recipient via your own notification flow, not via direct API response to the end user.

Red Broom Software Ecosystem