How do I create a Case?
To create a case, you will need to send an authorized POST request ( a request containing the Authorize: Token [your_api_token] header ) to the cases endpoint - /api/v1/cases.
The body of this request should be a JSON object formatted in single key-value pairs. For example:
{
"first_name": "John",
"middle_name": "Tom",
"last_name": "Smith",
"suffix": "Sr",
"nickname": "Tommy",
"date_of_birth": "1950-12-03",
"email": "[email protected]",
"head_of_household": false,
"mailing_address": "123 Adams Street",
"mailing_apt_number": "Apt 45",
"mailing_city": "Exampleville",
"mailing_state": "NY",
"mailing_zip_code": "12345",
"ss_number": "111223333",
"street_address": "123 Adams Street",
"street_apt_number": "Apt 45",
"street_city": "Exampleville",
"street_state": "NY",
"street_zip_code": "12345",
"street_county": 1,
"yearly_expenses": 11580,
"yearly_income": 15350,
"deceased": false,
"private": false,
"household": 1001
}IMPORTANT
The head_of_household and household fields interact depending on the data submitted.
- If no
householdID is provided a household will be created. - A
householdMUST have ahead_of_householdassociated with it, and will associate a case to thehead_of_household( even if set to false ) if it is the only case. - If
head_of_householdis set to true and ahouseholdID is provided, it will overwrite the priorhead_of_household.
The street_county field is an ID for a county record. Query the county endpoint - /api/v1/counties/ - to get a list of all counties configured in your network.
The following fields are NOT able to be set via a POST request:
id- This field is automatically populated by the system. CT/OI does not support third-party IDs for this field. If needed, add a case detail type and associated case detail to store any third-party ID values.roi_exp_date- This will be set to the last valid date of any ROI associated with the case after creation.entry_agent- This will be set to the agent attached to the API keymod_agent- This will be set to the agent attached to the API keygroup- This will be set to the group of the agent attached to the API keyimport_id- This is not supported via the API and is used only for agency imports from other networks
