AlmondTill/G3N API

Build with an AI coding agent

This site is written to be read by a coding agent as easily as by you. Every page has a Markdown twin at the same address, the machine files describe the whole surface, and every example can be rehearsed without storing anything. This guide is what to hand an agent, and in what order, so it builds against the real contract instead of guessing it.

What to fetch

What the examples are

Every request and response on this site is generated from the schema and checked against it — none was run against a live account — and copied here as the reference pages show it. Every id in the examples is made up and resolves nowhere. An agent that pastes an example id into a live call gets a not-found answer, not someone’s record — point it at your own ids once it has the shape.

Rehearse before you write

A change the agent assembles can be checked against your real records without being stored: add the dry-run flag to the envelope beside the version,

json
{
  "extensions": {
    "at": {
      "version": {
        "name": "genesis",
        "number": 0
      },
      "dryRun": true
    }
  }
}

and the answer is what the real call would give — the refusal in the same error grammar, or the record as it would be written — while nothing changes. Which operations allow it, and how to read the answer, is Dry runs. An agent’s first integration run should be a rehearsal.

The first call

Every call is a POST to https://api.almondtill.com/. The agent needs a session token, which comes from exchanging an API key’s secret once with exchangeApiKey; Your first call walks the five minutes from a key to a first page of records, and Authentication and key hygiene is the whole life of a key — give the agent the secret through your secret store, never in a prompt.

Connecting an assistant to the service itself

This guide is about building software against the API. Connecting an assistant — Claude or ChatGPT — to your own shop, so it reads your records and acts in the office on your behalf, is a different door: it is set up in the office and described at Connect your assistant on the main site.

The hosted documentation server

The same reference is also served as a connection at https://docs.almondtill.com/mcp — a Model Context Protocol server over streamable HTTP, stateless JSON, no credentials asked for or accepted — so a coding agent asks for the one page it needs instead of downloading the site. It answers from the published pages alone, holds no merchant data and runs no retail operation. Its six tools:

Add it to Claude Code:

sh
claude mcp add --transport http almondtill-docs https://docs.almondtill.com/mcp
claude mcp list

or to one project through its .mcp.json:

json
{ "mcpServers": { "almondtill-docs": { "type": "http", "url": "https://docs.almondtill.com/mcp" } } }

Add it to Codex:

sh
codex mcp add almondtill-docs --url https://docs.almondtill.com/mcp
codex mcp list

Reading the public documentation is separate from acting in a shop: the server needs no authorization and grants none; connecting an assistant to your own records is the office's door, Connect your assistant.

A first exercise: ask the agent to search_docs for brands, describe_operation the one that creates a brand — createBrand — and get_example for it; then have it rehearse the write with the dry-run envelope from "Rehearse before you write" above, against a key of a test organization, and read the answer before anything is stored.