{
  "info": {
    "_postman_id": "ca139286-6257-5a48-ae22-dcde6c632cce",
    "name": "POS GROVE POS API — Webhooks",
    "description": "Send events to other systems. Each delivery is a signed JSON POST (see the X-Webhook-Signature header: HMAC-SHA256 of \"<timestamp>.<body>\" with the webhook secret), retried with growing delays when the receiver is down. Needs pos.onlinestore; API keys need the `admin` scope.\n\n**Setup**\n1. Set the collection variable `baseUrl` to your POS GROVE address followed by `/api/v1`.\n2. Either paste an API key (Online store → API & Webhooks) into `accessToken`, or run **Get an access token** (in the *Sign in* or *Authentication* folder): it signs in with a username and password and saves the token for you (valid 12 hours).\n3. Send any request. A test checks the `{ success }` envelope on every answer.\n\nAll responses use `{ success, message, data, meta }`; errors use `{ success: false, message, error: { code, details, requestId } }`. Lists accept `page`, `limit`, `sort` and `fields`.\n\nReference: https://posgrove.com/docs/pos-api",
    "schema": "https://schema.getpostman.com/json/collection/v2.1.0/collection.json"
  },
  "auth": {
    "type": "bearer",
    "bearer": [
      {
        "key": "token",
        "value": "{{accessToken}}",
        "type": "string"
      }
    ]
  },
  "event": [
    {
      "listen": "test",
      "script": {
        "type": "text/javascript",
        "exec": [
          "// POS GROVE APIs answer { success, message, data } (or { success: false, error, message }).",
          "pm.test(\"Response is JSON\", function () { pm.response.to.be.json; });",
          "pm.test(\"Envelope has a success flag\", function () {",
          "  var b = pm.response.json();",
          "  pm.expect(b).to.have.property(\"success\");",
          "  if (pm.response.code < 400) pm.expect(b.success).to.eql(true);",
          "});"
        ]
      }
    }
  ],
  "variable": [
    {
      "key": "baseUrl",
      "value": "https://your-store.example.com/api/v1",
      "type": "string",
      "description": "Your POS GROVE address followed by /api/v1, e.g. https://shop.example.com/api/v1"
    },
    {
      "key": "accessToken",
      "value": "",
      "type": "string",
      "description": "An API key, or the token saved by the Get an access token request."
    }
  ],
  "item": [
    {
      "name": "Sign in",
      "description": "Run once: saves {{accessToken}} for the other requests (or paste an API key instead).",
      "item": [
        {
          "name": "Get an access token",
          "request": {
            "method": "POST",
            "header": [
              {
                "key": "Accept",
                "value": "application/json"
              },
              {
                "key": "Content-Type",
                "value": "application/json"
              }
            ],
            "url": {
              "raw": "{{baseUrl}}/auth/token",
              "host": [
                "{{baseUrl}}"
              ],
              "path": [
                "auth",
                "token"
              ]
            },
            "description": "Signs in with a username and password (and the 6-digit code when two-factor sign-in is on) and returns a bearer token valid for 12 hours. The token is shown only once. Five wrong passwords in a row disable the account, as on the sign-in page.\n\nNo authentication needed.\n\n`POST /auth/token` · operationId `auth.token`",
            "body": {
              "mode": "raw",
              "raw": "{\n  \"username\": \"jane\",\n  \"password\": \"••••••••\"\n}",
              "options": {
                "raw": {
                  "language": "json"
                }
              }
            },
            "auth": {
              "type": "noauth"
            }
          },
          "response": [
            {
              "name": "201 Success",
              "originalRequest": {
                "method": "POST",
                "header": [
                  {
                    "key": "Accept",
                    "value": "application/json"
                  },
                  {
                    "key": "Content-Type",
                    "value": "application/json"
                  }
                ],
                "url": {
                  "raw": "{{baseUrl}}/auth/token",
                  "host": [
                    "{{baseUrl}}"
                  ],
                  "path": [
                    "auth",
                    "token"
                  ]
                },
                "body": {
                  "mode": "raw",
                  "raw": "{\n  \"username\": \"jane\",\n  \"password\": \"••••••••\"\n}",
                  "options": {
                    "raw": {
                      "language": "json"
                    }
                  }
                }
              },
              "status": "Success",
              "code": 201,
              "_postman_previewlanguage": "json",
              "header": [
                {
                  "key": "Content-Type",
                  "value": "application/json; charset=utf-8"
                }
              ],
              "body": "{\n  \"success\": true,\n  \"message\": \"OK\",\n  \"data\": {\n    \"token\": \"mtk_<token shown once>\",\n    \"tokenType\": \"Bearer\",\n    \"expiresAt\": \"2026-10-02T21:30:00.000Z\",\n    \"expiresIn\": 43200,\n    \"user\": {\n      \"id\": \"66f1c2a9e4b0a1b2c3d4e502\",\n      \"username\": \"jane\",\n      \"name\": \"Jane Doe\"\n    }\n  }\n}"
            }
          ],
          "event": [
            {
              "listen": "test",
              "script": {
                "type": "text/javascript",
                "exec": [
                  "var body = {};",
                  "try { body = pm.response.json(); } catch (e) {}",
                  "if (body && body.data && body.data.token) {",
                  "  pm.collectionVariables.set(\"accessToken\", body.data.token);",
                  "  if (pm.environment && pm.environment.has(\"accessToken\")) pm.environment.set(\"accessToken\", body.data.token);",
                  "  console.log(\"POS GROVE: access token saved to {{accessToken}} (valid until \" + body.data.expiresAt + \")\");",
                  "}",
                  "pm.test(\"Access token received\", function () { pm.expect(body.data && body.data.token).to.be.a(\"string\"); });"
                ]
              }
            }
          ]
        }
      ]
    },
    {
      "name": "Events you can subscribe to",
      "request": {
        "method": "GET",
        "header": [
          {
            "key": "Accept",
            "value": "application/json"
          }
        ],
        "url": {
          "raw": "{{baseUrl}}/event-types",
          "host": [
            "{{baseUrl}}"
          ],
          "path": [
            "event-types"
          ]
        },
        "description": "Any signed-in user.\n\nScope: `admin:read`.\n\n`GET /event-types` · operationId `webhooks.eventTypes`"
      },
      "response": [
        {
          "name": "200 Success",
          "originalRequest": {
            "method": "GET",
            "header": [
              {
                "key": "Accept",
                "value": "application/json"
              }
            ],
            "url": {
              "raw": "{{baseUrl}}/event-types",
              "host": [
                "{{baseUrl}}"
              ],
              "path": [
                "event-types"
              ]
            }
          },
          "status": "Success",
          "code": 200,
          "_postman_previewlanguage": "json",
          "header": [
            {
              "key": "Content-Type",
              "value": "application/json; charset=utf-8"
            }
          ],
          "body": "{\n  \"success\": true,\n  \"message\": \"OK\",\n  \"data\": [\n    {\n      \"name\": \"order.created\",\n      \"group\": \"Orders\",\n      \"description\": \"A sale or online order was placed.\"\n    }\n  ]\n}"
        }
      ]
    },
    {
      "name": "List webhooks",
      "request": {
        "method": "GET",
        "header": [
          {
            "key": "Accept",
            "value": "application/json"
          }
        ],
        "url": {
          "raw": "{{baseUrl}}/webhooks",
          "host": [
            "{{baseUrl}}"
          ],
          "path": [
            "webhooks"
          ]
        },
        "description": "Permission: `pos.onlinestore`.\n\nScope: `admin:read`.\n\n`GET /webhooks` · operationId `webhooks.list`"
      },
      "response": [
        {
          "name": "200 Success",
          "originalRequest": {
            "method": "GET",
            "header": [
              {
                "key": "Accept",
                "value": "application/json"
              }
            ],
            "url": {
              "raw": "{{baseUrl}}/webhooks",
              "host": [
                "{{baseUrl}}"
              ],
              "path": [
                "webhooks"
              ]
            }
          },
          "status": "Success",
          "code": 200,
          "_postman_previewlanguage": "json",
          "header": [
            {
              "key": "Content-Type",
              "value": "application/json; charset=utf-8"
            }
          ],
          "body": "{\n  \"success\": true,\n  \"message\": \"OK\",\n  \"data\": [\n    {\n      \"webhookId\": \"wh_3f9c0a1b2c3d4e5f\",\n      \"name\": \"Accounting sync\",\n      \"url\": \"https://example.com/hooks/pos\",\n      \"events\": [\n        \"order.created\",\n        \"refund.created\"\n      ],\n      \"event\": \"order.created\",\n      \"status\": \"active\",\n      \"retryCount\": 3,\n      \"signed\": true,\n      \"secretHint\": \"whsec_…9f0e\",\n      \"lastDeliveryAt\": \"2026-10-02T14:05:00.000Z\",\n      \"lastStatus\": \"success\",\n      \"lastError\": null,\n      \"consecutiveFailures\": 0,\n      \"createdAt\": \"2026-10-01T09:30:00.000Z\"\n    }\n  ]\n}"
        }
      ]
    },
    {
      "name": "Create a webhook",
      "request": {
        "method": "POST",
        "header": [
          {
            "key": "Accept",
            "value": "application/json"
          },
          {
            "key": "Content-Type",
            "value": "application/json"
          }
        ],
        "url": {
          "raw": "{{baseUrl}}/webhooks",
          "host": [
            "{{baseUrl}}"
          ],
          "path": [
            "webhooks"
          ]
        },
        "description": "The response includes `secret` once. Keep it to check signatures; afterwards only a hint is shown.\n\nPermission: `pos.onlinestore`.\n\nScope: `admin:write`.\n\n`POST /webhooks` · operationId `webhooks.create`",
        "body": {
          "mode": "raw",
          "raw": "{\n  \"name\": \"\",\n  \"url\": \"https://example.com/hooks/pos\",\n  \"events\": [\n    \"order.created\",\n    \"order.updated\"\n  ],\n  \"status\": \"active\",\n  \"retryCount\": 3\n}",
          "options": {
            "raw": {
              "language": "json"
            }
          }
        }
      },
      "response": [
        {
          "name": "201 Success",
          "originalRequest": {
            "method": "POST",
            "header": [
              {
                "key": "Accept",
                "value": "application/json"
              },
              {
                "key": "Content-Type",
                "value": "application/json"
              }
            ],
            "url": {
              "raw": "{{baseUrl}}/webhooks",
              "host": [
                "{{baseUrl}}"
              ],
              "path": [
                "webhooks"
              ]
            },
            "body": {
              "mode": "raw",
              "raw": "{\n  \"name\": \"\",\n  \"url\": \"https://example.com/hooks/pos\",\n  \"events\": [\n    \"order.created\",\n    \"order.updated\"\n  ],\n  \"status\": \"active\",\n  \"retryCount\": 3\n}",
              "options": {
                "raw": {
                  "language": "json"
                }
              }
            }
          },
          "status": "Success",
          "code": 201,
          "_postman_previewlanguage": "json",
          "header": [
            {
              "key": "Content-Type",
              "value": "application/json; charset=utf-8"
            }
          ],
          "body": "{\n  \"success\": true,\n  \"message\": \"OK\",\n  \"data\": {\n    \"webhookId\": \"wh_3f9c0a1b2c3d4e5f\",\n    \"name\": \"Accounting sync\",\n    \"url\": \"https://example.com/hooks/pos\",\n    \"events\": [\n      \"order.created\",\n      \"refund.created\"\n    ],\n    \"event\": \"order.created\",\n    \"status\": \"active\",\n    \"retryCount\": 3,\n    \"signed\": true,\n    \"secretHint\": \"whsec_…9f0e\",\n    \"lastDeliveryAt\": \"2026-10-02T14:05:00.000Z\",\n    \"lastStatus\": \"success\",\n    \"lastError\": null,\n    \"consecutiveFailures\": 0,\n    \"createdAt\": \"2026-10-01T09:30:00.000Z\",\n    \"secret\": \"whsec_<secret shown once>\"\n  }\n}"
        }
      ]
    },
    {
      "name": "Get a webhook",
      "request": {
        "method": "GET",
        "header": [
          {
            "key": "Accept",
            "value": "application/json"
          }
        ],
        "url": {
          "raw": "{{baseUrl}}/webhooks/:id",
          "host": [
            "{{baseUrl}}"
          ],
          "path": [
            "webhooks",
            ":id"
          ],
          "variable": [
            {
              "key": "id",
              "value": "",
              "description": "Pattern: ^wh_[a-f0-9]{8,32}$"
            }
          ]
        },
        "description": "Permission: `pos.onlinestore`.\n\nScope: `admin:read`.\n\n`GET /webhooks/{id}` · operationId `webhooks.get`"
      },
      "response": [
        {
          "name": "200 Success",
          "originalRequest": {
            "method": "GET",
            "header": [
              {
                "key": "Accept",
                "value": "application/json"
              }
            ],
            "url": {
              "raw": "{{baseUrl}}/webhooks/:id",
              "host": [
                "{{baseUrl}}"
              ],
              "path": [
                "webhooks",
                ":id"
              ],
              "variable": [
                {
                  "key": "id",
                  "value": "",
                  "description": "Pattern: ^wh_[a-f0-9]{8,32}$"
                }
              ]
            }
          },
          "status": "Success",
          "code": 200,
          "_postman_previewlanguage": "json",
          "header": [
            {
              "key": "Content-Type",
              "value": "application/json; charset=utf-8"
            }
          ],
          "body": "{\n  \"success\": true,\n  \"message\": \"OK\",\n  \"data\": {\n    \"webhookId\": \"wh_3f9c0a1b2c3d4e5f\",\n    \"name\": \"Accounting sync\",\n    \"url\": \"https://example.com/hooks/pos\",\n    \"events\": [\n      \"order.created\",\n      \"refund.created\"\n    ],\n    \"event\": \"order.created\",\n    \"status\": \"active\",\n    \"retryCount\": 3,\n    \"signed\": true,\n    \"secretHint\": \"whsec_…9f0e\",\n    \"lastDeliveryAt\": \"2026-10-02T14:05:00.000Z\",\n    \"lastStatus\": \"success\",\n    \"lastError\": null,\n    \"consecutiveFailures\": 0,\n    \"createdAt\": \"2026-10-01T09:30:00.000Z\"\n  }\n}"
        }
      ]
    },
    {
      "name": "Change a webhook",
      "request": {
        "method": "PATCH",
        "header": [
          {
            "key": "Accept",
            "value": "application/json"
          },
          {
            "key": "Content-Type",
            "value": "application/json"
          }
        ],
        "url": {
          "raw": "{{baseUrl}}/webhooks/:id",
          "host": [
            "{{baseUrl}}"
          ],
          "path": [
            "webhooks",
            ":id"
          ],
          "variable": [
            {
              "key": "id",
              "value": "",
              "description": "Pattern: ^wh_[a-f0-9]{8,32}$"
            }
          ]
        },
        "description": "Permission: `pos.onlinestore`.\n\nScope: `admin:write`.\n\n`PATCH /webhooks/{id}` · operationId `webhooks.update`",
        "body": {
          "mode": "raw",
          "raw": "{\n  \"events\": [\n    \"order.created\",\n    \"order.updated\"\n  ],\n  \"status\": \"active\"\n}",
          "options": {
            "raw": {
              "language": "json"
            }
          }
        }
      },
      "response": [
        {
          "name": "200 Success",
          "originalRequest": {
            "method": "PATCH",
            "header": [
              {
                "key": "Accept",
                "value": "application/json"
              },
              {
                "key": "Content-Type",
                "value": "application/json"
              }
            ],
            "url": {
              "raw": "{{baseUrl}}/webhooks/:id",
              "host": [
                "{{baseUrl}}"
              ],
              "path": [
                "webhooks",
                ":id"
              ],
              "variable": [
                {
                  "key": "id",
                  "value": "",
                  "description": "Pattern: ^wh_[a-f0-9]{8,32}$"
                }
              ]
            },
            "body": {
              "mode": "raw",
              "raw": "{\n  \"events\": [\n    \"order.created\",\n    \"order.updated\"\n  ],\n  \"status\": \"active\"\n}",
              "options": {
                "raw": {
                  "language": "json"
                }
              }
            }
          },
          "status": "Success",
          "code": 200,
          "_postman_previewlanguage": "json",
          "header": [
            {
              "key": "Content-Type",
              "value": "application/json; charset=utf-8"
            }
          ],
          "body": "{\n  \"success\": true,\n  \"message\": \"OK\",\n  \"data\": {\n    \"webhookId\": \"wh_3f9c0a1b2c3d4e5f\",\n    \"name\": \"Accounting sync\",\n    \"url\": \"https://example.com/hooks/pos\",\n    \"events\": [\n      \"order.created\",\n      \"refund.created\"\n    ],\n    \"event\": \"order.created\",\n    \"status\": \"active\",\n    \"retryCount\": 3,\n    \"signed\": true,\n    \"secretHint\": \"whsec_…9f0e\",\n    \"lastDeliveryAt\": \"2026-10-02T14:05:00.000Z\",\n    \"lastStatus\": \"success\",\n    \"lastError\": null,\n    \"consecutiveFailures\": 0,\n    \"createdAt\": \"2026-10-01T09:30:00.000Z\"\n  }\n}"
        }
      ]
    },
    {
      "name": "Delete a webhook",
      "request": {
        "method": "DELETE",
        "header": [
          {
            "key": "Accept",
            "value": "application/json"
          }
        ],
        "url": {
          "raw": "{{baseUrl}}/webhooks/:id",
          "host": [
            "{{baseUrl}}"
          ],
          "path": [
            "webhooks",
            ":id"
          ],
          "variable": [
            {
              "key": "id",
              "value": "",
              "description": "Pattern: ^wh_[a-f0-9]{8,32}$"
            }
          ]
        },
        "description": "Permission: `pos.onlinestore`.\n\nScope: `admin:write`.\n\n`DELETE /webhooks/{id}` · operationId `webhooks.delete`"
      },
      "response": [
        {
          "name": "200 Success",
          "originalRequest": {
            "method": "DELETE",
            "header": [
              {
                "key": "Accept",
                "value": "application/json"
              }
            ],
            "url": {
              "raw": "{{baseUrl}}/webhooks/:id",
              "host": [
                "{{baseUrl}}"
              ],
              "path": [
                "webhooks",
                ":id"
              ],
              "variable": [
                {
                  "key": "id",
                  "value": "",
                  "description": "Pattern: ^wh_[a-f0-9]{8,32}$"
                }
              ]
            }
          },
          "status": "Success",
          "code": 200,
          "_postman_previewlanguage": "json",
          "header": [
            {
              "key": "Content-Type",
              "value": "application/json; charset=utf-8"
            }
          ],
          "body": "{\n  \"success\": true,\n  \"message\": \"OK\",\n  \"data\": {\n    \"webhookId\": \"wh_3f9c0a1b2c3d4e5f\"\n  }\n}"
        }
      ]
    },
    {
      "name": "Send a test event",
      "request": {
        "method": "POST",
        "header": [
          {
            "key": "Accept",
            "value": "application/json"
          }
        ],
        "url": {
          "raw": "{{baseUrl}}/webhooks/:id/test",
          "host": [
            "{{baseUrl}}"
          ],
          "path": [
            "webhooks",
            ":id",
            "test"
          ],
          "variable": [
            {
              "key": "id",
              "value": "",
              "description": "Pattern: ^wh_[a-f0-9]{8,32}$"
            }
          ]
        },
        "description": "Sends a `webhook.test` event to this webhook now (even if it is inactive) and returns the result.\n\nPermission: `pos.onlinestore`.\n\nScope: `admin:write`.\n\n`POST /webhooks/{id}/test` · operationId `webhooks.test`"
      },
      "response": [
        {
          "name": "200 Success",
          "originalRequest": {
            "method": "POST",
            "header": [
              {
                "key": "Accept",
                "value": "application/json"
              }
            ],
            "url": {
              "raw": "{{baseUrl}}/webhooks/:id/test",
              "host": [
                "{{baseUrl}}"
              ],
              "path": [
                "webhooks",
                ":id",
                "test"
              ],
              "variable": [
                {
                  "key": "id",
                  "value": "",
                  "description": "Pattern: ^wh_[a-f0-9]{8,32}$"
                }
              ]
            }
          },
          "status": "Success",
          "code": 200,
          "_postman_previewlanguage": "json",
          "header": [
            {
              "key": "Content-Type",
              "value": "application/json; charset=utf-8"
            }
          ],
          "body": "{\n  \"success\": true,\n  \"message\": \"OK\",\n  \"data\": {\n    \"deliveryId\": \"whd_5b1e9a0c7d2f4e6a8b3c1d0e\",\n    \"webhookId\": \"wh_3f9c0a1b2c3d4e5f\",\n    \"webhookName\": \"Accounting sync\",\n    \"url\": \"https://example.com/hooks/pos\",\n    \"event\": \"webhook.test\",\n    \"eventId\": \"evt_9b2f1c0d4e5a6b7c8d9e0f1a\",\n    \"status\": \"success\",\n    \"test\": true,\n    \"signed\": true,\n    \"attempts\": 1,\n    \"maxAttempts\": 4,\n    \"nextAttemptAt\": null,\n    \"lastAttemptAt\": \"2026-10-02T14:05:00.000Z\",\n    \"deliveredAt\": \"2026-10-02T14:05:00.000Z\",\n    \"responseStatus\": 200,\n    \"durationMs\": 182,\n    \"error\": \"\",\n    \"createdAt\": \"2026-10-02T14:05:00.000Z\",\n    \"payload\": {\n      \"id\": \"evt_9b2f1c0d4e5a6b7c8d9e0f1a\",\n      \"event\": \"order.created\",\n      \"createdAt\": \"2026-10-02T14:05:00.000Z\",\n      \"source\": \"api\",\n      \"storeId\": \"66f1c2a9e4b0a1b2c3d4e501\",\n      \"actor\": {\n        \"type\": \"user\",\n        \"id\": \"66f1c2a9e4b0a1b2c3d4e502\",\n        \"name\": \"Jane Doe\"\n      },\n      \"data\": {\n        \"order\": {\n          \"id\": \"66f1c2a9e4b0a1b2c3d4e505\",\n          \"orderNumber\": \"ORD1790904240356987\",\n          \"status\": \"confirmed\",\n          \"total\": {\n            \"amount\": 13975,\n            \"currency\": \"NGN\"\n          }\n        }\n      }\n    },\n    \"responseBody\": \"{\\\"received\\\":true}\",\n    \"history\": [\n      {\n        \"at\": \"2026-10-02T14:05:00.000Z\",\n        \"status\": \"success\",\n        \"responseStatus\": 200,\n        \"durationMs\": 182,\n        \"error\": \"\"\n      }\n    ]\n  }\n}"
        }
      ]
    },
    {
      "name": "Create a new signing secret",
      "request": {
        "method": "POST",
        "header": [
          {
            "key": "Accept",
            "value": "application/json"
          }
        ],
        "url": {
          "raw": "{{baseUrl}}/webhooks/:id/secret",
          "host": [
            "{{baseUrl}}"
          ],
          "path": [
            "webhooks",
            ":id",
            "secret"
          ],
          "variable": [
            {
              "key": "id",
              "value": "",
              "description": "Pattern: ^wh_[a-f0-9]{8,32}$"
            }
          ]
        },
        "description": "Replaces the signing secret; the new one is returned once. Deliveries from now on are signed with it.\n\nPermission: `pos.onlinestore`.\n\nScope: `admin:write`.\n\n`POST /webhooks/{id}/secret` · operationId `webhooks.secret`"
      },
      "response": [
        {
          "name": "200 Success",
          "originalRequest": {
            "method": "POST",
            "header": [
              {
                "key": "Accept",
                "value": "application/json"
              }
            ],
            "url": {
              "raw": "{{baseUrl}}/webhooks/:id/secret",
              "host": [
                "{{baseUrl}}"
              ],
              "path": [
                "webhooks",
                ":id",
                "secret"
              ],
              "variable": [
                {
                  "key": "id",
                  "value": "",
                  "description": "Pattern: ^wh_[a-f0-9]{8,32}$"
                }
              ]
            }
          },
          "status": "Success",
          "code": 200,
          "_postman_previewlanguage": "json",
          "header": [
            {
              "key": "Content-Type",
              "value": "application/json; charset=utf-8"
            }
          ],
          "body": "{\n  \"success\": true,\n  \"message\": \"OK\",\n  \"data\": {\n    \"webhookId\": \"wh_3f9c0a1b2c3d4e5f\",\n    \"secret\": \"whsec_<secret shown once>\"\n  }\n}"
        }
      ]
    },
    {
      "name": "Delivery log",
      "request": {
        "method": "GET",
        "header": [
          {
            "key": "Accept",
            "value": "application/json"
          }
        ],
        "url": {
          "raw": "{{baseUrl}}/webhook-deliveries",
          "host": [
            "{{baseUrl}}"
          ],
          "path": [
            "webhook-deliveries"
          ],
          "query": [
            {
              "key": "page",
              "value": "1",
              "description": "Page number (starts at 1).",
              "disabled": true
            },
            {
              "key": "limit",
              "value": "25",
              "description": "Items per page (max 100).",
              "disabled": true
            },
            {
              "key": "webhookId",
              "value": "",
              "description": "",
              "disabled": true
            },
            {
              "key": "event",
              "value": "",
              "description": "",
              "disabled": true
            },
            {
              "key": "status",
              "value": "",
              "description": "One of: pending, retrying, success, failed, cancelled.",
              "disabled": true
            }
          ]
        },
        "description": "Newest first. Each delivery is one event sent to one webhook, with its attempts.\n\nPermission: `pos.onlinestore`.\n\nScope: `admin:read`.\n\n`GET /webhook-deliveries` · operationId `webhooks.deliveries`"
      },
      "response": [
        {
          "name": "200 Success",
          "originalRequest": {
            "method": "GET",
            "header": [
              {
                "key": "Accept",
                "value": "application/json"
              }
            ],
            "url": {
              "raw": "{{baseUrl}}/webhook-deliveries",
              "host": [
                "{{baseUrl}}"
              ],
              "path": [
                "webhook-deliveries"
              ],
              "query": [
                {
                  "key": "page",
                  "value": "1",
                  "description": "Page number (starts at 1).",
                  "disabled": true
                },
                {
                  "key": "limit",
                  "value": "25",
                  "description": "Items per page (max 100).",
                  "disabled": true
                },
                {
                  "key": "webhookId",
                  "value": "",
                  "description": "",
                  "disabled": true
                },
                {
                  "key": "event",
                  "value": "",
                  "description": "",
                  "disabled": true
                },
                {
                  "key": "status",
                  "value": "",
                  "description": "One of: pending, retrying, success, failed, cancelled.",
                  "disabled": true
                }
              ]
            }
          },
          "status": "Success",
          "code": 200,
          "_postman_previewlanguage": "json",
          "header": [
            {
              "key": "Content-Type",
              "value": "application/json; charset=utf-8"
            }
          ],
          "body": "{\n  \"success\": true,\n  \"message\": \"OK\",\n  \"data\": [\n    {\n      \"deliveryId\": \"whd_5b1e9a0c7d2f4e6a8b3c1d0e\",\n      \"webhookId\": \"wh_3f9c0a1b2c3d4e5f\",\n      \"webhookName\": \"Accounting sync\",\n      \"url\": \"https://example.com/hooks/pos\",\n      \"event\": \"order.created\",\n      \"eventId\": \"evt_9b2f1c0d4e5a6b7c8d9e0f1a\",\n      \"status\": \"success\",\n      \"test\": false,\n      \"signed\": true,\n      \"attempts\": 1,\n      \"maxAttempts\": 4,\n      \"nextAttemptAt\": null,\n      \"lastAttemptAt\": \"2026-10-02T14:05:00.000Z\",\n      \"deliveredAt\": \"2026-10-02T14:05:00.000Z\",\n      \"responseStatus\": 200,\n      \"durationMs\": 182,\n      \"error\": \"\",\n      \"createdAt\": \"2026-10-02T14:05:00.000Z\"\n    }\n  ]\n}"
        }
      ]
    },
    {
      "name": "Get a delivery",
      "request": {
        "method": "GET",
        "header": [
          {
            "key": "Accept",
            "value": "application/json"
          }
        ],
        "url": {
          "raw": "{{baseUrl}}/webhook-deliveries/:id",
          "host": [
            "{{baseUrl}}"
          ],
          "path": [
            "webhook-deliveries",
            ":id"
          ],
          "variable": [
            {
              "key": "id",
              "value": "",
              "description": "Pattern: ^whd_[a-f0-9]{24}$"
            }
          ]
        },
        "description": "Includes the payload that was sent, the start of the response, and every attempt.\n\nPermission: `pos.onlinestore`.\n\nScope: `admin:read`.\n\n`GET /webhook-deliveries/{id}` · operationId `webhooks.delivery`"
      },
      "response": [
        {
          "name": "200 Success",
          "originalRequest": {
            "method": "GET",
            "header": [
              {
                "key": "Accept",
                "value": "application/json"
              }
            ],
            "url": {
              "raw": "{{baseUrl}}/webhook-deliveries/:id",
              "host": [
                "{{baseUrl}}"
              ],
              "path": [
                "webhook-deliveries",
                ":id"
              ],
              "variable": [
                {
                  "key": "id",
                  "value": "",
                  "description": "Pattern: ^whd_[a-f0-9]{24}$"
                }
              ]
            }
          },
          "status": "Success",
          "code": 200,
          "_postman_previewlanguage": "json",
          "header": [
            {
              "key": "Content-Type",
              "value": "application/json; charset=utf-8"
            }
          ],
          "body": "{\n  \"success\": true,\n  \"message\": \"OK\",\n  \"data\": {\n    \"deliveryId\": \"whd_5b1e9a0c7d2f4e6a8b3c1d0e\",\n    \"webhookId\": \"wh_3f9c0a1b2c3d4e5f\",\n    \"webhookName\": \"Accounting sync\",\n    \"url\": \"https://example.com/hooks/pos\",\n    \"event\": \"order.created\",\n    \"eventId\": \"evt_9b2f1c0d4e5a6b7c8d9e0f1a\",\n    \"status\": \"success\",\n    \"test\": false,\n    \"signed\": true,\n    \"attempts\": 1,\n    \"maxAttempts\": 4,\n    \"nextAttemptAt\": null,\n    \"lastAttemptAt\": \"2026-10-02T14:05:00.000Z\",\n    \"deliveredAt\": \"2026-10-02T14:05:00.000Z\",\n    \"responseStatus\": 200,\n    \"durationMs\": 182,\n    \"error\": \"\",\n    \"createdAt\": \"2026-10-02T14:05:00.000Z\",\n    \"payload\": {\n      \"id\": \"evt_9b2f1c0d4e5a6b7c8d9e0f1a\",\n      \"event\": \"order.created\",\n      \"createdAt\": \"2026-10-02T14:05:00.000Z\",\n      \"source\": \"api\",\n      \"storeId\": \"66f1c2a9e4b0a1b2c3d4e501\",\n      \"actor\": {\n        \"type\": \"user\",\n        \"id\": \"66f1c2a9e4b0a1b2c3d4e502\",\n        \"name\": \"Jane Doe\"\n      },\n      \"data\": {\n        \"order\": {\n          \"id\": \"66f1c2a9e4b0a1b2c3d4e505\",\n          \"orderNumber\": \"ORD1790904240356987\",\n          \"status\": \"confirmed\",\n          \"total\": {\n            \"amount\": 13975,\n            \"currency\": \"NGN\"\n          }\n        }\n      }\n    },\n    \"responseBody\": \"{\\\"received\\\":true}\",\n    \"history\": [\n      {\n        \"at\": \"2026-10-02T14:05:00.000Z\",\n        \"status\": \"success\",\n        \"responseStatus\": 200,\n        \"durationMs\": 182,\n        \"error\": \"\"\n      }\n    ]\n  }\n}"
        }
      ]
    },
    {
      "name": "Send a delivery again",
      "request": {
        "method": "POST",
        "header": [
          {
            "key": "Accept",
            "value": "application/json"
          }
        ],
        "url": {
          "raw": "{{baseUrl}}/webhook-deliveries/:id/retry",
          "host": [
            "{{baseUrl}}"
          ],
          "path": [
            "webhook-deliveries",
            ":id",
            "retry"
          ],
          "variable": [
            {
              "key": "id",
              "value": "",
              "description": "Pattern: ^whd_[a-f0-9]{24}$"
            }
          ]
        },
        "description": "Permission: `pos.onlinestore`.\n\nScope: `admin:write`.\n\n`POST /webhook-deliveries/{id}/retry` · operationId `webhooks.retry`"
      },
      "response": [
        {
          "name": "200 Success",
          "originalRequest": {
            "method": "POST",
            "header": [
              {
                "key": "Accept",
                "value": "application/json"
              }
            ],
            "url": {
              "raw": "{{baseUrl}}/webhook-deliveries/:id/retry",
              "host": [
                "{{baseUrl}}"
              ],
              "path": [
                "webhook-deliveries",
                ":id",
                "retry"
              ],
              "variable": [
                {
                  "key": "id",
                  "value": "",
                  "description": "Pattern: ^whd_[a-f0-9]{24}$"
                }
              ]
            }
          },
          "status": "Success",
          "code": 200,
          "_postman_previewlanguage": "json",
          "header": [
            {
              "key": "Content-Type",
              "value": "application/json; charset=utf-8"
            }
          ],
          "body": "{\n  \"success\": true,\n  \"message\": \"OK\",\n  \"data\": {\n    \"deliveryId\": \"whd_5b1e9a0c7d2f4e6a8b3c1d0e\",\n    \"webhookId\": \"wh_3f9c0a1b2c3d4e5f\",\n    \"webhookName\": \"Accounting sync\",\n    \"url\": \"https://example.com/hooks/pos\",\n    \"event\": \"order.created\",\n    \"eventId\": \"evt_9b2f1c0d4e5a6b7c8d9e0f1a\",\n    \"status\": \"success\",\n    \"test\": false,\n    \"signed\": true,\n    \"attempts\": 1,\n    \"maxAttempts\": 4,\n    \"nextAttemptAt\": null,\n    \"lastAttemptAt\": \"2026-10-02T14:05:00.000Z\",\n    \"deliveredAt\": \"2026-10-02T14:05:00.000Z\",\n    \"responseStatus\": 200,\n    \"durationMs\": 182,\n    \"error\": \"\",\n    \"createdAt\": \"2026-10-02T14:05:00.000Z\",\n    \"payload\": {\n      \"id\": \"evt_9b2f1c0d4e5a6b7c8d9e0f1a\",\n      \"event\": \"order.created\",\n      \"createdAt\": \"2026-10-02T14:05:00.000Z\",\n      \"source\": \"api\",\n      \"storeId\": \"66f1c2a9e4b0a1b2c3d4e501\",\n      \"actor\": {\n        \"type\": \"user\",\n        \"id\": \"66f1c2a9e4b0a1b2c3d4e502\",\n        \"name\": \"Jane Doe\"\n      },\n      \"data\": {\n        \"order\": {\n          \"id\": \"66f1c2a9e4b0a1b2c3d4e505\",\n          \"orderNumber\": \"ORD1790904240356987\",\n          \"status\": \"confirmed\",\n          \"total\": {\n            \"amount\": 13975,\n            \"currency\": \"NGN\"\n          }\n        }\n      }\n    },\n    \"responseBody\": \"{\\\"received\\\":true}\",\n    \"history\": [\n      {\n        \"at\": \"2026-10-02T14:05:00.000Z\",\n        \"status\": \"success\",\n        \"responseStatus\": 200,\n        \"durationMs\": 182,\n        \"error\": \"\"\n      }\n    ]\n  }\n}"
        }
      ]
    },
    {
      "name": "Event history",
      "request": {
        "method": "GET",
        "header": [
          {
            "key": "Accept",
            "value": "application/json"
          }
        ],
        "url": {
          "raw": "{{baseUrl}}/events",
          "host": [
            "{{baseUrl}}"
          ],
          "path": [
            "events"
          ],
          "query": [
            {
              "key": "page",
              "value": "1",
              "description": "Page number (starts at 1).",
              "disabled": true
            },
            {
              "key": "limit",
              "value": "25",
              "description": "Items per page (max 100).",
              "disabled": true
            },
            {
              "key": "event",
              "value": "",
              "description": "",
              "disabled": true
            },
            {
              "key": "from",
              "value": "",
              "description": "Only items on or after this date (YYYY-MM-DD).",
              "disabled": true
            },
            {
              "key": "to",
              "value": "",
              "description": "Only items on or before this date (YYYY-MM-DD, whole day included).",
              "disabled": true
            }
          ]
        },
        "description": "Everything that happened (orders, payments, customers, stock, HR…), newest first, with the data sent to webhooks.\n\nPermission: `pos.onlinestore`.\n\nScope: `admin:read`.\n\n`GET /events` · operationId `events.list`"
      },
      "response": [
        {
          "name": "200 Success",
          "originalRequest": {
            "method": "GET",
            "header": [
              {
                "key": "Accept",
                "value": "application/json"
              }
            ],
            "url": {
              "raw": "{{baseUrl}}/events",
              "host": [
                "{{baseUrl}}"
              ],
              "path": [
                "events"
              ],
              "query": [
                {
                  "key": "page",
                  "value": "1",
                  "description": "Page number (starts at 1).",
                  "disabled": true
                },
                {
                  "key": "limit",
                  "value": "25",
                  "description": "Items per page (max 100).",
                  "disabled": true
                },
                {
                  "key": "event",
                  "value": "",
                  "description": "",
                  "disabled": true
                },
                {
                  "key": "from",
                  "value": "",
                  "description": "Only items on or after this date (YYYY-MM-DD).",
                  "disabled": true
                },
                {
                  "key": "to",
                  "value": "",
                  "description": "Only items on or before this date (YYYY-MM-DD, whole day included).",
                  "disabled": true
                }
              ]
            }
          },
          "status": "Success",
          "code": 200,
          "_postman_previewlanguage": "json",
          "header": [
            {
              "key": "Content-Type",
              "value": "application/json; charset=utf-8"
            }
          ],
          "body": "{\n  \"success\": true,\n  \"message\": \"OK\",\n  \"data\": [\n    {\n      \"id\": \"evt_9b2f1c0d4e5a6b7c8d9e0f1a\",\n      \"event\": \"order.created\",\n      \"source\": \"api\",\n      \"occurredAt\": \"2026-10-02T14:05:00.000Z\",\n      \"storeId\": \"66f1c2a9e4b0a1b2c3d4e501\",\n      \"actor\": {\n        \"type\": \"user\",\n        \"id\": \"66f1c2a9e4b0a1b2c3d4e502\",\n        \"name\": \"Jane Doe\"\n      },\n      \"webhooks\": 1,\n      \"data\": {\n        \"order\": {\n          \"id\": \"66f1c2a9e4b0a1b2c3d4e505\",\n          \"orderNumber\": \"ORD1790904240356987\",\n          \"status\": \"confirmed\",\n          \"total\": {\n            \"amount\": 13975,\n            \"currency\": \"NGN\"\n          }\n        }\n      }\n    }\n  ]\n}"
        }
      ]
    }
  ]
}