Skip to main content
PATCH
/
merchant
/
product
/
edit
{
  "success": false,
  "error": {
    "status": 404,
    "code": "PRODUCT_NOT_FOUND",
    "message": "Product not found"
  },
  "data": null
}
Edit an existing product.
productId
string
required
Product ID to edit
name
string
Updated product name
description
string
Updated product description
active
boolean
Whether the product is active
success
boolean
Indicates if the request was successful
data
object
Updated product data

Example Request

curl -X PATCH https://api.transaction.gg/merchant/product/edit \
  -H "Authorization: Bearer jwt_token" \
  -H "Content-Type: application/json" \
  -d '{
    "productId": "prod_X4dUuzsMaruQ4UsX",
    "name": "Updated Product Name",
    "description": "Updated description",
    "active": true
  }'

Example Response

{
  "success": true,
  "data": {
    "id": "prod_X4dUuzsMaruQ4UsX",
    "name": "Updated Product Name",
    "description": "Updated description",
    "active": true,
    "updatedAt": "2024-01-01T00:00:00Z"
  }
}

Error Responses

{
  "success": false,
  "error": {
    "status": 404,
    "code": "PRODUCT_NOT_FOUND",
    "message": "Product not found"
  },
  "data": null
}