Skip to main content
Version: 3.0.0

Register Account

Create a new User account (not yet registered in the Ahamove system) associated with the Partner's API Key and return the User's token

curl --location 'https://partner-apistg.ahamove.com/v3/accounts' \
--header 'Content-Type: application/json' \
--data '{
"mobile": "849xxxxxxxx",
"api_key": "<API_KEY_STG>",
"name": "Nguyễn Văn A",
"address": "7/28A Thành Thái, Phường 14, Quận 10"
}'

HTTP Request

POST https://partner-apistg.ahamove.com/v3/accounts

Query Parameters

ParameterTypeRequiredDescription
api_keyStringYesThe API_KEY received after Partner registered for integration
mobileStringYesPhone number used to register the account ID
nameStringYesName of the Partner's account
addressStringYesPartner's address

Response

JSON response example:

{
"token": "eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJpc3MiOiJhaGEiLCJ0eXAiOiJ1c2VyIiwiY2lkIjoiODQ5MDI5MzMwMjUiLCJzdGF0dXMiOiJPTkxJTkUiLCJlb2MiOiJob2RkQGFoYW1vdmUuY29tIiwibm9jIjoiRG9hbiBEYWkgSG8iLCJjdHkiOiJTR04iLCJhY2NvdW50X3N0YXR1cyI6IkFDVElWQVRFRCIsImV4cCI6MTY5NTI3NjM2OCwicGFydG5lciI6Im9kb28iLCJ0eXBlIjoiYXBpIn0.celDzdkTiNuIjEf_8LDCJHTyK74BuceXB5IYhfHo08I",
"refresh_token": "0c42af2105249b126b80862e96b3b055"
}

Status-Code: 200 OK

Errors

CodeTextDescription
400INVALID_DATAInvalid data or missing required fields
404PARTNER_NOT_FOUNDAPI key not found, Partner not found
406INVALID_PHONE_NUMBERInvalid phone number
409ACCOUNT_EXISTEDAccount already exists
500INTERNAL_SERVER_ERRORWe had a problem with our server. Try again later
503SERVICE_UNAVAILABLEWe're temporarily offline for maintenance. Please try again later