{
  "info": {
    "_postman_id": "6dc9d68c-68a0-4eb0-bd3e-dae11895f52c",
    "name": "WORO Data Exchange API",
    "description": "Sample requests for WORO's one-time data exchange API. Set writeToken in this collection's variables. Run Write sample first, copy the response's token value into redeemToken, then run Read sample. WORO deletes the value on read.",
    "schema": "https://schema.getpostman.com/json/collection/v2.1.0/collection.json"
  },
  "variable": [
    {
      "key": "baseUrl",
      "value": "https://woro.veilgroup.au",
      "type": "string",
      "description": "WORO API base URL"
    },
    {
      "key": "writeToken",
      "value": "replace-with-write-token",
      "type": "string",
      "description": "Write token from your WORO account. Keep this value private."
    },
    {
      "key": "redeemToken",
      "value": "replace-with-redeem-token",
      "type": "string",
      "description": "Copy the token returned by Write sample here before running Read sample."
    }
  ],
  "item": [
    {
      "name": "Write sample",
      "request": {
        "method": "POST",
        "header": [
          {
            "key": "x-api-key",
            "value": "{{writeToken}}",
            "type": "text"
          },
          {
            "key": "content-type",
            "value": "text/plain",
            "type": "text"
          }
        ],
        "body": {
          "mode": "raw",
          "raw": "hello from WORO",
          "options": {
            "raw": {
              "language": "text"
            }
          }
        },
        "url": "{{baseUrl}}/secret",
        "description": "Writes a sample value and consumes one credit. Copy the response's token value to the redeemToken collection variable."
      },
      "response": []
    },
    {
      "name": "Read sample",
      "request": {
        "method": "GET",
        "header": [],
        "url": "{{baseUrl}}/secret/{{redeemToken}}",
        "description": "Reads the sample value once. WORO deletes the stored value on read, so a later request returns 404."
      },
      "response": []
    }
  ]
}
