Call marketplace API
executeCalls this organization's marketplace APIs with JavaScript. Use search first to find the operation and its parameters.
Write an async arrow function that returns the result. In it, await codemode.request({ method, path, query?, body?, contentType?, rawBody? }) sends one request (method: GET, POST, PUT, PATCH or DELETE) and returns the response; await codemode.spec() returns the spec.
Example: async () => { const res = await codemode.request({ method: "GET", path: "/otto//v4/orders", query: { limit: 10 } }); return res; }
Customer data is anonymized: names, companies, addresses (except country), emails, phones and customer IDs read "[anonymized]". Do not work around it.
Your marketplace connections
kaufland-de— Kaufland (PLAYGROUND, test data)home24-dev— Mirakl "home24-dev"otto-main— OTTO Market "OTTO Market" (SANDBOX)
Paths
All paths are /{platform}/{connection}/<upstream API path>, e.g. /kaufland/kaufland-de/v2/order-units, /mirakl/home24-dev/api/orders, /otto/otto-main/v4/orders. Put query parameters in query, never in the path. The host adds authentication; never send credentials.
Rules
Responses are capped at ~6,000 tokens: filter, map and aggregate in your code and return only what is needed.
List endpoints are paginated with small default page sizes: when the user wants all results, loop over the pages in your code.
Operations carry
x-write(mutates data),x-async(returns an ID to poll viastatusOperationId),x-rate-limitandx-body-encoding.Writes are audited and may be disabled per organization.
Before paginated reads, imports, writes or file downloads, read the platform notes in
(await codemode.spec()).info.description.For a marketplace not listed above, ads on Mirakl marketplaces (platform "mirakl_ads"), or an authentication error, call
list_integrationsfor a setup or fix link.
Tool call template
Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {
"code": "<code>",
"context": "<context>",
"llm_model": "<llm_model>"
},
"name": "execute"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| code | Yes | JavaScript async arrow function to execute | |
| context | Yes | Explain in 15-25 words, in third person, why this tool is called and how it supports the user's goal. For analytics only. You MUST describe only the abstract purpose of the tool call. NEVER include, repeat, paraphrase, or infer personal, sensitive, or identifying information from the user request or tool results, including names, emails, phone numbers, IPs, IDs, or credentials. You MUST generalize specific entities into roles such as "a user", "the customer", or "an account". Example: "Retrieving a customer's recent orders to investigate a billing issue and help support determine the appropriate resolution." | |
| llm_model | Yes | The exact model identifier you (the assistant) are running as, taken from your system prompt or environment (e.g. "claude-opus-4-8", "gpt-5.2"). Used for analytics only. If you do not know your model identifier with certainty, pass "unknown" — never guess. | |
| conversation_id | No | Pass the exact conversation_id from the server's previous response, unchanged. The server provides it on the first call — never invent one, and do not issue parallel tool calls until you have it. Keep passing the same conversation_id for the rest of the conversation, including after later user messages or on a different task; do not reset it when the user starts a new request. |