---
title: "Admin SDK resources and CRUD client methods"
sidebarTitle: "Resources"
description: "Reference for every @spree/admin-sdk resource — products, orders, customers, inventory, pricing, promotions, store configuration, and platform clients."
---

Every Admin API resource is exposed as a property on the client (`client.orders`, `client.products`, …). Collection resources follow a consistent CRUD shape — `list`, `get`, `create`, `update`, `delete` — plus resource-specific actions. Nested resources take the **parent ID as the first argument**:

For the underlying HTTP surface — every endpoint with the API key scope it requires — see the [Admin API endpoint index](../../../api-reference/admin-api/endpoints.md).

```typescript
// Top-level
const order = await client.orders.get('order_xxx')

// Nested — parent ID first
const payments = await client.orders.payments.list('order_xxx')
await client.orders.payments.capture('order_xxx', 'payment_xxx')

// Nested create
await client.customers.addresses.create('cus_xxx', {
  first_name: 'Jane',
  last_name: 'Doe',
  address1: '350 Fifth Avenue',
  city: 'New York',
  postal_code: '10118',
  country_iso: 'US',
  state_abbr: 'NY',
  is_default_shipping: true,
})
```

## Catalog

| Client | Endpoints |
|---|---|
| `client.products` | CRUD, `clone`, and bulk operations (`bulkStatusUpdate`, `bulkAddToCategories` / `bulkRemoveFromCategories`, `bulkAddToChannels` / `bulkRemoveFromChannels`, `bulkAddTags` / `bulkRemoveTags`, `bulkDestroy`). Nested: `media`, `variants` (with their own `media`). |
| `client.variants` | Top-level variant search across products (`list`, `get`). |
| `client.optionTypes` | CRUD on option types and their values. |
| `client.categories` | List categories. |
| `client.tags` | Autocomplete tag names per taggable type. |
| `client.taxCategories` | CRUD on tax categories. |

## Orders & fulfillment

| Client | Endpoints |
|---|---|
| `client.orders` | List, get, create, update, delete, `complete`, `cancel`, `approve`, `resendConfirmation`. Nested: `items`, `payments` (incl. `capture` / `void`), `fulfillments` (incl. `fulfill` / `cancel` / `split`), `refunds`, `giftCards`, `storeCredits`, `adjustments`. |

## Customers

| Client | Endpoints |
|---|---|
| `client.customers` | CRUD plus bulk group operations (`bulkAddToGroups` / `bulkRemoveFromGroups`) and bulk tags. Nested: `addresses`, `creditCards`, `storeCredits`. |
| `client.customerGroups` | CRUD on customer groups. |

## Pricing & promotions

| Client | Endpoints |
|---|---|
| `client.prices` | CRUD plus `bulkUpsert` / `bulkDestroy` for variant prices. |
| `client.priceLists` | CRUD, `activate` / `deactivate`, and price-list rule types. |
| `client.promotions` | CRUD. Nested: `actions`, `rules`, `couponCodes`. |
| `client.promotionActions` | Lookup of available action `types` and `calculators`. |
| `client.promotionRules` | Lookup of available rule `types`. |
| `client.giftCards` | CRUD on gift cards. |
| `client.giftCardBatches` | List, get, and create gift card batches. |

## Inventory

| Client | Endpoints |
|---|---|
| `client.stockLocations` | CRUD on stock locations. |
| `client.stockItems` | List, get, update, delete stock items. |
| `client.stockTransfers` | CRUD plus the lifecycle: `markReady`, `markInTransit`, `receive`, `cancel`. |
| `client.suppliers` | CRUD on the suppliers you buy from. |
| `client.purchaseOrders` | CRUD plus `markOrdered`, `receive`, `cancel`. |

## Sales channels

| Client | Endpoints |
|---|---|
| `client.channels` | CRUD plus `addProducts` / `removeProducts`. |
| `client.markets` | CRUD on markets. |

## Store configuration

| Client | Endpoints |
|---|---|
| `client.store` | Store profile (`get`, `update`). |
| `client.paymentMethods` | CRUD plus `types` (available gateway types). |
| `client.countries` | List and read countries (for address dropdowns). |
| `client.customFieldDefinitions` | CRUD on [custom field](../../core-concepts/metafields.md) definitions. |
| `client.exports` | Create and track CSV exports (products, orders, customers, …). |
| `client.directUploads` | Pre-signed Active Storage uploads (used by media flows). |

## Platform & access

| Client | Endpoints |
|---|---|
| `client.auth` | Login (email/password or identity provider), cookie-driven refresh, logout, invitation lookup/acceptance — see [Authentication](authentication.md). |
| `client.me` | Current admin user + permissions. |
| `client.adminUsers` | List, get, update, delete admin users. |
| `client.invitations` | Staff invitations — list, get, create, delete, `resend`. |
| `client.roles` | List and read roles. |
| `client.apiKeys` | CRUD plus `revoke` for API keys. |
| `client.allowedOrigins` | CRUD on CORS allowed origins. |
| `client.webhookEndpoints` | CRUD, `sendTest`, `enable` / `disable`. Nested: `deliveries` (list, get, `redeliver`). |
| `client.dashboard` | Sales analytics. |

## Custom fields

Resources that support [custom fields](../../core-concepts/metafields.md) (products, variants, orders, customers, categories, option types) expose a `customFields` accessor taking the parent ID first:

```typescript
await client.products.customFields.list('prod_xxx')
await client.products.customFields.create('prod_xxx', {
  custom_field_definition_id: 'cfd_xxx',
  value: 'limited-edition',
})
```

The generic escape hatch covers any owner type:

```typescript
await client.customFields('Spree::Product', 'prod_xxx').list()
```

## Adding your own resources

The resource map grows with your store. The [`spree generate api_resource`](../../tutorial/model-and-api.md) generator scaffolds new Admin API endpoints (model, serializers, controllers, routes, specs) in one command — then call them from the SDK with a [custom fetch or raw request](../extending.md), or generate a typed client for them.
