One CAPI JSON cannot serve every vendor: Integration issues
Discover why sharing a single JSON payload across Meta, LinkedIn, TikTok, and Pinterest Conversions APIs leads to integration errors.

Stock photo for illustration only, not from the actual event
- Using a single JSON payload for multiple vendor CAPIs often leads to bugs.
- Different platforms require specific timestamp formats like seconds, milliseconds, or ISO 8601.
- Mandatory fields vary widely, such as user.userIds for LinkedIn or event_id for Pinterest.
The first Conversions API (CAPI) integration is typically Meta, followed by copying the code with a changed host for other platforms. However, this shortcut is why LinkedIn returns 422 errors, TikTok timestamps arrival incorrectly, and Pinterest drops events missing specific identifiers.
Timestamp formats are a primary hurdle. Meta CAPI uses 10-digit Unix seconds, while LinkedIn conversionHappenedAt requires 13-digit milliseconds. Passing a seconds value to LinkedIn reads as 1970, falling outside the 90-day window. Meanwhile, TikTok Events API expects ISO 8601, and Pinterest CAPI requires seconds again.
Code implementation also differs. Date.now() suits LinkedIn but fails for Meta, whereas Math.floor(Date.now()/1000) works for Meta but breaks LinkedIn. Furthermore, toISOString() is correct for TikTok yet causes type errors on Meta.

Stock photo for illustration only, not from the actual event
Structural requirements present another challenge. LinkedIn mandates user.userIds even when matching via userInfo or lead, returning 422 if omitted, whereas Meta lacks this field. Similarly, Pinterest CAPI requires event_id, whereas Meta treats it strictly for deduplication against the pixel without causing immediate invalidation if missed.
Understanding the subtle architectural differences among various Conversions APIs is crucial for software engineers. Because ad platforms operate independently, enforcing a rigid universal JSON schema without vendor-specific adapters frequently results in rejected payloads and silent tracking failures.
Tools like pixellint help validate JSON schemas against specific vendor rulepacks, such as pixellint validate json @meta.json or @li.json. Ultimately, sharing a unified CAPI JSON is an architectural anti-pattern rather than a shortcut.
Source: Dev.to
Found something wrong in this article? Report an issue with this article
Comments
Leave a Comment