## Why Get a Campaign?

Sometimes, you may wish to return parameters for a specific campaign so you can review flights and ads associated with that campaign. To return the parameters for a campaign, be sure to pass the `CampaignID` in your request.

## API Syntax

When using the Get Campaign API endpoint, it is important to understand the syntax required to make the request. Because the Kevel API is a RESTful API, there is a specific request format that must be followed to ensure the endpoint can process the request. The format is:

`GET https://api.kevel.co/v1/campaign/{CampaignID}`

Where:

- `GET` \- the type of API request being made.
- `https://api.kevel.co` \- the URL for the request.
- `v1` \- the API version.
- `campaign` \- the API endpoint being called.
- `CampaignID` \- the ID associated with the campaign.

> 📘
> ### Note  
> Instead of returning flight objects, the `Flights` parameter will return with a value of `null`.

### Parameters

#### CampaignID
- **Type:** int32  
- **Required:** Yes  
- The ID of the Campaign

#### excludeFlights
- **Type:** boolean  
- **Default:** false  
- If true, returns only campaign metadata without flight objects. Defaults to `false`

### Response

#### 200

| Field                | Type     | Default  | Description                                |
|----------------------|----------|----------|--------------------------------------------|
| IsActive             | boolean  | true     |                                            |
| DontAffectParentFreqCap | string | null     |                                            |
| Flights              | array    |          |                                            |
| DailyCapAmount       | string   | null     |                                            |
| FreqCapType         | integer  | 0        |                                            |
| CapType             | string   | null     |                                            |
| IsFreqCap           | string   | null     |                                            |
| IsDeleted           | boolean  | true     |                                            |
| EndDateISO          | string   | null     |                                            |
| Price               | integer  | 0        |                                            |
| IsArchived          | boolean  | true     |                                            |
| LifetimeCapAmount   | string   | null     |                                            |
| FreqCapDuration     | string   | null     |                                            |
| FreqCap             | string   | null     |                                            |
| SalespersonId       | string   | null     |                                            |
| AdvertiserId        | integer  | 0        |                                            |
| Name                | string   |          |                                            |
| Id                  | integer  | 0        |                                            |
| CustomFieldsJson    | string   | null     |                                            |
| StartDateISO        | string   |          |                                            |

### Example Request

```bash
curl -X GET -H 'X-Adzerk-ApiKey:<APIKEY>' https://api.kevel.co/v1/campaign/56789
```

### Exclude Flights (returns faster with less data)
```bash
curl -X GET -H 'X-Adzerk-ApiKey:<APIKEY>' https://api.kevel.co/v1/campaign/56789?excludeFlights=true
```

### Example Response

```json
{
  "IsActive": false,
  "DontAffectParentFreqCap": null,
  "Flights": [],
  "DailyCapAmount": null,
  "FreqCapType": 0,
  "CapType": null,
  "IsFreqCap": null,
  "IsDeleted": false,
  "EndDateISO": null,
  "Price": 0,
  "IsArchived": true,
  "LifetimeCapAmount": null,
  "FreqCapDuration": null,
  "FreqCap": null,
  "SalespersonId": null,
  "AdvertiserId": 12345,
  "Name": "Nike Q4 Campaign",
  "Id": 56789,
  "CustomFieldsJson": null,
  "StartDateISO": "2017-03-11T00:00:00.0000000"
}
```
