---
updatedAt: 2026-03-12T15:42:39.000Z
agentTools:
  siteIndex: https://docs.here.com/llms.txt
  projectIndex: https://docs.here.com/wego-pro/llms.txt
---

# Deactivate subscription

Endpoint to deactivate a subscription

# OpenAPI definition

```json
{
  "openapi": "3.0.1",
  "info": {
    "title": "HERE WeGo User Service",
    "description": "The HERE WeGo user service manages user entitlements and it provides role-based access control (RBAC) to those entitlements.<br><br><details><summary><b>Error Codes:</b></summary><p>The following common error codes apply to all endpoints.</p><p><b>400 Bad Request</b><ul><li>E400100: Validation errors using Jakarta's ConstraintViolationException.</li><li>E400101: Database constraint violations using Hibernate's ConstraintViolationException.</li><li>E400102: Validation errors for method arguments using Spring's MethodArgumentNotValidException.</li><li>E400103: Errors when a required request header is missing using Spring's MissingRequestHeaderException.</li><li>E400104: Errors when there is a mismatch between expected and actual argument types using Spring's MethodArgumentTypeMismatchException.</li><li>E400105: Returned when an endpoint requires a payload to be passed but none was provided.</li><li>E400106: Invalid update operation. The provided data does not meet the required conditions.</li><li>E400200: Error response from the microservice using a custom ErrorResponseException.</li><li>E400300: Deserialization errors due to mismatched input using Jackson's MismatchedInputException.</li><li>E400301: Deserialization errors due to an invalid format using Jackson's InvalidFormatException.</li><li>E400302: Errors when the HTTP message cannot be read or parsed during conversion in Spring using HttpMessageNotReadableException.</li><li>E400303: Deserialization errors due to unsupported media type being passed as a request body.</li><li>E400400: Exception thrown when user onboarding process fails.</li><li>E400401: Exception thrown when there are too many results encountered.</li><li>E400500: Zuora subscription is invalid.</li><li>E400600: Thrown when the organization lacks a HERE platform realm, which is required to complete the requested operation.</li></ul></p><p><b>401 Unauthorized</b><ul><li>E401100: Exception thrown for 'x-authorization-iam' token authorization failures</li><li>400300: Invalid characters in access token.</li><li>400601: Unsupported token format.</li><li>400600: Expired token.</li><li>401200: Authorization header missing.</li><li>401201: Invalid Authorization header format, expecting Bearer format.</li><li>401303: Wrong token type.</li><li>401701: Access Token no longer valid.</li><li>401600: No account found for given account Id.</li><li>401510: User has expired.</li><li>401500: User is not enabled.</li><li>404660: No app exists with the given Id.</li><li>401311: Requesting client status is not active.</li><li>401202: Malformed OAuth 1.0 header.</li><li>401204: Time stamp is outside the valid period.</li><li>401205: Unsupported value for signature method.</li><li>401206: Unsupported value for oauth_version parameter.</li><li>401207: Nonce already consumed.</li><li>401300: Invalid client credentials / signature mismatch.</li><li>401310: Invalid signature.</li></ul></p><p><b>403 Forbidden</b><ul><li>E403100: Exception thrown when access to a resource or operation is denied.</li></ul></p><p><b>404 Not Found</b><ul><li>E404100: Indicates the absence of an expected entity or result, due to a missing record in the database.</li></ul></p><p><b>410 Gone</b><ul><li>E410100: Subscription has expired and cannot be used.</li></ul></p><p><b>409 Conflict</b><ul><li>E409100: Exception thrown when there are conflicting organization in feature groups.</li></ul></p><p><b>500 Internal Server Error</b><ul><li>E500100: Exception specific to PostgreSQL database operations.</li><li>E500101: Unexpected or exceptional condition occurred.</li><li>E500102: HAPI authentication error.</li><li>E500103: Organization not onboarded.</li><li>E500104: Exception thrown when tenant schema creation fails.</li><li>E500105: Exception thrown when BAM API call fails.</li></ul></p></details>",
    "version": "1.0.4"
  },
  "servers": [
    {
      "url": "https://api.wego.hereapi.com/user-service",
      "description": "Production environment for WeGo Pro"
    }
  ],
  "tags": [
    {
      "name": "Subscriptions",
      "description": "Endpoints for managing subscriptions"
    }
  ],
  "paths": {
    "/subscriptions/deactivate": {
      "post": {
        "tags": [
          "Subscriptions"
        ],
        "summary": "Deactivate subscription",
        "description": "Endpoint to deactivate a subscription",
        "operationId": "deactivateSubscription",
        "parameters": [
          {
            "name": "x-subscription-key",
            "in": "header",
            "description": "The subscription key",
            "required": true,
            "schema": {
              "type": "string"
            },
            "example": "b35eb927-0fea-4ff0-99fb-f71b85135807"
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/DeactivateSubscriptionRequestDto"
              },
              "example": {
                "status": "DELETED"
              }
            }
          },
          "required": true
        },
        "responses": {
          "204": {
            "description": "Subscription deactivated successfully"
          },
          "400": {
            "description": "Invalid request parameters",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponseDto"
                },
                "example": {
                  "status": 400,
                  "title": "Validation Error",
                  "correlationId": "2f2afe17-220e-4318-9299-954280d6b04f",
                  "code": "E400102",
                  "cause": "subscriptionKey: must not be blank",
                  "requestId": "REQ-ae47badf-66c2-4944-83f4-106f595cf975"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized - Invalid authorization token",
            "content": {
              "application/json": {
                "schema": {
                  "oneOf": [
                    {
                      "$ref": "#/components/schemas/UnauthorizedErrorResponseDto"
                    },
                    {
                      "$ref": "#/components/schemas/ErrorResponseDto"
                    }
                  ]
                },
                "example": {
                  "status": 401,
                  "title": "Unauthorized",
                  "correlationId": "a74fee73-f99c-4721-95a9-96e5c2615e63",
                  "code": "E401100",
                  "cause": "Unauthorized - Invalid Credentials",
                  "requestId": "REQ-t59f32eg-3181-52t6-13wc-6g7h9179u8c3"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden - Access to the requested resource is forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponseDto"
                },
                "example": {
                  "status": 403,
                  "title": "Access Denied",
                  "correlationId": "01ae70f6-d756-4352-b219-b7ee4820f184",
                  "code": "E403100",
                  "cause": "Not an admin user",
                  "requestId": "REQ-e48e44df-6290-43e4-85eb-8f8a8258e1d8"
                }
              }
            }
          },
          "404": {
            "description": "Subscription not found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponseDto"
                },
                "example": {
                  "status": 404,
                  "title": "Resource not found",
                  "correlationId": "c622ba3c-2b75-446c-a37b-6e871bce3edf",
                  "code": "E404100",
                  "cause": "Subscription key not found",
                  "requestId": "REQ-38f62707-746f-4071-ad3d-3c06d64785a7"
                }
              }
            }
          },
          "500": {
            "description": "Internal server error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponseDto"
                },
                "example": {
                  "status": 500,
                  "title": "Internal Server Error",
                  "correlationId": "414ed0d4-5804-4173-a136-404ffed07c69",
                  "code": "E500100",
                  "requestId": "REQ-38f62707-746f-4071-ad3d-3c06d64785a7"
                }
              }
            }
          }
        },
        "security": [
          {
            "Bearer": []
          },
          {
            "apiKey": []
          }
        ]
      }
    }
  },
  "components": {
    "schemas": {
      "ErrorResponseDto": {
        "required": [
          "correlationId",
          "status",
          "title"
        ],
        "type": "object",
        "properties": {
          "status": {
            "type": "integer",
            "description": "The HTTP status code",
            "format": "int32",
            "example": 400
          },
          "title": {
            "type": "string",
            "description": "Human-readable error description",
            "example": "Validation Error"
          },
          "correlationId": {
            "type": "string",
            "description": "Auto-generated ID univocally identifying this request",
            "example": "c5b92188-5eea-452a-a2e1-08c9a53bb5b9"
          },
          "code": {
            "type": "string",
            "description": "Error code",
            "example": "E500100"
          },
          "cause": {
            "type": "string",
            "description": "Human-readable explanation for the error",
            "example": "name: must not be blank"
          },
          "action": {
            "type": "string",
            "description": "Human-readable action for the user",
            "example": "null"
          },
          "requestId": {
            "type": "string",
            "description": "Request identifier provided by the user via `x-request-id` header",
            "example": "REQ-5a46fd9e-6244-4dba-bdef-5bc344338fac"
          }
        }
      },
      "UnauthorizedErrorResponseDto": {
        "required": [
          "error",
          "error_description"
        ],
        "type": "object",
        "properties": {
          "error": {
            "type": "string",
            "description": "The error type indicating the request is unauthorized.",
            "example": "Unauthorized"
          },
          "error_description": {
            "type": "string",
            "description": "A description providing more details about the unauthorized error.",
            "example": "No credentials found"
          }
        }
      },
      "DeactivateSubscriptionRequestDto": {
        "type": "object",
        "properties": {
          "status": {
            "type": "string",
            "description": "The status to set for the deactivated subscription",
            "default": "DELETED",
            "enum": [
              "INACTIVE",
              "DELETED"
            ]
          }
        }
      }
    },
    "securitySchemes": {
      "Bearer": {
        "type": "http",
        "description": "Bearer Access Token issued to either the User or Client.",
        "scheme": "bearer",
        "bearerFormat": "JWT"
      },
      "apiKey": {
        "type": "apiKey",
        "description": "API key from the HERE Platform Application",
        "name": "apiKey",
        "in": "query"
      }
    }
  }
}
```