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

# Update a product

> Update a product



## OpenAPI

````yaml openapi-billing.json POST /v1/products/{id}
openapi: 3.1.0
info:
  title: Yorlet Billing API
  description: APIs for managing invoices, coupons, credit grants, and subscription items.
  version: 1.0.0
servers:
  - url: https://api.yorlet.com
    description: Production
  - url: https://api.yorlet.io
    description: Sandbox
security: []
paths:
  /v1/products/{id}:
    post:
      tags:
        - Products
      summary: Update a product
      description: Update a product
      operationId: products_update
      parameters:
        - schema:
            type: string
            description: The id identifier.
          required: true
          description: The id identifier.
          name: id
          in: path
      requestBody:
        content:
          application/json:
            schema:
              type: object
              properties:
                active:
                  type: boolean
                  description: Whether the product is active.
                description:
                  type: string
                  description: The description of the product.
                metadata:
                  type:
                    - object
                    - 'null'
                  additionalProperties:
                    type: string
                  description: >-
                    Set of key-value pairs that you can attach to an object.
                    This can be useful for storing additional information about
                    the object in a structured format.
                statement_descriptor:
                  type: string
                  description: The statement descriptor for the product.
                name:
                  type: string
                  description: The name of the product.
                default_price:
                  type: string
                  pattern: ^[a-zA-Z0-9_]+$
                  description: The price ID to set as the default price for the product.
      responses:
        '200':
          description: Returns the product object if the update succeeded.
          content:
            application/json:
              schema:
                type: object
                properties:
                  id:
                    type: string
                    description: Unique identifier for the object.
                  created:
                    type: number
                    description: >-
                      Time at which the object was created. Measured in seconds
                      since the Unix epoch.
                  account:
                    type: string
                    description: >-
                      The account that the object belongs to. Only returned if
                      the request is made with a valid Yorlet-Context header.
                  deleted:
                    type: boolean
                    default: false
                    description: Only returned if the object has been deleted.
                  object:
                    type: string
                    enum:
                      - product
                  active:
                    type: boolean
                    description: Whether the product is active.
                  default_price:
                    anyOf:
                      - type: string
                      - type: object
                        additionalProperties: {}
                      - type: 'null'
                    description: The default price for the product.
                  description:
                    type:
                      - string
                      - 'null'
                    description: The description of the product.
                  name:
                    type: string
                    description: The name of the product.
                  metadata:
                    type:
                      - object
                      - 'null'
                    additionalProperties:
                      type: string
                    description: >-
                      Set of key-value pairs that you can attach to an object.
                      This can be useful for storing additional information
                      about the object in a structured format.
                  statement_descriptor:
                    type:
                      - string
                      - 'null'
                    description: The statement descriptor for the product.
                required:
                  - id
                  - created
                  - object
                  - active
                  - default_price
                  - description
                  - name
                  - statement_descriptor
      security:
        - ApiKeyAuth: []
components:
  securitySchemes:
    ApiKeyAuth:
      type: apiKey
      in: header
      name: Authorization
      description: API Key authentication. Use "Bearer YOUR_API_KEY".

````