# ODK API Portal

import { Card, CardHeader, CardTitle, CardDescription, CardContent } from "zudoku/ui/Card";

API documentation for ODK Media's services. Pick a service, pick an environment, and try requests right from the docs.

## Getting started

<Stepper>

1. **Pick a service**

   Find the API that matches your work in the cards below. Each one lists which app uses it and who it's for.

1. **Pick an environment**

   Switch environments from the selector at the top right of the doc. prod is the live service; staging is for checking things before they ship. Staging docs flag where they differ from prod.

1. **Try a request**

   Click **Test** on any endpoint to open a request panel with headers and parameters already filled in. Click **Send** and you'll get a real response.

</Stepper>

## MediaIO

<div className="grid gap-4 md:grid-cols-2 not-prose">

<Card>
  <CardHeader>
    <CardTitle>
      <Link to="/mediaio-odx-v4">{"MediaIO ODX API v4"}</Link>
    </CardTitle>
    <CardDescription>{"Content API behind the Amasian and LG Channel Vietnam apps: categories, series, content, playback, favorites."}</CardDescription>
  </CardHeader>
  <CardContent>
      <p>{"For: Client (app/web) developers, external partners"}</p>
      <p>{"Environments: prod"}</p>
      <p>{"60 endpoints"}</p>
  </CardContent>
</Card>

<Card>
  <CardHeader>
    <CardTitle>
      <Link to="/mediaio-odx-v3">{"MediaIO ODX API v3"}</Link>
    </CardTitle>
    <CardDescription>{"Content and account API behind the ODK and ODC apps: sign-in, profiles, payments, TV guide, search."}</CardDescription>
  </CardHeader>
  <CardContent>
      <p>{"For: ODK/ODC client developers"}</p>
      <p>{"Environments: prod"}</p>
      <p>{"146 endpoints"}</p>
  </CardContent>
</Card>

<Card>
  <CardHeader>
    <CardTitle>
      <Link to="/mediaio-odk-v1">{"MediaIO ODK API v1"}</Link>
    </CardTitle>
    <CardDescription>{"A single user-sync endpoint for the Kooli integration."}</CardDescription>
  </CardHeader>
  <CardContent>
      <p>{"For: Kooli integration"}</p>
      <p>{"Environments: prod"}</p>
      <p>{"1 endpoint"}</p>
  </CardContent>
</Card>

</div>

## Continue Watching

<div className="grid gap-4 md:grid-cols-2 not-prose">

<Card>
  <CardHeader>
    <CardTitle>
      <Link to="/continue-watching-v3">{"Continue Watching API v3"}</Link>
    </CardTitle>
    <CardDescription>{"Save and read continue-watching (resume position) state."}</CardDescription>
  </CardHeader>
  <CardContent>
      <p>{"For: Player and client developers"}</p>
      <p>{"Environments: prod"}</p>
      <p>{"8 endpoints"}</p>
  </CardContent>
</Card>

<Card>
  <CardHeader>
    <CardTitle>
      <Link to="/continue-watching-v2">{"Continue Watching API v2"}</Link><span className="ml-2 text-xs font-medium text-muted-foreground">{"Previous"}</span>
    </CardTitle>
    <CardDescription>{"Previous continue-watching version; integrations are moving to v3."}</CardDescription>
  </CardHeader>
  <CardContent>
      <p>{"For: Teams still on v2"}</p>
      <p>{"Environments: prod"}</p>
      <p>{"8 endpoints"}</p>
  </CardContent>
</Card>

</div>

## Player Event

<div className="grid gap-4 md:grid-cols-2 not-prose">

<Card>
  <CardHeader>
    <CardTitle>
      <Link to="/player-event-v2">{"Player Event API v2"}</Link>
    </CardTitle>
    <CardDescription>{"Collects playback events and telemetry sent by players and clients."}</CardDescription>
  </CardHeader>
  <CardContent>
      <p>{"For: Player developers, data team"}</p>
      <p>{"Environments: prod"}</p>
      <p>{"7 endpoints"}</p>
  </CardContent>
</Card>

</div>

## Deprecated

<div className="grid gap-4 md:grid-cols-2 not-prose">

<Card>
  <CardHeader>
    <CardTitle>
      <Link to="/mediaio-odx-v2">{"MediaIO ODX API v2"}</Link><span className="ml-2 text-xs font-medium text-muted-foreground">{"Deprecated"}</span>
    </CardTitle>
    <CardDescription>{"The generation before v3. Kept only so existing integrations keep working."}</CardDescription>
  </CardHeader>
  <CardContent>
      <p>{"For: Teams still on v2"}</p>
      <p>{"Environments: prod"}</p>
      <p>{"73 endpoints"}</p>
  </CardContent>
</Card>

</div>

## What the badges on a doc mean

:::note

- **Hand-written specification** — maintained by people, not generated from service code. It may differ from actual behavior.
- **Deprecated** — don't use this for new integrations. Kept for existing integrations.
- **Differs from prod / Not in prod yet** — where a staging doc has diverged from prod.

:::

## Glossary

| Term | Meaning |
|---|---|
| prod | The live environment used by real users |
| staging | An environment for checking things before they ship. A service can have more than one |
| `Service-Name` | v4 request header. `amasian` or `lg-channel-vietnam`. Selects which service's content you get |
| `did` | Device ID header. Needed for per-device responses like favorites and continue watching |
| Previous / Deprecated | A newer version exists / kept only so existing integrations keep working |

Most specs on this portal are collected automatically from service code. If something looks wrong, the fix belongs in that service's code (`extend_schema`). A few specs, however, are hand-written documents carried over from odx-api-docs, and are marked with a badge until they move to code generation.

- Snapshots and change history: [github.com/odkmedia/api-portal/tree/main/snapshots](https://github.com/odkmedia/api-portal/tree/main/snapshots)
- Report an issue: #backend-api
