InvoiceAttachment
List the invoice's attachments
GET /api/v1/invoices/{id}/attachments
Requires authentication (Bearer token) and the X-Organization-Id header.
Metadata only (file_name, file_size, mime_type, description); bytes come from the download endpoint. (#847)
Parameters
| Name | In | Type | Required | Description |
|---|---|---|---|---|
id |
path | integer | yes |
Responses
| Status | Description |
|---|---|
| 200 | For non-paginated data, return as before |
Example request
curl -X GET "https://app.encryptinvoice.com/api/v1/invoices/{id}/attachments" \
-H "Authorization: Bearer {{access_token}}" \
-H "X-Organization-Id: {{organization_id}}" \
-H "Accept: application/json"
Upload an attachment to the invoice
POST /api/v1/invoices/{id}/attachments
Requires authentication (Bearer token) and the X-Organization-Id header.
Multipart file (max 10 MB; pdf, images, office documents, csv, txt) + optional description. (#847)
Parameters
| Name | In | Type | Required | Description |
|---|---|---|---|---|
id |
path | integer | yes |
Responses
| Status | Description |
|---|---|
| 201 | For non-paginated data, return as before |
| 422 |
Example request
curl -X POST "https://app.encryptinvoice.com/api/v1/invoices/{id}/attachments" \
-H "Authorization: Bearer {{access_token}}" \
-H "X-Organization-Id: {{organization_id}}" \
-H "Accept: application/json"
Delete an invoice attachment
DELETE /api/v1/invoices/{id}/attachments/{attachmentId}
Requires authentication (Bearer token) and the X-Organization-Id header.
Soft-deletes the attachment record (it disappears from the listing); the model's deleting hook also removes the stored file, matching the Filament removal path. 404 when the attachment does not belong to the invoice or the organization. (#981)
Parameters
| Name | In | Type | Required | Description |
|---|---|---|---|---|
id |
path | integer | yes | |
attachmentId |
path | integer | yes |
Responses
| Status | Description |
|---|---|
| 200 | For non-paginated data, return as before |
Example request
curl -X DELETE "https://app.encryptinvoice.com/api/v1/invoices/{id}/attachments/{attachmentId}" \
-H "Authorization: Bearer {{access_token}}" \
-H "X-Organization-Id: {{organization_id}}" \
-H "Accept: application/json"
Download an invoice attachment
GET /api/v1/invoices/{id}/attachments/{attachmentId}/download
Requires authentication (Bearer token) and the X-Organization-Id header.
Streams the stored file with its original filename. (#847)
Parameters
| Name | In | Type | Required | Description |
|---|---|---|---|---|
id |
path | integer | yes | |
attachmentId |
path | integer | yes |
Responses
| Status | Description |
|---|---|
| 200 | |
| 404 |
Example request
curl -X GET "https://app.encryptinvoice.com/api/v1/invoices/{id}/attachments/{attachmentId}/download" \
-H "Authorization: Bearer {{access_token}}" \
-H "X-Organization-Id: {{organization_id}}" \
-H "Accept: application/json"