documents media collection (Spatie Media Library). Served by DocumentController::index().App\Http\Controllers\Api\V1\Diver\DocumentController::index()api.v1.diver.documents.indexAuthorization: Bearer {token}GET/api/v1/diver/documents200 OKdata: []) — both shapes captured live.{
"success": true,
"status": "success",
"message": "OK",
"data": [
{
"id": 79730,
"name": "example-document.jpg",
"file_name": "example-document.jpg",
"mime_type": "image/jpeg",
"size": 89493,
"url": "https://raid-backend.s3.eu-west-2.amazonaws.com/user_documents/79730/example-document.jpg?X-Amz-Algorithm=AWS4-HMAC-SHA256&X-Amz-Credential=EXAMPLE&X-Amz-Date=20260615T100000Z&X-Amz-Expires=3600&X-Amz-SignedHeaders=host&X-Amz-Signature=EXAMPLE",
"created_at": "2025-03-25 13:58:53"
},
{
"id": 79732,
"name": "example-document-2.jpg",
"file_name": "example-document-2.jpg",
"mime_type": "image/jpeg",
"size": 146117,
"url": "https://raid-backend.s3.eu-west-2.amazonaws.com/user_documents/79732/example-document-2.jpg?X-Amz-Algorithm=AWS4-HMAC-SHA256&X-Amz-Credential=EXAMPLE&X-Amz-Date=20260615T100000Z&X-Amz-Expires=3600&X-Amz-SignedHeaders=host&X-Amz-Signature=EXAMPLE",
"created_at": "2025-03-25 14:01:49"
}
]
}| Field | Type | Nullable | Notes |
|---|---|---|---|
id | integer | No | Spatie Media model id |
name | string | No | Same value as file_name in every record observed — TO VERIFY whether they can diverge (Media Library allows a separate display name, not exercised in this dataset) |
file_name | string | No | |
mime_type | string | No | |
size | integer | No | Bytes |
url | string | No | S3 signed URL, valid for 60 minutes (X-Amz-Expires=3600). Do not store it: fetch the list again to get a fresh one |
created_at | string | Yes | Y-m-d H:i:s |
401 Unauthorized{
"success": false,
"status": "error",
"message": "Unauthenticated"
}POST /api/v1/diver/documents (see POST_upload.md), but those uploads go to the medical and insurance media collections (medical_certificate, medical_certificate_professional, insurance_certificate), which this list does not read. It lists only the documents collection. List them with GET /api/v1/diver/medical-documents (see ../medical-documents/GET_list.md).TO VERIFY: how documents reach the documents collection (likely the web backend, not the API).url is a signed URL that expires after 60 minutes. The examples above carry a fabricated signature: a real one is not shown.docs/api/diver/documents/GET_list.mdcurl --location 'https://test.diveraid.com/api/v1/diver/documents' \
--header 'Authorization: Bearer <token>'{
"status": "success",
"message": "string",
"data": [
{
"id": 0,
"name": "string",
"file_name": "string",
"mime_type": "string",
"size": 0,
"url": "string",
"created_at": "2019-08-24T14:15:22.123Z"
}
]
}