Skip to main content
POST
/
api
/
adm
/
import
Get Import Batches
curl --request POST \
  --url https://localhost:44371/api/adm/import \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '
{
  "ids": [
    "<string>"
  ],
  "companyId": "<string>",
  "companyProjectId": "<string>"
}
'
{
  "success": true,
  "code": 200,
  "errorMessage": null,
  "entries": []
}

Description

Queries import batch history with flexible filtering for administrative monitoring. Results include batch metadata such as import type, row counts, success/failure statistics, processing status, and timestamps. Used for tracking bulk data imports and reviewing import outcomes.

Input

  • Body: model (ImportBatchQueryRequest, required) — Query parameters including:
    • companyId (guid, optional) — Filter by parent company identifier.
    • projectId (guid, optional) — Filter by project identifier.
    • status (string, optional) — Filter by import status (Pending, Processing, Completed, Failed).
    • startDate (datetime, optional) — Filter by start date (inclusive).
    • endDate (datetime, optional) — Filter by end date (inclusive).
    • limit (int, optional) — Maximum number of records to return.
    • offset (int, optional) — Number of records to skip for pagination.

Output

Returns a ImportBatchQueryResponse containing matched import batches or an empty list if none found.

Example Request

POST /api/admin/importBatches
Content-Type: application/json
Authorization: Bearer {token}

{
  "companyId": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
  "status": "Completed",
  "startDate": "2025-10-01",
  "limit": 50
}

Example Response

{
  "success": true,
  "code": 200,
  "errorMessage": null,
  "entries": [
    {
      "batchId": "9ef15c43-a955-6f4h-c7g3-1h6d4f0e3g9c",
      "companyId": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
      "status": "Completed",
      "totalRows": 1000,
      "successRows": 950,
      "failedRows": 50,
      "createdDate": "2025-10-15T09:00:00Z"
    }
  ],
  "totalCount": 1
}

Errors

  • 400 Bad Request — Invalid query parameters or filter values.
  • 401 Unauthorized — Missing or invalid authentication token.

Notes

  • Empty results return success with an empty entries array.
  • Import status values: Pending, Processing, Completed, Failed.
  • Results are paginated for large datasets; use limit and offset.

Authorizations

Authorization
string
header
required

The access token received from the authorization server in the OAuth 2.0 flow.

Body

application/json

The query parameters including company ID, import type, status, date range, and pagination settings.

Describes the filters that can be applied when querying import batches. Accepted by the import batch listing endpoint to constrain results by batch identifiers and organizational scope.

ids
string<guid>[] | null

Collection of batch identifiers to retrieve. When provided, only matching batch records are returned; omit to retrieve batches by tenant scope alone.

companyId
string<guid> | null

Company identifier used to scope batches. Required when the querying administrator is associated with multiple companies and needs to isolate results to a single tenant.

companyProjectId
string<guid> | null

Company project identifier used to scope batches. Refines the query to a particular project within the selected company, limiting results to the batches staged for that project.

Response

Always returned. Check the success property in the response body to determine if the operation succeeded.

Standard response structure containing operation status and error information. Standard query response containing a collection of matching entities. Represents the paginated response for import batch queries. Wraps a collection of ImportBatchQueryModel entries along with pagination metadata inherited from BaseQueryResponse.

success
boolean

True if the operation completed successfully; false if an error occurred.

Example:

true

code
enum<string>

Result code indicating the outcome of the operation.

Available options:
Unknown,
Success,
BadRequest,
Unauthorized,
NotFound,
Error
Example:

200

errorMessage
string | null

Human-readable error message when an error occurs.

Example:

null

entries
object[] | null

Collection of entities matching the query criteria.

Example:
[]