{
	"info": {
		"_postman_id": "api-gateway-collection",
		"name": "EchoVAHAN Gateway APIs",
		"description": "Complete Postman collection for API Gateway authentication, API Key usage, and vehicle services (Vahan, Sarthi, EChallan, FASTag, GST, EWayBill) in both Production and Staging modes.",
		"schema": "https://schema.getpostman.com/json/collection/v2.1.0/collection.json"
	},
	"variable": [
		{
			"key": "baseUrl",
			"value": "https://api.echoweb.in",
			"type": "string"
		},
		{
			"key": "apiKey",
			"value": "YOUR_API_KEY_HERE",
			"type": "string"
		},
		{
			"key": "bearerToken",
			"value": "",
			"type": "string"
		}
	],
	"item": [
		{
			"name": "Authentication & Tokens",
			"item": [
				{
					"name": "Generate Bearer Access Token (via API Key)",
					"event": [
						{
							"listen": "test",
							"script": {
								"exec": [
									"var jsonData = pm.response.json();",
									"if (jsonData.token) {",
									"    pm.collectionVariables.set('bearerToken', jsonData.token);",
									"}"
								],
								"type": "text/javascript"
							}
						}
					],
					"request": {
						"method": "POST",
						"header": [
							{
								"key": "Content-Type",
								"value": "application/json"
							}
						],
						"body": {
							"mode": "raw",
							"raw": "{\n  \"apiKey\": \"{{apiKey}}\"\n}"
						},
						"url": {
							"raw": "{{baseUrl}}/api/auth/token",
							"host": [
								"{{baseUrl}}"
							],
							"path": [
								"api",
								"auth",
								"token"
							]
						},
						"description": "Exchanges an active API key for a 1-hour JWT Bearer token."
					}
				},
				{
					"name": "Generate Bearer Access Token (via Client Credentials)",
					"event": [
						{
							"listen": "test",
							"script": {
								"exec": [
									"var jsonData = pm.response.json();",
									"if (jsonData.token) {",
									"    pm.collectionVariables.set('bearerToken', jsonData.token);",
									"}"
								],
								"type": "text/javascript"
							}
						}
					],
					"request": {
						"method": "POST",
						"header": [
							{
								"key": "Content-Type",
								"value": "application/json"
							}
						],
						"body": {
							"mode": "raw",
							"raw": "{\n  \"username\": \"client_username\",\n  \"password\": \"client_password\"\n}"
						},
						"url": {
							"raw": "{{baseUrl}}/api/auth/token",
							"host": [
								"{{baseUrl}}"
							],
							"path": [
								"api",
								"auth",
								"token"
							]
						},
						"description": "Exchanges client login credentials for a 1-hour JWT Bearer token."
					}
				}
			]
		},
		{
			"name": "Vahan Services",
			"item": [
				{
					"name": "Vahan Vehicle Details (Production)",
					"request": {
						"method": "POST",
						"header": [
							{
								"key": "x-api-key",
								"value": "{{apiKey}}",
								"type": "text"
							},
							{
								"key": "Content-Type",
								"value": "application/json"
							}
						],
						"body": {
							"mode": "raw",
							"raw": "{\n  \"vehicleNumber\": \"DL01AB1234\"\n}"
						},
						"url": {
							"raw": "{{baseUrl}}/api/v1/vahan/check",
							"host": [
								"{{baseUrl}}"
							],
							"path": [
								"api",
								"v1",
								"vahan",
								"check"
							]
						}
					}
				},
				{
					"name": "Vahan Vehicle Details (Staging Sandbox)",
					"request": {
						"method": "POST",
						"header": [
							{
								"key": "x-api-key",
								"value": "{{apiKey}}",
								"type": "text"
							},
							{
								"key": "Content-Type",
								"value": "application/json"
							}
						],
						"body": {
							"mode": "raw",
							"raw": "{\n  \"vehicleNumber\": \"DL01AB1234\"\n}"
						},
						"url": {
							"raw": "{{baseUrl}}/api/v1/vahan/check?env=staging",
							"host": [
								"{{baseUrl}}"
							],
							"path": [
								"api",
								"v1",
								"vahan",
								"check"
							],
							"query": [
								{
									"key": "env",
									"value": "staging"
								}
							]
						}
					}
				}
			]
		},
		{
			"name": "Sarthi (DL) Services",
			"item": [
				{
					"name": "Sarthi Driving License Details (Production)",
					"request": {
						"method": "POST",
						"header": [
							{
								"key": "x-api-key",
								"value": "{{apiKey}}",
								"type": "text"
							},
							{
								"key": "Content-Type",
								"value": "application/json"
							}
						],
						"body": {
							"mode": "raw",
							"raw": "{\n  \"dlNumber\": \"DL-1420110012345\",\n  \"dob\": \"1990-01-01\"\n}"
						},
						"url": {
							"raw": "{{baseUrl}}/api/v1/sarthi/check",
							"host": [
								"{{baseUrl}}"
							],
							"path": [
								"api",
								"v1",
								"sarthi",
								"check"
							]
						}
					}
				},
				{
					"name": "Sarthi Driving License Details (Staging Sandbox)",
					"request": {
						"method": "POST",
						"header": [
							{
								"key": "x-api-key",
								"value": "{{apiKey}}",
								"type": "text"
							},
							{
								"key": "Content-Type",
								"value": "application/json"
							}
						],
						"body": {
							"mode": "raw",
							"raw": "{\n  \"dlNumber\": \"DL01 20200000001\"\n}"
						},
						"url": {
							"raw": "{{baseUrl}}/api/v1/sarthi/check?env=staging",
							"host": [
								"{{baseUrl}}"
							],
							"path": [
								"api",
								"v1",
								"sarthi",
								"check"
							],
							"query": [
								{
									"key": "env",
									"value": "staging"
								}
							]
						}
					}
				}
			]
		},
		{
			"name": "EChallan Services",
			"item": [
				{
					"name": "EChallan Check (Production)",
					"request": {
						"method": "POST",
						"header": [
							{
								"key": "x-api-key",
								"value": "{{apiKey}}",
								"type": "text"
							},
							{
								"key": "Content-Type",
								"value": "application/json"
							}
						],
						"body": {
							"mode": "raw",
							"raw": "{\n  \"vehicleNumber\": \"DL01AB1234\"\n}"
						},
						"url": {
							"raw": "{{baseUrl}}/api/v1/echallan/check",
							"host": [
								"{{baseUrl}}"
							],
							"path": [
								"api",
								"v1",
								"echallan",
								"check"
							]
						}
					}
				},
				{
					"name": "EChallan Check (Staging Sandbox)",
					"request": {
						"method": "POST",
						"header": [
							{
								"key": "x-api-key",
								"value": "{{apiKey}}",
								"type": "text"
							},
							{
								"key": "Content-Type",
								"value": "application/json"
							}
						],
						"body": {
							"mode": "raw",
							"raw": "{\n  \"vehicleNumber\": \"DL01AB1234\"\n}"
						},
						"url": {
							"raw": "{{baseUrl}}/api/v1/echallan/check?env=staging",
							"host": [
								"{{baseUrl}}"
							],
							"path": [
								"api",
								"v1",
								"echallan",
								"check"
							],
							"query": [
								{
									"key": "env",
									"value": "staging"
								}
							]
						}
					}
				}
			]
		},
		{
			"name": "FASTag Services",
			"item": [
				{
					"name": "FASTag Status Check (Production)",
					"request": {
						"method": "POST",
						"header": [
							{
								"key": "x-api-key",
								"value": "{{apiKey}}",
								"type": "text"
							},
							{
								"key": "Content-Type",
								"value": "application/json"
							}
						],
						"body": {
							"mode": "raw",
							"raw": "{\n  \"vehicleNumber\": \"DL01AB1234\"\n}"
						},
						"url": {
							"raw": "{{baseUrl}}/api/v1/fastag/check",
							"host": [
								"{{baseUrl}}"
							],
							"path": [
								"api",
								"v1",
								"fastag",
								"check"
							]
						}
					}
				},
				{
					"name": "FASTag Status Check (Staging Sandbox)",
					"request": {
						"method": "POST",
						"header": [
							{
								"key": "x-api-key",
								"value": "{{apiKey}}",
								"type": "text"
							},
							{
								"key": "Content-Type",
								"value": "application/json"
							}
						],
						"body": {
							"mode": "raw",
							"raw": "{\n  \"vehicleNumber\": \"HR38Y5797\"\n}"
						},
						"url": {
							"raw": "{{baseUrl}}/api/v1/fastag/check?env=staging",
							"host": [
								"{{baseUrl}}"
							],
							"path": [
								"api",
								"v1",
								"fastag",
								"check"
							],
							"query": [
								{
									"key": "env",
									"value": "staging"
								}
							]
						}
					}
				}
			]
		},
		{
			"name": "GST Services",
			"item": [
				{
					"name": "GSTIN Verification (Production)",
					"request": {
						"method": "POST",
						"header": [
							{
								"key": "x-api-key",
								"value": "{{apiKey}}",
								"type": "text"
							},
							{
								"key": "Content-Type",
								"value": "application/json"
							}
						],
						"body": {
							"mode": "raw",
							"raw": "{\n  \"gstin\": \"07AAAAA0000A1Z5\"\n}"
						},
						"url": {
							"raw": "{{baseUrl}}/api/v1/gst/check",
							"host": [
								"{{baseUrl}}"
							],
							"path": [
								"api",
								"v1",
								"gst",
								"check"
							]
						}
					}
				},
				{
					"name": "GSTIN Verification (Staging Sandbox)",
					"request": {
						"method": "POST",
						"header": [
							{
								"key": "x-api-key",
								"value": "{{apiKey}}",
								"type": "text"
							},
							{
								"key": "Content-Type",
								"value": "application/json"
							}
						],
						"body": {
							"mode": "raw",
							"raw": "{\n  \"gstin\": \"07AAAAA0000A1Z5\"\n}"
						},
						"url": {
							"raw": "{{baseUrl}}/api/v1/gst/check?env=staging",
							"host": [
								"{{baseUrl}}"
							],
							"path": [
								"api",
								"v1",
								"gst",
								"check"
							],
							"query": [
								{
									"key": "env",
									"value": "staging"
								}
							]
						}
					}
				}
			]
		},
		{
			"name": "EWayBill Services",
			"item": [
				{
					"name": "EWayBill Details (Production)",
					"request": {
						"method": "POST",
						"header": [
							{
								"key": "x-api-key",
								"value": "{{apiKey}}",
								"type": "text"
							},
							{
								"key": "Content-Type",
								"value": "application/json"
							}
						],
						"body": {
							"mode": "raw",
							"raw": "{\n  \"ewbNo\": \"123456789012\"\n}"
						},
						"url": {
							"raw": "{{baseUrl}}/api/v1/ewaybill/check",
							"host": [
								"{{baseUrl}}"
							],
							"path": [
								"api",
								"v1",
								"ewaybill",
								"check"
							]
						}
					}
				},
				{
					"name": "EWayBill Details (Staging Sandbox)",
					"request": {
						"method": "POST",
						"header": [
							{
								"key": "x-api-key",
								"value": "{{apiKey}}",
								"type": "text"
							},
							{
								"key": "Content-Type",
								"value": "application/json"
							}
						],
						"body": {
							"mode": "raw",
							"raw": "{\n  \"ewbNo\": \"123456789012\"\n}"
						},
						"url": {
							"raw": "{{baseUrl}}/api/v1/ewaybill/check?env=staging",
							"host": [
								"{{baseUrl}}"
							],
							"path": [
								"api",
								"v1",
								"ewaybill",
								"check"
							],
							"query": [
								{
									"key": "env",
									"value": "staging"
								}
							]
						}
					}
				}
			]
		}
	]
}
