Spotify browser batches preserve nullable conversion fields.
The Spotify browser SDK posts JSON batches to pixels.spotify.com/v1/ingest. This pack checks batch entries, event bodies, pixel identity and populated commerce fields.
Producer checks remain advisory. Null commerce values, custom event slots and optional product information stay valid. The separate image pixel uses a different contract.
What this pack matches
Rules
Codes are stable. A finding in CI, MCP, or the playground lands on the same id.
| Field | Required | What it checks | Rule ids | Source |
|---|---|---|---|---|
root |
optional | The pinned browser SDK emits this native JSON type. Presence diagnostic severity: warning. Native JSON type: object. | vendor.spotify-ingest.body.root.invalid |
docs |
batch |
recommended | The pinned browser SDK emits this native JSON type. Presence diagnostic severity: warning. Native JSON type: array. Minimum array items: 1. | vendor.spotify-ingest.body.batch.missingvendor.spotify-ingest.body.batch.invalid |
docs |
root |
optional | The pinned browser SDK emits this native JSON type. Body scope: batch[]. Presence diagnostic severity: warning. Native JSON type: object. | vendor.spotify-ingest.body.root.invalid |
docs |
pixel_id |
recommended | Each batch entry carries its configured pixel key. Body scope: batch[]. Presence diagnostic severity: warning. Native JSON type: string. | vendor.spotify-ingest.body.pixel_id.missingvendor.spotify-ingest.body.pixel_id.emptyvendor.spotify-ingest.body.pixel_id.invalid |
docs |
events |
recommended | Each batch entry contains emitted events. Body scope: batch[]. Presence diagnostic severity: warning. Native JSON type: array. Minimum array items: 1. | vendor.spotify-ingest.body.events.missingvendor.spotify-ingest.body.events.invalid |
docs |
time |
optional | The pinned browser SDK emits this native JSON type. Body scope: batch[]. Presence diagnostic severity: warning. Native JSON type: number. | vendor.spotify-ingest.body.time.invalid |
docs |
pixel_version |
optional | The pinned browser SDK emits this native JSON type. Body scope: batch[]. Presence diagnostic severity: warning. Native JSON type: string. | vendor.spotify-ingest.body.pixel_version.invalid |
docs |
pid |
optional | The pinned browser SDK emits this native JSON type. Body scope: batch[]. Presence diagnostic severity: warning. Native JSON type: string. | vendor.spotify-ingest.body.pid.invalid |
docs |
sid |
optional | The pinned browser SDK emits this native JSON type. Body scope: batch[]. Presence diagnostic severity: warning. Native JSON type: string. | vendor.spotify-ingest.body.sid.invalid |
docs |
uid |
optional | The pinned browser SDK emits this native JSON type. Body scope: batch[]. Presence diagnostic severity: warning. Native JSON type: string. | vendor.spotify-ingest.body.uid.invalid |
docs |
root |
optional | The pinned browser SDK emits this native JSON type. Body scope: batch[].events[]. Presence diagnostic severity: warning. Native JSON type: object. | vendor.spotify-ingest.body.root.invalid |
docs |
action |
recommended | The SDK emits known actions, including automatic matching and custom event slots. New actions remain advisory. Body scope: batch[].events[]. Presence diagnostic severity: warning. Native JSON type: string. | vendor.spotify-ingest.body.action.missingvendor.spotify-ingest.body.action.emptyvendor.spotify-ingest.body.action.invalid |
docs |
time |
optional | The pinned browser SDK emits this native JSON type. Body scope: batch[].events[]. Presence diagnostic severity: warning. Native JSON type: number. | vendor.spotify-ingest.body.time.invalid |
docs |
body |
recommended | Event-specific data is nested in body. Body scope: batch[].events[]. Presence diagnostic severity: warning. Native JSON type: object. | vendor.spotify-ingest.body.body.missingvendor.spotify-ingest.body.body.invalid |
docs |
group |
optional | The pinned browser SDK emits this native JSON type. Body scope: batch[].events[]. Presence diagnostic severity: warning. Native JSON type: string or null. | vendor.spotify-ingest.body.group.invalid |
docs |
label |
optional | The pinned browser SDK emits this native JSON type. Body scope: batch[].events[]. Presence diagnostic severity: warning. Native JSON type: string or null. | vendor.spotify-ingest.body.label.invalid |
docs |
experiment |
optional | The pinned browser SDK emits this native JSON type. Body scope: batch[].events[]. Presence diagnostic severity: warning. Native JSON type: string or null. | vendor.spotify-ingest.body.experiment.invalid |
docs |
body.value |
optional | The pinned browser SDK emits this native JSON type. Body scope: batch[].events[]. Presence diagnostic severity: warning. Native JSON type: number or null. | vendor.spotify-ingest.body.body.value.invalid |
docs |
body.quantity |
optional | The pinned browser SDK emits this native JSON type. Body scope: batch[].events[]. Presence diagnostic severity: warning. Native JSON type: integer or null. | vendor.spotify-ingest.body.body.quantity.invalid |
docs |
body.is_new_customer |
optional | The pinned browser SDK emits this native JSON type. Body scope: batch[].events[]. Presence diagnostic severity: warning. Native JSON type: boolean or null. | vendor.spotify-ingest.body.body.is_new_customer.invalid |
docs |
body.line_items |
optional | The pinned browser SDK emits this native JSON type. Body scope: batch[].events[]. Presence diagnostic severity: warning. Native JSON type: array or null. | vendor.spotify-ingest.body.body.line_items.invalid |
docs |
body.auto_filled_fields |
optional | The pinned browser SDK emits this native JSON type. Body scope: batch[].events[]. Presence diagnostic severity: warning. Native JSON type: array or null. | vendor.spotify-ingest.body.body.auto_filled_fields.invalid |
docs |
body.inIframe |
optional | The pinned browser SDK emits this native JSON type. Body scope: batch[].events[]. Presence diagnostic severity: warning. Native JSON type: boolean or null. | vendor.spotify-ingest.body.body.inIframe.invalid |
docs |
body.windowWidth |
optional | The pinned browser SDK emits this native JSON type. Body scope: batch[].events[]. Presence diagnostic severity: warning. Native JSON type: integer or null. | vendor.spotify-ingest.body.body.windowWidth.invalid |
docs |
body.windowHeight |
optional | The pinned browser SDK emits this native JSON type. Body scope: batch[].events[]. Presence diagnostic severity: warning. Native JSON type: integer or null. | vendor.spotify-ingest.body.body.windowHeight.invalid |
docs |
body.timezoneOffset |
optional | The pinned browser SDK emits this native JSON type. Body scope: batch[].events[]. Presence diagnostic severity: warning. Native JSON type: integer or null. | vendor.spotify-ingest.body.body.timezoneOffset.invalid |
docs |
body.viewParams |
optional | The pinned browser SDK emits this native JSON type. Body scope: batch[].events[]. Presence diagnostic severity: warning. Native JSON type: object. | vendor.spotify-ingest.body.body.viewParams.invalid |
docs |
body.currency |
optional | The pinned browser SDK emits this native JSON type. Body scope: batch[].events[]. Presence diagnostic severity: warning. Native JSON type: string or null. | vendor.spotify-ingest.body.body.currency.emptyvendor.spotify-ingest.body.body.currency.invalid |
docs |
body.event_id |
optional | The pinned browser SDK emits this native JSON type. Body scope: batch[].events[]. Presence diagnostic severity: warning. Native JSON type: string or null. | vendor.spotify-ingest.body.body.event_id.invalid |
docs |
body.discount_code |
optional | The pinned browser SDK emits this native JSON type. Body scope: batch[].events[]. Presence diagnostic severity: warning. Native JSON type: string or null. | vendor.spotify-ingest.body.body.discount_code.invalid |
docs |
body.order_id |
optional | The pinned browser SDK emits this native JSON type. Body scope: batch[].events[]. Presence diagnostic severity: warning. Native JSON type: string or null. | vendor.spotify-ingest.body.body.order_id.invalid |
docs |
body.product_id |
optional | The pinned browser SDK emits this native JSON type. Body scope: batch[].events[]. Presence diagnostic severity: warning. Native JSON type: string or null. | vendor.spotify-ingest.body.body.product_id.invalid |
docs |
body.product_name |
optional | The pinned browser SDK emits this native JSON type. Body scope: batch[].events[]. Presence diagnostic severity: warning. Native JSON type: string or null. | vendor.spotify-ingest.body.body.product_name.invalid |
docs |
body.product_type |
optional | The pinned browser SDK emits this native JSON type. Body scope: batch[].events[]. Presence diagnostic severity: warning. Native JSON type: string or null. | vendor.spotify-ingest.body.body.product_type.invalid |
docs |
body.product_vendor |
optional | The pinned browser SDK emits this native JSON type. Body scope: batch[].events[]. Presence diagnostic severity: warning. Native JSON type: string or null. | vendor.spotify-ingest.body.body.product_vendor.invalid |
docs |
body.variant_id |
optional | The pinned browser SDK emits this native JSON type. Body scope: batch[].events[]. Presence diagnostic severity: warning. Native JSON type: string or null. | vendor.spotify-ingest.body.body.variant_id.invalid |
docs |
body.variant_name |
optional | The pinned browser SDK emits this native JSON type. Body scope: batch[].events[]. Presence diagnostic severity: warning. Native JSON type: string or null. | vendor.spotify-ingest.body.body.variant_name.invalid |
docs |
body.type |
optional | The pinned browser SDK emits this native JSON type. Body scope: batch[].events[]. Presence diagnostic severity: warning. Native JSON type: string or null. | vendor.spotify-ingest.body.body.type.invalid |
docs |
body.category |
optional | The pinned browser SDK emits this native JSON type. Body scope: batch[].events[]. Presence diagnostic severity: warning. Native JSON type: string or null. | vendor.spotify-ingest.body.body.category.invalid |
docs |
body.custom_event_name |
optional | The pinned browser SDK emits this native JSON type. Body scope: batch[].events[]. Presence diagnostic severity: warning. Native JSON type: string or null. | vendor.spotify-ingest.body.body.custom_event_name.invalid |
docs |
body.sign_up_method |
optional | The pinned browser SDK emits this native JSON type. Body scope: batch[].events[]. Presence diagnostic severity: warning. Native JSON type: string or null. | vendor.spotify-ingest.body.body.sign_up_method.invalid |
docs |
body.trigger_source |
optional | The pinned browser SDK emits this native JSON type. Body scope: batch[].events[]. Presence diagnostic severity: warning. Native JSON type: string or null. | vendor.spotify-ingest.body.body.trigger_source.invalid |
docs |
body.alias_id |
optional | The pinned browser SDK emits this native JSON type. Body scope: batch[].events[]. Presence diagnostic severity: warning. Native JSON type: string or null. | vendor.spotify-ingest.body.body.alias_id.invalid |
docs |
body.user_hashed_email |
optional | The pinned browser SDK emits this native JSON type. Body scope: batch[].events[]. Presence diagnostic severity: warning. Native JSON type: string or null. | vendor.spotify-ingest.body.body.user_hashed_email.invalid |
docs |
body.user_hashed_phone_number |
optional | The pinned browser SDK emits this native JSON type. Body scope: batch[].events[]. Presence diagnostic severity: warning. Native JSON type: string or null. | vendor.spotify-ingest.body.body.user_hashed_phone_number.invalid |
docs |
body.partner_user_id |
optional | The pinned browser SDK emits this native JSON type. Body scope: batch[].events[]. Presence diagnostic severity: warning. Native JSON type: string or null. | vendor.spotify-ingest.body.body.partner_user_id.invalid |
docs |
body.click_id |
optional | The pinned browser SDK emits this native JSON type. Body scope: batch[].events[]. Presence diagnostic severity: warning. Native JSON type: string or null. | vendor.spotify-ingest.body.body.click_id.invalid |
docs |
body.url |
optional | Absolute page URLs are expected when populated; empty referrers and null custom-event URLs remain valid. Body scope: batch[].events[]. Presence diagnostic severity: warning. Native JSON type: string or null. | vendor.spotify-ingest.body.body.url.emptyvendor.spotify-ingest.body.body.url.invalid |
docs |
body.referrer |
optional | Absolute page URLs are expected when populated; empty referrers and null custom-event URLs remain valid. Body scope: batch[].events[]. Presence diagnostic severity: warning. Native JSON type: string or null. | vendor.spotify-ingest.body.body.referrer.emptyvendor.spotify-ingest.body.body.referrer.invalid |
docs |
root |
optional | The pinned browser SDK emits this native JSON type. Body scope: batch[].events[].body.line_items[]. Presence diagnostic severity: warning. Native JSON type: object. | vendor.spotify-ingest.body.root.invalid |
docs |
value |
optional | The pinned browser SDK emits this native JSON type. Body scope: batch[].events[].body.line_items[]. Presence diagnostic severity: warning. Native JSON type: number or null. | vendor.spotify-ingest.body.value.invalid |
docs |
quantity |
optional | The pinned browser SDK emits this native JSON type. Body scope: batch[].events[].body.line_items[]. Presence diagnostic severity: warning. Native JSON type: integer or null. | vendor.spotify-ingest.body.quantity.invalid |
docs |
product_id |
optional | The pinned browser SDK emits this native JSON type. Body scope: batch[].events[].body.line_items[]. Presence diagnostic severity: warning. Native JSON type: string or null. | vendor.spotify-ingest.body.product_id.invalid |
docs |
product_name |
optional | The pinned browser SDK emits this native JSON type. Body scope: batch[].events[].body.line_items[]. Presence diagnostic severity: warning. Native JSON type: string or null. | vendor.spotify-ingest.body.product_name.invalid |
docs |
product_type |
optional | The pinned browser SDK emits this native JSON type. Body scope: batch[].events[].body.line_items[]. Presence diagnostic severity: warning. Native JSON type: string or null. | vendor.spotify-ingest.body.product_type.invalid |
docs |
product_vendor |
optional | The pinned browser SDK emits this native JSON type. Body scope: batch[].events[].body.line_items[]. Presence diagnostic severity: warning. Native JSON type: string or null. | vendor.spotify-ingest.body.product_vendor.invalid |
docs |
variant_id |
optional | The pinned browser SDK emits this native JSON type. Body scope: batch[].events[].body.line_items[]. Presence diagnostic severity: warning. Native JSON type: string or null. | vendor.spotify-ingest.body.variant_id.invalid |
docs |
variant_name |
optional | The pinned browser SDK emits this native JSON type. Body scope: batch[].events[].body.line_items[]. Presence diagnostic severity: warning. Native JSON type: string or null. | vendor.spotify-ingest.body.variant_name.invalid |
docs |
method |
recommended | The documented transport uses these methods. Complete HTTP capture contract. Presence diagnostic severity: warning. | vendor.spotify-ingest.http.method.missingvendor.spotify-ingest.http.method.emptyvendor.spotify-ingest.http.method.invalid |
docs |
body |
recommended | The captured entity uses this root shape. Complete HTTP capture contract. Presence diagnostic severity: warning. Native JSON type: object. | vendor.spotify-ingest.http.body.missingvendor.spotify-ingest.http.body.invalid |
docs |
content_type |
recommended | The published JSON transport uses application/json. Complete HTTP capture contract. Presence diagnostic severity: warning. | vendor.spotify-ingest.http.content_type.missingvendor.spotify-ingest.http.content_type.emptyvendor.spotify-ingest.http.content_type.invalid |
docs |
Validate a payload
pixellint validate request @request.json --rulepack vendor/spotify-ingest
Try this failing payload in the playground. A Spotify browser purchase with string revenue.
{"url": "https://pixels.spotify.com/v1/ingest", "method": "POST", "headers": {"Content-Type": "application/json"}, "body": "{\"batch\": [{\"pixel_id\": \"synthetic\", \"events\": [{\"action\": \"purchase\", \"body\": {\"value\": \"bad\"}}]}]}"}
cargo install pixellint
·
npm install pixellint