---
title: "Update a package price rule"
method: PUT
path: "/shop/packages/{packageId}/price-rules/{priceRuleId}"
tags: ["Packages"]
---

# Update a package price rule

`PUT /shop/packages/{packageId}/price-rules/{priceRuleId}`

Replaces a `PriceRule` on a `Package`. The server validates the same
shape as on create, so `price` is required. When
`offering_standard_price` is enabled for the site, the package's
`standard_price` must be set before a price rule can be updated. A zero
amount counts as set. Requires the `SETTINGS_MANAGE` permission on the
package's site.

## Request body

- object
  - `price` integer, required — Price in the smallest currency unit.
  - `date_from` string, date, nullable — First date this rule applies (inclusive).
  - `date_to` string, date, nullable — Last date this rule applies (inclusive).
  - `time_from` string, nullable — Start of the time-of-day window in `HH:MM`.
  - `time_to` string, nullable — End of the time-of-day window in `HH:MM`.
  - `weekdays` string[]

## Response `200`

A single `PriceRule` belonging to a `Package`.

- object
  - `data` SchemasPriceRule, required
    - `id` string, object-id — The ID of the price rule.
    - `price` integer — The price applied by this rule
    - `date_from` string, date, nullable — The first date this rule should be applied.
    - `date_to` string, date, nullable — The last date this rule should be applied.
    - `weekdays` string[] — The weekdays this rule should be applied.
    - `time_from` string, nullable — This rule will be applied to bookings starting on or after this time.
    - `time_to` string, nullable — This rule will be applied to bookings starting before this time.
    - `duration` integer, nullable — This rule will be applied to bookings of this duration.

## Other responses

- `401` — The user is unauthenticated
- `403` — The authenticated user does not have permission.
- `404` — The resource couldn't be found
- `422` — The request didn't pass validation

---

[API](https://skmtc.dev/try/apis/trybe-api.md) · [All operations](https://skmtc.dev/try/apis/trybe-api/llms.txt) · [OpenAPI document](https://skmtc-service-production.skmtc.workers.dev/v1/apis/try/trybe-api/revisions/f37f92702da5/schema)
