{
  "info": {
    "name": "Toliday Trip DMC — Public API",
    "description": "Public REST API for the Toliday Trip DMC tour-package booking website — covers destination search, package listing, package detail/description, package images, enquiry form, booking creation, booking status, booking cancellation, blog, homepage banners, client reviews and company/site info. Use it to pull this site's live data into another website, or to push enquiries and bookings from another site straight into this system.\n\nAuth: every request needs a tenant API key, sent as header `X-API-Key` (already set at the collection level below) or as query param `?api_key=`. Tenant admins generate/regenerate their own key from Admin Panel -> Site Settings -> API Access; the platform owner can generate, regenerate or revoke ANY tenant's key from Superadmin Panel -> API Keys.\n\nAll responses are JSON: `{ \"success\": true, \"data\": {...} }` on success, `{ \"success\": false, \"error\": \"...\" }` on failure.",
    "schema": "https://schema.getpostman.com/json/collection/v2.1.0/collection.json"
  },
  "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"
      }
    ]
  },
  "variable": [
    {
      "key": "base_url",
      "value": "https://your-toliday-dmc-domain.com",
      "type": "string"
    },
    {
      "key": "api_key",
      "value": "PASTE_YOUR_API_KEY_HERE",
      "type": "string"
    },
    {
      "key": "package_slug",
      "value": "goa-beach-holiday-package",
      "type": "string"
    },
    {
      "key": "blog_slug",
      "value": "top-places-to-visit-in-goa",
      "type": "string"
    },
    {
      "key": "destination_slug",
      "value": "goa",
      "type": "string"
    },
    {
      "key": "booking_ref",
      "value": "TTDXXXXXXXX",
      "type": "string"
    },
    {
      "key": "customer_email",
      "value": "test@example.com",
      "type": "string"
    }
  ],
  "item": [
    {
      "name": "Packages",
      "item": [
        {
          "name": "List Packages",
          "request": {
            "method": "GET",
            "url": {
              "raw": "{{base_url}}/api/v1/packages?page=1&limit=20",
              "host": [
                "{{base_url}}"
              ],
              "path": [
                "api",
                "v1",
                "packages"
              ],
              "query": [
                {
                  "key": "page",
                  "value": "1"
                },
                {
                  "key": "limit",
                  "value": "20"
                },
                {
                  "key": "destination",
                  "value": "{{destination_slug}}",
                  "disabled": true
                },
                {
                  "key": "category",
                  "value": "",
                  "disabled": true
                },
                {
                  "key": "package_type",
                  "value": "domestic",
                  "disabled": true
                },
                {
                  "key": "featured",
                  "value": "1",
                  "disabled": true
                },
                {
                  "key": "recommended",
                  "value": "1",
                  "disabled": true
                },
                {
                  "key": "season",
                  "value": "summer",
                  "disabled": true
                },
                {
                  "key": "fixed_departure",
                  "value": "1",
                  "disabled": true
                },
                {
                  "key": "min_price",
                  "value": "5000",
                  "disabled": true
                },
                {
                  "key": "max_price",
                  "value": "50000",
                  "disabled": true
                },
                {
                  "key": "q",
                  "value": "goa",
                  "disabled": true
                }
              ]
            },
            "description": "List active tour packages for the tenant. All query params are optional filters; pagination defaults to limit=20, max 100."
          }
        },
        {
          "name": "Package Detail (by slug)",
          "request": {
            "method": "GET",
            "url": {
              "raw": "{{base_url}}/api/v1/package-detail?slug={{package_slug}}",
              "host": [
                "{{base_url}}"
              ],
              "path": [
                "api",
                "v1",
                "package-detail"
              ],
              "query": [
                {
                  "key": "slug",
                  "value": "{{package_slug}}"
                }
              ]
            },
            "description": "Full package detail: itinerary, hotels, inclusions/exclusions, meal plan, payment terms, other terms, gallery, SEO fields. You can pass ?id=<package_id> instead of ?slug=."
          }
        },
        {
          "name": "Package Images (by slug)",
          "request": {
            "method": "GET",
            "url": {
              "raw": "{{base_url}}/api/v1/package-images?slug={{package_slug}}",
              "host": [
                "{{base_url}}"
              ],
              "path": [
                "api",
                "v1",
                "package-images"
              ],
              "query": [
                {
                  "key": "slug",
                  "value": "{{package_slug}}"
                }
              ]
            },
            "description": "Just the main image + full gallery for one package — handy when you only need imagery (e.g. for a carousel on another site) without the full detail payload. You can pass ?id=<package_id> instead of ?slug=."
          }
        }
      ]
    },
    {
      "name": "Destinations",
      "item": [
        {
          "name": "List / Search Destinations",
          "request": {
            "method": "GET",
            "url": {
              "raw": "{{base_url}}/api/v1/destinations?page=1&limit=50",
              "host": [
                "{{base_url}}"
              ],
              "path": [
                "api",
                "v1",
                "destinations"
              ],
              "query": [
                {
                  "key": "page",
                  "value": "1"
                },
                {
                  "key": "limit",
                  "value": "50"
                },
                {
                  "key": "type",
                  "value": "domestic",
                  "disabled": true
                },
                {
                  "key": "trending",
                  "value": "1",
                  "disabled": true
                },
                {
                  "key": "q",
                  "value": "goa",
                  "disabled": true
                }
              ]
            },
            "description": "List destinations (600+ seeded). Filter by type (domestic/international), trending=1 for the homepage 'Trending Destinations' set, or do a free-text destination search by enabling q (e.g. q=goa matches 'Goa', 'North Goa', etc — this is the destination search box)."
          }
        }
      ]
    },
    {
      "name": "Categories",
      "item": [
        {
          "name": "List Categories",
          "request": {
            "method": "GET",
            "url": {
              "raw": "{{base_url}}/api/v1/categories",
              "host": [
                "{{base_url}}"
              ],
              "path": [
                "api",
                "v1",
                "categories"
              ]
            }
          }
        }
      ]
    },
    {
      "name": "Blog",
      "item": [
        {
          "name": "List Blog Posts",
          "request": {
            "method": "GET",
            "url": {
              "raw": "{{base_url}}/api/v1/blog?page=1&limit=20",
              "host": [
                "{{base_url}}"
              ],
              "path": [
                "api",
                "v1",
                "blog"
              ],
              "query": [
                {
                  "key": "page",
                  "value": "1"
                },
                {
                  "key": "limit",
                  "value": "20"
                },
                {
                  "key": "destination",
                  "value": "{{destination_slug}}",
                  "disabled": true
                },
                {
                  "key": "category",
                  "value": "domestic",
                  "disabled": true
                },
                {
                  "key": "q",
                  "value": "goa",
                  "disabled": true
                }
              ]
            }
          }
        },
        {
          "name": "Blog Post Detail (by slug)",
          "request": {
            "method": "GET",
            "url": {
              "raw": "{{base_url}}/api/v1/blog-detail?slug={{blog_slug}}",
              "host": [
                "{{base_url}}"
              ],
              "path": [
                "api",
                "v1",
                "blog-detail"
              ],
              "query": [
                {
                  "key": "slug",
                  "value": "{{blog_slug}}"
                }
              ]
            }
          }
        }
      ]
    },
    {
      "name": "Homepage",
      "item": [
        {
          "name": "Homepage Banners",
          "request": {
            "method": "GET",
            "url": {
              "raw": "{{base_url}}/api/v1/banners",
              "host": [
                "{{base_url}}"
              ],
              "path": [
                "api",
                "v1",
                "banners"
              ]
            }
          }
        },
        {
          "name": "Client Reviews",
          "request": {
            "method": "GET",
            "url": {
              "raw": "{{base_url}}/api/v1/reviews",
              "host": [
                "{{base_url}}"
              ],
              "path": [
                "api",
                "v1",
                "reviews"
              ]
            }
          }
        }
      ]
    },
    {
      "name": "Company / Site Info",
      "item": [
        {
          "name": "Site Info (branding, contact, socials, branches, footer)",
          "request": {
            "method": "GET",
            "url": {
              "raw": "{{base_url}}/api/v1/site-info",
              "host": [
                "{{base_url}}"
              ],
              "path": [
                "api",
                "v1",
                "site-info"
              ]
            }
          }
        },
        {
          "name": "Legal Page Detail (by page_key)",
          "request": {
            "method": "GET",
            "url": {
              "raw": "{{base_url}}/api/v1/legal-page?page_key=privacy-policy",
              "host": [
                "{{base_url}}"
              ],
              "path": [
                "api",
                "v1",
                "legal-page"
              ],
              "query": [
                {
                  "key": "page_key",
                  "value": "privacy-policy"
                }
              ]
            },
            "description": "page_key is one of: privacy-policy, terms-conditions, disclaimer, refund-cancellation"
          }
        }
      ]
    },
    {
      "name": "Bookings",
      "item": [
        {
          "name": "Create Booking",
          "request": {
            "method": "POST",
            "header": [
              {
                "key": "Content-Type",
                "value": "application/json"
              }
            ],
            "url": {
              "raw": "{{base_url}}/api/v1/booking-create",
              "host": [
                "{{base_url}}"
              ],
              "path": [
                "api",
                "v1",
                "booking-create"
              ]
            },
            "body": {
              "mode": "raw",
              "raw": "{\n  \"package_slug\": \"{{package_slug}}\",\n  \"name\": \"Test User\",\n  \"email\": \"{{customer_email}}\",\n  \"phone\": \"9999999999\",\n  \"travel_date\": \"2026-12-20\",\n  \"adults\": 2,\n  \"children\": 0,\n  \"message\": \"Booked via partner site\"\n}",
              "options": {
                "raw": {
                  "language": "json"
                }
              }
            },
            "description": "Create a booking from another website. Pass either package_slug or package_id. The total_amount is calculated server-side (pax-wise, same logic as the main site's checkout) — never trust a client-supplied price. The response's payment_options[].initiate_url (if any gateway is configured) is where to redirect the customer's browser to complete payment on this site. Save the returned booking_ref — you'll need it (with the email) to check status or cancel."
          }
        },
        {
          "name": "Booking Status",
          "request": {
            "method": "GET",
            "url": {
              "raw": "{{base_url}}/api/v1/booking-status?booking_ref={{booking_ref}}&email={{customer_email}}",
              "host": [
                "{{base_url}}"
              ],
              "path": [
                "api",
                "v1",
                "booking-status"
              ],
              "query": [
                {
                  "key": "booking_ref",
                  "value": "{{booking_ref}}"
                },
                {
                  "key": "email",
                  "value": "{{customer_email}}"
                }
              ]
            },
            "description": "Look up a booking's current status/payment_status. Requires both booking_ref and the email it was booked with — this pairing is the auth, so another site can't look up a booking it doesn't own."
          }
        },
        {
          "name": "Cancel Booking",
          "request": {
            "method": "POST",
            "header": [
              {
                "key": "Content-Type",
                "value": "application/json"
              }
            ],
            "url": {
              "raw": "{{base_url}}/api/v1/booking-cancel",
              "host": [
                "{{base_url}}"
              ],
              "path": [
                "api",
                "v1",
                "booking-cancel"
              ]
            },
            "body": {
              "mode": "raw",
              "raw": "{\n  \"booking_ref\": \"{{booking_ref}}\",\n  \"email\": \"{{customer_email}}\",\n  \"reason\": \"Change of travel plans\"\n}",
              "options": {
                "raw": {
                  "language": "json"
                }
              }
            },
            "description": "Cancel a booking. Requires booking_ref + the email it was booked with, same pairing-based auth as Booking Status. Sets the booking's status to 'cancelled'; any refund on an already-paid booking is handled by the team per the cancellation policy, not automatically by this call."
          }
        }
      ]
    },
    {
      "name": "Leads",
      "item": [
        {
          "name": "Create Enquiry",
          "request": {
            "method": "POST",
            "header": [
              {
                "key": "Content-Type",
                "value": "application/json"
              }
            ],
            "url": {
              "raw": "{{base_url}}/api/v1/enquiry",
              "host": [
                "{{base_url}}"
              ],
              "path": [
                "api",
                "v1",
                "enquiry"
              ]
            },
            "body": {
              "mode": "raw",
              "raw": "{\n  \"name\": \"Test User\",\n  \"email\": \"test@example.com\",\n  \"phone\": \"9999999999\",\n  \"subject\": \"Enquiry from partner site\",\n  \"message\": \"Interested in a 4N/5D Goa package for 2 adults in December.\",\n  \"package_id\": 0\n}",
              "options": {
                "raw": {
                  "language": "json"
                }
              }
            },
            "description": "Push a lead/enquiry from another website — it shows up instantly in Admin -> Enquiries and Superadmin -> Enquiries. name, email, phone are required. package_id is optional (must belong to this tenant, else it's ignored)."
          }
        }
      ]
    }
  ]
}