Namespace

Entity

CustomersService#Entity

Single-entity lookup by humanId.

View Source services/CustomersService.class.js, line 55

Methods

# static get(humanId, fieldsopt) → {Promise.<ServiceResponse>}

Fetches a single entity by its human-readable ID.

Parameters:
Name Type Attributes Description
humanId string

The entity's human-readable identifier.

fields Array.<string> | FieldMappingObject <optional>

Restrict the returned fields. Pass an array for an include-only list, or an object with include/exclude keys.

View Source services/CustomersService.class.js, line 75

customers/missing-humanIdhumanId was not provided.

Error
Promise.<ServiceResponse>
Example
// Fetch all fields
const { result } = await customers.Entity.get('person-abc123')

// Fetch only specific fields
const { result } = await customers.Entity.get('person-abc123', ['name', 'email'])

// Exclude fields
const { result } = await customers.Entity.get('person-abc123', { exclude: ['internalNotes'] })