My App

Object Types

Reference documentation for all GLAPI object types

Object Types

This section provides detailed documentation for all data objects used in the GLAPI API.

Accounting Dimensions

Core accounting dimension object types:

People & Entities

Inventory & Products

Financial Objects

Revenue Recognition

General Ledger

Supporting Objects

Common Field Patterns

Standard Fields

Most entities include these standard fields:

FieldTypeDescription
idUUIDUnique identifier
organizationIdstringOrganization identifier (for multi-tenancy)
createdAtdatetimeCreation timestamp
updatedAtdatetimeLast update timestamp
statusenumStatus (active, inactive, archived)

Hierarchical Entities

Some entities support hierarchical structures with:

FieldTypeDescription
parentIdUUIDParent entity ID (nullable)
fullNamestringFull hierarchical name (e.g., "Parent:Child")

Examples: Customers, Departments, Locations, Classes, Accounts

Multi-Type Entity

The Entity object is a polymorphic type that can represent:

  • Customer
  • Vendor
  • Employee
  • Partner
  • Lead
  • Prospect
  • Contact

It includes a type field to distinguish between types.

Field Types

UUID

A universally unique identifier (v4):

"123e4567-e89b-12d3-a456-426614174000"

Datetime

ISO 8601 formatted timestamp with timezone:

"2025-01-15T10:30:00.000Z"

Enum

String value from a predefined set of options:

{
  "status": "active"  // one of: "active", "inactive", "archived"
}

Money/Decimal

Numeric value with precision for financial calculations:

{
  "amount": 1234.56
}

Address Object

Structured address information:

{
  "street": "123 Main St",
  "city": "San Francisco",
  "state": "CA",
  "postalCode": "94105",
  "country": "USA"
}

Validation Rules

Required Fields

Fields marked as required must be provided when creating an object.

Optional Fields

Optional fields can be omitted or set to null.

Field Constraints

  • Email: Must be valid email format
  • UUID: Must be valid UUID v4 format
  • Min Length: Minimum character length
  • Max Length: Maximum character length
  • Enum: Must be one of the predefined values

Relationships

Objects are related through foreign keys (UUID references):

{
  "id": "customer-uuid",
  "parentCustomerId": "parent-customer-uuid",  // References another Customer
  "organizationId": "org-uuid"                  // References Organization
}

When fetching related objects, use the appropriate endpoint with the foreign key value.

Null vs Undefined

  • null: Explicitly set to no value (clears existing value)
  • undefined or omitted: Field is not being updated

When updating objects:

{
  "email": null           // Clears the email field
  // phone not included  // Leaves phone unchanged
}

SuperJSON Serialization

GLAPI uses SuperJSON for enhanced type support:

  • Dates: Serialized as ISO strings, automatically parsed to Date objects in TypeScript clients
  • BigInt: Supported for large numbers
  • undefined: Preserved in responses (not converted to null)
  • Map/Set: Supported in TypeScript clients

Next Steps