Keyboard shortcuts

Press ← or → to navigate between chapters

Press S or / to search in the book

Press ? to show this help

Press Esc to hide this help

Pricing Engine API - Postman Collection

Complete API documentation for the Pricing Engine. All field references, enum values, and examples are included inline within the Postman collection.

Quick Start

  1. Authentication: Run 🔐 Authentication - HH-Server > Partner Sign In to get JWT token
  2. Restaurant Context: Add X-Restaurant-Id header to all requests
  3. Explore API: Check folder descriptions and request documentation for complete field references

Current Implementation

API Structure

Pricing Engine API
├── Authentication (HH-Server)
├── Partner API - Pricing Rules
│   ├── CRUD operations
│   ├── Activate/Deactivate
│   └── Clone rule
├── Partner API - Global Pricing Settings
│   ├── GET setting (auto-creates if not exists)
│   └── PATCH setting
├── Partner API - Price History
│   ├── List history
│   └── Undo changes
├── Internal API - Token Sync
├── Public API V1 (No Auth Required)
│   ├── Get Packages Pricing Rules
│   ├── Get Available Rules by Date
│   ├── Get Available Rules by Time
│   ├── Verify Active Rules
│   └── Get Modifier History
└── Health & Status

Public API V1 (Dynamic Pricing V2)

No authentication required. These endpoints are designed for the booking system to query pricing modifiers.

Endpoints:

  • GET /api/v1/packages_pricing_rules/:restaurant_id - Get all active modifiers for a restaurant
  • POST /api/v1/get_available_rules_by_date - Filter modifiers by date
  • POST /api/v1/get_available_rules_by_time - Filter modifiers by date AND time
  • POST /api/v1/verify_active_rules - Validate modifiers are still active at checkout
  • POST /api/v1/get_modifier_history - Get audit trail for applied modifiers

Data Bank: All endpoints use ModifierService.for_restaurant(restaurant_id) which returns pre-filtered modifiers that are active, valid, and approved.

Global Pricing Settings

Endpoints:

  • GET /api/partner/v1/global_pricing_setting - Get or auto-create setting
  • PATCH /api/partner/v1/global_pricing_setting - Update setting

Auto-create behavior: First GET creates default setting (50% increase/decrease limits)

Pricing Rules

Endpoints:

  • GET /api/partner/v1/pricing_rules - List rules
  • POST /api/partner/v1/pricing_rules - Create rule
  • PATCH /api/partner/v1/pricing_rules/:id - Update rule
  • DELETE /api/partner/v1/pricing_rules/:id - Delete rule
  • PATCH /api/partner/v1/pricing_rules/:id/activate - Activate rule
  • PATCH /api/partner/v1/pricing_rules/:id/deactivate - Deactivate rule
  • POST /api/partner/v1/pricing_rules/:id/clone - Clone rule

Validation: All rules validated against global pricing limits at create/update time

Documentation Location

All detailed documentation is embedded in the Postman collection:

  • Folder descriptions: Complete field references and enum tables
  • Request descriptions: Detailed guides with examples
  • Examples: Working payloads for all date_type variations

No external documentation needed - everything is inline for easy access while testing.