diff --git a/shared/management/http/api/openapi.yml b/shared/management/http/api/openapi.yml index 59ea69ca1..65785979d 100644 --- a/shared/management/http/api/openapi.yml +++ b/shared/management/http/api/openapi.yml @@ -3763,6 +3763,10 @@ components: type: boolean description: Whether the MSP is managed by a reseller example: true + reseller_customer_id: + type: string + description: Reseller's internal customer reference for this MSP + example: "CUST-12345" activated_at: type: string description: MSP activation timestamp in RFC3339 format @@ -3791,9 +3795,24 @@ components: type: string description: The domain for the MSP example: "new-partner.com" + price_id: + type: string + description: Stripe price ID to set up managed subscription for the MSP + example: "price_1234" + reseller_customer_id: + type: string + description: Reseller's internal customer reference for this MSP + example: "CUST-12345" required: - name - domain + UpdateResellerMSPRequest: + type: object + properties: + reseller_customer_id: + type: string + description: Reseller's internal customer reference for this MSP + example: "CUST-12345" CreateTenantRequest: type: object properties: @@ -8721,6 +8740,41 @@ paths: "500": $ref: "#/components/responses/internal_error" /api/integrations/msp/reseller/msps/{id}: + put: + summary: Update MSP fields managed by reseller + description: Update editable reseller-level fields on an MSP (e.g. reseller_customer_id) + tags: + - MSP + parameters: + - in: path + name: id + required: true + schema: + type: string + description: The MSP account ID to update + requestBody: + required: true + content: + application/json: + schema: + $ref: "#/components/schemas/UpdateResellerMSPRequest" + responses: + "200": + description: MSP updated successfully + content: + application/json: + schema: + $ref: "#/components/schemas/ResellerMSPResponse" + "400": + $ref: "#/components/responses/bad_request" + "401": + $ref: "#/components/responses/requires_authentication" + "403": + $ref: "#/components/responses/forbidden" + "404": + description: MSP not found or not managed by this reseller + "500": + $ref: "#/components/responses/internal_error" delete: summary: Unlink MSP from reseller tags: diff --git a/shared/management/http/api/types.gen.go b/shared/management/http/api/types.gen.go index 482f3f706..3eba594c9 100644 --- a/shared/management/http/api/types.gen.go +++ b/shared/management/http/api/types.gen.go @@ -1640,6 +1640,12 @@ type CreateResellerMSPRequest struct { // Name The name for the MSP Name string `json:"name"` + + // PriceId Stripe price ID to set up managed subscription for the MSP + PriceId *string `json:"price_id,omitempty"` + + // ResellerCustomerId Reseller's internal customer reference for this MSP + ResellerCustomerId *string `json:"reseller_customer_id,omitempty"` } // CreateScimIntegrationRequest Request payload for creating an SCIM IDP integration @@ -3592,6 +3598,9 @@ type ResellerMSPResponse struct { // Name The MSP name Name string `json:"name"` + + // ResellerCustomerId Reseller's internal customer reference for this MSP + ResellerCustomerId *string `json:"reseller_customer_id,omitempty"` } // ResellerStatusResponse defines model for ResellerStatusResponse. @@ -4223,6 +4232,12 @@ type TenantResponse struct { // TenantResponseStatus The status of the tenant type TenantResponseStatus string +// UpdateResellerMSPRequest defines model for UpdateResellerMSPRequest. +type UpdateResellerMSPRequest struct { + // ResellerCustomerId Reseller's internal customer reference for this MSP + ResellerCustomerId *string `json:"reseller_customer_id,omitempty"` +} + // UpdateScimIntegrationRequest Request payload for updating an SCIM IDP integration type UpdateScimIntegrationRequest struct { // Enabled Indicates whether the integration is enabled @@ -4828,6 +4843,9 @@ type PostApiIntegrationsMspResellerJSONRequestBody PostApiIntegrationsMspReselle // PostApiIntegrationsMspResellerMspsJSONRequestBody defines body for PostApiIntegrationsMspResellerMsps for application/json ContentType. type PostApiIntegrationsMspResellerMspsJSONRequestBody = CreateResellerMSPRequest +// PutApiIntegrationsMspResellerMspsIdJSONRequestBody defines body for PutApiIntegrationsMspResellerMspsId for application/json ContentType. +type PutApiIntegrationsMspResellerMspsIdJSONRequestBody = UpdateResellerMSPRequest + // PutApiIntegrationsMspResellerMspsIdInviteJSONRequestBody defines body for PutApiIntegrationsMspResellerMspsIdInvite for application/json ContentType. type PutApiIntegrationsMspResellerMspsIdInviteJSONRequestBody PutApiIntegrationsMspResellerMspsIdInviteJSONBody