docs
  1. Promotions
  2. Customer Segments
  3. Create A Customer Segment

Create a customer segment

v1.204.1
OpenAPI 3.0.3

This is the specification of the SCAYLE Admin API.

For more information about how to interact with the Admin API, you can read the respective developer guide. The developer guide includes code samples for our PHP SDK, for our Java SDK and for JavaScript and curl.

Authentication is done via X-Access-Token HTTP Header as described here.

Base url should be prefixed with /api/admin/v1.

If a client side timeout is deemed necessary, it is recommended to set it at a minimum of 380 seconds.

Server:https://{tenant-space}.admin.api.scayle.cloud/v1
Client Libraries

CustomerSegments

​

Customer Segments

Create a customer segment

​

Creates a customer segment with specific name and criteria for the shop country's company.

Path Parameters

  • The shop key.

  • The shop country code; use shop country ID instead of country code when a country is ambiguous within a shop.

Body

required
application/json

Responses

  • application/json
  • application/json
  • application/json
  • application/json
  • application/json
  • application/json
Request Example for post/shops/{shopKey}/countries/{countryCode}/customer-segments
let segment = {
  criteriaDsl: 'id > 10 && "vip" in groups',
  active: true,
  referenceKey: 'segment_vip_001',
  name: 'VIP Segment'
};

let response = await adminApi.apis.CustomerSegments.createCustomerSegment(
  { shopKey: 'ms', countryCode: 'DE' },
  { requestBody: segment }
);
segment = response.body;

console.log(segment.guid);

{
  "guid": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
  "referenceKey": "segment_vip_001",
  "name": "VIP Segment",
  "criteriaDsl": "id > 10 && \"vip\" in groups",
  "rules": 1,
  "active": true,
  "createdDate": "2026-04-14T09:31:06+00:00",
  "updatedDate": "2026-04-14T09:31:06+00:00"
}

Models

​
​

Last updated: December 02, 2026