Skip to main content

Add Pricing Rule

Add a new pricing rule to a product.

Endpointโ€‹

POST /v1/products/{id}/pricing

Authenticationโ€‹

Requires an API key with the products:write scope.

Parametersโ€‹

ParameterTypeLocationDescription
idintegerpathThe product ID

Request Bodyโ€‹

FieldTypeRequiredDescription
season_idintegerConditionalSeason ID for seasonal pricing. Required if product uses seasonal pricing.
price_structurestringYesflat or schedule
pricenumberYesPrice amount
intervalintegerNoNumber of intervals (default: 1)
interval_unitsstringNo15min, halfHour, hour, day, week (default: day)
labelstringNoOptional friendly label for a schedule tier (max 150 chars), e.g. "Per hour", "Half day", "Full day". When set, it replaces the raw interval number in the customer price-schedule table. Display-only โ€” the calculated price always uses interval/price.
display_on_widgetbooleanNoWhether this tier appears in the price-schedule table on the customer booking widget (default: true). Display-only โ€” hidden tiers are still bookable and priced normally; the widget collapses them behind a "View full price schedule" toggle.

Responseโ€‹

Success (201 Created)โ€‹

{
"data": {
"id": 3,
"season": null,
"price_structure": "flat",
"price": 50.00,
"interval": 1,
"label": null,
"interval_units": "day",
"interval_description": "Day",
"display_on_widget": true,
"created_at": "2026-02-01T10:00:00+00:00",
"updated_at": "2026-02-01T10:00:00+00:00"
},
"meta": {
"request_id": "req_abc123",
"timestamp": "2026-02-01T10:00:00+00:00"
}
}

Example Requestโ€‹

curl -X POST "https://app.equipdash.com/api/v1/products/1/pricing" \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"price_structure": "flat",
"price": 50.00,
"interval": 1,
"interval_units": "day"
}'

With Seasonโ€‹

curl -X POST "https://app.equipdash.com/api/v1/products/1/pricing" \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"season_id": 1,
"price_structure": "flat",
"price": 75.00,
"interval": 1,
"interval_units": "day"
}'

Errorsโ€‹

StatusCodeDescription
401authentication_requiredNo API key provided
403insufficient_scopeAPI key lacks products:write scope
404resource_not_foundProduct not found
422validation_errorInvalid request data

Validation Notesโ€‹

  • The price_structure must match the product's price_structure setting. You cannot add a schedule rule to a flat product or vice versa
  • If the product uses seasonal pricing (price_applies: seasonal), season_id is required
  • If the product uses year-round pricing (price_applies: yearRound), season_id must not be provided
  • For flat pricing, only one pricing rule is allowed per season (or one for year-round). To change an existing flat price, use PATCH to update or DELETE then re-add
  • For schedule pricing, multiple entries with different intervals are allowed
  • Each schedule tier may carry an optional label (e.g. "Per hour", "Full day") shown to customers in place of the raw interval