> ## Documentation Index
> Fetch the complete documentation index at: https://docs.creem.io/llms.txt
> Use this file to discover all available pages before exploring further.

# Update a product

> Update a product. Only supplied fields change; changing a price field mints a new default price while existing subscriptions keep the price they were purchased under.



## OpenAPI

````yaml patch /v1/products/{id}
openapi: 3.0.0
info:
  title: Creem API
  description: >-
    Creem is an all-in-one platform for managing subscriptions and recurring
    revenue, tailored specifically for today's SaaS companies. It enables you to
    boost revenue, enhance customer retention, and scale your operations
    seamlessly.
  version: v1
  contact:
    name: Creem Support
    url: https://creem.io
    email: support@creem.io
  license:
    name: Commercial
    url: https://creem.io/terms
  termsOfService: https://creem.io/terms
servers:
  - url: https://api.creem.io
    description: Production — live API for processing real transactions and data.
    x-speakeasy-server-id: prod
  - url: https://test-api.creem.io
    description: Test — sandbox API for development and testing with no real charges.
    x-speakeasy-server-id: test
security: []
tags: []
externalDocs:
  description: Creem Documentation
  url: https://docs.creem.io
paths:
  /v1/products/{id}:
    patch:
      tags:
        - Products
      summary: Update a product
      description: >-
        Update a product. Only supplied fields change. Changing a price field
        mints a new default price; existing subscriptions keep the price they
        were purchased under.
      operationId: updateProduct
      parameters:
        - name: id
          required: true
          in: path
          description: The product ID
          schema:
            type: string
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/UpdateProductRequestEntity'
      responses:
        '200':
          description: Successfully updated the product
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ProductEntity'
        '400':
          description: Bad Request - Invalid input parameters
        '401':
          description: Unauthorized - Invalid or missing API key
        '404':
          description: Not Found - Resource does not exist
      security:
        - ApiKey: []
components:
  schemas:
    UpdateProductRequestEntity:
      type: object
      description: >-
        Product update payload. Only supplied fields change. Changing a price
        field mints a new default price; existing subscriptions keep the price
        they were purchased under.
      properties:
        name:
          type: string
          description: Name of the product
        description:
          type: string
          description: Description of the product
        image_url:
          type: string
          description: URL of the product image
          example: https://picsum.photos/200/300
        default_success_url:
          type: string
          description: >-
            The URL to which the user will be redirected after successfull
            payment.
          example: https://example.com/?status=successful
        price:
          type: integer
          description: >-
            The price of the product in cents. Must be 0 (free product) or at
            least 100 (one whole unit of the currency).
          example: 400
        currency:
          $ref: '#/components/schemas/ProductCurrency'
          example: USD
        billing_type:
          $ref: '#/components/schemas/ProductRequestBillingType'
          example: recurring
        billing_period:
          $ref: '#/components/schemas/ProductRequestBillingPeriod'
          example: every-month
        tax_mode:
          $ref: '#/components/schemas/TaxMode'
          example: inclusive
        pay_what_you_want:
          type: boolean
          description: >-
            Enable pay-what-you-want pricing: the customer chooses the amount at
            checkout. The `price` field acts as the minimum the customer must
            pay. Only supported for one-time payment products.
          example: false
        suggested_price:
          type: integer
          description: >-
            Suggested amount in cents, pre-filled at checkout when
            pay_what_you_want is enabled. Must be greater than or equal to
            `price` (the minimum). Ignored when pay_what_you_want is disabled.
          example: 1500
    ProductEntity:
      type: object
      properties:
        id:
          type: string
          description: Unique identifier for the object.
        mode:
          $ref: '#/components/schemas/EnvironmentMode'
        object:
          type: string
          description: >-
            String representing the object's type. Objects of the same type
            share the same value.
        name:
          type: string
          description: The name of the product
        description:
          type: string
          description: A brief description of the product
          example: This is a sample product description.
        image_url:
          type: string
          description: URL of the product image. Only png as jpg are supported
          example: https://example.com/image.jpg
        features:
          description: Features of the product.
          type: array
          items:
            $ref: '#/components/schemas/FeatureEntity'
        price:
          type: number
          description: The price of the product in cents. 1000 = $10.00
          example: 400
        currency:
          type: string
          description: >-
            Three-letter ISO currency code, in uppercase. Must be a supported
            currency.
          example: USD
        billing_type:
          $ref: '#/components/schemas/ProductBillingType'
          example: recurring
        billing_period:
          $ref: '#/components/schemas/ProductBillingPeriod'
          example: every-month
        status:
          $ref: '#/components/schemas/ProductStatus'
        tax_mode:
          $ref: '#/components/schemas/TaxMode'
          example: inclusive
        tax_category:
          $ref: '#/components/schemas/TaxCategory'
          example: saas
        product_url:
          type: string
          description: >-
            The product page you can redirect your customers to for express
            checkout.
          example: https://creem.io/product/prod_123123123123
        default_success_url:
          type: string
          description: >-
            The URL to which the user will be redirected after successfull
            payment.
          example: https://example.com/?status=successful
          nullable: true
        custom_fields:
          description: >-
            Custom fields configured for the product. Collect additional
            information from your customer during checkout.
          nullable: true
          type: array
          items:
            $ref: '#/components/schemas/CustomField'
        created_at:
          format: date-time
          type: string
          description: Creation date of the product
          example: '2023-01-01T00:00:00Z'
        updated_at:
          format: date-time
          type: string
          description: Last updated date of the product
          example: '2023-01-01T00:00:00Z'
      required:
        - id
        - mode
        - object
        - name
        - description
        - price
        - currency
        - billing_type
        - billing_period
        - status
        - tax_mode
        - tax_category
        - created_at
        - updated_at
    ProductCurrency:
      type: string
      description: >-
        Three-letter ISO currency code, in uppercase. Must be a supported
        currency.
      enum:
        - EUR
        - USD
    ProductRequestBillingType:
      type: string
      description: >-
        Indicates the billing method for the customer. It can either be a
        `recurring` billing cycle or a `onetime` payment.
      enum:
        - recurring
        - onetime
    ProductRequestBillingPeriod:
      type: string
      description: Billing period, required if billing_type is recurring
      enum:
        - once
        - every-day
        - every-month
        - every-three-months
        - every-six-months
        - every-year
    TaxMode:
      type: string
      description: >-
        Specifies the tax calculation mode for the transaction. If set to
        "inclusive," the tax is included in the price. If set to "exclusive,"
        the tax is added on top of the price.
      enum:
        - inclusive
        - exclusive
    EnvironmentMode:
      type: string
      description: String representing the environment.
      enum:
        - test
        - prod
        - sandbox
    FeatureEntity:
      type: object
      properties:
        id:
          type: string
          description: Unique identifier for the feature.
          example: feat_abc123
        type:
          $ref: '#/components/schemas/ProductFeatureType'
          example: licenseKey
        description:
          type: string
          description: A brief description of the feature.
          example: Access to premium course materials.
      required:
        - id
        - type
        - description
    ProductBillingType:
      type: string
      description: >-
        Indicates the billing method for the customer. It can either be a
        `recurring` billing cycle or a `onetime` payment.
      enum:
        - recurring
        - onetime
    ProductBillingPeriod:
      type: string
      description: Billing period
      enum:
        - every-month
        - every-three-months
        - every-six-months
        - every-year
        - every-day
        - once
    ProductStatus:
      type: string
      description: Status of the product
      enum:
        - active
        - archived
    TaxCategory:
      type: string
      description: >-
        Categorizes the type of product or service for tax purposes. This helps
        determine the applicable tax rules based on the nature of the item or
        service.
      enum:
        - saas
        - digital-goods-service
        - ebooks
    CustomField:
      type: object
      properties:
        type:
          $ref: '#/components/schemas/CustomFieldType'
        key:
          type: string
          description: >-
            Unique key for custom field. Must be unique to this field,
            alphanumeric, and up to 200 characters.
          maxLength: 200
        label:
          type: string
          description: >-
            The label for the field, displayed to the customer, up to 50
            characters
          maxLength: 200
        optional:
          type: boolean
          description: >-
            Whether the customer is required to complete the field. Defaults to
            `false`.
          nullable: true
        text:
          description: Configuration for text field type.
          nullable: true
          allOf:
            - $ref: '#/components/schemas/Text'
        checkbox:
          description: Configuration for checkbox field type.
          nullable: true
          allOf:
            - $ref: '#/components/schemas/Checkbox'
      required:
        - type
        - key
        - label
    ProductFeatureType:
      type: string
      description: >-
        The type of the feature: privateNote (custom note), file (downloadable
        files), or licenseKey (license key).
      enum:
        - custom
        - file
        - licenseKey
        - customerCredits
    CustomFieldType:
      type: string
      description: The type of the field.
      enum:
        - text
        - checkbox
    Text:
      type: object
      properties:
        max_length:
          type: number
          description: Maximum character length constraint for the input.
          nullable: true
        minimum_length:
          type: number
          description: Minimum character length requirement for the input.
          nullable: true
        value:
          type: string
          description: The value of the input.
          nullable: true
    Checkbox:
      type: object
      properties:
        label:
          type: string
          description: The markdown text to display for the checkbox.
          nullable: true
        value:
          type: boolean
          description: The value of the checkbox (checked or not).
          nullable: true
  securitySchemes:
    ApiKey:
      type: apiKey
      in: header
      name: x-api-key
      description: >-
        API key for authentication. You can find your API key in the Creem
        dashboard under Settings > API Keys.

````