---
# System prepended metadata

title: Accident.com SSDI Seller API Documentation

---




# Accident.com SSDI Seller API Documentation

Table of Content

* Endpoints
* Authentication
* Type of Leads
* Request Object for `lead` Type
     * List of Accepted `case_type` Values
     * Anatomy of `fields` Array
     * The `ref` Guide
     * Response Object
     * Understanding Responses
     * References for `case_type` - SSDI
	     * Sample Request
 * Sample Request with Post Back URL / Pixel with SubID params



## Endpoints
|Environment   	|Link   
|---	|---	|
|Production	|https://api.accident.com/api/lead-create	

## Authentication

The `api-key` and `api-secret` header should be set in order to make requests to our API. These credentials will be provided by Team@Accident.com along with Deal Identifiers used later in the requests. 



```
#!curl

$ curl --location --request POST '<ENDPOINT>' \
--header 'api-key: XXXXXXXXX' \
--header 'api-secret: XXXXXXXXX'
```

## Request for `lead` Type

The request body for `type` - `lead` should comply with these rules.

|Name   	|Required   	|Type   	|Description   	|
|---	|---	|---	|---	|
| `arrived_at `  	| True  	| Timestamp 	| Should be in `UTC`.   	|
| `test_mode`  	|   False	|  Boolean	|  `Default : false`. Should be set as true if the API call is used to send test data.
| `deal`  	|   True	|  Text	|  You will receive a deal ID string along with your credentials. This is usually sent in a separate email communication. 	
| `lead_first_name`  	|  False 	| Text  	| First name of the lead. 
| `lead_last_name`  	|  False 	| Text  	| Last name of the lead. 
| `lead_email`  	| True  	| Email   	| Email Address of the Lead.
| `lead_phone`  	| True  	| Phone  	| Phone number of the lead. This can be either in US Domestic format ( Eg: `(541) 754-3010` ) or in E.164 format ( Eg: `+14155552671` )
|  `case_type`  	| True  	| Text  	| The injury type identified in the phone conversation. 
| `zip_code`  	| True  	|  US Zip Code	| Location of the Lead. 
| `time_to_call`  	| False  	|  Text	| If the lead has a time preference for callback, pass that in this parameter.
| `fields`  	| True  	|  Array 	| The request body for each case type differs as it has a specific set of references. Each element in the `fields` array is detailed below.
| `post_back_url`  	| False  	|  URL 	| URL/Endpoint on vendor's system to hit if the lead received matches the payable criteria according to the insertion order or a payable event discussed mutually. The URL should ideally be specified with the HTTP Method in `post_back_method` parameter. If no `post_back_method` is provided, system will default it to a `GET` request.
| `post_back_method`  	| False  	|  HTTP Method 	| If there's a post back URL that should be triggered on receiving a lead that matches the payable criteria according to the insertion order or a payable event discussed mutually, specify the the URL in `post_back_url`. If no `post_back_method` is provided, the system will default it as a `GET` request.
| `lead_instance_id`  	| False  	|  Text 	| The vendor can share their lead ID with us using this parameter
| `subid1`  	| False  	|  Text 	| Custom parameter
| `subid2`  	| False  	|  Text 	| Custom parameter
| `subid3`  	| False  	|  Text 	| Custom parameter
| `subid4`  	| False  	|  Text 	| Custom parameter
| `subid5`  	| False  	|  Text 	| Custom parameter
| `certificate_type`  	| True  	|  String 	| This field will tell us what kind of certificate we are receiving (Jornaya or Trusted Form)
| `certificate_id`  	| True  	|  String 	| Unique ID for the certificate
| `certificate_url`  	| True  	|  String 	| URL to retrieve the certificate (we will most likely only receive this from sources who are using Trusted Form
| `source_url`  	| True  	|  String 	| URL where the lead opt-in took place (should expect this to be received in a standard URL format, preceding with https:// or potentially without https://
| `ip_address`  	| True  	|  String 	| IP address of the user, for example: 47.36.32.241


### List of Accepted `case_type` Values

Mentioned below are `case_type` values that we support. Any `case_type` values that doesn't match with items from this list, should be entered as meaningful text. 

For all such new `case_type` the request body should have references of `SSDI`. The sample for the request is provided later in this document.

|  Case Type 	|   Value	| Description
|---	|---	|---	|
| SSDI 	| `SSDI`  	|  If the lead is a SSDI Compensation case. 	|

### Anatomy of Fields Array

The fields array in the request contains objects. Each of these objects has three properties


|  Property  	|   Required	| Description
|---	|---	|---	|
| `ref`  	| True  	|  The question reference is used by our internal system to identify the questions that are being passed. 	|
| `title` 	| False  	| If you believe that you want to share the question that was used, it should be passed in this field.  	|
| `answer`  	| True  	| The answer comes from a set of choices or adheres to a type. The " `ref` guide " section explains the `ref` and their rules. 	|

Example : 


```
#!json

 {
           "ref":"have_attorney",
           "title": "Do you have an attorney representing you for this matter?",
           "answer" : "No"
  }

```

### The `ref` Guide

Below are all of the `ref` values that can be used in the `fields` array. Each `ref` has a type and can be a choice of options, a boolean or text. We have included the default question that will get considered should the ref object have a missing `title` property. The explanation of which `ref` objects to be used for each `case_type` is mentioned later in the document. The answers in the field object should come strictly from the set of values provided below.


|  Ref Key	|   Type	|   Choices	| Description | Default Question |
|---	|---	|---	|---	|---	|
|`unable_to_work`|Yes/No|`Yes`,`No`|The lead should not be able to work for at least 12 months as a result of their medical condition in order to qualify for SSDI.|`Are you out of work for at least 12 months due to your medical condition?`
|`years_employed_boolean`|Yes/No|`Yes`,`No`|Applicant must have worked at least 5 out of the last 10 years. If the applicant has not worked at least 5 out of the last 10 years, they will not qualify for SSDI.|`Over the last 10 years, have you worked at least half that time?`
|`receiving_benefits`|Yes/No|`Yes`,`No`|If the applicant is already receiving SSDI benefits.|`Are you receiving, or have you been approved for disability benefits?`
|`expressed_interest`|Yes/No|`Yes`,`No`|If the caller is interested in speaking with an attorney or agent regarding their case. |`Are you interested in speaking with an SSDI representative to discuss your eligibility to receive benefits?`
|`currently_working`|  Yes/No |`Yes`,`No`| If `Yes`, ask `stopping_work`. Applicant should be unable to work in order to qualify.  | `Are you currently working?`
|`stopping_work`|  Yes/No |`Yes`,`No`| If `currently_working` is `Yes`, then ask `stopping_work`. If `stopping_working` is `No`, then disqualify.|`Will you stop working within the next 2 months because of your disability?`
|`last_employed_on`|Enum / Text|`MM-DD-YY` , `MM-DD-YYYY`, `MM-YYYY` ,`YYYY`,`10+ years`,`2 - 5 years`,`6 - 9 years`,`Less than 1 year`| Eligibility for SSDI depends  on when applicant last worked. If applicant is unsure of the date, select range. If `last_employed_on` is over 5 years, disqualify. | `When was the last time you worked?`
|`challenges_at_work`|Yes/No|`Yes`, `No`|The purpose of this question is to ensure that the disability is catastrophic, and prevents the lead from being able to do tasks for a prolonged period of time. This field is required. If `Yes`, disqualify. |`Can you stand, sit, walk, or lift objects for long periods of time?`
|`doctor_treatment`|Yes/No|`Yes`,`No`|The lead must be receiving medical treatment for their disability to be eligible to receive benefits. If `No`, disqualify. |`Are you seeing a doctor for these conditions?`
|`doctor_work_recommendation`|Yes/No|`Yes`,`No`|The lead must be unable to work for at least 12 months when applying for SSDI.|`Has your doctor told you that you can’t work for at least 1 year due to your disability?`
|`age` |Text|n/a|We will only accept a Number Input. For date, use`dob` field. |`What is your age?`
|`dob` | Date / Month & Year / Year |`MM-DD-YY` , `MM-DD-YYYY`, `MM-YYYY` ,`YYYY`| Valid date of birth. |`What is your date of birth?`
|`years_employed`|Enum / Text|`1 - 4 years`,`10+ years`,`5 - 9 years`, `MM-DD-YY` , `MM-DD-YYYY`, `MM-YYYY` ,`YYYY`|Applicant must have been working at least 5 out of the last 10 years. If `years_employed` is less than 5, then disqualify. |`Out of the last 10 years, how many years did you work?`
|`received_legal_advise`|Yes/No|`Yes`,`No`|If the applicant has received legal assistance |`Have you already spoken to a lawyer or SSDI representative about your case?`
|`household_income`|`Text`|NA|If the applicant has an income source. This field is optional|`Do you have any household income?`
|`applied_ssdi`|Yes/No|`Yes`,`No`|If the applicant has applied for disability |`Have you already applied for disability benefits?`
| `terms`  	|  Yes/No 	| `I agree`, `I do not Agree`	| Single Choice. The lead agrees to Accident.com's terms of service.	| `Please read and accept our Terms of Service` |
| `comments`  	|  Text 	| NA	| Text.  Please include additional details about the case here.  	| `Describe your case` |


### Response Object

Mentioned below are the properties that will be present in the response object.

|  Key	| Description |
|---	|---	|
|`status`	| `created` - to acknowledge we received the details. `failed` - We received the details but the request was poorly formulated. `error` - Something has gone wrong.  	|
|`result`	| `success` - we assert that we received this request  	|
|`message`	|  acknowledgement message for the request 	|


Response Skeleton


```
#!xml

<?xml version="1.0"?>
<response>
<message>Lead generated successfully</message>
<status>created</status>
<result>success</result>
</response>
```


### References for `case_type` - SSDI

Following set of references should be passed for `SSDI` case type.

* `applied_ssdi`
* `receiving_benefits`
* `currently_working`
* `stopping_work`
* `last_employed_on`
* `years_employed`
* `challenges_at_work`
* `doctor_treatment`
* `doctor_work_recommendation`
* `age or dob - either one of these`
* `have_attorney`
* `signed_retainer`
* `comments`

#### Sample Request - SSDI

```
#!curl

curl --location --request POST 'https://api.accident.com/api/accident-create-lead' \
--header 'api-key: some_key' \
--header 'api-secret: some_secret' \
--header 'Content-Type: application/json' \
--data-raw '{
		"arrived_at": "2020-04-13T22:33:47Z",
		"test_mode": "false",
		"lead_first_name": "TestFirst",
		"lead_last_name": "Testlast",
		"lead_email": "test@accident.com",
		"lead_phone": "9999999999",
		"case_type": "SSDI",
		"zip_code": "10022",
                "certificate_type":"Jornaya",
                "certificate_id":"1AEI968O-8U94-FBCB-XX01-9X9X9XXX9X9X",
                "certificate_url":"https://cert.trustedform.com/9999ce9b999ffdc999d9999d99999999999f7999",
                "source_url":"https://testaccidentxxxxx.com",
                "ip_address":"47.36.32.XXX",
		"fields": [
		{
			"ref": "applied_ssdi",
			"title": "Have you already applied for disability benefits?",
 			"answer": "No"
		},
		{
			"ref": "receiving_benefits",
			"title": "Are you receiving, or have you been approved for disability benefits?",
			"answer": "No"
		},
		{
			"ref": "currently_working",
			"title": "Are you currently working?",
			"answer": "No"
		},
		{
			"ref": "comments",
			"title": "What is your disability? Please briefly describe your injuries.",
			"answer": "I was injured and now I can not work"
		},
		{
			"ref": "last_employed_on",
			"title": "When was the last time you worked?",
			"answer": "11/07/2021"
		},
		{
			"ref": "challenges_at_work",
			"title": "Can you stand, sit, walk, or lift objects for long periods of time?",
			"answer": "No"
		},
		{
			"ref": "doctor_treatment",
			"title": "Are you seeing a doctor for these conditions?",
			"answer": "Yes"
		},
		{
			"ref": "doctor_work_recommendation",
			"title": "Has your doctor told you that you can’t work for at least 1 year due to your disability?",
			"answer": "Yes"
		},
		{
			"ref": "dob",
			"title": "What is your date of birth?",
			"answer": "08/19/1970"
		},
		{
			"ref": "age",
			"title": "May I have your age?",
			"answer": "50"
		},
		{
			"ref": "years_employed",
			"title": "Out of the last 10 years, how many years did you work?",
			"answer": "10+ years"
		},
		{
			"ref": "household_income",
			"title": "Do you have any household income?",
			"answer": "Yes"
		},
		{
			"ref": "have_attorney",
			"title": "Do you already have a lawyer representing you?",
			"answer": "No"
		},
		{
			"ref": "signed_retainer",
			"title": "Did you sign a retainer with a lawyer for your case?",
			"answer": "No"
		}
	]
}
'
```


##  Sample Request with Post Back URL / Pixel with SubID params

Post Back URLs help us communicate back to our Vendor that a payable event has occured. If the lead received matches the payable criteria according to the insertion order or a payable event discussed mutually,  `post_back_url` can be used as a way of communicating back to the vendor that a payable condition was just met.

It's vital that `post_back_url`is accompanied with a `post_back_method` to make a valid HTTP request. If `post_back_method` is not specified, system will default it as a `GET` request.

A few sub ID params are also populated in the  request.

    #!curl
    
    curl --location --request POST 'https://api.accident.com/api/accident-create-lead' \
    --header 'api-key: some_key' \
    --header 'api-secret: some_secret' \
    --header 'Content-Type: application/json' \
    --data-raw '{
	    "arrived_at": "2021-07-27T23:42:55Z",
	    "test_mode": "false",
	    "type": "lead",
	    "deal":"deal_id_string",
	    "lead_first_name": "test",
	    "lead_last_name": "test",
	    "lead_email": "tester1@accident.com",
	    "lead_phone": "9175405450",
	    "case_type": "SSDI",
	    "zip_code": "82001",
	    "post_back_method": "POST",
	    "post_back_url": "https://post-back.free.beeceptor.com",
	    "lead_instance_id": "12456",
        "subid1": "689",
        "subid2": null,
        "subid3": "display",
        "subid4": null,
        "subid5": null,
        "certificate_type":"Jornaya",
        "certificate_id":"1AEI968O-8U94-FBCB-XX01-9X9X9XXX9X9X",
        "certificate_url":"https://cert.trustedform.com/9999ce9b999ffdc999d9999d99999999999f7999",
        "source_url":"https://testaccidentxxxxx.com",
        "ip_address":"47.36.32.XXX",
	    "fields": [
		{
			"ref": "applied_ssdi",
			"title": "Have you already applied for disability benefits?",
 			"answer": "No"
		},
		{
			"ref": "receiving_benefits",
			"title": "Are you receiving, or have you been approved for disability benefits?",
			"answer": "No"
		},
		{
			"ref": "currently_working",
			"title": "Are you currently working?",
			"answer": "No"
		},
		{
			"ref": "comments",
			"title": "What is your disability? Please briefly describe your injuries.",
			"answer": "I was injured and now I can not work"
		},
		{
			"ref": "last_employed_on",
			"title": "When was the last time you worked?",
			"answer": "11/07/2021"
		},
		{
			"ref": "challenges_at_work",
			"title": "Can you stand, sit, walk, or lift objects for long periods of time?",
			"answer": "No"
		},
		{
			"ref": "doctor_treatment",
			"title": "Are you seeing a doctor for these conditions?",
			"answer": "Yes"
		},
		{
			"ref": "doctor_work_recommendation",
			"title": "Has your doctor told you that you can’t work for at least 1 year due to your disability?",
			"answer": "Yes"
		},
		{
			"ref": "dob",
			"title": "What is your date of birth?",
			"answer": "08/19/1970"
		},
		{
			"ref": "age",
			"title": "May I have your age?",
			"answer": "50"
		},
		{
			"ref": "years_employed",
			"title": "Out of the last 10 years, how many years did you work?",
			"answer": "10+ years"
		},
		{
			"ref": "household_income",
			"title": "Do you have any household income?",
			"answer": "Yes"
		},
		{
			"ref": "have_attorney",
			"title": "Do you already have a lawyer representing you?",
			"answer": "No"
		},
		{
			"ref": "signed_retainer",
			"title": "Did you sign a retainer with a lawyer for your case?",
			"answer": "No"
		}
	]
		  }'