---
title: "Update Pricing Model"
method: PUT
path: "/api/v1/pricing-models/{id}"
tags: ["Pricing Models"]
---

# Update Pricing Model

`PUT /api/v1/pricing-models/{id}`

## Path parameters

- `id` string, required

## Request body

- object
  - `pricingModel` object, required
    - `id` string, required
    - `isDefault` boolean
    - `name` string, required — The name of the pricing model
    - `features` union[]
      - union — A feature that can be granted to a customer. Will be associated with products.
        - object — A feature that can be granted in a true / false boolean state. When granted to a customer, it will return true.
          - `type` 'toggle', required
          - `slug` string, required
          - `name` string, required
          - `description` string, required
          - `active` boolean
        - object — A credit grant to give for a usage meter.
          - `type` 'usage_credit_grant', required
          - `slug` string, required
          - `name` string, required
          - `description` string, required
          - `amount` integer, required — A positive integer
          - `renewalFrequency` 'once' | 'every_billing_period', required
          - `active` boolean
          - `usageMeterSlug` string, required — The slug of the usage meter to grant credit for. Must be a valid slug for a usage meter.
        - object — A resource grant feature that allocates a specific amount of a resource.
          - `type` 'resource', required
          - `slug` string, required
          - `name` string, required
          - `description` string, required
          - `amount` integer, required — A positive integer
          - `active` boolean
          - `resourceSlug` string, required — The slug of the resource to grant. Must be a valid slug for a resource in this pricing model.
    - `products` object[]
      - `product` object, required — The product to add to the pricingModel. Must be a subset of the products in the pricingModel.
        - `name` string, required — The name of the product
        - `description` string, nullable
        - `imageURL` string, nullable
        - `active` boolean, required
        - `singularQuantityLabel` string, nullable
        - `pluralQuantityLabel` string, nullable
        - `default` boolean
        - `slug` string, required — The slug of the product
      - `price` union, required — The price for the product. Must have active=true and isDefault=true.
        - object
          - `intervalUnit` 'day' | 'week' | 'month' | 'year', required
          - `name` string
          - `intervalCount` integer, required — A positive integer
          - `type` 'subscription', required
          - `trialPeriodDays` union — The trial period in days. If the trial period is 0 or null, there will be no trial period.
            - integer — A positive integer
            - 0
          - `isDefault` boolean, required — Whether or not this price is the default price. For product prices, this indicates the default price for that product. For usage prices, this indicates the default price for that usage meter.
          - `unitPrice` union, required — The price per unit. This should be in the smallest unit of the currency. For example, if the currency is USD, GBP, CAD, EUR or SGD, the price should be in cents.
            - integer — A positive integer
            - 0
          - `usageEventsPerUnit` unknown
          - `active` boolean
          - `slug` string
          - `usageMeterId` unknown
          - `currency` 'USD' | 'AED' | 'AFN' | 'ALL' | 'AMD' | 'ANG' | 'AOA' | 'ARS' | 'AUD' | 'AWG' | 'AZN' | 'BAM' | 'BBD' | 'BDT' | 'BGN' | 'BIF' | 'BMD' | 'BND' | 'BOB' | 'BRL' | 'BSD' | 'BWP' | 'BYN' | 'BZD' | 'CAD' | 'CDF' | 'CHF' | 'CLP' | 'CNY' | 'COP' | 'CRC' | 'CVE' | 'CZK' | 'DJF' | 'DKK' | 'DOP' | 'DZD' | 'EGP' | 'ETB' | 'EUR' | 'FJD' | 'FKP' | 'GBP' | 'GEL' | 'GIP' | 'GMD' | 'GNF' | 'GTQ' | 'GYD' | 'HKD' | 'HNL' | 'HTG' | 'HUF' | 'IDR' | 'ILS' | 'INR' | 'ISK' | 'JMD' | 'JPY' | 'KES' | 'KGS' | 'KHR' | 'KMF' | 'KRW' | 'KYD' | 'KZT' | 'LAK' | 'LBP' | 'LKR' | 'LRD' | 'LSL' | 'MAD' | 'MDL' | 'MGA' | 'MKD' | 'MMK' | 'MNT' | 'MOP' | 'MUR' | 'MVR' | 'MWK' | 'MXN' | 'MYR' | 'MZN' | 'NAD' | 'NGN' | 'NIO' | 'NOK' | 'NPR' | 'NZD' | 'PAB' | 'PEN' | 'PGK' | 'PHP' | 'PKR' | 'PLN' | 'PYG' | 'QAR' | 'RON' | 'RSD' | 'RUB' | 'RWF' | 'SAR' | 'SBD' | 'SCR' | 'SEK' | 'SGD' | 'SHP' | 'SLE' | 'SOS' | 'SRD' | 'STD' | 'SZL' | 'THB' | 'TJS' | 'TOP' | 'TRY' | 'TTD' | 'TWD' | 'TZS' | 'UAH' | 'UGX' | 'UYU' | 'UZS' | 'VND' | 'VUV' | 'WST' | 'XAF' | 'XCD' | 'XOF' | 'XPF' | 'YER' | 'ZAR' | 'ZMW' — Currency code
        - object
          - `intervalUnit` unknown
          - `name` string
          - `intervalCount` unknown
          - `type` 'single_payment', required
          - `trialPeriodDays` unknown
          - `isDefault` boolean, required — Whether or not this price is the default price. For product prices, this indicates the default price for that product. For usage prices, this indicates the default price for that usage meter.
          - `unitPrice` union, required — The price per unit. This should be in the smallest unit of the currency. For example, if the currency is USD, GBP, CAD, EUR or SGD, the price should be in cents.
            - integer — A positive integer
            - 0
          - `usageEventsPerUnit` unknown
          - `active` boolean
          - `slug` string
          - `usageMeterId` unknown
          - `currency` 'USD' | 'AED' | 'AFN' | 'ALL' | 'AMD' | 'ANG' | 'AOA' | 'ARS' | 'AUD' | 'AWG' | 'AZN' | 'BAM' | 'BBD' | 'BDT' | 'BGN' | 'BIF' | 'BMD' | 'BND' | 'BOB' | 'BRL' | 'BSD' | 'BWP' | 'BYN' | 'BZD' | 'CAD' | 'CDF' | 'CHF' | 'CLP' | 'CNY' | 'COP' | 'CRC' | 'CVE' | 'CZK' | 'DJF' | 'DKK' | 'DOP' | 'DZD' | 'EGP' | 'ETB' | 'EUR' | 'FJD' | 'FKP' | 'GBP' | 'GEL' | 'GIP' | 'GMD' | 'GNF' | 'GTQ' | 'GYD' | 'HKD' | 'HNL' | 'HTG' | 'HUF' | 'IDR' | 'ILS' | 'INR' | 'ISK' | 'JMD' | 'JPY' | 'KES' | 'KGS' | 'KHR' | 'KMF' | 'KRW' | 'KYD' | 'KZT' | 'LAK' | 'LBP' | 'LKR' | 'LRD' | 'LSL' | 'MAD' | 'MDL' | 'MGA' | 'MKD' | 'MMK' | 'MNT' | 'MOP' | 'MUR' | 'MVR' | 'MWK' | 'MXN' | 'MYR' | 'MZN' | 'NAD' | 'NGN' | 'NIO' | 'NOK' | 'NPR' | 'NZD' | 'PAB' | 'PEN' | 'PGK' | 'PHP' | 'PKR' | 'PLN' | 'PYG' | 'QAR' | 'RON' | 'RSD' | 'RUB' | 'RWF' | 'SAR' | 'SBD' | 'SCR' | 'SEK' | 'SGD' | 'SHP' | 'SLE' | 'SOS' | 'SRD' | 'STD' | 'SZL' | 'THB' | 'TJS' | 'TOP' | 'TRY' | 'TTD' | 'TWD' | 'TZS' | 'UAH' | 'UGX' | 'UYU' | 'UZS' | 'VND' | 'VUV' | 'WST' | 'XAF' | 'XCD' | 'XOF' | 'XPF' | 'YER' | 'ZAR' | 'ZMW' — Currency code
      - `features` string[], required — The slugs of the features that will granted when they purchase the product. Must be a subset of the slugs of the features in the pricingModel.
    - `usageMeters` object[]
      - `usageMeter` UsageMeterClientInsertSchema, required
        - `name` string, required
        - `slug` string, required
        - `aggregationType` 'sum' | 'count_distinct_properties' — The type of aggregation to perform on the usage meter. Defaults to "sum", which aggregates all the usage event amounts for the billing period. "count_distinct_properties" counts the number of distinct properties in the billing period for a given meter.
      - `prices` object[] — The prices for this usage meter. Each price defines how usage on this meter is billed.
        - `intervalUnit` 'day' | 'week' | 'month' | 'year', required
        - `name` string
        - `intervalCount` integer, required — A positive integer
        - `type` 'usage', required
        - `trialPeriodDays` unknown
        - `isDefault` boolean, required — Whether or not this price is the default price. For product prices, this indicates the default price for that product. For usage prices, this indicates the default price for that usage meter.
        - `unitPrice` union, required — The price per unit. This should be in the smallest unit of the currency. For example, if the currency is USD, GBP, CAD, EUR or SGD, the price should be in cents.
          - integer — A positive integer
          - 0
        - `usageEventsPerUnit` integer, required — The number of usage events per unit. Used to determine how to map usage events to quantities when raising invoices for usage.
        - `active` boolean
        - `slug` string
        - `currency` 'USD' | 'AED' | 'AFN' | 'ALL' | 'AMD' | 'ANG' | 'AOA' | 'ARS' | 'AUD' | 'AWG' | 'AZN' | 'BAM' | 'BBD' | 'BDT' | 'BGN' | 'BIF' | 'BMD' | 'BND' | 'BOB' | 'BRL' | 'BSD' | 'BWP' | 'BYN' | 'BZD' | 'CAD' | 'CDF' | 'CHF' | 'CLP' | 'CNY' | 'COP' | 'CRC' | 'CVE' | 'CZK' | 'DJF' | 'DKK' | 'DOP' | 'DZD' | 'EGP' | 'ETB' | 'EUR' | 'FJD' | 'FKP' | 'GBP' | 'GEL' | 'GIP' | 'GMD' | 'GNF' | 'GTQ' | 'GYD' | 'HKD' | 'HNL' | 'HTG' | 'HUF' | 'IDR' | 'ILS' | 'INR' | 'ISK' | 'JMD' | 'JPY' | 'KES' | 'KGS' | 'KHR' | 'KMF' | 'KRW' | 'KYD' | 'KZT' | 'LAK' | 'LBP' | 'LKR' | 'LRD' | 'LSL' | 'MAD' | 'MDL' | 'MGA' | 'MKD' | 'MMK' | 'MNT' | 'MOP' | 'MUR' | 'MVR' | 'MWK' | 'MXN' | 'MYR' | 'MZN' | 'NAD' | 'NGN' | 'NIO' | 'NOK' | 'NPR' | 'NZD' | 'PAB' | 'PEN' | 'PGK' | 'PHP' | 'PKR' | 'PLN' | 'PYG' | 'QAR' | 'RON' | 'RSD' | 'RUB' | 'RWF' | 'SAR' | 'SBD' | 'SCR' | 'SEK' | 'SGD' | 'SHP' | 'SLE' | 'SOS' | 'SRD' | 'STD' | 'SZL' | 'THB' | 'TJS' | 'TOP' | 'TRY' | 'TTD' | 'TWD' | 'TZS' | 'UAH' | 'UGX' | 'UYU' | 'UZS' | 'VND' | 'VUV' | 'WST' | 'XAF' | 'XCD' | 'XOF' | 'XPF' | 'YER' | 'ZAR' | 'ZMW' — Currency code
    - `resources` object[]
      - `slug` string, required — The slug of the resource
      - `name` string, required — The name of the resource
      - `active` boolean

## Response `200`

Successful response

- object
  - `pricingModel` PricingModelClientSelectSchema, required
    - `id` string, required
    - `createdAt` integer, required — Epoch milliseconds.
    - `updatedAt` integer, required — Epoch milliseconds.
    - `livemode` boolean, required
    - `organizationId` string, required
    - `isDefault` boolean, required
    - `name` string, required

## Other responses

- `400` — Invalid input data
- `401` — Authorization not provided
- `403` — Insufficient access
- `404` — Not found
- `500` — Internal server error

---

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