Skip to content
Developerhome
Sage Network API

CompanyModel

  Less than to read

A Company represents a customer, a vendor, or a company within the organization of the account holder. Companies can have parents and children, representing an organizational hierarchy of corporate entities. You can use Companies to track projects and financial data under this Company label.

See Vendors, Customers, and Companies 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 API.

For the ID of this record in its originating financial system, see ErpKey.

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.

companyLogoUrl

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

The URL of this company’s logo, if known.

created

date-time, read-only

The date this company was created

createdUserId

uuid, read-only

The ID of the user who created this company

modified

date-time, read-only

The date this company was last modified

modifiedUserId

uuid, read-only

The ID of the user who last modified this company

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.

isVerified

boolean, read-only

This flag indicates whether the company is verified.

lastVerifiedDate

date-time, nullable, read-only

The date this company was last verified.

viewBoxSettings

ViewBoxSettingsModel, nullable, read-only

View box settings for the company logo.

serviceFabricOrgId

uuid, nullable, read-only

The unique ID of the Service Fabric organisation to which this record belongs.

serviceFabricCompanyId

uuid, nullable, read-only

The unique ID of this record within Service Fabric.

Required Fields

companyName

string, 1-100 characters

The short name of the company.

enterpriseId

uuid

For convenience, this field indicates the top-level parent company. This can be used to jump directly to the top parent in complex organizational hierarchies.

isActive

boolean

This flag indicates whether the company is currently active. An inactive company should be hidden from the user interface but will still be available for querying.

Optional Fields

erpKey

string, nullable, 0-100 characters

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, this value will be null.

For more information, see Identity Columns.

companyType

string, nullable, 0-20 characters

This field indicates the type of company. It can be one of a limited number of values: Company, Customer, Group, Vendor, or Third Party. A company that represents both a customer and a vendor is identified as a CustomerVendor.

  • Company - This record represents a company that is part of the organization of the account holder.
  • Customer - This record represents a business entity that purchases things from the account holder.
  • Group - Only one record of type GROUP exists in each account. Contains your account profile.
  • Vendor - This record represents a business entity that sells things to the account holder.
  • Third Party - This record represents a business entity that is neither a customer nor vendor.
  • CustomerVendor - Both a customer and a vendor.

parentCompanyId

uuid, nullable

If this business entity is part of an organization, this value is non-null and it is set to the CompanyId value of the parent company of this business entity.

If this value is null, this business entity is a standalone.

defaultCurrencyCode

string, nullable, 0-3 characters

The default currency code used by this business entity. This value can be overridden for invoices in a different currency code.

For a list of defined currency codes, see Query Currencies

primaryContactId

uuid, nullable

The Sage Network ContactId of the primary contact for this company.

address1

string, nullable, 0-80 characters

Address info

address2

string, nullable, 0-80 characters

Address info

address3

string, nullable, 0-80 characters

Address info

city

string, nullable, 0-100 characters

Address info

stateRegion

string, nullable, 0-20 characters

Address info

postalCode

string, nullable, 0-10 characters

Address info

country

string, nullable, max 100 characters

Address info

timeZone

string, nullable, 0-40 characters

Time zone

phoneNumber

string, nullable, 0-20 characters

Phone number

faxNumber

string, nullable, 0-20 characters

Fax number

taxId

string, nullable, 0-20 characters

Federal Tax ID

dunsNumber

string, nullable, 0-10 characters

Dun & Bradstreet Number

preferredDeliveryMethod

string, nullable, 0-20 characters

Indicates the preferred invoice delivery method. Examples include Print, Email, Fax

domainName

string, nullable, 0-254 characters

For companies that use a custom domain name for their email system, this is the domain name used by this company. If this value is known, new emails that come in from this domain will be connected to this company.

companyClassificationCodeDefId

uuid, nullable

Identifier for classification of this company.

description

string, nullable, 0-254 characters

Description of the company.

website

string, nullable, 0-512 characters

Website URL for this company.

emailAddress

email, nullable, 0-254 characters

Company Email Address

publicUrlSlug

string, nullable, 0-100 characters

The public url slug for the Company.

stateTaxId

string, nullable, 0-20 characters

State Tax ID

stateOfIncorporation

string, nullable, 0-20 characters

The state where the company was registered.

linkedInUrlSlug

string, nullable, 0-100 characters

Linkedin Url

companyRegistrationNumber

string, nullable, 0-20 characters

A unique identification number assigned to the company by the national registration office.

Included Collections

These fields are available when using Retrieve or Query API calls if you specify the associated Include parameter.

notes

NoteModel[], nullable, read-only

A collection of notes linked to this record. To retrieve this collection, specify Notes in the include parameter when retrieving data.

To create a note, use the Create Note endpoint with the TableKey to Company and the ObjectKey set to the CompanyId for this record. For more information on extensibility, see linking extensible metadata to objects.

attachments

AttachmentModel[], nullable, read-only

A collection of attachments linked to this record. To retrieve this collection, specify Attachments in the include parameter when retrieving data.

To create an attachment, use the Upload Attachment endpoint with the TableKey to Company and the ObjectKey set to the CompanyId for this record. For more information on extensibility, see linking extensible metadata to objects.

contacts

ContactModel[], nullable, read-only

All contacts attached to this company.

To retrieve this collection, specify Contacts in the “Include” parameter for your query.

invoices

object[], nullable, read-only

All invoices attached to this company.

To retrieve this collection, specify Invoices in the “Include” parameter for your query. For more information on Invoices, see InvoiceModel.

customFieldDefinitions

CustomFieldDefinitionModel[], nullable, read-only

A collection of custom fields linked to this record. To retrieve this collection, specify CustomFieldDefinitions in the include parameter when retrieving data.

To create a custom field, use the Create Custom Field endpoint with the TableKey to Company and the ObjectKey set to the CompanyId for this record. For more information on extensibility, see linking extensible metadata to objects.

customFieldValues

CustomFieldValueModel[], nullable, read-only

A collection of custom fields linked to this record. To retrieve this collection, specify CustomFieldValues in the include parameter when retrieving data.

To create a custom field, use the Create Custom Field endpoint with the TableKey to Company and the ObjectKey set to the CompanyId for this record. For more information on extensibility, see linking extensible metadata to objects.

companyClassificationCodeDefinition

CodeDefinitionModel, nullable, read-only

Classification code definition for this company.

To retrieve this collection, specify Classification in the “Include” parameter for your query.

Deprecated Fields

Deprecated fields are maintained for backwards compatibility with previous versions of the API. Deprecated fields may be removed in a future release of the API.

modifiedUserName

string, nullable, read-only

The name of the user who last modified this company

apEmailAddress

email, nullable, 0-254 characters

AP (Accounts Payable) Email Address

arEmailAddress

email, nullable, 0-254 characters

AR (Accounts Receivable) Email Address