Back

Search

Search

Methods

Inventory

OrderPrintStatus
Orders

ShippingService

Dashboards /ExecuteCustomScriptQuery

Allows 250 calls per minute

Response: CustomScriptResult



Use this call to retrieve a custom report from Query Data.
Apps using this call will not be allowed to Application Store.

Parameters

NameTypeDescription
requestExecuteCustomScriptQueryRequest
cancellationTokenCancellationTokenTerminates execution if task was cancelled on client

Example Request

The following request format is required for this method.

Endpoint URL

POST https://eu-ext.linnworks.net/api/Dashboards/ExecuteCustomScriptQuery

Headers

Connection: keep-alive
Accept: application/json
Content-Type: application/x-www-form-urlencoded; charset=UTF-8
Accept-Encoding: gzip, deflate
Authorization: INSERT_YOUR_TOKEN_HERE

Request Body

This is an example of the request structure. Results will vary depending on your data.

request={
  "Script": "sample string 1"
}&cancellationToken={
  "IsCancellationRequested": false,
  "CanBeCanceled": false,
  "WaitHandle": {
    "Handle": {
      "value": 1248
    },
    "SafeWaitHandle": {
      "IsInvalid": false,
      "IsClosed": false
    }
  }
}

Response

This is an example of the response JSON. Results will vary depending on your data.

{
  "IsError": true,
  "ErrorMessage": "sample string 2",
  "TotalResults": 1,
  "Columns": [
    {
      "Index": 1,
      "Name": "sample string 2",
      "Type": "sample string 3"
    }
  ],
  "Results": [
    {
      "sample string 1": {
      }
    }
  ]
}