Public API (v1)
Endpoints
There are two environments. One for testing (development
) and one for production (production
).
Environment | URL |
---|---|
development | https://api.dev.it.freshforfinance.de/public/v1 |
production | https://api.freshforfinance.de/public/v1 |
Authentication
To use the public API, you have to provide the header X-Authorization
in every request (X-Authorization: API_KEY
).
Header | Required | Value | Description |
---|---|---|---|
|
| Ask our support team for your |
Claims
The API allows the creation of a claim in the fresh for finance Portal and the transmission of this claim to the insurer. The whole process consists of multiple steps:
create a claim
upload file(s)
transmit claim to insurer (optional - can also be done after manual check in the fresh for finance Portal)
The UI can be accessed here:
Environment | URL |
---|---|
development | https://portal.dev.it.freshforfinance.de/schadenmeldung/cardamage/list |
production | https://portal.freshforfinance.de/schadenmeldung/cardamage/list |
1. Create a claim
This API endpoint is used to create a claim in the fresh for finance Portal. The claim includes information about an accident, involving details about the location, date, time, description, involved parties, and other relevant information.
Example
Request
POST /claims
Content-Type: application/json
{
"location": "Musterhausen",
"date": "2023-12-31",
"time": "16:00:00",
"description": "Lorem Ipsum...",
"contact_driver": false,
"contact_opponent": false,
"insurer_notes": "Lorem Ipsum...",
"insurer_contract_id": "12345",
"insurer_claim_id": "S12345",
"carsharer_claim_id": "C12345",
"liability": "UNKNOWN",
"type": ["HP", "TK"],
"police": false,
"police_file_id": "12345",
"police_department": "ABC",
"police_address": "Musterstraße 1, 12345 Musterhausen",
"alcohol": false,
"vehicleOfPolicyholder": {
"identification": "KA-X 123",
"milage": 123,
"estimated_cost_of_repair": 5000,
"driver": {
"name": "Max Mustermann",
"birthdate": "2000-01-01",
"address": "Musterstr. 1, 12345 Musterhausen",
"email": "max.mustermann@example.com",
"phone": "+49123456789",
"injured": false
}
},
"vehicleOfOpponent": {
"identification": "KA-X 456",
"estimated_cost_of_repair": 5000,
"policyholder": {
"name": "Max Mustermann",
"birthdate": "2000-01-01",
"address": "Musterstr. 1, 12345 Musterhausen",
"email": "max.mustermann@example.com",
"phone": "+49123456789",
"injured": false
},
"driver": {
"name": "Max Mustermann",
"birthdate": "2000-01-01",
"address": "Musterstr. 1, 12345 Musterhausen",
"email": "max.mustermann@example.com",
"phone": "+49123456789",
"injured": false
}
},
"injuredPersons": [
{
"name": "Max Mustermann",
"birthdate": "2000-01-01",
"address": "Musterstr. 1, 12345 Musterhausen",
"email": "max.mustermann@example.com",
"phone": "+49123456789"
},
{
"name": "Erika Musterfrau",
"birthdate": "2000-01-01",
"address": "Musterstr. 1, 12345 Musterhausen",
"email": "max.mustermann@example.com",
"phone": "+49123456789"
}
],
"witnesses": [
{
"name": "Max Mustermann",
"birthdate": "2000-01-01",
"address": "Musterstr. 1, 12345 Musterhausen",
"email": "max.mustermann@example.com",
"phone": "+49123456789"
},
{
"name": "Erika Musterfrau",
"birthdate": "2000-01-01",
"address": "Musterstr. 1, 12345 Musterhausen",
"email": "max.mustermann@example.com",
"phone": "+49123456789"
}
]
}
Response
201 Created
{
"data": {
"claim_id": 123,
},
}
Fields
Parameter | Type | Required | Constraints | Description |
---|---|---|---|---|
| string | max:255 | The location of the accident. | |
| string | Format: Examples: | The date of the accident. Must be before or equal to today. | |
| string | Format: Examples: | The time of the accident. | |
| string | max:65535 | A description of the accident. | |
| boolean |
| Indicates whether the driver should be contacted by the insurer. | |
| boolean |
| Indicates whether the opponent should be contacted by the insurer. | |
| string | max:65535 | Notes for the insurer. | |
| string | max:255 | The insurer's contract ID. | |
| string | max:255 | The insurer's claim ID. | |
| string | max:255 | The carsharer's claim ID. | |
| string | One of:
| The liability status. | |
| array |
| An array of claim types. | |
| string | One of:
| A claim type. | |
| boolean |
| Indicates whether the police were involved. | |
| string | max:255 | The police file ID. | |
| string | max:255 | The police department involved. | |
| string | max:255 | The address of the police department. | |
| boolean |
| Indicates whether alcohol was involved. | |
| object |
|
| |
| string | max:255 | License plate of the policyholder's vehicle. | |
| integer | min:0 | Milage of the policyholder's vehicle im kilometers. | |
| integer | min:0 | Estimated cost of repair for the policyholder's vehicle. | |
| object |
|
| |
| string | max:255 | Name of the driver of the policyholder's vehicle. | |
| string | Format: Examples: | Birthdate of the driver. | |
| string | max:255 | Address of the driver. | |
| string | max:255 | Email of the driver. | |
| string | max:255 | Phone number of the driver. | |
| boolean |
| Indicates whether the driver is injured. | |
| object |
|
| |
| string | max:255 | License plate of the opponent's vehicle. | |
| integer | min:0 | Estimated cost of repair for the opponent's vehicle. | |
| object |
|
| |
| string | max:255 | Name of the policyholder of the opponent's vehicle. | |
| string | Format: Examples: | Birthdate of the policyholder. | |
| string | max:255 | Address of the policyholder. | |
| string | max:255 | Phone number of the policyholder. | |
| max:255 | Email of the policyholder. | ||
| boolean |
| Indicates whether the policyholder is injured. | |
| object | This field should be empty, if the policyholder of the opponent is the same person as the driver. |
| |
| string | max:255 | Name of the driver of the opponent's vehicle. | |
| string | Format: Examples: | Birthdate of the driver. | |
| string | max:255 | Address of the driver. | |
| max:255 | Email of the driver. | ||
| string | max:255 | Phone number of the driver. | |
| boolean |
| Indicates whether the driver is injured. | |
| array |
| An array of injured persons. | |
| string | max:255 | Name of the injured person. | |
| string | Format: Examples: | Birthdate of the injured person. | |
| string | max:255 | Address of the injured person. | |
| max:255 | Email of the injured person. | ||
| string | max:255 | Phone number of the injured person. | |
| array |
| An array of witnesses. | |
| string | max:255 | Name of the witness. | |
| string | Format: Examples: | Birthdate of the witness. | |
| string | max:255 | Address of the witness. | |
| string | max:255 | Email of the witness. | |
| string | max:255 | Phone number of the witness. |
2. Upload file(s)
2.1. Request file upload
This is the first step to upload a file. It used to request the upload of a image or other file to a claim.
Example
Request
POST /claims/{claim_id}/file
Content-Type: application/json
{
"type": "IMAGE",
"filename": "example.jpg"
}
Response
201 Created
{
"data": {
"file_id": "UUID",
"presigned_url": "https://...",
},
}
Fields
Parameter | Type | Required | Constraints | Description |
---|---|---|---|---|
| string | One of:
| The type of the file. There are two locations in the UI to store files:
This option is just to specify this location. There is no check for the mimetype. You can upload every filetype to every type ( | |
| string | max:255 Examples: | The name of the file with extension. |
2.2. Upload file
This is the second step after requesting a file upload. You need to call the presigned_url
from the response of the previous api request to upload the file.
Example
Request
PUT {presigned_url}
binary file
Response
200 OK
2.3. Finalize file
This is the third and last step to upload a file. It is used to notify the API about the successful upload of a file and need to be called after the upload is finished. Otherwise the file will be deleted after a few hours.
Example
Request
POST /claims/{claim_id}/file/{file_id}/finalize
Response
200 OK
3. Transmit to insurer
This API endpoint is used to start the transmission of the claim to the insurer. This step is optional and can also be done via the UI, if someone should check or complete the claim there first.
Example
Request
POST /claims/{claim_id}/transmit-to-insurer
Response
200 OK