{
  "opencollection": "1.0.0",
  "info": {
    "name": "OpenGov Purchase Order Comment API",
    "version": "1.0.0"
  },
  "request": {
    "auth": {
      "type": "apikey",
      "key": "Authorization",
      "value": "{{Authorization}}",
      "placement": "header"
    }
  },
  "items": [
    {
      "info": {
        "name": "comment",
        "type": "folder"
      },
      "items": [
        {
          "info": {
            "name": "Create a comment or attachment-only entry",
            "type": "http"
          },
          "http": {
            "method": "POST",
            "url": "https://api-purchase-order.procurement.opengov.com/api/v1/po/entities/:entityId/purchase-orders/:poId/comments",
            "params": [
              {
                "name": "entityId",
                "value": "",
                "type": "path",
                "description": "The UUID of the Platform entity"
              },
              {
                "name": "poId",
                "value": "",
                "type": "path"
              }
            ],
            "body": {
              "type": "json",
              "data": "{}"
            }
          },
          "docs": "Creates a text-only comment, attachment-only entry, or mixed comment+attachments. All writes are transactional. Mentions are extracted from body_html."
        },
        {
          "info": {
            "name": "Edit a comment (body, add/remove attachments)",
            "type": "http"
          },
          "http": {
            "method": "PATCH",
            "url": "https://api-purchase-order.procurement.opengov.com/api/v1/po/entities/:entityId/purchase-orders/:poId/comments/:commentId",
            "params": [
              {
                "name": "entityId",
                "value": "",
                "type": "path",
                "description": "The UUID of the Platform entity"
              },
              {
                "name": "poId",
                "value": "",
                "type": "path"
              },
              {
                "name": "commentId",
                "value": "",
                "type": "path"
              }
            ],
            "body": {
              "type": "json",
              "data": "{}"
            }
          },
          "docs": "Updates comment body (re-sanitized), adds new attachments, removes existing ones. Mention diff is computed within the same transaction. Creator-only."
        },
        {
          "info": {
            "name": "Delete a comment (soft-delete with cascade)",
            "type": "http"
          },
          "http": {
            "method": "DELETE",
            "url": "https://api-purchase-order.procurement.opengov.com/api/v1/po/entities/:entityId/purchase-orders/:poId/comments/:commentId",
            "params": [
              {
                "name": "entityId",
                "value": "",
                "type": "path",
                "description": "The UUID of the Platform entity"
              },
              {
                "name": "poId",
                "value": "",
                "type": "path"
              },
              {
                "name": "commentId",
                "value": "",
                "type": "path"
              }
            ]
          },
          "docs": "Soft-deletes the comment, all linked attachments, and hides associated activity log entries. Creator-only. PO must not be in a terminal status."
        }
      ]
    }
  ],
  "bundled": true
}