> ## Documentation Index
> Fetch the complete documentation index at: https://docs-provider.voucher.allride.io/llms.txt
> Use this file to discover all available pages before exploring further.

# Activation and scheduling

> Activate voucher sets now or on a schedule.

## Activate now

Activation needs an approved live revision: the set must be `inactive` (a `draft` or `pending-approval` set → 409 `invalid-state-transition`). Activation and schedules need no change request (`activate-provider-voucher-sets`).

```bash theme={null}
curl -sS -X POST "$VOUCHER_API_BASE_URL/provider/v1/voucher-sets/2030:activate" \
  -H "Authorization: Bearer $VOUCHER_API_KEY" \
  -H "Idempotency-Key: $(uuidgen)"
```

The set becomes `active` at once and you receive the `voucher-set-activated` webhook. **Deactivate now** with `:deactivate` on an `active` or `deactivation-scheduled` set: it becomes `inactive` immediately and the next redemption attempt fails.

## Schedule activation and deactivation

```bash theme={null}
curl -sS -X POST "$VOUCHER_API_BASE_URL/provider/v1/voucher-sets/2030:schedule-activation" \
  -H "Authorization: Bearer $VOUCHER_API_KEY" \
  -H "Content-Type: application/json" \
  -H "Idempotency-Key: $(uuidgen)" \
  -d '{"activeFrom": "2026-11-01T00:00:00+01:00", "deactivateAt": "2027-01-31T23:00:00Z"}'
```

| Command | Allowed from | Effect |
| - | - | - |
| `:schedule-activation` with future `activeFrom` | `inactive`, `scheduled` | `scheduled`; reschedules an existing activation |
| `:schedule-activation` with past `activeFrom` | `inactive`, `scheduled` | Activates now |
| `:schedule-deactivation` | `scheduled`, `active`, `deactivation-scheduled` | Sets `deactivateAt`; an active set becomes `deactivation-scheduled` |
| `:deactivate` | `active`, `deactivation-scheduled` | `inactive` at once |

Rules:

* Instants need an offset, are stored in UTC and truncated to whole seconds, and may be at most 2 years ahead.
* `deactivateAt` must be in the future and after `activeFrom`; otherwise 422 `invalid-schedule`.
* In `:schedule-activation`, `deactivateAt` absent keeps the stored value, `null` clears it, a value replaces it.
* Schedules are applied within about a minute of the instant. The effective `status` changes at the instant itself: reads, commands and redemptions already treat a due set as `active` (or `inactive`).
* A suspended set → 409 `voucher-set-suspended`; an archived set → 409 `voucher-set-archived`.

## Cancel a schedule

`POST /provider/v1/voucher-sets/{voucherSetId}:cancel-schedule`:

* on a `scheduled` set: clears `activeFrom` and `deactivateAt`; the set is `inactive`;
* on a `deactivation-scheduled` set: clears `deactivateAt`; the set stays `active`;
* any other status → 409 `invalid-state-transition` (a set whose `activeFrom` already passed is `active`, so there is nothing to cancel).

Rescheduling from T to T2 and back to T activates the set once, at T.

## What consumers see

Consumers see a set only when it has an approved live revision, is `scheduled`, `active` or `deactivation-scheduled`, your partner is active, and AllRide has given them access to your sets. Its `availability` is:

| Your status | Consumer `availability` |
| - | - |
| `scheduled` | `upcoming` (with `activeFrom`) |
| `active` | `active` |
| `deactivation-scheduled` | `deactivation-scheduled` (with `deactivateAt`) |
| any other | not visible |

Consumers receive catalog webhooks when a set becomes available, is scheduled, activated, deactivated or changes content, and they can redeem only while it is `active` or `deactivation-scheduled` and has stock. Access per consumer is managed by AllRide; your `availability` field never means that a particular consumer has access.

You receive `voucher-set-activated` and `voucher-set-deactivated` for every activation and deactivation, whether triggered by you or by a schedule.

## Related

* [Voucher sets](https://docs-provider.voucher.allride.io/provider/voucher-sets.md#statuses)
* [Stock and alerts](https://docs-provider.voucher.allride.io/provider/stock-and-alerts.md)
* [Event catalog](https://docs-provider.voucher.allride.io/webhooks/events.md)


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.