Products

Update Product

Update an existing trade product. Only products belonging to the organization associated with the API key can be updated.

PUT
/v1/products/{productId}

Authorization

bearerAuth
AuthorizationBearer <token>

Bearer token authentication for API access.

In: header

Path Parameters

productId?number

The unique identifier of the product

Request Body

application/json

TypeScript Definitions

Use the request body type in TypeScript.

Request body for updating a product

Response Body

application/json

application/json

application/json

application/json

application/json

application/json

curl -X PUT "https://example.com/v1/products/{productId}" \  -H "Content-Type: application/json" \  -d '{}'
{  "product": {    "id": 456,    "name": "Premium Granite Countertop",    "description": "High-quality granite countertop with polished finish",    "tradeCategoryId": 2,    "pricingType": "FIXED",    "price": 299.99,    "maxPrice": 499.99,    "isDisclosePrice": true,    "faqs": [      {        "question": "What materials do you use?",        "answer": "We use high-quality granite sourced locally."      }    ],    "isActive": true,    "createdAt": "2023-01-01T00:00:00.000Z",    "updatedAt": "2023-01-20T14:00:00.000Z"  }}
{  "success": false,  "message": "Bad request",  "error": {    "status": 400,    "message": "Bad request"  }}
{  "success": false,  "message": "Invalid or expired token",  "error": {    "status": 401,    "message": "Invalid or expired token"  }}
{  "success": false,  "message": "Not found",  "error": {    "status": 404,    "message": "Not found"  }}
{  "success": false,  "message": "Conflict",  "error": {    "status": 409,    "message": "Conflict"  }}
{  "success": false,  "message": "Internal server error",  "error": {    "status": 500,    "message": "Internal server error"  }}