Get Incident Reports
Method: GET
/api/v1/incident-reports
Description
This endpoint retrieves incident reports based on various filters such as date range, status, tracking ID, and model type. Users can also paginate and sort the results.
🔑 Authentication
This endpoint requires authentication via headers.
| Param | Value | Type |
|---|---|---|
tenantId | {{tenantId}} | string |
userId | {{userId}} | string |
countryCode | {{countryCode}} | string (optional) |
Query Parameters
| Name | Type | Description |
|---|---|---|
incidentSearch | string | Search for incidents by keyword or description. |
incidentDateRange | string | Filter incidents by date range (e.g., 2020-11-12,2022-11-15). |
byTrackingId | string | Filter by tracking ID. |
byIncidentStatus | string | Filter incidents by status (PENDING, RESOLVED, OVERDUE, CANCELLED). |
byModelType | string | Filter by model type (TRADE, PRODUCT, SHIPMENT). |
byModelIds | string | Filter by model IDs (comma-separated). |
byCreatedByIds | string | Filter by creator user IDs (comma-separated). |
order | string | Sort results in ascending (ASC) or descending (DESC) order. |
page | string | Specify the page number for paginated results. |
limit | string | Specify the number of results per page. |
Response: 200 OK
A successful response returns a list of incident reports with their details.
Example Response:
[
{
"incidentId": "67a81ecca9a55da218c22c35",
"trackingId": "TRK123456",
"status": "PENDING",
"modelType": "TRADE",
"modelId": "TRADE123",
"description": "Delayed shipment due to customs hold.",
"createdAt": "2025-02-12T04:04:39.986Z",
"createdBy": {
"userId": "user123",
"name": "Jane Doe"
}
},
{
"incidentId": "89b23fdda1c99cb443f87d02",
"trackingId": "TRK789012",
"status": "RESOLVED",
"modelType": "PRODUCT",
"modelId": "PROD456",
"description": "Product defect reported and resolved.",
"createdAt": "2025-01-15T10:22:30.000Z",
"createdBy": {
"userId": "user456",
"name": "John Smith"
}
}
]
LANGUAGE
CURL REQUEST
curl --request GET \
--url /api/v1/incident-reports \
--header 'accept: application/json' \
--header 'content-type: application/json'
RESPONSE
Click Try It! to start a request and see the response here!