Create or Schedule Pricing
- Omit (or
null)effective_fromto activate the price now. - Pass a future
effective_fromto schedule the change ahead of time.
cost_limit.
Activate now or schedule for later
Theeffective_from field decides whether the change is immediate or
scheduled:
- Omit (or
null) — the price activates immediately and replaces the current effective price for this rule. - Future timestamp — the price activates on that date, recorded as a scheduled change. Visible to admins via the history endpoint and the Scheduled affordance in the portal.
effective_from.
Sync mode
sync_mode controls whether Barndoor’s seeded defaults can move this row
later:
pinned(default for manually-created rules) — never auto-sync.tracking— show the user a prompt when defaults change.auto— silently follow the default. Useful when you want to outsource pricing maintenance entirely to Barndoor.
Example
Authorizations
JWT obtained through Barndoor's authentication flow. Pass the token
verbatim in Authorization: Bearer <token>. Use the Barndoor SDK's
loginInteractive() helper to obtain a token in scripts and notebooks.
Body
"gpt-4o-mini"
Optional. Defaults to catalog_slug if both are unset.
When the price activates. Omit (or null) for "now". A future
timestamp creates a scheduled change.
How the row tracks Barndoor's managed defaults:
tracking— show the user a prompt when defaults changepinned— never sync; this is your numberauto— silently follow updates to the managed defaults
tracking, pinned, auto "Q1 negotiated pricing"
Response
The created or no-op'd pricing version
A single pricing rule version. Each "rule" (logical row) has a stack
of versions; the latest version with effective_from <= now() is the
one that bills.
Upstream model name (or * wildcard)
"gpt-4o-mini"
0.15
0.6
When this version takes effect. Past = active; future = scheduled
How the row tracks Barndoor's managed defaults:
tracking— show the user a prompt when defaults changepinned— never sync; this is your numberauto— silently follow updates to the managed defaults
tracking, pinned, auto How this version of the pricing rule was produced
admin_create, admin_edit, admin_schedule, import, sync_manual, sync_auto, admin_archive, admin_restore When set, the rule only applies to routes served by this provider
