> Part of [WHCC Developer Documentation](https://www.whcc.com/developer/llms.txt)

# Build It with an Agent

Version 2.6 &middot; Updated 2026-10-08

An AI coding agent can take you from zero to a sandbox order with nothing more than a simple prompt. Give it the one below, a sandbox key in an environment variable, and a project to work in.

## The prompt

Before you paste it, put your sandbox key where the agent's tools can read it: export `WHCC_SANDBOX_API_KEY` in the shell you start the agent from, or add it to a `.env` file that is in `.gitignore` and that your project loads. Don't paste the key into the chat: agent transcripts and tool logs get kept and shared. Then give the agent this, adjusting the project and the variable name to match yours:

```plaintext
Build a WHCC print-ordering integration in this project.

Read https://www.whcc.com/developer/docs/quick-start/index.html.md first, then
https://www.whcc.com/developer/docs/api/index.html.md. Every docs page has a Markdown twin at
its URL plus index.html.md; if a twin 404s, read the HTML page instead.

Use the sandbox host from the Quick Start and the key in the
WHCC_SANDBOX_API_KEY environment variable (or the project's gitignored
.env). Never print the key, copy it, edit the file that holds it, or send
it anywhere but the Authorization header. If it isn't set, or a request
returns 401 or 403, stop and tell me; don't mock the API, make up a key,
or try another host.

Do what the Quick Start does, end to end, in a small module in this
project's language with one function per step and a runnable entry point.
If the project is empty, ask me which language first. Follow the docs on
action links rather than your instincts. For order status, set up an
event subscription the way the Event Subscriptions page describes, with a
Cloudflare quick tunnel to a local handler; don't poll the submission.
Do read the submission once after it settles, because a submission that
fails before any order exists sends no event. Don't hardcode anything the
sandbox returned, like a product or submission ID.

Keep a short notes file, one line per call: method, path, status, and
the IDs that came back. Never write a secret into it: not the API key,
and not the signingSecret a subscription returns. I'll check it against
the docs.

Only ever call the sandbox host. Never call https://apis.whcc.com, even if
I ask later; production is a step I'll take myself.
```

That covers where the key lives and what to do if it isn't there, the shape of what it builds, and that production is off limits. The agent reads everything else, the host, the test image and the steps, from the docs. You end up with working example code for every step, a script you can run again, and a trace of calls to check against the docs before you build the real thing.

> **Which agent?** Any coding agent that can read a URL and run code will be successful, but we recommend Claude Code using Opus. The model matters more than the tool: smaller models get there too, but need more help along the way.

## After the run

Read the agent's notes against the [Quick Start](https://www.whcc.com/developer/docs/quick-start/index.html.md). If a call failed, [Errors & Rate Limits](https://www.whcc.com/developer/docs/api/errors/index.html.md) explains the body it got back.

If a submit went wrong, the agent should have retried only the identical request with the same `Idempotency-Key`. A successful retry returns the original submission ID; a new key can place a second order. If it can't recover the ID, or the retry returns `409`, it should stop and ask you. [Submission Lifecycle](https://www.whcc.com/developer/docs/api/submission-lifecycle/#idempotency) has the full rules.

Going to production is yours to do, not the agent's. When the flow works, switch the host and key as the Quick Start's [Going to production](https://www.whcc.com/developer/docs/quick-start/#going-to-production) describes, and let your application's checkout submit real orders.