The Linnworks API documentation lives on the Linnworks Developer Hub at apidocs.linnworks.net: setup guides under Docs, one page per endpoint under API Reference, and a single llms.txt file for AI tools. Each reference page gives you the method, the path, the request and response schemas, the permission needed and a per-minute rate limit. What it doesn't make obvious is that the host comes from your session, the token goes in the Authorization header on its own, and the request body format is worth testing per endpoint.
This guide walks through one reference page, turns it into a real request, and finishes with a worked example: from a SKU to that item's stock level in every location.
Where is the Linnworks API documentation?
- Guides. The Quick Start covers developer accounts and application types, and the System Integration Setup guide covers installing an app and calling AuthorizeByApplication.
- API Reference. One page per endpoint, grouped by controller: Orders, OpenOrders, ProcessedOrders, Stock, Inventory, PurchaseOrder and others.
- llms.txt. Linnworks publishes the whole reference as a Markdown index at apidocs.linnworks.net/llms.txt, which its API Reference for LLMs page suggests pointing your coding assistant at. Any page also loads as plain Markdown if you add .md to its address.
- Swagger definitions. The API Definitions & Swagger page links to Linnworks' definitions on GitHub, for generating a client. Is there a Linnworks SDK? covers that route.
What does a Linnworks API reference page tell you?
Take the GetStockLevel page. Every reference page follows the same pattern:
- A one-line summary. Useful, but not always right: the GetStockItemIdsBySKU page's summary says it gets inventory item images, while its schema shows it maps SKUs to stock item IDs. Trust the schema over the summary.
- Permissions Required, on many pages. GetOrdersById, for example, needs GlobalPermissions.OrderBook.ViewOrderDetailsNode.
- A rate limit per minute. GetStockLevel and GetOrdersById show 250 a minute; GetStockItemsFull and SearchProcessedOrders show 150. The pages don't say whether that is counted per application, per account or per session, so read each limit as a ceiling to stay well under.
- An OpenAPI definition, which is the part to read closely: the HTTP method and path, the parameters or request body schema, the response schema, a servers entry and a security scheme.
How do you turn a reference page into a request?
1. Use your session's Server, not the one on the page
Every definition lists https://eu-ext.linnworks.net as its server. Treat that as an example. AuthorizeByApplication returns a Server field, and the setup guide says to use it as the base URL for every later request. Linnworks API regions explains why hard-coding a host breaks for accounts in other regions.
2. Put the session token in the Authorization header, on its own
The security scheme on each page is an API key in a header named Authorization. The value is the session token itself. The open code of the hosted server sends exactly that, with no "Bearer" prefix:
Authorization: 6f1c...your-session-token...
3. Check the method
Most endpoints are POST, including many that only read data. Some are GET with query parameters: GetStockLevel takes stockItemId in the query string, and so do a few order lookups covered in getting an order by number, reference or ID.
4. Choose the body format deliberately
The definitions describe each request body as a JSON schema. For the classic Orders, Stock and ProcessedOrders controllers, the hosted server's open code sends form-encoded bodies instead, built by one rule:
- Each top-level property in the schema becomes one form field.
- A value that is an object or an array is turned into a JSON string first, then URL-encoded.
- The Content-Type is
application/x-www-form-urlencoded.
So a schema of { "pkOrderIds": ["..."] } becomes one field, pkOrderIds, whose value is the JSON text of the array. A few newer Inventory endpoints are the exception: the same code sends ArchiveInventoryItems a JSON body with the payload nested under a parameters key, and its comments note that those endpoints reject form encoding. Whichever format you pick, test each endpoint against a real account before you build on it.
5. Read the response schema before you write the parser
Some calls return a single object, some an array, and some a paged wrapper. GetStockLevel returns an array with one entry per location. GetOrdersById returns an array even when you ask for one order. The response schema on the page tells you which, and getting it wrong is an easy first bug to write.
A worked example: from a SKU to stock levels
Step 1: find the stock item's ID
Stock calls work on the item's GUID, not its SKU. GetStockItemsFull searches the catalogue; its schema lists keyword, searchTypes, dataRequirements, entriesPerPage (maximum 200) and pageNumber. Before URL-encoding, the form fields look like this:
POST {Server}/api/Stock/GetStockItemsFull
Authorization: your-session-token
Content-Type: application/x-www-form-urlencoded
keyword=ABC-123
searchTypes=["SKU"]
dataRequirements=["StockLevels"]
entriesPerPage=50
pageNumber=1
Each StockItemFull in the reply carries StockItemId (the GUID) and ItemNumber (the SKU). A keyword search can match more than one item, so pick the row whose ItemNumber equals your SKU exactly. One quirk from the hosted server's code: when nothing matches, Linnworks answers HTTP 400 with "No items found with given filter." rather than an empty list, so treat that message as zero results, not a failure. If you have a list of SKUs, GetStockItemIdsBySKU takes a request object holding a SKUS array and returns pairs of StockItemId and SKU.
Step 2: read the stock level
GetStockLevel is documented as GET with the GUID in the query string:
GET {Server}/api/Stock/GetStockLevel?stockItemId=3f2b...-...-...
Authorization: your-session-token
The reply is an array of StockItemLevel, one per location. The fields to know, as the reference describes them: Location (with its StockLocationId and LocationName), StockLevel, InOrders (currently in open orders), Available (StockLevel minus InOrders), Due (due in on purchase orders) and MinimumLevel. Stock levels by location explains what those numbers mean on the warehouse floor.
pkStockItemId, StockItemId or ItemId: which is which?
They are the same GUID under different names, which is easy to trip over:
- StockItemId is the name on stock records (StockItemFull, StockItemLevel) and the parameter name on stock calls.
- pkStockItemId is the same value; "pk" marks it as the primary key, and you'll see it in descriptions and older code. Extended properties refer to it as
fkStockItemId. - ItemId is what an order line calls it. In the GetOrdersById schema, OrderItem.ItemId is described as the stock item ID.
- StockItemIntId is a separate integer ID. Don't mix it up with the GUID.
One more naming trap: on a stock item, ItemNumber is the SKU, but on an order line ItemNumber is the item number as the channel sent it, and the SKU is in a separate SKU field. Store GUIDs as your keys and treat SKUs as the human-readable label you look up.
What the documentation leaves to you
- Session expiry. The setup guide says the session token has a limited lifetime; the Generating an API Key guide says it expires after 20 minutes of inactivity. Either way, re-authorise with the same permanent token. The hosted server's code does that once on any 401, then retries the call once.
- Empty results. As above, "nothing found" can arrive as an error status. Decide per endpoint what counts as empty.
- Write side effects. Some write calls replace a whole block rather than merging it. The open code's notes on SetOrderGeneralInfo and SetOrderNotes say both replace everything, so read the order first, merge your change, then write the whole block back.
Or skip building it
If the reason you're reading the reference is to let an AI assistant answer questions from live Linnworks data, that plumbing already exists. The Linnworks MCP source code is the TypeScript Cloudflare Workers source we run in production, for developers comfortable with the command line: you deploy it to your own Cloudflare account and change what you like. The Hosted MCP Server for Linnworks is the no-deploy option: read-only, one URL to paste into Claude, with the session, region and body-format handling done for you.
MCP-G is part of Green & Home Limited and is not affiliated with, endorsed by or sponsored by Linnworks or Anthropic.
Want the code instead of the reference? Buy the self-host source (€600 + tax where applicable, one-off, with 12 months of free updates), or use the hosted server: Starter is €17.49 a month + tax where applicable after a 14-day free trial.