curl --request POST \
--url https://search.glood.ai/api/storefront/v1/headless/events \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--header 'x-shop: <x-shop>' \
--data '
{
"event": {
"id": "<string>",
"timestamp": "2023-11-07T05:31:56Z",
"context": {
"navigator": {
"user_agent": "<string>"
},
"document": {},
"window": {}
},
"client_id": "<string>",
"data": {},
"custom_data": {
"track": {
"source": "<string>",
"page_type": "<string>",
"pages": [
{
"page_id": "<string>"
}
],
"products": [
{
"product_id": "<string>",
"variant_id": "<string>",
"quantity": 123
}
],
"request_id": "<string>",
"filters": [
{
"key": "<string>",
"value": [
"<string>"
]
}
],
"search_term": "<string>",
"checkout_token": "<string>",
"campaign": "<string>"
}
}
},
"session_id": "<string>",
"visitor_id": "<string>",
"client_id": "<string>",
"customer_id": "<string>",
"page_type": "<string>",
"page_url": "<string>",
"cart_identifier": "<string>",
"cart": {},
"customer": {},
"customer_privacy": {
"analytics_processing_allowed": true,
"marketing_allowed": true,
"preferences_processing_allowed": true,
"sale_of_data_allowed": true
}
}
'import requests
url = "https://search.glood.ai/api/storefront/v1/headless/events"
payload = {
"event": {
"id": "<string>",
"timestamp": "2023-11-07T05:31:56Z",
"context": {
"navigator": { "user_agent": "<string>" },
"document": {},
"window": {}
},
"client_id": "<string>",
"data": {},
"custom_data": { "track": {
"source": "<string>",
"page_type": "<string>",
"pages": [{ "page_id": "<string>" }],
"products": [
{
"product_id": "<string>",
"variant_id": "<string>",
"quantity": 123
}
],
"request_id": "<string>",
"filters": [
{
"key": "<string>",
"value": ["<string>"]
}
],
"search_term": "<string>",
"checkout_token": "<string>",
"campaign": "<string>"
} }
},
"session_id": "<string>",
"visitor_id": "<string>",
"client_id": "<string>",
"customer_id": "<string>",
"page_type": "<string>",
"page_url": "<string>",
"cart_identifier": "<string>",
"cart": {},
"customer": {},
"customer_privacy": {
"analytics_processing_allowed": True,
"marketing_allowed": True,
"preferences_processing_allowed": True,
"sale_of_data_allowed": True
}
}
headers = {
"x-shop": "<x-shop>",
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {
'x-shop': '<x-shop>',
Authorization: 'Bearer <token>',
'Content-Type': 'application/json'
},
body: JSON.stringify({
event: {
id: '<string>',
timestamp: '2023-11-07T05:31:56Z',
context: {navigator: {user_agent: '<string>'}, document: {}, window: {}},
client_id: '<string>',
data: {},
custom_data: {
track: {
source: '<string>',
page_type: '<string>',
pages: [{page_id: '<string>'}],
products: [{product_id: '<string>', variant_id: '<string>', quantity: 123}],
request_id: '<string>',
filters: [{key: '<string>', value: ['<string>']}],
search_term: '<string>',
checkout_token: '<string>',
campaign: '<string>'
}
}
},
session_id: '<string>',
visitor_id: '<string>',
client_id: '<string>',
customer_id: '<string>',
page_type: '<string>',
page_url: '<string>',
cart_identifier: '<string>',
cart: {},
customer: {},
customer_privacy: {
analytics_processing_allowed: true,
marketing_allowed: true,
preferences_processing_allowed: true,
sale_of_data_allowed: true
}
})
};
fetch('https://search.glood.ai/api/storefront/v1/headless/events', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://search.glood.ai/api/storefront/v1/headless/events",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'event' => [
'id' => '<string>',
'timestamp' => '2023-11-07T05:31:56Z',
'context' => [
'navigator' => [
'user_agent' => '<string>'
],
'document' => [
],
'window' => [
]
],
'client_id' => '<string>',
'data' => [
],
'custom_data' => [
'track' => [
'source' => '<string>',
'page_type' => '<string>',
'pages' => [
[
'page_id' => '<string>'
]
],
'products' => [
[
'product_id' => '<string>',
'variant_id' => '<string>',
'quantity' => 123
]
],
'request_id' => '<string>',
'filters' => [
[
'key' => '<string>',
'value' => [
'<string>'
]
]
],
'search_term' => '<string>',
'checkout_token' => '<string>',
'campaign' => '<string>'
]
]
],
'session_id' => '<string>',
'visitor_id' => '<string>',
'client_id' => '<string>',
'customer_id' => '<string>',
'page_type' => '<string>',
'page_url' => '<string>',
'cart_identifier' => '<string>',
'cart' => [
],
'customer' => [
],
'customer_privacy' => [
'analytics_processing_allowed' => true,
'marketing_allowed' => true,
'preferences_processing_allowed' => true,
'sale_of_data_allowed' => true
]
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json",
"x-shop: <x-shop>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://search.glood.ai/api/storefront/v1/headless/events"
payload := strings.NewReader("{\n \"event\": {\n \"id\": \"<string>\",\n \"timestamp\": \"2023-11-07T05:31:56Z\",\n \"context\": {\n \"navigator\": {\n \"user_agent\": \"<string>\"\n },\n \"document\": {},\n \"window\": {}\n },\n \"client_id\": \"<string>\",\n \"data\": {},\n \"custom_data\": {\n \"track\": {\n \"source\": \"<string>\",\n \"page_type\": \"<string>\",\n \"pages\": [\n {\n \"page_id\": \"<string>\"\n }\n ],\n \"products\": [\n {\n \"product_id\": \"<string>\",\n \"variant_id\": \"<string>\",\n \"quantity\": 123\n }\n ],\n \"request_id\": \"<string>\",\n \"filters\": [\n {\n \"key\": \"<string>\",\n \"value\": [\n \"<string>\"\n ]\n }\n ],\n \"search_term\": \"<string>\",\n \"checkout_token\": \"<string>\",\n \"campaign\": \"<string>\"\n }\n }\n },\n \"session_id\": \"<string>\",\n \"visitor_id\": \"<string>\",\n \"client_id\": \"<string>\",\n \"customer_id\": \"<string>\",\n \"page_type\": \"<string>\",\n \"page_url\": \"<string>\",\n \"cart_identifier\": \"<string>\",\n \"cart\": {},\n \"customer\": {},\n \"customer_privacy\": {\n \"analytics_processing_allowed\": true,\n \"marketing_allowed\": true,\n \"preferences_processing_allowed\": true,\n \"sale_of_data_allowed\": true\n }\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("x-shop", "<x-shop>")
req.Header.Add("Authorization", "Bearer <token>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://search.glood.ai/api/storefront/v1/headless/events")
.header("x-shop", "<x-shop>")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"event\": {\n \"id\": \"<string>\",\n \"timestamp\": \"2023-11-07T05:31:56Z\",\n \"context\": {\n \"navigator\": {\n \"user_agent\": \"<string>\"\n },\n \"document\": {},\n \"window\": {}\n },\n \"client_id\": \"<string>\",\n \"data\": {},\n \"custom_data\": {\n \"track\": {\n \"source\": \"<string>\",\n \"page_type\": \"<string>\",\n \"pages\": [\n {\n \"page_id\": \"<string>\"\n }\n ],\n \"products\": [\n {\n \"product_id\": \"<string>\",\n \"variant_id\": \"<string>\",\n \"quantity\": 123\n }\n ],\n \"request_id\": \"<string>\",\n \"filters\": [\n {\n \"key\": \"<string>\",\n \"value\": [\n \"<string>\"\n ]\n }\n ],\n \"search_term\": \"<string>\",\n \"checkout_token\": \"<string>\",\n \"campaign\": \"<string>\"\n }\n }\n },\n \"session_id\": \"<string>\",\n \"visitor_id\": \"<string>\",\n \"client_id\": \"<string>\",\n \"customer_id\": \"<string>\",\n \"page_type\": \"<string>\",\n \"page_url\": \"<string>\",\n \"cart_identifier\": \"<string>\",\n \"cart\": {},\n \"customer\": {},\n \"customer_privacy\": {\n \"analytics_processing_allowed\": true,\n \"marketing_allowed\": true,\n \"preferences_processing_allowed\": true,\n \"sale_of_data_allowed\": true\n }\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://search.glood.ai/api/storefront/v1/headless/events")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["x-shop"] = '<x-shop>'
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"event\": {\n \"id\": \"<string>\",\n \"timestamp\": \"2023-11-07T05:31:56Z\",\n \"context\": {\n \"navigator\": {\n \"user_agent\": \"<string>\"\n },\n \"document\": {},\n \"window\": {}\n },\n \"client_id\": \"<string>\",\n \"data\": {},\n \"custom_data\": {\n \"track\": {\n \"source\": \"<string>\",\n \"page_type\": \"<string>\",\n \"pages\": [\n {\n \"page_id\": \"<string>\"\n }\n ],\n \"products\": [\n {\n \"product_id\": \"<string>\",\n \"variant_id\": \"<string>\",\n \"quantity\": 123\n }\n ],\n \"request_id\": \"<string>\",\n \"filters\": [\n {\n \"key\": \"<string>\",\n \"value\": [\n \"<string>\"\n ]\n }\n ],\n \"search_term\": \"<string>\",\n \"checkout_token\": \"<string>\",\n \"campaign\": \"<string>\"\n }\n }\n },\n \"session_id\": \"<string>\",\n \"visitor_id\": \"<string>\",\n \"client_id\": \"<string>\",\n \"customer_id\": \"<string>\",\n \"page_type\": \"<string>\",\n \"page_url\": \"<string>\",\n \"cart_identifier\": \"<string>\",\n \"cart\": {},\n \"customer\": {},\n \"customer_privacy\": {\n \"analytics_processing_allowed\": true,\n \"marketing_allowed\": true,\n \"preferences_processing_allowed\": true,\n \"sale_of_data_allowed\": true\n }\n}"
response = http.request(request)
puts response.read_body{
"ok": true
}
{
"ok": false,
"error": "At least one of visitor_id or client_id is required"
}
{
"ok": false,
"error": [
{
"message": "\"channel\" must be one of [HYDROGEN, HEADLESS, MOBILE]",
"path": ["channel"],
"type": "any.only",
"context": { "label": "channel", "key": "channel" }
}
]
}
Send Search Events
Ingest storefront / personalization events (standard Shopify pixel events and custom glood:search:* attribution events). Shop is taken from x-shop. Auth: Authorization: Bearer <gl_sf_...> + x-shop.
curl --request POST \
--url https://search.glood.ai/api/storefront/v1/headless/events \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--header 'x-shop: <x-shop>' \
--data '
{
"event": {
"id": "<string>",
"timestamp": "2023-11-07T05:31:56Z",
"context": {
"navigator": {
"user_agent": "<string>"
},
"document": {},
"window": {}
},
"client_id": "<string>",
"data": {},
"custom_data": {
"track": {
"source": "<string>",
"page_type": "<string>",
"pages": [
{
"page_id": "<string>"
}
],
"products": [
{
"product_id": "<string>",
"variant_id": "<string>",
"quantity": 123
}
],
"request_id": "<string>",
"filters": [
{
"key": "<string>",
"value": [
"<string>"
]
}
],
"search_term": "<string>",
"checkout_token": "<string>",
"campaign": "<string>"
}
}
},
"session_id": "<string>",
"visitor_id": "<string>",
"client_id": "<string>",
"customer_id": "<string>",
"page_type": "<string>",
"page_url": "<string>",
"cart_identifier": "<string>",
"cart": {},
"customer": {},
"customer_privacy": {
"analytics_processing_allowed": true,
"marketing_allowed": true,
"preferences_processing_allowed": true,
"sale_of_data_allowed": true
}
}
'import requests
url = "https://search.glood.ai/api/storefront/v1/headless/events"
payload = {
"event": {
"id": "<string>",
"timestamp": "2023-11-07T05:31:56Z",
"context": {
"navigator": { "user_agent": "<string>" },
"document": {},
"window": {}
},
"client_id": "<string>",
"data": {},
"custom_data": { "track": {
"source": "<string>",
"page_type": "<string>",
"pages": [{ "page_id": "<string>" }],
"products": [
{
"product_id": "<string>",
"variant_id": "<string>",
"quantity": 123
}
],
"request_id": "<string>",
"filters": [
{
"key": "<string>",
"value": ["<string>"]
}
],
"search_term": "<string>",
"checkout_token": "<string>",
"campaign": "<string>"
} }
},
"session_id": "<string>",
"visitor_id": "<string>",
"client_id": "<string>",
"customer_id": "<string>",
"page_type": "<string>",
"page_url": "<string>",
"cart_identifier": "<string>",
"cart": {},
"customer": {},
"customer_privacy": {
"analytics_processing_allowed": True,
"marketing_allowed": True,
"preferences_processing_allowed": True,
"sale_of_data_allowed": True
}
}
headers = {
"x-shop": "<x-shop>",
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {
'x-shop': '<x-shop>',
Authorization: 'Bearer <token>',
'Content-Type': 'application/json'
},
body: JSON.stringify({
event: {
id: '<string>',
timestamp: '2023-11-07T05:31:56Z',
context: {navigator: {user_agent: '<string>'}, document: {}, window: {}},
client_id: '<string>',
data: {},
custom_data: {
track: {
source: '<string>',
page_type: '<string>',
pages: [{page_id: '<string>'}],
products: [{product_id: '<string>', variant_id: '<string>', quantity: 123}],
request_id: '<string>',
filters: [{key: '<string>', value: ['<string>']}],
search_term: '<string>',
checkout_token: '<string>',
campaign: '<string>'
}
}
},
session_id: '<string>',
visitor_id: '<string>',
client_id: '<string>',
customer_id: '<string>',
page_type: '<string>',
page_url: '<string>',
cart_identifier: '<string>',
cart: {},
customer: {},
customer_privacy: {
analytics_processing_allowed: true,
marketing_allowed: true,
preferences_processing_allowed: true,
sale_of_data_allowed: true
}
})
};
fetch('https://search.glood.ai/api/storefront/v1/headless/events', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://search.glood.ai/api/storefront/v1/headless/events",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'event' => [
'id' => '<string>',
'timestamp' => '2023-11-07T05:31:56Z',
'context' => [
'navigator' => [
'user_agent' => '<string>'
],
'document' => [
],
'window' => [
]
],
'client_id' => '<string>',
'data' => [
],
'custom_data' => [
'track' => [
'source' => '<string>',
'page_type' => '<string>',
'pages' => [
[
'page_id' => '<string>'
]
],
'products' => [
[
'product_id' => '<string>',
'variant_id' => '<string>',
'quantity' => 123
]
],
'request_id' => '<string>',
'filters' => [
[
'key' => '<string>',
'value' => [
'<string>'
]
]
],
'search_term' => '<string>',
'checkout_token' => '<string>',
'campaign' => '<string>'
]
]
],
'session_id' => '<string>',
'visitor_id' => '<string>',
'client_id' => '<string>',
'customer_id' => '<string>',
'page_type' => '<string>',
'page_url' => '<string>',
'cart_identifier' => '<string>',
'cart' => [
],
'customer' => [
],
'customer_privacy' => [
'analytics_processing_allowed' => true,
'marketing_allowed' => true,
'preferences_processing_allowed' => true,
'sale_of_data_allowed' => true
]
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json",
"x-shop: <x-shop>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://search.glood.ai/api/storefront/v1/headless/events"
payload := strings.NewReader("{\n \"event\": {\n \"id\": \"<string>\",\n \"timestamp\": \"2023-11-07T05:31:56Z\",\n \"context\": {\n \"navigator\": {\n \"user_agent\": \"<string>\"\n },\n \"document\": {},\n \"window\": {}\n },\n \"client_id\": \"<string>\",\n \"data\": {},\n \"custom_data\": {\n \"track\": {\n \"source\": \"<string>\",\n \"page_type\": \"<string>\",\n \"pages\": [\n {\n \"page_id\": \"<string>\"\n }\n ],\n \"products\": [\n {\n \"product_id\": \"<string>\",\n \"variant_id\": \"<string>\",\n \"quantity\": 123\n }\n ],\n \"request_id\": \"<string>\",\n \"filters\": [\n {\n \"key\": \"<string>\",\n \"value\": [\n \"<string>\"\n ]\n }\n ],\n \"search_term\": \"<string>\",\n \"checkout_token\": \"<string>\",\n \"campaign\": \"<string>\"\n }\n }\n },\n \"session_id\": \"<string>\",\n \"visitor_id\": \"<string>\",\n \"client_id\": \"<string>\",\n \"customer_id\": \"<string>\",\n \"page_type\": \"<string>\",\n \"page_url\": \"<string>\",\n \"cart_identifier\": \"<string>\",\n \"cart\": {},\n \"customer\": {},\n \"customer_privacy\": {\n \"analytics_processing_allowed\": true,\n \"marketing_allowed\": true,\n \"preferences_processing_allowed\": true,\n \"sale_of_data_allowed\": true\n }\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("x-shop", "<x-shop>")
req.Header.Add("Authorization", "Bearer <token>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://search.glood.ai/api/storefront/v1/headless/events")
.header("x-shop", "<x-shop>")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"event\": {\n \"id\": \"<string>\",\n \"timestamp\": \"2023-11-07T05:31:56Z\",\n \"context\": {\n \"navigator\": {\n \"user_agent\": \"<string>\"\n },\n \"document\": {},\n \"window\": {}\n },\n \"client_id\": \"<string>\",\n \"data\": {},\n \"custom_data\": {\n \"track\": {\n \"source\": \"<string>\",\n \"page_type\": \"<string>\",\n \"pages\": [\n {\n \"page_id\": \"<string>\"\n }\n ],\n \"products\": [\n {\n \"product_id\": \"<string>\",\n \"variant_id\": \"<string>\",\n \"quantity\": 123\n }\n ],\n \"request_id\": \"<string>\",\n \"filters\": [\n {\n \"key\": \"<string>\",\n \"value\": [\n \"<string>\"\n ]\n }\n ],\n \"search_term\": \"<string>\",\n \"checkout_token\": \"<string>\",\n \"campaign\": \"<string>\"\n }\n }\n },\n \"session_id\": \"<string>\",\n \"visitor_id\": \"<string>\",\n \"client_id\": \"<string>\",\n \"customer_id\": \"<string>\",\n \"page_type\": \"<string>\",\n \"page_url\": \"<string>\",\n \"cart_identifier\": \"<string>\",\n \"cart\": {},\n \"customer\": {},\n \"customer_privacy\": {\n \"analytics_processing_allowed\": true,\n \"marketing_allowed\": true,\n \"preferences_processing_allowed\": true,\n \"sale_of_data_allowed\": true\n }\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://search.glood.ai/api/storefront/v1/headless/events")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["x-shop"] = '<x-shop>'
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"event\": {\n \"id\": \"<string>\",\n \"timestamp\": \"2023-11-07T05:31:56Z\",\n \"context\": {\n \"navigator\": {\n \"user_agent\": \"<string>\"\n },\n \"document\": {},\n \"window\": {}\n },\n \"client_id\": \"<string>\",\n \"data\": {},\n \"custom_data\": {\n \"track\": {\n \"source\": \"<string>\",\n \"page_type\": \"<string>\",\n \"pages\": [\n {\n \"page_id\": \"<string>\"\n }\n ],\n \"products\": [\n {\n \"product_id\": \"<string>\",\n \"variant_id\": \"<string>\",\n \"quantity\": 123\n }\n ],\n \"request_id\": \"<string>\",\n \"filters\": [\n {\n \"key\": \"<string>\",\n \"value\": [\n \"<string>\"\n ]\n }\n ],\n \"search_term\": \"<string>\",\n \"checkout_token\": \"<string>\",\n \"campaign\": \"<string>\"\n }\n }\n },\n \"session_id\": \"<string>\",\n \"visitor_id\": \"<string>\",\n \"client_id\": \"<string>\",\n \"customer_id\": \"<string>\",\n \"page_type\": \"<string>\",\n \"page_url\": \"<string>\",\n \"cart_identifier\": \"<string>\",\n \"cart\": {},\n \"customer\": {},\n \"customer_privacy\": {\n \"analytics_processing_allowed\": true,\n \"marketing_allowed\": true,\n \"preferences_processing_allowed\": true,\n \"sale_of_data_allowed\": true\n }\n}"
response = http.request(request)
puts response.read_body{
"ok": true
}
{
"ok": false,
"error": "At least one of visitor_id or client_id is required"
}
{
"ok": false,
"error": [
{
"message": "\"channel\" must be one of [HYDROGEN, HEADLESS, MOBILE]",
"path": ["channel"],
"type": "any.only",
"context": { "label": "channel", "key": "channel" }
}
]
}
{
"ok": true
}
{
"ok": false,
"error": "At least one of visitor_id or client_id is required"
}
{
"ok": false,
"error": [
{
"message": "\"channel\" must be one of [HYDROGEN, HEADLESS, MOBILE]",
"path": ["channel"],
"type": "any.only",
"context": { "label": "channel", "key": "channel" }
}
]
}
Authorizations
Bearer authentication header of the form Bearer <token>, where <token> is your auth token.
Headers
Shopify store URL. Resolves the shop for the request (headless does not accept ?shop=).
"shop.myshopify.com"
Body
Request body
Storefront / personalization event ingestion. Shop is taken from the x-shop header (not the body). Requires channel and at least one of visitor_id / client_id.
Originating storefront channel.
HYDROGEN, HEADLESS, MOBILE The event envelope.
Show child attributes
Show child attributes
Browsing-session id (the unit of funnel + attribution analytics). Optional; the server generates a uuid when absent, but send a stable one per visit for accurate analytics.
Anonymous persistent visitor UID. At least one of visitor_id / client_id is required.
Client/device id (persists across sessions). At least one of visitor_id / client_id is required.
Shopify customer id when logged in.
Page type the event fired from.
URL the event fired from.
Cart token/key identifier.
Cart state at event time.
Customer info at event time.
Customer consent flags.
Show child attributes
Show child attributes
Response
Event accepted
Event ingestion acknowledgement.
Indicates the event was accepted.
true Was this page helpful?