{
  "info": {
    "_postman_id": "totala-textiles-google-sheets-api",
    "name": "Totala Textiles - Google Sheets APIs",
    "description": "Protected Laravel APIs to append invoice and arbitrary JSON data directly to Google Sheets with Static Bearer Token Authentication.",
    "schema": "https://schema.getpostman.com/json/collection/v2.1.0/collection.json"
  },
  "auth": {
    "type": "bearer",
    "bearer": [
      {
        "key": "token",
        "value": "{{bearer_token}}",
        "type": "string"
      }
    ]
  },
  "variable": [
    {
      "key": "base_url",
      "value": "http://127.0.0.1:8000",
      "type": "string"
    },
    {
      "key": "bearer_token",
      "value": "tt_sec_b4ace95cb73b7d655a867b96266ff58e2954663753830d12",
      "type": "string"
    }
  ],
  "item": [
    {
      "name": "1. Append / Upsert Invoice (34 Columns including FY)",
      "request": {
        "method": "POST",
        "header": [
          {
            "key": "Content-Type",
            "value": "application/json"
          }
        ],
        "body": {
          "mode": "raw",
          "raw": "{\n  \"firm_name\": \"Totala Textiles Ltd\",\n  \"invoice_no\": \"INV-2026-001\",\n  \"invoice_date\": \"2026-08-17\",\n  \"transport\": \"V-Trans Logistics\",\n  \"lr_no\": \"LR-987654\",\n  \"lr_date\": \"2026-08-16\",\n  \"buyer\": \"Raymond Retailers\",\n  \"consignee\": \"Raymond Central Hub\",\n  \"agent_name\": \"Apex Agencies\",\n  \"agent_indent_no\": \"IND-1002\",\n  \"sale_cont_no\": \"SC-5021\",\n  \"payment_terms\": \"LC 45 Days\",\n  \"payment_days\": \"45\",\n  \"due_date\": \"2026-10-01\",\n  \"party_cont\": \"+919876543210\",\n  \"challan_no\": \"CH-4412\",\n  \"buyer_product\": \"Premium Cotton 60s\",\n  \"sort\": \"S-104\",\n  \"roll_bales\": \"12\",\n  \"pcs\": \"60\",\n  \"quantity\": \"1200\",\n  \"uom\": \"Mtr\",\n  \"rate\": \"150.00\",\n  \"amount\": \"180000.00\",\n  \"addition_head\": \"Freight Charges\",\n  \"addition_amount\": \"2500.00\",\n  \"deduction_head\": \"Special Discount\",\n  \"deduction_amount\": \"1000.00\",\n  \"igst\": \"9075.00\",\n  \"cgst\": \"0.00\",\n  \"sgst\": \"0.00\",\n  \"ro\": \"0.00\",\n  \"total\": \"190575.00\",\n  \"fy\": \"2026-2027\"\n}"
        },
        "url": {
          "raw": "{{base_url}}/api/invoices",
          "host": [
            "{{base_url}}"
          ],
          "path": [
            "api",
            "invoices"
          ]
        }
      }
    },
    {
      "name": "2. Append Bulk Invoices (Batch Sync)",
      "request": {
        "method": "POST",
        "header": [
          {
            "key": "Content-Type",
            "value": "application/json"
          }
        ],
        "body": {
          "mode": "raw",
          "raw": "{\n  \"data\": [\n    {\n      \"firm_name\": \"Totala Textiles Ltd\",\n      \"invoice_no\": \"INV-2026-002\",\n      \"invoice_date\": \"2026-08-17\",\n      \"transport\": \"Navkar Roadlines\",\n      \"lr_no\": \"LR-112233\",\n      \"lr_date\": \"2026-08-17\",\n      \"buyer\": \"Siyaram Silk Mills\",\n      \"consignee\": \"Siyaram Warehouse\",\n      \"agent_name\": \"Kumar Brothers\",\n      \"agent_indent_no\": \"IND-1003\",\n      \"sale_cont_no\": \"SC-5022\",\n      \"payment_terms\": \"Credit\",\n      \"payment_days\": \"30\",\n      \"due_date\": \"2026-09-16\",\n      \"party_cont\": \"+919811223344\",\n      \"challan_no\": \"CH-4413\",\n      \"buyer_product\": \"Polyester Viscose\",\n      \"sort\": \"PV-201\",\n      \"roll_bales\": \"10\",\n      \"pcs\": \"50\",\n      \"quantity\": \"1000\",\n      \"uom\": \"Mtr\",\n      \"rate\": \"120.00\",\n      \"amount\": \"120000.00\",\n      \"addition_head\": \"Packing\",\n      \"addition_amount\": \"1500.00\",\n      \"deduction_head\": \"Cash Discount\",\n      \"deduction_amount\": \"500.00\",\n      \"igst\": \"0.00\",\n      \"cgst\": \"3025.00\",\n      \"sgst\": \"3025.00\",\n      \"ro\": \"0.00\",\n      \"total\": \"127050.00\",\n      \"fy\": \"2026-2027\"\n    }\n  ]\n}"
        },
        "url": {
          "raw": "{{base_url}}/api/invoices",
          "host": [
            "{{base_url}}"
          ],
          "path": [
            "api",
            "invoices"
          ]
        }
      }
    },
    {
      "name": "3. Test Google Sheet Connection",
      "request": {
        "method": "POST",
        "header": [
          {
            "key": "Content-Type",
            "value": "application/json"
          }
        ],
        "body": {
          "mode": "raw",
          "raw": "{}"
        },
        "url": {
          "raw": "{{base_url}}/api/invoices/test-connection",
          "host": [
            "{{base_url}}"
          ],
          "path": [
            "api",
            "invoices",
            "test-connection"
          ]
        }
      }
    }
  ]
}
