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.confirmedwhen 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
Authorization: Bearer <api_key>
Content-Type: application/jsonUser 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
| Method | Path |
|---|---|
| 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
| Event | Receivers | Description |
|---|---|---|
baul.creditnote.issued | constanza | Baúl credit note stamped — Constanza posts contra-revenue/contra-COGS pólizas (S458) |
delivery.confirmed | camino | Delivery completed with proof of delivery (photos, signature) |
deposit.completed | constanza, colectiva, camino | Cash 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.completed | camino, colectiva, constanza, agora, agente, caracol, cosmos-pet, madriguera | Generic physical handoff completed with proof. Covers document delivery, product returns, sample collection, key handoff, equipment transfer. Baul physical layer event. |
inventory.in_transit | caracol | A 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_discrepancy | caracol | The 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
| Event | Senders | Description |
|---|---|---|
company.ecosystem_linked | agente | Emitted 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.completed | colectiva | A 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.failed | colectiva | A payment attempt failed in Colectiva — notifies source apps (baul, mancha) to surface the failure to the user and offer retry. |
payment.refunded | colectiva, comal | A 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.received | agente | [auto-derived] shipment.received event |
subscription.created | colectiva | A 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_failed | camino, colectiva | A 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 fromdelivery.confirmedfor 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.