# List eligibility

URL: https://docs.hanzo.ai/docs/openapi/marketing/get-marketing-promos-by-code-eligibility

> Prices a promo against a plan and seat count.

`GET /v1/marketing/promos/{code}/eligibility`

> [Marketing →](https://docs.hanzo.ai/docs/openapi/marketing) · [All API references →](https://docs.hanzo.ai/docs/openapi) · [Get started →](https://docs.hanzo.ai/docs/guides)

|               |                                                               |
| ------------- | ------------------------------------------------------------- |
| **Address**   | `https://api.hanzo.ai/v1/marketing/promos/{code}/eligibility` |
| **Method**    | `GET`                                                         |
| **Operation** | `get_marketing_promos_by_code_eligibility`                    |
| **Auth**      | `Authorization: Bearer $HANZO_API_KEY`                        |

Prices a promo against a plan and seat count. It is PURE: nothing
is redeemed, credited or counted, so it is safe to call from a pricing page on
every keystroke. An inactive promo or an exhausted cap quotes ineligible with
the reason rather than erroring.

## Request

3 fields.

| Field   | In    | Type    | Required | Description                                                                           |
| ------- | ----- | ------- | -------- | ------------------------------------------------------------------------------------- |
| `code`  | path  | string  | yes      | Code is the promo code from the path.                                                 |
| `plan`  | query | string  | —        | Plan is the plan being priced: pro, max or team.                                      |
| `seats` | query | integer | —        | Seats is the Team seat count; 0 means 1, and it is ignored for the single-seat plans. |

## Response

| Status    | Body            | Meaning |
| --------- | --------------- | ------- |
| `200`     | marketing.Quote | ok      |
| `default` | problem-details | refused |

`200` body — 9 fields.

| Field           | In   | Type            | Always | Description                                                                                                                                                                                                                                                          |
| --------------- | ---- | --------------- | ------ | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `chargeCents`   | body | integer (int64) | —      | ChargeCents is what month one costs after the discount, in USD cents, totalled over the seats quoted.                                                                                                                                                                |
| `code`          | body | string          | —      | Code is the promo that was priced, as stored.                                                                                                                                                                                                                        |
| `discountCents` | body | integer (int64) | —      | DiscountCents is what the promo takes off month one, in USD cents.                                                                                                                                                                                                   |
| `eligible`      | body | boolean         | —      | Eligible says whether a redeem would be accepted right now; Reason says why not when it would not.                                                                                                                                                                   |
| `listCents`     | body | integer (int64) | —      | ListCents is the undiscounted month price in USD cents: PER SEAT on team, the whole month on pro and max, 0 for a plan with no list price.                                                                                                                           |
| `plan`          | body | string          | —      | Plan is the tier priced, lower-cased and trimmed: pro, max or team.                                                                                                                                                                                                  |
| `reason`        | body | string          | —      | Reason is why Eligible is false, drawn from: "promo redemption is closed" (the subsystem is off, which is how it ships), "promo redemption cap reached", "promo is not active", "plan is free or unknown; nothing to discount", "promo does not cover plan \<plan>". |
| `remaining`     | body | integer (int64) | —      | Remaining is how many redemptions are left under the fleet-wide cap.                                                                                                                                                                                                 |
| `seats`         | body | integer (int64) | —      | Seats is the seat count priced; a request of 0 or less was read as 1.                                                                                                                                                                                                |

Failure carries the platform error shape — see [Errors](https://docs.hanzo.ai/docs/errors).

## Examples

**CLI**

```bash
hanzo marketing promos eligibility <code>
```

**SDK**

**.ts**

```ts
import { Configuration, MarketingApi } from 'hanzoai';

const api = new MarketingApi(new Configuration({ accessToken: process.env.HANZO_API_KEY }));
const { data } = await api.getMarketingPromosByCodeEligibility({ code: 'code' });
```

**.py**

```python
from hanzoai.cloud import ApiClient, Configuration
from hanzoai.cloud.api import MarketingApi

client = ApiClient(Configuration(access_token=os.environ["HANZO_API_KEY"]))
result = MarketingApi(client).get_marketing_promos_by_code_eligibility(code='code')
```

**.go**

```go
cfg := hanzoai.NewConfiguration()
cfg.AddDefaultHeader("Authorization", "Bearer "+os.Getenv("HANZO_API_KEY"))
client := hanzoai.NewAPIClient(cfg)

resp, _, err := client.MarketingAPI.GetMarketingPromosByCodeEligibility(context.Background()).Execute()
if err != nil {
	return err
}
```

**.rs**

```rust
use hanzo_client::apis::{configuration::Configuration, marketing_api};

let mut cfg = Configuration::new();
cfg.bearer_access_token = std::env::var("HANZO_API_KEY").ok();

let result = marketing_api::get_marketing_promos_by_code_eligibility(&cfg, Default::default()).await?;
```

**.java**

```java
import ai.hanzo.cloud.ApiClient;
import ai.hanzo.cloud.api.MarketingApi;

ApiClient client = new ApiClient();
client.setBearerToken(System.getenv("HANZO_API_KEY"));

var result = new MarketingApi(client).getMarketingPromosByCodeEligibility();
```

**HTTP**

```bash
curl https://api.hanzo.ai/v1/marketing/promos/<code>/eligibility \
  -H "Authorization: Bearer $HANZO_API_KEY"
```

**MCP**

MCP reaches **marketing** through the `marketing` tool, which names its 35 operations with its own verbs — this one among them, under a name only MCP declares. `describe` explains any of them:

```bash
curl -X POST https://api.hanzo.ai/v1/mcp \
  -H "Content-Type: application/json" \
  -d '{
       "jsonrpc": "2.0",
       "id": 1,
       "method": "tools/call",
       "params": {
         "name": "describe",
         "arguments": {
           "op": "list_marketing_audiences"
         }
       }
     }'
```

---

[Marketing API](https://docs.hanzo.ai/docs/openapi/marketing) · [All Hanzo APIs](https://docs.hanzo.ai/docs/openapi) · [Interactive reference](https://docs.hanzo.ai/docs/openapi/reference)
