1. Introduction
SmartLocator helps teams clean, standardise, and classify Indian shipping addresses. This guide documents the public API endpoints, authentication, request formats, and result handling for integrating address verification into your own software.
Use the Single Verification API when your application needs to verify an address as an order is created or updated. For manual spreadsheet processing, the SmartLocator dashboard upload is usually simpler; use the Bulk API when batch processing itself needs to be automated.
For the product’s address, order-intelligence, and delivery-risk concepts, see the SmartLocator feature report.
Test the API before you integrate
Try requests in the SmartLocator API Test Lab, inspect the responses, and test your bulk workflow before integrating the API into your application. Use this guide as the reference for endpoint request and response formats.
Single API playground
Test one address, inspect the response, and review HTTP status and error details.
Bulk job workflow
Submit CSV or Excel files, track progress, cancel an eligible job, and download Ready or Manual outputs when available.
Diagnostics and logs
Review recent request diagnostics, troubleshooting suggestions, and sanitized Test Lab activity from the last 24 hours.
Integration examples
Use practical starting points for server-side code, Google Sheets, your own dashboard, and asynchronous bulk processing.
SmartLocator API Test Lab
Sign in with your existing SmartLocator account. There is no separate Test Lab account.
Open API Test LabRequests use your normal API permissions, plan, and credits. Bulk jobs may consume credits.
Configure your API key in Test Lab Settings. Use a small test file, keep credentials private, and remember that bulk jobs support up to 2,000 data rows per job and follow your account's active-job and credit limits.
2. API Overview
Single Verification
Verify one address synchronously and use the response inside your own product or workflow.
View endpointBulk Verification
For manual spreadsheet uploads, the dashboard is usually simpler. Use the Bulk API when your own backend needs to submit and process files automatically.
Brief bulk API detailsBase URL
https://smartlocator.in
3. Authentication
Every request must include your API key as a bearer token. Do not use a real key in examples, browser code, screenshots, or public repositories.
Authorization: Bearer <YOUR_API_KEY>
Use Content-Type: application/json for Single Verification and Bulk job submission. Result downloads return CSV content.
4. Single Address Verification Primary API
Verify one address per request and receive a JSON result you can use in your own software. Your customer records, order schema, database columns, and internal field names can stay as they are: map the address value to address and optionally pass the customer name as customerName. You do not need to send order ID, product, phone, payment status, or other fields unless your own application needs them separately.
https://smartlocator.in/api/single-verifyRequest fields
address — required raw address (at least 5 words). customerName — optional customer name.
Response
A JSON object with returned address components, quality/classification fields, and status information. Use the actual response fields to map results into your system.
5. Common Integration Use Cases
The Single API is designed to fit around the client’s existing data. The client’s integration reads an address from its own source, sends one request, then stores or displays the returned result.
Checkout and new orders
Verify the shipping address when an order is placed or before it is sent to fulfillment. Use the response to show relevant address details or flag an order for review.
Your own database or CRM
Read an address from any database field, map it to address, and save returned fields alongside your existing customer or order record.
Add results beside spreadsheet rows
A custom script can read one address cell at a time, call Single Verification, and write selected result fields into adjacent columns. The API does not process an entire spreadsheet in one request; your script manages the row loop and handles errors or rate limits.
Support and operations tools
Let staff verify an address from an internal support tool without manually copying records into the SmartLocator dashboard.
Only the API request fields need to follow SmartLocator’s contract. Map your own field names to the request and map the returned JSON fields back to your application.
6. Single API Request
Send JSON with the raw address and optional customerName. The implementation requires an address, accepts one address per request, and requires the raw address to contain at least 5 words.
curl -X POST "https://smartlocator.in/api/single-verify" \
-H "Authorization: Bearer <YOUR_API_KEY>" \
-H "Content-Type: application/json" \
-d '{
"address": "DLF Phase 1 Gurgaon 122002",
"customerName": "Ravi Kumar"
}'const response = await fetch("https://smartlocator.in/api/single-verify", {
method: "POST",
headers: {
Authorization: `Bearer ${process.env.SMART_LOCATOR_API_KEY}`,
"Content-Type": "application/json"
},
body: JSON.stringify({
address: "DLF Phase 1 Gurgaon 122002",
customerName: "Ravi Kumar"
})
});import os, requests
response = requests.post(
"https://smartlocator.in/api/single-verify",
headers={
"Authorization": f"Bearer {os.environ['SMART_LOCATOR_API_KEY']}",
"Content-Type": "application/json",
},
json={"address": "DLF Phase 1 Gurgaon 122002", "customerName": "Ravi Kumar"},
)7. Single API Response
A successful response returns cleaned customer and address components, quality classification, and remaining credits when available. The values below are illustrative; use the fields and values returned by your actual request.
{
"status": "Success",
"customerCleanName": "Ravi Kumar",
"addressLine1": "Tower A, DLF Phase 1, Gurgaon",
"landmark": "Near DLF City Club",
"district": "Gurgaon",
"state": "Haryana",
"pin": "122002",
"addressQuality": "Good",
"remainingCredits": 2488
}8. Bulk Verification (Optional)
Bulk Verification submits a file for background processing. It does not return all verified rows in the first response. Your integration must submit the file, save the returned jobId, check the job status, and then download the result file or files.
https://smartlocator.in/api/bulk-jobsA completed job can provide a Ready for Shipment CSV and a separate Manual Check Needed CSV. Download each one with its own type value. Manual Check Needed means the address needs human review; it does not automatically mean the address is invalid. If no rows need manual review, the manual output may be empty or unavailable.
Step 1 — Prepare the file
- Supported file extensions:
.csv,.xlsx, and.xls. - Maximum size by row count: up to 2,000 address rows per job.
- For CSV, send the CSV contents as a string in
csvDataand includetotalRows. - For Excel, send the original file bytes encoded as Base64 in
csvData;totalRowsis not required. - Use a filename with the correct extension. Keep the original header row and columns in the uploaded file so the processor can interpret the data.
Step 2 — Submit a CSV job
Send a JSON request from your server. Replace the example data with your own CSV text. In this example, totalRows is 1 because there is one data row after the header.
curl -X POST "https://smartlocator.in/api/bulk-jobs" \
-H "Authorization: Bearer <YOUR_API_KEY>" \
-H "Content-Type: application/json" \
-d '{
"filename": "orders.csv",
"totalRows": 1,
"csvData": "ORDER ID,CUSTOMER NAME,CUSTOMER RAW ADDRESS\\n1001,Ravi Kumar,DLF Phase 1 Gurgaon 122002"
}'
A successful submission returns a job identifier. Save this value; you will need it for status checks and downloads.
{
"status": "Success",
"jobId": "<JOB_ID>"
}
Step 3 — Check job status
https://smartlocator.in/api/bulk-jobsSend the same bearer-token authorization header. Check the response for your job and wait until its status is Completed before attempting downloads. Do not assume that a submitted job has already finished.
curl -X GET "https://smartlocator.in/api/bulk-jobs" \ -H "Authorization: Bearer <YOUR_API_KEY>"
Step 4 — Download Ready for Shipment results
Once the job is completed, request the Ready output using type=ready. The response is a CSV file, not a JSON object.
https://smartlocator.in/api/bulk-jobs?action=download&jobId=<JOB_ID>&type=readycurl -L "https://smartlocator.in/api/bulk-jobs?action=download&jobId=<JOB_ID>&type=ready" \ -H "Authorization: Bearer <YOUR_API_KEY>" \ -o ready-for-shipment.csv
Step 5 — Download Manual Check Needed results
If you need the addresses that require review, make a separate request using type=manual. Do not use type=ready for this download.
https://smartlocator.in/api/bulk-jobs?action=download&jobId=<JOB_ID>&type=manualcurl -L "https://smartlocator.in/api/bulk-jobs?action=download&jobId=<JOB_ID>&type=manual" \ -H "Authorization: Bearer <YOUR_API_KEY>" \ -o manual-check-needed.csv
Tip: You can download both files for the same jobId. Store them separately or import each into the matching tab in your own application. A download may return a not-found response if the job is not completed, the job does not belong to the authenticated client, or the requested output is not available.
Excel file submission
For an Excel file, Base64-encode the original binary file bytes, not the filename or a text export, and place that Base64 string in csvData. Example request shape:
{
"filename": "orders.xlsx",
"csvData": "<BASE64_OF_ORIGINAL_XLSX_FILE_BYTES>"
}
Encode the file in your backend before making the request. Avoid putting large file contents directly into browser code or logs.
Bulk limits and common issues
- Only one active Bulk job can run per client at a time. Wait for the existing job to finish before submitting another.
- Your account needs an active plan and sufficient verification credits.
- For CSV uploads, include
totalRowsand ensure it matches the number of address/data rows you are submitting, not the header row. - Use the exact job ID returned by submission and send the API key that owns that job.
- Do not repeatedly retry an unchanged request after an authentication, validation, plan, or credit error. Fix the reported issue first.
- Keep your API key on the server. Do not expose it in public JavaScript, mobile app bundles, or a public repository.
Quick checklist for developers
- Submit the file with
POST /api/bulk-jobs. - Save the returned
jobId. - Poll
GET /api/bulk-jobsuntil the job is completed. - Download Ready results with
type=ready. - Download Manual Check Needed results with
type=manualif needed. - Handle CSV downloads and errors separately from JSON API responses.
9. Single vs Bulk Comparison
| Capability | Single Verification | Bulk Verification |
|---|---|---|
| Best for | Custom integrations, real-time checks, and client-owned data workflows | Automated batch jobs |
| Request size | One address per request | .csv, .xlsx, or .xls content submitted as a JSON job |
| Processing | Synchronous response | Asynchronous job polling |
| Output | JSON address fields | Ready for Shipment and Manual Check Needed CSV downloads |
10. Limits, Credits, and Errors
Bulk uploads support up to 2,000 usable address rows per job. Before a Bulk job starts, the backend checks that the client has an active plan and enough credits for the submitted addresses. Only one active Bulk job can run at a time. If another job is already running, the API may return HTTP 429 until it finishes.
Handle non-2xx responses and inspect the returned JSON status and message. Errors can indicate missing or invalid authentication, a revoked or expired key, an expired plan, missing or invalid file data, insufficient credits, an unsupported file type, an active-job limit, missing download parameters, or an output that is not available yet. Do not repeatedly retry the same request without correcting the reported issue.
11. Security Best Practices
- Keep API keys secret and rotate them if exposure is suspected.
- Never expose API keys in public browser JavaScript.
- Never commit API keys to Git.
- Store API keys in environment variables or secure server-side secret storage.
- Use HTTPS for every request.
- Log request IDs and job IDs, but do not log full API keys or sensitive customer data unnecessarily.
- Handle 401 and 403 responses by stopping retries and prompting an operator to refresh credentials or plan status.
Test Lab Help & Troubleshooting
Use this section to get started with the Test Lab and troubleshoot common errors. For the endpoint request formats and full code examples, use the sections above and the Test Lab's Docs & Integration Examples tab.
1. Sign in and configure your key
- Sign in with the same SmartLocator username/email and password you use for your existing account.
- Open Settings and save your SmartLocator API key.
- Use Check connection to verify the key and account access.
- Replace or remove the saved key from Settings when required.
The Test Lab stores the key encrypted on its server and displays a masked value in the interface. Never paste a real key into a public code sample or browser-side application.
2. Test a single address
- Open Single API and enter an address that meets the API's minimum five-word requirement.
- Run the request and inspect the response and HTTP status.
- Use the returned fields in your own mapping; do not assume every optional field is present.
- If the request fails, check Diagnostics and the returned error details before retrying.
3. Run a bulk test safely
- Start with a small CSV or Excel file; supported extensions are
.csv,.xlsx, and.xls. - Keep each upload at or below 2,000 address/data rows.
- Submit once, then use the returned job ID and Job History to follow progress.
- Wait for a completed job before downloading output. Ready and Manual are separate result types.
- Check the job status before retrying after a timeout to avoid duplicate jobs and unintended credit use.
4. Diagnostics and Activity Logs
- Diagnostics keeps request history in the current browser session and shows available error details plus a suggested next step.
- Activity Logs shows sanitized Test Lab events from the rolling last 24 hours, up to 200 events.
- Logs cover activity routed through the Test Lab—not requests sent directly from your own application.
- Support reports omit request bodies and credentials, but review any report before sharing it.
- Clearing local Diagnostics history does not delete server-side activity logs or bulk jobs.
Common problems and next steps
| Message or situation | What to check next |
|---|---|
| 401 / authentication failed | Check that the Bearer token is present, current, and belongs to the intended account. Replace the key if needed; avoid repeated retries with unchanged credentials. |
| 403 / permission or plan issue | Review account access, plan status, and whether the requested operation is allowed for this client. |
| Validation error / HTTP 400 | Read the actual response message. Check required fields, JSON format, address word count, file extension, and CSV row count. |
| Insufficient credits | Check the available verification balance and estimated job cost. Reduce the test file or resolve the balance issue before submitting again. |
| Another bulk job is active | Open Job History and wait for the existing job to reach a terminal status before starting another. |
| 429 / rate limit | Reduce request frequency. For safe, retryable operations, use bounded backoff; do not blindly retry a bulk submission. |
| Job not found or download unavailable | Confirm the job belongs to the signed-in account, check the exact job ID, and wait for successful completion before requesting Ready or Manual output. |
| Timeout or 5xx response | Inspect Job History before resubmitting a bulk file. The first request may have created a job even if the response was lost. |
Authentication, permissions, plan or credit limits, file validation, job state, and temporary service errors require different actions. Use the actual HTTP status and returned error details to diagnose the cause.
12. Recommended Integration Flow
- Generate an API key from the SmartLocator client portal.
- Store the key server-side as
SMART_LOCATOR_API_KEY; never expose it in browser code. - Extract the raw address from your own order, CRM, or database record and send it as
address. PasscustomerNameonly if available and useful. - Handle the JSON response and map returned fields to your own data model.
- Handle errors, credit limits, and plan status; avoid blind retries for validation or authentication failures.
- Use the Bulk API only if you need your own software to submit and track batch files automatically. For manual spreadsheet uploads, use the dashboard.
Ready for Shipment is a verification/classification result, not a delivery guarantee. Manual Check Needed is a review signal, not an automatic invalid-address result. For a fuller integration overview, see the integration guide.