Platform.sh Vouchers API

These endpoints can be used to retrieve vouchers associated with a particular user as well as apply a voucher to a particular user.

GitHub OpenAPI

Operations 2

Each operation below carries the questions people ask an LLM about it and the instructions they give an agent to run it. Generated by API Evangelist overlay

GET /organizations/{organization_id}/vouchers List an organization's vouchers · List vouchers #
Ask an LLM
“What vouchers have been issued to my organization?”
“Can I see the discount codes applied to an account?”
Tell an agent
List vouchers for organization {organization_id}.
Show every discount code applied to {organization_id}.
POST /organizations/{organization_id}/vouchers/apply Apply a voucher to an organization · Apply voucher #
Ask an LLM
“How do I redeem a discount code against my organization's account?”
“Can I apply a voucher to an open order?”
Tell an agent
Apply voucher {code} to organization {organization_id}.
Redeem {code} on {organization_id} and refresh its open order.

Work with this as data

Every API here is available over the APIs.io API and to AI agents over MCP.

MCP server

One button, every client — Claude, Cursor, VS Code and the rest.

https://apis.io/mcp

Tools for apis

7 MCP tools reach this
  • find_apisBrowse and filter every API in the catalog.
  • get_api_artifactsOne API's artifacts, grouped by type.
  • get_openapiThe primary OpenAPI for this API.
  • find_similar_apisAPIs that look like this one.
  • apis_io_searchSTART HERE — APIs, providers and tags for one query, each with its total.
  • resolveTurn a domain, URL or GitHub org into the provider it belongs to.
  • find_cohortsEvery scored population of providers in the catalog.
All 92 tools →

Call it yourself

curl for this page
This API
curl "https://apis.io/api/v1/apis/platform.sh:platform.sh-vouchers-api"
All apis
curl "https://apis.io/api/v1/apis?limit=25"

Calls without X-API-Key need no key. Calls with it need a paid plan — get a key.

Get an API key

Free tier, no form to fill in. Signing in shares your email address with us — we store it to create your key and to recognise you if you sign in with another provider. By signing up you are subscribing to the APIs.io and API Evangelist newsletters — you can unsubscribe from any issue. See our Privacy Policy and Terms.

A second provider on the same verified email joins the account you already have.

OpenAPI Specification

platform.sh-vouchers-api-openapi.yml Raw ↑
openapi: 3.2.0
info:
  title: Platform.sh Vouchers API
  version: '1.0'
  contact:
    name: Support
    url: https://upsun.com/contact-us/
  termsOfService: https://upsun.com/trust-center/legal/tos/
  x-logo:
    url: https://docs.upsun.com/images/upsun-api.svg
    href: https://upsun.com/#section/Introduction
    altText: Upsun logo
  description: 'Operations tagged Vouchers across 2 of this provider''s published API definitions: platform.sh-developer-portal-openapi-original.json, platform.sh-openapi-original.json. Each path carries the servers of the definition it was published in.'
servers:
- url: '{schemes}://api.upsun.com'
  description: The Upsun.com API gateway
  variables:
    schemes:
      default: https
tags:
- name: Vouchers
  description: 'These endpoints can be used to retrieve vouchers associated with a particular

    user as well as apply a voucher to a particular user.'
paths:
  /organizations/{organization_id}/vouchers:
    get:
      summary: List vouchers
      description: Retrieves vouchers for the specified organization.
      operationId: list-org-vouchers
      tags:
      - Vouchers
      parameters:
      - $ref: '#/components/parameters/OrganizationIDName'
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Vouchers'
        '403':
          description: Forbidden
          content:
            application/problem+json:
              schema:
                $ref: '#/components/schemas/Error'
        '404':
          description: Not Found
          content:
            application/problem+json:
              schema:
                $ref: '#/components/schemas/Error'
      security:
      - OAuth2: []
    servers:
    - url: '{schemes}://api.upsun.com'
      description: The Upsun.com API gateway
      variables:
        schemes:
          default: https
  /organizations/{organization_id}/vouchers/apply:
    post:
      summary: Apply voucher
      description: Applies a voucher for the specified organization, and refreshes the currently open order.
      operationId: apply-org-voucher
      tags:
      - Vouchers
      parameters:
      - $ref: '#/components/parameters/OrganizationID'
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              required:
              - code
              properties:
                code:
                  type: string
                  description: The voucher code.
      responses:
        '204':
          description: No Content
        '403':
          description: Forbidden
          content:
            application/problem+json:
              schema:
                $ref: '#/components/schemas/Error'
        '404':
          description: Not Found
          content:
            application/problem+json:
              schema:
                $ref: '#/components/schemas/Error'
      security:
      - OAuth2: []
    servers:
    - url: '{schemes}://api.upsun.com'
      description: The Upsun.com API gateway
      variables:
        schemes:
          default: https
components:
  parameters:
    OrganizationID:
      name: organization_id
      in: path
      required: true
      description: The ID of the organization.
      schema:
        type: string
        format: ulid
    OrganizationIDName:
      in: path
      name: organization_id
      description: 'The ID of the organization.<br>

        Prefix with name= to retrieve the organization by name instead.

        '
      required: true
      schema:
        type: string
  schemas:
    Error:
      description: ''
      type: object
      properties:
        status:
          type: string
        message:
          type: string
        code:
          type: number
        detail:
          type: object
        title:
          type: string
      title: ''
      x-examples:
        example-1:
          status: Invalid input
          message: This field is required.
          code: 400
          detail:
            field:
            - This field is required.
          title: Bad Request
    Vouchers:
      type: object
      properties:
        uuid:
          type: string
          format: uuid
          description: The uuid of the user.
        vouchers_total:
          type: string
          description: The total voucher credit given to the user.
        vouchers_applied:
          type: string
          description: The part of total voucher credit applied to orders.
        vouchers_remaining_balance:
          type: string
          description: The remaining voucher credit, available for future orders.
        currency:
          type: string
          description: The currency of the vouchers.
        vouchers:
          description: Array of vouchers.
          type: array
          items:
            type: object
            properties:
              code:
                type: string
                description: The voucher code.
              amount:
                type: string
                description: The total voucher credit.
              currency:
                type: string
                description: The currency of the voucher.
              orders:
                type: array
                description: Array of orders to which a voucher applied.
                items:
                  type: object
                  properties:
                    order_id:
                      type: string
                      description: The id of the order.
                    status:
                      type: string
                      description: The status of the order.
                    billing_period_start:
                      type: string
                      description: The billing period start timestamp of the order (ISO 8601).
                    billing_period_end:
                      type: string
                      description: The billing period end timestamp of the order (ISO 8601).
                    order_total:
                      type: string
                      description: The total of the order.
                    order_discount:
                      type: string
                      description: The total voucher credit applied to the order.
                    currency:
                      type: string
                      description: The currency of the order.
        _links:
          type: object
          properties:
            self:
              type: object
              description: Link to the current resource.
              properties:
                href:
                  type: string
                  description: URL of the link.
    Error_2:
      type: object
      properties:
        error:
          type: string
          description: Error message
      required:
      - error
  securitySchemes:
    OAuth2:
      type: oauth2
      flows:
        authorizationCode:
          tokenUrl: https://auth.api.platform.sh/oauth2/token
          refreshUrl: https://auth.api.platform.sh/oauth2/token
          scopes: {}
          authorizationUrl: https://auth.api.platform.sh/oauth2/authorize
      description: ''
    OAuth2Admin:
      type: oauth2
      flows:
        clientCredentials:
          tokenUrl: https://auth.api.platform.sh/oauth2/token
          refreshUrl: ''
          scopes:
            admin: administrative operations
      description: ''
    BearerAuth:
      type: http
      scheme: bearer
x-refined-from:
- platform.sh-developer-portal-openapi-original.json
- platform.sh-openapi-original.json
x-tagGroups:
- name: Organization Administration
  tags:
  - Organizations
  - Organization Members
  - Organization Invitations
  - Organization Projects
  - Add-ons
- name: Project Administration
  tags:
  - Project
  - Domain Management
  - Cert Management
  - Certificate Provisioner
  - Project Variables
  - Repository
  - Third-Party Integrations
  - Support
- name: Environments
  tags:
  - Environment
  - Environment Backups
  - Environment Type
  - Environment Variables
  - Routing
  - Source Operations
  - Runtime Operations
  - Deployment
  - Autoscaling
- name: User Activity
  tags:
  - Project Activity
  - Environment Activity
- name: Project Access
  tags:
  - Project Invitations
  - Teams
  - Team Access
  - User Access
- name: Account Management
  tags:
  - API Tokens
  - Connections
  - MFA
  - Users
  - User Profiles
  - SSH Keys
  - Plans
- name: Billing
  tags:
  - Organization Management
  - Subscriptions
  - Orders
  - Invoices
  - Discounts
  - Vouchers
  - Records
  - Profiles
- name: Global Info
  tags:
  - Project Discovery
  - References
  - Regions
- name: Internal APIs
  tags:
  - Project Settings
  - Environment Settings
  - Deployment Target
  - System Information
  - Container Profile
x-provenance:
  method: harvested
  publisher: Platform.sh
  source: https://developer.upsun.com/openapi.json
  note: split by refine-openapis from the provider's own published document, verified by fetch (openapi/_original/*.fetch.json);
    stamped by stamp-openapi-provenance.py (roadmap#793)