Assign Profile
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:
- Price-level assignment (if subscription has a price with an assignment)
- Unit-based range assignment (if billing_period_days falls within computed range)
- Category-based assignment (based on subscription’s billing cycle category)
- 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
Bearer authentication of the form Bearer <token>, where token is your auth token.
Path parameters
Request
Type of resource to assign to: 'cycle_length' or 'price'
For categories: 'daily', 'short', 'standard', 'long'.For unit-based ranges: 'day', 'week', 'month', 'year'. For price assignments: the price ID.
Minimum value in the unit (for unit-based assignments). E.g., 1 for '1-3 months' means 1 month.
Maximum value in the unit (for unit-based assignments). E.g., 3 for '1-3 months' means 3 months.
Response
The unit type if unit-based (day/week/month/year), else None
Computed minimum days (for unit-based ranges)
Computed maximum days (for unit-based ranges)
Human-readable range (e.g., '1-3 months', 'daily')