Query about Manifest data through API

 Just a quick question, is there anyway to pull manifest information through the API into an application.

Working with the API documentation I've managed to pull in and work with processed orders but i wanted to know if there was a way to query the time at which a manifest was filed the previous day (that or a way to pull in the whole manifest).


Do you mind if I ask how you have pulled processed orders using the API?

I need a way to pull all processed orders in a date range, for example the last 24 hours and be able to do this on a daily basis.

The documentation suggests that processed orders can only be obtained after providing GUID on a one by one basis only.



Hey Gary,

I've got a javascript web app setup that uses the following:
var getLinnOrders = function(TOKEN, ods, ds){

					return new Promise(function(resolve){

					var LinnServer = sessionStorage.getItem("LinnServer");
					var url = LinnServer+"//api/ProcessedOrders/SearchProcessedOrdersPaged";
					var method = "POST";
					var postData = "from="+ods+"&to="+ds+"&dateType=2&exactMatch=false&&pageNum=1&numEntriesPerPage=200";
					var async = true;

					var request = new XMLHttpRequest();

					request.onload = function () {

					 var items = JSON.parse(request.response);
						var data = items.Data

					request.open(method, url, async);
					request.setRequestHeader("Authorization", TOKEN);
					request.setRequestHeader("Content-Type", "application/x-www-form-urlencoded; charset=UTF-8");
					request.setRequestHeader("Accept", "application/json, text/javascript, */*; q=0.01");


variable wise, ods and ds are date stamps, TOKEN is the Linnworks auth token and Linnserver is the variable i use for the cached server address you get when you auth.

As per the post data, this will return a maximum of 200 results, if you have more orders per day you'll need to create a loop to grab the extra pages.


Login to post a comment