Machine-readable docs
- Docs index: https://docs.trackstarhq.com/llms.txt. Every page with a one-line description. Point an agent here first.
- Full docs: https://docs.trackstarhq.com/llms-full.txt. Every page in one file. Large, so paste it in only when the agent needs the whole picture.
- Any page as Markdown: append
.mdto a page URL, for example https://docs.trackstarhq.com/how-to-guides/getting-started.md, to fetch one page without HTML. - OpenAPI spec: https://production.trackstarhq.com/openapi.json. Every endpoint, parameter, and schema, including each integration’s write schema.
- Postman collection: https://production.trackstarhq.com/postman.json, for trying requests by hand.
- Agent skills: https://docs.trackstarhq.com/.well-known/skills/index.json. Installable guides for connecting, reading, and writing. See below.
- Docs MCP server: https://docs.trackstarhq.com/mcp. Live search over these docs from inside your agent.
Install the Trackstar skills
Skills are short guides an agent loads when a task matches them. Trackstar publishes four:
Install all four with the skills CLI:
Connect the docs MCP server
The server searches and reads these docs. It does not call the Trackstar API, so it needs no credentials.Agent instructions
Paste this into your project’sCLAUDE.md, AGENTS.md, or Cursor rules. It covers the facts agents most often get wrong.
Prompts
Each prompt assumes your API key is in theTRACKSTAR_API_KEY environment variable and tells the agent to read the relevant docs before writing code. Replace the bracketed placeholders, then copy the prompt into your agent.
Explore the sandbox and make a first API call.
Read the prompt
Read the prompt
I’m building on Trackstar, a unified API for WMS, cart, and carrier systems. My API key is in the TRACKSTAR_API_KEY environment variable. Never print it, log it, or write it to a file.
- Read https://docs.trackstarhq.com/how-to-guides/about-the-api.md and https://docs.trackstarhq.com/how-to-guides/sandbox.md.
- Create a WMS sandbox: POST https://production.trackstarhq.com/sandbox/generate-sandbox/wms with the x-trackstar-api-key header. Keep the access_token from the response in memory as the sandbox token. Do not print it.
- Using x-trackstar-api-key and x-trackstar-access-token, fetch GET /wms/warehouses, GET /wms/products, and GET /wms/orders. Page through orders with page_token until next_token is null.
- Print a short summary: how many of each resource exist, which order statuses you saw, and how a product’s inventory_items relate to the inventory endpoint.
- Turn steps 2 to 4 into a small script in [language] that I can rerun, reading both secrets from environment variables.
Add the Trackstar Link token exchange to my backend.
Read the prompt
Read the prompt
I’m adding Trackstar Link to my app so customers can connect their WMS. Read the “Fully Embedded Setup” section of https://docs.trackstarhq.com/how-to-guides/getting-started.md before writing code.My backend is [framework and language]. My API key is in the TRACKSTAR_API_KEY environment variable. Never print or hardcode it.Implement two endpoints:
- POST /get-link-token: calls POST https://production.trackstarhq.com/link/token with the x-trackstar-api-key header and returns the link_token to my frontend. Accept an optional customer_id from my frontend and pass it in the request body.
- POST /store-token: receives auth_code and customer_id from my frontend, calls POST https://production.trackstarhq.com/link/exchange with the auth_code in the body, and stores access_token, connection_id, integration_name, and available_actions against that customer in [database]. The access token is a secret; store it encrypted or in the secret store my app already uses.
Embed the Trackstar Link button in my frontend.
Read the prompt
Read the prompt
Add the Trackstar Link connect button to my [React, Angular, or vanilla JavaScript] app. Read https://docs.trackstarhq.com/how-to-guides/trackstar-link.md first and follow the install instructions for my framework.
- Render the connect button. getLinkToken must call my backend’s POST /get-link-token and return the linkToken it responds with.
- onSuccess must POST the authCode and integrationName to my backend’s POST /store-token together with the current customer’s ID.
- Show WMS integrations by default, and make integrationType configurable so I can offer cart and carrier connections later.
- Add a development-only setting that turns on the sandbox prop so I can complete the flow without real credentials.
- In onClose, refresh my connections list.
Keep a local copy of orders in sync.
Read the prompt
Read the prompt
Build a job that keeps a local copy of orders from a Trackstar WMS connection. Read https://docs.trackstarhq.com/how-to-guides/about-the-api.md, https://docs.trackstarhq.com/how-to-guides/syncing-data.md, and the order schema at https://docs.trackstarhq.com/api-reference/wms-api/orders/get.md before writing code.Headers: x-trackstar-api-key from the TRACKSTAR_API_KEY environment variable and x-trackstar-access-token from TRACKSTAR_ACCESS_TOKEN. The connection ID is in TRACKSTAR_CONNECTION_ID. Never print the secrets.
- Before the first run, call GET https://production.trackstarhq.com/connections/CONNECTION_ID with the API key and check historical_sync_completed for get_orders. If it is false, stop with a clear message: the initial sync has not finished yet.
- On each run, call GET /wms/orders with limit=1000 and trackstar_updated_date[gte] set to the previous successful run time. Follow next_token with page_token until it is null, sending the same filters on every page.
- Upsert each order by its id. Store status and raw_status, and keep the line items.
- Stay under 10 GET requests per second per access token, and back off using retry-after on a 429.
- If the API returns 501, this integration does not support orders. Log it and exit cleanly.
Receive and verify Trackstar webhooks.
Read the prompt
Read the prompt
Add a Trackstar webhook receiver to my [framework and language] app. Read https://docs.trackstarhq.com/how-to-guides/webhooks/webhooks.md first, then the event pages linked from it for the events I handle.
- Expose POST /webhooks/trackstar accepting application/json. Respond 200 quickly and process the event asynchronously.
- Trackstar delivers webhooks through Svix. Verify the svix-id, svix-timestamp, and svix-signature headers with the Svix library for my language, using the endpoint’s signing secret from the TRACKSTAR_WEBHOOK_SECRET environment variable. Reject invalid signatures with a 400.
- Route on event_type. Handle connection.historical-sync-completed by marking that resource ready for the connection_id, and handle order.created and order.updated. On updated events, previous_attributes lists the fields that changed, using dot paths such as line_items.1.received_quantity for nested values.
- If data_truncated is true, the payload was too large and data only contains the id. Call the data_url with x-trackstar-api-key, then fetch the download_url it returns to get the full event.
- Deduplicate on the svix-id header so retries are idempotent.
- Add tests using the sample payloads from the docs.
Create an order in a connected system.
Read the prompt
Read the prompt
Implement create-order against a Trackstar WMS connection. Read https://docs.trackstarhq.com/how-to-guides/programmatic-writes.md and https://docs.trackstarhq.com/api-reference/wms-api/orders/post.md before writing code.Headers: x-trackstar-api-key from the TRACKSTAR_API_KEY environment variable and x-trackstar-access-token from TRACKSTAR_ACCESS_TOKEN. Never print them. Develop against a sandbox connection first: POST /sandbox/generate-sandbox/wms with the API key returns one.
- Call GET https://production.trackstarhq.com/integrations/wms/INTEGRATION_NAME/write-info with both headers, where INTEGRATION_NAME is the connection’s integration_name. From the create order schema, list the required fields, optional fields, and integration-specific fields.
- Write a function that maps my order model to the Trackstar request body. Omit any field with no value. Never send null or an empty string.
- POST /wms/orders. On a 422, report which field failed. When the error’s origin is “integration”, pass the integration’s message to the caller unchanged. A 403 means the endpoint is disabled for this connection; a 501 means the integration does not support it.
- The success response contains the created order under data, its id, and unused_fields listing any body fields the integration ignored. Log unused_fields so I can see what did not carry over.
- Fetch GET /wms/orders/ORDER_ID with the returned id and confirm the order exists.
Tips for good results
- Give the agent the sandbox first. A sandbox connection lets it run real requests and see real response shapes without touching a customer’s system.
- Keep secrets in environment variables and say so in the prompt. Agents will otherwise paste keys into code and logs.
- Point at pages, not memory. The prompts above link the
.mdversion of each page so the agent reads current behavior instead of guessing. - Name your stack. Framework, language, and database in the prompt produce code you can merge instead of a generic sketch.