globalMOO Documentation
  • globalMOO API Documentation
  • core
    • Authentication
    • Core Concepts
    • Getting Started with globalMOO
    • Error Handling
    • Event Handling
    • SDK Initialization
    • Debugging & Logging
  • schemas
    • Account Schema
    • Model Schema
    • Project Schema
    • Trial Schema
    • Objective Schema
    • Result Schema
    • Inverse Schema
  • quickstart
    • Your First Optimization with globalMOO
  • endpoints
    • accounts
      • Account Endpoints
      • Register Account
    • inverse
      • Inverse Optimization Endpoints
      • Initialize Inverse Optimization
      • Load Inverse Output
      • Suggest Inverse Step
    • models
      • Create Model
      • Model Endpoints
      • List Models
    • objectives
      • Objective Endpoints
      • Load Objectives
    • outputs
      • Output Endpoints
      • Load Output Cases
      • Load Developed Outputs
    • projects
      • Create Project
      • Project Endpoints
    • trials
      • Trial Endpoints
      • Read Trial
Powered by GitBook
On this page
  • Structure
  • Fields
  • SDK Representations
  • JavaScript SDK
  • Python SDK
  • PHP SDK
  • Examples
  • Active Account
  • Disabled Account
  • Related Endpoints
  1. schemas

Account Schema

This document describes the Account object schema returned by the globalMOO API.

Structure

{
  "id": 123,                                     // Unique identifier
  "created_at": "2025-01-31T10:00:00.000Z",      // Creation timestamp
  "updated_at": "2025-01-31T10:00:00.000Z",      // Last update timestamp
  "disabled_at": null,                           // Optional disable timestamp
  "company": "Example Inc.",                     // User's company
  "name": "Example User",                        // User's full name
  "email": "user@example.com",                   // User's email address
  "apiKey": "api_key_12345",                     // API key for authentication
  "timeZone": "America/New_York",                // User's time zone
  "customerId": "cust_12345"                     // External customer ID
}

Fields

Field
Type
Description

id

integer

Unique identifier for the account

createdAt

string (ISO 8601)

Timestamp when the account was created

updatedAt

string (ISO 8601)

Timestamp when the account was last updated

disabledAt

string (ISO 8601) or null

Timestamp when the account was disabled, null if active

company

string

User's company name

name

string

User's full name

email

string

User's email address

apiKey

string

API key for authentication

timeZone

string

User's preferred time zone

customerId

string

External customer ID reference

SDK Representations

JavaScript SDK

In the JavaScript SDK, the Account object uses snake_case naming for some fields, translating from the API's camelCase:

{
  id: 123,
  created_at: Date("2025-01-31T10:00:00.000Z"),  // Converted to Date object
  updated_at: Date("2025-01-31T10:00:00.000Z"),  // Converted to Date object
  disabled_at: null,
  company: "Example Inc.",
  name: "Example User",
  email: "user@example.com",
  api_key: "api_key_12345",                      // Note: snake_case
  time_zone: "America/New_York",                 // Note: snake_case
  customer_id: "cust_12345"                      // Note: snake_case
}

Python SDK

The Python SDK also uses snake_case naming and converts timestamps to datetime objects:

Account(
  id=123,
  created_at=datetime(2025, 1, 31, 10, 0, 0),    # Converted to datetime object
  updated_at=datetime(2025, 1, 31, 10, 0, 0),    # Converted to datetime object
  disabled_at=None,
  company="Example Inc.",
  name="Example User",
  email="user@example.com",
  api_key="api_key_12345",                       # Note: snake_case
  time_zone="America/New_York",                  # Note: snake_case
  customer_id="cust_12345"                       # Note: snake_case
)

PHP SDK

The PHP SDK maintains camelCase naming to match the API and converts timestamps to DateTimeImmutable objects:

Account(
  id: 123,
  createdAt: DateTimeImmutable("2025-01-31T10:00:00.000Z"),  // DateTimeImmutable object
  updatedAt: DateTimeImmutable("2025-01-31T10:00:00.000Z"),  // DateTimeImmutable object
  disabledAt: null,
  company: "Example Inc.",
  name: "Example User",
  email: "user@example.com",
  apiKey: "api_key_12345",                       // Note: camelCase
  timeZone: "America/New_York",                  // Note: camelCase
  customerId: "cust_12345"                       // Note: camelCase
)

Examples

Active Account

{
  "id": 123,
  "createdAt": "2025-01-31T10:00:00.000Z",
  "updatedAt": "2025-01-31T10:00:00.000Z",
  "disabledAt": null,
  "company": "ABC Corporation",
  "name": "John Doe",
  "email": "john.doe@example.com",
  "apiKey": "api_key_12345",
  "timeZone": "America/New_York",
  "customerId": "cust_12345"
}

Disabled Account

{
  "id": 456,
  "createdAt": "2025-01-15T10:00:00.000Z",
  "updatedAt": "2025-02-01T14:30:00.000Z",
  "disabledAt": "2025-02-01T14:30:00.000Z",
  "company": "XYZ Industries",
  "name": "Jane Smith",
  "email": "jane.smith@example.com",
  "apiKey": "api_key_67890",
  "timeZone": "Europe/London",
  "customerId": "cust_67890"
}

Related Endpoints

PreviousschemasNextModel Schema

Last updated 3 months ago

Account Endpoints
Register Account