Activate Managed Service
# Activate a managed service for an account ### `POST /managedaccounts/actions/provision` Activates a managed billing service relationship between a managed account and the primary account. The account must first be added by the primary account. Once added and activated, the managed account can use the managed service and billing will be rolled up to the primary account. **NOTE:** The accounts must be enabled for Aggregated Billing Services before you can use this request. See [About Aggregated Billing Services](https://thingspace.verizon.com/documentation/api-documentation.html#/http/device-location/guides/getting-started/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/provision](/docs/premium-apis/device-location/api-endpoints/billing/managedaccountaction) ## 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`. | | **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 activate. Must be “Location” for the Device Location Service. | | **type** *(required)* | string | The SKU of the service that you want to activate. | | **TxId** *(required)* | string | The transaction ID that was returned when the account was added by the primary account. 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-ece4-9f02-42ef-2c90bd287e3b" } ``` ## Success Responses **Status 200** A success response is a confirmation of the activation, or a reason why the service could not be activated. | Parameter Name | Data Type | Description | |:----------------|:-----------|:-------------| | **txid** | string | A unique transaction ID for the activation request. | | **accountName** | string | The name of the managed account for which the service was activated. | | **paccountName** | string | The name of the primary billing account. | | **serviceName** | string | The name of the managed service. | | **status** | string | The status of the activation request, either **Success** or **Fail**. | | **reason** | string | Either **Success** or additional information about a failure, such as **Acct Already activated**. | ### Example Success Response ```json { "txid": "4fbff332-ece4-42ef-9f02-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.