Register Account
-
If not existing an account was registered with your phone number, you need to register an account on appstg.ahamove.com for STG and app.ahamove.com for PROD.
-
If you have created an account on the system or we found an existing account with your phone number. We'll update your account with extra info which you provide and return the token.
HTTP Request
- cURL
- JavaScript
curl -X GET \
'https://apistg.ahamove.com/v1/partner/register_account?mobile=84xxxxxxxxx&name=Partner+Test&api_key=<API_KEY_STG>' \
-H 'cache-control: no-cache'
var requestOptions = {
method: 'GET',
redirect: 'follow',
};
fetch(
'https://apistg.ahamove.com/v1/partner/register_account?mobile=84xxxxxxxxx&name=Partner+Test&api_key=<API_KEY_STG>',
requestOptions
)
.then((response) => response.text())
.then((result) => console.log(result))
.catch((error) => console.log('error', error));
GET https://apistg.ahamove.com/v1/partner/register_account
Query Parameters
Parameter | Type | Required | Description |
---|---|---|---|
api_key | String | Yes | The API_KEY of your application which received when you send an email to our developer portal. |
mobile | String | Yes | Your phone number used to register account ID. |
name | String | Yes | Your account name. |
address | String | Yes | Your home address (Optional if account already existed). |
lat | String | Yes | Latitude of home address (Optional if account already existed). |
lng | String | Yes | Longitude of home address (Optional if account already existed). |
String | No | Your email address. | |
parent_id | String | No | Parent Account ID. |
country_code | String | No | Country code, used for formatting the mobile number (default VN). |
Response
JSON response example:
{
"token": "eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJpc3MiOiJhaGEiLCJ0eXAiOiJ1c2VyIiwiY2lkIjoiODQ5MDI5MzMwMjUiLCJzdGF0dXMiOiJPTkxJTkUiLCJlb2MiOiJob2RkQGFoYW1vdmUuY29tIiwibm9jIjoiRG9hbiBEYWkgSG8iLCJjdHkiOiJTR04iLCJhY2NvdW50X3N0YXR1cyI6IkFDVElWQVRFRCIsImV4cCI6MTY5NTI3NjM2OCwicGFydG5lciI6Im9kb28iLCJ0eXBlIjoiYXBpIn0.celDzdkTiNuIjEf_8LDCJHTyK74BuceXB5IYhfHo08I",
"refresh_token": "0c42af2105249b126b80862e96b3b055"
}
Status-Code: 200 OK
Errors
Code | Text | Description |
---|---|---|
404 | Not Found | api_key not found, parent_id not found. |
401 | Unauthorized | Not authorized . The current account does not belong to this partner. |
409 | Conflict | Email existed. |
403 | Forbidden | Account is deactivated. |
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. |