# API Reference Overview

A location query is a predicate call on the SDK. It returns an `OctetVerdict`, and a `YES` or `NO` verdict carries a signed proof.

## The full surface

```mermaid
flowchart TD
    A[Octet.start config] --> B[OctetSdk handle]
    B --> L[OctetSdk.loc]
    B --> S[OctetSdk.licenseStatus]
    L --> P1[isWithin region atTime]
    L --> P2[isOutside region atTime]
    L --> P3[contains center tol atTime]
    P1 --> V[OctetVerdict]
    P2 --> V
    P3 --> V
    V --> R[result YES NO INDETERMINATE]
    V --> RC[reason ReasonCode]
    V --> PR[proof LocationProof?]
    V --> VAL[validity Interval?]
    V --> C[confidence ConfidenceSummary]
```

## Per-symbol reference

| Symbol | What it is |
|---|---|
| [`Octet.start(...)`](/docs/mobile/api-reference/octet-start/) | The single bring-up call. Attests the app, bootstraps a license, returns an `OctetSdk`. Also exposes `attestationEnrolmentBundle()`, and documents `OctetConfig`, `AdvancedConfig` and `TransportPolicy`. |
| [`OctetSdk`](/docs/mobile/api-reference/octet-sdk/) | The handle returned by `start`. Exposes `loc`, `flags`, `licenseStatus`, and `close()`. |
| [Predicates](/docs/mobile/api-reference/predicates/) | `isWithin`, `isOutside`, `contains` on `sdk.loc`, each with optional `sessionNonce`, `decisionRef`, `forceFresh`. |
| [`OctetRegion`](/docs/mobile/api-reference/octet-region/) | The shape you query against. Factories plus `regionFromJson`. |
| [`OctetVerdict`](/docs/mobile/api-reference/octet-verdict/) | The answer. Carries `result`, `reason`, `proof`, `validity`, `confidence`. |
| [`Octet.verify`](/docs/mobile/api-reference/octet-verify/) | On-device proof verification: `ProofVerification`, `ProofCheck`, `CheckStatus`, `VerifyOptions`, `RequiredVerdict`. |
| [License Types](/docs/mobile/api-reference/license-types/) | `LicenseStatus`, `LicenseState`, `LicenseError`, `BootstrapReason`. |
| [Serialization](/docs/mobile/api-reference/serialization/) | `.toStr()`, `.toJson()`, `.toJsonl()` on `OctetRegion`, `OctetVerdict`, `LatLon`, `H3Cell` and `Interval`. |

## Platform asymmetry notes

| Surface | iOS | Android |
|---|---|---|
| `OctetRegion` factories | All | All |
| `RegionSpec` + `getRegion(spec)` | n/a | [x] |
| `buildRegion { ... }` DSL | n/a | [x] |
| `whatisRegion(r)` / `regionToStr(r)` free functions | (via `.toStr()` extension) | [x] (also `.toStr()`) |

iOS callers use the factories directly and `region.toStr()` for the human-readable form.

## Conventions used throughout

- **Code samples are shown in tabs**, Swift on the left, Kotlin on the right. Pick your platform once. The choice is remembered across the site.
- **Async**. `Octet.start` is `async throws` (Swift) / `suspend` (Kotlin). The predicates (`isWithin`, etc.) are `async` and do not throw. License problems throw a `LicenseError` from `Octet.start`. Runtime problems become `INDETERMINATE` reasons on the verdict.
- **Validation is eager.** Region factories trap on malformed inputs at construction. The predicate API never sees an invalid region.
- **Time is `Date` on iOS, `java.time.Instant` on Android.** Both default to "now".
- **`Meters` is a `Double` typealias** on both platforms (a plain `Double`, not a wrapper type).
- **`LatLon(latitude:, longitude:)`** is the coordinate type. WGS84, pre-validated.

## Where to start

If you're integrating for the first time, go to the [iOS Quick Start](/docs/mobile/getting-started/ios-quickstart/) or [Android Quick Start](/docs/mobile/getting-started/android-quickstart/). They walk through `Octet.start`, an `isWithin` query and `Octet.verify` end to end.
