Auditmark

Export reports in bulk

POST
/report-exports

Start an export for each inspection's latest exportable report.

Returns 200 with one item per input id, ALWAYS. One inspection with no exportable report comes back with a null export id and a reason code; it must not fail the other forty-nine. Over the cap is a 422 from validation (BulkExportIn carries max_length=BULK_MAX, defined beside the model), so an oversized body is rejected before it is coerced rather than after.

Authorization

OrgApiKey
AuthorizationBearer <token>

Organization API key. Send as Authorization: Bearer <key>. Create one in Admin > Settings > API keys.

In: header

Request Body

application/json

TypeScript Definitions

Use the request body type in TypeScript.

Response Body

application/json

application/json

curl -X POST "https://api.auditmark.io/v1/report-exports" \  -H "Content-Type: application/json" \  -d '{    "inspection_ids": [      "904bf088-de51-4fbe-8f93-536571c14075"    ]  }'
{  "items": [    {      "inspection_id": "c9b5b83c-f311-4a73-99d1-5e571dd2460c",      "report_id": "5ed7905a-4735-4cf7-b1ab-521e066fb971",      "export_id": "a9a55f8d-48b1-4a5b-a88e-c41b0cd75102",      "status": "string",      "reason": "no_exportable_report"    }  ]}
{  "detail": [    {      "loc": [        "string"      ],      "msg": "string",      "type": "string",      "input": null,      "ctx": {}    }  ]}