{
  "openapi": "3.1.1",
  "info": {
    "title": "FlowPrime reseller",
    "description": "Provisioning and product catalogue for FlowPrime resellers.",
    "version": "5.4.0-47843e2"
  },
  "servers": [
    {
      "url": "https://{org}.reseller.fastflow.tech",
      "description": "Tenant host. The org slug is also accepted as the X-Org-Slug header.",
      "variables": {
        "org": {
          "default": "your-org",
          "description": "Your FlowPrime organization slug"
        }
      }
    }
  ],
  "paths": {
    "/v1/checkout": {
      "post": {
        "tags": [
          "Reseller"
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/CheckoutRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      }
    },
    "/buy-workspace": {
      "get": {
        "tags": [
          "Reseller"
        ],
        "parameters": [
          {
            "name": "product",
            "in": "query",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "email",
            "in": "query",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "buyer",
            "in": "query",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "coupon",
            "in": "query",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      }
    },
    "/v1/checkout/operator": {
      "post": {
        "tags": [
          "Reseller"
        ],
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      }
    },
    "/buy/{org}/{product}/{tier}": {
      "get": {
        "tags": [
          "Reseller"
        ],
        "parameters": [
          {
            "name": "org",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "product",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "tier",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "email",
            "in": "query",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "payee",
            "in": "query",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      }
    },
    "/v1/provision": {
      "post": {
        "tags": [
          "Reseller"
        ],
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      }
    },
    "/v1/setup/complete": {
      "post": {
        "tags": [
          "Reseller"
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/SetupFormRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      }
    },
    "/v1/setup/check-slug": {
      "get": {
        "tags": [
          "Reseller"
        ],
        "parameters": [
          {
            "name": "slug",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      }
    },
    "/v1/setup/session": {
      "get": {
        "tags": [
          "Reseller"
        ],
        "parameters": [
          {
            "name": "session_id",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "setupToken",
            "in": "query",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      }
    },
    "/v1/callbacks/setup-complete": {
      "post": {
        "tags": [
          "Reseller"
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/SetupCompleteRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      }
    },
    "/v1/catalog": {
      "get": {
        "tags": [
          "Reseller"
        ],
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      }
    },
    "/auth/login": {
      "get": {
        "tags": [
          "Reseller"
        ],
        "parameters": [
          {
            "name": "returnUrl",
            "in": "query",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "login_hint",
            "in": "query",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "prompt",
            "in": "query",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      }
    },
    "/auth/callback": {
      "get": {
        "tags": [
          "Reseller"
        ],
        "parameters": [
          {
            "name": "code",
            "in": "query",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "state",
            "in": "query",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      }
    },
    "/my-accounts": {
      "get": {
        "tags": [
          "Reseller"
        ],
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      }
    },
    "/switch-account": {
      "post": {
        "tags": [
          "Reseller"
        ],
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      }
    },
    "/auth/logout": {
      "get": {
        "tags": [
          "Reseller"
        ],
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      }
    },
    "/v1/admin/me": {
      "get": {
        "tags": [
          "Reseller"
        ],
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      }
    },
    "/v1/admin/config": {
      "get": {
        "tags": [
          "Reseller"
        ],
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      }
    },
    "/v1/admin/overview": {
      "get": {
        "tags": [
          "Reseller"
        ],
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      }
    },
    "/v1/admin/provisioning-logs": {
      "get": {
        "tags": [
          "Reseller"
        ],
        "parameters": [
          {
            "name": "status",
            "in": "query",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "service",
            "in": "query",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "subscriptionId",
            "in": "query",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "search",
            "in": "query",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "page",
            "in": "query",
            "schema": {
              "pattern": "^-?(?:0|[1-9]\\d*)$",
              "type": [
                "integer",
                "string"
              ],
              "format": "int32"
            }
          },
          {
            "name": "pageSize",
            "in": "query",
            "schema": {
              "pattern": "^-?(?:0|[1-9]\\d*)$",
              "type": [
                "integer",
                "string"
              ],
              "format": "int32"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      }
    },
    "/v1/admin/reconcile": {
      "post": {
        "tags": [
          "Reseller"
        ],
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      }
    },
    "/v1/admin/provisioning-logs/summary": {
      "get": {
        "tags": [
          "Reseller"
        ],
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      }
    },
    "/v1/admin/databases": {
      "get": {
        "tags": [
          "Reseller"
        ],
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      }
    },
    "/v1/admin/customers": {
      "get": {
        "tags": [
          "Reseller"
        ],
        "parameters": [
          {
            "name": "search",
            "in": "query",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "page",
            "in": "query",
            "schema": {
              "pattern": "^-?(?:0|[1-9]\\d*)$",
              "type": [
                "integer",
                "string"
              ],
              "format": "int32"
            }
          },
          {
            "name": "pageSize",
            "in": "query",
            "schema": {
              "pattern": "^-?(?:0|[1-9]\\d*)$",
              "type": [
                "integer",
                "string"
              ],
              "format": "int32"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      },
      "post": {
        "tags": [
          "Reseller"
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/CreateCustomerRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      }
    },
    "/v1/admin/customers/{id}": {
      "get": {
        "tags": [
          "Reseller"
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      },
      "delete": {
        "tags": [
          "Reseller"
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      }
    },
    "/v1/admin/customers/{id}/subscriptions": {
      "post": {
        "tags": [
          "Reseller"
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/AssignProductRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      }
    },
    "/v1/admin/customers/{id}/provision-bundle": {
      "post": {
        "tags": [
          "Reseller"
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/ProvisionBundleRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      }
    },
    "/v1/admin/customers/{id}/attach-product": {
      "post": {
        "tags": [
          "Reseller"
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/AttachProductRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      }
    },
    "/v1/admin/subscriptions": {
      "get": {
        "tags": [
          "Reseller"
        ],
        "parameters": [
          {
            "name": "status",
            "in": "query",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "product",
            "in": "query",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "page",
            "in": "query",
            "schema": {
              "pattern": "^-?(?:0|[1-9]\\d*)$",
              "type": [
                "integer",
                "string"
              ],
              "format": "int32"
            }
          },
          {
            "name": "pageSize",
            "in": "query",
            "schema": {
              "pattern": "^-?(?:0|[1-9]\\d*)$",
              "type": [
                "integer",
                "string"
              ],
              "format": "int32"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      }
    },
    "/v1/admin/subscriptions/{id}/resend-setup-email": {
      "post": {
        "tags": [
          "Reseller"
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      }
    },
    "/v1/admin/subscriptions/{id}/retry": {
      "post": {
        "tags": [
          "Reseller"
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "oneOf": [
                  {
                    "type": "null"
                  },
                  {
                    "$ref": "#/components/schemas/RetryProvisionRequest"
                  }
                ]
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      }
    },
    "/v1/admin/ephemeral": {
      "delete": {
        "tags": [
          "Reseller"
        ],
        "parameters": [
          {
            "name": "prefix",
            "in": "query",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      }
    },
    "/v1/admin/ephemeral/{slug}": {
      "delete": {
        "tags": [
          "Reseller"
        ],
        "parameters": [
          {
            "name": "slug",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      }
    },
    "/v1/admin/ephemeral/unclaimed": {
      "delete": {
        "tags": [
          "Reseller"
        ],
        "parameters": [
          {
            "name": "session",
            "in": "query",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "olderThanMinutes",
            "in": "query",
            "schema": {
              "pattern": "^-?(?:0|[1-9]\\d*)$",
              "type": [
                "integer",
                "string"
              ],
              "format": "int32"
            }
          },
          {
            "name": "dryRun",
            "in": "query",
            "schema": {
              "type": "boolean"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      }
    },
    "/v1/admin/subscriptions/{id}/cancel-now": {
      "post": {
        "tags": [
          "Reseller"
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      }
    },
    "/v1/admin/subscriptions/{id}": {
      "patch": {
        "tags": [
          "Reseller"
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/UpdateSubscriptionStatusRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      }
    },
    "/v1/admin/catalog": {
      "get": {
        "tags": [
          "Reseller"
        ],
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      },
      "post": {
        "tags": [
          "Reseller"
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/CreateCatalogEntryRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      }
    },
    "/v1/admin/catalog/{id}": {
      "put": {
        "tags": [
          "Reseller"
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/UpdateCatalogEntryRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      },
      "delete": {
        "tags": [
          "Reseller"
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      }
    },
    "/v1/admin/stripe/lookup-price": {
      "post": {
        "tags": [
          "Reseller"
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/StripeLookupRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      }
    },
    "/v1/admin/stripe/prices": {
      "get": {
        "tags": [
          "Reseller"
        ],
        "parameters": [
          {
            "name": "productId",
            "in": "query",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      }
    },
    "/v1/admin/stripe/create-product-and-price": {
      "post": {
        "tags": [
          "Reseller"
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/CreateProductAndPriceRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      }
    },
    "/v1/admin/stripe/create-price": {
      "post": {
        "tags": [
          "Reseller"
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/CreateStripePriceRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      }
    },
    "/v1/admin/stripe/bulk-update-prices": {
      "post": {
        "tags": [
          "Reseller"
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/BulkUpdatePricesRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      }
    },
    "/v1/admin/products": {
      "get": {
        "tags": [
          "Reseller"
        ],
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      }
    },
    "/v1/admin/products/{slug}": {
      "get": {
        "tags": [
          "Reseller"
        ],
        "parameters": [
          {
            "name": "slug",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      }
    },
    "/v1/admin/products/{slug}/health": {
      "get": {
        "tags": [
          "Reseller"
        ],
        "parameters": [
          {
            "name": "slug",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      }
    },
    "/v1/admin/products/{slug}/bulk-retry": {
      "post": {
        "tags": [
          "Reseller"
        ],
        "parameters": [
          {
            "name": "slug",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      }
    },
    "/v1/admin/operator-products": {
      "post": {
        "tags": [
          "Reseller"
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "name": {
                    "type": [
                      "null",
                      "string"
                    ]
                  },
                  "slug": {
                    "type": [
                      "null",
                      "string"
                    ]
                  },
                  "description": {
                    "type": [
                      "null",
                      "string"
                    ]
                  },
                  "category": {
                    "type": [
                      "null",
                      "string"
                    ]
                  },
                  "kind": {
                    "type": [
                      "null",
                      "string"
                    ]
                  },
                  "sellsNewWorkspace": {
                    "type": [
                      "null",
                      "boolean"
                    ]
                  },
                  "pricing": {
                    "type": "object",
                    "properties": {
                      "amountCents": {
                        "pattern": "^-?(?:0|[1-9]\\d*)$",
                        "type": [
                          "integer",
                          "string"
                        ],
                        "format": "int32"
                      },
                      "currency": {
                        "type": [
                          "null",
                          "string"
                        ]
                      },
                      "interval": {
                        "type": [
                          "null",
                          "string"
                        ]
                      },
                      "trialDays": {
                        "pattern": "^-?(?:0|[1-9]\\d*)$",
                        "type": [
                          "null",
                          "integer",
                          "string"
                        ],
                        "format": "int32"
                      },
                      "tiers": {
                        "type": [
                          "null",
                          "array"
                        ],
                        "items": {
                          "type": "object",
                          "properties": {
                            "key": {
                              "type": [
                                "null",
                                "string"
                              ]
                            },
                            "name": {
                              "type": [
                                "null",
                                "string"
                              ]
                            },
                            "amountCents": {
                              "pattern": "^-?(?:0|[1-9]\\d*)$",
                              "type": [
                                "integer",
                                "string"
                              ],
                              "format": "int32"
                            },
                            "trialDays": {
                              "pattern": "^-?(?:0|[1-9]\\d*)$",
                              "type": [
                                "null",
                                "integer",
                                "string"
                              ],
                              "format": "int32"
                            },
                            "entitlements": {
                              "type": [
                                "null",
                                "object"
                              ],
                              "additionalProperties": {
                                "pattern": "^-?(?:0|[1-9]\\d*)$",
                                "type": [
                                  "integer",
                                  "string"
                                ],
                                "format": "int64"
                              }
                            }
                          }
                        }
                      }
                    }
                  },
                  "license": {
                    "type": "object",
                    "properties": {
                      "features": {
                        "type": [
                          "null",
                          "array"
                        ],
                        "items": {
                          "type": "string"
                        }
                      },
                      "maxDomains": {
                        "pattern": "^-?(?:0|[1-9]\\d*)$",
                        "type": [
                          "integer",
                          "string"
                        ],
                        "format": "int32"
                      },
                      "activationLimit": {
                        "pattern": "^-?(?:0|[1-9]\\d*)$",
                        "type": [
                          "null",
                          "integer",
                          "string"
                        ],
                        "format": "int32"
                      }
                    }
                  },
                  "webhook": {
                    "type": "object",
                    "properties": {
                      "url": {
                        "type": [
                          "null",
                          "string"
                        ]
                      },
                      "secret": {
                        "type": [
                          "null",
                          "string"
                        ]
                      }
                    }
                  },
                  "mailSenderId": {
                    "type": [
                      "null",
                      "string"
                    ]
                  },
                  "landingPageSlug": {
                    "type": [
                      "null",
                      "string"
                    ]
                  }
                }
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      },
      "get": {
        "tags": [
          "Reseller"
        ],
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      }
    },
    "/v1/admin/operator-subscriptions": {
      "get": {
        "tags": [
          "Reseller"
        ],
        "parameters": [
          {
            "name": "product",
            "in": "query",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "status",
            "in": "query",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "email",
            "in": "query",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      }
    },
    "/v1/admin/operator-products/{slug}": {
      "get": {
        "tags": [
          "Reseller"
        ],
        "parameters": [
          {
            "name": "slug",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      },
      "put": {
        "tags": [
          "Reseller"
        ],
        "parameters": [
          {
            "name": "slug",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "name": {
                    "type": [
                      "null",
                      "string"
                    ]
                  },
                  "description": {
                    "type": [
                      "null",
                      "string"
                    ]
                  },
                  "category": {
                    "type": [
                      "null",
                      "string"
                    ]
                  },
                  "kind": {
                    "type": [
                      "null",
                      "string"
                    ]
                  },
                  "sellsNewWorkspace": {
                    "type": [
                      "null",
                      "boolean"
                    ]
                  },
                  "trialDays": {
                    "pattern": "^-?(?:0|[1-9]\\d*)$",
                    "type": [
                      "null",
                      "integer",
                      "string"
                    ],
                    "format": "int32"
                  },
                  "amountCents": {
                    "pattern": "^-?(?:0|[1-9]\\d*)$",
                    "type": [
                      "null",
                      "integer",
                      "string"
                    ],
                    "format": "int32"
                  },
                  "mailSenderId": {
                    "type": [
                      "null",
                      "string"
                    ]
                  },
                  "landingPageSlug": {
                    "type": [
                      "null",
                      "string"
                    ]
                  },
                  "tiers": {
                    "type": [
                      "null",
                      "array"
                    ],
                    "items": {
                      "type": "object",
                      "properties": {
                        "key": {
                          "type": [
                            "null",
                            "string"
                          ]
                        },
                        "name": {
                          "type": [
                            "null",
                            "string"
                          ]
                        },
                        "amountCents": {
                          "pattern": "^-?(?:0|[1-9]\\d*)$",
                          "type": [
                            "null",
                            "integer",
                            "string"
                          ],
                          "format": "int32"
                        },
                        "trialDays": {
                          "pattern": "^-?(?:0|[1-9]\\d*)$",
                          "type": [
                            "null",
                            "integer",
                            "string"
                          ],
                          "format": "int32"
                        },
                        "entitlements": {
                          "type": [
                            "null",
                            "object"
                          ],
                          "additionalProperties": {
                            "pattern": "^-?(?:0|[1-9]\\d*)$",
                            "type": [
                              "integer",
                              "string"
                            ],
                            "format": "int64"
                          }
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      }
    },
    "/v1/admin/operator-products/{slug}/retry-provisioning": {
      "post": {
        "tags": [
          "Reseller"
        ],
        "parameters": [
          {
            "name": "slug",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      }
    },
    "/v1/admin/operator-grants/backfill": {
      "post": {
        "tags": [
          "Reseller"
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/BackfillRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      }
    },
    "/v1/admin/operator-grants": {
      "get": {
        "tags": [
          "Reseller"
        ],
        "parameters": [
          {
            "name": "org",
            "in": "query",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "state",
            "in": "query",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      }
    },
    "/v1/admin/operator-subscriptions/repair-period-end": {
      "post": {
        "tags": [
          "Reseller"
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "oneOf": [
                  {
                    "type": "null"
                  },
                  {
                    "$ref": "#/components/schemas/PeriodRepairRequest"
                  }
                ]
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      }
    },
    "/v1/admin/pending-events": {
      "get": {
        "tags": [
          "Reseller"
        ],
        "parameters": [
          {
            "name": "state",
            "in": "query",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "subscription",
            "in": "query",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "customer",
            "in": "query",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "type",
            "in": "query",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      }
    },
    "/v1/admin/pending-events/{eventId}": {
      "get": {
        "tags": [
          "Reseller"
        ],
        "parameters": [
          {
            "name": "eventId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      }
    },
    "/v1/admin/pending-events/{eventId}/void": {
      "post": {
        "tags": [
          "Reseller"
        ],
        "parameters": [
          {
            "name": "eventId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "oneOf": [
                  {
                    "type": "null"
                  },
                  {
                    "$ref": "#/components/schemas/VoidRequest"
                  }
                ]
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      }
    },
    "/v1/admin/pending-events/{eventId}/retry": {
      "post": {
        "tags": [
          "Reseller"
        ],
        "parameters": [
          {
            "name": "eventId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      }
    },
    "/v1/admin/stripe-events/{eventId}/reprocess": {
      "post": {
        "tags": [
          "Reseller"
        ],
        "parameters": [
          {
            "name": "eventId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "org",
            "in": "query",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      }
    },
    "/v1/admin/stripe-account": {
      "get": {
        "tags": [
          "Reseller"
        ],
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      },
      "delete": {
        "tags": [
          "Reseller"
        ],
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      }
    },
    "/v1/admin/stripe-account/connect": {
      "post": {
        "tags": [
          "Reseller"
        ],
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      }
    },
    "/v1/admin/stripe-account/direct": {
      "post": {
        "tags": [
          "Reseller"
        ],
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      }
    },
    "/v1/admin/stripe-account/onboarding-link": {
      "post": {
        "tags": [
          "Reseller"
        ],
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      }
    },
    "/v1/admin/stripe-account/refresh": {
      "post": {
        "tags": [
          "Reseller"
        ],
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      }
    },
    "/v1/admin/stripe-account/dev-complete-onboarding": {
      "post": {
        "tags": [
          "Reseller"
        ],
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      }
    },
    "/payees/done": {
      "get": {
        "tags": [
          "Reseller"
        ],
        "parameters": [
          {
            "name": "org",
            "in": "query",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "payee",
            "in": "query",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      }
    },
    "/payees/link-expired": {
      "get": {
        "tags": [
          "Reseller"
        ],
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      }
    },
    "/bookings/paid": {
      "get": {
        "tags": [
          "Reseller"
        ],
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      }
    },
    "/bookings/cancelled": {
      "get": {
        "tags": [
          "Reseller"
        ],
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      }
    },
    "/v1/admin/payouts": {
      "get": {
        "tags": [
          "Reseller"
        ],
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      }
    },
    "/v1/admin/payouts/defaults": {
      "put": {
        "tags": [
          "Reseller"
        ],
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      }
    },
    "/v1/admin/payouts/events": {
      "put": {
        "tags": [
          "Reseller"
        ],
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      },
      "delete": {
        "tags": [
          "Reseller"
        ],
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      }
    },
    "/v1/admin/payees": {
      "get": {
        "tags": [
          "Reseller"
        ],
        "parameters": [
          {
            "name": "refresh",
            "in": "query",
            "schema": {
              "type": "boolean"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      },
      "post": {
        "tags": [
          "Reseller"
        ],
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      }
    },
    "/v1/admin/payees/{id}": {
      "get": {
        "tags": [
          "Reseller"
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      },
      "put": {
        "tags": [
          "Reseller"
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      }
    },
    "/v1/admin/payees/{id}/link": {
      "post": {
        "tags": [
          "Reseller"
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      }
    },
    "/v1/admin/payees/{id}/payouts": {
      "get": {
        "tags": [
          "Reseller"
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "limit",
            "in": "query",
            "schema": {
              "pattern": "^-?(?:0|[1-9]\\d*)$",
              "type": [
                "integer",
                "string"
              ],
              "format": "int32"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      }
    },
    "/v1/admin/bookings/checkout": {
      "post": {
        "tags": [
          "Reseller"
        ],
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      }
    },
    "/v1/admin/bookings": {
      "get": {
        "tags": [
          "Reseller"
        ],
        "parameters": [
          {
            "name": "payeeId",
            "in": "query",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "limit",
            "in": "query",
            "schema": {
              "pattern": "^-?(?:0|[1-9]\\d*)$",
              "type": [
                "integer",
                "string"
              ],
              "format": "int32"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      }
    },
    "/v1/admin/bookings/{id}/refund": {
      "post": {
        "tags": [
          "Reseller"
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      }
    },
    "/v1/admin/analytics/summary": {
      "get": {
        "tags": [
          "Reseller"
        ],
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      }
    },
    "/v1/admin/analytics/tenant/{orgSlug}": {
      "get": {
        "tags": [
          "Reseller"
        ],
        "parameters": [
          {
            "name": "orgSlug",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      }
    },
    "/v1/admin/readiness": {
      "get": {
        "tags": [
          "Reseller"
        ],
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      }
    },
    "/v1/admin/deactivations/retry": {
      "post": {
        "tags": [
          "Reseller"
        ],
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      }
    },
    "/v1/admin/orgs": {
      "get": {
        "tags": [
          "Reseller"
        ],
        "parameters": [
          {
            "name": "page",
            "in": "query",
            "schema": {
              "pattern": "^-?(?:0|[1-9]\\d*)$",
              "type": [
                "integer",
                "string"
              ],
              "format": "int32"
            }
          },
          {
            "name": "pageSize",
            "in": "query",
            "schema": {
              "pattern": "^-?(?:0|[1-9]\\d*)$",
              "type": [
                "integer",
                "string"
              ],
              "format": "int32"
            }
          },
          {
            "name": "search",
            "in": "query",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      }
    },
    "/v1/admin/orgs/{slug}": {
      "get": {
        "tags": [
          "Reseller"
        ],
        "parameters": [
          {
            "name": "slug",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      }
    },
    "/v1/admin/orgs/{slug}/provision/{service}": {
      "post": {
        "tags": [
          "Reseller"
        ],
        "parameters": [
          {
            "name": "slug",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "service",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      }
    },
    "/v1/admin/orgs/{slug}/activate/{service}": {
      "post": {
        "tags": [
          "Reseller"
        ],
        "parameters": [
          {
            "name": "slug",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "service",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      }
    },
    "/v1/admin/orgs/{slug}/wire/{service}": {
      "post": {
        "tags": [
          "Reseller"
        ],
        "parameters": [
          {
            "name": "slug",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "service",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      }
    },
    "/v1/admin/orgs/{slug}/provision-oidc": {
      "post": {
        "tags": [
          "Reseller"
        ],
        "parameters": [
          {
            "name": "slug",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      }
    },
    "/v1/admin/orgs/{slug}/attach-product": {
      "post": {
        "tags": [
          "Reseller"
        ],
        "parameters": [
          {
            "name": "slug",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/OrgAttachProductRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      }
    },
    "/v1/admin/operator-subscriptions/{id}/cancel": {
      "post": {
        "tags": [
          "Reseller"
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      }
    },
    "/v1/admin/operator-free-checkout": {
      "post": {
        "tags": [
          "Reseller"
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/FreeCheckoutRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      }
    },
    "/v1/customer/billing-portal": {
      "post": {
        "tags": [
          "Customer"
        ],
        "summary": "Open the billing portal for the signed-in customer of a product you sell",
        "description": "The 'Manage subscription' link of your product. Call it from your server with the signed-in customer's own access token as the bearer (the token your app received at sign-in), and send { returnUrl, product? }: returnUrl is where Stripe sends the customer back (absolute https; http is accepted for localhost), product narrows to one of your product slugs. The answer is { url }: redirect the customer to it. The portal opens on YOUR Stripe account and lets the customer see invoices, change the card and cancel at the end of the paid period. Only the owner of the customer account (claim account_role = owner) may open it; anyone else gets 403. 404 no_billing_account: this customer never paid through Stripe. 502 stripe_unavailable: retry.",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "oneOf": [
                  {
                    "type": "null"
                  },
                  {
                    "$ref": "#/components/schemas/PortalRequest"
                  }
                ]
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      }
    },
    "/v1/admin/orgs/{slug}/audit": {
      "get": {
        "tags": [
          "Reseller"
        ],
        "parameters": [
          {
            "name": "slug",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "stripeCustomerId",
            "in": "query",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      }
    },
    "/v1/admin/orgs/{slug}/repair": {
      "post": {
        "tags": [
          "Reseller"
        ],
        "parameters": [
          {
            "name": "slug",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "oneOf": [
                  {
                    "type": "null"
                  },
                  {
                    "$ref": "#/components/schemas/RepairRequest"
                  }
                ]
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      }
    },
    "/v1/orgs/{slug}/products": {
      "get": {
        "tags": [
          "Reseller"
        ],
        "parameters": [
          {
            "name": "slug",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      }
    },
    "/v1/admin/orgs/{slug}/free-months": {
      "post": {
        "tags": [
          "Free months"
        ],
        "summary": "Grant N free months to an org's platform subscription (dryRun previews and writes nothing).",
        "parameters": [
          {
            "name": "slug",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/FreeMonthsRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      },
      "get": {
        "tags": [
          "Free months"
        ],
        "summary": "The org's free-months grants, newest first (at most 50).",
        "parameters": [
          {
            "name": "slug",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      }
    },
    "/v1/admin/orgs/{slug}/free-months/{grantId}/revoke": {
      "post": {
        "tags": [
          "Free months"
        ],
        "summary": "Revoke a grant: its discount leaves the subscription, or its link and coupon are closed.",
        "parameters": [
          {
            "name": "slug",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "grantId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/CompGrantActionRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      }
    },
    "/v1/admin/orgs/{slug}/free-months/{grantId}/abandon": {
      "post": {
        "tags": [
          "Free months"
        ],
        "summary": "Abandon a pending or failed grant once Stripe shows its coupon reached nothing.",
        "parameters": [
          {
            "name": "slug",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "grantId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/CompGrantActionRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      }
    },
    "/v1/admin/operator-subscriptions/{id}/free-months": {
      "post": {
        "tags": [
          "Free months"
        ],
        "summary": "Grant N free months to one of the operator's customers, on the operator's own Stripe account.",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/FreeMonthsRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      },
      "get": {
        "tags": [
          "Free months"
        ],
        "summary": "The free-months grants of one operator subscription, newest first.",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      }
    },
    "/v1/admin/operator-subscriptions/{id}/free-months/{grantId}/revoke": {
      "post": {
        "tags": [
          "Free months"
        ],
        "summary": "Revoke an operator grant.",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "grantId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/CompGrantActionRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      }
    },
    "/v1/admin/operator-subscriptions/{id}/free-months/{grantId}/abandon": {
      "post": {
        "tags": [
          "Free months"
        ],
        "summary": "Abandon a pending or failed operator grant.",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "grantId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/CompGrantActionRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      }
    },
    "/health": {
      "get": {
        "tags": [
          "Reseller"
        ],
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      }
    },
    "/v1/subscriptions": {
      "get": {
        "tags": [
          "Reseller"
        ],
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      }
    },
    "/v1/billing/overview": {
      "get": {
        "tags": [
          "Reseller"
        ],
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      }
    },
    "/v1/billing-portal": {
      "post": {
        "tags": [
          "Reseller"
        ],
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      }
    },
    "/v1/subscriptions/{id}/cancel": {
      "post": {
        "tags": [
          "Reseller"
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      }
    },
    "/v1/service/subscriptions": {
      "get": {
        "tags": [
          "Reseller"
        ],
        "parameters": [
          {
            "name": "email",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      }
    },
    "/v1/service/billing-portal": {
      "post": {
        "tags": [
          "Reseller"
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/BillingPortalServiceRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      }
    },
    "/v1/service/subscriptions/{id}/cancel": {
      "post": {
        "tags": [
          "Reseller"
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/CancelSubscriptionServiceRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      }
    }
  },
  "components": {
    "schemas": {
      "AssignProductRequest": {
        "required": [
          "catalogEntryId"
        ],
        "type": "object",
        "properties": {
          "catalogEntryId": {
            "type": "string"
          },
          "stripeSubscriptionId": {
            "type": [
              "null",
              "string"
            ]
          },
          "stripeCheckoutSessionId": {
            "type": [
              "null",
              "string"
            ]
          }
        }
      },
      "AttachProductRequest": {
        "required": [
          "catalogEntryId",
          "orgSlug"
        ],
        "type": "object",
        "properties": {
          "catalogEntryId": {
            "type": "string"
          },
          "orgSlug": {
            "type": "string"
          },
          "stripeCustomerId": {
            "type": [
              "null",
              "string"
            ]
          }
        }
      },
      "BackfillRequest": {
        "required": [
          "org"
        ],
        "type": "object",
        "properties": {
          "org": {
            "type": [
              "null",
              "string"
            ]
          },
          "product": {
            "type": [
              "null",
              "string"
            ]
          },
          "dryRun": {
            "type": "boolean",
            "default": true
          }
        }
      },
      "BillingPortalServiceRequest": {
        "required": [
          "email",
          "returnUrl"
        ],
        "type": "object",
        "properties": {
          "email": {
            "type": [
              "null",
              "string"
            ]
          },
          "returnUrl": {
            "type": [
              "null",
              "string"
            ]
          }
        }
      },
      "BulkUpdatePricesRequest": {
        "required": [
          "dryRun"
        ],
        "type": "object",
        "properties": {
          "dryRun": {
            "type": [
              "null",
              "boolean"
            ]
          }
        }
      },
      "CancelSubscriptionServiceRequest": {
        "required": [
          "email"
        ],
        "type": "object",
        "properties": {
          "email": {
            "type": [
              "null",
              "string"
            ]
          }
        }
      },
      "CheckoutRequest": {
        "required": [
          "product",
          "successUrl",
          "cancelUrl",
          "coupon"
        ],
        "type": "object",
        "properties": {
          "product": {
            "type": [
              "null",
              "string"
            ]
          },
          "successUrl": {
            "type": [
              "null",
              "string"
            ]
          },
          "cancelUrl": {
            "type": [
              "null",
              "string"
            ]
          },
          "coupon": {
            "type": [
              "null",
              "string"
            ]
          },
          "email": {
            "type": [
              "null",
              "string"
            ]
          },
          "buyerPlatformUserId": {
            "type": [
              "null",
              "string"
            ]
          },
          "reactivateOrg": {
            "type": [
              "null",
              "string"
            ]
          }
        }
      },
      "CompGrantActionRequest": {
        "required": [
          "reason"
        ],
        "type": "object",
        "properties": {
          "reason": {
            "type": [
              "null",
              "string"
            ]
          }
        }
      },
      "CreateCatalogEntryRequest": {
        "required": [
          "id",
          "productSlug",
          "plan",
          "name",
          "description",
          "iconSvg",
          "stripePriceId",
          "stripeProductId",
          "monthlyPriceCents",
          "billingInterval",
          "sortOrder",
          "requiresJson",
          "bundledProductsJson"
        ],
        "type": "object",
        "properties": {
          "id": {
            "type": "string"
          },
          "productSlug": {
            "type": "string"
          },
          "plan": {
            "type": "string"
          },
          "name": {
            "type": "string"
          },
          "description": {
            "type": [
              "null",
              "string"
            ]
          },
          "iconSvg": {
            "type": [
              "null",
              "string"
            ]
          },
          "stripePriceId": {
            "type": [
              "null",
              "string"
            ]
          },
          "stripeProductId": {
            "type": [
              "null",
              "string"
            ]
          },
          "monthlyPriceCents": {
            "pattern": "^-?(?:0|[1-9]\\d*)$",
            "type": [
              "integer",
              "string"
            ],
            "format": "int32"
          },
          "billingInterval": {
            "type": [
              "null",
              "string"
            ]
          },
          "sortOrder": {
            "pattern": "^-?(?:0|[1-9]\\d*)$",
            "type": [
              "integer",
              "string"
            ],
            "format": "int32"
          },
          "requiresJson": {
            "type": [
              "null",
              "string"
            ]
          },
          "bundledProductsJson": {
            "type": [
              "null",
              "string"
            ]
          },
          "listed": {
            "type": [
              "null",
              "boolean"
            ]
          },
          "availableIndividually": {
            "type": [
              "null",
              "boolean"
            ]
          }
        }
      },
      "CreateCustomerRequest": {
        "required": [
          "email",
          "name"
        ],
        "type": "object",
        "properties": {
          "email": {
            "type": "string"
          },
          "name": {
            "type": [
              "null",
              "string"
            ]
          }
        }
      },
      "CreateProductAndPriceRequest": {
        "required": [
          "productName",
          "productSlug",
          "unitAmountCents",
          "currency",
          "interval"
        ],
        "type": "object",
        "properties": {
          "productName": {
            "type": "string"
          },
          "productSlug": {
            "type": "string"
          },
          "unitAmountCents": {
            "pattern": "^-?(?:0|[1-9]\\d*)$",
            "type": [
              "integer",
              "string"
            ],
            "format": "int32"
          },
          "currency": {
            "type": [
              "null",
              "string"
            ]
          },
          "interval": {
            "type": [
              "null",
              "string"
            ]
          }
        }
      },
      "CreateStripePriceRequest": {
        "required": [
          "productId",
          "unitAmount",
          "currency",
          "interval",
          "catalogEntryId",
          "oldPriceId"
        ],
        "type": "object",
        "properties": {
          "productId": {
            "type": "string"
          },
          "unitAmount": {
            "pattern": "^-?(?:0|[1-9]\\d*)$",
            "type": [
              "integer",
              "string"
            ],
            "format": "int32"
          },
          "currency": {
            "type": [
              "null",
              "string"
            ]
          },
          "interval": {
            "type": [
              "null",
              "string"
            ]
          },
          "catalogEntryId": {
            "type": [
              "null",
              "string"
            ]
          },
          "oldPriceId": {
            "type": [
              "null",
              "string"
            ]
          }
        }
      },
      "FreeCheckoutRequest": {
        "required": [
          "product",
          "tier",
          "email",
          "requestId"
        ],
        "type": "object",
        "properties": {
          "product": {
            "type": "string"
          },
          "tier": {
            "type": [
              "null",
              "string"
            ]
          },
          "email": {
            "type": "string"
          },
          "requestId": {
            "type": "string"
          }
        }
      },
      "FreeMonthsRequest": {
        "required": [
          "months",
          "reason",
          "requestId",
          "dryRun",
          "resumeScheduledCancel",
          "stripeSubscriptionId",
          "product",
          "forgiveOldInvoices",
          "planToken"
        ],
        "type": "object",
        "properties": {
          "months": {
            "pattern": "^-?(?:0|[1-9]\\d*)$",
            "type": [
              "null",
              "integer",
              "string"
            ],
            "format": "int32"
          },
          "reason": {
            "type": [
              "null",
              "string"
            ]
          },
          "requestId": {
            "type": [
              "null",
              "string"
            ]
          },
          "dryRun": {
            "type": [
              "null",
              "boolean"
            ]
          },
          "resumeScheduledCancel": {
            "type": [
              "null",
              "boolean"
            ]
          },
          "stripeSubscriptionId": {
            "type": [
              "null",
              "string"
            ]
          },
          "product": {
            "type": [
              "null",
              "string"
            ]
          },
          "forgiveOldInvoices": {
            "type": [
              "null",
              "boolean"
            ]
          },
          "planToken": {
            "type": [
              "null",
              "string"
            ]
          }
        }
      },
      "OrgAttachProductRequest": {
        "required": [
          "product"
        ],
        "type": "object",
        "properties": {
          "product": {
            "type": "string"
          },
          "email": {
            "type": [
              "null",
              "string"
            ]
          },
          "domains": {
            "type": [
              "null",
              "array"
            ],
            "items": {
              "type": "string"
            }
          }
        }
      },
      "PeriodRepairRequest": {
        "type": "object",
        "properties": {
          "org": {
            "type": [
              "null",
              "string"
            ]
          },
          "dryRun": {
            "type": "boolean",
            "default": true
          }
        }
      },
      "PortalRequest": {
        "required": [
          "returnUrl",
          "product"
        ],
        "type": "object",
        "properties": {
          "returnUrl": {
            "type": [
              "null",
              "string"
            ]
          },
          "product": {
            "type": [
              "null",
              "string"
            ]
          }
        }
      },
      "ProvisionBundleRequest": {
        "required": [
          "catalogEntryId",
          "slug",
          "orgName",
          "password"
        ],
        "type": "object",
        "properties": {
          "catalogEntryId": {
            "type": "string"
          },
          "slug": {
            "type": "string"
          },
          "orgName": {
            "type": "string"
          },
          "password": {
            "type": "string"
          },
          "stripeCustomerId": {
            "type": [
              "null",
              "string"
            ]
          }
        }
      },
      "RepairRequest": {
        "type": "object",
        "properties": {
          "stripeCustomerId": {
            "type": [
              "null",
              "string"
            ]
          },
          "dryRun": {
            "type": "boolean"
          },
          "repairs": {
            "type": [
              "null",
              "array"
            ],
            "items": {
              "type": "string"
            }
          }
        }
      },
      "RetryProvisionRequest": {
        "required": [
          "password"
        ],
        "type": "object",
        "properties": {
          "password": {
            "type": [
              "null",
              "string"
            ]
          }
        }
      },
      "SetupCompleteRequest": {
        "required": [
          "alkeyonOrgId",
          "slug"
        ],
        "type": "object",
        "properties": {
          "alkeyonOrgId": {
            "type": [
              "null",
              "string"
            ]
          },
          "slug": {
            "type": [
              "null",
              "string"
            ]
          }
        }
      },
      "SetupFormRequest": {
        "required": [
          "sessionId",
          "orgName",
          "slug",
          "password"
        ],
        "type": "object",
        "properties": {
          "sessionId": {
            "type": "string"
          },
          "orgName": {
            "type": "string"
          },
          "slug": {
            "type": "string"
          },
          "password": {
            "type": "string"
          },
          "setupToken": {
            "type": [
              "null",
              "string"
            ]
          }
        }
      },
      "StripeLookupRequest": {
        "required": [
          "priceId"
        ],
        "type": "object",
        "properties": {
          "priceId": {
            "type": "string"
          }
        }
      },
      "UpdateCatalogEntryRequest": {
        "required": [
          "name",
          "description",
          "iconSvg",
          "stripePriceId",
          "stripeProductId",
          "monthlyPriceCents",
          "billingInterval",
          "active",
          "sortOrder",
          "requiresJson",
          "bundledProductsJson"
        ],
        "type": "object",
        "properties": {
          "name": {
            "type": [
              "null",
              "string"
            ]
          },
          "description": {
            "type": [
              "null",
              "string"
            ]
          },
          "iconSvg": {
            "type": [
              "null",
              "string"
            ]
          },
          "stripePriceId": {
            "type": [
              "null",
              "string"
            ]
          },
          "stripeProductId": {
            "type": [
              "null",
              "string"
            ]
          },
          "monthlyPriceCents": {
            "pattern": "^-?(?:0|[1-9]\\d*)$",
            "type": [
              "null",
              "integer",
              "string"
            ],
            "format": "int32"
          },
          "billingInterval": {
            "type": [
              "null",
              "string"
            ]
          },
          "active": {
            "type": [
              "null",
              "boolean"
            ]
          },
          "sortOrder": {
            "pattern": "^-?(?:0|[1-9]\\d*)$",
            "type": [
              "null",
              "integer",
              "string"
            ],
            "format": "int32"
          },
          "requiresJson": {
            "type": [
              "null",
              "string"
            ]
          },
          "bundledProductsJson": {
            "type": [
              "null",
              "string"
            ]
          },
          "listed": {
            "type": [
              "null",
              "boolean"
            ]
          },
          "availableIndividually": {
            "type": [
              "null",
              "boolean"
            ]
          }
        }
      },
      "UpdateSubscriptionStatusRequest": {
        "required": [
          "status"
        ],
        "type": "object",
        "properties": {
          "status": {
            "type": "string"
          }
        }
      },
      "VoidRequest": {
        "required": [
          "reason"
        ],
        "type": "object",
        "properties": {
          "reason": {
            "type": [
              "null",
              "string"
            ]
          }
        }
      }
    }
  },
  "tags": [
    {
      "name": "Reseller"
    },
    {
      "name": "Customer"
    },
    {
      "name": "Free months"
    }
  ]
}