# Generic CEP integration

> You can integrate with any customer engagement platform (CEP) using Talon.One's endpoints for third-party tools.

> For the complete documentation index, see [llms.txt](https://docs.talon.one/llms.txt).

:::important
These endpoints are for general use with any platform.
If you use a partner listed in the [Customer engagement platforms](/docs/dev/technology-partners/cep/overview.md) section, do not follow
this tutorial. Instead, refer to a tutorial specific to your platform.
:::

The following endpoints are available:

- [Create coupon](#create-a-coupon)
- [Create referral](#create-a-referral)
- [Fetch loyalty ledger](#fetch-a-loyalty-ledger)
- [Add loyalty points](#add-loyalty-points)

<Button variant="primary" size="l" href="/third-party-api#tag/Customer-engagement-platforms">
  See API docs
</Button>

## Authenticate

All CEP endpoints rely on Talon.One's third-party API keys of type **Customer Engagement**.

To generate an API key:

1. In your Application, click <Settings className="icon" /> **Settings** > **Integration API Keys**.
1. Click <Add className="icon" /> **Create API Key**.
1. In the **Create API Key** drawer, if you are asked for a key type, select **Production**.
1. In **Key name**, type a name to identify the key.
1. In **Key expiration date**, select a date.

   :::tip
   Avoid choosing expiration dates that fall at the end of the year or during other
   high-traffic periods.
   :::

1. In **Third-party integration**, select **Yes**.
1. From **Platform**, select **{props.partner}**.
1. Click **Create API Key**.
1. Click <Copy className="icon" /> to copy the key for use.

:::note
You cannot view or copy the API key after closing the drawer.
:::

Use the key in the `Authorization` header of each of the endpoints. For example:

```
Authorization: ApiKey-v1 dbc644d33aa74d582bd9479c59e16f970fe13bf3
```

## Create a coupon

To create a coupon code from a CEP platform, use the following endpoint:

```text title="GET Create coupon"
https://integration.talon.one/customer_engagement/coupon
```

<Button variant="primary" size="l" href="/third-party-api#tag/Customer-engagement-platforms/operation/cep/createCoupon">
  See API docs
</Button>

## Create a referral

To create a referral code from a CEP platform, use the following endpoint:

```text title="GET Create referral"
https://integration.talon.one/customer_engagement/referral
```

<Button variant="primary" size="l" href="/third-party-api#tag/Customer-engagement-platforms/operation/cep/createReferral">
  See API docs
</Button>

## Fetch a loyalty ledger

To fetch loyalty ledger information from a CEP platform, use the following endpoint:

```text title="GET Get loyalty ledger"
https://integration.talon.one/customer_engagement/loyalty
```

<Button variant="primary" size="l" href="/third-party-api#tag/Customer-engagement-platforms/operation/cep/loyalty">
  See API docs
</Button>

## Add loyalty points

To add loyalty points from a CEP platform, use the following endpoint:

```text title="POST Add loyalty points"
https://integration.talon.one/customer_engagement/add_loyalty_points
```

<Button variant="primary" size="l" href="/third-party-api#tag/Customer-engagement-platforms/operation/cep/addLoyaltyPoints">
  See API docs
</Button>

## Related pages

- [Generic CDP integration](/docs/dev/technology-partners/cdp/integrate-cdp.md)
