API Tutorial
This tutorial equips you to run, modify, and test the Ahamove API seamlessly through the steps to set up Postman and run a sample Ahamove API collection. Postman is a popular tool for testing APIs and simulating requests.
Step 1: Download and Install Postman
- Visit the Postman website and download the appropriate version for your operating system.
- Install Postman and sign in (or create an account if you don’t have one).
Step 2: Import the Ahamove API Collection
- Download the Ahamove API V3 Postman collection HERE
- Drag and drop the downloaded collection file or paste the collection link or click Upload Files to import it.
- You will see the collection Ahamove API V3 added to the sidebar under Collections.
Step 3: Set Up Environment Variables
- In Postman, click the gear icon ⚙️ in the top-right corner and select Manage Environments.
- Create a new environment named Ahamove API STG.
- Add the following variables (replace placeholder values with your actual data):
partner_host
: The Staging domain API (https://partner-apistg.ahamove.com)api_key
: The API Key received after Partner registered for integrationtoken
: Leave blank for now; you'll generate it in Step 4.
- Save the environment and ensure it’s selected in the top-right dropdown of Postman.
Step 4: Authenticate and Get a Token
- Locate the API Register Account or Authenticate token (if user already have an account) in the collection.
- Input your API key and any other required field.
- Send the request and retrieve the token from the response.
- Copy the token and paste it into your environment variable
token
.
Step 5: Test a Sample Request
- Use the token for endpoints requiring authentication
- Select the API Get List Of Service (or a similar basic endpoint).
- Click Send to execute the request.
- Verify the response:
- Status Code:
200 OK
- Response Body: A list of service types supported by Ahamove.
- Status Code:
Step 6: Explore Other API Endpoints
- Use the token for endpoints requiring authentication.
- Test advanced features like creating an order, tracking deliveries, or calculating prices.
- Modify the request parameters (e.g., location, time, cod) to simulate real-world scenarios.