API reference › Finance › Documents
Get send-notification PDF attachment options
GET /v1/finance/send-notification-attachment-options
- Scope
finance:read
Returns attachment presets and related finance documents for the Send Notification (send-message) flow. Requires query params type and document_id (same shape as finance download/send-email). Admin/scheduler: terminal primary documents (cancelled/void) return 422. Portal client/provider: eligible closed docs return 200 with none-only presets. Use before sending the message so the client can render the attachment picker.
Parameters
Query parameters
| Name | Type | Description |
|---|---|---|
type required | string | Finance document type One of: |
document_id required | string | Finance document ID for the given type Example |
Every call also sends Authorization and X-Tenant-ID; see Getting started.
Example request
curl "https://api.fetchfido.ai/v1/finance/send-notification-attachment-options?type=pro_forma&document_id=PF-001" \
-H "Authorization: Bearer $FIDO_API_KEY" \
-H "X-Tenant-ID: $FIDO_TENANT_ID"Try it
Responses
200 Attachment options retrieved successfully
Attachment options retrieved successfully
{
"success": true,
"message": "Attachment options retrieved successfully.",
"data": {
"documentType": "pro_forma",
"documentId": "PF-001",
"defaultSelection": "primary_only",
"supportsRelatedSubset": true,
"presets": [
{
"key": "both",
"label": "Pro forma and all invoice PDFs",
"attachableDocuments": [
{
"document_type": "invoice",
"document_id": "INV-001"
}
]
}
],
"relatedDocuments": [
{
"document_id": "INV-001",
"document_type": "invoice",
"label": "INV-001",
"total": 1200
}
]
}
}Response fields (18)
| Field | Type | Description |
|---|---|---|
success | boolean | Example |
message | string | Example |
data | object | |
data.documentType | string | One of: |
data.documentId | string | Example |
data.defaultSelection | string | Invoice and payable default to primary_only; pro forma and payment statement default to none. One of: |
data.supportsRelatedSubset | boolean | True when rollup doc has related children and subset selection applies Example |
data.presets | array of object | |
data.presets[].key | string | One of: |
data.presets[].label | string | Example |
data.presets[].attachableDocuments | array of object | |
data.presets[].attachableDocuments[].document_type | string | Example |
data.presets[].attachableDocuments[].document_id | string | Example |
data.relatedDocuments | array of object | |
data.relatedDocuments[].document_id | string | Example |
data.relatedDocuments[].document_type | string | Example |
data.relatedDocuments[].label | string | Example |
data.relatedDocuments[].total | number (float) or null | Example |
401 Not signed in
Missing, invalid or expired API key.
{
"success": false,
"message": "Invalid API key. Org and user tier keys must send an X-Tenant-ID header naming the organization the key was issued for.",
"errors": null,
"code": "API_KEY_MISSING"
}Response fields (4)
| Field | Type | Description |
|---|---|---|
success | boolean | Example |
message | string | Example |
errors | any or null | Null on this status. |
code | string | Machine-readable reason, for branching on in client code. One of: |
403 Not allowed
Scope, tenant, IP allow-list or RBAC check failed.
{
"success": false,
"message": "You don't have permission to access this endpoint. This API key is missing the 'finance:read' scope.",
"errors": null,
"code": ""
}Response fields (4)
| Field | Type | Description |
|---|---|---|
success | boolean | Example |
message | string | Example |
errors | any or null | Null on this status. |
code | string | Always empty on this status. Example |
422 Validation failed
Validation error, document not found, or terminal primary document (cancelled/void)
{
"success": false,
"message": "Cannot attach PDF — pro forma PF-001 is in a terminal status.",
"errors": "Failed to load attachment options"
}Response fields (3)
| Field | Type | Description |
|---|---|---|
success | boolean | Example |
message | string | Example |
errors | string | Example |
429 Too many requests
Rate limit exceeded. See Retry-After.
{
"success": false,
"message": "You've exceeded this API key's rate limit of 120 requests per minute. Try again in 37 seconds.",
"errors": null,
"code": "RATE_LIMITED"
}Response fields (4)
| Field | Type | Description |
|---|---|---|
success | boolean | Example |
message | string | Example |
errors | any or null | Null on this status. |
code | string | Machine-readable reason, for branching on in client code. One of: |