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

# Update a product

> Update a certain product. <h3>OAuth</h3>Required scopes: <code>shop</code>



## OpenAPI

````yaml /assets/openapi.json put /shop/products/v1/{productId}
openapi: 3.0.2
info:
  title: Spacebring
  version: 1.0.0
  termsOfService: https://www.spacebring.com/terms
servers:
  - url: https://api.spacebring.com
security: []
paths:
  /shop/products/v1/{productId}:
    put:
      tags:
        - Shop
      summary: Update a product
      description: >-
        Update a certain product. <h3>OAuth</h3>Required scopes:
        <code>shop</code>
      operationId: updateProduct
      parameters:
        - name: productId
          in: path
          description: The id of the product.
          schema:
            type: string
            format: uuid
          required: true
        - in: header
          name: spacebring-network-id
          schema:
            type: string
            format: uuid
          required: false
          description: >-
            The id of the network. Required when using bearer token
            authentication
      requestBody:
        $ref: '#/components/requestBodies/updateProduct'
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                type: object
                properties:
                  product:
                    $ref: '#/components/schemas/product'
        '400':
          description: Bad Request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/responseError'
      security:
        - BasicAuth: []
        - OAuth2:
            - shop
components:
  requestBodies:
    updateProduct:
      content:
        application/json:
          schema:
            type: object
            properties:
              product:
                description: Product to update.
                type: object
                properties:
                  categoryRef:
                    description: ID of the category this product belongs to.
                    type: string
                    format: uuid
                  description:
                    description: Product description.
                    default: ''
                    type: string
                  featured:
                    description: Whether the product is featured.
                    default: false
                    type: boolean
                  media:
                    description: Media files of the product.
                    type: array
                    items:
                      type: object
                      properties:
                        key:
                          description: Storage key of the media file.
                          type: string
                      required:
                        - key
                  options:
                    description: Purchasable options for this product.
                    type: array
                    items:
                      type: object
                      properties:
                        available:
                          description: Whether this option is available for purchase.
                          default: false
                          type: boolean
                        customTax:
                          default:
                            enabled: false
                            rate: 0
                          type: object
                          properties:
                            enabled:
                              description: Whether custom tax is applied to this option.
                              default: false
                              type: boolean
                            rate:
                              description: Custom tax rate (non-negative).
                              default: 0
                              type: number
                              minimum: 0
                        description:
                          description: Option description.
                          default: ''
                          type: string
                        price:
                          description: Pricing for this option.
                          type: object
                          properties:
                            credits:
                              type: object
                              properties:
                                amount:
                                  description: Price in location credits.
                                  default: 0
                                  type: number
                                  minimum: 0
                                enabled:
                                  description: >-
                                    Whether credits payment is enabled for this
                                    option.
                                  default: false
                                  type: boolean
                            money:
                              type: object
                              properties:
                                amount:
                                  description: Price in money (location currency).
                                  default: 0
                                  type: number
                                  minimum: 0
                                enabled:
                                  description: >-
                                    Whether money payment is enabled for this
                                    option.
                                  default: false
                                  type: boolean
                          required:
                            - credits
                            - money
                        stock:
                          default:
                            enabled: false
                            quantity: 0
                          type: object
                          properties:
                            enabled:
                              description: Whether stock tracking is enabled.
                              default: false
                              type: boolean
                            quantity:
                              description: Units on hand when stock is enabled.
                              default: 0
                              type: number
                              minimum: 0
                              maximum: 1000000
                        title:
                          description: Option title.
                          type: string
                          minLength: 1
                        id:
                          description: UUID of the option to update.
                          type: string
                          format: uuid
                      required:
                        - price
                        - title
                  order:
                    description: Checkout availability settings for this product.
                    default:
                      enabled: false
                    type: object
                    properties:
                      enabled:
                        description: Whether the product can be purchased through checkout.
                        default: false
                        type: boolean
                  refundPolicy:
                    description: >-
                      Refund policy. noRefund: purchases are final. statusNew:
                      refunds allowed while order is in new state.
                    default: noRefund
                    type: string
                    enum:
                      - noRefund
                      - statusNew
                  title:
                    description: Product title.
                    type: string
                    minLength: 1
                  visibility:
                    description: >-
                      Who can see this product. public: all. admins: admins
                      only. members: location members. networkMembers: network
                      members.
                    default: public
                    type: string
                    enum:
                      - public
                      - admins
                      - members
                      - networkMembers
                required:
                  - categoryRef
                  - options
                  - title
            required:
              - product
      required: true
  schemas:
    product:
      type: object
      properties:
        categoryRef:
          description: ID of the category this product belongs to.
          type: string
          format: uuid
        createDate:
          description: ISO timestamp of when the product was created.
          type: string
          format: date-time
        description:
          description: Product description.
          type: string
        featured:
          description: Whether this product is featured.
          type: boolean
        id:
          description: Unique identifier of the product.
          type: string
          format: uuid
        imageUrl:
          deprecated: true
          description: 'Cover image URL. Deprecated: use media[0].url instead.'
          nullable: true
          type: string
        locale:
          description: Detected language locale of the product description.
          type: string
        locationRef:
          description: ID of the location this product belongs to.
          type: string
          format: uuid
        media:
          description: Media files of the product.
          type: array
          items:
            type: object
            properties:
              key:
                description: Storage key of the image.
                type: string
              url:
                description: Public URL of the image.
                type: string
            required:
              - key
            additionalProperties: false
        networkRef:
          description: ID of the network.
          type: string
          format: uuid
        options:
          description: Purchasable options for this product.
          type: array
          items:
            type: object
            properties:
              available:
                description: Whether this option can be purchased.
                type: boolean
              createDate:
                description: ISO timestamp of when the option was created.
                type: string
                format: date-time
              customTax:
                description: Custom tax settings for this option.
                type: object
                properties:
                  enabled:
                    description: Whether custom tax is applied to this option.
                    type: boolean
                  rate:
                    description: Custom tax rate.
                    type: number
                required:
                  - enabled
                  - rate
                additionalProperties: false
              description:
                description: Option description.
                type: string
              id:
                description: Unique identifier of the option.
                type: string
                format: uuid
              price:
                description: Pricing for this option.
                type: object
                properties:
                  credits:
                    description: Credits pricing.
                    type: object
                    properties:
                      amount:
                        description: Price in credits.
                        type: number
                      amountDiscounted:
                        deprecated: true
                        description: Member-visible credits price (equals list price).
                        type: number
                      enabled:
                        description: Whether credits payment is enabled for this option.
                        type: boolean
                    required:
                      - amount
                      - enabled
                    additionalProperties: false
                  money:
                    description: Money pricing.
                    type: object
                    properties:
                      amount:
                        description: Price in money.
                        type: number
                      amountDiscounted:
                        deprecated: true
                        description: Member-visible money price (equals list price).
                        type: number
                      currencyCode:
                        description: ISO 4217 currency code.
                        type: string
                      enabled:
                        description: Whether money payment is enabled for this option.
                        type: boolean
                    required:
                      - amount
                      - currencyCode
                      - enabled
                    additionalProperties: false
                required:
                  - credits
                  - money
                additionalProperties: false
              stock:
                description: Stock settings for this option.
                type: object
                properties:
                  enabled:
                    description: Whether stock tracking is enabled.
                    type: boolean
                  quantity:
                    description: Available stock quantity.
                    type: number
                required:
                  - enabled
                  - quantity
                additionalProperties: false
              title:
                description: Option title.
                type: string
            required:
              - available
              - createDate
              - customTax
              - description
              - id
              - price
              - stock
              - title
            additionalProperties: false
        order:
          description: Order settings.
          type: object
          properties:
            enabled:
              description: Whether the product can be ordered through checkout.
              type: boolean
          required:
            - enabled
          additionalProperties: false
        refundPolicy:
          description: >-
            Refund policy. noRefund: purchases are final. statusNew: refunds
            allowed while order is in new state.
          type: string
          enum:
            - noRefund
            - statusNew
        title:
          description: Product title.
          type: string
        updateDate:
          description: ISO timestamp of when the product was last updated.
          type: string
          format: date-time
        visibility:
          description: Who can see this product.
          type: string
          enum:
            - public
            - admins
            - members
            - networkMembers
      required:
        - categoryRef
        - createDate
        - description
        - featured
        - id
        - imageUrl
        - locale
        - locationRef
        - media
        - networkRef
        - options
        - order
        - refundPolicy
        - title
        - visibility
      additionalProperties: false
    responseError:
      type: object
      properties:
        message:
          type: string
        type:
          type: string
  securitySchemes:
    BasicAuth:
      type: http
      description: >-
        See our [authentication
        documentation](https://www.spacebring.com/docs/api-reference/authentication#basic-authentication)
        for how to authorize your requests
      scheme: basic
    OAuth2:
      type: oauth2
      description: >-
        See our [authentication
        documentation](https://www.spacebring.com/docs/api-reference/authentication#oauth2)
        for how to authorize your requests
      flows:
        authorizationCode:
          authorizationUrl: https://api.spacebring.com/oauth2/authorize
          tokenUrl: https://api.spacebring.com/oauth2/token
          refreshUrl: https://api.spacebring.com/oauth2/token
          scopes:
            benefits.readonly: Read benefits and applications
            benefits: Read and write benefits and applications
            community.readonly: Read community companies and memberships
            community: Read and write community companies and memberships
            events.readonly: Read events and tickets
            events: Read and write events and tickets
            feed.readonly: Read feed posts
            feed: Read and write feed posts
            invoices.readonly: Read invoices
            invoices: Read and write invoices
            locations.readonly: Read locations
            locations: Read and write locations
            plans.readonly: Read plans
            plans: Read and write plans
            resources.readonly: Read resources and bookings
            resources: Read and write resources and bookings
            subscriptions.readonly: Read subscriptions
            subscriptions: Read and write subscriptions
            shop.readonly: Read products and orders
            shop: Read and write products and orders
            support.readonly: Read support tickets
            support: Read and write support tickets
            transactions.readonly: Read transactions
            transactions: Read and write transactions
            visitors.readonly: Read visitors
            visitors: Read and write visitors

````