BindRabbit Platform v1
API Documentation

Finance Builder
Dropzone API

Embed the BindRabbit quote-intake widget and programmatically manage merchants and quote intents.

Looking for the Agency API? View Agency API docs →

Live
Version 1.0
JSON · HTTPS
Authentication
Every request must include headers identifying your integration and the merchant.
Authorization
<api_key>
Your integration partner API key. Passed as-is; hashed with SHA-256 server-side.
Example Request Header
Shell
curl https://platform.bindrabbit.com/api/v1/quote_intents \
    -H "Authorization: sk_live_abc123..."
Security Note Never expose your API keys client-side. All requests should originate from your server. Keys are non-recoverable once generated.

Endpoints
Click an endpoint to expand request and response details.
POST /api/v1/quote_intents Create a Quote Intent ›

Creates a new quote intent for a previously registered merchant. Returns a signed ID used in all subsequent requests.

Headers
Header Required Description
Authorization Required Your raw integration API key (no prefix)
Request Body
Parameter Type Required Description
merchant_external_id string Required The external_id returned when the merchant was created.
Response
201
Quote intent created. Returns a signed, time-limited ID.
JSON
{ "quote_intent_id": "eyJfcmFpbHMiOns..." }
                
Field Type Description
quote_intent_id string Signed ID. Expires in 1 hour. Pass as "quote_intent_id" in JS embed.
401
Invalid or missing API credentials.
cURL Example
Shell
curl -X POST https://platform.bindrabbit.com/api/v1/quote_intents \
    -H "Authorization: sk_live_abc123" \
    -H "Content-Type: application/json" \
    -d '{"merchant_external_id":"a1b2c3d4-e5f6-7890-abcd-ef1234567890"}'
POST /api/v1/merchants Register a Merchant ›
Embed Widget
A drop-in iframe widget that lets your users upload documents and receive a processed quote.
Installation
The widget is loaded via a <script> tag from our CDN.
HTML
<script src="https://d3fxcep2p5sm2a.cloudfront.net/1.0.0/index.umd.js"></script>

Usage
The typical integration flow has two steps: your server creates a quote_intent_id, then your frontend passes it to the widget.
1
Server creates a Quote Intent
POST to /api/v1/quote_intents using your integration key and the merchant's external_id. Returns a signed quote_intent_id.
2
Send the ID to your frontend
Embed the quote_intent_id in your page — as a data attribute, a JSON payload, or any other mechanism.
3
Initialize the widget
Call initializeDropzone() with the ID and a container element. The widget handles document upload and processing entirely inside an iframe — no API keys on the client.
4
Receive the result
Listen for the PROCESSING_COMPLETE event. The result field contains the processed quote_data object.
JavaScript
  // Fetch the signed ID from your server
  const { quote_intent_id } = await fetch('/api/create-quote-intent').then(r => r.json());

  const widget = Bindrabbit.initializeDropzone({
    quoteIntentId: quote_intent_id,
    container: '#bindrabbit-widget',
    onEvent(event) {
      if (event.type === 'PROCESSING_COMPLETE') {
        console.log('Quote data:', event.result);
      }
    },
  });

  // Clean up when done (e.g. on route change or modal close)
  // widget.destroy();
initializeDropzone() Options
Option Type Required Description
quoteIntentId string Required Signed ID from your server. Expires in 1 hour.
container string | HTMLElement Required CSS selector or DOM element to mount the widget into.
onEvent function Required Callback fired for every widget lifecycle event. See Events below.
theme object Optional { accentColor?: string } — CSS color for the widget's accent (border, button, spinner).
Return value — BindRabbitWidget
Method Description
destroy() Removes the iframe and cleans up all event listeners. Safe to call multiple times. Call on route changes or when the widget is no longer needed.

Events
Every widget lifecycle event is delivered to the onEvent callback. Handle what you need and ignore the rest.
Event type Extra fields Description
READY version: string Widget has mounted and is ready for interaction.
UPLOAD_PROGRESS percent: number Upload progress 0–100. Use to drive a custom progress indicator.
PROCESSING — Upload complete; documents are being analyzed.
PROCESSING_COMPLETE result: object Processing finished. result contains the quote_data object. This is the primary success signal.
PROCESSING_FAILED reason: string Processing could not complete. reason is a human-readable description.
ERROR code: string
message: string
A widget-level error (e.g. invalid quoteIntentId, network failure).
Full event handler example
JavaScript
  Bindrabbit.initializeDropzone({
    quoteIntentId: quote_intent_id,
    container: '#bindrabbit-widget',
    onEvent(event) {
      switch (event.type) {
        case 'READY':
          console.log('Widget ready, version', event.version);
          break;
        case 'UPLOAD_PROGRESS':
          setProgress(event.percent);
          break;
        case 'PROCESSING_COMPLETE':
          handleQuoteData(event.result);  // quote_data object
          break;
        case 'PROCESSING_FAILED':
          showError(event.reason);
          break;
        case 'ERROR':
          console.error(event.code, event.message);
          break;
      }
    },
  });

Error Handling
The API uses standard HTTP status codes. All error responses include a JSON body.
Status Meaning Common Cause
201 Created Resource successfully created.
400 Bad Request Missing required header (e.g. Merchant-API-Key).
401 Unauthorized Missing or invalid Authorization header.
422 Unprocessable Validation failed on the record.
500 Server Error Unexpected error. Contact support.
Error Response Shape
JSON
{
  "error": "Unauthorized"
}