Skip to main content

List Price Policies

Query Parameters

page
integer
default:"1"
Page number (minimum: 1)
limit
integer
default:"10"
Items per page (minimum: 1, maximum: 100)
scopeType
string
Filter by scope type: GLOBAL, CITY, or ZONE
cityId
string
Filter by city UUID (for CITY-scoped policies)
zoneId
string
Filter by zone UUID (for ZONE-scoped policies)
active
boolean
Filter by active status
q
string
Free text search by name (case-insensitive)

Response

Returns a paginated list of price policies with metadata.

Get Price Policy by ID

Path Parameters

id
string
required
Price policy UUID

Response

Returns the complete price policy including conditions and pricing rules.

Create Price Policy

Body Parameters

name
string
required
Policy name (max 140 characters)
scopeType
string
required
Scope type: GLOBAL, CITY, or ZONE
cityId
string
City UUID (required when scopeType is CITY)
zoneId
string
Zone UUID (required when scopeType is ZONE)
active
boolean
default:"true"
Whether the policy is active
priority
integer
default:"100"
Policy priority (0-100000). Higher priority policies take precedence
effectiveFrom
string
Start date/time for policy validity (ISO 8601 format)
effectiveTo
string
End date/time for policy validity (ISO 8601 format)
timezone
string
default:"UTC"
IANA timezone for time-based conditions
conditions
object
Conditions for when this policy applies. Supports:
  • days_of_week: Array of day numbers (1-7, where 1 is Monday)
  • time_ranges: Array of time ranges with start and end in HH:MM format
  • dates: Array of specific dates in YYYY-MM-DD format
  • date_ranges: Array of date ranges with from and to dates
  • exclude_dates: Array of dates to exclude in YYYY-MM-DD format
price
object
required
Pricing structure. Supports:
  • base_fare: Base fare amount
  • per_km: Price per kilometer
  • per_minute: Price per minute
  • minimum_fare: Minimum fare amount
  • booking_fee: Flat booking fee
  • night_surcharge: Additional charge for night rides
  • cap: Maximum fare cap
updatedBy
string
UUID of the user creating this policy

Scope Coherence Rules

  • GLOBAL: Both cityId and zoneId must be null
  • CITY: cityId must be provided, zoneId must be null
  • ZONE: zoneId must be provided, cityId must be null

Response

status
string
Response status
data
object
The created price policy object

Error Responses

  • 409 Conflict: Scope coherence violation or constraint conflict
  • 400 Bad Request: Validation error

Update Price Policy

Path Parameters

id
string
required
Price policy UUID

Body Parameters

All parameters are optional (partial update). See Create Price Policy for parameter details.
name
string
Policy name
scopeType
string
Scope type: GLOBAL, CITY, or ZONE
cityId
string
City UUID
zoneId
string
Zone UUID
active
boolean
Whether the policy is active
priority
integer
Policy priority (0-100000)
effectiveFrom
string
Start date/time for policy validity
effectiveTo
string
End date/time for policy validity
timezone
string
IANA timezone
conditions
object
Conditions object
price
object
Pricing structure
updatedBy
string
UUID of the user updating this policy

Response

Returns the updated price policy object.

Error Responses

  • 409 Conflict: Scope coherence violation
  • 400 Bad Request: Validation error

Set Active Status

Path Parameters

id
string
required
Price policy UUID

Body Parameters

active
boolean
required
Set to true to activate, false to deactivate

Response

Returns the updated price policy with new active status.

Build docs developers (and LLMs) love