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

# Update Product

> Update product name, price, description, or variants



## OpenAPI

````yaml post /v1/products/{product_id}
openapi: 3.1.1
info:
  title: HitPay API
  description: >-
    Accept PayNow, FPX, QRIS, GrabPay, cards, and 40+ payment methods with a
    single API. Production base URL: https://api.hit-pay.com, Sandbox:
    https://api.sandbox.hit-pay.com
  version: '1.0'
servers:
  - url: https://api.hit-pay.com
    description: Production
  - url: https://api.sandbox.hit-pay.com
    description: Sandbox
security: []
paths:
  /v1/products/{product_id}:
    post:
      summary: Update the product
      description: This endpoint allows you to update the product.
      operationId: update-product
      parameters:
        - name: X-BUSINESS-API-KEY
          in: header
          required: true
          style: simple
          explode: false
          schema:
            type: string
            example: b286daabf9921b5a01a4621f026c111e046f8911feba212996c92159b98427d
        - name: product_id
          in: path
          required: true
          schema:
            type: string
      requestBody:
        content:
          multipart/form-data:
            schema:
              type: object
              properties:
                name:
                  type: string
                  examples:
                    - Product Beanie
                  description: The name of the product
                description:
                  type: string
                  description: The description of the product
                headline:
                  type: string
                  description: The headline of the product
                quantity:
                  type: number
                  examples:
                    - 1
                  description: The quantity of the product
                  minimum: 0
                quantity_alert_level:
                  type: number
                  examples:
                    - 1
                  description: >-
                    The quantity alert level of the product. It is required when
                    quantity alert level is present.
                  minimum: 0
                currency:
                  type: string
                  description: The currency of the product
                  example: sgd
                price:
                  type: number
                  description: The price of the product
                category_ids:
                  type: array
                  description: The list of business product category ids of the product
                  items:
                    type: string
                    format: uuid
                    description: The category ids of the product
                    example: 9a12fab0-d282-4437-9460-c3d26662d11a
                  example:
                    - 9a12fab0-d282-4437-9460-c3d26662d11a
                is_manageable:
                  type: string
                  description: The is manageable of the product
                  enum:
                    - '1'
                    - '0'
                  default: '1'
                is_pinned:
                  type: string
                  description: The is pinned of the product
                  enum:
                    - '1'
                    - '0'
                  default: '0'
                product_weight:
                  type: integer
                  description: Weight in gram
                  nullable: true
                delivery_method_required:
                  type: boolean
                  nullable: true
                existing_variation:
                  type: array
                  items:
                    type: object
                    properties:
                      id:
                        type: string
                        format: uuid
                      image:
                        type: string
                        format: binary
                      price:
                        type: number
                      quantity:
                        type: integer
                      quantity_alert_level:
                        type: integer
                      product_variation_weight:
                        type: integer
                        description: Weight in gram
                        nullable: true
                      variation_value_1:
                        type: string
                      variation_value_2:
                        type: string
                        nullable: true
                      variation_value_3:
                        type: string
                        nullable: true
                    required:
                      - id
                      - price
                      - quantity
                      - quantity_alert_level
                images:
                  type: array
                  items:
                    type: object
                    properties:
                      image:
                        type: string
                        format: binary
                publish:
                  type: string
                  enum:
                    - '1'
                    - '0'
                  default: '1'
                _method:
                  type: string
                  default: PATCH
                  value: PATCH
              required:
                - name
                - price
      responses:
        '200':
          description: '200'
          content:
            application/json:
              examples:
                Result:
                  value:
                    id: 9a12fab4-d112-48af-9d6b-050d650b0a25
                    business_id: 9130c422-bf97-4bd1-b370-07a3a6f40708
                    category_id:
                      - 9a12fab0-d282-4437-9460-c3d26662d11a
                    name: Beanie
                    headline: null
                    description: <p>Stylish hat suitable for the winter.</p>
                    currency: SGD
                    price: 15
                    price_display: SGD 15.00
                    price_stored: 1500
                    tax_id: null
                    is_manageable: 1
                    is_pinned: false
                    status: published
                    product_weight: 250
                    delivery_method_required: true
                    has_variations: true
                    is_shopify: false
                    product_url: <string>
                    variations_count: 2
                    variations:
                      - id: 9a12fab4-d998-44ea-ad11-8753be88a1c9
                        stock_keeping_unit: null
                        description: Medium
                        weight: null
                        length: null
                        width: null
                        depth: null
                        price: 18
                        price_display: SGD 18.00
                        price_stored: 1800
                        quantity: 150
                        quantity_alert_level: 10
                        product_variation_weight: 250
                        variation_value_1: Medium
                        variation_value_2: null
                        variation_value_3: null
                      - id: 9a12fab4-dd20-4f8f-9e74-de28629f863a
                        stock_keeping_unit: null
                        description: Large
                        weight: null
                        length: null
                        width: null
                        depth: null
                        price: 20
                        price_display: SGD 20.00
                        price_stored: 2000
                        quantity: 148
                        quantity_alert_level: 10
                        product_variation_weight: 255
                        variation_value_1: Large
                        variation_value_2: null
                        variation_value_3: null
                    variation_key_1: Size
                    variation_key_2: null
                    variation_key_3: null
                    images:
                      - id: 9a12fab6-1e76-448e-8c45-e84e2e38f294
                        caption: Beanie
                        url: <string>
                        other_dimensions:
                          - size: icon
                            path: <string>
                          - size: large
                            path: <string>
                          - size: small
                            path: <string>
                          - size: medium
                            path: <string>
                          - size: thumbnail
                            path: <string>
                    is_published: true
                    created_at: '2023-09-07T13:04:22+08:00'
                    updated_at: '2023-09-18T14:36:54+08:00'
                    starts_at: null
                    ends_at: null
              schema:
                type: object
                properties:
                  id:
                    type: string
                  business_id:
                    type: string
                  category_id:
                    type: array
                    items:
                      type: string
                  name:
                    type: string
                  headline:
                    type: string
                    nullable: true
                  description:
                    type: string
                  currency:
                    type: string
                  price:
                    type: number
                  price_display:
                    type: string
                  price_stored:
                    type: integer
                  tax_id:
                    type: string
                    nullable: true
                  is_manageable:
                    type: integer
                  is_pinned:
                    type: boolean
                  status:
                    type: string
                  has_variations:
                    type: boolean
                  is_shopify:
                    type: boolean
                  product_url:
                    type: string
                  variations_count:
                    type: integer
                  variations:
                    type: array
                    items:
                      type: object
                      properties:
                        id:
                          type: string
                        stock_keeping_unit:
                          type: string
                          nullable: true
                        description:
                          type: string
                        weight:
                          type: string
                          nullable: true
                        length:
                          type: string
                          nullable: true
                        width:
                          type: string
                          nullable: true
                        depth:
                          type: string
                          nullable: true
                        price:
                          type: number
                        price_display:
                          type: string
                        price_stored:
                          type: integer
                        quantity:
                          type: integer
                        quantity_alert_level:
                          type: integer
                        variation_value_1:
                          type: string
                        variation_value_2:
                          type: string
                          nullable: true
                        variation_value_3:
                          type: string
                          nullable: true
                      required:
                        - id
                        - stock_keeping_unit
                        - description
                        - weight
                        - length
                        - width
                        - depth
                        - price
                        - price_display
                        - price_stored
                        - quantity
                        - quantity_alert_level
                        - variation_value_1
                        - variation_value_2
                        - variation_value_3
                  variation_key_1:
                    type: string
                    nullable: true
                  variation_key_2:
                    type: string
                    nullable: true
                  variation_key_3:
                    type: string
                    nullable: true
                  images:
                    type: array
                    items:
                      type: object
                      properties:
                        id:
                          type: string
                        caption:
                          type: string
                          nullable: true
                        url:
                          type: string
                        other_dimensions:
                          type: array
                          items:
                            type: object
                            properties:
                              size:
                                type: string
                              path:
                                type: string
                      required:
                        - id
                        - caption
                        - url
                        - other_dimensions
                  is_published:
                    type: boolean
                  created_at:
                    type: string
                    format: date-time
                  updated_at:
                    type: string
                    format: date-time
                  starts_at:
                    type: string
                    format: date-time
                    nullable: true
                  ends_at:
                    type: string
                    format: date-time
                    nullable: true
                required:
                  - id
                  - business_id
                  - category_id
                  - name
                  - description
                  - currency
                  - price
                  - price_display
                  - price_stored
                  - is_manageable
                  - is_pinned
                  - status
                  - has_variations
                  - is_shopify
                  - product_url
                  - variations_count
                  - variations
                  - is_published
                  - created_at
                  - updated_at
        '422':
          description: '422'
          content:
            application/json:
              examples:
                Result:
                  value: >-
                    {"message":"The given data was
                    invalid.","errors":{"name":["The name field is required."]}}
              schema:
                type: object
                properties:
                  message:
                    type: string
                  errors:
                    type: object
                    properties:
                      name:
                        type: array
                        items:
                          type: string
      deprecated: false

````