Invoice Attachment Schema
File attachments for invoices including receipts, contracts, and supporting documents
The Invoice Attachment schema defines the structure and properties of invoice attachment objects in the Payload API. Invoice attachments are file resources that can be associated with invoices to provide supporting documentation such as receipts, contracts, detailed breakdowns, or any other relevant files. Attachments help provide additional context and documentation for billing records.
Invoice Attachment Object Properties
Complete reference for all properties available in the Invoice Attachment schema
attrsobject
Custom attributes for extending the resource with additional key-value pairs. Maximum length is 255 characters when serialized.
created_atstring (date-time)Read-only
Timestamp when the resource was created. Automatically set by the system and immutable.
descriptionstring
Optional free-form text description providing additional context or notes about the file. This can be used to store information about the file's purpose, contents, or any other relevant details for reference.
Max length: 52
filenamestring
The original filename of the uploaded file as provided by the user. This preserves the user-friendly name for display purposes and reference, while the system uses a separate internal filename for storage.
Max length: 52
idstringRead-only
Unique identifier for the resource. Automatically generated upon creation and cannot be modified. (ID prefix: file)
Pattern:
^file_[A-Za-z0-9]+$invoice_id ID of Invoicestring
The unique identifier of the invoice that this file is attached to. Links the attachment to its parent invoice. Attachments can be used to include supporting documents like receipts, contracts, or detailed breakdowns with the invoice. (ID prefix: None)
Pattern:
^None_[A-Za-z0-9]+$modified_atstring (date-time)Read-only
Timestamp when the resource was last modified. Automatically updated whenever any field changes.
objectenum[string]Read-only
String representing the object type for this resource.
Values:
invoice_attachmentsizeinteger (int64)Read-only
The size of the uploaded file in bytes. This field is automatically calculated when the file is uploaded and stored, and is read-only. It can be used for display purposes or to enforce storage quotas.
typestring
The file type extension of the uploaded file. Possible values include: svg, pdf, png, jpg, jpeg, and docx. This is automatically detected from the uploaded file and is used to validate allowed file types and apply appropriate security checks.
Max length: 12
urlstringRead-only
The publicly accessible URL where the file can be retrieved. This URL is automatically generated based on the internal filename and the configured server hostname. The URL will use HTTPS in production environments and HTTP otherwise.
Max length: 64