Integrate the sandbox
Create test deals with your own key and exercise the whole flow before any live routing.
Build and test a full integration (create, status changes, offers, messages, cleanup) without ever touching a real client. Sandbox deals are real lead_submissions rows on your own lane, so every other endpoint treats them exactly like a live deal.
- 1post/test/deals
Create a test deal on your own lane. No body needed.
Hands you a ref you use everywhere below
- 2
Report in_review, then later a decline with a reason or a funded amount.
- 3
Post non-binding figures and watch them render in the comparison.
- 4
Replace them with binding terms and confirm your side handles the upsert.
- 5
Raise a document request and handle request.fulfilled arriving from the archive.
- 6
Clean up. Ten test deals may be live at a time.
1. Create a test deal
curl --request POST \
--url https://api.capvant.com/v1/test/deals \
--header "X-API-Key: $CAPVANT_API_KEY"No body needed. You get back a full deal, business name prefixed TEST -, contact email on the non-resolving internal.invalid domain:
{
"ref": "CV7A1F0932",
"business": { "name": "TEST - Sandbox Trading 7A1F0932 Ltd", "company_number": null },
"contact_email": "test-deal-7a1f0932@internal.invalid",
"status": "submitted",
"lender_status": "new",
"offers": [],
"messages_count": 0
}2. Exercise the rest of the API against it
Every other v1 endpoint works unmodified on a test deal's ref:
# report a status
curl -X POST https://api.capvant.com/v1/test/deals/CV7A1F0932 2>/dev/null; \
curl -X POST https://api.capvant.com/v1/deals/CV7A1F0932/status \
-H "X-API-Key: $CAPVANT_API_KEY" -H "content-type: application/json" \
-d '{"status":"in_review"}'
# submit an indicative offer
curl -X POST https://api.capvant.com/v1/deals/CV7A1F0932/indicative-offer \
-H "X-API-Key: $CAPVANT_API_KEY" -H "content-type: application/json" \
-d '{"amount":75000,"rate_type":"apr","rate_value":9.5}'
# send a message - stored normally, but no email ever fires
# because internal.invalid can never resolve
curl -X POST https://api.capvant.com/v1/deals/CV7A1F0932/messages \
-H "X-API-Key: $CAPVANT_API_KEY" -H "content-type: application/json" \
-d '{"body":"Testing our integration end to end."}'If you registered a webhook, this same sequence fires deal.updated and message.created deliveries, so it's the fastest way to see your webhook receiver handle real payloads.
3. Clean up
curl -X DELETE https://api.capvant.com/v1/test/deals/CV7A1F0932 \
-H "X-API-Key: $CAPVANT_API_KEY"You can have at most 10 live test deals at once; creating an 11th returns 422 cap_exceeded. Delete deals you're done with rather than leaving them to pile up.
Full field reference: Create a test deal and Delete a test deal.
