Cancel Managed Service
# Cancel a managed service for an account ### `POST /managedaccounts/actions/cancel` Deactivates a managed billing service relationship between a managed account and the primary account. **NOTE:** The accounts must be enabled for Aggregated Billing Services before you can use this request. See About Aggregated Billing Services for more information. ## Uses and Requirements This request must be sent with a VZ-M2M-Token created with the **managed account’s** credentials. **Note**: This method uses the `/subsc/v1` basepath, not `/loc/v1` used by other Device Location API requests. ## HTTP Request POST [https://thingspace.verizon.com/api/subsc/v1/managedaccounts/actions/cancel](/docs/premium-apis/device-location/api-endpoints/billing/cancelmanagedaccountaction) ## Resource Path and Query Parameters None. ## Header Parameters The request header must contain a current ThingSpace authorization token and a current VZ-M2M session token. For more details on how to get these tokens, visit [Getting Started](https://thingspace.verizon.com/documentation/api-documentation.html#/http/session-management/guides/getting-started). | Parameter Name | Data Type | Description | |:----------------|:-----------|:-------------| | **Authorization** *(required)* | string | HTTP Authorization bearer token: `Authorization: Bearer {token}`. | | **VZ-M2M-Token** *(required)* | string | A valid session token returned by `POST /api/m2m/v1/session/login` using the primary account’s credentials. | | **Content-Type** *(required)* | string | Must be application/json: `Content-Type: application/json`. | ## Request Body | Parameter Name | Data Type | Description | |:----------------|:-----------|:-------------| | **accountName** *(required)* | string | The name of the managed account, which is usually in the format of 10 digits, a hyphen, and then five more digits. Must include any leading zeros. | | **paccountName** *(required)* | string | The name of the primary billing account. Must include any leading zeros. | | **serviceName** *(required)* | string | The name of the managed service to cancel. Must be `Location` for the Device Location Service. | | **type** *(required)* | string | The SKU of the service that you want to cancel. | | **TxId** *(required)* | string | The transaction ID that was returned when the managed service was added/provisioned. You can also obtain the transaction ID with the `GET /managedaccounts` request. | ### Example Request Body ```json { "accountName": "1223334444-00001", "paccountName": "1234567890-00001", "serviceName": "Location", "type": "TS-LOC-COARSE-CellID-5K", "TxId": "d4fbff33-eeee-ffff-gggg-2c90bd287e3b" } ``` ## Success Responses **Status 200** A success response is a confirmation of the cancellation, or a reason why the service could not be canceled. | Parameter Name | Data Type | Description | |:----------------|:-----------|:-------------| | **txid** | string | A unique transaction ID for the cancellation request. | | **accountName** | string | The name of the account for which the service was canceled. | | **paccountName** | string | The name of the primary billing account. | | **serviceName** | string | The name of the managed service. | | **status** | string | The status of the cancellation request, either `Success` or `Fail`. | | **reason** | string | Either `Success` or additional information about a failure. | ### Example Success Response ```json { "TxId": "4fbff332-eeee-ffff-gggg-7e3bdc90bd28", "accountName": "1223334444-00001", "paccountName": "1234567890-00001", "serviceName": "Location", "status": "Success", "reason": "Success" } ``` ## Failure Responses All error messages are returned in this format: ```json { "errorCode": "The 3-digit HTML error code", "errorMessage": "string" } ``` Error codes and messages are listed on the [Error Codes page](https://thingspace.verizon.com/documentation/api-documentation.html#/http/device-location/error-codes), along with explanations and suggestions for corrective actions.