{
  "opencollection": "1.0.0",
  "info": {
    "name": "OpenGov Purchase Order Terms Attachment API",
    "version": "1.0.0"
  },
  "request": {
    "auth": {
      "type": "apikey",
      "key": "Authorization",
      "value": "{{Authorization}}",
      "placement": "header"
    }
  },
  "items": [
    {
      "info": {
        "name": "termsAttachment",
        "type": "folder"
      },
      "items": [
        {
          "info": {
            "name": "Initialize a Terms & Conditions file upload",
            "type": "http"
          },
          "http": {
            "method": "POST",
            "url": "https://api-purchase-order.procurement.opengov.com/api/v1/po/entities/:entityId/purchase-orders/:poId/terms/attachments/upload",
            "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 po_attachments row with purpose=TERMS_AND_CONDITIONS, upload_status=INITIATED and returns a presigned S3 PUT URL. Stricter MIME/size allow-list than general uploads. Requires PO Editor permission (stricter than general attachments)."
        },
        {
          "info": {
            "name": "Complete a Terms & Conditions file upload",
            "type": "http"
          },
          "http": {
            "method": "POST",
            "url": "https://api-purchase-order.procurement.opengov.com/api/v1/po/entities/:entityId/purchase-orders/:poId/terms/attachments/:attachmentId/complete",
            "params": [
              {
                "name": "entityId",
                "value": "",
                "type": "path",
                "description": "The UUID of the Platform entity"
              },
              {
                "name": "poId",
                "value": "",
                "type": "path"
              },
              {
                "name": "attachmentId",
                "value": "",
                "type": "path"
              }
            ],
            "body": {
              "type": "json",
              "data": "{}"
            }
          },
          "docs": "T&C-purpose sibling of POST /attachments/:id/complete. Requires PO Editor. Service still performs the purpose-aware access check as defence-in-depth."
        }
      ]
    }
  ],
  "bundled": true
}