# 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](https://docs.toomuchmedia.com/nats-admin/skins-and-templates/further-reading/template-function-parameters/assign_prefix) | 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 ](https://docs.toomuchmedia.com/nats-admin/skins-and-templates/further-reading/template-functions/nats_add_to_array)function.

## See Also

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