# Get affiliates

| HTTP method | Endpoint                   |
| ----------- | -------------------------- |
| **GET**     | **/v1/batches/affiliates** |

## Query string parameters <a href="#query-string-parameters" id="query-string-parameters"></a>

| Conditions | Parameters                | Type    | Description                                                                                                                                                               |
| ---------- | ------------------------- | ------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| Offset     | offset                    | offset  | Check page scale.                                                                                                                                                         |
| Limit      | limit                     | limit   | The number of date displays in each page.                                                                                                                                 |
| Sort       | sort                      | sort    | Ranking according to the specified field ascending "+", or descending "-".                                                                                                |
| Filters    | filters                   | filter  | Query requirements of Specify field.                                                                                                                                      |
|            |                           |         | EQUAL\_TO    NOT\_EQUAL\_TO    LESS\_THAN    LESS\_THAN\_OR\_EQUAL\_TO    GREATER\_THAN    GREATER\_THAN\_OR\_EQUAL\_TO    CONTAINS    NOT\_CONTAINS    NULL    NOT\_NULL |
| Fields     | fields                    | field   | You can choose the field of the query (the result of the query is in line with the selected field).                                                                       |
|            | id                        | integer | A string that uniquely identifies this affiliate.                                                                                                                         |
|            | first\_name               | string  | The first\_name of the this affiliate.                                                                                                                                    |
|            | last\_name                | string  | The last\_name of the this affiliate.                                                                                                                                     |
|            | email                     | string  | The email of the this affiliate.                                                                                                                                          |
|            | company                   | string  | The company of the this affiliate.                                                                                                                                        |
|            | country                   | string  | The country of the affiliate’s physical address.                                                                                                                          |
|            | status                    | string  | Affiliate’s status.                                                                                                                                                       |
|            | instant\_message\_account | string  | Instant message account.                                                                                                                                                  |
|            | instant\_message\_type    | integer | Types of instant message.                                                                                                                                                 |
|            | manager\_id               | integer | Manager id.                                                                                                                                                               |
|            | phone                     | string  | The phone number of the affiliate.                                                                                                                                        |
|            | website                   | string  |                                                                                                                                                                           |
|            | create\_time              | integer | Create time.                                                                                                                                                              |
|            | tag                       | string  | Tags belong to the category label, create or use the existing labels can be classified Affiliate, easy to manage the existing Affiliates.                                 |

## Response body parameters <a href="#response-body-parameters" id="response-body-parameters"></a>

| Field                     | Type    | Description                                                                                                                               |
| ------------------------- | ------- | ----------------------------------------------------------------------------------------------------------------------------------------- |
| id                        | integer | A string that uniquely identifies this affiliate.                                                                                         |
| first\_name               | string  | The first\_name of the this affiliate.                                                                                                    |
| last\_name                | string  | The last\_name of the this affiliate.                                                                                                     |
| email                     | string  | The email of the this affiliate.                                                                                                          |
| company                   | string  | The company of the this affiliate.                                                                                                        |
| country                   | string  | The country of the affiliate’s physical address.                                                                                          |
| status                    | string  | Affiliate’s status.                                                                                                                       |
| instant\_message\_account | string  | Instant message account.                                                                                                                  |
| instant\_message\_type    | integer | Types of instant message.                                                                                                                 |
| manager\_id               | integer | Manager id.                                                                                                                               |
| phone                     | string  | The phone number of the affiliate.                                                                                                        |
| website                   | string  |                                                                                                                                           |
| create\_time              | integer | Create time.                                                                                                                              |
| tag                       | string  | Tags belong to the category label, create or use the existing labels can be classified Affiliate, easy to manage the existing Affiliates. |
| totalPages                | integer | The list of data pages (associated with your limit).                                                                                      |
| totalRows                 | integer | Total number of available data.                                                                                                           |
| offset                    | integer | The number of records from a collection to skip. Iterating over large collections with this parameter can be slow.                        |
| limit                     | integer | The number of data displayed on one page                                                                                                  |

## Example request <a href="#example-request" id="example-request"></a>

**Request GET** <https://{networkname}.api.offerslook.com/v1/batches/affiliates?sort=-id&offset=1&limit=2&fields=id,first_name,last_name,country,status,company,email,website,tag&filters[status][EQUAL_TO]=active&filters[tag][EQUAL_TO]=demo>

**Request GET** <http://{networkname}.api.offerslook.com/v1/batches/affiliates?sort=-id&offset=1&limit=2&fields=id,first_name,last_name,country,status,company,email,website,tag&filters[status][EQUAL_TO]=active&filters[tag][EQUAL_TO]=demo>

## Example response <a href="#example-response" id="example-response"></a>

```
    {
      "code": 0,
      "message": "Success",
      "data": {
        "rowset": [
          {
            "id": 104,
            "email": "demo@Jdemo.com",
            "first_name": "demo",
            "last_name": "demo",
            "status": "active",
            "company": "demo",
            "website": "https://offerslook.gitbooks.io/api-documentation/content/",
            "country": "",
            "tag": "demo"
          },
          {
            "id": 103,
            "email": "test@JStest.com",
            "first_name": "test",
            "last_name": "test",
            "status": "active",
            "company": "test",
            "website": "https://offerslook.gitbooks.io/api-documentation/content/affiliates/",
            "country": "Albania",
            "tag": "test, demo, MD"
          }
        ],
        "totalPages": 1,
        "totalRows": 2,
        "offset": 1,
        "limit": 2
      }
    }
```
