> For the complete documentation index, see [llms.txt](https://docs.toomuchmedia.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.toomuchmedia.com/nats-admin/skins-and-templates/further-reading/template-functions/nats_list_affiliates.md).

# nats\_list\_affiliates

Alias: list\_affiliates

## Parameters

(*Required parameters in **bold**)*

| Parameter                                                                                                       | Description                                                                   | Possible Values                                                                | Default Value                  | Example                |
| --------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------- | ------------------------------------------------------------------------------ | ------------------------------ | ---------------------- |
| userid                                                                                                          | Specify the user ids of the affiliates you want to retrieve information on    | 1, 2, 3, 4, 5                                                                  | ALL (retrieves all affiliates) | userid="1,2,3,162"     |
| status                                                                                                          | Specify the affiliates you want to list by their status                       | 0 (Active), 1 (Disabled), 2 (Banned), 3(Wait on Verify), 4(Pending), 5(Denied) | 0                              | status="1,2,3"         |
| deleted                                                                                                         | Specify if you want to list deleted affiliates when retrieving ALL affiliates | 0, 1                                                                           | 0                              | deleted=1              |
| data                                                                                                            | Return the affiliates information along with the username                     | 0, 1                                                                           | 0                              | data=1                 |
| [assign\_prefix](/nats-admin/skins-and-templates/further-reading/template-function-parameters/assign_prefix.md) | Prefix output variables with this word. (Click link for details)              | Any valid Smarty variable name                                                 | *None.* (No prefix is used)    | assign\_prefix="myvar" |

## Output

Returns an array of the affiliates. By default the array is:

```
3 => "lonnyk"
```

When data=1 is passed in the function will return a multi-dimensional array and will have the following variables available as well:

* username
* deleted
* type
* payvia\_type\_id
* status
* join\_date
* firstname
* lastname
* email
* last\_login
* minimum\_payout
* company
* url
* tel
* address1
* address2
* city
* state
* country
* zip\_code
* tax\_id\_or\_ssn

## Examples

```
{nats_list_affiliates data=1 deleted=1 userid="1,105,1036"}
```

## Notes

To make an array reference, create the array using the [nats\_add\_to\_array ](/nats-admin/skins-and-templates/further-reading/template-functions/nats_add_to_array.md)function.

## See Also

* [nats\_list\_campaigns](/nats-admin/skins-and-templates/further-reading/template-functions/nats_list_campaigns.md)
* [nats\_list\_sites](/nats-admin/skins-and-templates/further-reading/template-functions/nats_list_sites.md)
* [nats\_list\_tours](/nats-admin/skins-and-templates/further-reading/template-functions/nats_list_tours.md)
* [nats\_list\_xsells](/nats-admin/skins-and-templates/further-reading/template-functions/nats_list_xsells.md)


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.toomuchmedia.com/nats-admin/skins-and-templates/further-reading/template-functions/nats_list_affiliates.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
