# Line Item Eligibility

Before a line item can bid on an impression, it must pass all eligibility checks. These checks are evaluated in order and the first failure stops evaluation.

## Eligibility checks

| # | Check          | Rejection reason                                                                                                        |
| - | -------------- | ----------------------------------------------------------------------------------------------------------------------- |
| 1 | **Status**     | Line item must not be `paused`                                                                                          |
| 2 | **Start date** | Current time must be after `delivery.startDate`                                                                         |
| 3 | **End date**   | Current time must be before `delivery.endDate`                                                                          |
| 4 | **Media type** | Line item media type must match the impression (e.g. `banner` requires `imp.banner`)                                    |
| 5 | **Targeting**  | Every targeting attribute on the unified `Targeting` shape must pass (see [Targeting](/campaign-delivery/targeting.md)) |

## Line item statuses

| Status           | Can deliver? | Description                          |
| ---------------- | ------------ | ------------------------------------ |
| `needs_creative` | No           | No creatives attached yet            |
| `ready`          | Yes          | Ready to deliver but not yet started |
| `delivering`     | Yes          | Currently active                     |
| `paused`         | No           | Manually paused by the user          |
| `completed`      | No           | Goal reached or end date passed      |

## Media type matching

The line item's `mediatype` field must match the impression object:

| Line item mediatype | Required impression field    |
| ------------------- | ---------------------------- |
| `banner`            | `imp.banner` must be present |
| `video`             | `imp.video` must be present  |
| `native`            | `imp.native` must be present |
| `audio`             | `imp.audio` must be present  |

## Debug information

In non-production environments or when `test=1` or `nexx360_debug=1` is set, the response includes an `ext.eligibility` object with the rejection reason for each line item per impression. Example reasons:

```
status:paused
date:not_started (start=2026-05-01T00:00:00Z, now=2026-04-09T12:00:00Z)
date:expired (end=2026-03-01T00:00:00Z, now=2026-04-09T12:00:00Z)
mediatype:banner (imp has no banner)
targeting:geography:included (expected=[US,CA], actual=FR,FR-IDF,Paris)
targeting:domain:excluded (expected=[competitor.com], actual=competitor.com)
targeting:userData:included (keys=[audience,category])
```

The targeting reason format is `targeting:<attribute>:<mode> (...)`, where `<attribute>` matches the field name on the unified `Targeting` shape (e.g. `geography`, `domain`, `userData`) and `<mode>` is `included` or `excluded`.


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://developer.nexx360.io/campaign-delivery/line-item-eligibility.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
