# PATCH /api/v1/credit/programs/{program_id}

> Update a lending program

- **Tag:** credit
- **Operation ID:** `update_program_api_v1_credit_programs__program_id__patch`

## Description

Supplying `late_terms`, `early_payoff_terms`, or `underwriting_criteria` is what settles the corresponding open decision: the guarded code paths stop raising once a rule body exists.

## Authentication

Bearer token in `Authorization` header.
Required header: `x-business-id: <business uuid>`.

## Parameters

- `program_id` (path, string, required)

## Request body

Schema: `CreditProgramUpdateRequest`

- `display_name` (string)
- `status` (ProgramStatusEnum)
- `default_rate_bps` (integer)
- `default_disbursement_fee_bps` (integer)
- `statement_balance_mode` (string)
- `allocation_scope` (string)
- `cycle_close_rule` (string)
- `cycle_anchor_day` (integer)
- `excess_credit_disposition` (string)
- `late_terms` (object)
- `early_payoff_terms` (object)
- `underwriting_criteria` (array · object)
- `legal_lending_entity` (string)
- `statement_branding` (object)
- `event_delivery_mode` (EventDeliveryMode)
- `issuing_enabled` (boolean)
- `ramp_spend_program_id` (string)
- `allowed_mcc_codes` (array · string)
- `blocked_mcc_codes` (array · string)

## Responses

### 200 — Successful Response

Schema: `SuccessEnvelope_CreditProgramResponse_`

- `success` (boolean)
- `message` (string)
- `code` (string)
- `data` (CreditProgramResponse)

### 400 — Bad Request - Invalid input

### 401 — Unauthorized - Authentication required

### 403 — Forbidden - Insufficient permissions

### 404 — Not Found - Resource does not exist

### 422 — Validation Error

Schema: `HTTPValidationError`

- `detail` (array · ValidationError) → `ValidationError`
  - `loc` (array · string | integer · required)
  - `msg` (string · required)
  - `type` (string · required)
  - `input` (object)
  - `ctx` (object)

## Code samples

### cURL

```bash
curl -X PATCH 'https://api.ondayzero.com/api/v1/credit/programs/{program_id}' \
  -H 'Authorization: Bearer dz_your_token' \
  -H 'x-business-id: YOUR_BUSINESS_ID' \
  -H 'Content-Type: application/json' \
  -d '{
  "display_name": "string",
  "status": "string",
  "default_rate_bps": 0,
  "default_disbursement_fee_bps": 0,
  "statement_balance_mode": "string",
  "allocation_scope": "string"
}'
```

### JavaScript

```javascript
const response = await fetch('https://api.ondayzero.com/api/v1/credit/programs/{program_id}', {
  method: 'PATCH',
  headers: {
    Authorization: 'Bearer dz_your_token',
    'x-business-id': 'YOUR_BUSINESS_ID',
    'Content-Type': 'application/json',
  },
  body: JSON.stringify({
  "display_name": "string",
  "status": "string",
  "default_rate_bps": 0,
  "default_disbursement_fee_bps": 0,
  "statement_balance_mode": "string",
  "allocation_scope": "string"
}),
});
const data = await response.json();
```

### Python

```python
import httpx

headers = {
    "Authorization": "Bearer dz_your_token",
    "x-business-id": "YOUR_BUSINESS_ID",
}

payload = {
  "display_name": "string",
  "status": "string",
  "default_rate_bps": 0,
  "default_disbursement_fee_bps": 0,
  "statement_balance_mode": "string",
  "allocation_scope": "string"
}

response = httpx.patch("https://api.ondayzero.com/api/v1/credit/programs/{program_id}", headers=headers, json=payload)
data = response.json()
```

## See also

- HTML version: https://www.ondayzero.com/docs/reference/credit/update-program
- OpenAPI slice: https://www.ondayzero.com/docs/reference/credit/update-program/openapi.json
- Other endpoints in **credit**: https://www.ondayzero.com/docs/reference/credit
