Skip to main content

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.

AI-written
Inewgen
26 Aug 2026Source: Dev.to2 min read (0 views)Last updated 29 Aug 2026
Share
One CAPI JSON cannot serve every vendor: Integration issues

Stock photo for illustration only, not from the actual event

Font size
  • 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.

10digits for Meta Unix seconds
13digits for LinkedIn milliseconds

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.

json data code editor screen

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.

Never miss the latest news?

Subscribe to get news summaries by email - not often enough to be annoying.

โฆษณา

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

Comments

Leave a Comment
0/2000

Found something wrong in this article? Report an issue with this article