Skip to main content
GET
/
v1
/
segments
/
{segmentId}
Get Segment
curl --request GET \
  --url https://{cluster}.voucherify.io/v1/segments/{segmentId} \
  --header 'Authorization: Bearer <token>' \
  --header 'X-App-Id: <api-key>' \
  --header 'X-App-Token: <api-key>'
{
  "id": "seg_Mv5w1b2FIEbiCCO5ioT8TfI2",
  "name": "Tiers 2 - Senior",
  "created_at": "2022-06-09T13:21:26.656Z",
  "type": "auto-update",
  "filter": {
    "junction": "and",
    "loyalty_points.campaigns.Tiers 2.points": {
      "conditions": {
        "$more_than_equal": [
          41
        ]
      }
    }
  },
  "initial_sync_status": "DONE",
  "object": "segment"
}

Authorizations

X-App-Id
string
header
required
X-App-Token
string
header
required
Authorization
string
header
required

The access token received from the authorization server in the OAuth 2.0 flow.

Path Parameters

segmentId
string
required

A unique customer segment ID.

Example:

"seg_DNAOhUtJffvX0f57ajLMFBYR"

Response

Returns segment object.

Response body schema for GET v1/v1/segments/{segmentId}. This is an object representing a customer segment.

id
string

Unique segment ID.

Example:

"seg_1wc52c5z6r1kQ81brO8j9Hk2"

name
string

Segment name.

created_at
string<date-time>

Timestamp representing the date and time when the segment was created. The value is shown in the ISO 8601 format.

Example:

"2022-05-12T13:01:56.896Z"

type
enum<string>

Describes whether the segment is dynamic (customers come in and leave based on set criteria) or static (manually selected customers).

Available options:
auto-update,
static
filter
object | null

Defines a set of criteria for an auto-update segment type.

initial_sync_status
enum<string>
Available options:
IN_PROGRESS,
DONE
object
enum<string>
default:segment

The type of the object represented by JSON. This object stores information about the customer segment.

Available options:
segment
I