Create migration
This endpoint creates a migration of a plan’s subscriptions to one of its versions. With
included_subscription_ids it migrates exactly those subscriptions; otherwise it migrates the
plan’s subscriptions that match the filters. Each subscription is migrated asynchronously; fetch
the migration to follow its status.
Authorizations
API Keys can be issued in the Orb's web application.
Body
The plan version to migrate subscriptions to. It can't be a draft version.
When the migration takes effect: 'immediately', 'requested_date' on effective_date, 'start_of_term' or 'end_of_term' for the start or end of each subscription's current billing period, or 'start_of_invoice' or 'end_of_invoice' for the start of its current or next invoice.
immediately, requested_date, start_of_term, end_of_term, start_of_invoice, end_of_invoice The plan whose subscriptions to migrate. Exactly one of plan_id and external_plan_id is required.
The external ID of the plan whose subscriptions to migrate.
The date the migration takes effect, at midnight in each customer's timezone. Required when effective_time is requested_date, and not allowed otherwise.
Migrate only these subscriptions. When set, the filters below are ignored.
1 - 250 elementsLeave these subscriptions out. Can't be combined with included_subscription_ids.
1 - 250 elementsMigrate subscriptions with these statuses. Defaults to active subscriptions.
1active, upcoming Migrate only subscriptions currently on these plan versions.
1true migrates only subscriptions in a trial, false only subscriptions not in a trial.
When false, a subscription whose migration would void an issued invoice or create a credit note fails instead.
When true, an in-arrears price the migration ends mid-cycle bills its final line item on the next scheduled invoice instead of on its end date.
Why the migration was created.
500Response
Created
A migration moves a plan's subscriptions onto one of the plan's versions. Each subscription is migrated asynchronously, either immediately or at a scheduled time, and the migration reports its overall status as it progresses.
Unique identifier for this plan version change.
The ID of the plan being migrated.
When the migration takes effect. Can be a specific date/time, 'start_of_term' or 'end_of_term' when scheduled to be at the start or end of the current billing period, or 'start_of_invoice' or 'end_of_invoice' when scheduled to be at the start of the current or next invoice.
Current status of the migration: 'not_started', 'in_progress', 'completed', 'action_needed', or 'canceled'.
not_started, in_progress, completed, action_needed, canceled When Orb began migrating the plan's subscriptions. Null if the migration has not begun, or was canceled before it began.
When the migration completed or was canceled, or null if it is still in progress.
The plan version subscriptions are migrated to.