curl --request POST \
--url https://api.getredo.com/v2.2/stores/{storeId}/storefront/events \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"eventId": "<string>",
"source": "AIMERCE",
"timestamp": "2023-11-07T05:31:56Z",
"anonymousId": "<string>",
"cart": {},
"cartLine": {},
"checkout": {},
"collection": {},
"customer": {},
"customerEmail": "jsmith@example.com",
"customerPhone": "<string>",
"productVariant": {},
"urlWithParams": "<string>",
"urlWithoutParams": "<string>"
}
'import requests
url = "https://api.getredo.com/v2.2/stores/{storeId}/storefront/events"
payload = {
"eventId": "<string>",
"source": "AIMERCE",
"timestamp": "2023-11-07T05:31:56Z",
"anonymousId": "<string>",
"cart": {},
"cartLine": {},
"checkout": {},
"collection": {},
"customer": {},
"customerEmail": "jsmith@example.com",
"customerPhone": "<string>",
"productVariant": {},
"urlWithParams": "<string>",
"urlWithoutParams": "<string>"
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
eventId: '<string>',
source: 'AIMERCE',
timestamp: '2023-11-07T05:31:56Z',
anonymousId: '<string>',
cart: {},
cartLine: {},
checkout: {},
collection: {},
customer: {},
customerEmail: 'jsmith@example.com',
customerPhone: '<string>',
productVariant: {},
urlWithParams: '<string>',
urlWithoutParams: '<string>'
})
};
fetch('https://api.getredo.com/v2.2/stores/{storeId}/storefront/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://api.getredo.com/v2.2/stores/{storeId}/storefront/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([
'eventId' => '<string>',
'source' => 'AIMERCE',
'timestamp' => '2023-11-07T05:31:56Z',
'anonymousId' => '<string>',
'cart' => [
],
'cartLine' => [
],
'checkout' => [
],
'collection' => [
],
'customer' => [
],
'customerEmail' => 'jsmith@example.com',
'customerPhone' => '<string>',
'productVariant' => [
],
'urlWithParams' => '<string>',
'urlWithoutParams' => '<string>'
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json"
],
]);
$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://api.getredo.com/v2.2/stores/{storeId}/storefront/events"
payload := strings.NewReader("{\n \"eventId\": \"<string>\",\n \"source\": \"AIMERCE\",\n \"timestamp\": \"2023-11-07T05:31:56Z\",\n \"anonymousId\": \"<string>\",\n \"cart\": {},\n \"cartLine\": {},\n \"checkout\": {},\n \"collection\": {},\n \"customer\": {},\n \"customerEmail\": \"jsmith@example.com\",\n \"customerPhone\": \"<string>\",\n \"productVariant\": {},\n \"urlWithParams\": \"<string>\",\n \"urlWithoutParams\": \"<string>\"\n}")
req, _ := http.NewRequest("POST", url, payload)
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://api.getredo.com/v2.2/stores/{storeId}/storefront/events")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"eventId\": \"<string>\",\n \"source\": \"AIMERCE\",\n \"timestamp\": \"2023-11-07T05:31:56Z\",\n \"anonymousId\": \"<string>\",\n \"cart\": {},\n \"cartLine\": {},\n \"checkout\": {},\n \"collection\": {},\n \"customer\": {},\n \"customerEmail\": \"jsmith@example.com\",\n \"customerPhone\": \"<string>\",\n \"productVariant\": {},\n \"urlWithParams\": \"<string>\",\n \"urlWithoutParams\": \"<string>\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.getredo.com/v2.2/stores/{storeId}/storefront/events")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"eventId\": \"<string>\",\n \"source\": \"AIMERCE\",\n \"timestamp\": \"2023-11-07T05:31:56Z\",\n \"anonymousId\": \"<string>\",\n \"cart\": {},\n \"cartLine\": {},\n \"checkout\": {},\n \"collection\": {},\n \"customer\": {},\n \"customerEmail\": \"jsmith@example.com\",\n \"customerPhone\": \"<string>\",\n \"productVariant\": {},\n \"urlWithParams\": \"<string>\",\n \"urlWithoutParams\": \"<string>\"\n}"
response = http.request(request)
puts response.read_body{
"detail": "<string>",
"instance": "<string>",
"title": "<string>",
"type": "about:blank"
}{
"detail": "<string>",
"instance": "<string>",
"title": "<string>",
"type": "about:blank"
}Receive Storefront Events
Processes events from storefronts using Shopify pixel event schema Requires the storefront_events_write scope.
curl --request POST \
--url https://api.getredo.com/v2.2/stores/{storeId}/storefront/events \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"eventId": "<string>",
"source": "AIMERCE",
"timestamp": "2023-11-07T05:31:56Z",
"anonymousId": "<string>",
"cart": {},
"cartLine": {},
"checkout": {},
"collection": {},
"customer": {},
"customerEmail": "jsmith@example.com",
"customerPhone": "<string>",
"productVariant": {},
"urlWithParams": "<string>",
"urlWithoutParams": "<string>"
}
'import requests
url = "https://api.getredo.com/v2.2/stores/{storeId}/storefront/events"
payload = {
"eventId": "<string>",
"source": "AIMERCE",
"timestamp": "2023-11-07T05:31:56Z",
"anonymousId": "<string>",
"cart": {},
"cartLine": {},
"checkout": {},
"collection": {},
"customer": {},
"customerEmail": "jsmith@example.com",
"customerPhone": "<string>",
"productVariant": {},
"urlWithParams": "<string>",
"urlWithoutParams": "<string>"
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
eventId: '<string>',
source: 'AIMERCE',
timestamp: '2023-11-07T05:31:56Z',
anonymousId: '<string>',
cart: {},
cartLine: {},
checkout: {},
collection: {},
customer: {},
customerEmail: 'jsmith@example.com',
customerPhone: '<string>',
productVariant: {},
urlWithParams: '<string>',
urlWithoutParams: '<string>'
})
};
fetch('https://api.getredo.com/v2.2/stores/{storeId}/storefront/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://api.getredo.com/v2.2/stores/{storeId}/storefront/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([
'eventId' => '<string>',
'source' => 'AIMERCE',
'timestamp' => '2023-11-07T05:31:56Z',
'anonymousId' => '<string>',
'cart' => [
],
'cartLine' => [
],
'checkout' => [
],
'collection' => [
],
'customer' => [
],
'customerEmail' => 'jsmith@example.com',
'customerPhone' => '<string>',
'productVariant' => [
],
'urlWithParams' => '<string>',
'urlWithoutParams' => '<string>'
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json"
],
]);
$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://api.getredo.com/v2.2/stores/{storeId}/storefront/events"
payload := strings.NewReader("{\n \"eventId\": \"<string>\",\n \"source\": \"AIMERCE\",\n \"timestamp\": \"2023-11-07T05:31:56Z\",\n \"anonymousId\": \"<string>\",\n \"cart\": {},\n \"cartLine\": {},\n \"checkout\": {},\n \"collection\": {},\n \"customer\": {},\n \"customerEmail\": \"jsmith@example.com\",\n \"customerPhone\": \"<string>\",\n \"productVariant\": {},\n \"urlWithParams\": \"<string>\",\n \"urlWithoutParams\": \"<string>\"\n}")
req, _ := http.NewRequest("POST", url, payload)
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://api.getredo.com/v2.2/stores/{storeId}/storefront/events")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"eventId\": \"<string>\",\n \"source\": \"AIMERCE\",\n \"timestamp\": \"2023-11-07T05:31:56Z\",\n \"anonymousId\": \"<string>\",\n \"cart\": {},\n \"cartLine\": {},\n \"checkout\": {},\n \"collection\": {},\n \"customer\": {},\n \"customerEmail\": \"jsmith@example.com\",\n \"customerPhone\": \"<string>\",\n \"productVariant\": {},\n \"urlWithParams\": \"<string>\",\n \"urlWithoutParams\": \"<string>\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.getredo.com/v2.2/stores/{storeId}/storefront/events")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"eventId\": \"<string>\",\n \"source\": \"AIMERCE\",\n \"timestamp\": \"2023-11-07T05:31:56Z\",\n \"anonymousId\": \"<string>\",\n \"cart\": {},\n \"cartLine\": {},\n \"checkout\": {},\n \"collection\": {},\n \"customer\": {},\n \"customerEmail\": \"jsmith@example.com\",\n \"customerPhone\": \"<string>\",\n \"productVariant\": {},\n \"urlWithParams\": \"<string>\",\n \"urlWithoutParams\": \"<string>\"\n}"
response = http.request(request)
puts response.read_body{
"detail": "<string>",
"instance": "<string>",
"title": "<string>",
"type": "about:blank"
}{
"detail": "<string>",
"instance": "<string>",
"title": "<string>",
"type": "about:blank"
}Authorizations
Bearer authentication header of the form Bearer <token>, where <token> is your auth token.
Path Parameters
Store ID
"64e5a8a1af49a89df37e4ee7"
Body
Shopify pixel event for storefront tracking.
Unique identifier for the event.
Name of the Shopify pixel event.
product_added_to_cart, product_removed_from_cart, product_viewed, checkout_started, checkout_completed, checkout_contact_info_submitted, page_viewed, collection_viewed Source of the event.
AIMERCE ISO 8601 timestamp when the event occurred.
Anonymous identifier for users without account.
Cart information.
Information about specific cart line item.
Checkout information.
Collection information.
Customer information if available.
Customer email if available.
Customer phone if available.
Product variant information.
Complete page URL with query parameters.
Page URL without query parameters.
Response
Event processed successfully
Was this page helpful?