GetOrders through API not working


I'm using php, curl to connect with linwork API and pull products, orders from linnworks. I have created the required API token through linnworks as given in help link, now I have app id, app secret and token.

I have requested Auth/AuthorizeByApplication API and I can get response parameters with out any issues. Now I try to get Orders/GetAllOpenOrders, I get only 400 bad request error.

The url, I'm posting is Please help me in resolving this as soon as possible.

string(36) "852afdf8-cb62-XXXX-XXXX-cadc7cXXXXX"
Curl error: HTTP/1.1 400 Bad Request
Cache-Control: no-cache
Pragma: no-cache
Content-Type: application/json; charset=utf-8
Expires: -1
Server: Microsoft-IIS/8.5
Access-Control-Allow-Origin: *
Access-Control-Allow-Headers: *
Access-Control-Allow-Credentials: false
X-AspNet-Version: 4.0.30319
X-Powered-By: ASP.NET
Access-Control-Allow-Headers: Authorization, Origin, X-Requested-With, Content-Type, Accept, Accept-Language
Access-Control-Allow-Methods: GET, POST, OPTIONS
Access-Control-Allow-Credentials: true
Date: Sun, 29 Jan 2017 03:44:42 GMT
Content-Length: 37

{"Message":"The request is invalid."}1

Can you please make sure you send correct body.

You can also try running GetOpenOrders call.

Here are some samples of filters that can be used in both calls:

Here is the body I sent with GetAllOpenOrders:


Are you doing this without the SDK and in PHP?  Can you paste your code?

Hello Stuart,

I provided raw request, you can convert it into PHP snippet in POSTMAN.

Login to post a comment