Routal Blog
IA

Integrating Routal when the AI writes the code

Coding assistants have changed the economics of integration. developers.routal.com is built for that workflow: documentation your AI can read in full before it writes the first call.

6 min read
Pablo Martinez

By Pablo Martinez

Leading Product & Tech at Routal. Focused on the delivery of solutions that drive real business value. LinkedIn

Integrating Routal when the AI writes the code

The cost was in the wiring

An ERP integration rarely stalls on the algorithm. The optimizer orders a whole fleet in seconds. The weeks pile up around it: authenticating every request, translating the ERP's orders into the stop format Routal expects, paginating long responses, reading the error codes correctly, keeping alive the webhooks that announce each change of state. That plumbing, multiplied by a developer's calendar, is what turned any connection into a project with a budget and an owner.

Getting two systems to understand each other is an old, dull problem. Coding assistants have made it, all at once, far cheaper.

What changed was the context

Integration code barely gets typed from scratch now. You hand it off to an assistant. You describe what you need to Cursor, to Claude Code, to Copilot, to whatever chat you have open, and it comes back with a first draft that almost stands on its own.

The "almost" carries weight. The moment the assistant touches an API that isn't in its training, it fills the gaps with whatever statistically resembles an API: plausible endpoint names, an auth header that doesn't apply, parameters nobody ever implemented. The result compiles without complaint and then returns nothing, and chasing a hallucination costs more than writing the call by hand would have.

This past year, the interesting move happened at the other end of that conversation. APIs have started publishing their context in files made for a model to read. The format gaining ground is llms.txt. It is a cousin of robots.txt with the intent reversed: where one tells a crawler where not to go, the other hands a model the full map of the API. Endpoints, the shape of each payload, the catalogue of errors, the details you normally learn only by tripping over them, and the mental model that ties the rest together.

With that file in front of it, the assistant stops improvising. Calls come out right on the first attempt, and what used to take weeks fits inside an afternoon. What is left for the human is the part that was never worth delegating: choosing what to build and checking that what got built holds up.

What Routal puts on the table

developers.routal.com grew out of that idea. The point was for your assistant to have everything Routal knows about itself in front of it before you write a single line.

The page turns on one phrase, Routal as the routing brain for your ERP. Orders come in from SAP, Dynamics 365, Navision, Odoo or any system that speaks JSON; they leave as optimized routes; they get dispatched to drivers; and webhooks return each completed delivery to your system. The whole journey fits on that line.

Three files carry the heavy load:

  • llms.txt acts as the index: title, summary and URL for every page and every endpoint, so the model knows what exists and where to find it.
  • llms-full.txt is the unabridged version. The entire documentation condensed into roughly 150 KB, calibrated to fit in one piece inside the context window. It is the official reference and it regenerates itself whenever something changes.
  • openapi.json is the OpenAPI 3.0 spec, the one client generators chew through.

Two conveniences sit on top. Every integration recipe has a button that opens it in ChatGPT, Claude, Copilot or Gemini with the context already loaded, and there are templates for pinning all of it into Cursor's or Claude Code's rules. The documentation is written for a model to consume as much as for you to read.

How to hand it to your assistant

No particular tool is required. Whatever you already use will do. Four steps.

1. Hand it the context. Works the same in any chat. Paste this address into the conversation and ask for what you need:

https://developers.routal.com/llms-full.txt

If your tool does not take links, open the file and paste the text in directly. From there the model has all of Routal within reach.

2. To poke around, no setup at all. Every recipe carries an "Open in AI assistant" button. Pick ChatGPT, Claude, Copilot or Gemini and it opens with the context and a prompt already written. It is the easy road for trying a scenario before committing time to it.

3. To go in seriously, pin it once. The context lives in your editor's rules file and applies every session without you thinking about it again:

  • In Cursor, the file .cursor/rules/routal.mdc
  • In Claude Code, inside your CLAUDE.md
  • In Windsurf, Copilot or others, pointed at the llms-full.txt URL

Worth finishing with a blunt instruction: do not invent endpoints, and treat anything missing from llms-full.txt or openapi.json as nonexistent.

4. Confirm before you trust it. One control question does the job: "write a curl call that creates a Routal plan for tomorrow". If the context landed, three signals give it away:

  • the key travels as private_key in the query string (the usual slip is putting it in an Authorization header)
  • the project_id shows up
  • the base URL is api.routal.com, not the documentation's

If something is off-key, paste llms-full.txt back in and ask it to reread. Half a minute and you know whether the assistant is fit to write real code.

The part you can't hand off

One nuance is not worth glossing over. The assistant drafts the code; responsibility stays exactly where it always was. Someone decides what to integrate and someone signs off that the auth, the webhooks and the edge cases behave before any of it reaches production. The control question in step four is precisely that signature.

And the quality of what comes out is welded to the quality of the context going in. That is why the work changed in nature more than in volume: from typing repetitive code, the effort shifted toward curating context, which falls to us, and toward stating the problem well and reviewing the answer, which falls to you. It comes out shorter and, with a bit of luck, more interesting.

Where to start

The first step costs less than the memory of past integrations would suggest. You generate an API key in the planner dashboard, open developers.routal.com, paste the llms-full.txt URL into your assistant and ask for the first call. The recipes are grouped by the real rhythm of each operation: nightly B2B distribution batch, that batch with live dispatch layered on top, same-day, reverse logistics, field service, recurring services. One of them probably describes yours with little to adjust.

The Build with AI guide walks the whole process in detail. And if you would rather see it over your own routes before opening the editor, drop us a line.

Computing the route has been the fast part for years. The wiring that connects it to your operation is finally starting to move at the same speed.

Share on

Pablo Martinez

By Pablo Martinez

Leading Product & Tech at Routal. Focused on the delivery of solutions that drive real business value. LinkedIn

Related articles

Routal Blog
Customer results

Less firefighting. More daily control.

Or if you prefer, book a personalized demo with an expert.