{
  "info": {
    "name": "Anayer Connect",
    "_postman_id": "29fd2841-1f75-4b86-ae4e-6d0d8f8e1001",
    "schema": "https://schema.getpostman.com/json/collection/v2.1.0/collection.json",
    "description": "Starter Postman collection for Anayer Connect business API endpoints."
  },
  "variable": [
    { "key": "base_url", "value": "https://www.anayer.com" },
    { "key": "client_id", "value": "" },
    { "key": "client_secret", "value": "" },
    { "key": "access_token", "value": "" },
    { "key": "account_id", "value": "" },
    { "key": "trip_id", "value": "" },
    { "key": "delivery_id", "value": "" },
    { "key": "user_id", "value": "" }
  ],
  "item": [
    {
      "name": "OAuth Token",
      "request": {
        "method": "POST",
        "header": [{ "key": "Content-Type", "value": "application/json" }],
        "body": {
          "mode": "raw",
          "raw": "{\n  \"client_id\": \"{{client_id}}\",\n  \"client_secret\": \"{{client_secret}}\",\n  \"grant_type\": \"client_credentials\"\n}"
        },
        "url": "{{base_url}}/oauth/token.php"
      }
    },
    {
      "name": "Create Trip",
      "request": {
        "method": "POST",
        "header": [
          { "key": "Content-Type", "value": "application/json" },
          { "key": "Authorization", "value": "Bearer {{access_token}}" }
        ],
        "body": {
          "mode": "raw",
          "raw": "{\n  \"account_id\": \"{{account_id}}\",\n  \"rider\": {\n    \"name\": \"John Smith\",\n    \"phone\": \"+13105550101\"\n  },\n  \"pickup\": {\n    \"address\": \"449 Fern Dell Pl, Los Angeles, CA\",\n    \"lat\": 34.1052,\n    \"lng\": -118.3078\n  },\n  \"dropoff\": {\n    \"address\": \"Los Angeles International Airport\",\n    \"lat\": 33.9416,\n    \"lng\": -118.4085\n  },\n  \"service_type\": \"corporate_ride\",\n  \"vehicle_type\": \"standard\",\n  \"scheduled_time\": \"2026-06-01T09:30:00-07:00\",\n  \"payment_type\": \"corporate_account\",\n  \"cost_center\": \"TRAVEL-2026\",\n  \"reference_id\": \"SAP-REQ-900144\"\n}"
        },
        "url": "{{base_url}}/business/trips.php"
      }
    },
    {
      "name": "Create Delivery",
      "request": {
        "method": "POST",
        "header": [
          { "key": "Content-Type", "value": "application/json" },
          { "key": "Authorization", "value": "Bearer {{access_token}}" }
        ],
        "body": {
          "mode": "raw",
          "raw": "{\n  \"account_id\": \"{{account_id}}\",\n  \"pickup\": {\n    \"business_name\": \"ABC Pharmacy\",\n    \"address\": \"100 Main St, Los Angeles, CA\",\n    \"contact_name\": \"Store Manager\",\n    \"contact_phone\": \"+13105550111\",\n    \"lat\": 34.1001,\n    \"lng\": -118.3201\n  },\n  \"dropoff\": {\n    \"recipient_name\": \"Mary Johnson\",\n    \"address\": \"200 Oak St, Los Angeles, CA\",\n    \"phone\": \"+13105550999\",\n    \"lat\": 34.0801,\n    \"lng\": -118.3001\n  },\n  \"package\": {\n    \"type\": \"document\",\n    \"weight_lbs\": 2,\n    \"description\": \"Legal documents\",\n    \"requires_signature\": true\n  },\n  \"reference_id\": \"ERP-DEL-55421\"\n}"
        },
        "url": "{{base_url}}/business/deliveries.php"
      }
    },
    {
      "name": "Fare Estimate",
      "request": {
        "method": "POST",
        "header": [
          { "key": "Content-Type", "value": "application/json" },
          { "key": "Authorization", "value": "Bearer {{access_token}}" }
        ],
        "body": {
          "mode": "raw",
          "raw": "{\n  \"service_type\": \"ride\",\n  \"pickup_lat\": 34.1052,\n  \"pickup_lng\": -118.3078,\n  \"dropoff_lat\": 33.9416,\n  \"dropoff_lng\": -118.4085,\n  \"vehicle_type\": \"standard\"\n}"
        },
        "url": "{{base_url}}/business/estimate.php"
      }
    },
    {
      "name": "List Invoices",
      "request": {
        "method": "GET",
        "header": [{ "key": "Authorization", "value": "Bearer {{access_token}}" }],
        "url": "{{base_url}}/business/invoices.php?account_id={{account_id}}"
      }
    }
  ]
}
