It depends which identifier you have. For the order's GUID (pkOrderId), call GetOrdersById, which returns an array even for one order. For the order number people see in Linnworks (NumOrderId), call GetOrderDetailsByNumOrderId, which returns an empty object rather than an error when nothing matches. For the channel's reference, call GetOrderDetailsByReferenceId, which can return several orders. To find processed orders by date, search first with SearchProcessedOrders, then fetch the ones you need by ID.
Which identifiers does a Linnworks order have?
The OrderDetails schema in the GetOrdersById reference lists them:
- OrderId, described as the pkOrderId: a GUID, and the key most order calls take.
- NumOrderId: the Linnworks order number, an integer. This is the number staff quote.
- GeneralInfo.ReferenceNum: the order reference as the channel defined it.
- GeneralInfo.SecondaryReference: an additional reference that some channels use.
- GeneralInfo.ExternalReferenceNum: another reference from the sales channel, which the docs say is typically used by eBay.
Don't confuse any of these with order identifiers in the Linnworks interface, which are tags you assign; order identifiers and the Rules Engine covers those. Treat the secondary and external references as optional: not every channel fills them in.
Why does GetOrdersById return an array?
Because it is a batch call. Its request has one property, pkOrderIds, which is a list of GUIDs, and its response schema is an array of OrderDetails. Ask for one order and you still get a list, so take the first element and check that it exists. Sent form-encoded, the list is a JSON string in a single field:
POST {Server}/api/Orders/GetOrdersById
Authorization: your-session-token
Content-Type: application/x-www-form-urlencoded
pkOrderIds=["9b1d...-...-..."]
Then, in JavaScript:
const orders = await res.json(); // always an array
const order = orders[0];
if (!order) throw new Error("No order with that pkOrderId");
That is exactly what the hosted server's open code does when it needs one order: it sends a one-item list, takes element zero, and raises a clear error if the list is empty. The reply is rich: GeneralInfo, ShippingInfo, CustomerInfo, TotalsInfo, Items, Notes, ExtendedProperties and folder names, plus Processed and ProcessedDateTime so you can tell open from processed orders. The reference also needs the GlobalPermissions.OrderBook.ViewOrderDetailsNode permission and shows a rate limit of 250 calls a minute.
Order lines carry their own IDs. OrderItem.ItemId is the stock item's GUID, the same value stock calls call StockItemId, and ItemNumber on an order line is the channel's item number, not your SKU; the SKU has its own field. How to read a Linnworks API reference page has the full list of stock ID names.
How do you get an order by its order number?
Use GetOrderDetailsByNumOrderId. Two details catch people out:
- It is a GET, and its query parameter is called
OrderIdeven though it takes the numeric order number, not the GUID. - The docs say that if the order isn't found, an empty class is returned. A 200 response doesn't mean you found anything: check that the reply has an OrderId before you use it.
GET {Server}/api/Orders/GetOrderDetailsByNumOrderId?OrderId=123456
Authorization: your-session-token
How do you find an order by the channel's reference?
GetOrderDetailsByReferenceId is also a GET, with a ReferenceId query parameter. It returns an array of OrderDetails, at most 50, so handle more than one match: a reference is only as unique as the channel made it. If your code assumes one order per reference, check the array length and stop when it's ambiguous rather than picking the first row.
Is there a faster call for open orders?
Yes. The order lookup pages recommend OpenOrders/GetOpenOrdersDetails for open orders. Its reference says it returns only open orders, is much faster than the general detail call, and isn't limited in how many orders you can ask for. It takes OrderIds and an optional DetailLevel list (FOLDER, NOTES, IDENTIFIERS, EXTENDEDPROPERTIES, BINRACKS); leave DetailLevel empty for full details. Its reply has a different shape from GetOrdersById, so don't reuse the same parser blindly.
How do you search processed orders?
Processed orders have their own controller. SearchProcessedOrders takes a single request object with these properties:
- DateField: processed, payment, cancelled or received.
- FromDate and ToDate, as date-times.
- SearchTerm: free text.
- SearchFilters: a list of SearchField and SearchTerm pairs, where SearchField is Source, SubSource or ItemIdentifier.
- PageNumber, ResultsPerPage and SearchSorting (a SortField and a SortDirection of ASC or DESC).
Form-encoded, the whole object goes in one field called request, as a JSON string. Before encoding it looks like this:
POST {Server}/api/ProcessedOrders/SearchProcessedOrders
Authorization: your-session-token
Content-Type: application/x-www-form-urlencoded
request={"DateField":"processed","FromDate":"2026-11-01T00:00:00Z","ToDate":"2026-11-30T23:59:59Z","SearchFilters":[{"SearchField":"Source","SearchTerm":"EBAY"}],"SearchSorting":{"SortField":"dProcessedOn","SortDirection":"DESC"},"PageNumber":1,"ResultsPerPage":50}
The reply wraps a paged result in a ProcessedOrders property: PageNumber, EntriesPerPage, TotalEntries, TotalPages and a Data list. Loop until PageNumber reaches TotalPages. The hosted server's code always sends a date range, sorts by processed date, newest first, and keeps ResultsPerPage between 20 and 200; its notes say Linnworks returns at least 20 results per page.
Watch the field names in search results
Search rows (ProcessedOrderWeb in the reference) don't use the same names as OrderDetails:
- The GUID is
pkOrderID, with a capital D, not OrderId. - The order number is
nOrderId, not NumOrderId. - The eBay-style reference is
ExternalReference, where the full order calls it ExternalReferenceNum. - Dates are
dReceivedDateanddProcessedOn.
Map them explicitly in one place, and use the pkOrderID from a search row when you call GetOrdersById for the full record.
The older paged search
There is also SearchProcessedOrdersPaged, with lower-case parameters: from, to, dateType (ALLDATES, RECEIVED, PROCESSED, PAYMENTRECEIVED or CANCELLED), searchField, exactMatch, searchTerm, pageNum and numEntriesPerPage (maximum 200). Its reference says the maximum date range is three months. Pick one search call and stick with it, because their parameter names don't line up.
If an order you processed a moment ago isn't in the search results, read processed orders not showing in search before you debug your code, and open vs processed orders for what processing changes.
Which call should you use?
- You have pkOrderId GUIDs: GetOrdersById, and take element zero for one order.
- You have the order number: GetOrderDetailsByNumOrderId, and check the reply isn't empty.
- You have the channel's reference: GetOrderDetailsByReferenceId, and expect more than one match.
- The orders are open and you want speed: GetOpenOrdersDetails.
- You need processed orders over a period: SearchProcessedOrders, then GetOrdersById for full records.
Or skip building it
If the goal is an AI assistant that can answer "what happened to order 123456?" or "what did we sell on eBay last week?", the order tools already exist. The Hosted MCP Server for Linnworks gives Claude read-only tools to search open and processed orders and pull an order's full record, with nothing to deploy. The Linnworks MCP source code has the same order tools, and you run it on your own Cloudflare account and change it as you like.
MCP-G is part of Green & Home Limited and is not affiliated with, endorsed by or sponsored by Linnworks or Anthropic.
Rather not write the order lookups yourself? Start a 14-day free trial of the hosted server (Starter is €17.49 a month + tax where applicable afterwards), or buy the self-host source for €600 + tax where applicable, one-off.