{
  "paths": {
    "/v2/partners/{partner_org_id}/orgs": {
      "post": {
        "responses": {
          "422": {
            "$ref": "#/components/responses/UNPROCESSABLE_CONTENT"
          },
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/RegisterOrgResponse"
                }
              }
            }
          },
          "default": {
            "$ref": "#/components/responses/DEFAULT_ERROR"
          },
          "400": {
            "description": "Bad request",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorResponse"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorResponse"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorResponse"
                }
              }
            }
          },
          "404": {
            "description": "Not found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorResponse"
                }
              }
            }
          },
          "409": {
            "description": "Conflict",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorResponse"
                }
              }
            }
          },
          "405": {
            "description": "Method not allowed",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorResponse"
                }
              }
            }
          },
          "500": {
            "description": "Internal server error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorResponse"
                }
              }
            }
          }
        },
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/RegisterOrg"
              }
            }
          }
        },
        "tags": [
          "Organizations"
        ],
        "summary": "/orgs",
        "description": "Registers a new child organization under the channel partner. Creates the organization, sets up user memberships, and establishes the partnership relationship."
      },
      "parameters": [
        {
          "in": "path",
          "name": "partner_org_id",
          "required": true,
          "schema": {
            "type": "string",
            "format": "uuid"
          }
        }
      ]
    },
    "/v2/partners/{partner_org_id}/orgs/{child_org_id}/invites": {
      "post": {
        "responses": {
          "422": {
            "$ref": "#/components/responses/UNPROCESSABLE_CONTENT"
          },
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/OrgMembershipResponse"
                  }
                }
              }
            }
          },
          "default": {
            "$ref": "#/components/responses/DEFAULT_ERROR"
          },
          "400": {
            "description": "Bad request",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorResponse"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorResponse"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorResponse"
                }
              }
            }
          },
          "404": {
            "description": "Not found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorResponse"
                }
              }
            }
          },
          "409": {
            "description": "Conflict",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorResponse"
                }
              }
            }
          },
          "405": {
            "description": "Method not allowed",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorResponse"
                }
              }
            }
          },
          "500": {
            "description": "Internal server error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorResponse"
                }
              }
            }
          }
        },
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/InviteUsers"
              }
            }
          }
        },
        "tags": [
          "Organizations"
        ],
        "summary": "/orgs/{child_org_id}/invites",
        "description": "Invites users to the channel partner organization. Sends email invitations to the specified user emails with roles of user, admin, support, cloud_rep, restricted_user."
      },
      "parameters": [
        {
          "in": "path",
          "name": "partner_org_id",
          "required": true,
          "schema": {
            "type": "string",
            "format": "uuid"
          }
        },
        {
          "in": "path",
          "name": "child_org_id",
          "required": true,
          "schema": {
            "type": "string",
            "format": "uuid"
          }
        }
      ]
    },
    "/v2/org/{org_id}/partners/onboarding/aws/cloudformation_template": {
      "get": {
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/CloudFormation"
                }
              }
            }
          },
          "default": {
            "$ref": "#/components/responses/DEFAULT_ERROR"
          },
          "400": {
            "description": "Bad request",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorResponse"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorResponse"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorResponse"
                }
              }
            }
          },
          "404": {
            "description": "Not found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorResponse"
                }
              }
            }
          },
          "409": {
            "description": "Conflict",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorResponse"
                }
              }
            }
          },
          "405": {
            "description": "Method not allowed",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorResponse"
                }
              }
            }
          },
          "500": {
            "description": "Internal server error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorResponse"
                }
              }
            }
          }
        },
        "tags": [
          "partners"
        ],
        "summary": "/cloudformation_template",
        "description": "Generates CloudFormation template for AWS integration. Creates the necessary IAM role and policy template for setting up AWS access."
      },
      "parameters": [
        {
          "in": "path",
          "name": "org_id",
          "required": true,
          "schema": {
            "type": "string",
            "format": "uuid"
          }
        }
      ]
    },
    "/v2/org/{org_id}/partners/onboarding/aws/launch-stack-url": {
      "get": {
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/LaunchStackUrls"
                }
              }
            }
          },
          "default": {
            "$ref": "#/components/responses/DEFAULT_ERROR"
          },
          "400": {
            "description": "Bad request",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorResponse"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorResponse"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorResponse"
                }
              }
            }
          },
          "404": {
            "description": "Not found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorResponse"
                }
              }
            }
          },
          "409": {
            "description": "Conflict",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorResponse"
                }
              }
            }
          },
          "405": {
            "description": "Method not allowed",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorResponse"
                }
              }
            }
          },
          "500": {
            "description": "Internal server error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorResponse"
                }
              }
            }
          }
        },
        "tags": [
          "partners"
        ],
        "summary": "/launch-stack-url",
        "description": "Generates AWS CloudFormation launch stack URL. Creates a pre-configured URL to deploy the CloudFormation stack in the AWS console."
      },
      "parameters": [
        {
          "in": "path",
          "name": "org_id",
          "required": true,
          "schema": {
            "type": "string",
            "format": "uuid"
          }
        }
      ]
    },
    "/v2/org/{org_id}/partners/onboarding/aws/verify": {
      "post": {
        "responses": {
          "422": {
            "$ref": "#/components/responses/UNPROCESSABLE_CONTENT"
          },
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/Validation"
                  }
                }
              }
            }
          },
          "default": {
            "$ref": "#/components/responses/DEFAULT_ERROR"
          },
          "400": {
            "description": "Bad request",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorResponse"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorResponse"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorResponse"
                }
              }
            }
          },
          "404": {
            "description": "Not found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorResponse"
                }
              }
            }
          },
          "409": {
            "description": "Conflict",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorResponse"
                }
              }
            }
          },
          "405": {
            "description": "Method not allowed",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorResponse"
                }
              }
            }
          },
          "500": {
            "description": "Internal server error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorResponse"
                }
              }
            }
          }
        },
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/VerificationArgs"
              }
            }
          }
        },
        "tags": [
          "partners"
        ],
        "summary": "/verify",
        "description": "Runs AWS onboarding verification process. Creates a new CUR or uses an existing CUR and verifies AWS integration setup and returns validation status for all required features."
      },
      "parameters": [
        {
          "in": "path",
          "name": "org_id",
          "required": true,
          "schema": {
            "type": "string",
            "format": "uuid"
          }
        }
      ]
    },
    "/v2/org/{org_id}/partners/onboarding/azure/auth-url": {
      "get": {
        "responses": {
          "422": {
            "$ref": "#/components/responses/UNPROCESSABLE_CONTENT"
          },
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AzureAuthUrlResponse"
                }
              }
            }
          },
          "default": {
            "$ref": "#/components/responses/DEFAULT_ERROR"
          },
          "400": {
            "description": "Bad request",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorResponse"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorResponse"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorResponse"
                }
              }
            }
          },
          "404": {
            "description": "Not found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorResponse"
                }
              }
            }
          },
          "409": {
            "description": "Conflict",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorResponse"
                }
              }
            }
          },
          "405": {
            "description": "Method not allowed",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorResponse"
                }
              }
            }
          },
          "500": {
            "description": "Internal server error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorResponse"
                }
              }
            }
          }
        },
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/AzureAuthUrlArgs"
              }
            }
          }
        },
        "tags": [
          "partners"
        ],
        "summary": "/auth-url",
        "description": "Generates Azure authentication URL for onboarding. Creates or updates Azure onboarding record with tenant and subscription details, then returns the auth URL."
      },
      "parameters": [
        {
          "in": "path",
          "name": "org_id",
          "required": true,
          "schema": {
            "type": "string",
            "format": "uuid"
          }
        }
      ]
    },
    "/v2/org/{org_id}/partners/onboarding/azure/verify": {
      "post": {
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/Validation"
                  }
                }
              }
            }
          },
          "default": {
            "$ref": "#/components/responses/DEFAULT_ERROR"
          },
          "400": {
            "description": "Bad request",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorResponse"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorResponse"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorResponse"
                }
              }
            }
          },
          "404": {
            "description": "Not found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorResponse"
                }
              }
            }
          },
          "409": {
            "description": "Conflict",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorResponse"
                }
              }
            }
          },
          "405": {
            "description": "Method not allowed",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorResponse"
                }
              }
            }
          },
          "500": {
            "description": "Internal server error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorResponse"
                }
              }
            }
          }
        },
        "tags": [
          "partners"
        ],
        "summary": "/verify",
        "description": "Runs Azure onboarding verification process. Executes the complete onboarding workflow and returns validation results for all features."
      },
      "parameters": [
        {
          "in": "path",
          "name": "org_id",
          "required": true,
          "schema": {
            "type": "string",
            "format": "uuid"
          }
        }
      ]
    },
    "/v2/org/{org_id}/partners/onboarding/register_child": {
      "post": {
        "responses": {
          "422": {
            "$ref": "#/components/responses/UNPROCESSABLE_CONTENT"
          },
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PartnerRegisterOrgResponse"
                }
              }
            }
          },
          "default": {
            "$ref": "#/components/responses/DEFAULT_ERROR"
          },
          "400": {
            "description": "Bad request",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorResponse"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorResponse"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorResponse"
                }
              }
            }
          },
          "404": {
            "description": "Not found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorResponse"
                }
              }
            }
          },
          "409": {
            "description": "Conflict",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorResponse"
                }
              }
            }
          },
          "405": {
            "description": "Method not allowed",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorResponse"
                }
              }
            }
          },
          "500": {
            "description": "Internal server error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorResponse"
                }
              }
            }
          }
        },
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/PartnerRegisterOrg"
              }
            }
          }
        },
        "tags": [
          "partners"
        ],
        "summary": "/register_child",
        "description": "**Legacy** - use **POST [`/partners/<uuid_str:partner_org_id>/orgs`](#tag/Organizations/paths/~1v2~1partners~1{partner_org_id}~1orgs/post)** instead. This endpoint will be discontinued soon.\n\nRegisters a new child organization under the channel partner. Creates the organization, sets up user memberships, and establishes the partnership relationship.",
        "deprecated": true
      },
      "parameters": [
        {
          "in": "path",
          "name": "org_id",
          "required": true,
          "schema": {
            "type": "string",
            "format": "uuid"
          }
        }
      ]
    },
    "/v2/org/{org_id}/partners/onboarding/start": {
      "post": {
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/StartOnboarding"
                }
              }
            }
          },
          "default": {
            "$ref": "#/components/responses/DEFAULT_ERROR"
          },
          "400": {
            "description": "Bad request",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorResponse"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorResponse"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorResponse"
                }
              }
            }
          },
          "404": {
            "description": "Not found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorResponse"
                }
              }
            }
          },
          "409": {
            "description": "Conflict",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorResponse"
                }
              }
            }
          },
          "405": {
            "description": "Method not allowed",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorResponse"
                }
              }
            }
          },
          "500": {
            "description": "Internal server error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorResponse"
                }
              }
            }
          }
        },
        "tags": [
          "partners"
        ],
        "summary": "/start",
        "description": "Starts the onboarding process for an organization. Creates or retrieves an onboarding record and sets the provider to AWS."
      },
      "parameters": [
        {
          "in": "path",
          "name": "org_id",
          "required": true,
          "schema": {
            "type": "string",
            "format": "uuid"
          }
        }
      ]
    },
    "/v2/org/{org_id}/partners/onboarding/child-orgs": {
      "get": {
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/ListChildOrgsResponse"
                  }
                }
              }
            }
          },
          "default": {
            "$ref": "#/components/responses/DEFAULT_ERROR"
          },
          "400": {
            "description": "Bad request",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorResponse"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorResponse"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorResponse"
                }
              }
            }
          },
          "404": {
            "description": "Not found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorResponse"
                }
              }
            }
          },
          "409": {
            "description": "Conflict",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorResponse"
                }
              }
            }
          },
          "405": {
            "description": "Method not allowed",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorResponse"
                }
              }
            }
          },
          "500": {
            "description": "Internal server error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorResponse"
                }
              }
            }
          }
        },
        "tags": [
          "partners"
        ],
        "summary": "/child-orgs",
        "description": "Lists child organizations. This returns all orgs belongs to the channel partner identified by **org_id**."
      },
      "parameters": [
        {
          "in": "path",
          "name": "org_id",
          "required": true,
          "schema": {
            "type": "string",
            "format": "uuid"
          }
        }
      ]
    },
    "/v2/org/{org_id}/partners/purchase-plans-v2/recommended": {
      "get": {
        "parameters": [
          {
            "in": "query",
            "name": "provider",
            "schema": {
              "enum": [
                "aws",
                "azure",
                "gcp",
                "kubernetes",
                "unknown"
              ],
              "type": "string"
            },
            "required": true
          }
        ],
        "responses": {
          "422": {
            "$ref": "#/components/responses/UNPROCESSABLE_CONTENT"
          },
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PurchasePlanV2CombinedSummary"
                }
              }
            }
          },
          "default": {
            "$ref": "#/components/responses/DEFAULT_ERROR"
          },
          "400": {
            "description": "Bad request",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorResponse"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorResponse"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorResponse"
                }
              }
            }
          },
          "404": {
            "description": "Not found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorResponse"
                }
              }
            }
          },
          "409": {
            "description": "Conflict",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorResponse"
                }
              }
            }
          },
          "405": {
            "description": "Method not allowed",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorResponse"
                }
              }
            }
          },
          "500": {
            "description": "Internal server error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorResponse"
                }
              }
            }
          }
        },
        "tags": [
          "partners"
        ],
        "summary": "/recommended",
        "description": "Gets recommended purchase plans for a specific provider. Returns the most suitable plan based on the organization and provider requirements."
      },
      "parameters": [
        {
          "in": "path",
          "name": "org_id",
          "required": true,
          "schema": {
            "type": "string",
            "format": "uuid"
          }
        }
      ]
    },
    "/v2/org/{org_id}/partners/purchase-plans-v2/{plan_id}/purchase": {
      "post": {
        "responses": {
          "422": {
            "$ref": "#/components/responses/UNPROCESSABLE_CONTENT"
          },
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PurchasePlanV2"
                }
              }
            }
          },
          "default": {
            "$ref": "#/components/responses/DEFAULT_ERROR"
          },
          "400": {
            "description": "Bad request",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorResponse"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorResponse"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorResponse"
                }
              }
            }
          },
          "404": {
            "description": "Not found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorResponse"
                }
              }
            }
          },
          "409": {
            "description": "Conflict",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorResponse"
                }
              }
            }
          },
          "405": {
            "description": "Method not allowed",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorResponse"
                }
              }
            }
          },
          "500": {
            "description": "Internal server error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorResponse"
                }
              }
            }
          }
        },
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/PurchaseRequest"
              }
            }
          }
        },
        "tags": [
          "partners"
        ],
        "summary": "/<uuid:plan_id>/purchase",
        "description": "Executes purchase of a specific plan by plan ID. Creates or validates user membership and processes the plan purchase."
      },
      "parameters": [
        {
          "in": "path",
          "name": "org_id",
          "required": true,
          "schema": {
            "type": "string",
            "format": "uuid"
          }
        },
        {
          "in": "path",
          "name": "plan_id",
          "required": true,
          "schema": {
            "type": "string",
            "format": "uuid"
          }
        }
      ]
    },
    "/v2/org/{org_id}/partners": {
      "patch": {
        "responses": {
          "422": {
            "$ref": "#/components/responses/UNPROCESSABLE_CONTENT"
          },
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PartnerOrgResponse"
                }
              }
            }
          },
          "default": {
            "$ref": "#/components/responses/DEFAULT_ERROR"
          },
          "400": {
            "description": "Bad request",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorResponse"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorResponse"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorResponse"
                }
              }
            }
          },
          "404": {
            "description": "Not found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorResponse"
                }
              }
            }
          },
          "409": {
            "description": "Conflict",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorResponse"
                }
              }
            }
          },
          "405": {
            "description": "Method not allowed",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorResponse"
                }
              }
            }
          },
          "500": {
            "description": "Internal server error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorResponse"
                }
              }
            }
          }
        },
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/UpdatePartnerOrg"
              }
            }
          }
        },
        "summary": "Partially Update an Organization\nSo far the scope is only limited to marketplace offer links",
        "tags": [
          "partners"
        ]
      },
      "parameters": [
        {
          "in": "path",
          "name": "org_id",
          "required": true,
          "schema": {
            "type": "string",
            "format": "uuid"
          }
        }
      ]
    }
  },
  "info": {
    "title": "Archera.ai Channel Partner API",
    "version": "v1.0.0"
  },
  "tags": [
    {
      "name": "Organizations",
      "description": "API for managing child organizations of a channel partner"
    },
    {
      "name": "partners",
      "description": "partners api automation"
    }
  ],
  "openapi": "3.1.0",
  "components": {
    "schemas": {
      "Error": {
        "type": "object",
        "properties": {
          "code": {
            "type": "integer",
            "description": "Error code"
          },
          "status": {
            "type": "string",
            "description": "Error name"
          },
          "message": {
            "type": "string",
            "description": "Error message"
          },
          "errors": {
            "type": "object",
            "description": "Errors",
            "additionalProperties": {}
          }
        },
        "additionalProperties": false
      },
      "PaginationMetadata": {
        "type": "object",
        "properties": {
          "total": {
            "type": "integer",
            "description": "Total number of items."
          },
          "total_pages": {
            "type": "integer",
            "description": "Total number of pages."
          },
          "first_page": {
            "type": "integer",
            "description": "First available page number."
          },
          "last_page": {
            "type": "integer",
            "description": "Last available page number."
          },
          "page": {
            "type": "integer",
            "description": "Current page number."
          },
          "previous_page": {
            "type": "integer",
            "description": "Previous page number."
          },
          "next_page": {
            "type": "integer",
            "description": "Next page number."
          }
        },
        "additionalProperties": false
      },
      "ApiErrorResponse": {
        "type": "object",
        "properties": {
          "message": {
            "type": "string"
          },
          "detail": {},
          "code": {
            "type": [
              "string",
              "null"
            ]
          },
          "url": {
            "type": [
              "string",
              "null"
            ]
          },
          "timestamp": {
            "type": "string"
          },
          "type": {
            "type": "string"
          }
        },
        "required": [
          "message",
          "timestamp",
          "type"
        ]
      },
      "UserInvite": {
        "type": "object",
        "properties": {
          "email": {
            "type": "string",
            "format": "email",
            "maxLength": 255
          },
          "role": {
            "type": "string",
            "enum": [
              "user",
              "admin",
              "support",
              "cloud_rep",
              "restricted_user"
            ]
          }
        },
        "required": [
          "email"
        ],
        "additionalProperties": false
      },
      "MutateAddress": {
        "type": "object",
        "properties": {
          "line1": {
            "type": "string"
          },
          "line2": {
            "type": [
              "string",
              "null"
            ],
            "default": null
          },
          "city": {
            "type": "string"
          },
          "state": {
            "type": "string"
          },
          "zip": {
            "type": "string"
          },
          "country": {
            "type": "string"
          }
        },
        "required": [
          "city",
          "country",
          "line1",
          "state",
          "zip"
        ],
        "additionalProperties": false
      },
      "RegisterOrg": {
        "type": "object",
        "properties": {
          "name": {
            "type": "string"
          },
          "labra_subscription_id": {
            "type": "string"
          },
          "users": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/UserInvite"
            }
          },
          "domain": {
            "type": [
              "string",
              "null"
            ]
          },
          "primary_address": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/MutateAddress"
              },
              {
                "type": "null"
              }
            ]
          },
          "aws_marketplace_offer_link": {
            "type": [
              "string",
              "null"
            ],
            "format": "url"
          },
          "azure_marketplace_offer_link": {
            "type": [
              "string",
              "null"
            ],
            "format": "url"
          },
          "gcp_marketplace_offer_link": {
            "type": [
              "string",
              "null"
            ],
            "format": "url"
          }
        },
        "required": [
          "name"
        ],
        "additionalProperties": false
      },
      "OrgMembershipResponse": {
        "type": "object",
        "properties": {
          "role": {
            "type": "string",
            "enum": [
              "user",
              "admin",
              "support",
              "cloud_rep",
              "restricted_user"
            ],
            "readOnly": true
          },
          "username": {
            "type": "string",
            "format": "email",
            "readOnly": true,
            "maxLength": 255
          }
        },
        "additionalProperties": false
      },
      "RegisterOrgResponse": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "readOnly": true
          },
          "name": {
            "type": "string",
            "readOnly": true
          },
          "memberships": {
            "readOnly": true,
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/OrgMembershipResponse"
            }
          },
          "domain": {
            "type": [
              "string",
              "null"
            ],
            "readOnly": true
          },
          "primary_address": {
            "readOnly": true,
            "anyOf": [
              {
                "$ref": "#/components/schemas/MutateAddress"
              },
              {
                "type": "null"
              }
            ]
          },
          "aws_marketplace_offer_link": {
            "type": [
              "string",
              "null"
            ],
            "format": "url",
            "readOnly": true
          },
          "azure_marketplace_offer_link": {
            "type": [
              "string",
              "null"
            ],
            "format": "url",
            "readOnly": true
          },
          "gcp_marketplace_offer_link": {
            "type": [
              "string",
              "null"
            ],
            "format": "url",
            "readOnly": true
          }
        },
        "required": [
          "id",
          "name"
        ],
        "additionalProperties": false
      },
      "InviteUsers": {
        "type": "object",
        "properties": {
          "users": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/UserInvite"
            }
          }
        },
        "required": [
          "users"
        ],
        "additionalProperties": false
      },
      "CloudFormation": {
        "type": "object",
        "properties": {
          "template": {
            "type": "object",
            "additionalProperties": {}
          }
        },
        "additionalProperties": false
      },
      "LaunchStackUrls": {
        "type": "object",
        "properties": {
          "url": {
            "type": "string"
          }
        },
        "required": [
          "url"
        ],
        "additionalProperties": false
      },
      "ExistingCUR": {
        "type": "object",
        "properties": {
          "region": {
            "type": "string"
          },
          "bucket": {
            "type": "string"
          },
          "prefix": {
            "type": "string"
          },
          "report_name": {
            "type": "string"
          }
        },
        "required": [
          "bucket",
          "prefix",
          "region",
          "report_name"
        ],
        "additionalProperties": false
      },
      "VerificationArgs": {
        "type": "object",
        "properties": {
          "onboarding_id": {
            "type": "string",
            "pattern": "[0-9a-f]{8}-[0-9a-f]{4}-4[0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}\\Z"
          },
          "account_id": {
            "type": "string"
          },
          "existing_cur": {
            "$ref": "#/components/schemas/ExistingCUR"
          }
        },
        "additionalProperties": false
      },
      "Validation": {
        "type": "object",
        "properties": {
          "feature": {
            "type": "string"
          },
          "status": {
            "type": "string",
            "enum": [
              "available",
              "warning",
              "missing",
              "unknown"
            ]
          }
        },
        "additionalProperties": false
      },
      "AzureAuthUrlArgs": {
        "type": "object",
        "properties": {
          "azure_tenant_id": {
            "type": "string"
          },
          "azure_subscription_id": {
            "type": "string"
          }
        },
        "required": [
          "azure_subscription_id",
          "azure_tenant_id"
        ],
        "additionalProperties": false
      },
      "AzureAuthUrlResponse": {
        "type": "object",
        "properties": {
          "url": {
            "type": "string"
          }
        },
        "required": [
          "url"
        ],
        "additionalProperties": false
      },
      "PartnerRegisterOrg": {
        "type": "object",
        "properties": {
          "company": {
            "type": "string"
          },
          "labra_subscription_id": {
            "type": "string"
          },
          "email": {
            "type": [
              "string",
              "null"
            ],
            "format": "email",
            "default": null,
            "maxLength": 255
          }
        },
        "required": [
          "company"
        ],
        "additionalProperties": false
      },
      "PartnerRegisterOrgResponse": {
        "type": "object",
        "properties": {
          "org_id": {
            "type": "string"
          }
        },
        "additionalProperties": false
      },
      "StartOnboarding": {
        "type": "object",
        "properties": {
          "onboarding_id": {
            "type": "string"
          }
        },
        "additionalProperties": false
      },
      "ListChildOrgsResponse": {
        "type": "object",
        "properties": {
          "created_at": {
            "type": "string",
            "format": "date-time"
          },
          "org_id": {
            "type": "string"
          },
          "org_name": {
            "type": "string"
          },
          "org_checklist": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/Validation"
            }
          },
          "integration_checklist": {
            "type": "object",
            "additionalProperties": {
              "type": "array",
              "items": {
                "$ref": "#/components/schemas/Validation"
              }
            }
          }
        },
        "required": [
          "created_at",
          "integration_checklist",
          "org_checklist",
          "org_id",
          "org_name"
        ],
        "additionalProperties": false
      },
      "PurchasePlanContractSpec": {
        "type": "object",
        "properties": {
          "commitment_type": {
            "type": "string"
          },
          "properties": {
            "type": "object",
            "default": {},
            "additionalProperties": {}
          },
          "term": {
            "default": null,
            "type": [
              "string",
              "null"
            ],
            "enum": [
              "one_year_gris",
              "thirty_day_gris",
              "two_month_gris",
              "three_month_gris",
              "four_month_gris",
              "five_month_gris",
              "six_month_gris",
              "seven_month_gris",
              "eight_month_gris",
              "nine_month_gris",
              "ten_month_gris",
              "eleven_month_gris",
              "twelve_month_gris",
              "thirteen_month_gris",
              "fourteen_month_gris",
              "fifteen_month_gris",
              "sixteen_month_gris",
              "seventeen_month_gris",
              "eighteen_month_gris",
              "nineteen_month_gris",
              "twenty_month_gris",
              "twenty_one_month_gris",
              "twenty_two_month_gris",
              "twenty_three_month_gris",
              "twenty_four_month_gris",
              "twenty_five_month_gris",
              "twenty_six_month_gris",
              "twenty_seven_month_gris",
              "twenty_eight_month_gris",
              "twenty_nine_month_gris",
              "thirty_month_gris",
              "thirty_one_month_gris",
              "thirty_two_month_gris",
              "thirty_three_month_gris",
              "thirty_four_month_gris",
              "thirty_five_month_gris",
              "one_year",
              "two_year",
              "three_year",
              "five_year",
              "zero_day",
              "thirty_day",
              "two_month",
              "three_month",
              "four_month",
              "five_month",
              "six_month",
              "seven_month",
              "eight_month",
              "nine_month",
              "ten_month",
              "eleven_month",
              "thirteen_month",
              "fourteen_month",
              "fifteen_month",
              "sixteen_month",
              "seventeen_month",
              "eighteen_month",
              "nineteen_month",
              "twenty_month",
              "twenty_one_month",
              "twenty_two_month",
              "twenty_three_month",
              "twenty_five_month",
              "twenty_six_month",
              "twenty_seven_month",
              "twenty_eight_month",
              "twenty_nine_month",
              "thirty_month",
              "thirty_one_month",
              "thirty_two_month",
              "thirty_three_month",
              "thirty_four_month",
              "thirty_five_month",
              null
            ]
          },
          "payment_option": {
            "default": null,
            "type": [
              "string",
              "null"
            ],
            "enum": [
              "no_upfront",
              "partial_upfront",
              "all_upfront",
              null
            ]
          }
        },
        "required": [
          "commitment_type"
        ],
        "additionalProperties": false
      },
      "MetaPlanInfo": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "readOnly": true
          },
          "name": {
            "type": "string",
            "readOnly": true
          },
          "created_at": {
            "type": "string",
            "format": "date-time",
            "readOnly": true
          },
          "is_default": {
            "type": "boolean",
            "readOnly": true
          }
        },
        "required": [
          "created_at",
          "id",
          "is_default",
          "name"
        ],
        "additionalProperties": false
      },
      "UserInfo": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "readOnly": true,
            "maxLength": 50
          },
          "username": {
            "type": "string",
            "maxLength": 255
          },
          "full_name": {
            "type": [
              "string",
              "null"
            ],
            "maxLength": 255
          }
        },
        "required": [
          "username"
        ],
        "additionalProperties": false
      },
      "PlanInfo": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "readOnly": true
          },
          "name": {
            "type": "string",
            "readOnly": true
          },
          "created_at": {
            "type": "string",
            "format": "date-time",
            "readOnly": true
          },
          "status": {
            "readOnly": true,
            "type": "string",
            "enum": [
              "new",
              "reviewed",
              "scheduled",
              "completed",
              "draft",
              "needs_review",
              "in_progress"
            ]
          }
        },
        "required": [
          "created_at",
          "id",
          "name",
          "status"
        ],
        "additionalProperties": false
      },
      "ExecutePurchasePolicyDump_Exclude_Segment_TargetPlan": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "format": "uuid",
            "readOnly": true
          },
          "org_id": {
            "type": "string",
            "format": "uuid",
            "readOnly": true
          },
          "name": {
            "type": "string",
            "readOnly": true
          },
          "description": {
            "type": [
              "string",
              "null"
            ],
            "readOnly": true
          },
          "created_at": {
            "type": "string",
            "format": "date-time",
            "readOnly": true
          },
          "last_modified": {
            "type": [
              "string",
              "null"
            ],
            "format": "date-time",
            "readOnly": true
          },
          "schedule": {
            "type": "string",
            "enum": [
              "quarterly",
              "weekly",
              "monthly",
              "daily"
            ],
            "readOnly": true
          },
          "start_date": {
            "type": [
              "string",
              "null"
            ],
            "format": "date-time",
            "readOnly": true
          },
          "end_date": {
            "type": [
              "string",
              "null"
            ],
            "format": "date-time",
            "readOnly": true
          },
          "enabled": {
            "type": "boolean",
            "readOnly": true
          },
          "next_execution_date": {
            "type": [
              "string",
              "null"
            ],
            "format": "date-time",
            "readOnly": true
          },
          "meta_plan_id": {
            "type": [
              "string",
              "null"
            ],
            "format": "uuid",
            "readOnly": true
          },
          "segment_id": {
            "type": [
              "string",
              "null"
            ],
            "format": "uuid",
            "readOnly": true
          },
          "default_plan_name": {
            "type": [
              "string",
              "null"
            ],
            "readOnly": true
          },
          "min_savings": {
            "type": [
              "number",
              "null"
            ],
            "readOnly": true
          },
          "meta_plan": {
            "readOnly": true,
            "$ref": "#/components/schemas/MetaPlanInfo"
          },
          "created_by": {
            "readOnly": true,
            "$ref": "#/components/schemas/UserInfo"
          },
          "plans": {
            "readOnly": true,
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/PlanInfo"
            }
          },
          "total_savings": {
            "type": [
              "number",
              "null"
            ],
            "readOnly": true
          }
        },
        "required": [
          "created_at",
          "created_by",
          "default_plan_name",
          "description",
          "enabled",
          "end_date",
          "id",
          "last_modified",
          "meta_plan",
          "meta_plan_id",
          "min_savings",
          "name",
          "next_execution_date",
          "org_id",
          "plans",
          "schedule",
          "segment_id",
          "start_date",
          "total_savings"
        ],
        "additionalProperties": false
      },
      "SegmentInfo": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "readOnly": true
          },
          "name": {
            "type": "string",
            "readOnly": true
          },
          "created_at": {
            "type": "string",
            "format": "date-time",
            "readOnly": true
          },
          "is_default": {
            "type": "boolean",
            "readOnly": true
          },
          "provider": {
            "readOnly": true,
            "type": "string",
            "enum": [
              "aws",
              "azure",
              "gcp",
              "kubernetes",
              "unknown"
            ]
          }
        },
        "required": [
          "created_at",
          "id",
          "is_default",
          "name",
          "provider"
        ],
        "additionalProperties": false
      },
      "PurchasePlanV2NameId": {
        "type": "object",
        "properties": {
          "name": {
            "type": "string"
          },
          "id": {
            "type": "string",
            "format": "uuid"
          },
          "is_default": {
            "type": "boolean"
          },
          "status": {
            "type": "string",
            "enum": [
              "new",
              "reviewed",
              "scheduled",
              "completed",
              "draft",
              "needs_review",
              "in_progress"
            ]
          }
        },
        "required": [
          "id",
          "is_default",
          "name",
          "status"
        ],
        "additionalProperties": false
      },
      "PurchaseAction_Exclude_User": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "readOnly": true,
            "maxLength": 50
          },
          "org_id": {
            "type": [
              "string",
              "null"
            ],
            "readOnly": true,
            "maxLength": 50
          },
          "user_id": {
            "type": [
              "string",
              "null"
            ],
            "readOnly": true,
            "maxLength": 50
          },
          "provider": {
            "type": [
              "string",
              "null"
            ],
            "maxLength": 255
          },
          "action_type": {
            "type": [
              "string",
              "null"
            ],
            "maxLength": 255
          },
          "action_description": {},
          "status": {
            "type": [
              "string",
              "null"
            ],
            "default": "submitted",
            "maxLength": 255
          },
          "creation_time": {
            "type": "string",
            "format": "date-time",
            "readOnly": true
          },
          "execution_time": {
            "type": [
              "string",
              "null"
            ],
            "format": "date-time",
            "readOnly": true
          },
          "execution_info": {
            "readOnly": true
          },
          "plan_id": {
            "type": "string",
            "readOnly": true,
            "pattern": "[0-9a-f]{8}-[0-9a-f]{4}-4[0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}\\Z"
          },
          "plan": {
            "readOnly": true,
            "$ref": "#/components/schemas/PurchasePlanV2NameId"
          }
        },
        "required": [
          "plan_id"
        ],
        "additionalProperties": false
      },
      "RenewalPurchaseAction_Exclude_User": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "readOnly": true,
            "maxLength": 50
          },
          "org_id": {
            "type": [
              "string",
              "null"
            ],
            "readOnly": true,
            "maxLength": 50
          },
          "user_id": {
            "type": [
              "string",
              "null"
            ],
            "readOnly": true,
            "maxLength": 50
          },
          "provider": {
            "type": [
              "string",
              "null"
            ],
            "maxLength": 255
          },
          "action_type": {
            "type": [
              "string",
              "null"
            ],
            "maxLength": 255
          },
          "action_description": {},
          "status": {
            "type": [
              "string",
              "null"
            ],
            "default": "submitted",
            "maxLength": 255
          },
          "creation_time": {
            "type": "string",
            "format": "date-time",
            "readOnly": true
          },
          "execution_time": {
            "type": [
              "string",
              "null"
            ],
            "format": "date-time",
            "readOnly": true
          },
          "execution_info": {
            "readOnly": true
          },
          "plan_id": {
            "type": "string",
            "readOnly": true,
            "pattern": "[0-9a-f]{8}-[0-9a-f]{4}-4[0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}\\Z"
          },
          "plan": {
            "readOnly": true,
            "$ref": "#/components/schemas/PurchasePlanV2NameId"
          }
        },
        "required": [
          "plan_id"
        ],
        "additionalProperties": false
      },
      "ExchangeAction_Exclude_User": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "readOnly": true,
            "maxLength": 50
          },
          "org_id": {
            "type": [
              "string",
              "null"
            ],
            "readOnly": true,
            "maxLength": 50
          },
          "user_id": {
            "type": [
              "string",
              "null"
            ],
            "readOnly": true,
            "maxLength": 50
          },
          "provider": {
            "type": [
              "string",
              "null"
            ],
            "maxLength": 255
          },
          "action_type": {
            "type": [
              "string",
              "null"
            ],
            "maxLength": 255
          },
          "action_description": {},
          "status": {
            "type": [
              "string",
              "null"
            ],
            "default": "submitted",
            "maxLength": 255
          },
          "creation_time": {
            "type": "string",
            "format": "date-time",
            "readOnly": true
          },
          "execution_time": {
            "type": [
              "string",
              "null"
            ],
            "format": "date-time",
            "readOnly": true
          },
          "execution_info": {
            "readOnly": true
          },
          "exchange_status": {
            "type": [
              "string",
              "null"
            ],
            "maxLength": 255
          }
        },
        "additionalProperties": false
      },
      "LegacyPurchaseAction_Exclude_User": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "readOnly": true,
            "maxLength": 50
          },
          "org_id": {
            "type": [
              "string",
              "null"
            ],
            "readOnly": true,
            "maxLength": 50
          },
          "user_id": {
            "type": [
              "string",
              "null"
            ],
            "readOnly": true,
            "maxLength": 50
          },
          "provider": {
            "type": [
              "string",
              "null"
            ],
            "maxLength": 255
          },
          "action_type": {
            "type": [
              "string",
              "null"
            ],
            "maxLength": 255
          },
          "action_description": {},
          "status": {
            "type": [
              "string",
              "null"
            ],
            "default": "submitted",
            "maxLength": 255
          },
          "creation_time": {
            "type": "string",
            "format": "date-time",
            "readOnly": true
          },
          "execution_time": {
            "type": [
              "string",
              "null"
            ],
            "format": "date-time",
            "readOnly": true
          },
          "execution_info": {
            "readOnly": true
          }
        },
        "additionalProperties": false
      },
      "FlaggedAction": {
        "oneOf": [
          {
            "$ref": "#/components/schemas/PurchaseAction_Exclude_User"
          },
          {
            "$ref": "#/components/schemas/RenewalPurchaseAction_Exclude_User"
          },
          {
            "$ref": "#/components/schemas/ExchangeAction_Exclude_User"
          },
          {
            "$ref": "#/components/schemas/LegacyPurchaseAction_Exclude_User"
          }
        ],
        "discriminator": {
          "propertyName": "action_type",
          "mapping": {
            "purchase": "#/components/schemas/PurchaseAction_Exclude_User",
            "renewal_purchase": "#/components/schemas/RenewalPurchaseAction_Exclude_User",
            "exchange": "#/components/schemas/ExchangeAction_Exclude_User",
            "legacy_purchase": "#/components/schemas/LegacyPurchaseAction_Exclude_User"
          }
        }
      },
      "CommitmentSummary": {
        "type": "object",
        "properties": {
          "key": {
            "type": "string"
          },
          "name": {
            "type": "string"
          },
          "provider": {
            "type": [
              "string",
              "null"
            ],
            "enum": [
              "aws",
              "azure",
              "gcp",
              "kubernetes",
              "unknown",
              null
            ]
          },
          "service_name": {
            "type": "string"
          },
          "num_commitments": {
            "type": "integer"
          },
          "min_commitment": {
            "type": "number"
          },
          "max_savings": {
            "type": "number"
          },
          "min_savings": {
            "type": "number"
          },
          "upfront_cost": {
            "type": "number"
          },
          "monthly_savings": {
            "type": "number"
          },
          "monthly_commitment": {
            "type": "number"
          },
          "potential_coverage": {
            "type": "number"
          },
          "current_coverage": {
            "type": "number"
          },
          "min_term_hours": {
            "type": "integer"
          },
          "max_term_hours": {
            "type": "integer"
          },
          "gri_premium": {
            "type": "number"
          }
        },
        "required": [
          "key"
        ],
        "additionalProperties": false
      },
      "AggregateMetrics": {
        "type": "object",
        "properties": {
          "potential_coverage": {
            "type": "number"
          },
          "current_coverage": {
            "type": "number"
          },
          "summaries": {
            "type": "object",
            "additionalProperties": {
              "$ref": "#/components/schemas/CommitmentSummary"
            }
          }
        },
        "additionalProperties": false
      },
      "LineItemSummary": {
        "type": "object",
        "properties": {
          "key": {
            "type": "string"
          },
          "provider": {
            "type": "string",
            "enum": [
              "aws",
              "azure",
              "gcp",
              "kubernetes",
              "unknown"
            ]
          },
          "num_commitments": {
            "type": "integer"
          },
          "min_commitment": {
            "type": "number"
          },
          "max_savings": {
            "type": "number"
          },
          "min_savings": {
            "type": "number"
          },
          "upfront_cost": {
            "type": "number"
          },
          "monthly_savings": {
            "type": "number"
          },
          "monthly_commitment": {
            "type": "number"
          },
          "min_term_hours": {
            "type": "integer"
          },
          "max_term_hours": {
            "type": "integer"
          },
          "gri_premiums": {
            "type": "number"
          },
          "if_all_ondemand_cost": {
            "type": "number"
          },
          "before_ondemand_cost": {
            "type": "number"
          },
          "after_ondemand_cost": {
            "type": "number"
          }
        },
        "required": [
          "after_ondemand_cost",
          "before_ondemand_cost",
          "gri_premiums",
          "if_all_ondemand_cost",
          "key",
          "max_savings",
          "max_term_hours",
          "min_commitment",
          "min_savings",
          "min_term_hours",
          "monthly_commitment",
          "monthly_savings",
          "num_commitments",
          "provider",
          "upfront_cost"
        ],
        "additionalProperties": false
      },
      "PurchasePlanV2CombinedSummary": {
        "type": "object",
        "properties": {
          "start_date": {
            "type": [
              "string",
              "null"
            ],
            "format": "date-time"
          },
          "end_date": {
            "type": [
              "string",
              "null"
            ],
            "format": "date-time"
          },
          "id": {
            "type": "string",
            "format": "uuid"
          },
          "data_source": {
            "type": "string",
            "maxLength": 20
          },
          "name": {
            "type": "string"
          },
          "description": {
            "type": [
              "string",
              "null"
            ]
          },
          "segment_id": {
            "type": "string",
            "maxLength": 50
          },
          "meta_plan_id": {
            "type": [
              "string",
              "null"
            ],
            "format": "uuid"
          },
          "org_id": {
            "type": "string",
            "maxLength": 50
          },
          "last_modified": {
            "type": [
              "string",
              "null"
            ],
            "format": "date-time"
          },
          "plan_type": {
            "type": "string",
            "enum": [
              "purchase",
              "renewal",
              "infrastructure"
            ]
          },
          "coverage_id": {
            "type": [
              "string",
              "null"
            ],
            "format": "uuid"
          },
          "created_at": {
            "type": "string",
            "format": "date-time"
          },
          "is_calculating": {
            "type": "boolean"
          },
          "is_saved": {
            "type": "boolean"
          },
          "is_locked": {
            "type": "boolean"
          },
          "max_upfront_cost": {
            "type": "number"
          },
          "minimum_upfront_interest_rate": {
            "type": "number"
          },
          "preferred_payment_option": {
            "enum": [
              "No Upfront",
              "Partial Upfront",
              "All Upfront",
              null
            ]
          },
          "included_contract_specs": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/PurchasePlanContractSpec"
            }
          },
          "included_contract_terms": {
            "type": "array",
            "items": {
              "type": "string",
              "enum": [
                "one_year_gris",
                "thirty_day_gris",
                "two_month_gris",
                "three_month_gris",
                "four_month_gris",
                "five_month_gris",
                "six_month_gris",
                "seven_month_gris",
                "eight_month_gris",
                "nine_month_gris",
                "ten_month_gris",
                "eleven_month_gris",
                "twelve_month_gris",
                "thirteen_month_gris",
                "fourteen_month_gris",
                "fifteen_month_gris",
                "sixteen_month_gris",
                "seventeen_month_gris",
                "eighteen_month_gris",
                "nineteen_month_gris",
                "twenty_month_gris",
                "twenty_one_month_gris",
                "twenty_two_month_gris",
                "twenty_three_month_gris",
                "twenty_four_month_gris",
                "twenty_five_month_gris",
                "twenty_six_month_gris",
                "twenty_seven_month_gris",
                "twenty_eight_month_gris",
                "twenty_nine_month_gris",
                "thirty_month_gris",
                "thirty_one_month_gris",
                "thirty_two_month_gris",
                "thirty_three_month_gris",
                "thirty_four_month_gris",
                "thirty_five_month_gris",
                "one_year",
                "two_year",
                "three_year",
                "five_year",
                "zero_day",
                "thirty_day",
                "two_month",
                "three_month",
                "four_month",
                "five_month",
                "six_month",
                "seven_month",
                "eight_month",
                "nine_month",
                "ten_month",
                "eleven_month",
                "thirteen_month",
                "fourteen_month",
                "fifteen_month",
                "sixteen_month",
                "seventeen_month",
                "eighteen_month",
                "nineteen_month",
                "twenty_month",
                "twenty_one_month",
                "twenty_two_month",
                "twenty_three_month",
                "twenty_five_month",
                "twenty_six_month",
                "twenty_seven_month",
                "twenty_eight_month",
                "twenty_nine_month",
                "thirty_month",
                "thirty_one_month",
                "thirty_two_month",
                "thirty_three_month",
                "thirty_four_month",
                "thirty_five_month"
              ]
            }
          },
          "recommend_within_covered_accounts": {
            "type": [
              "boolean",
              "null"
            ]
          },
          "status": {
            "type": "string",
            "enum": [
              "new",
              "reviewed",
              "scheduled",
              "completed",
              "draft",
              "needs_review",
              "in_progress"
            ]
          },
          "is_recommended": {
            "type": "boolean"
          },
          "is_default": {
            "type": "boolean"
          },
          "is_renewal": {
            "type": "boolean"
          },
          "execution_policy": {
            "$ref": "#/components/schemas/ExecutePurchasePolicyDump_Exclude_Segment_TargetPlan"
          },
          "segment": {
            "$ref": "#/components/schemas/SegmentInfo"
          },
          "flagged_actions": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/FlaggedAction"
            }
          },
          "created_by": {
            "$ref": "#/components/schemas/UserInfo"
          },
          "resource_ids": {
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "reservation_ids": {
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "max_term": {
            "type": "string"
          },
          "all_terms": {
            "type": "array",
            "items": {
              "type": "string",
              "enum": [
                "one_year_gris",
                "thirty_day_gris",
                "two_month_gris",
                "three_month_gris",
                "four_month_gris",
                "five_month_gris",
                "six_month_gris",
                "seven_month_gris",
                "eight_month_gris",
                "nine_month_gris",
                "ten_month_gris",
                "eleven_month_gris",
                "twelve_month_gris",
                "thirteen_month_gris",
                "fourteen_month_gris",
                "fifteen_month_gris",
                "sixteen_month_gris",
                "seventeen_month_gris",
                "eighteen_month_gris",
                "nineteen_month_gris",
                "twenty_month_gris",
                "twenty_one_month_gris",
                "twenty_two_month_gris",
                "twenty_three_month_gris",
                "twenty_four_month_gris",
                "twenty_five_month_gris",
                "twenty_six_month_gris",
                "twenty_seven_month_gris",
                "twenty_eight_month_gris",
                "twenty_nine_month_gris",
                "thirty_month_gris",
                "thirty_one_month_gris",
                "thirty_two_month_gris",
                "thirty_three_month_gris",
                "thirty_four_month_gris",
                "thirty_five_month_gris",
                "one_year",
                "two_year",
                "three_year",
                "five_year",
                "zero_day",
                "thirty_day",
                "two_month",
                "three_month",
                "four_month",
                "five_month",
                "six_month",
                "seven_month",
                "eight_month",
                "nine_month",
                "ten_month",
                "eleven_month",
                "thirteen_month",
                "fourteen_month",
                "fifteen_month",
                "sixteen_month",
                "seventeen_month",
                "eighteen_month",
                "nineteen_month",
                "twenty_month",
                "twenty_one_month",
                "twenty_two_month",
                "twenty_three_month",
                "twenty_five_month",
                "twenty_six_month",
                "twenty_seven_month",
                "twenty_eight_month",
                "twenty_nine_month",
                "thirty_month",
                "thirty_one_month",
                "thirty_two_month",
                "thirty_three_month",
                "thirty_four_month",
                "thirty_five_month"
              ]
            }
          },
          "covered_ondemand_cost": {
            "type": "number"
          },
          "before_ondemand_cost": {
            "type": "number"
          },
          "before_reserved_cost": {
            "type": "number"
          },
          "amortized_cost": {
            "type": "number"
          },
          "recurring_cost": {
            "type": "number"
          },
          "upfront_cost": {
            "type": "number"
          },
          "before_cost": {
            "type": "number"
          },
          "after_cost": {
            "type": "number"
          },
          "total_cost": {
            "type": "number"
          },
          "savings": {
            "type": "number"
          },
          "fee": {
            "type": "number"
          },
          "commitment_coverage": {
            "type": "number"
          },
          "minimum_commitment_cost": {
            "type": "number"
          },
          "breakeven_hours": {
            "type": "number"
          },
          "total_savings": {
            "type": "number"
          },
          "monthly_savings": {
            "type": "number"
          },
          "monthly_amortized_cost": {
            "type": "number"
          },
          "monthly_fee": {
            "type": "number"
          },
          "monthly_before_cost": {
            "type": "number"
          },
          "monthly_after_cost": {
            "type": "number"
          },
          "total_monthly_before_cost": {
            "type": "number"
          },
          "aggregate_metrics": {
            "$ref": "#/components/schemas/AggregateMetrics"
          },
          "summaries": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/LineItemSummary"
            }
          }
        },
        "required": [
          "after_cost",
          "all_terms",
          "amortized_cost",
          "before_cost",
          "before_ondemand_cost",
          "before_reserved_cost",
          "breakeven_hours",
          "commitment_coverage",
          "coverage_id",
          "covered_ondemand_cost",
          "created_at",
          "created_by",
          "data_source",
          "description",
          "execution_policy",
          "fee",
          "flagged_actions",
          "id",
          "included_contract_specs",
          "included_contract_terms",
          "is_calculating",
          "is_default",
          "is_locked",
          "is_recommended",
          "is_renewal",
          "is_saved",
          "last_modified",
          "max_term",
          "max_upfront_cost",
          "meta_plan_id",
          "minimum_commitment_cost",
          "minimum_upfront_interest_rate",
          "monthly_after_cost",
          "monthly_amortized_cost",
          "monthly_before_cost",
          "monthly_fee",
          "monthly_savings",
          "name",
          "org_id",
          "plan_type",
          "preferred_payment_option",
          "recommend_within_covered_accounts",
          "recurring_cost",
          "reservation_ids",
          "resource_ids",
          "savings",
          "segment",
          "segment_id",
          "status",
          "summaries",
          "total_cost",
          "total_monthly_before_cost",
          "total_savings",
          "upfront_cost"
        ],
        "additionalProperties": false
      },
      "PurchaseRequest": {
        "type": "object",
        "properties": {
          "email": {
            "type": "string",
            "format": "email",
            "maxLength": 255,
            "description": "Email of the user executing the purchase"
          }
        },
        "required": [
          "email"
        ],
        "additionalProperties": false
      },
      "PurchasePlanV2": {
        "type": "object",
        "properties": {
          "start_date": {
            "type": [
              "string",
              "null"
            ],
            "format": "date-time"
          },
          "end_date": {
            "type": [
              "string",
              "null"
            ],
            "format": "date-time"
          },
          "id": {
            "type": "string",
            "format": "uuid"
          },
          "data_source": {
            "type": "string",
            "maxLength": 20
          },
          "name": {
            "type": "string"
          },
          "description": {
            "type": [
              "string",
              "null"
            ]
          },
          "segment_id": {
            "type": "string",
            "maxLength": 50
          },
          "meta_plan_id": {
            "type": [
              "string",
              "null"
            ],
            "format": "uuid"
          },
          "org_id": {
            "type": "string",
            "maxLength": 50
          },
          "last_modified": {
            "type": [
              "string",
              "null"
            ],
            "format": "date-time"
          },
          "plan_type": {
            "type": "string",
            "enum": [
              "purchase",
              "renewal",
              "infrastructure"
            ]
          },
          "coverage_id": {
            "type": [
              "string",
              "null"
            ],
            "format": "uuid"
          },
          "created_at": {
            "type": "string",
            "format": "date-time"
          },
          "is_calculating": {
            "type": "boolean"
          },
          "is_saved": {
            "type": "boolean"
          },
          "is_locked": {
            "type": "boolean"
          },
          "max_upfront_cost": {
            "type": "number"
          },
          "minimum_upfront_interest_rate": {
            "type": "number"
          },
          "preferred_payment_option": {
            "enum": [
              "No Upfront",
              "Partial Upfront",
              "All Upfront",
              null
            ]
          },
          "included_contract_specs": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/PurchasePlanContractSpec"
            }
          },
          "included_contract_terms": {
            "type": "array",
            "items": {
              "type": "string",
              "enum": [
                "one_year_gris",
                "thirty_day_gris",
                "two_month_gris",
                "three_month_gris",
                "four_month_gris",
                "five_month_gris",
                "six_month_gris",
                "seven_month_gris",
                "eight_month_gris",
                "nine_month_gris",
                "ten_month_gris",
                "eleven_month_gris",
                "twelve_month_gris",
                "thirteen_month_gris",
                "fourteen_month_gris",
                "fifteen_month_gris",
                "sixteen_month_gris",
                "seventeen_month_gris",
                "eighteen_month_gris",
                "nineteen_month_gris",
                "twenty_month_gris",
                "twenty_one_month_gris",
                "twenty_two_month_gris",
                "twenty_three_month_gris",
                "twenty_four_month_gris",
                "twenty_five_month_gris",
                "twenty_six_month_gris",
                "twenty_seven_month_gris",
                "twenty_eight_month_gris",
                "twenty_nine_month_gris",
                "thirty_month_gris",
                "thirty_one_month_gris",
                "thirty_two_month_gris",
                "thirty_three_month_gris",
                "thirty_four_month_gris",
                "thirty_five_month_gris",
                "one_year",
                "two_year",
                "three_year",
                "five_year",
                "zero_day",
                "thirty_day",
                "two_month",
                "three_month",
                "four_month",
                "five_month",
                "six_month",
                "seven_month",
                "eight_month",
                "nine_month",
                "ten_month",
                "eleven_month",
                "thirteen_month",
                "fourteen_month",
                "fifteen_month",
                "sixteen_month",
                "seventeen_month",
                "eighteen_month",
                "nineteen_month",
                "twenty_month",
                "twenty_one_month",
                "twenty_two_month",
                "twenty_three_month",
                "twenty_five_month",
                "twenty_six_month",
                "twenty_seven_month",
                "twenty_eight_month",
                "twenty_nine_month",
                "thirty_month",
                "thirty_one_month",
                "thirty_two_month",
                "thirty_three_month",
                "thirty_four_month",
                "thirty_five_month"
              ]
            }
          },
          "recommend_within_covered_accounts": {
            "type": [
              "boolean",
              "null"
            ]
          },
          "status": {
            "type": "string",
            "enum": [
              "new",
              "reviewed",
              "scheduled",
              "completed",
              "draft",
              "needs_review",
              "in_progress"
            ]
          },
          "is_recommended": {
            "type": "boolean"
          },
          "is_default": {
            "type": "boolean"
          },
          "is_renewal": {
            "type": "boolean"
          },
          "execution_policy": {
            "$ref": "#/components/schemas/ExecutePurchasePolicyDump_Exclude_Segment_TargetPlan"
          },
          "segment": {
            "$ref": "#/components/schemas/SegmentInfo"
          },
          "flagged_actions": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/FlaggedAction"
            }
          },
          "created_by": {
            "$ref": "#/components/schemas/UserInfo"
          },
          "resource_ids": {
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "reservation_ids": {
            "type": "array",
            "items": {
              "type": "string"
            }
          }
        },
        "required": [
          "coverage_id",
          "created_at",
          "created_by",
          "data_source",
          "description",
          "execution_policy",
          "flagged_actions",
          "id",
          "included_contract_specs",
          "included_contract_terms",
          "is_calculating",
          "is_default",
          "is_locked",
          "is_recommended",
          "is_renewal",
          "is_saved",
          "last_modified",
          "max_upfront_cost",
          "meta_plan_id",
          "minimum_upfront_interest_rate",
          "name",
          "org_id",
          "plan_type",
          "preferred_payment_option",
          "recommend_within_covered_accounts",
          "reservation_ids",
          "resource_ids",
          "segment",
          "segment_id",
          "status"
        ],
        "additionalProperties": false
      },
      "UpdatePartnerOrg": {
        "type": "object",
        "properties": {
          "aws_marketplace_offer_link": {
            "type": [
              "string",
              "null"
            ],
            "format": "url"
          },
          "azure_marketplace_offer_link": {
            "type": [
              "string",
              "null"
            ],
            "format": "url"
          },
          "gcp_marketplace_offer_link": {
            "type": [
              "string",
              "null"
            ],
            "format": "url"
          }
        },
        "additionalProperties": false
      },
      "PartnerOrgResponse": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "format": "uuid"
          },
          "name": {
            "type": "string"
          },
          "aws_marketplace_offer_link": {
            "type": [
              "string",
              "null"
            ]
          },
          "azure_marketplace_offer_link": {
            "type": [
              "string",
              "null"
            ]
          },
          "gcp_marketplace_offer_link": {
            "type": [
              "string",
              "null"
            ]
          }
        },
        "required": [
          "aws_marketplace_offer_link",
          "azure_marketplace_offer_link",
          "gcp_marketplace_offer_link",
          "id",
          "name"
        ],
        "additionalProperties": false
      }
    },
    "responses": {
      "UNPROCESSABLE_CONTENT": {
        "description": "Unprocessable Content",
        "content": {
          "application/json": {
            "schema": {
              "$ref": "#/components/schemas/Error"
            }
          }
        }
      },
      "DEFAULT_ERROR": {
        "description": "Default error response",
        "content": {
          "application/json": {
            "schema": {
              "$ref": "#/components/schemas/Error"
            }
          }
        }
      }
    }
  }
}