Link an attachment to a record
POST/attachments/:id/links
Associates an existing attachment with a payable / receivable / transaction. The {id} path segment is the attachment; the body identifies the parent. Requires scope finance.attachments.write. Returns 409 when the association already exists, 404 when either the attachment or the parent is outside the tenant.
Request
Responses
- 201
- 400
- 401
- 403
- 404
- 409
- 422
- 500
Association created. Echoes { attachment_id, parent_type, parent_id }.
Malformed JSON body.
Missing / invalid / expired / revoked token.
Token lacks the finance.attachments.write scope.
Attachment or parent record not found within the tenant.
The attachment is already linked to this record.
Schema validation failure (unknown type, non-uuid id).
Unhandled server error.