RedPlanetHQ / RedPlanetHQ/core

New Integration: Swiggy

Open
#515 1 comment 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

enhancement good first issue integration new-feature new-integration
Dominant language
TypeScript
Stars
2k
Forks
194
Avg merge
12m
Merged PRs (30d)
2

Description

Description

Add Swiggy integration to sync food delivery orders, restaurant data, and order tracking into CORE.

Reference Implementations

Existing Integrations (use as templates)
  • integrations/github/ - OAuth-based integration
  • integrations/linear/ - For reference
  • integrations/slack/ - For reference
Required Files Structure
integrations/swiggy/
├── src/
│   ├── index.ts          # Main entry, auth spec
│   ├── schedule.ts       # Sync logic
│   ├── utils.ts          # Swiggy API utilities
│   ├── account-create.ts # Auth setup
│   └── create-activity.ts # Activity formatting
├── package.json
├── tsup.config.ts
└── README.md

Swiggy API Integration

OAuth Setup
  • No official public API with OAuth is available for general developers.
  • Swiggy has a Developer Portal that provides limited API access, primarily intended for partner integrations (restaurants, delivery partners).
  • Authentication method: Session-based / API Key (partner-only)
  • For community/unofficial use, cookie-based authentication from the Swiggy web app has been used.
Known Unofficial Endpoints
  • GET https://www.swiggy.com/dapi/restaurants/list/v5 - List restaurants by location
  • GET https://www.swiggy.com/dapi/menu/pl?page-type=REGULAR_MENU&complete-menu=true&lat={lat}&lng={lng}&restaurantId={id} - Get restaurant menu
  • GET https://www.swiggy.com/dapi/order/all - Get order history (requires auth cookies)
  • GET https://www.swiggy.com/dapi/order/track - Track active order (requires auth cookies)

Events to Track

  1. Orders

    • New orders placed
    • Order status updates (confirmed, preparing, out for delivery, delivered)
    • Order cancellations
    • Order ratings and reviews
  2. Restaurants

    • Favorite restaurant updates
    • Menu changes
    • Restaurant availability status
  3. Account Activity

    • Payment transactions
    • Swiggy One membership status
    • Address updates

Implementation Tasks

  • Set up basic integration structure following integrations/github/src/index.ts pattern
  • Investigate Swiggy Developer Portal for official partner API access
  • Implement cookie/session-based authentication in account-create.ts
  • Create Swiggy API utilities in utils.ts
  • Implement sync logic in schedule.ts for order history
  • Convert Swiggy events to CORE activity format
  • Add error handling and rate limiting
  • Create integration documentation
  • Add to integrations/README.md

Technical Notes

  • Important: Swiggy does NOT have a well-documented public REST API for third-party developers. The Developer Portal at developers.swiggy.com exists but is primarily for restaurant and delivery partners.
  • Most community projects use unofficial/undocumented API endpoints by reverse-engineering the Swiggy web application.
  • Authentication for unofficial endpoints requires Swiggy session cookies (obtained after logging in via the web app).
  • These unofficial endpoints are subject to change without notice and may break at any time.
  • Swiggy is India-focused; API responses contain INR pricing and Indian addresses.
  • Consider using a headless browser or session management approach for authentication.
  • Rate limits on unofficial endpoints are unknown; implement conservative rate limiting.
  • This integration carries inherent risks due to reliance on unofficial APIs. Clearly communicate this to users.

Resources

Labels

enhancement, integration, new-feature

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by reading integrations/github/src/index.ts and the reference integrations/linear/ and integrations/slack/ directories, then investigate the Swiggy Developer Portal and the listed endpoint constraints. The required integration files are integrations/swiggy/src/index.ts, schedule.ts, utils.ts, account-create.ts, create-activity.ts, plus package.json, tsup.config.ts, and README.md. Done requires a confirmed authentication approach, working order synchronization, activity conversion, documentation, and an integrations/README.md entry.

Written by the indexing model from the issue text.

Assessment

Tech stack
typescript
Domain
api, backend
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.