Segments
Customer segmentation utilities
Returns segments available to the authenticated user based on segmentation rules.
Authorizations
CookiestringRequired
Session cookie (e.g., sessionid=abc123)
Header parameters
CookiestringRequired
Session cookie header (e.g. sessionid=abc123)
Responses
200
Available segments
application/json
pkintegerRequired
namestringRequired
priorityintegerRequired
401
Authentication required
get/users/segments/
GET /users/segments/ HTTP/1.1
Host: sandbox.akinon.com
Cookie: text
Accept: */*
[
{
"pk": 1,
"name": "text",
"priority": 1
}
]Authorizations
CookiestringRequired
Session cookie (e.g., sessionid=abc123)
Path parameters
segment_idintegerRequired
Header parameters
CookiestringRequired
Session cookie header (e.g. sessionid=abc123)
X-CSRFTokenstringRequired
CSRF token header for unsafe methods (POST/PUT/PATCH/DELETE)
Responses
200
Segment assigned
application/json
pkintegerRequired
namestringRequired
priorityintegerRequired
price_listinteger · nullableOptional
401
Authentication required
404
Segment not found
post/users/segments/{segment_id}/set/
POST /users/segments/{segment_id}/set/ HTTP/1.1
Host: sandbox.akinon.com
Cookie: text
X-CSRFToken: text
Accept: */*
{
"pk": 1,
"name": "text",
"priority": 1,
"price_list": null
}Re-evaluates segmentation rules and assigns the best matching segment. This action is available without authentication.
Responses
200
Segment recalculated
application/json
messagestringOptionalExample:
Segment successfully assigned. segment:employeepost/users/segments/recalculate_segment/
POST /users/segments/recalculate_segment/ HTTP/1.1
Host: sandbox.akinon.com
Accept: */*
200
Segment recalculated
{
"message": "Segment successfully assigned. segment:employee"
}Last updated
Was this helpful?

