Assign Profile

View as Markdown
Assign a dunning profile to a cycle length category, unit-based range, or price. This determines which profile is used when dunning starts for a subscription. Resolution order: 1. Price-level assignment (if subscription has a price with an assignment) 2. Unit-based range assignment (if billing_period_days falls within computed range) 3. Category-based assignment (based on subscription's billing cycle category) 4. System default profile (always available as fallback) resource_type="cycle_length" options: - Category-based: resource_id in ["daily", "short", "standard", "long"] No min/max values needed. Replaces existing assignment for the same category. - Unit-based range: resource_id in ["day", "week", "month", "year"] Requires min_cycle_days and max_cycle_days (values in the unit, not days). Example: resource_id="month", min_cycle_days=1, max_cycle_days=3 = 1-3 months. Rejects if computed day range overlaps with existing unit-based assignments. resource_type="price": - Assign to a specific price. resource_id is the price's ID. Replaces existing assignment for the same price.

Authentication

AuthorizationBearer

Bearer authentication of the form Bearer <token>, where token is your auth token.

Path parameters

profile_idstringRequired
account_idstringRequired

Request

This endpoint expects an object.
resource_typeenumRequired

Type of resource to assign to: ‘cycle_length’ or ‘price’

resource_idstring or nullOptional

For categories: ‘daily’, ‘short’, ‘standard’, ‘long’.For unit-based ranges: ‘day’, ‘week’, ‘month’, ‘year’. For price assignments: the price ID.

min_cycle_daysinteger or nullOptional>=1

Minimum value in the unit (for unit-based assignments). E.g., 1 for ‘1-3 months’ means 1 month.

max_cycle_daysinteger or nullOptional>=1

Maximum value in the unit (for unit-based assignments). E.g., 3 for ‘1-3 months’ means 3 months.

Response

Successful Response
idstring
profile_idstring
resource_typestring
resource_idstring or null
min_cycle_daysinteger or null
max_cycle_daysinteger or null
assigned_atdatetime
cycle_unitstring or nullOptional

The unit type if unit-based (day/week/month/year), else None

computed_min_daysinteger or nullOptional

Computed minimum days (for unit-based ranges)

computed_max_daysinteger or nullOptional

Computed maximum days (for unit-based ranges)

display_rangestring or nullOptional

Human-readable range (e.g., ‘1-3 months’, ‘daily’)

Errors

422
Unprocessable Entity Error