You are currently viewing documentation for Linnworks Desktop, if you are looking for Linnworks.net documentation, click here.






api.linnlive.com

Generating API Tokens

To use the Linnworks API an access Token is required, the steps for creating an API Token are as follows:

  • Login to your account page at https://acc.linnworks.com/
  • Go to My Account -> Linnworks Anywhere Control Panel
  • Under API Tokens select either Complex or Simple
  • Click Create button

Available API modules

  • Generic API - linnworks settings and common table access (things like locations, postal services etc)
  • Inventory API - allows you to work with Linnworks inventory. Create new items, modify stock levels etc.
  • Order Management API - provides access to orders, processing orders, deleting and modifying orders.
  • Purchase Order API - allows you to work with linnworks purchase orders

SOAP

SOAP (Simple Object Access Protocol) is XML- based Web services. Linnworks Anywhere exposes the data and some functional elements of the system via XML-based web services. We use standard SOAP web service and have exposed following WSDL

In order to consume the web service you must generate an API token and assign permissions to the token in your Linnworks account using Account Management site. All the exposed methods require the token to be specified. 

Linnworks Anywhere account API is throttled:

  • 1 request per method per minute, unless paged request
  • 1500 millisecond delay for every request
  • bandwidth prioritirazation - low bandwidth queries served first

You can consume web services in any programming environment - Java, .Net, Asp.Net, Python or PHP. While Java and .Net have native libraries and are able to compile WSDL into native classes and methods, PHP and other scripting languages may not be able to do it so well. In order to consume and utilize web services efficiently it is recommened to have some basic knowledge of the XML and SOAP.

URL GET/POST

Get/Post API gateway will be withdrawn from 1st February 201

 

In addition to SOAP based web services Linnworks exposes some of its API via a CSV file output or input over a standard HTTP protocol. You can access the service by simply requesting a data from a specific URL providing token and method parameters. 

The output from the request is a plain text comma delimited flat file, where the first line is a column headers. All dates and decimal numbers are culture invariant (i.e. dates are in yyyy-mm-dd HH:mm:ss format and decimal separator is a dot, for example 19.99)

To get data from the API, make a request to the following URL:

http://api.linnlive.com/get.aspx?token=MYTOKEN&method=MethodName

Where:

MYTOKEN is 10 character long API token that you can generate from the account management site.

MethodName  is the name of the method you are executing

For example, http://api.linnlive.com/get.aspx?token=A1B2C3D4E5&method=GetStockListLite

outputs

SKU,Level,Available,InOpenOrders,Due,Value,Location,MinLevel
"SKU001",5,5,0,0,0,"Default",2
"SKU003",6,6,0,0,0,"Default",-1
"SKU003",0,0,0,0,0,"Default",2

To get response from the server as downloadable CSV file add response=file

for example

http://api.linnlive.com/get.aspx?token=MYTOKEN&method=MethodName&response=file

Sample c# Code

Please use the following link to download a sample c# application

C# .Net 2.0 Sample Code