---
title: services.data
description: CRUD runtime helper API for records (`get`, `list`, `create`, `update`, `delete`).
---

# `services.data`

- **Stability:** `stable`
- **Canonical source:** `packages/client/src/index.ts`

## Methods

```ts
services.data.get<T = any>(object: string, id: string): Promise<GetDataResult<T>>
services.data.list<T = any>(object: string, options?: ListDataOptions): Promise<PaginatedResult<T>>
services.data.create<T = any>(object: string, data: Partial<T>): Promise<CreateDataResult<T>>
services.data.update<T = any>(object: string, id: string, data: Partial<T>): Promise<UpdateDataResult<T>>
services.data.delete(object: string, id: string): Promise<DeleteDataResult>
```

## Parameters

- `object`: short object name (for example `task`, `account`)
- `id`: record ID for single-record operations
- `data`: partial payload for create/update
- `options` (`list`): filters, sorting, pagination (`top`, `skip`, `filter`, `sort`, `select`)

## Returns

- `get`: single record payload
- `list`: list payload + pagination metadata
- `create`/`update`: mutated record payload
- `delete`: success marker / deleted ID payload

## Typical Errors

- `RECORD_NOT_FOUND`
- `VALIDATION_ERROR`
- `PERMISSION_DENIED`

## Example

```ts
const contact = await services.data.get('contact', ctx.input.contact_id);
const orders = await services.data.list('sales_order', {
  filter: { contact_id: contact.id },
  sort: [{ field: 'created_at', order: 'desc' }],
  top: 20,
});
```
