For the complete documentation index, see llms.txt. This page is also available as Markdown.

Acknowledge Integration Panel Action

Acknowledge a processed Integration Panel action and notify the CAD user.

POST https://api.sonorancad.com/v2/integration-panels/servers/{serverId}/panels/{panelKey}/actions/{eventId}/ack

Rate limit: 240 requests per minute per API key.

Acknowledge an action after the third-party system finishes processing it. The result is pushed live to connected CAD clients.

Path Parameters

Name
Type
Description

serverId

integer

Configured CAD server ID allowed by the API key.

panelKey

string

Stable panel key.

eventId

UUID

Action event ID returned by the poll endpoint.

Request Body

Property
Type
Required
Description

success

boolean

Yes

Whether the third-party action succeeded.

message

string

No

User-facing result message; maximum 500 characters.

result

object

No

Structured result data; maximum 32 KiB.

Example Request

-- luarocks install sonoran.lua
local Sonoran = require("sonoran")
local sonoran = Sonoran.createClient({
  product = Sonoran.productEnums.CAD,
  communityId = "YOUR_COMMUNITY_ID",
  apiKey = "YOUR_API_KEY",
  defaultServerId = 1
})

local response = sonoran.cad:acknowledgeIntegrationPanelActionV2(
  "example.fire-alarms",
  "11111111-1111-1111-1111-111111111111",
  {
    serverId = 1,
    success = true,
    message = "Alarm disabled",
    result = { alarmId = "mrpd-lobby", active = false }
  }
)
print(response.success)

Use this tab from the server side of a FiveM resource. Never expose the API key to client scripts.

Sonoran.lua and Sonoran.js use the configured client exported by sonorancad. Sonoran.Net must read the CAD convars and create a client. Grant the resource access to the protected key with add_convar_permission your-resource-name read sonoran_apiKey.

Sonoran.lua

local cad = exports["sonorancad"]:getCadClient()
local response = cad:acknowledgeIntegrationPanelActionV2(
  "example.fire-alarms",
  event.id,
  {
    success = true,
    message = "Alarm disabled",
    result = { alarmId = "mrpd-lobby", active = false }
  }
)

Sonoran.js

(async () => {
  const cad = exports["sonorancad"].getCadClient();
  const response = await cad.acknowledgeIntegrationPanelActionV2(
    'example.fire-alarms',
    event.id,
    {
      success: true,
      message: 'Alarm disabled',
      result: { alarmId: 'mrpd-lobby', active: false },
    }
  );
})();

Sonoran.Net

Import this YAML into Postman with Import -> Raw text.

Response

Last updated

Was this helpful?