List customer segments
GET
/api/v1/commerce/segments
const url = 'https://digize.com/api/v1/commerce/segments';const options = {method: 'GET', headers: {'x-api-key': '<x-api-key>'}};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}curl --request GET \ --url https://digize.com/api/v1/commerce/segments \ --header 'x-api-key: <x-api-key>'Saved customer filters, by name.
Needs the commerce:read permission.
Authorizations
Section titled “Authorizations”Responses
Section titled “Responses”Done
Media typeapplication/json
object
rows
required
Array<object>
object
id
required
string
name
required
string
filter
required
object
search
string
tags
Array<string>
minOrders
integer
maxOrders
integer
minSpent
integer
maxSpent
integer
orderedWithinDays
integer
notOrderedWithinDays
integer
emailMarketing
Array<string>
hasStoreCredit
boolean
minPoints
integer
location
string
createdBy
required
string
createdAt
required
string format: date-time
updatedAt
required
string format: date-time
total
required
number
Example
{ "rows": [ { "filter": { "emailMarketing": [ "subscribed" ] } } ]}What was sent isn’t valid (invalid).
Media typeapplication/json
object
error
required
object
code
required
string
message
required
string
details
object
key
additional properties
any
Example
{ "error": { "code": "invalid" }}No key, or one that’s unknown, off or expired.
Media typeapplication/json
object
error
required
object
code
required
string
message
required
string
details
object
key
additional properties
any
Example
{ "error": { "code": "invalid" }}The key doesn’t have the permission this needs.
Media typeapplication/json
object
error
required
object
code
required
string
message
required
string
details
object
key
additional properties
any
Example
{ "error": { "code": "invalid" }}Nothing has that id (not_found).
Media typeapplication/json
object
error
required
object
code
required
string
message
required
string
details
object
key
additional properties
any
Example
{ "error": { "code": "invalid" }}Over the rate limit; see retry-after.
Media typeapplication/json
object
error
required
object
code
required
string
message
required
string
details
object
key
additional properties
any
Example
{ "error": { "code": "invalid" }}