{
  "info": {
    "name": "Skyfleet API",
    "description": "Skyfleet freight-aggregator REST API for custom merchant integrations.\n\nSetup:\n1. In the Skyfleet dashboard, go to Settings → Developer → API Keys and create a key (sf_live_...).\n2. In this collection's Variables tab, set `api_key` to that value.\n3. `base_url` defaults to production; change it if you're pointed elsewhere.\n\nAuth is sent automatically as the `X-API-Key` header on every request (collection-level auth). Full docs: https://www.skyfleetnow.com/developers\n\nTroubleshooting — if you get {\"success\":false,\"message\":\"Access token required\"}: the X-API-Key header didn't reach the server. (1) Use https://api.skyfleetnow.com, NOT http:// (the http URL 301-redirects and most clients drop custom headers on redirect). (2) No trailing slash. (3) Send X-API-Key on every request. (4) Exact header name X-API-Key.\n\ncarrierId values (pass in book body): Air — bluedart-air, delhivery-air, dtdc-air, xpressbees-air. Surface — bluedart-surface, delhivery-surface, dtdc-surface, xpressbees-surface, ekart-surface, amazon-surface, professional-surface, shadowfax-surface. Best practice: take carrierId from POST /rates/calculate for the lane (availability varies by route + merchant).",
    "schema": "https://schema.getpostman.com/json/collection/v2.1.0/collection.json"
  },
  "variable": [
    { "key": "base_url", "value": "https://api.skyfleetnow.com/api/v1", "type": "string" },
    { "key": "api_key", "value": "sf_live_REPLACE_ME", "type": "string" },
    { "key": "shipment_id", "value": "", "type": "string" },
    { "key": "awb", "value": "", "type": "string" },
    { "key": "ndr_event_id", "value": "", "type": "string" },
    { "key": "channel_order_id", "value": "", "type": "string" },
    { "key": "integration_id", "value": "", "type": "string" }
  ],
  "auth": {
    "type": "apikey",
    "apikey": [
      { "key": "key", "value": "X-API-Key", "type": "string" },
      { "key": "value", "value": "{{api_key}}", "type": "string" },
      { "key": "in", "value": "header", "type": "string" }
    ]
  },
  "item": [
    {
      "name": "Rates",
      "item": [
        {
          "name": "Calculate rates",
          "request": {
            "method": "POST",
            "header": [{ "key": "Content-Type", "value": "application/json" }],
            "url": { "raw": "{{base_url}}/rates/calculate", "host": ["{{base_url}}"], "path": ["rates", "calculate"] },
            "body": { "mode": "raw", "raw": "{\n  \"pickupPincode\": \"110011\",\n  \"dropPincode\": \"400001\",\n  \"weightGrams\": 500,\n  \"paymentMode\": \"PREPAID\",\n  \"lengthCm\": 20,\n  \"breadthCm\": 15,\n  \"heightCm\": 10,\n  \"invoiceValue\": 1499\n}" }
          }
        },
        {
          "name": "Serviceability (detailed)",
          "request": {
            "method": "GET",
            "header": [],
            "url": { "raw": "{{base_url}}/rates/serviceability/detailed?pickup=110011&drop=400001&serviceType=FORWARD", "host": ["{{base_url}}"], "path": ["rates", "serviceability", "detailed"], "query": [{ "key": "pickup", "value": "110011" }, { "key": "drop", "value": "400001" }, { "key": "serviceType", "value": "FORWARD" }] }
          }
        },
        {
          "name": "Classify zone",
          "request": {
            "method": "GET",
            "header": [],
            "url": { "raw": "{{base_url}}/rates/classify?pickup=110011&drop=400001", "host": ["{{base_url}}"], "path": ["rates", "classify"], "query": [{ "key": "pickup", "value": "110011" }, { "key": "drop", "value": "400001" }] }
          }
        }
      ]
    },
    {
      "name": "Shipments",
      "item": [
        {
          "name": "Create shipment (draft)",
          "request": {
            "method": "POST",
            "header": [{ "key": "Content-Type", "value": "application/json" }],
            "url": { "raw": "{{base_url}}/shipments", "host": ["{{base_url}}"], "path": ["shipments"] },
            "body": { "mode": "raw", "raw": "{\n  \"shipmentType\": \"FORWARD\",\n  \"paymentMode\": \"COD\",\n  \"orderReferenceNumber\": \"ORD-1042\",\n  \"invoiceValue\": 1499,\n  \"codAmount\": 1499,\n  \"pickup\": {\n    \"name\": \"Acme Warehouse\",\n    \"phone\": \"9876543210\",\n    \"address\": \"Plot 4, Industrial Area\",\n    \"city\": \"New Delhi\",\n    \"state\": \"Delhi\",\n    \"pincode\": \"110011\"\n  },\n  \"drop\": {\n    \"name\": \"Ravi Kumar\",\n    \"phone\": \"9812345678\",\n    \"address\": \"12 MG Road\",\n    \"city\": \"Mumbai\",\n    \"state\": \"Maharashtra\",\n    \"pincode\": \"400001\"\n  },\n  \"packages\": [\n    {\n      \"weightGrams\": 500,\n      \"lengthCm\": 20,\n      \"breadthCm\": 15,\n      \"heightCm\": 10,\n      \"items\": [\n        { \"name\": \"Cotton T-Shirt\", \"sku\": \"TS-01\", \"quantity\": 1, \"unitPrice\": 1499 }\n      ]\n    }\n  ]\n}" }
          }
        },
        {
          "name": "Book shipment",
          "request": {
            "method": "POST",
            "header": [{ "key": "Content-Type", "value": "application/json" }],
            "url": { "raw": "{{base_url}}/shipments/{{shipment_id}}/book", "host": ["{{base_url}}"], "path": ["shipments", "{{shipment_id}}", "book"] },
            "body": { "mode": "raw", "raw": "{\n  \"carrierBrand\": \"DELHIVERY\"\n}" }
          }
        },
        {
          "name": "List shipments",
          "request": {
            "method": "GET",
            "header": [],
            "url": { "raw": "{{base_url}}/shipments?page=1&limit=20", "host": ["{{base_url}}"], "path": ["shipments"], "query": [{ "key": "page", "value": "1" }, { "key": "limit", "value": "20" }, { "key": "status", "value": "IN_TRANSIT", "disabled": true }] }
          }
        },
        {
          "name": "Get shipment",
          "request": {
            "method": "GET",
            "header": [],
            "url": { "raw": "{{base_url}}/shipments/{{shipment_id}}", "host": ["{{base_url}}"], "path": ["shipments", "{{shipment_id}}"] }
          }
        },
        {
          "name": "Edit draft",
          "request": {
            "method": "PATCH",
            "header": [{ "key": "Content-Type", "value": "application/json" }],
            "url": { "raw": "{{base_url}}/shipments/{{shipment_id}}", "host": ["{{base_url}}"], "path": ["shipments", "{{shipment_id}}"] },
            "body": { "mode": "raw", "raw": "{\n  \"remarks\": \"Handle with care\"\n}" }
          }
        },
        {
          "name": "Cancel shipment",
          "request": {
            "method": "POST",
            "header": [{ "key": "Content-Type", "value": "application/json" }],
            "url": { "raw": "{{base_url}}/shipments/{{shipment_id}}/cancel", "host": ["{{base_url}}"], "path": ["shipments", "{{shipment_id}}", "cancel"] },
            "body": { "mode": "raw", "raw": "{\n  \"reason\": \"Customer cancelled\"\n}" }
          }
        },
        {
          "name": "Label PDF (Skyfleet-branded, redirects to file)",
          "request": {
            "method": "GET",
            "header": [],
            "url": { "raw": "{{base_url}}/shipments/{{shipment_id}}/label.pdf", "host": ["{{base_url}}"], "path": ["shipments", "{{shipment_id}}", "label.pdf"] },
            "description": "Stable label link returned as `labelUrl` in booking/shipment responses. Requires X-API-Key; 302-redirects to the Skyfleet-branded PDF."
          }
        },
        {
          "name": "Label URL (presigned JSON)",
          "request": {
            "method": "GET",
            "header": [],
            "url": { "raw": "{{base_url}}/shipments/{{shipment_id}}/label-url", "host": ["{{base_url}}"], "path": ["shipments", "{{shipment_id}}", "label-url"] }
          }
        },
        {
          "name": "Invoice URL",
          "request": {
            "method": "GET",
            "header": [],
            "url": { "raw": "{{base_url}}/shipments/{{shipment_id}}/invoice-url", "host": ["{{base_url}}"], "path": ["shipments", "{{shipment_id}}", "invoice-url"] }
          }
        },
        {
          "name": "Bulk download (labels/invoices)",
          "request": {
            "method": "POST",
            "header": [{ "key": "Content-Type", "value": "application/json" }],
            "url": { "raw": "{{base_url}}/shipments/bulk-download", "host": ["{{base_url}}"], "path": ["shipments", "bulk-download"] },
            "body": { "mode": "raw", "raw": "{\n  \"shipmentIds\": [\"{{shipment_id}}\"],\n  \"type\": \"labels\"\n}" }
          }
        }
      ]
    },
    {
      "name": "Sales Channel Orders",
      "item": [
        {
          "name": "List channel orders",
          "request": {
            "method": "GET",
            "header": [],
            "url": { "raw": "{{base_url}}/channels/orders?status=NEW&page=1&limit=20", "host": ["{{base_url}}"], "path": ["channels", "orders"], "query": [{ "key": "status", "value": "NEW" }, { "key": "page", "value": "1" }, { "key": "limit", "value": "20" }, { "key": "integrationId", "value": "", "disabled": true }] }
          }
        },
        {
          "name": "List connected channels",
          "request": { "method": "GET", "header": [], "url": { "raw": "{{base_url}}/channels", "host": ["{{base_url}}"], "path": ["channels"] } }
        },
        {
          "name": "Channel order stats",
          "request": { "method": "GET", "header": [], "url": { "raw": "{{base_url}}/channels/orders/stats", "host": ["{{base_url}}"], "path": ["channels", "orders", "stats"] } }
        },
        {
          "name": "Book one channel order (import + book)",
          "request": {
            "method": "POST",
            "header": [{ "key": "Content-Type", "value": "application/json" }],
            "url": { "raw": "{{base_url}}/channels/orders/{{channel_order_id}}/book", "host": ["{{base_url}}"], "path": ["channels", "orders", "{{channel_order_id}}", "book"] },
            "body": { "mode": "raw", "raw": "{\n  \"carrierId\": \"bluedart-air\"\n}" }
          }
        },
        {
          "name": "Import one channel order → shipment",
          "request": {
            "method": "POST",
            "header": [],
            "url": { "raw": "{{base_url}}/channels/orders/{{channel_order_id}}/import", "host": ["{{base_url}}"], "path": ["channels", "orders", "{{channel_order_id}}", "import"] }
          }
        },
        {
          "name": "Bulk import channel orders",
          "request": {
            "method": "POST",
            "header": [{ "key": "Content-Type", "value": "application/json" }],
            "url": { "raw": "{{base_url}}/channels/orders/bulk-import", "host": ["{{base_url}}"], "path": ["channels", "orders", "bulk-import"] },
            "body": { "mode": "raw", "raw": "{\n  \"orderIds\": [\"{{channel_order_id}}\"],\n  \"mode\": \"book\"\n}" }
          }
        },
        {
          "name": "Skip a channel order",
          "request": {
            "method": "POST",
            "header": [],
            "url": { "raw": "{{base_url}}/channels/orders/{{channel_order_id}}/skip", "host": ["{{base_url}}"], "path": ["channels", "orders", "{{channel_order_id}}", "skip"] }
          }
        },
        {
          "name": "Enable auto-create (PATCH integration)",
          "request": {
            "method": "PATCH",
            "header": [{ "key": "Content-Type", "value": "application/json" }],
            "url": { "raw": "{{base_url}}/channels/{{integration_id}}", "host": ["{{base_url}}"], "path": ["channels", "{{integration_id}}"] },
            "body": { "mode": "raw", "raw": "{\n  \"autoCreateShipments\": true,\n  \"defaultPickupAddressId\": \"addr_123\",\n  \"defaultPaymentMode\": \"COD\",\n  \"defaultWeightGrams\": 500,\n  \"initialSyncDays\": 30\n}" }
          }
        }
      ]
    },
    {
      "name": "Tracking",
      "item": [
        {
          "name": "Track by AWB (authenticated)",
          "request": {
            "method": "GET",
            "header": [],
            "url": { "raw": "{{base_url}}/shipments/{{awb}}/track", "host": ["{{base_url}}"], "path": ["shipments", "{{awb}}", "track"] }
          }
        },
        {
          "name": "Public tracking (no auth)",
          "request": {
            "auth": { "type": "noauth" },
            "method": "GET",
            "header": [],
            "url": { "raw": "{{base_url}}/public/track/{{awb}}", "host": ["{{base_url}}"], "path": ["public", "track", "{{awb}}"] }
          }
        }
      ]
    },
    {
      "name": "COD",
      "item": [
        {
          "name": "Remittances",
          "request": {
            "method": "GET",
            "header": [],
            "url": { "raw": "{{base_url}}/cod/remittances?page=1&limit=20", "host": ["{{base_url}}"], "path": ["cod", "remittances"], "query": [{ "key": "page", "value": "1" }, { "key": "limit", "value": "20" }, { "key": "status", "value": "PROCESSING", "disabled": true }] }
          }
        },
        {
          "name": "Remittance schedule",
          "request": { "method": "GET", "header": [], "url": { "raw": "{{base_url}}/cod/remittance-schedule", "host": ["{{base_url}}"], "path": ["cod", "remittance-schedule"] } }
        },
        {
          "name": "Eligible COD",
          "request": { "method": "GET", "header": [], "url": { "raw": "{{base_url}}/cod/eligible", "host": ["{{base_url}}"], "path": ["cod", "eligible"] } }
        },
        {
          "name": "Upcoming COD",
          "request": { "method": "GET", "header": [], "url": { "raw": "{{base_url}}/cod/upcoming", "host": ["{{base_url}}"], "path": ["cod", "upcoming"] } }
        },
        {
          "name": "COD transactions",
          "request": {
            "method": "GET",
            "header": [],
            "url": { "raw": "{{base_url}}/cod/transactions?page=1&limit=20", "host": ["{{base_url}}"], "path": ["cod", "transactions"], "query": [{ "key": "page", "value": "1" }, { "key": "limit", "value": "20" }] }
          }
        }
      ]
    },
    {
      "name": "Wallet",
      "item": [
        { "name": "Balance", "request": { "method": "GET", "header": [], "url": { "raw": "{{base_url}}/wallet", "host": ["{{base_url}}"], "path": ["wallet"] } } },
        { "name": "Config", "request": { "method": "GET", "header": [], "url": { "raw": "{{base_url}}/wallet/config", "host": ["{{base_url}}"], "path": ["wallet", "config"] } } },
        {
          "name": "Transactions",
          "request": {
            "method": "GET",
            "header": [],
            "url": { "raw": "{{base_url}}/wallet/transactions?page=1&limit=20", "host": ["{{base_url}}"], "path": ["wallet", "transactions"], "query": [{ "key": "page", "value": "1" }, { "key": "limit", "value": "20" }, { "key": "category", "value": "orders", "disabled": true }] }
          }
        }
      ]
    },
    {
      "name": "NDR",
      "item": [
        {
          "name": "List NDRs",
          "request": {
            "method": "GET",
            "header": [],
            "url": { "raw": "{{base_url}}/ndr?page=1&limit=20", "host": ["{{base_url}}"], "path": ["ndr"], "query": [{ "key": "page", "value": "1" }, { "key": "limit", "value": "20" }, { "key": "status", "value": "PENDING", "disabled": true }] }
          }
        },
        {
          "name": "Take NDR action",
          "request": {
            "method": "POST",
            "header": [{ "key": "Content-Type", "value": "application/json" }],
            "url": { "raw": "{{base_url}}/ndr/action", "host": ["{{base_url}}"], "path": ["ndr", "action"] },
            "body": { "mode": "raw", "raw": "{\n  \"ndrEventId\": \"{{ndr_event_id}}\",\n  \"action\": \"REATTEMPT\",\n  \"preferredDate\": \"2026-07-12\",\n  \"notes\": \"Customer available after 5pm\"\n}" }
          }
        }
      ]
    },
    {
      "name": "Returns (RVP)",
      "item": [
        {
          "name": "Create reverse pickup from forward",
          "request": {
            "method": "POST",
            "header": [{ "key": "Content-Type", "value": "application/json" }],
            "url": { "raw": "{{base_url}}/rvp/from-forward", "host": ["{{base_url}}"], "path": ["rvp", "from-forward"] },
            "body": { "mode": "raw", "raw": "{\n  \"forwardAwb\": \"{{awb}}\",\n  \"isQcRequired\": false,\n  \"reasonForReturn\": \"Size mismatch\"\n}" }
          }
        },
        {
          "name": "List reverse pickups",
          "request": {
            "method": "GET",
            "header": [],
            "url": { "raw": "{{base_url}}/rvp?page=1&limit=20", "host": ["{{base_url}}"], "path": ["rvp"], "query": [{ "key": "page", "value": "1" }, { "key": "limit", "value": "20" }] }
          }
        }
      ]
    },
    {
      "name": "Webhooks",
      "item": [
        { "name": "List subscriptions", "request": { "method": "GET", "header": [], "url": { "raw": "{{base_url}}/webhooks", "host": ["{{base_url}}"], "path": ["webhooks"] } } },
        {
          "name": "Create subscription",
          "request": {
            "method": "POST",
            "header": [{ "key": "Content-Type", "value": "application/json" }],
            "url": { "raw": "{{base_url}}/webhooks", "host": ["{{base_url}}"], "path": ["webhooks"] },
            "body": { "mode": "raw", "raw": "{\n  \"name\": \"Production listener\",\n  \"url\": \"https://your-server.com/skyfleet-webhook\",\n  \"events\": [\"shipment.picked_up\", \"shipment.delivered\", \"shipment.rto_delivered\"]\n}" }
          }
        }
      ]
    }
  ]
}
