Skip to main content

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.

ParamValueType
tenantId{{tenantId}}string
userId{{userId}}string
countryCode{{countryCode}}string (optional)

Query Parameters

NameTypeDescription
incidentSearchstringSearch for incidents by keyword or description.
incidentDateRangestringFilter incidents by date range (e.g., 2020-11-12,2022-11-15).
byTrackingIdstringFilter by tracking ID.
byIncidentStatusstringFilter incidents by status (PENDING, RESOLVED, OVERDUE, CANCELLED).
byModelTypestringFilter by model type (TRADE, PRODUCT, SHIPMENT).
byModelIdsstringFilter by model IDs (comma-separated).
byCreatedByIdsstringFilter by creator user IDs (comma-separated).
orderstringSort results in ascending (ASC) or descending (DESC) order.
pagestringSpecify the page number for paginated results.
limitstringSpecify 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

AUTHORIZATION

Bearer

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!