Returns an array of offers based on the provided query and user context.
Method Selection:
method: "client" for browser-based requests (IP/UA extracted from headers)method: "server" for backend requests (must provide ipAddress)Response: Array of offer objects. Each offer includes an id that must be used for impression tracking.
Tenant API key for authentication. Obtain from https://developer.zeroclick.ai/ under API Keys. This key should be kept secure and not exposed in client-side code when using server-side integration.
Determines how IP address and User-Agent are sourced. Use "client" when making requests directly from the browser (IP/UA extracted from request headers). Use "server" when making requests from your backend (must provide ipAddress in body).
client, server Client IP address. Required when method is "server". Ignored when method is "client" (extracted from request headers).
Client User-Agent string. Optional when method is "server". Ignored when method is "client" (extracted from request headers).
Request origin/referer URL. Optional when method is "server". Ignored when method is "client" (extracted from request headers).
Search query for offers. Example: "best running shoes", "cloud hosting solutions"
Maximum number of offers to return. Defaults to tenant settings or 1.
0 < x <= 8SHA-256 hash of user email address for identity matching (lowercase, trimmed before hashing)
SHA-256 hash of user phone number for identity matching (E.164 format before hashing)
Tenant-defined grouping ID for analytics segmentation
Tenant-defined user ID for analytics and personalization
Tenant-defined session ID for session-level tracking
User locale/language code (e.g., "en-US", "es-MX")
Array of personalized offers
Title of the offer
Optional subtitle or brief description of the offer
Detailed content or description of the offer
Call to action text for the offer, to be used for links or buttons
URL to navigate to when the offer is clicked
Optional image URL representing the offer
Any additional metadata specific to the offer
Any additional context about the offer such as "great for gifts", "popular", etc.
Unique identifier for the offer, scoped to the request