# Get all data processing campaigns

`GET /api/configuration/consent/data-processing`

- **Success:** `200 OK`
- **Products:** Operator (`FOH`), Consumer (`CONSUMER`) (any one of these products, not all)
- **Features:** Online Bookings (`ONLINEBOOK`), Online Joining (`ONLINEJOIN`), Front of House Generic Access (`FOHGENERIC`) (any one of these features, not all)

HTML version: [Get all data processing campaigns](https://support.gladstonesoftware.cloud/reference/configuration/get-all-data-processing-campaigns)

## Overview

Lists the data processing campaigns configured for the tenant. A data processing campaign is a named purpose for which the operator processes member data, and against which a member records a consent decision. Use it to build the consent screen, and to learn the `campaignId` values the member consent endpoints will accept.

Three things to know before you build against it:

- **`200` does not guarantee a body.** When no campaigns match, the endpoint returns `200` with an **empty body** — not `[]`. Parsing the response unconditionally will throw. Check for an empty payload as well as for an empty array.
- **`onlyActive=false` does not mean "no filter".** It inverts the filter and returns only the *inactive* campaigns. To get everything, omit the parameter entirely.
- **`protected` is always `false`.** The field is never populated on this endpoint. Ignore it.

Campaigns the operator has flagged as hidden are excluded from every response regardless of `onlyActive`, so this endpoint cannot be used to enumerate them.

A campaign the operator has just added or deactivated may not appear immediately. Campaign ids are operator-defined, not platform constants — see `[].campaignId`.

## Endpoint

`GET {base_url}/api/configuration/consent/data-processing`

`{base_url}` is the environment URL issued to your integration. See [Authenticating with Gladstone APIs](../../guides/authenticating-with-gladstone-apis.md).

## Query parameters

| Name | Type | Required | Description |
|------|------|----------|-------------|
| `onlyActive` | boolean | No | Filters the list on the campaign's active flag, and **matches the flag rather than switching the filter on and off**. `true` returns only active campaigns; `false` returns only *inactive* ones. Omit the parameter to return both — this is the only way to get the full list. It takes no account of `expiryDate`: an active campaign whose expiry date has passed is still returned by `onlyActive=true`. |

## Sample request

```bash title="cURL"
curl -X GET '{base_url}/api/configuration/consent/data-processing' \
  -H 'Authorization: Bearer {accessToken}' \
  -H 'X-Use-SSO: true'
```

## Response fields

| Field | Type | Description |
|-------|------|-------------|
| `[].campaignId` | string | The campaign's identifier, and the value you send to the member consent endpoints. It is unique within your tenant. Up to 16 characters, and **already trimmed by this endpoint**, so you receive `"NEWSLETTER"` rather than a padded string — unlike the communication channels list, which is not trimmed. **Operator-defined per tenant:** campaigns are created by the operator, so an id present in one tenant may be absent or mean something different in another. Never hard-code one. |
| `[].campaignName` | string | The campaign's short label, for use as the heading of a consent option. Maximum 50 characters. Nullable, so it can be `null` while `campaignId` is populated — fall back to `campaignId` when rendering. It must be unique at the point of creation (the create endpoint rejects a name already in use), but nothing stops it being edited into a duplicate afterwards, so do not treat it as a key. |
| `[].campaignDescription` | string | The longer explanation of what the member is consenting to, shown as the body text of the consent option. Maximum 1024 characters. Nullable and frequently empty — a consent screen that renders nothing when it is absent will show an unlabelled checkbox, so plan a fallback. |
| `[].expiryDate` | string (date-time) | The date and time after which the operator considers the campaign to have lapsed. **`null` when no expiry is set**, which is the common case. Purely informational here: the endpoint does not compare it against the current time, does not clear `isActive` when it passes, and `onlyActive=true` will happily return a campaign whose expiry date is in the past. If expiry matters to your consent flow you must evaluate this field yourself. |
| `[].isActive` | boolean | Whether the operator currently has the campaign switched on, and the field `onlyActive` filters against. Always present. `false` means the operator has retired the campaign but not deleted it — existing member consents against it are untouched, so you can still receive consent records referencing an inactive campaign. Do not offer inactive campaigns as new consent options, but do keep handling them when reading a member's existing consents. |
| `[].protected` | boolean | **Always `false` on this endpoint**, so its value carries no information. Campaigns do have a system flag, but it is not exposed here. Do not use this field to decide whether a campaign may be edited or deleted. |
| `[].translations` | array of object | Localised overrides for the campaign's text, one entry per culture and per translated property. **Always present, and an empty array when the operator has provided no translations** — which is the default, so most tenants return `[]` here. Prefer the entry matching the user's culture and fall back to `campaignName` and `campaignDescription`. Do not assume every culture returned by the cultures list has an entry; translations are added one at a time. |
| `[].translations[].type` | string | Which property of the campaign this entry translates — the name, the description, and so on. The exact set of property names in use is whatever the operator's translation records contain, so match against the values you actually receive rather than a fixed list, and skip entries whose `type` you do not recognise. |
| `[].translations[].culture` | string | The culture this text is for, matching a `code` from [the available cultures list](get-all-available-cultures.md) — the value always resolves to a real culture. Up to 20 characters, and in the same lower-case form as that endpoint returns (`en-gb`, `cy-gb`), which is **not** the mixed-case form a browser sends in `Accept-Language`. Lower-case both sides before matching. |
| `[].translations[].text` | string | The translated text itself, replacing whichever property `type` names. No length limit. Never `null` within an entry — an untranslated property has no entry at all rather than an entry with empty text. |

## Sample response

```json title="200 OK"
[
  {
    "campaignId": "string",
    "campaignName": "string",
    "campaignDescription": "string",
    "expiryDate": "2026-08-14T19:00:00Z",
    "isActive": true,
    "protected": true,
    "translations": [
      {
        "type": "string",
        "culture": "string",
        "text": "string"
      }
    ]
  }
]
```

## Errors

| Status | Meaning | When |
|--------|---------|------|
| `500` | Internal server error | Any unexpected server-side failure while reading the campaigns. The response is a bare status code with **no body**, so there is no detail to branch on. Retry with backoff. |
