Skip to main content
PATCH
Update a segment

Authorizations

Authorization
string
header
required

Sign in with the existing Occtoo Studio identity and selected organization.

Path Parameters

cardId
string
required

Raw id of the card definition (e.g. products).

segmentId
string
required

Raw id of the segment (e.g. summer26).

Body

application/json

Holds changes to a segment. Omitted or null fields stay as they are.

name
null | string

New name of the segment.

language
null | string

New language code where uses for localized card properties. A change starts tagging again.

where
null | object

New filter that picks the segment's cards. A change starts tagging again.

description
null | string

New free-text note. An empty string clears it.

image
null | string

New image key, lowercase letters a-z only.

tags
null | string[]

New labels for grouping and filtering segments.

startTime
null | string<date-time>

New time the segment becomes active, on the hour (UTC). Only while the segment is Scheduled.

endTime
null | string<date-time>

New time the segment is archived, on the hour (UTC).

Response

OK

Names a set of cards of one card definition, picked by a where filter or by a fixed list of card ids.

id
string
required

Raw id of the segment (e.g. summer26). Use with /v1/card-definitions/{cardId}/segments/{segmentId}.

segmentDefinitionId
string
required

Raw id of the segment definition the segment belongs to.

cardId
string
required

Raw id of the card definition whose cards the segment picks (e.g. products).

type
enum<string>
required

How the segment picks its cards. See SegmentType.

Available options:
Query,
Fixed
status
enum<string>
required

Lifecycle state of the segment. See SegmentStatus.

Available options:
Initializing,
Active,
Scheduled,
Archived
name
string
required

Name of the segment.

description
null | string
required

Free-text note about the segment.

language
string
required

Language code where uses for localized card properties (e.g. en).

image
null | string
required

Image key, lowercase letters a-z only. Null when not set.

tags
string[]
required

Labels for grouping and filtering segments. Alphanumeric, no duplicates.

where
null | object
required

Filter that picks the segment's cards, as stored. It can differ in form from what was sent, never in meaning.

startTime
null | string<date-time>
required

When the segment becomes active, on the hour (UTC). Null = active as soon as it's created.

endTime
null | string<date-time>
required

When the segment is archived, on the hour (UTC). Null = never archived on a schedule.

createdAt
string<date-time>
required

When the segment was created (UTC).

updatedAt
string<date-time>
required

When the segment last changed (UTC).