> ## 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.

# Activate a voucher set now

> Moves an `inactive` set with an approved live revision to `active` at once. To bring a scheduled activation forward, use `:schedule-activation` with a past `activeFrom`. See [Activation and scheduling](/provider/activation-and-scheduling).

**Required permissions:** `activate-provider-voucher-sets` · **API keys:** allowed



## OpenAPI

````yaml /openapi/provider.v1.json post /provider/v1/voucher-sets/{voucherSetId}:activate
openapi: 3.1.1
info:
  title: AllRide Voucher Provider API
  version: 1.0.0
  description: >-
    The Provider API (`/provider/v1`) and the shared workspace API
    (`/partner/v1`) of the AllRide Voucher Platform for Partner Providers. Start
    with the [quickstart](/quickstart). This reference lists only the sandbox
    server; production is `https://api.voucher.allride.io`.
  contact:
    name: AllRide API support
    url: https://docs-provider.voucher.allride.io
servers:
  - url: https://api.voucher-staging.allride.io
    description: Sandbox
security:
  - apiKey: []
tags:
  - name: Provider profile
    description: Your consumer-visible general information and general terms.
  - name: Listing branding
    description: How you look in consumer catalogs, and the images it uses.
  - name: Categories
    description: AllRide-managed categories for voucher sets.
  - name: Voucher sets
    description: Voucher sets, their lifecycle, revisions and link templates.
  - name: Change requests
    description: Proposed content changes that AllRide approves.
  - name: Vouchers
    description: 'Codes and links: batch create, reveal, revoke.'
  - name: Voucher uploads
    description: Asynchronous CSV and XLSX imports.
  - name: Stock alerts
    description: Threshold alerts on voucher set stock.
  - name: Redemptions
    description: Redemptions of your vouchers (provider projection).
  - name: Analytics
    description: Statistics without consumer dimension.
  - name: Partner
    description: Your partner record, settings, API access and reference values.
  - name: Members
    description: People in your partner.
  - name: Groups
    description: Groups of members and the permission catalog.
  - name: API keys
    description: Credentials for your backend.
  - name: Webhook endpoints
    description: Where AllRide sends events.
  - name: Webhook deliveries
    description: Delivery log, replays.
  - name: IP allowlist
    description: Addresses allowed to call the API.
  - name: Workspace branding
    description: Your dashboard theme and its images.
  - name: Single sign-on
    description: SAML and OIDC connections.
  - name: Audit log
    description: Who changed what.
  - name: Webhooks
    description: Events AllRide sends to your endpoints.
paths:
  /provider/v1/voucher-sets/{voucherSetId}:activate:
    post:
      tags:
        - Voucher sets
      summary: Activate a voucher set now
      description: >-
        Moves an `inactive` set with an approved live revision to `active` at
        once. To bring a scheduled activation forward, use
        `:schedule-activation` with a past `activeFrom`. See [Activation and
        scheduling](/provider/activation-and-scheduling).


        **Required permissions:** `activate-provider-voucher-sets` · **API
        keys:** allowed
      operationId: provider.voucher-sets.activate
      parameters:
        - name: voucherSetId
          in: path
          required: true
          description: >-
            Numeric id (voucherSetId). A non-numeric id is a 400
            data-failed-validation; an unknown id or one of another partner is a
            404.
          schema:
            $ref: '#/components/schemas/ULong'
          example: 2030
        - $ref: '#/components/parameters/IdempotencyKey'
      responses:
        '200':
          description: Success.
          headers:
            X-Request-Id:
              $ref: '#/components/headers/XRequestId'
            Idempotent-Replayed:
              $ref: '#/components/headers/IdempotentReplayed'
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/VoucherSetResponse'
              examples:
                example:
                  summary: Example
                  value:
                    data:
                      id: 2030
                      resource: voucher-set
                      providerPartnerId: 42
                      internalName: Ride credit EUR 5 - Q4
                      voucherKind: code
                      status: scheduled
                      availability: upcoming
                      liveRevisionId: 22017
                      liveRevisionNo: 2
                      live:
                        name:
                          de: 5 € Fahrguthaben
                          en: €5 ride credit
                        summary:
                          de: Für alle E-Scooter
                          en: For all e-scooters
                        bullets:
                          - de: Einmal einlösbar
                            en: Single use
                        description: null
                        howToRedeem:
                          - de: App öffnen und Code unter Wallet eingeben
                            en: Open the app and enter the code under Wallet
                        termsText:
                          de: Einmal pro Konto einlösbar.
                          en: Redeemable once per account.
                        valueLabel:
                          de: 5 € Rabatt
                          en: €5 off
                        faceValue:
                          value: 500
                          label: 5,00 €
                        categoryId: 7017
                        linkTemplate: https://acme-scooters.example.com/r?c={{code}}
                        allowedLinkHosts:
                          - acme-scooters.example.com
                        allowedLinkSchemes: []
                        brandingOverride: null
                        countries:
                          - DE
                        extensions: null
                        metadata: null
                      draftContent: null
                      pendingChangeRequestId: null
                      activeFrom: '2026-11-01T00:00:00Z'
                      deactivateAt: null
                      activatedAt: null
                      deactivatedAt: null
                      suspendedAt: null
                      archivedAt: null
                      suspensionReason: null
                      stock:
                        remaining: 9950
                        used: 50
                        usagePercent: 0.5
                        availableVoucherCount: 9950
                        expiredVoucherCount: 0
                        revokedVoucherCount: 0
                        stockStatus: available
                        updatedAt: '2026-10-22T07:58:31.204Z'
                      createdBy:
                        type: partner-user
                        id: 4043
                        label: ops@example.com
                      createdAt: '2026-10-20T09:12:44.501Z'
                      updatedAt: '2026-10-22T07:10:02.300Z'
                      _links:
                        self:
                          href: >-
                            https://api.voucher-staging.allride.io/provider/v1/voucher-sets/2030
                          type: application/json
                        vouchers:
                          href: >-
                            https://api.voucher-staging.allride.io/provider/v1/voucher-sets/2030/vouchers
                          type: application/json
                        uploads:
                          href: >-
                            https://api.voucher-staging.allride.io/provider/v1/voucher-sets/2030/uploads
                          type: application/json
                        changeRequests:
                          href: >-
                            https://api.voucher-staging.allride.io/provider/v1/voucher-sets/2030/change-requests
                          type: application/json
                        changelog:
                          href: >-
                            https://api.voucher-staging.allride.io/provider/v1/voucher-sets/2030/changelog
                          type: application/json
                        revisions:
                          href: >-
                            https://api.voucher-staging.allride.io/provider/v1/voucher-sets/2030/revisions
                          type: application/json
                        stockAlertRule:
                          href: >-
                            https://api.voucher-staging.allride.io/provider/v1/voucher-sets/2030/stock-alert-rule
                          type: application/json
        '400':
          $ref: '#/components/responses/BadRequestPost'
        '401':
          $ref: '#/components/responses/Unauthorized'
        '403':
          $ref: '#/components/responses/Forbidden'
        '404':
          description: 'Not found: `voucher-set-not-found`, `route-not-found`.'
          x-error-codes:
            - voucher-set-not-found
            - route-not-found
          headers:
            X-Request-Id:
              $ref: '#/components/headers/XRequestId'
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
              examples:
                voucher-set-not-found:
                  summary: Voucher set not found
                  value:
                    errors:
                      - message: No voucher set with this id exists for your partner.
                        statusCode: 404
                        errorCode: voucher-set-not-found
        '409':
          description: >-
            Conflict: `invalid-state-transition`, `voucher-set-suspended`,
            `voucher-set-archived`, `idempotency-key-in-use`.
          x-error-codes:
            - invalid-state-transition
            - voucher-set-suspended
            - voucher-set-archived
            - idempotency-key-in-use
          headers:
            X-Request-Id:
              $ref: '#/components/headers/XRequestId'
            Retry-After:
              $ref: '#/components/headers/RetryAfter'
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
              examples:
                invalid-state-transition:
                  summary: Invalid state transition
                  value:
                    errors:
                      - message: >-
                          The command is not allowed in the resource's current
                          status; the message names the from and to states. This
                          is also the answer when another change moved the
                          resource first: the status is checked when the command
                          runs.
                        statusCode: 409
                        errorCode: invalid-state-transition
                voucher-set-suspended:
                  summary: Voucher set suspended
                  value:
                    errors:
                      - message: >-
                          AllRide has suspended the voucher set; providers
                          cannot activate, schedule, archive, change or add
                          vouchers to it.
                        statusCode: 409
                        errorCode: voucher-set-suspended
                voucher-set-archived:
                  summary: Voucher set archived
                  value:
                    errors:
                      - message: The voucher set is archived, which is terminal.
                        statusCode: 409
                        errorCode: voucher-set-archived
        '422':
          description: 'Unprocessable content: `idempotency-key-reused`.'
          x-error-codes:
            - idempotency-key-reused
          headers:
            X-Request-Id:
              $ref: '#/components/headers/XRequestId'
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
              examples:
                idempotency-key-reused:
                  summary: Idempotency-Key reused
                  value:
                    errors:
                      - message: >-
                          The Idempotency-Key was already used for a different
                          request.
                        statusCode: 422
                        errorCode: idempotency-key-reused
        '500':
          $ref: '#/components/responses/InternalError'
        '503':
          $ref: '#/components/responses/ServiceUnavailable'
components:
  schemas:
    ULong:
      type: integer
      format: uint64
      minimum: 0
      maximum: 18446744073709552000
      x-bigint: true
      description: >-
        Unsigned 64-bit integer. May exceed 2^53; parse with a BigInt-safe JSON
        parser in JavaScript.
    VoucherSetResponse:
      type: object
      properties:
        data:
          $ref: '#/components/schemas/VoucherSet'
      required:
        - data
      description: Single-object envelope around VoucherSet.
      additionalProperties: false
    ErrorResponse:
      type: object
      properties:
        errors:
          type: array
          items:
            $ref: '#/components/schemas/ErrorEntry'
          description: The errors; in v1 always exactly one.
          minItems: 1
      required:
        - errors
      description: >-
        Error body of every 4xx and 5xx response (Content-Type:
        application/json).
      additionalProperties: false
    VoucherSet:
      type: object
      properties:
        id:
          $ref: '#/components/schemas/ULong'
          description: Voucher set id.
        resource:
          type: string
          enum:
            - voucher-set
          description: Always voucher-set.
        providerPartnerId:
          $ref: '#/components/schemas/ULong'
          description: Your partner id.
        internalName:
          type: string
          description: Your internal label, never shown to consumers.
        voucherKind:
          type: string
          enum:
            - code
            - link
          description: >-
            Kind of vouchers in the set. Treat as an open set: new values may be
            added.
        status:
          type: string
          enum:
            - draft
            - pending-approval
            - inactive
            - scheduled
            - active
            - deactivation-scheduled
            - suspended
            - archived
          description: >-
            Effective status of the voucher set. Treat as an open set: new
            values may be added.
        availability:
          type:
            - string
            - 'null'
          enum:
            - upcoming
            - active
            - deactivation-scheduled
            - null
          description: >-
            Status as consumers would see it; null when not consumer-visible. It
            never implies that a given consumer has access. Treat as an open
            set: new values may be added.
        liveRevisionId:
          oneOf:
            - $ref: '#/components/schemas/ULong'
            - type: 'null'
          description: Live revision.
        liveRevisionNo:
          type: integer
          description: 0 before the first approval.
        live:
          oneOf:
            - $ref: '#/components/schemas/VoucherSetContent'
            - type: 'null'
          description: Approved content consumers see.
        draftContent:
          oneOf:
            - $ref: '#/components/schemas/VoucherSetContent'
            - type: 'null'
          description: Working copy; not visible to consumers.
        pendingChangeRequestId:
          oneOf:
            - $ref: '#/components/schemas/ULong'
            - type: 'null'
          description: Open change request, if any.
        activeFrom:
          oneOf:
            - $ref: '#/components/schemas/Instant'
            - type: 'null'
          description: Pending activation instant.
        deactivateAt:
          oneOf:
            - $ref: '#/components/schemas/Instant'
            - type: 'null'
          description: Pending deactivation instant.
        activatedAt:
          oneOf:
            - $ref: '#/components/schemas/Instant'
            - type: 'null'
          description: When the set last became active.
        deactivatedAt:
          oneOf:
            - $ref: '#/components/schemas/Instant'
            - type: 'null'
          description: When it last became inactive.
        suspendedAt:
          oneOf:
            - $ref: '#/components/schemas/Instant'
            - type: 'null'
          description: When AllRide suspended it.
        archivedAt:
          oneOf:
            - $ref: '#/components/schemas/Instant'
            - type: 'null'
          description: When it was archived.
        suspensionReason:
          type:
            - string
            - 'null'
          description: Reason given by AllRide.
        stock:
          $ref: '#/components/schemas/VoucherSetStock'
        createdBy:
          $ref: '#/components/schemas/Actor'
        createdAt:
          $ref: '#/components/schemas/Instant'
          description: Creation time.
        updatedAt:
          $ref: '#/components/schemas/Instant'
          description: Last change.
        _links:
          type: object
          description: >-
            Links to related resources (self, vouchers, uploads, changeRequests,
            changelog, revisions, stockAlertRule, pendingChangeRequest).
          additionalProperties:
            $ref: '#/components/schemas/Link'
      required:
        - id
        - resource
        - providerPartnerId
        - internalName
        - voucherKind
        - status
        - availability
        - liveRevisionId
        - liveRevisionNo
        - live
        - draftContent
        - pendingChangeRequestId
        - activeFrom
        - deactivateAt
        - activatedAt
        - deactivatedAt
        - suspendedAt
        - archivedAt
        - suspensionReason
        - stock
        - createdBy
        - createdAt
        - updatedAt
        - _links
      description: A voucher set (provider view).
      additionalProperties: false
    ErrorEntry:
      type: object
      properties:
        message:
          type: string
          description: >-
            Human-readable message. Do not parse it; it can change. For 5xx
            errors it is always the generic `Something went wrong on our side`.
        statusCode:
          type: integer
          description: The HTTP status.
        errorCode:
          type: string
          description: >-
            Stable kebab-case error code, listed in the error catalog. Branch on
            this field.
        requestId:
          type: string
          description: >-
            5xx only: the request id (also in the `X-Request-Id` header). Quote
            it when you contact support.
        more:
          type: object
          additionalProperties: true
          description: >-
            Additional details for some codes, for example `validationErrors`
            (array of `ValidationError`) or `requiredPermissions`. The members
            per code are listed in the error catalog.
          properties:
            validationErrors:
              type: array
              items:
                $ref: '#/components/schemas/ValidationError'
              description: Invalid properties or parameters.
      required:
        - message
        - statusCode
        - errorCode
      description: One error. Branch on `errorCode`; ignore members you do not know.
    VoucherSetContent:
      type: object
      properties:
        name:
          $ref: '#/components/schemas/I18nText'
          description: Card title; up to 80 characters per locale. Required on submission.
        summary:
          oneOf:
            - $ref: '#/components/schemas/I18nText'
            - type: 'null'
          description: One-liner; up to 160 characters per locale.
        bullets:
          type: array
          items:
            $ref: '#/components/schemas/I18nText'
          description: Up to 5 short lines on the card, 120 characters each.
          maxItems: 5
        description:
          oneOf:
            - $ref: '#/components/schemas/I18nMarkdown'
            - type: 'null'
          description: Restricted Markdown, up to 5,000 characters per locale.
        howToRedeem:
          type: array
          items:
            $ref: '#/components/schemas/I18nText'
          description: Up to 8 redemption steps, 300 characters each.
          maxItems: 8
        termsText:
          oneOf:
            - $ref: '#/components/schemas/I18nMarkdown'
            - type: 'null'
          description: >-
            The voucher set's own voucher terms as restricted Markdown, up to
            20,000 characters per locale. Required on submission (terms-required
            at termsText). Your general terms and privacy URLs and your app
            links belong to the provider profile, not to a voucher set.
        valueLabel:
          oneOf:
            - $ref: '#/components/schemas/I18nText'
            - type: 'null'
          description: Display value such as "€5 off"; up to 30 characters per locale.
        faceValue:
          oneOf:
            - $ref: '#/components/schemas/Money'
            - type: 'null'
          description: Nominal value of one voucher, used for statistics.
        categoryId:
          oneOf:
            - $ref: '#/components/schemas/ULong'
            - type: 'null'
          description: Id of an active category. Required on submission.
        linkTemplate:
          type:
            - string
            - 'null'
          description: >-
            Link Template rendered next to the code (code sets only).
            Placeholders only in path, query or fragment.
        allowedLinkHosts:
          type: array
          items:
            type: string
            description: Host name.
          description: >-
            Hosts allowed for https links of this set (at most 10). Required
            when an https link can occur.
          maxItems: 10
        allowedLinkSchemes:
          type: array
          items:
            type: string
            description: Lower-case custom app scheme.
          description: Custom app schemes allowed for links (at most 3).
          maxItems: 3
        brandingOverride:
          oneOf:
            - $ref: '#/components/schemas/BrandingOverride'
            - type: 'null'
          description: Per-set colours, logo and hero image.
        countries:
          type: array
          items:
            $ref: '#/components/schemas/CountryCode'
          description: Countries where the set is offered; empty means all.
        extensions:
          oneOf:
            - $ref: '#/components/schemas/JsonMetadata'
            - type: 'null'
          description: >-
            Namespaced display hints for consumers (keys x-* or
            <consumerSlug>.*).
        metadata:
          oneOf:
            - $ref: '#/components/schemas/JsonMetadata'
            - type: 'null'
          description: Provider metadata visible to consumers.
      required: []
      description: >-
        Consumer-visible content of a voucher set. Every field changes only
        through an approved change request. In drafts every field is present
        with null or [] when unset.
      additionalProperties: false
    Instant:
      type: string
      format: date-time
      description: >-
        RFC 3339 timestamp in UTC with Z, at millisecond precision; no fraction
        when the milliseconds are zero. Inputs need an offset.
      example: '2026-11-01T00:00:00Z'
    VoucherSetStock:
      type: object
      properties:
        remaining:
          oneOf:
            - $ref: '#/components/schemas/ULong'
              description: Remaining redemptions; null means unlimited.
            - type: 'null'
        used:
          $ref: '#/components/schemas/ULong'
          description: Redemptions so far.
        usagePercent:
          type:
            - number
            - 'null'
          description: >-
            Used / (used + remaining) × 100, two decimals; null when unlimited
            or empty.
        availableVoucherCount:
          type: integer
          description: Available vouchers.
        expiredVoucherCount:
          type: integer
          description: Expired vouchers.
        revokedVoucherCount:
          type: integer
          description: Revoked vouchers.
        stockStatus:
          type: string
          enum:
            - available
            - low
            - depleted
          description: >-
            Stock status: low at 90 % used, depleted when nothing remains. Treat
            as an open set: new values may be added.
        updatedAt:
          $ref: '#/components/schemas/Instant'
          description: >-
            When the figures were computed (eventually consistent, up to 2
            minutes).
      required:
        - remaining
        - used
        - usagePercent
        - availableVoucherCount
        - expiredVoucherCount
        - revokedVoucherCount
        - stockStatus
        - updatedAt
      description: Stock figures of a voucher set.
      additionalProperties: false
    Actor:
      type: object
      properties:
        type:
          type: string
          enum:
            - admin-user
            - partner-user
            - api-key
            - redemption-session
            - system
          description: 'Kind of actor. Treat as an open set: new values may be added.'
        id:
          oneOf:
            - $ref: '#/components/schemas/ULong'
            - type: 'null'
          description: Id of the user or API key; null for AllRide staff.
        label:
          type: string
          description: >-
            Display snapshot: email or key name; AllRide staff appear as
            "AllRide".
      required:
        - type
        - id
        - label
      description: Who did something.
      additionalProperties: false
    Link:
      type: object
      properties:
        href:
          type: string
          description: Absolute URL.
          format: uri
        type:
          type: string
          description: Media type of the target.
      required:
        - href
        - type
      description: A link to a related resource.
      additionalProperties: false
    ValidationError:
      type: object
      properties:
        property:
          type: string
          description: >-
            Path of the offending property in your request body
            (`vouchers[17].value`), or the name of the query parameter, path
            parameter or header.
        constraint:
          type: string
          description: >-
            The violated rule as a kebab-case item code, for example `required`,
            `too-long`, `invalid-id`, `unknown-field`. See the validation item
            codes in the error catalog.
        params:
          type: object
          additionalProperties: true
          description: >-
            Parameters of the violated constraint, for example `{"max": 120}`
            for `too-long`; absent when the constraint has none.
        value:
          type:
            - number
            - boolean
          description: >-
            The rejected value, only when it is a number or boolean. Strings are
            never echoed, so secrets, voucher values and personal data never
            come back in an error.
        message:
          type: object
          description: Explanation per locale.
          properties:
            en:
              type: string
              description: English message.
            de:
              type: string
              description: German message.
          required:
            - en
          additionalProperties: false
      required:
        - property
        - constraint
        - message
      description: >-
        One invalid property or parameter of a `data-failed-validation` error
        (also used for item failures of batch operations and content checks).
    I18nText:
      type: object
      propertyNames:
        $ref: '#/components/schemas/Locale'
      additionalProperties:
        type: string
      description: >-
        Localised text: a map from locale to text. Responses always return every
        locale; requests must include your partner's defaultLocale.
    I18nMarkdown:
      type: object
      propertyNames:
        $ref: '#/components/schemas/Locale'
      additionalProperties:
        type: string
      description: >-
        Localised restricted Markdown (paragraphs, line breaks, bold, italic,
        lists up to depth 2, headings level 3-4, https links; no HTML, images,
        tables or code). Render with a sanitising Markdown renderer, never as
        raw HTML.
    Money:
      type: object
      properties:
        value:
          type: integer
          description: Amount in euro cent.
          minimum: 0
        label:
          type: string
          description: >-
            Formatted amount in the response locale (de 29,00 €, en €29.00).
            Ignored in requests.
          readOnly: true
      required:
        - value
      description: An amount in euros (EUR), in cent.
      additionalProperties: false
    BrandingOverride:
      type: object
      properties:
        primaryColor:
          type:
            - string
            - 'null'
          description: 'Colour #rrggbb.'
          pattern: ^#[0-9a-fA-F]{6}$
        secondaryColor:
          type:
            - string
            - 'null'
          description: 'Colour #rrggbb.'
          pattern: ^#[0-9a-fA-F]{6}$
        backgroundColor:
          type:
            - string
            - 'null'
          description: 'Colour #rrggbb.'
          pattern: ^#[0-9a-fA-F]{6}$
        surfaceColor:
          type:
            - string
            - 'null'
          description: 'Colour #rrggbb.'
          pattern: ^#[0-9a-fA-F]{6}$
        textColor:
          type:
            - string
            - 'null'
          description: 'Colour #rrggbb.'
          pattern: ^#[0-9a-fA-F]{6}$
        accentColor:
          type:
            - string
            - 'null'
          description: 'Colour #rrggbb.'
          pattern: ^#[0-9a-fA-F]{6}$
        buttonColor:
          type:
            - string
            - 'null'
          description: 'Colour #rrggbb.'
          pattern: ^#[0-9a-fA-F]{6}$
        buttonTextColor:
          type:
            - string
            - 'null'
          description: 'Colour #rrggbb.'
          pattern: ^#[0-9a-fA-F]{6}$
        buttonBorderColor:
          type:
            - string
            - 'null'
          description: 'Colour #rrggbb.'
          pattern: ^#[0-9a-fA-F]{6}$
        logoAssetId:
          oneOf:
            - $ref: '#/components/schemas/ULong'
            - type: 'null'
          description: Logo asset.
        heroImageAssetId:
          oneOf:
            - $ref: '#/components/schemas/ULong'
            - type: 'null'
          description: Hero image asset.
      required: []
      description: Per-set colours and images.
      additionalProperties: false
    CountryCode:
      type: string
      pattern: ^[A-Z]{2}$
      description: ISO 3166-1 alpha-2 country code.
      x-standard: iso-3166-1-alpha-2
    JsonMetadata:
      type: object
      additionalProperties: true
      description: >-
        Free JSON object: at most 16 KiB serialised, depth 5, 100 keys per
        object, keys ^[A-Za-z0-9_.:-]{1,64}$. Key order is not preserved.
  parameters:
    IdempotencyKey:
      name: Idempotency-Key
      in: header
      required: false
      description: >-
        Optional on every POST: 1-255 printable ASCII characters without spaces
        (a UUID is recommended). The same key with the same request replays the
        stored response for 24 hours. See [Idempotency](/guides/idempotency).
      schema:
        type: string
        minLength: 1
        maxLength: 255
        pattern: ^[\x21-\x7E]{1,255}$
      example: 4e1c7f6a-2b0d-4c1e-9a7b-3f5e8d2c1b0a
  headers:
    XRequestId:
      description: >-
        Request id: your X-Request-Id (1-100 characters of [A-Za-z0-9._:-]) or a
        generated UUID.
      schema:
        type: string
    IdempotentReplayed:
      description: >-
        true when this response is a replay of a stored response for the same
        Idempotency-Key.
      schema:
        type: boolean
    RetryAfter:
      description: Seconds to wait before the next request or poll.
      schema:
        type: integer
        example: 2
  responses:
    BadRequestPost:
      description: >-
        Bad request: `data-failed-validation`, `malformed-json`,
        `invalid-header`, `invalid-idempotency-key`.
      x-error-codes:
        - data-failed-validation
        - malformed-json
        - invalid-header
        - invalid-idempotency-key
      headers:
        X-Request-Id:
          $ref: '#/components/headers/XRequestId'
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ErrorResponse'
          examples:
            data-failed-validation:
              summary: Data failed validation
              value:
                errors:
                  - message: Data failed validation
                    statusCode: 400
                    errorCode: data-failed-validation
                    more:
                      validationErrors:
                        - property: internalName
                          constraint: too-long
                          params:
                            max: 120
                          message:
                            en: Must be at most 120 characters.
                            de: Darf höchstens 120 Zeichen lang sein.
                        - property: content.linkTemplate
                          constraint: invalid-link-template
                          message:
                            en: >-
                              Placeholders are allowed only in the path, query
                              or fragment.
                            de: >-
                              Platzhalter sind nur im Pfad, in der Query oder im
                              Fragment erlaubt.
            malformed-json:
              summary: Malformed JSON
              value:
                errors:
                  - message: The body is not valid UTF-8 JSON.
                    statusCode: 400
                    errorCode: malformed-json
            invalid-header:
              summary: Invalid header
              value:
                errors:
                  - message: >-
                      A standard or platform header is malformed;
                      more.validationErrors[].property names the header.
                    statusCode: 400
                    errorCode: invalid-header
            invalid-idempotency-key:
              summary: Invalid Idempotency-Key
              value:
                errors:
                  - message: >-
                      The Idempotency-Key header is not 1-255 printable ASCII
                      characters without spaces.
                    statusCode: 400
                    errorCode: invalid-idempotency-key
    Unauthorized:
      description: >-
        Unauthorized: `unauthenticated`, `token-invalid`, `api-key-invalid`,
        `token-expired`, `session-revoked`.
      x-error-codes:
        - unauthenticated
        - token-invalid
        - api-key-invalid
        - token-expired
        - session-revoked
      headers:
        X-Request-Id:
          $ref: '#/components/headers/XRequestId'
        WWW-Authenticate:
          description: >-
            Bearer realm="voucher" (plus error="invalid_token" when a credential
            was sent).
          schema:
            type: string
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ErrorResponse'
          examples:
            unauthenticated:
              summary: Authentication required
              value:
                errors:
                  - message: No credential was sent with the request.
                    statusCode: 401
                    errorCode: unauthenticated
            token-invalid:
              summary: Invalid credential
              value:
                errors:
                  - message: >-
                      The credential cannot be verified for this surface, has an
                      unknown scheme, or two Authorization headers were sent.
                    statusCode: 401
                    errorCode: token-invalid
            api-key-invalid:
              summary: Invalid API key
              value:
                errors:
                  - message: >-
                      The API key is unknown, revoked, expired, or belongs to
                      the other environment (a vk_test_ key against production
                      or a vk_live_ key against the sandbox).
                    statusCode: 401
                    errorCode: api-key-invalid
            token-expired:
              summary: Credential expired
              value:
                errors:
                  - message: The dashboard user's ID token has expired.
                    statusCode: 401
                    errorCode: token-expired
            session-revoked:
              summary: Session revoked
              value:
                errors:
                  - message: The dashboard user's session was revoked.
                    statusCode: 401
                    errorCode: session-revoked
    Forbidden:
      description: >-
        Forbidden: `missing-permission`, `partner-role-missing`,
        `partner-suspended`, `partner-offboarded`, `api-access-inactive`,
        `ip-not-allowed`, `mfa-required`, `sso-required`.
      x-error-codes:
        - missing-permission
        - partner-role-missing
        - partner-suspended
        - partner-offboarded
        - api-access-inactive
        - ip-not-allowed
        - mfa-required
        - sso-required
      headers:
        X-Request-Id:
          $ref: '#/components/headers/XRequestId'
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ErrorResponse'
          examples:
            missing-permission:
              summary: Missing permission
              value:
                errors:
                  - message: >-
                      The membership or API key lacks a permission the operation
                      requires; more.requiredPermissions lists them. API keys
                      always get this code on dashboard-only operations.
                    statusCode: 403
                    errorCode: missing-permission
                    more:
                      requiredPermissions:
                        - manage-provider-voucher-sets
            partner-role-missing:
              summary: Partner role missing
              value:
                errors:
                  - message: >-
                      The partner lacks the role this surface needs
                      (more.requiredRole names it), for example a consumer-only
                      partner on /provider/v1.
                    statusCode: 403
                    errorCode: partner-role-missing
                    more:
                      requiredRole: provider
            partner-suspended:
              summary: Partner suspended
              value:
                errors:
                  - message: The partner is suspended; only reads are allowed.
                    statusCode: 403
                    errorCode: partner-suspended
            partner-offboarded:
              summary: Partner offboarded
              value:
                errors:
                  - message: The partner has been offboarded.
                    statusCode: 403
                    errorCode: partner-offboarded
            api-access-inactive:
              summary: API access inactive
              value:
                errors:
                  - message: >-
                      API access of the partner is not active, or the partner is
                      not active. API keys work only while both are active; the
                      same code answers key and webhook operations that need
                      active API access.
                    statusCode: 403
                    errorCode: api-access-inactive
            ip-not-allowed:
              summary: IP address not allowed
              value:
                errors:
                  - message: >-
                      The request came from an address outside the partner's IP
                      allowlist while enforcement is on.
                    statusCode: 403
                    errorCode: ip-not-allowed
            mfa-required:
              summary: Multi-factor authentication required
              value:
                errors:
                  - message: >-
                      The partner requires multi-factor authentication and the
                      session has not satisfied it.
                    statusCode: 403
                    errorCode: mfa-required
            sso-required:
              summary: Single sign-on required
              value:
                errors:
                  - message: >-
                      The partner enforces single sign-on for the user's email
                      domain.
                    statusCode: 403
                    errorCode: sso-required
    InternalError:
      description: 'Internal error: `internal-error`.'
      x-error-codes:
        - internal-error
      headers:
        X-Request-Id:
          $ref: '#/components/headers/XRequestId'
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ErrorResponse'
          examples:
            internal-error:
              summary: Internal error
              value:
                errors:
                  - message: Something went wrong on our side
                    statusCode: 500
                    errorCode: internal-error
                    requestId: 0b6f3c1e-9d5a-4c43-a2a8-1f3d2b7c9e10
    ServiceUnavailable:
      description: >-
        Service unavailable: `service-unavailable`, `db-unavailable`,
        `query-timeout`.
      x-error-codes:
        - service-unavailable
        - db-unavailable
        - query-timeout
      headers:
        X-Request-Id:
          $ref: '#/components/headers/XRequestId'
        Retry-After:
          $ref: '#/components/headers/RetryAfter'
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ErrorResponse'
          examples:
            service-unavailable:
              summary: Service unavailable
              value:
                errors:
                  - message: Something went wrong on our side
                    statusCode: 503
                    errorCode: service-unavailable
                    requestId: 0b6f3c1e-9d5a-4c43-a2a8-1f3d2b7c9e10
            db-unavailable:
              summary: Database unavailable
              value:
                errors:
                  - message: Something went wrong on our side
                    statusCode: 503
                    errorCode: db-unavailable
                    requestId: 0b6f3c1e-9d5a-4c43-a2a8-1f3d2b7c9e10
            query-timeout:
              summary: Query timeout
              value:
                errors:
                  - message: Something went wrong on our side
                    statusCode: 503
                    errorCode: query-timeout
                    requestId: 0b6f3c1e-9d5a-4c43-a2a8-1f3d2b7c9e10
  securitySchemes:
    apiKey:
      type: http
      scheme: bearer
      bearerFormat: vk_live_<apiKeyId>_<secret>
      description: >-
        Partner API key: `Authorization: Bearer vk_live_…`. Use `vk_test_…` keys
        against the sandbox. See [Authentication](/guides/authentication).

````

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