---
title: "Update Product"
source_url: https://docs.rapyd.net/en/update-product.html
lang: en
---

# Update Product

Change or modify a product or service.

This method triggers the **Product Updated** webhook. This webhook contains the same information as the response.

### Parameters

### Request Path Parameters

- - product
  - ID of the product.

### Request Header Parameters

- - access_key
  - Unique access key provided by Rapyd for each authorized user.

    See [Developers](https://docs.rapyd.net/en/developers.md "Developers").
- - Content-Type
  - Indicates that the data appears in JSON format. Set to **application/json**.
- - idempotency
  - A unique key that prevents the platform from creating the same object twice.

    See [Idempotency](https://docs.rapyd.net/en/idempotency.md "Idempotency").
- - salt
  - Random string. Recommended length: 8-16 characters.
- - signature
  - Signature calculated for each request individually.

    See [Request Signatures](https://docs.rapyd.net/en/request-signatures.md "Request Signatures").
- - timestamp
  - Timestamp for the request, in [Unix time](https://docs.rapyd.net/en/glossary.md#UUID-945d98cf-adae-e1cf-2606-c7fae8b4a7e1_unix_time "Unix time") (seconds).

### Request Body Parameters

- - active
  - Indicates whether the product is currently available for purchase.

    true
- - attributes
  - Array of up to 5 alphanumeric strings defined by the merchant. Each string defines the key in a key-value pair in the `attributes` object in the corresponding `sku` objects.
- - images
  - Array of Base64-encoded images.
- - metadata
  - A JSON object defined by the client. See [Metadata](https://docs.rapyd.net/en/metadata.md "Metadata").
- - name
  - The name of the product or service that is displayed to the customer.
- - package_dimensions
  - Describes the physical size and weight of the product. Relevant when `type` is **goods**. Contains the following fields:

    - * `height`
    - * `length`
    - * `weight`
    - * `width`

    These fields are represented as numbers, but it is the responsibility of the merchant to define and interpret the relevant units of length and weight.
- - statement_descriptor
  - A text description that appears in the customer's invoice. Limited to 22 characters. Relevant when `type` is **service**.
- - unit_label
  - A label that represents units of this product, such as seats, on customers’ invoices. Relevant when `type` is **service**.

### Response Parameters

- - active
  - Indicates whether the product is currently available for purchase.
- - attributes
  - Array of strings. Up to 5 unique alphanumeric strings defined by the merchant. Each string defines the key in a key-value pair in the `attributes` object in the corresponding `sku` objects.
- - created_at
  - Time of creation of this product, in [Unix time](https://docs.rapyd.net/en/glossary.md#UUID-945d98cf-adae-e1cf-2606-c7fae8b4a7e1_unix_time "Unix time").
- - description
  - Full text description of the product.
- - id
  - Unique string for identification of the product.
- - images
  - Array of Base64-encoded images.
- - metadata
  - A JSON object defined by the client. See [Metadata](https://docs.rapyd.net/en/metadata.md "Metadata").
- - name
  - The name of the product or service that appears in the line items in invoices.
- - package_dimensions
  - Physical attributes of the SKU item. Object containing the following fields. These fields are represented as numbers, but it is the responsibility of the merchant to define and interpret the relevant units of length and weight.

    - - height
      - Height of the package, in units defined by the client.
    - - length
      - Length of the package, in units defined by the client.
    - - weight
      - Weight of the package, in units defined by the client.
    - - width
      - Width of the package, in units defined by the client.
- - shippable
  - Indicates whether the product can be shipped.
- - skus
  - Array of objects. An array of SKUs associated with this product. Relevant when `type` is **goods**. For more information about the 'sku' object, see [Create SKU](https://docs.rapyd.net/en/create-sku.md "Create SKU").
- - statement_descriptor
  - Description that is suitable for a customer's statement. Limited to 22 characters.

    Relevant when `type` is **service**. Must be null when `type` is **goods**.
- - type
  - One of the following:

    - **services** - Relevant to subscriptions and plans.
    - **goods** - Relevant to orders and SKUs.
- - unit_label
  - Determines what one unit of this product is called on customers’ receipts and invoices, such as minutes, viewings, kilometers or packages.

    Relevant when `type` is **service**. Must be null when `type` is **goods**.
- - updated_at
  - Time that this product was last updated, in [Unix time](https://docs.rapyd.net/en/glossary.md#UUID-945d98cf-adae-e1cf-2606-c7fae8b4a7e1_unix_time "Unix time").

### Code Samples

- - .NET

    - ```csharp
      using System;
      using System.Text.Json;

      namespace RapydApiRequestSample
      {
          class Program
          {
              static void Main(string[] args)
              {
                  try
                  {
                      string product = "product_0d9dc6be69c769560fe913f3b086d8ca";

                      var metadata = new
                      {
                          merchant_defined = true
                      };

                      string attributes = new string[] { "color", "armrest", "cover" };
                      var package_dimensions = new Object[]
                      {
                          new { height = 10 },
                          new { length = 20 },
                          new { weight = 100 },
                          new { width = 40 },
                      };

                      string result = RapydApiRequestSample.Utilities.MakeRequest("POST", $"/v1/products/{product}", request);

                      Console.WriteLine(result);
                  }
                  catch (Exception e)
                  {
                      Console.WriteLine("Error completing request: " + e.Message);
                  }
              }
          }
      }
      ```
- - JavaScript

    - ```javascript
      const makeRequest = require('<path-to-your-utility-file>/utilities').makeRequest;

      async function main() {
        try {
          const body = {
            name: 'Gamers Red Chair'
          };
          const result = await makeRequest(
            'POST',
            '/v1/products/product_5d11e30104e3b802c44a08a434aef729',
            body
          );

          console.log(result);
        } catch (error) {
          console.error('Error completing request', error);
        }
      }
      ```
- - PHP

    - ```php
      <?php
      $path = $_SERVER['DOCUMENT_ROOT'];
      $path .= "/<path-to-your-utility-file>/utilities.php";
      include($path);

      $body = [
          "name" => "Gamer's Red Chair",
          "statement_descriptor" => "",
      ];

      try {
          $object = make_request('post', '/v1/products/product_cc7ca57655ce8bc3149d318662b3b8bd', $body);
          var_dump($object);
      } catch(Exception $e) {
          echo "Error: $e";
      }
      ?>
      ```
- - Python

    - ```python
      from pprint import pprint

      from utilities import make_request

      product = {
          "name": "Gamer's Red Chair",
          "attributes": [
              "color",
              "armrest",
              "cover"
          ],
          "metadata": {
              "merchant_defined": True
          },
          "package_dimensions": {
              "height": 10,
              "length": 20,
              "weight": 100,
              "width": 40
          }
      }
      result = make_request(method='post', path='/v1/products/product_0d9dc6be69c769560fe913f3b086d8ca', body=product)
      pprint(result)
      ```

- /v1/products/:product

- Update Product - services
- ```curl
  curl -X post 'https://sandboxapi.rapyd.net/v1/products/product_6f3665c98c3e7eaae9697b80bc66a0e9' \
  -H 'access_key: your-access-key-here' \
  -H 'Content-Type: application/json' \
  -H 'idempotency: your-idempotency-parameter-here' \
  -H 'salt: your-random-string-here' \
  -H 'signature: your-calculated-signature-here' \
  -H 'timestamp: your-unix-timestamp-here' \
  --data-raw '{
      "active": true
  }'
  ```
- ```json
  {
      "status": {
          "error_code": "",
          "status": "SUCCESS",
          "message": "",
          "response_code": "",
          "operation_id": "204c7ac2-23b8-4504-98ed-4629e429d496"
      },
      "data": {
          "id": "product_8c223b4bd834dae1170b9e338494562a",
          "active": true,
          "attributes": [],
          "created_at": 1761208040,
          "description": "Monthly parking - covered area, compact car",
          "images": [],
          "metadata": {},
          "name": "Monthly parking",
          "package_dimensions": {
              "height": 0,
              "length": 0,
              "weight": 0,
              "width": 0
          },
          "shippable": false,
          "skus": [],
          "statement_descriptor": "",
          "type": "services",
          "unit_label": "",
          "updated_at": 1761208066
      }
  }
  ```

- Update Product - goods
- ```curl
  curl -X post 'https://sandboxapi.rapyd.net/v1/products/product_0d9dc6be69c769560fe913f3b086d8ca' \
  -H 'access_key: your-access-key-here' \
  -H 'Content-Type: application/json' \
  -H 'idempotency: your-idempotency-parameter-here' \
  -H 'salt: your-random-string-here' \
  -H 'signature: your-calculated-signature-here' \
  -H 'timestamp: your-unix-timestamp-here' \
  --data-raw '{
      "name": "Gamer's Red Chair",
      "attributes": [
          "color",
          "armrest",
          "cover"
      ]
  }'
  ```
- ```json
  {
      "status": {
          "error_code": "",
          "status": "SUCCESS",
          "message": "",
          "response_code": "",
          "operation_id": "13df4eab-812e-46d5-a04c-58bd9812bafc"
      },
      "data": {
          "id": "product_94f575fe0c11a26723f91db5ceef2c25",
          "active": true,
          "attributes": [
              "armrest",
              "color",
              "cover"
          ],
          "created_at": 1761206928,
          "description": "The ultimate in comfort for the dedicated gamer.",
          "images": [],
          "metadata": {},
          "name": "Gamer's Red Chair",
          "package_dimensions": {
              "height": 0,
              "length": 0,
              "weight": 0,
              "width": 0
          },
          "shippable": true,
          "skus": [],
          "statement_descriptor": "",
          "type": "goods",
          "unit_label": "",
          "updated_at": 1761207579
      }
  }
  ```
