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

Lookup By Custom Search

Search records by a custom mapped field.

POST https://api.sonorancad.com/v2/general/lookups/custom

Rate limit: 30 requests per minute Authenticated v2 endpoints are rate limited per API key rather than per IP address.

Search records by a custom lookup mapping.

Request Body

{
  "map": "drivers_license",
  "value": "D1234567",
  "types": [7],
  "partial": false
}

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:lookupCustomV2({
    map = 'vehicle',
    value = 'ABC123',
    types = {1},
    partial = true,
  })

-- Inspect response.success, response.data, or response.reason as needed.
print(response.success)

Call from a server-side FiveM resource using the exported CAD client:

local cad = exports["sonorancad"]:getCadClient()
local response = cad:lookupCustomV2({
  map = "vehicle",
  value = "ABC123",
  types = { 1 },
  partial = true
})
print(response.success)

JavaScript resources can use exports.sonorancad.getCadClient(). For .NET, construct a client from the protected CAD convars. Python is for external integrations, not FiveM resources.

Import this YAML into Postman with Import -> Raw text to create a single-endpoint request collection for this route.

Response

Successful requests return application/json.

Last updated

Was this helpful?