Skip to content
Developerhome
Sage Network API

AttachmentModel

  Less than to read

An Attachment is a file that can be attached to various account attributes within Sage Network. This data model contains metadata about the attachment. You can upload and download attachments into the Sage Network along with this metadata. Attachments can be used for invoices, payments, legal documents, or any other external files that you wish to track.

See Extensibility for more information.

Methods

The following API methods use this data model.

uuid, read-only

The unique ID of this record, automatically assigned by Sage Network when this record is added to the Sage Network.

groupKey

uuid, read-only

The GroupKey uniquely identifies a single Sage Network account. All records for this account will share the same GroupKey value. GroupKey values cannot be changed once created.

For more information, see Accounts and GroupKeys.

tableKey

string, read-only, 1-40 characters

An Attachment is connected to an existing item within the Sage Network by the fields TableKey and ObjectKey. For example, an Attachment connected to Invoice 12345 would have a TableKey value of Invoice and an ObjectKey value of 12345.

The TableKey value contains the name of the table within the Sage Network to which this Attachment is connected.

For more information, see linking metadata to an object.

objectKey

uuid, read-only, min 1 characters

An Attachment is connected to an existing item within the Sage Network by the fields TableKey and ObjectKey. For example, an Attachment connected to Invoice 12345 would have a TableKey value of Invoice and an ObjectKey value of 12345.

The ObjectKey value contains the primary key of the record within the Sage Network to which this Attachment is connected.

For more information, see linking metadata to an object.

fileName

string, nullable, read-only, 0-200 characters

An Attachment represents a file that was uploaded to the Sage Network. This field contains the original name of the file on disk, without its extension.

fileExt

string, nullable, read-only, 0-20 characters

An Attachment represents a file that was uploaded to the Sage Network. This field contains the original extension name of the file on disk.

erpKey

string, nullable, read-only

The unique ID of this record as it was known in its originating financial system.

If this company record was imported from a financial system, it will have the value ErpKey set to the original primary key number of the record as it was known in the originating financial system. If this record was not imported from a financial system, this value will be null.

For more information, see Identity Columns.

appEnrollmentId

uuid, nullable, read-only

The AppEnrollmentId of the application that imported this record. For accounts with more than one financial system connected, this field identifies the originating financial system that produced this record. This value is null if this record was not loaded from an external ERP or financial system.

created

date-time, read-only

The date the attachment was created.

createdUserId

uuid, read-only

The unique ID of the UserAccount of the user who created this Attachment.

Required Fields

isArchived

boolean

A flag indicating whether this Attachment is archived (also known as hidden or deleted). When you call ArchiveAttachment this field will be set to true.

You should avoid displaying Attachments with the IsArchived field set to true in your user interface.

Optional Fields

attachmentType

string, nullable, 0-100 characters

A text string describing the type of this Attachment.