# Affiliates

## Get All

`GET https://api.leadspedia.com/core/v2/affiliates/getAll.do`

### Parameters

- `status` (enum, optional)
  Allowed values: `Active`, `Pending`, `InActive`.

- `search` (string, optional)

- `affiliateID` (integer, optional)

- `accountManagerID` (integer, optional)

- `start` (integer, optional)
  Offset of the first row to return. Default: `0`.

- `limit` (integer, optional)
  Maximum number of rows to return. Cannot be greater than 1000. Default: `100`.


## Search

`GET https://api.leadspedia.com/core/v2/affiliates/search.do`

### Parameters

- `search` (string, required)

- `start` (integer, optional)
  Offset of the first row to return. Default: `0`.

- `limit` (integer, optional)
  Maximum number of rows to return. Cannot be greater than 1000. Default: `100`.


## Get

`GET https://api.leadspedia.com/core/v2/affiliates/getInfo.do`

### Parameters

- `affiliateID` (integer, required)


## Create

`POST https://api.leadspedia.com/core/v2/affiliates/create.do`

### Parameters

- `affiliateName` (string, required)

- `accountManagerID` (integer, required)

- `status` (enum, required)
  Allowed values: `Active`, `Pending`, `InActive`.


## Update

`POST https://api.leadspedia.com/core/v2/affiliates/updateInfo.do`

### Parameters

- `affiliateID` (integer, required)

- `affiliateName` (string, optional)
  >= 1 characters

- `alternateID` (string, optional)

- `address` (string, optional)

- `address2` (string, optional)

- `city` (string, optional)

- `state` (string, optional)

- `zipCode` (string, optional)

- `country` (string, optional)

- `website` (string, optional)


## Change Status

`POST https://api.leadspedia.com/core/v2/affiliates/changeStatus.do`

### Parameters

- `affiliateID` (integer, required)

- `status` (enum, required)
  Allowed values: `Active`, `Pending`, `InActive`.


## Update Billing

`POST https://api.leadspedia.com/core/v2/affiliates/updateBilling.do`

### Parameters

- `affiliateID` (integer, required)

- `billingCycle` (enum, optional)
  Allowed values: `Monthly`, `BiMonthly`, `Weekly`, `Two Months`, `Quarterly`, `Manual`, `Other`.


## Delete

`POST https://api.leadspedia.com/core/v2/affiliates/delete.do`

### Parameters

- `affiliateID` (integer, required)
