Skip to main content
PATCH
/
api
/
products
/
{id}
Update Product
curl --request PATCH \
  --url https://qwoty.app/api/products/{id} \
  --header 'Authorization: <authorization>' \
  --header 'Content-Type: application/json' \
  --data '
{
  "name": "<string>",
  "description": "<string>",
  "description_inherit_from_product": true,
  "primary_image_inherit_from_product": true,
  "reference": "<string>",
  "is_active": true,
  "category_ids": [
    {}
  ],
  "inventory[sku]": "<string>",
  "settings[unit_per_pack]": 123,
  "accounting[ledger_account]": "<string>",
  "identifiers[crm]": "<string>",
  "identifiers[erp]": "<string>",
  "identifiers[accounting]": "<string>",
  "shipping[weight]": 123,
  "shipping[weight_unit]": "<string>",
  "shipping[height]": 123,
  "shipping[length]": 123,
  "shipping[width]": 123,
  "shipping[length_unit]": "<string>",
  "shipping[country_of_origin]": "<string>",
  "shipping[harmonized_system_code]": "<string>",
  "primary_image_id": "<string>"
}
'
{
  "success": true,
  "data": {
    "id": "550e8400-e29b-41d4-a716-446655440000",
    "product_parent_id": "660e8400-e29b-41d4-a716-446655440001",
    "workspace_id": "880e8400-e29b-41d4-a716-446655440003",
    "name": "Updated Product Name",
    "api_name": "updated_product_name",
    "reference": "PROD-001",
    "description": "Updated description",
    "description_inherit_from_product": true,
    "primary_image_inherit_from_product": true,
    "is_active": false,
    "is_default": true,
    "catalog_ids": ["770e8400-e29b-41d4-a716-446655440002"],
    "category_ids": [],
    "settings": {
      "unit_per_pack": 1,
      "product_type": "physical",
      "language_id": null,
      "unit_of_measure": null,
      "recurrence_type": "one_off"
    },
    "shipping": {
      "weight": 2.8,
      "weight_unit": "kg",
      "length": 30,
      "width": 20,
      "height": 10,
      "length_unit": "cm",
      "country_of_origin": "FR",
      "harmonized_system_code": "8471.30"
    },
    "inventory": {
      "sku": "WID-PRE-001"
    },
    "identifiers": {
      "crm": "crm_123",
      "accounting": "acc_789",
      "erp": "erp_456"
    },
    "accounting": {
      "ledger_account": "4010"
    },
    "primary_image_id": null,
    "parent_primary_image_id": null,
    "options": [],
    "created_at": "2024-12-21T10:30:00Z",
    "updated_at": "2024-12-21T14:45:00Z"
  }
}

Documentation Index

Fetch the complete documentation index at: https://docs.qwoty.io/llms.txt

Use this file to discover all available pages before exploring further.

Authorization

Authorization
string
required
Bearer token for authentication. Format: Bearer qwoty_your_token

Path Parameters

id
string
required
UUID of the product to update

Request Body

name
string
Product name
description
string
Product description
description_inherit_from_product
boolean
Whether to inherit description from parent product
primary_image_inherit_from_product
boolean
Whether to inherit primary image from parent product
reference
string
Internal reference
is_active
boolean
Active status
category_ids
array
Category UUIDs to link to the parent product. Replaces all existing category links.
inventory[sku]
string
Stock Keeping Unit
settings[unit_per_pack]
number
Number of units per pack
accounting[ledger_account]
string
Ledger account code
identifiers[crm]
string
External CRM ID
identifiers[erp]
string
External ERP ID
identifiers[accounting]
string
External accounting ID
shipping[weight]
number
Shipping weight
shipping[weight_unit]
string
Shipping weight unit (kg, lbs)
shipping[height]
number
Shipping height
shipping[length]
number
Shipping length
shipping[width]
number
Shipping width
shipping[length_unit]
string
Shipping length unit (cm, in, etc.)
shipping[country_of_origin]
string
Country of origin for shipping
shipping[harmonized_system_code]
string
HS code for customs
primary_image_id
string
UUID of the primary media to associate with this product. Set to null to remove the primary image.
Fields such as api_name are creation-only: they may appear on the resource but cannot be sent in a PATCH body (the API returns 400 with a validation detail if they are).

Examples

curl -X PATCH https://qwoty.app/api/products/550e8400-e29b-41d4-a716-446655440000 \
  -H "Authorization: Bearer qwoty_your_token" \
  -H "Content-Type: application/json" \
  -d '{
    "name": "Updated Product Name",
    "description": "Updated description",
    "is_active": false
  }'

Response

success
boolean
Indicates if the request was successful
data
object
The updated product object with all fields
{
  "success": true,
  "data": {
    "id": "550e8400-e29b-41d4-a716-446655440000",
    "product_parent_id": "660e8400-e29b-41d4-a716-446655440001",
    "workspace_id": "880e8400-e29b-41d4-a716-446655440003",
    "name": "Updated Product Name",
    "api_name": "updated_product_name",
    "reference": "PROD-001",
    "description": "Updated description",
    "description_inherit_from_product": true,
    "primary_image_inherit_from_product": true,
    "is_active": false,
    "is_default": true,
    "catalog_ids": ["770e8400-e29b-41d4-a716-446655440002"],
    "category_ids": [],
    "settings": {
      "unit_per_pack": 1,
      "product_type": "physical",
      "language_id": null,
      "unit_of_measure": null,
      "recurrence_type": "one_off"
    },
    "shipping": {
      "weight": 2.8,
      "weight_unit": "kg",
      "length": 30,
      "width": 20,
      "height": 10,
      "length_unit": "cm",
      "country_of_origin": "FR",
      "harmonized_system_code": "8471.30"
    },
    "inventory": {
      "sku": "WID-PRE-001"
    },
    "identifiers": {
      "crm": "crm_123",
      "accounting": "acc_789",
      "erp": "erp_456"
    },
    "accounting": {
      "ledger_account": "4010"
    },
    "primary_image_id": null,
    "parent_primary_image_id": null,
    "options": [],
    "created_at": "2024-12-21T10:30:00Z",
    "updated_at": "2024-12-21T14:45:00Z"
  }
}

Error Responses

{
  "success": false,
  "error": "Product not found"
}