{
  "opencollection": "1.0.0",
  "info": {
    "name": "Upsun.com Rest Add-ons Vouchers API",
    "version": "1.0"
  },
  "request": {
    "auth": {
      "type": "oauth2",
      "flow": "authorization_code",
      "authorizationUrl": "https://auth.api.platform.sh/oauth2/authorize",
      "accessTokenUrl": "https://auth.api.platform.sh/oauth2/token",
      "credentials": {
        "clientId": "{{clientId}}",
        "clientSecret": "{{clientSecret}}"
      }
    }
  },
  "items": [
    {
      "info": {
        "name": "Vouchers",
        "type": "folder"
      },
      "items": [
        {
          "info": {
            "name": "List vouchers",
            "type": "http"
          },
          "http": {
            "method": "GET",
            "url": "{schemes}://api.upsun.com/organizations/:organization_id/vouchers",
            "params": [
              {
                "name": "organization_id",
                "value": "",
                "type": "path",
                "description": "The ID of the organization.<br>\nPrefix with name= to retrieve the organization by name instead.\n"
              }
            ]
          },
          "docs": "Retrieves vouchers for the specified organization."
        },
        {
          "info": {
            "name": "Apply voucher",
            "type": "http"
          },
          "http": {
            "method": "POST",
            "url": "{schemes}://api.upsun.com/organizations/:organization_id/vouchers/apply",
            "params": [
              {
                "name": "organization_id",
                "value": "",
                "type": "path",
                "description": "The ID of the organization."
              }
            ],
            "body": {
              "type": "json",
              "data": "{}"
            }
          },
          "docs": "Applies a voucher for the specified organization, and refreshes the currently open order."
        }
      ]
    }
  ],
  "bundled": true
}