Back

Search

Search

Methods

Inventory

Orders

OrderWorkflow /GetWorkflow

Response: GetWorkflowResponse



Get workflow groups and jobs per location. This call will return all groups available to the user.
Group header only contains essential information for displaying the number of jobs to do, total number of orders in the group. Things like Conditions and Action lists are not returned as part of this call.
Jobs - only header of a job is returned, actual list of order ids will be empty in this call. You will need to use GetJob to get actual list of orders allocated to the job

Parameters

NameTypeDescription
requestGetWorkflowRequestGet workflow request

HTTP Endpoint

Server /OrderWorkflow / GetWorkflow

Permissions

GlobalPermissions.OrderBook.Workflow.ViewWorkflow.ViewWorkflowNode

Example Code

Example Request

The following request format is required for this method.

POST https://eu-ext.linnworks.net//api/OrderWorkflow/GetWorkflow HTTP/1.1
Host: eu-ext.linnworks.net
Connection: keep-alive
Accept: application/json, text/javascript, */*; q=0.01
Origin: https://www.linnworks.net
Accept-Language: en
User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/42.0.2311.90 Safari/537.36
Content-Type: application/x-www-form-urlencoded; charset=UTF-8
Referer: https://www.linnworks.net/
Accept-Encoding: gzip, deflate
Authorization: INSERT_YOUR_TOKEN_HERE

request={
  "LocationId": "72035448-d6e0-4af4-8dd2-733f3ac150f1",
  "GroupId": 1
}

Response

This is an example response. Results may vary depending on your data.

{
  "WorkflowGroups": [
    {
      "GroupHeader": {
        "GroupId": 1,
        "LocationId": "808bf622-1765-4741-ae19-eff36b1d6e82",
        "Name": "sample string 3",
        "Prefix": "sam",
        "Seed": 5,
        "MaxOrderCount": 6,
        "Prevalence": 7,
        "JobCount": 8,
        "OrderCount": 9,
        "AttachmentCount": 10,
        "Condition": {
          "Where": "sample string 1",
          "Inner": "sample string 2",
          "Sort": "sample string 3"
        },
        "Action": {
          "Actions": [
            "sample string 1",
            "sample string 2"
          ]
        },
        "HasAction": true
      },
      "Jobs": [
        {
          "JobId": 1,
          "GroupId": 2,
          "Name": "sample string 3",
          "Status": "PENDING",
          "OrderCount": 4,
          "AttachmentCount": 5,
          "IsError": true,
          "IsAllPrinted": true,
          "CreatedDate": "2018-02-19T16:57:08.0214526+00:00",
          "ExecutedByUser": "sample string 9",
          "ExecutionDate": "2018-02-19T16:57:08.0214526+00:00",
          "JobAttachmentList": [
            {
              "AttachmentId": 1,
              "JobId": 2,
              "Type": 0,
              "URL": "sample string 3",
              "PrintedDate": "2018-02-19T16:57:08.0219301+00:00",
              "User": "sample string 4"
            },
            {
              "AttachmentId": 1,
              "JobId": 2,
              "Type": 0,
              "URL": "sample string 3",
              "PrintedDate": "2018-02-19T16:57:08.0219301+00:00",
              "User": "sample string 4"
            }
          ],
          "OrderList": [
            {
              "OrderId": "4225c053-0d66-4bfa-a600-042b93fbe4df",
              "nOrderId": 2,
              "CustomerName": "sample string 3",
              "EmailAddress": "sample string 4"
            },
            {
              "OrderId": "4225c053-0d66-4bfa-a600-042b93fbe4df",
              "nOrderId": 2,
              "CustomerName": "sample string 3",
              "EmailAddress": "sample string 4"
            }
          ]
        },
        {
          "JobId": 1,
          "GroupId": 2,
          "Name": "sample string 3",
          "Status": "PENDING",
          "OrderCount": 4,
          "AttachmentCount": 5,
          "IsError": true,
          "IsAllPrinted": true,
          "CreatedDate": "2018-02-19T16:57:08.0214526+00:00",
          "ExecutedByUser": "sample string 9",
          "ExecutionDate": "2018-02-19T16:57:08.0214526+00:00",
          "JobAttachmentList": [
            {
              "AttachmentId": 1,
              "JobId": 2,
              "Type": 0,
              "URL": "sample string 3",
              "PrintedDate": "2018-02-19T16:57:08.0219301+00:00",
              "User": "sample string 4"
            },
            {
              "AttachmentId": 1,
              "JobId": 2,
              "Type": 0,
              "URL": "sample string 3",
              "PrintedDate": "2018-02-19T16:57:08.0219301+00:00",
              "User": "sample string 4"
            }
          ],
          "OrderList": [
            {
              "OrderId": "4225c053-0d66-4bfa-a600-042b93fbe4df",
              "nOrderId": 2,
              "CustomerName": "sample string 3",
              "EmailAddress": "sample string 4"
            },
            {
              "OrderId": "4225c053-0d66-4bfa-a600-042b93fbe4df",
              "nOrderId": 2,
              "CustomerName": "sample string 3",
              "EmailAddress": "sample string 4"
            }
          ]
        }
      ]
    },
    {
      "GroupHeader": {
        "GroupId": 1,
        "LocationId": "808bf622-1765-4741-ae19-eff36b1d6e82",
        "Name": "sample string 3",
        "Prefix": "sam",
        "Seed": 5,
        "MaxOrderCount": 6,
        "Prevalence": 7,
        "JobCount": 8,
        "OrderCount": 9,
        "AttachmentCount": 10,
        "Condition": {
          "Where": "sample string 1",
          "Inner": "sample string 2",
          "Sort": "sample string 3"
        },
        "Action": {
          "Actions": [
            "sample string 1",
            "sample string 2"
          ]
        },
        "HasAction": true
      },
      "Jobs": [
        {
          "JobId": 1,
          "GroupId": 2,
          "Name": "sample string 3",
          "Status": "PENDING",
          "OrderCount": 4,
          "AttachmentCount": 5,
          "IsError": true,
          "IsAllPrinted": true,
          "CreatedDate": "2018-02-19T16:57:08.0214526+00:00",
          "ExecutedByUser": "sample string 9",
          "ExecutionDate": "2018-02-19T16:57:08.0214526+00:00",
          "JobAttachmentList": [
            {
              "AttachmentId": 1,
              "JobId": 2,
              "Type": 0,
              "URL": "sample string 3",
              "PrintedDate": "2018-02-19T16:57:08.0219301+00:00",
              "User": "sample string 4"
            },
            {
              "AttachmentId": 1,
              "JobId": 2,
              "Type": 0,
              "URL": "sample string 3",
              "PrintedDate": "2018-02-19T16:57:08.0219301+00:00",
              "User": "sample string 4"
            }
          ],
          "OrderList": [
            {
              "OrderId": "4225c053-0d66-4bfa-a600-042b93fbe4df",
              "nOrderId": 2,
              "CustomerName": "sample string 3",
              "EmailAddress": "sample string 4"
            },
            {
              "OrderId": "4225c053-0d66-4bfa-a600-042b93fbe4df",
              "nOrderId": 2,
              "CustomerName": "sample string 3",
              "EmailAddress": "sample string 4"
            }
          ]
        },
        {
          "JobId": 1,
          "GroupId": 2,
          "Name": "sample string 3",
          "Status": "PENDING",
          "OrderCount": 4,
          "AttachmentCount": 5,
          "IsError": true,
          "IsAllPrinted": true,
          "CreatedDate": "2018-02-19T16:57:08.0214526+00:00",
          "ExecutedByUser": "sample string 9",
          "ExecutionDate": "2018-02-19T16:57:08.0214526+00:00",
          "JobAttachmentList": [
            {
              "AttachmentId": 1,
              "JobId": 2,
              "Type": 0,
              "URL": "sample string 3",
              "PrintedDate": "2018-02-19T16:57:08.0219301+00:00",
              "User": "sample string 4"
            },
            {
              "AttachmentId": 1,
              "JobId": 2,
              "Type": 0,
              "URL": "sample string 3",
              "PrintedDate": "2018-02-19T16:57:08.0219301+00:00",
              "User": "sample string 4"
            }
          ],
          "OrderList": [
            {
              "OrderId": "4225c053-0d66-4bfa-a600-042b93fbe4df",
              "nOrderId": 2,
              "CustomerName": "sample string 3",
              "EmailAddress": "sample string 4"
            },
            {
              "OrderId": "4225c053-0d66-4bfa-a600-042b93fbe4df",
              "nOrderId": 2,
              "CustomerName": "sample string 3",
              "EmailAddress": "sample string 4"
            }
          ]
        }
      ]
    }
  ]
}