{"openapi":"3.1.0","info":{"title":"Edeal Insurance Partner API","version":"2026-11-29","description":"Truck insurance applications, documents, consents, policy status and webhooks. Test keys = sandbox."},"servers":[{"url":"https://dev.edeal.ai/partner/v1"}],"security":[{"bearer":[]}],"paths":{"/ping":{"get":{"summary":"Check the key and mode","responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object"}}}},"default":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/meta/fields":{"get":{"summary":"Field dictionary (groups, types, options, required)","responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object"}}}},"default":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/meta/events":{"get":{"summary":"Event types","responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"object":{"const":"list"},"data":{"type":"array"},"has_more":{"type":"boolean"}}}}}},"default":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/applications":{"post":{"summary":"Create an application","parameters":[{"name":"Idempotency-Key","in":"header","required":false,"schema":{"type":"string"},"description":"Any unique string; a retried POST with the same key returns the first result (24 h)."}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApplicationInput"}}}},"responses":{"201":{"description":"Created","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Application"}}}},"default":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}},"get":{"summary":"List applications","parameters":[{"name":"limit","in":"query","schema":{"type":"integer","minimum":1,"maximum":100}},{"name":"starting_after","in":"query","schema":{"type":"string"}},{"name":"status","in":"query","schema":{"type":"string","enum":["in_progress","missing_data","waiting_loss_runs","ready_to_quote","quoting","quotes_ready","awaiting_signature","bound","declined","closed"]}},{"name":"partner_ref","in":"query","schema":{"type":"string"}},{"name":"updated_since","in":"query","schema":{"type":"string","format":"date-time"}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"object":{"const":"list"},"data":{"type":"array"},"has_more":{"type":"boolean"}}}}}},"default":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/applications/{app_id}":{"get":{"summary":"Retrieve an application","parameters":[{"name":"app_id","in":"path","required":true,"schema":{"type":"string","example":"app_123"}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Application"}}}},"default":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}},"patch":{"summary":"Update an application (fields merge; arrays replace)","parameters":[{"name":"app_id","in":"path","required":true,"schema":{"type":"string","example":"app_123"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApplicationInput"}}}},"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Application"}}}},"default":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/applications/{app_id}/submit":{"post":{"summary":"Mark complete and check what is missing","parameters":[{"name":"app_id","in":"path","required":true,"schema":{"type":"string","example":"app_123"}},{"name":"Idempotency-Key","in":"header","required":false,"schema":{"type":"string"},"description":"Any unique string; a retried POST with the same key returns the first result (24 h)."}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Application"}}}},"default":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/applications/{app_id}/links":{"post":{"summary":"Personal links for the driver (application page and signing page)","parameters":[{"name":"app_id","in":"path","required":true,"schema":{"type":"string","example":"app_123"}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object"}}}},"default":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/applications/{app_id}/documents":{"get":{"summary":"List documents","parameters":[{"name":"app_id","in":"path","required":true,"schema":{"type":"string","example":"app_123"}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"object":{"const":"list"},"data":{"type":"array"},"has_more":{"type":"boolean"}}}}}},"default":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}},"post":{"summary":"Upload documents (multipart)","parameters":[{"name":"app_id","in":"path","required":true,"schema":{"type":"string","example":"app_123"}},{"name":"Idempotency-Key","in":"header","required":false,"schema":{"type":"string"},"description":"Any unique string; a retried POST with the same key returns the first result (24 h)."}],"requestBody":{"content":{"multipart/form-data":{"schema":{"type":"object","required":["type","file"],"properties":{"type":{"type":"string","enum":["cdl","registration","vin_photo","dec_page","coi","loss_runs","lease","lien","ein","mvr","authority","company","title","contracts","other"]},"file":{"type":"array","items":{"type":"string","format":"binary"}}}}}}},"responses":{"201":{"description":"Uploaded","content":{"application/json":{"schema":{"type":"object","properties":{"object":{"const":"list"},"data":{"type":"array"},"has_more":{"type":"boolean"}}}}}},"default":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/applications/{app_id}/policies":{"get":{"summary":"Policies (needs driver's share consent)","parameters":[{"name":"app_id","in":"path","required":true,"schema":{"type":"string","example":"app_123"}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"object":{"const":"list"},"data":{"type":"array"},"has_more":{"type":"boolean"}}}}}},"default":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/applications/{app_id}/quotes":{"get":{"summary":"Quotes (needs driver's share consent)","parameters":[{"name":"app_id","in":"path","required":true,"schema":{"type":"string","example":"app_123"}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"object":{"const":"list"},"data":{"type":"array"},"has_more":{"type":"boolean"}}}}}},"default":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/applications/{app_id}/loss-runs":{"get":{"summary":"Loss run requests (needs driver's share consent)","parameters":[{"name":"app_id","in":"path","required":true,"schema":{"type":"string","example":"app_123"}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"object":{"const":"list"},"data":{"type":"array"},"has_more":{"type":"boolean"}}}}}},"default":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/events":{"get":{"summary":"List events (polling alternative to webhooks)","parameters":[{"name":"limit","in":"query","schema":{"type":"integer"}},{"name":"starting_after","in":"query","schema":{"type":"string"}},{"name":"type","in":"query","schema":{"type":"string","enum":["application.created","application.status_changed","application.missing_data","application.ready_to_quote","application.declined","application.closed","consent.signed","consent.share_granted","consent.share_revoked","loss_runs.received","quotes.ready","policy.bound","policy.cancel_pending","policy.cancelled","policy.renewal_due"]}},{"name":"application_id","in":"query","schema":{"type":"string"}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"object":{"const":"list"},"data":{"type":"array"},"has_more":{"type":"boolean"}}}}}},"default":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/events/{evt_id}":{"get":{"summary":"Retrieve an event","parameters":[{"name":"evt_id","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Event"}}}},"default":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/webhook-endpoints":{"get":{"summary":"List webhook endpoints","responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"object":{"const":"list"},"data":{"type":"array"},"has_more":{"type":"boolean"}}}}}},"default":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}},"post":{"summary":"Create a webhook endpoint (test mode only)","requestBody":{"content":{"application/json":{"schema":{"type":"object","required":["url"],"properties":{"url":{"type":"string"},"events":{"type":"array","items":{"type":"string"}}}}}}},"responses":{"201":{"description":"Created — the response includes the signing secret once","content":{"application/json":{"schema":{"type":"object"}}}},"default":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/webhook-endpoints/{we_id}":{"delete":{"summary":"Delete a webhook endpoint (test mode only)","parameters":[{"name":"we_id","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object"}}}},"default":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/webhook-endpoints/{we_id}/test":{"post":{"summary":"Send a test event","parameters":[{"name":"we_id","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"202":{"description":"Queued","content":{"application/json":{"schema":{"type":"object"}}}},"default":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/sandbox/applications/{app_id}/simulate":{"post":{"summary":"Sandbox: move the application through the lifecycle","parameters":[{"name":"app_id","in":"path","required":true,"schema":{"type":"string","example":"app_123"}}],"requestBody":{"content":{"application/json":{"schema":{"type":"object","required":["event"],"properties":{"event":{"type":"string","enum":["application.missing_data","application.ready_to_quote","consent.signed","consent.share_granted","consent.share_revoked","loss_runs.received","quotes.ready","policy.bound","policy.cancel_pending","policy.cancelled","policy.renewal_due","application.declined","application.closed"]}}}}}},"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Application"}}}},"default":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}}},"components":{"securitySchemes":{"bearer":{"type":"http","scheme":"bearer","description":"edi_test_… (sandbox) or edi_live_…"}},"schemas":{"Error":{"type":"object","properties":{"error":{"type":"object","properties":{"type":{"type":"string"},"code":{"type":"string"},"message":{"type":"string"},"field":{"type":"string"},"request_id":{"type":"string"}}}}},"ApplicationInput":{"type":"object","properties":{"partner_ref":{"type":"string","description":"Your driver / application id"},"line_of_business":{"type":"string","enum":["trucking","commercial_auto"]},"fields":{"type":"object","additionalProperties":true,"description":"Field key → value; keys from GET /meta/fields"},"vehicles":{"type":"array","items":{"type":"object"}},"drivers":{"type":"array","items":{"type":"object"}},"prior_policies":{"type":"array","items":{"type":"object"}}}},"Application":{"type":"object","properties":{"id":{"type":"string"},"object":{"const":"application"},"livemode":{"type":"boolean"},"partner_ref":{"type":"string"},"status":{"type":"string","enum":["in_progress","missing_data","waiting_loss_runs","ready_to_quote","quoting","quotes_ready","awaiting_signature","bound","declined","closed"]},"status_label":{"type":"string"},"completeness":{"type":"integer"},"missing":{"type":"object","properties":{"to_quote":{"type":"array","items":{"type":"string"}},"to_bind":{"type":"array","items":{"type":"string"}}}},"fields":{"type":"object"},"vehicles":{"type":"array"},"drivers":{"type":"array"},"prior_policies":{"type":"array"},"documents":{"type":"array"},"consents":{"type":"object"},"created_at":{"type":"string"},"updated_at":{"type":"string"}}},"Event":{"type":"object","properties":{"id":{"type":"string"},"object":{"const":"event"},"type":{"type":"string","enum":["application.created","application.status_changed","application.missing_data","application.ready_to_quote","application.declined","application.closed","consent.signed","consent.share_granted","consent.share_revoked","loss_runs.received","quotes.ready","policy.bound","policy.cancel_pending","policy.cancelled","policy.renewal_due"]},"api_version":{"type":"string"},"livemode":{"type":"boolean"},"created":{"type":"string"},"data":{"type":"object"}}}}}}