POST · Supprimer un commentaire

Feedback : Supprimer un commentaire. Paramètres, accès et exemples de réponse.

Rédigé par Red Blue

Mis à jour le

Feedback

POST /api/v1/feedback/comments/delete

operationId : feedback_comment_delete

Accès

Permission

Consentements OAuth

OAuth : délégation d’un équipier pour l’API

feedback.update

api:connect, feedback:update

KHONY_ORIGIN est l’origine HTTPS de votre application Khony, sans chemin final. Remplacez les identifiants de l’exemple par ceux de vos ressources autorisées. Les données de réponse ci-dessous illustrent le format ; elles ne sont pas le résultat d’un appel à votre organisation.

Paramètres et en-têtes

Nom

Emplacement

Requis

Type et contraintes

Idempotency-Key

header

Oui

string ; Longueur maximale : 200

X-Khony-Confirmation

header

Non

string ; uuid

Champs du corps JSON

Nom

Emplacement

Requis

Type et contraintes

productId

JSON

Oui

string

request

JSON

Oui

object

Exemple de requête

Shell
curl --request POST "$KHONY_ORIGIN/api/v1/feedback/comments/delete" \
  --header "Authorization: Bearer $KHONY_ACCESS_TOKEN" \
  --header 'Idempotency-Key: feedback-command-example-20261023' \
  --header 'Content-Type: application/json' \
  --data-raw '{
  "productId": "product_01k3w8d7vhe008000000000001",
  "request": {
    "operation": "comment_delete",
    "postId": "post_01k3w8d7vhe008000000000001",
    "commentId": "comment_01k3w8d7vhe008000000000001",
    "expectedRevision": "4242",
    "expectedCommentRevision": "4243"
  }
}'
Shell

Réponse de succès · HTTP 200

JSON
{
  "data": {
    "id": "comment_01k3w8d7vhe008000000000001",
    "deleted": true
  }
}
JSON
Schéma complet du corps JSON
JSON
{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "type": "object",
  "properties": {
    "productId": {
      "type": "string",
      "pattern": "^product_[0-7][0123456789abcdefghjkmnpqrstvwxyz]{25}$"
    },
    "request": {
      "type": "object",
      "properties": {
        "operation": {
          "type": "string",
          "const": "comment_delete"
        },
        "postId": {
          "type": "string",
          "pattern": "^post_[0-7][0123456789abcdefghjkmnpqrstvwxyz]{25}$"
        },
        "expectedRevision": {
          "$ref": "#/$defs/__schema0"
        },
        "commentId": {
          "type": "string",
          "pattern": "^comment_[0-7][0123456789abcdefghjkmnpqrstvwxyz]{25}$"
        },
        "expectedCommentRevision": {
          "$ref": "#/$defs/__schema0"
        }
      },
      "required": [
        "operation",
        "postId",
        "expectedRevision",
        "commentId",
        "expectedCommentRevision"
      ],
      "additionalProperties": false
    }
  },
  "required": [
    "productId",
    "request"
  ],
  "additionalProperties": false,
  "$defs": {
    "__schema0": {
      "type": "string",
      "maxLength": 20,
      "pattern": "^\\d+$"
    }
  }
}
JSON
Schéma complet de la réponse
JSON
{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "type": "object",
  "properties": {
    "data": {
      "$ref": "#/$defs/__schema0"
    }
  },
  "required": [
    "data"
  ],
  "additionalProperties": false,
  "$defs": {
    "__schema0": {
      "anyOf": [
        {
          "type": "string"
        },
        {
          "type": "number"
        },
        {
          "type": "boolean"
        },
        {
          "type": "null"
        },
        {
          "type": "array",
          "items": {
            "$ref": "#/$defs/__schema0"
          }
        },
        {
          "type": "object",
          "propertyNames": {
            "type": "string"
          },
          "additionalProperties": {
            "$ref": "#/$defs/__schema0"
          }
        }
      ]
    }
  }
}
JSON

Refus et reprise

Les statuts documentés pour cette opération sont 400, 401, 402, 403, 404, 409, 428, 429, 500, 503. Identifiez la cause avec error.code et, lorsqu’il est présent, error.reason. Une réponse 409 peut demander une relecture de révision ou signaler une commande incompatible ; une réponse 428 demande une confirmation humaine. Ne rejouez une écriture que selon son contrat.

Notes du contrat
JSON
{
  "description": "Dedicated API OAuth api:connect and the stated Feedback scope, actual delegated teammate, current organization/product consent and native role. Existing organization keys do not acquire these operations. Every admission consumes an API request. Send a stable Idempotency-Key and exactly the same body on uncertain-response retry; effect and durable actor/product/transport receipt commit together. Same key with changed data or stale expected post/comment/view state returns 409. Replay revalidates authority and never reapplies old effects. Requires native human confirmation: a 428 confirmation_required returns confirmationUrl/id. Open it in the authorizing human session, review the exact input and approve. Retry this exact body/key with X-Khony-Confirmation: confirmationId within five minutes. Session, grant, action, product, input and key are bound by the server. A model boolean is never approval. The actual author or native administrator may delete a same-product/post comment with current post/comment revisions. Receipt survives deletion; native attachments, descendants and counters remain canonical."
}
JSON