> ## 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 subscription item

> Update a subscription item



## OpenAPI

````yaml openapi-billing.json POST /v1/subscription_items/{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/subscription_items/{id}:
    post:
      tags:
        - Subscription Items
      summary: Update a subscription item
      description: Update a subscription item
      operationId: subscription_items_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:
                description:
                  type: string
                  description: The description of the subscription item.
                metadata:
                  type:
                    - object
                    - 'null'
                  additionalProperties:
                    type: string
                  description: Set of key-value pairs to attach to the subscription item.
                price_data:
                  type: object
                  properties:
                    amount:
                      type: number
                      description: The amount of the price.
                    tax_percent:
                      type: number
                      description: The tax percentage to apply to the price.
                  required:
                    - amount
                    - tax_percent
                  description: The price data for the subscription item.
                proration_behavior:
                  type: string
                  enum:
                    - create_prorations
                    - none
                  description: >-
                    Whether to create prorations when updating the subscription
                    item.
                schedule:
                  type:
                    - array
                    - 'null'
                  items:
                    type: object
                    properties:
                      amount:
                        type: integer
                        description: The amount for the scheduled change.
                      effective_at:
                        type: integer
                        description: The date the scheduled change takes effect.
                      effective_at_config:
                        type: object
                        properties:
                          day:
                            type: integer
                            minimum: 1
                            maximum: 31
                            description: >-
                              The day of the month the scheduled change takes
                              effect.
                          month:
                            type: integer
                            minimum: 1
                            maximum: 12
                            description: The month the scheduled change takes effect.
                          year:
                            type: integer
                            description: The year the scheduled change takes effect.
                        required:
                          - day
                          - month
                          - year
                        description: >-
                          Configuration to compute the effective date of the
                          scheduled change.
                    required:
                      - amount
                  description: The schedule for the subscription item.
                tax_rate:
                  type: string
                  description: The identifier of the tax rate for the subscription item.
                transfer_behavior:
                  type: string
                  enum:
                    - automatic
                    - owner
                    - none
                  description: The transfer behavior for the subscription item.
                transfer_destination:
                  type: string
                  description: >-
                    The identifier of the connected account to transfer funds
                    to.
              required:
                - price_data
      responses:
        '200':
          description: Update a subscription item
          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:
                      - subscription_item
                  description:
                    type:
                      - string
                      - 'null'
                    description: The description of the subscription item.
                  metadata:
                    type:
                      - object
                      - 'null'
                    additionalProperties:
                      type: string
                    description: Set of key-value pairs attached to the subscription item.
                  price:
                    type:
                      - string
                      - 'null'
                    pattern: ^[a-zA-Z0-9_]+$
                    description: The identifier of the price for the subscription item.
                  price_data:
                    type: object
                    properties:
                      amount:
                        type: number
                        description: The amount of the price.
                      currency:
                        type: string
                        enum:
                          - gbp
                          - usd
                          - eur
                          - sek
                        description: The currency of the price.
                        example: gbp
                      recurring:
                        type:
                          - object
                          - 'null'
                        properties:
                          interval:
                            type: string
                            description: The billing interval for the price.
                          interval_count:
                            type: number
                            description: >-
                              The number of intervals between each billing
                              cycle.
                        required:
                          - interval
                          - interval_count
                        description: The recurring settings for the price.
                      tax_percent:
                        type: number
                        description: The tax percentage to apply to the price.
                      type:
                        type: string
                        enum:
                          - recurring
                          - one_time
                        description: The type of the price.
                    required:
                      - amount
                      - currency
                      - recurring
                      - tax_percent
                      - type
                    description: The price data for the subscription item.
                  schedule:
                    type:
                      - array
                      - 'null'
                    items:
                      type: object
                      properties:
                        amount:
                          type: number
                          description: The amount for the scheduled change.
                        effective_at:
                          type: integer
                          description: The date the scheduled change takes effect.
                      required:
                        - amount
                        - effective_at
                    description: The schedule for the subscription item.
                  subscription:
                    type: string
                    pattern: ^[a-zA-Z0-9_]+$
                    description: The identifier of the subscription the item belongs to.
                  tax_rate:
                    type:
                      - string
                      - 'null'
                    pattern: ^[a-zA-Z0-9_]+$
                    description: The identifier of the tax rate for the subscription item.
                  transfer_behavior:
                    type:
                      - string
                      - 'null'
                    enum:
                      - automatic
                      - owner
                      - none
                      - null
                    description: The transfer behavior for the subscription item.
                  transfer_destination:
                    type:
                      - string
                      - 'null'
                    pattern: ^[a-zA-Z0-9_]+$
                    description: >-
                      The identifier of the connected account to transfer funds
                      to.
                  type:
                    type: string
                    enum:
                      - charge
                      - rent
                      - product
                    description: The type of the subscription item.
                  unit:
                    type:
                      - string
                      - 'null'
                    pattern: ^[a-zA-Z0-9_]+$
                    description: >-
                      The identifier of the unit associated with the
                      subscription item.
                required:
                  - id
                  - created
                  - object
                  - description
                  - price
                  - price_data
                  - schedule
                  - subscription
                  - tax_rate
                  - transfer_behavior
                  - transfer_destination
                  - type
                  - unit
      security:
        - ApiKeyAuth: []
components:
  securitySchemes:
    ApiKeyAuth:
      type: apiKey
      in: header
      name: Authorization
      description: API Key authentication. Use "Bearer YOUR_API_KEY".

````