# AUTO-RENT-008 Assign Rental Vehicle Examples

These examples demonstrate the current DecisioQ flow for `AUTO-RENT-008`:

1. Request `jwtToken` from `https://identity.vinquery.com/connect/token`.
2. Load `AUTO-RENT-008` metadata from `https://dks.vinquery.com/decisioncatalog/decisions/AUTO-RENT-008`.
3. Validate the selected `profileId` and `scenarioId`.
4. Read `constraints` from the decision detail response. If the array is missing or empty, all validated candidates proceed to criteria-based ranking.
5. Execute a catalog-shaped request at `https://dde.vinquery.com/api/v1/execute-catalog`.
6. Inspect `constraintSummary` and `decisionResult.excludedOptions` in the response. Excluded candidates do not participate in ranking.

Set these environment variables before running:

```text
DECISIOQ_CLIENT_ID
DECISIOQ_CLIENT_SECRET
```

Optional overrides:

```text
DECISIOQ_AUDIENCE=vinquery:api:decisioq
DECISIOQ_IDENTITY_URL=https://identity.vinquery.com/connect/token
DECISIOQ_DKS_URL=https://dks.vinquery.com
DECISIOQ_DDE_URL=https://dde.vinquery.com
```

Available examples:

- `auto-rent-008-execute.json`
- `curl/run-auto-rent-008.sh`
- `csharp/Program.cs.txt`
- `javascript/auto-rent-008.mjs`
- `typescript/auto-rent-008.ts`
- `python/auto_rent_008.py`
- `php/auto-rent-008.php`
- `go/auto-rent-008.go`
- `java/AutoRent008Example.java`
- `csharp-complete/`
- `decisioq-auto-rent-008-complete-example.zip`

All option identifiers are fictional. Do not send real customer data, real VINs, licence plates, financing applications, credit information, employee data, or unrestricted salesperson notes in public examples.

## Constraint handling

This decision currently has no catalog-defined hard constraints. All validated candidates proceed to criteria-based ranking.

Client examples should still keep this pattern:

```text
constraints = decisionDetail.constraints || []
if constraints is empty:
  submit all validated candidates for ranking
else:
  show eligible and excluded candidates from constraintSummary and decisionResult.excludedOptions
```

For this example, the expected response has `constraintSummary.definedConstraintCount = 0`, `constraintSummary.excludedOptionCount = 0`, and an empty `decisionResult.excludedOptions` array.