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โ
| Parameter | Type | Location | Description |
|---|---|---|---|
id | integer | path | The product ID |
Request Bodyโ
| Field | Type | Required | Description |
|---|---|---|---|
season_id | integer | Conditional | Season ID for seasonal pricing. Required if product uses seasonal pricing. |
price_structure | string | Yes | flat or schedule |
price | number | Yes | Price amount |
interval | integer | No | Number of intervals (default: 1) |
interval_units | string | No | 15min, halfHour, hour, day, week (default: day) |
label | string | No | Optional 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_widget | boolean | No | Whether 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โ
| Status | Code | Description |
|---|---|---|
| 401 | authentication_required | No API key provided |
| 403 | insufficient_scope | API key lacks products:write scope |
| 404 | resource_not_found | Product not found |
| 422 | validation_error | Invalid request data |
Validation Notesโ
- The
price_structuremust match the product'sprice_structuresetting. You cannot add aschedulerule to aflatproduct or vice versa - If the product uses seasonal pricing (
price_applies: seasonal),season_idis required - If the product uses year-round pricing (
price_applies: yearRound),season_idmust 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