> ## Documentation Index
> Fetch the complete documentation index at: https://docs.artu.ai/llms.txt
> Use this file to discover all available pages before exploring further.

# Scopes overview

> Understand how scopes partition data and select regulatory fields across the SDK.

A **scope** is a `country:regulator:activity` string that tells the SDK which regulatory context to operate in. Scopes range from the broad `base` (no filtering) to highly specific leaf values like `MX:AV:AVI` (Mexican virtual-asset businesses) or `MX:CNBV:TRANSMISOR` (CNBV money transmitters).

Scopes do two things at once: they **partition data** so that list operations return only records belonging to that scope, and they **select the regulatory fields and enums** that apply — transaction fields, alert codes, document requirements, and identifier validators are all scope-specific.

## The `scopeData` hierarchy

Scope-specific fields live inside a `scopeData` sub-object rather than at the top level, keeping base fields (name, type, etc.) separate from scope-specific data:

```typescript theme={null}
{
  name: "Juan García",           // Base fields — always present
  scopeData: {
    MX: {                        // Country layer
      rfc: "GAJL850101ABC",
      curp: "GAJL850101HDFRRL09",
      actividadVulnerable: {     // Regulator/track layer
        AVI: {                   // Activity layer
          username: "jgarcia_crypto",
        },
        TSC: { /* ... */ }
      },
      cnbv: {
        TRANSMISOR: { /* ... */ }
      }
    }
  }
}
```

When using a scoped SDK, these nested fields are **flattened** into the top level of create/update inputs — the SDK handles the nesting for you.

## Choosing a scope in the SDK

Pass the `scope` option to get a scope-aware SDK instance with the correct TypeScript types:

```typescript theme={null}
import { ComplianceSDK } from "@artu-ai/compliance-sdk";

// Activity-scoped instance — all operations default to MX:AV:AVI
const sdk = new ComplianceSDK({
  apiKey: process.env.ARTU_API_KEY!,
  environment: "test",
  scope: "MX:AV:AVI",
});
```

For static typing (recommended when your service targets a single scope), import the scope-specific sub-export instead:

```typescript theme={null}
// Mexico base
import { ComplianceSDK } from "@artu-ai/compliance-sdk/mx";

// Actividad Vulnerable — virtual assets
import { ComplianceSDK } from "@artu-ai/compliance-sdk/mx/av/avi";

// CNBV — money transmitters
import { ComplianceSDK } from "@artu-ai/compliance-sdk/mx/cnbv/transmisor";
```

Sub-exports give you correct model types (`MexAVIClient`, `MexAVITransaction`, etc.) and autocomplete for scope-specific fields without any runtime configuration.

## URL slug convention

Dashboard URLs and query keys represent scopes as lowercase hyphen-separated slugs:

| Scope string         | URL slug             |
| -------------------- | -------------------- |
| `MX`                 | `mx`                 |
| `MX:AV`              | `mx-av`              |
| `MX:AV:AVI`          | `mx-av-avi`          |
| `MX:CNBV:TRANSMISOR` | `mx-cnbv-transmisor` |

The conversion is: replace `:` with `-` and lowercase everything.

## Available scopes

| Scope                                              | Description                                                    |
| -------------------------------------------------- | -------------------------------------------------------------- |
| [`MX`](/scopes/mx)                                 | Mexico — all regulatory tracks                                 |
| [`MX:AV`](/scopes/mx-av)                           | Actividad Vulnerable — non-financial businesses under LFPIORPI |
| [`MX:AV:ARI`](/scopes/mx-av-ari)                   | Arrendamiento de Inmuebles (real estate leasing)               |
| [`MX:AV:AVI`](/scopes/mx-av-avi)                   | Activos Virtuales (virtual assets / crypto)                    |
| [`MX:AV:INM`](/scopes/mx-av-inm)                   | Inmuebles (real estate purchase/sale)                          |
| [`MX:AV:JYS`](/scopes/mx-av-jys)                   | Juegos y Sorteos (gambling, lotteries, contests)               |
| [`MX:AV:MJR`](/scopes/mx-av-mjr)                   | Metales y Joyas (precious metals and jewelry)                  |
| [`MX:AV:MPC`](/scopes/mx-av-mpc)                   | Mutuo, Préstamos y Créditos (non-bank loans and credit)        |
| [`MX:AV:TSC`](/scopes/mx-av-tsc)                   | Tarjetas de Servicio y Crédito (service and credit cards)      |
| [`MX:CNBV`](/scopes/mx-cnbv)                       | CNBV-regulated financial entities                              |
| [`MX:CNBV:TRANSMISOR`](/scopes/mx-cnbv-transmisor) | Transmisores de Dinero (money transmitters)                    |
