{
  "opencollection": "1.0.0",
  "info": {
    "name": "API Reference agents value-receipts API",
    "version": "1.0.0"
  },
  "items": [
    {
      "info": {
        "name": "value-receipts",
        "type": "folder"
      },
      "items": [
        {
          "info": {
            "name": "Sync a value receipt",
            "type": "http"
          },
          "http": {
            "method": "POST",
            "url": "https://api.agentpaid.io/api/v1/value-receipts/sync",
            "headers": [
              {
                "name": "Authorization",
                "value": ""
              }
            ],
            "body": {
              "type": "json",
              "data": "{}"
            }
          },
          "docs": "Find or create a value receipt by natural key (customer + product/order + dates), then populate it with current data inline. Returns the ID, status, and public URL. Posted (sealed) VRs are returned as-is without re-populating."
        },
        {
          "info": {
            "name": "List value receipts",
            "type": "http"
          },
          "http": {
            "method": "GET",
            "url": "https://api.agentpaid.io/api/v1/value-receipts/",
            "headers": [
              {
                "name": "Authorization",
                "value": ""
              }
            ],
            "params": [
              {
                "name": "limit",
                "value": "",
                "type": "query"
              },
              {
                "name": "offset",
                "value": "",
                "type": "query"
              },
              {
                "name": "customerId",
                "value": "",
                "type": "query",
                "description": "Filter by customer display ID."
              },
              {
                "name": "externalCustomerId",
                "value": "",
                "type": "query",
                "description": "Filter by customer external ID."
              },
              {
                "name": "orderId",
                "value": "",
                "type": "query"
              },
              {
                "name": "productId",
                "value": "",
                "type": "query"
              },
              {
                "name": "archived",
                "value": "",
                "type": "query",
                "description": "Include archived value receipts. Defaults to false."
              }
            ]
          },
          "docs": "List value receipts for the organization"
        },
        {
          "info": {
            "name": "Get value receipt",
            "type": "http"
          },
          "http": {
            "method": "GET",
            "url": "https://api.agentpaid.io/api/v1/value-receipts/:id",
            "headers": [
              {
                "name": "Authorization",
                "value": ""
              }
            ],
            "params": [
              {
                "name": "id",
                "value": "",
                "type": "path"
              }
            ]
          },
          "docs": "Get a value receipt by ID, including its publish/share state."
        },
        {
          "info": {
            "name": "Refresh a value receipt",
            "type": "http"
          },
          "http": {
            "method": "POST",
            "url": "https://api.agentpaid.io/api/v1/value-receipts/:id/refresh",
            "headers": [
              {
                "name": "Authorization",
                "value": ""
              }
            ],
            "params": [
              {
                "name": "id",
                "value": "",
                "type": "path"
              }
            ],
            "body": {
              "type": "json",
              "data": "{}"
            }
          },
          "docs": "Re-populate an existing draft value receipt with current data inline. Returns the slim sync response. Sealed VRs cannot be refreshed."
        },
        {
          "info": {
            "name": "Seal a value receipt",
            "type": "http"
          },
          "http": {
            "method": "POST",
            "url": "https://api.agentpaid.io/api/v1/value-receipts/:id/seal",
            "headers": [
              {
                "name": "Authorization",
                "value": ""
              }
            ],
            "params": [
              {
                "name": "id",
                "value": "",
                "type": "path"
              }
            ],
            "body": {
              "type": "json",
              "data": "{}"
            }
          },
          "docs": "Transition a draft value receipt to sealed (posted) status. Sealed VRs are immutable — they cannot be updated or re-populated."
        },
        {
          "info": {
            "name": "Archive a value receipt",
            "type": "http"
          },
          "http": {
            "method": "POST",
            "url": "https://api.agentpaid.io/api/v1/value-receipts/:id/archive",
            "headers": [
              {
                "name": "Authorization",
                "value": ""
              }
            ],
            "params": [
              {
                "name": "id",
                "value": "",
                "type": "path"
              }
            ],
            "body": {
              "type": "json",
              "data": "{}"
            }
          },
          "docs": "Soft-archive a value receipt. Archived VRs are hidden from list by default."
        },
        {
          "info": {
            "name": "Unarchive a value receipt",
            "type": "http"
          },
          "http": {
            "method": "POST",
            "url": "https://api.agentpaid.io/api/v1/value-receipts/:id/unarchive",
            "headers": [
              {
                "name": "Authorization",
                "value": ""
              }
            ],
            "params": [
              {
                "name": "id",
                "value": "",
                "type": "path"
              }
            ],
            "body": {
              "type": "json",
              "data": "{}"
            }
          },
          "docs": "Restore an archived value receipt."
        },
        {
          "info": {
            "name": "Publish a value receipt",
            "type": "http"
          },
          "http": {
            "method": "POST",
            "url": "https://api.agentpaid.io/api/v1/value-receipts/:id/publish",
            "headers": [
              {
                "name": "Authorization",
                "value": ""
              }
            ],
            "params": [
              {
                "name": "id",
                "value": "",
                "type": "path"
              }
            ],
            "body": {
              "type": "json",
              "data": "{}"
            }
          },
          "docs": "Make a value receipt publicly accessible via URL."
        },
        {
          "info": {
            "name": "Unpublish a value receipt",
            "type": "http"
          },
          "http": {
            "method": "POST",
            "url": "https://api.agentpaid.io/api/v1/value-receipts/:id/unpublish",
            "headers": [
              {
                "name": "Authorization",
                "value": ""
              }
            ],
            "params": [
              {
                "name": "id",
                "value": "",
                "type": "path"
              }
            ],
            "body": {
              "type": "json",
              "data": "{}"
            }
          },
          "docs": "Revoke public access to a value receipt."
        }
      ]
    }
  ],
  "bundled": true
}