All Inspections (with Date)
The InspectionsWithDate API is provided by Focalx and can be called by the client’s backend system to retrieve inspections filtered by a start and end date.
Prerequisites
A valid token is required to call this API.
Request
Content Type: application/json
Method:
GET
URL:
/api/v2/service/inspections/inspectionswithdate/
Query Parameters:
- start_date:
Type: String
Format:
YYYY-MM-DD
Description: The start date for filtering inspections.
- end_date:
Type: String
Format:
YYYY-MM-DD
Description: The end date for filtering inspections.
Header Parameters:
- Authorization:
Type: Bearer Token
Description: Client must send the token received from the previous API.
Example Request:
curl --location '{baseurl}/api/v2/service/inspections/inspectionswithdate/?start_date=2025-01-01&end_date=2025-05-31' \ --header 'Authorization: Bearer e77B6mODUJHRBatMKuOPj5qyw' \ --data ''
Response
Response Parameters:
- count:
Type: Integer
Description: The total number of inspections matching the filters.
- next:
Type: String or null
Description: URL to the next page of results, if pagination applies.
- previous:
Type: String or null
Description: URL to the previous page of results, if pagination applies.
- results:
Type: Array of Inspection Objects
Description: List of inspection data matching the date range.
Inspection Object Details:
(The fields below depend on your API’s actual output. I’m reusing fields based on your previous `CreateInspection` response example. Adjust if your GET response differs.)
- id:
Type: String
Description: Unique ID of the inspection.
- latitude:
Type: String
Description: Latitude where the inspection took place.
- longitude:
Type: String
Description: Longitude where the inspection took place.
- process_id:
Type: String
Description: Process ID associated with the inspection.
- platform:
Type: String
Description: Platform used for capturing the inspection (e.g. IOS, Android).
- thumbnail_url_public:
Type: String
Description: Public URL of the inspection’s thumbnail image.
- is_user_approved:
Type: Boolean
Description: Indicates whether the user approved the inspection.
- name:
Type: String
Description: Client’s name.
- phone_number:
Type: String
Description: Client’s phone number.
- email:
Type: String
Description: Client’s email address.
- meta_data:
Type: String
Description: JSON string containing additional metadata sent by the client.
Example Response:
{ "count": 2, "next": null, "previous": null, "results": [ { "id": "ea90225d-4ab1-4376-ba1a-68826835f246", "latitude": null, "longitude": null, "process_id": "EEMUX2AI77W3", "platform": "IOS", "thumbnail_url_public": "https://s3.eu-central.assets/images/car.png", "is_user_approved": false, "name": null, "phone_number": null, "email": null, "meta_data": "\"\"" }, { "id": "ab12345d-4ab1-4376-ba1a-1234567890", "latitude": "55.6761", "longitude": "12.5683", "process_id": "XYZ123ABC", "platform": "Android", "thumbnail_url_public": "https://s3.eu-central.assets/images/anothercar.png", "is_user_approved": true, "name": "John Doe", "phone_number": "+4512345678", "email": "johndoe@example.com", "meta_data": "{\"custom_key\":\"custom_value\"}" } ] }
Status Codes
2xx: Success
400: Application error with parameter issues
401: Unauthorized error
500: Server error
Response Error (when status code is 400)
- error:
Type: String
Description: This will provide a JSON error indicating that parameters are missing or incorrect.