Activate Child Account
Activate child account to a parent account
HTTP Request
- cURL
- JavaScript
curl -X GET \
'https://apistg.ahamove.com/v1/partner/activate_child_account?token=<TOKE_STG>&child_id=84xxxxxxxxx&activation_code=1234' \
-H 'cache-control: no-cache'
var requestOptions = {
method: 'GET',
redirect: 'follow',
};
fetch(
'https://apistg.ahamove.com/v1/partner/activate_child_account?token=<TOKE_STG>&child_id=84xxxxxxxxx&activation_code=1234',
requestOptions
)
.then((response) => response.text())
.then((result) => console.log(result))
.catch((error) => console.log('error', error));
GET https://apistg.ahamove.com/v1/partner/activate_child_account
Query Parameters
Parameter | Type | Required | Description |
---|---|---|---|
token | String | Yes | Parent token. |
child_id | String | Yes | Child Account ID. |
activation_code | String | Yes | Activation code was received when adding a child account to parent account. |
Response
JSON response example:
{
"_id": "84xxxxxxxxx",
"name": "Minh Pham",
...
}
Status-Code: 200 OK
Errors
Code | Text | Description |
---|---|---|
404 | Not Found | Token not found, child_id not found. |
401 | Unauthorized | Parent account doesn’t have the “partner” field or child account belongs to another partner. |
409 | Conflict | Parent existed, Sub-child accounts existed (The child account already has a parent or is already a parent of other accounts). |
406 | Not Acceptable | Activation code not valid. |
500 | Internal Server Error | We had a problem with our server. Try again later. |
503 | Service Unavailable | We're temporarily offline for maintenance. Please try again later. |