Skip to content
Sage Network API


  Less than to read

The Sage Network API provides mechanism for storing extensible metadata about objects. This metadata allows you to tag records in the Sage Network API with extra fields, comments, and attachments. Read on for how to use these extensibility features.

Types of Extensibility

Sage Network API provides three key types of extensible data objects: Attachments, Custom Fields, and Notes.

Metadata Type Data Type Example Data
AttachmentModel File storage A PDF of an invoice
CustomFieldValueModel Typed metadata storage: strings, numeric, dates, or JSON objects A “Credit Score” field for a customer
NoteModel Freeform human-readable text intended for user review A comment: “Alice called this customer and verified their address on June 3rd.”

Linking metadata to an object

To attach metadata to an object, Sage Network API uses TableKey and ObjectKey. The TableKey value identifies the kind of data that is being extended, and the ObjectKey value identifies which data object is being extended. For example, when we link a note to a company, we set the TableKey to ‘Company’ and the ObjectKey to the CompanyId value of the company.

This table explains how to extend common data models:

Type of data to extend TableKey ObjectKey
ActivityModel Activities activityId
CompanyModel Company companyId
ContactModel Contact contactId
CreditMemoAppliedModel CreditMemoApplied creditMemoAppliedId
EmailModel Email emailId
InvoiceModel Invoice invoiceId
PaymentAppliedModel PaymentApplied paymentAppliedId
PaymentModel Payment paymentId
UserAccountModel UserAccount userId


Attachments represent files linked to an object. An example would be a PDF file for an invoice, or a reseller certificate for a company.

Custom Fields

To store custom metadata on an object, you create a CustomField. Once the Definition exists, you can then create Custom Field Values and attach them to objects. For example, if your app tracks an object and needs to know the last time the object was checked, you can create a Custom Field Definition called “LastTrackingStatus”. You can then create a Custom Field Value attached to the object you have tracked.


Your software can add Notes to each object. These notes can be viewed by users on Sage Network Inbox. A note is a comment that can include markdown.