infoOverview
About this API
keySecurity
Authentication
This endpoint does not require authentication.
routeParameters
Path Parameters
Substitute these placeholders in the endpoint URL before sending the request.
NameTypeRequirementDescription
{SHOPIFY_API_VERSIONstringRequiredPath value for {SHOPIFY_API_VERSION.tuneParameters
Query Parameters
Append these values to the URL query string. Omit optional parameters when they are not needed.
NameTypeRequirementDescription
filterstringNot specifiedsearch with nameorg_idstringNot specifiedRequest value for org id.shop_domainstringNot specifiedRequest value for shop domain.uploadInput
Request Details
check_circle
No Request Body
Provide identifiers in the path and any supported values in the query string.
codeIntegration
Code Examples
Select your language and customize the request URL. Credential placeholders are intentionally preserved so secrets never appear in generated samples.
shield_lockCredentials protectedAdd secrets only in your secure server environment.
curl --request GET 'https://connectors.1spoc.com/shopify/{{SHOPIFY_API_VERSION}}/segments?filter=Customers+who&org_id=30dcfb49-8ae0-44ed-8403-142205a40557&shop_domain=dev-store-749237498237499135.myshopify.com'
const response = await fetch('https://connectors.1spoc.com/shopify/{{SHOPIFY_API_VERSION}}/segments?filter=Customers+who&org_id=30dcfb49-8ae0-44ed-8403-142205a40557&shop_domain=dev-store-749237498237499135.myshopify.com', {
method: 'GET',
});
if (!response.ok) throw new Error(`HTTP ${response.status}`);
const data = await response.json();
console.log(data);
const response = await fetch('https://connectors.1spoc.com/shopify/{{SHOPIFY_API_VERSION}}/segments?filter=Customers+who&org_id=30dcfb49-8ae0-44ed-8403-142205a40557&shop_domain=dev-store-749237498237499135.myshopify.com', {
method: 'GET',
});
if (!response.ok) throw new Error(`HTTP ${response.status}`);
const data = await response.json();
console.log(data);
import json
import requests
url = 'https://connectors.1spoc.com/shopify/{{SHOPIFY_API_VERSION}}/segments?filter=Customers+who&org_id=30dcfb49-8ae0-44ed-8403-142205a40557&shop_domain=dev-store-749237498237499135.myshopify.com'
headers = {}
response = requests.get(url, headers=headers)
response.raise_for_status()
print(response.json())
import java.net.URI;
import java.net.http.HttpClient;
import java.net.http.HttpRequest;
import java.net.http.HttpResponse;
var client = HttpClient.newHttpClient();
var request = HttpRequest.newBuilder(URI.create("https://connectors.1spoc.com/shopify/{{SHOPIFY_API_VERSION}}/segments?filter=Customers+who&org_id=30dcfb49-8ae0-44ed-8403-142205a40557&shop_domain=dev-store-749237498237499135.myshopify.com"))
.method("GET", HttpRequest.BodyPublishers.noBody())
.build();
var response = client.send(request, HttpResponse.BodyHandlers.ofString());
System.out.println(response.statusCode());
System.out.println(response.body());
<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => 'https://connectors.1spoc.com/shopify/{{SHOPIFY_API_VERSION}}/segments?filter=Customers+who&org_id=30dcfb49-8ae0-44ed-8403-142205a40557&shop_domain=dev-store-749237498237499135.myshopify.com',
CURLOPT_RETURNTRANSFER => true,
CURLOPT_CUSTOMREQUEST => 'GET',
]);
$response = curl_exec($curl);
if ($response === false) throw new Exception(curl_error($curl));
curl_close($curl);
echo $response;
using System.Net.Http.Headers;
using System.Text;
using var client = new HttpClient();
var response = await client.GetAsync("https://connectors.1spoc.com/shopify/{{SHOPIFY_API_VERSION}}/segments?filter=Customers+who&org_id=30dcfb49-8ae0-44ed-8403-142205a40557&shop_domain=dev-store-749237498237499135.myshopify.com");
response.EnsureSuccessStatusCode();
Console.WriteLine(await response.Content.ReadAsStringAsync());
package main
import (
"fmt"
"io"
"net/http"
)
func main() {
request, err := http.NewRequest("GET", "https://connectors.1spoc.com/shopify/{{SHOPIFY_API_VERSION}}/segments?filter=Customers+who&org_id=30dcfb49-8ae0-44ed-8403-142205a40557&shop_domain=dev-store-749237498237499135.myshopify.com", nil)
if err != nil { panic(err) }
request.Header.Set("Accept", "application/json")
response, err := http.DefaultClient.Do(request)
if err != nil { panic(err) }
defer response.Body.Close()
data, err := io.ReadAll(response.Body)
if err != nil { panic(err) }
if response.StatusCode >= 400 { panic(fmt.Sprintf("HTTP %d: %s", response.StatusCode, data)) }
fmt.Println(string(data))
}
downloadOutput
Response
A successful request returns the documented response payload. Delivery and asynchronous events may arrive separately through configured webhooks.
{
"200": {
"data": [
{
"id": "gid://shopify/Segment/455341768819",
"name": "Customers who haven't purchased",
"details": {
"queryUsedBySegment": "number_of_orders = 0"
}
},
{
"id": "gid://shopify/Segment/455341801587",
"name": "Customers who have purchased more than once",
"details": {
"queryUsedBySegment": "number_of_orders > 1"
}
},
{
"id": "gid://shopify/Segment/455341834355",
"name": "Abandoned checkouts in the last 30 days",
"details": {
"queryUsedBySegment": "abandoned_checkout_date >= -30d"
}
},
{
"id": "gid://shopify/Segment/455341867123",
"name": "Email subscribers",
"details": {
"queryUsedBySegment": "email_subscription_status = 'SUBSCRIBED'"
}
},
{
"id": "gid://shopify/Segment/455341899891",
"name": "Customers who have purchased at least once",
"details": {
"queryUsedBySegment": "number_of_orders >= 1"
}
},
{
"id": "gid://shopify/Segment/460980977779",
"name": "VIP Customers",
"details": {
"queryUsedBySegment": "orders_placed MATCHES (\n count >= 3,\n sum_amount >= 1000,\n date >= -90d\n)"
}
},
{
"id": "gid://shopify/Segment/461002309747",
"name": "More than 3 orders",
"details": {
"queryUsedBySegment": "orders_placed MATCHES (\n count >= 3,\n date >= -90d\n)"
}
},
{
"id": "gid://shopify/Segment/461002342515",
"name": "More Than 1000 USD",
"details": {
"queryUsedBySegment": "amount_spent > 1000\nAND products_purchased MATCHES (\n tag CONTAINS ''\n)"
}
},
{
"id": "gid://shopify/Segment/461002375283",
"name": "High Purches",
"details": {
"queryUsedBySegment": "predicted_spend_tier = 'HIGH'"
}
},
{
"id": "gid://shopify/Segment/461002408051",
"name": "US Customers",
"details": {
"queryUsedBySegment": "customer_countries CONTAINS 'US'"
}
}
],
"isLastPage": false,
"totalCount": 11,
"isFirstPage": true,
"nextPageInfo": "eyJsaW1pdCI6MTAsInNvcnRfZmllbGRzIjoiY3JlYXRlZF9hdCIsInNvcnRfZGlyIjoiYXNjIiwibGFzdF9pZCI6NDYxMDAyNDA4MDUxLCJsYXN0X3ZhbHVlIjpbIjIwMjYtMDMtMDUgMTI6Mjc6MDMuNzY5MjA2Il0sImRpcmVjdGlvbiI6Im5leHQifQ==",
"previousPageInfo": null
},
"400": {
"message": "shop_domain is required"
},
"404": {
"message": "Shop not found."
}
}
{
"type": "object",
"properties": {
"data": {
"type": "array",
"items": {
"type": "object",
"properties": {
"id": {
"type": "string"
},
"name": {
"type": "string"
},
"details": {
"type": "object",
"properties": {
"queryUsedBySegment": {
"type": "string"
}
}
}
}
}
},
"isLastPage": {
"type": "boolean"
},
"totalCount": {
"type": "integer"
},
"isFirstPage": {
"type": "boolean"
},
"nextPageInfo": {
"type": "string"
},
"previousPageInfo": {
"type": [
"null"
]
}
}
}
ruleHTTP Responses
Status Codes
404Not Found200OK400Bad Request