> This page is for Developers.

> For clean Markdown of any page, append .md to the page URL.
> For a complete documentation index, see https://zuora.ferndocs.com/llms.txt.
> For AI client integration (Claude Code, Cursor, etc.), connect to the MCP server at https://zuora.ferndocs.com/_mcp/server.

# List workflow tasks

GET https://rest.test.zuora.com/workflows/tasks

Retrieves a list of workflow tasks available in your Zuora tenant.

### User Access Permission
You must be assigned the **Workflow View Access** permission to run this operation.


Reference: https://zuora.ferndocs.com/developers/api-reference/zuora-api/workflow/workflows/get-workflows-tasks

## Authentication

- `Authorization` header (bearer token, required) — Use `Bearer {{token}}` in the `Authorization` header for authentication.

## Servers

- `https://rest.test.zuora.com` (US Developer & Central Sandbox (incl. Test Drive), default)
- `https://rest.sandbox.na.zuora.com` (US API Sandbox Cloud 1)
- `https://rest.apisandbox.zuora.com` (US API Sandbox Cloud 2)
- `https://rest.na.zuora.com` (US Production Cloud 1)
- `https://rest.zuora.com` (US Production Cloud 2)
- `https://rest.test.eu.zuora.com` (EU Developer & Central Sandbox)
- `https://rest.sandbox.eu.zuora.com` (EU API Sandbox)
- `https://rest.eu.zuora.com` (EU Production)
- `https://rest.test.ap.zuora.com` (APAC Developer & Central Sandbox)
- `https://rest.ap.zuora.com` (APAC Production)

## Request

### Query parameters

- `id` (string, optional) — If specified, the operation retrieves the task that is with specified id.
- `name` (string, optional) — If specified, the operation retrieves tasks that is in the specified name.
- `instance` (boolean, optional) — If set to true, the operation retrieves workflows that have the scheduled trigger enabled. If set to false, the operation retrieves workflows that have the scheduled trigger disabled. If not specfied, the operation will not use this filter.
- `action_type` (string, optional) — If specified, the operation retrieves tasks that is the specified type.
- `object` (string, optional) — If specified, the operation retrieves tasks with the specified object.
- `object_id` (string, optional) — If specified, the operation retrieves tasks with the specified object id.
- `call_type` (string, optional) — If specified, the operation retrieves tasks with the specified api call type used.
- `workflow_id` (string, optional) — If specified, the operation retrieves tasks that for the specified workflow id.
- `tags` (list of string, optional) — If specified, the operation retrieves tasks that with the specified filter tags. Use the following syntax to specify multiple tags: `tags[]=tag_value_1&tags[]=tag_value_2`. **Note:** All the workflow tasks that have any of the specified tags will be listed in the response body.
- `page` (integer, optional, default: 1) — If you want to retrieve only the workflows on a specific page, you can specify the `page` number in the query.
- `page_length` (integer, optional, default: 20) — The number of workflow tasks shown in a single call. If the `page` parameter is not specified, the operation will return only the first page of results. If there are multiple pages of results, use it with the `page` parameter to get the results on subsequent pages. The maximum value is 100.

### Headers

- `Accept-Encoding` (string, optional) — Include the `Accept-Encoding: gzip` header to compress responses as a gzipped file. It can significantly reduce the bandwidth required for a response. If specified, Zuora automatically compresses responses that contain over 1000 bytes of data, and the response contains a `Content-Encoding` header with the compression algorithm so that your client can decompress it.
- `Content-Encoding` (string, optional) — Include the `Content-Encoding: gzip` header to compress a request. With this header specified, you should upload a gzipped file for the request payload instead of sending the JSON payload.
- `Zuora-Entity-Ids` (string, optional) — An entity ID. If you have [Zuora Multi-entity](https://knowledgecenter.zuora.com/BB_Introducing_Z_Business/Multi-entity) enabled and the OAuth token is valid for more than one entity, you must use this header to specify which entity to perform the operation in. If the OAuth token is only valid for a single entity, or you do not have Zuora Multi-entity enabled, you should not set this header.
- `Zuora-Org-Ids` (string, optional) — Comma separated IDs. If you have Zuora Multi-Org enabled, you can use this header to specify which orgs to perform the operation in. If you do not have Zuora Multi-Org enabled, you should not set this header. The IDs must be a sub-set of the user's accessible orgs. If you specify an org that the user does not have access to, the operation fails. This header is important in Multi-Org (MO) setups because it defines the organization context under which the API should operate—mainly used for read access or data visibility filtering. If the header is not set, the operation is performed in scope of the user's accessible orgs.
- `Zuora-Track-Id` (string, optional) — A custom identifier for tracing the API call. If you set a value for this header, Zuora returns the same value in the response headers. This header enables you to associate your system process identifiers with Zuora API calls, to assist with troubleshooting in the event of an issue. The value of this field must use the US-ASCII character set and must not include any of the following characters: colon (`:`), semicolon (`;`), double quote (`"`), and quote (`'`).

## Response

### 200

OK

- `data` (list of Task, optional) — The list of tasks retrieved.
- `pagination` (TasksResponsePagination, optional) — An object containing pagination information for the list of tasks returned by the API.

## Types

### Task

A task.

- `action_type` (enum, optional) — The type of the task.
  - Allowed values: `Approval`, `Attachment`, `Billing::BillRun`, `Billing::CurrencyConversion`, `Billing::CustomInvoice`, `Callout`, `Cancel`, `Create`, `CustomObject::Create`, `CustomObject::Delete`, `CustomObject::Query`, `CustomObject::Update`, `Data::BillingPreviewRun`, `Data::Link`, `Delay`, `Delete`, `Download::SFTP`, `Email`, `Export`, `File::CustomPDF::CustomDocument`, `If`, `InvoiceGenerate`, `Iterate`, `Logic::CSVTranslator`, `Logic::Case`, `Logic::CustomCode`, `Logic::JSONTransform`, `Logic::Lambda`, `Logic::ResponseFormatter`, `Logic::XMLTransform`, `NewProduct`, `Notifications::GoogleCloudPrint`, `Notifications::PhoneCall`, `Notifications::SMS`, `Payment::GatewayReconciliation`, `Payment::PaymentRun`, `Query`, `RemoveProduct`, `Reporting::ReportData`, `Reporting::RunReport`, `Resume`, `Suspend`, `UI::Page`, `UI::Stop`, `Update`, `Upload::FTP`, `Upload::SFTP`, `WriteOff`
- `call_type` (string, optional) — The type of API used.
- `concurrent_limit` (integer, optional) — the number of concurrent tasks that are allowed to run simultaneously
- `data` (TaskData, optional) — The data payload for the task.
- `end_time` (string, optional) — If **Instance** is **true**, the end time of the task instance.
- `error` (string, optional) — If **Instance** is **true** and **status** is **Error**, the error reason of the task instance failure.
- `error_class` (string, optional) — If **Instance** is **true** and **status** is **Error**, the error class of the task instance failure.
- `error_details` (string, optional) — If **Instance** is **true** and **status** is **Error**, the error details of the task instance failure.
- `id` (integer, optional) — The unique ID of the task.
- `instance` (boolean, optional) — Indicates whether this task belongs to an instance of a workflow.
- `name` (string, optional) — The name of the task.
- `object` (string, optional) — The selected object for the task.
- `object_id` (string, optional) — The id of the selected object of the task.
- `original_task_id` (integer, optional) — If **Instance** is **true**, the ID of the original task in the original workflow.
- `original_workflow_id` (integer, optional) — If **Instance** is **true**, the ID of the original workflow.
- `parameters` (TaskParameters, optional) — The configuration of the task.
- `start_time` (string, optional) — If **Instance** is **true**, the start time of the task instance.
- `status` (enum, optional) — If **Instance** is **true**, the status of the task instance.
  - Allowed values: `Queued`, `Processing`, `Pending`, `Success`, `Stopped`, `Error`
- `tags` (list of string, optional) — The array of filter tags.
- `task_id` (integer, optional) — the id of this task's parent task. Will be null if this is the first task of the workflow
- `workflow_id` (integer, optional) — The ID of the workflow that the task belongs to.

### TasksResponsePagination

An object containing pagination information for the list of tasks returned by the API.

- `next_page` (string, optional) — A string containing the URL where the next page of data can be retrieved.
- `page` (integer, optional) — An integer denoting the current page number.
- `page_length` (integer, optional) — An integer denoting the number of tasks in this response. The maximum value is 100.

### TaskData

The data payload for the task.

### TaskParameters

The configuration of the task.

## Examples

**Response**

```json
{
  "data": [
    {
      "action_type": "If",
      "call_type": "SOAP",
      "data": {
        "Callout": {
          "RequestBody": {
            "queryString": "Select Id From Contact Where LastName = 'Drew' AND FirstName = 'Nancy' AND  WorkEmail = 'nancy@xyz.com'"
          },
          "RequestHeaders": {
            "Content-Type": "application/json"
          },
          "ResponseBody": {
            "message": "An unexpected error occurred\n"
          },
          "ResponseCode": 500,
          "ResponseHeaders": {
            "cache-control": [
              "max-age=0, no-cache, no-store"
            ],
            "connection": [
              "close"
            ],
            "content-type": [
              "text/plain; charset=UTF-8"
            ],
            "date": [
              "Thu, 19 Sep 2019 12:35:43 GMT"
            ],
            "expires": [
              "Thu, 19 Sep 2019 12:35:43 GMT"
            ],
            "pragma": [
              "no-cache"
            ],
            "server": [
              "kong/0.9.9"
            ],
            "x-n": [
              "S"
            ]
          },
          "URL": "https://rest.apisandbox.zuora.com/v1/action/query"
        },
        "Files": {
          "XML_52881.xml": {
            "name": "JSONData_xslt.xml",
            "object_class": "Workflow",
            "size": 0.011725425720214844
          }
        },
        "Tasks": {
          "Previous": {
            "ErrorClass": "WorkflowError::Callout",
            "ErrorReason": "Callout response was 500 after 1 tries.",
            "Id": 2770,
            "Status": "Error"
          }
        },
        "Workflow": {
          "ExecutionDate": "2019-09-19",
          "ExecutionDateTime": "2019-09-19T12:35:37",
          "LastRunDate": "2019-09-19",
          "LastRunDateTime": "2019-09-19T12:34:41",
          "WorkflowRunUser": "test-user"
        }
      },
      "end_time": "2019-09-19T12:35:43.942Z",
      "id": 2771,
      "instance": true,
      "name": "If",
      "original_task_id": 2582,
      "original_workflow_id": 416,
      "parameters": {
        "if_clause": "{% if 0 > 1 %}\r\nTrue\r\n{% else %}\r\nFalse\r\n{% endif %}",
        "strict_variables": "true"
      },
      "start_time": "2019-09-19T12:35:43.857Z",
      "status": "Success",
      "tags": [],
      "workflow_id": 476
    }
  ],
  "pagination": {
    "next_page": "https://rest.zuora.com/workflows/tasks?page=2&page_length=1",
    "page": 1,
    "page_length": 1
  }
}
```

**SDK Code**

```python response
import requests

url = "https://rest.test.zuora.com/workflows/tasks"

headers = {"Authorization": "Bearer <token>"}

response = requests.get(url, headers=headers)

print(response.json())
```

```javascript response
const url = 'https://rest.test.zuora.com/workflows/tasks';
const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};

try {
  const response = await fetch(url, options);
  const data = await response.json();
  console.log(data);
} catch (error) {
  console.error(error);
}
```

```go response
package main

import (
	"fmt"
	"net/http"
	"io"
)

func main() {

	url := "https://rest.test.zuora.com/workflows/tasks"

	req, _ := http.NewRequest("GET", url, nil)

	req.Header.Add("Authorization", "Bearer <token>")

	res, _ := http.DefaultClient.Do(req)

	defer res.Body.Close()
	body, _ := io.ReadAll(res.Body)

	fmt.Println(res)
	fmt.Println(string(body))

}
```

```ruby response
require 'uri'
require 'net/http'

url = URI("https://rest.test.zuora.com/workflows/tasks")

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true

request = Net::HTTP::Get.new(url)
request["Authorization"] = 'Bearer <token>'

response = http.request(request)
puts response.read_body
```

```java response
import com.mashape.unirest.http.HttpResponse;
import com.mashape.unirest.http.Unirest;

HttpResponse<String> response = Unirest.get("https://rest.test.zuora.com/workflows/tasks")
  .header("Authorization", "Bearer <token>")
  .asString();
```

```php response
<?php
require_once('vendor/autoload.php');

$client = new \GuzzleHttp\Client();

$response = $client->request('GET', 'https://rest.test.zuora.com/workflows/tasks', [
  'headers' => [
    'Authorization' => 'Bearer <token>',
  ],
]);

echo $response->getBody();
```

```csharp response
using RestSharp;

var client = new RestClient("https://rest.test.zuora.com/workflows/tasks");
var request = new RestRequest(Method.GET);
request.AddHeader("Authorization", "Bearer <token>");
IRestResponse response = client.Execute(request);
```

```swift response
import Foundation

let headers = ["Authorization": "Bearer <token>"]

let request = NSMutableURLRequest(url: NSURL(string: "https://rest.test.zuora.com/workflows/tasks")! as URL,
                                        cachePolicy: .useProtocolCachePolicy,
                                    timeoutInterval: 10.0)
request.httpMethod = "GET"
request.allHTTPHeaderFields = headers

let session = URLSession.shared
let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in
  if (error != nil) {
    print(error as Any)
  } else {
    let httpResponse = response as? HTTPURLResponse
    print(httpResponse)
  }
})

dataTask.resume()
```