Product question answers

PATCH /product-question-answers/{id}

Edit an answer, or publish and unpublish it. Publishing a shopper's answer is how it reaches the storefront.

Requires the reviews:write permission.

Path Parameters

idstring (uuid)required

The ID of the answer.

Body Parameters

bodystring

What to tell the shopper who asked, up to 2000 characters.

authorNamestring

The name shown above the answer.

publishedboolean

Whether the answer is visible on the storefront. This is the moderation switch for answers shoppers wrote.

metadataobject

Replaces the answer's metadata wholesale. Omit to leave it alone.

Request
curl \
  -X PATCH \
  "https://api.cascade.dev/product-question-answers/550e8400-e29b-41d4-a716-446655440000" \
  -H "Authorization: Bearer sk_YOUR_SECRET_KEY" \
  -H "Content-Type: application/json" \
  -d '{
  "body": "string",
  "authorName": "string",
  "published": true,
  "metadata": "..."
}'
Response
{
  "id": "550e8400-e29b-41d4-a716-446655440000",
  "productQuestionId": "550e8400-e29b-41d4-a716-446655440000",
  "body": "string",
  "authorType": "merchant",
  "authorName": "string",
  "userId": "550e8400-e29b-41d4-a716-446655440000",
  "customerId": "550e8400-e29b-41d4-a716-446655440000",
  "published": true,
  "moderatedAt": "2025-01-15T09:30:00Z",
  "flagged": true,
  "flags": [
    {
      "code": "string",
      "detail": "string",
      "score": 0
    }
  ],
  "metadata": "...",
  "createdAt": "2025-01-15T09:30:00Z",
  "updatedAt": "2025-01-15T09:30:00Z"
}

DELETE /product-question-answers/{id}

Delete an answer. The question and its other answers are untouched. To hide an answer without losing it, unpublish it instead.

Requires the reviews:write permission.

Path Parameters

idstring (uuid)required

The ID of the answer.

Request
curl \
  -X DELETE \
  "https://api.cascade.dev/product-question-answers/550e8400-e29b-41d4-a716-446655440000" \
  -H "Authorization: Bearer sk_YOUR_SECRET_KEY"
Response
{
  "id": "550e8400-e29b-41d4-a716-446655440000",
  "productQuestionId": "550e8400-e29b-41d4-a716-446655440000",
  "body": "string",
  "authorType": "merchant",
  "authorName": "string",
  "userId": "550e8400-e29b-41d4-a716-446655440000",
  "customerId": "550e8400-e29b-41d4-a716-446655440000",
  "published": true,
  "moderatedAt": "2025-01-15T09:30:00Z",
  "flagged": true,
  "flags": [
    {
      "code": "string",
      "detail": "string",
      "score": 0
    }
  ],
  "metadata": "...",
  "createdAt": "2025-01-15T09:30:00Z",
  "updatedAt": "2025-01-15T09:30:00Z"
}