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

Update 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

​

Update a customer segment

​

Updates an existing customer segment 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.

  • Unique identifier of the customer segment.

Body·

required
application/json
  • Whether the segment is active.

  • Criteria DSL defining the segment rules (e.g. "TIER-A" IN groups AND LTV > 1000).

  • Display name of the segment.

  • Business-facing identifier.

Responses

  • application/json
  • application/json
  • application/json
  • application/json
  • application/json
  • application/json
  • application/json
Request Example for patch/shops/{shopKey}/countries/{countryCode}/customer-segments/{segmentGuid}
let patch = {
  active: false,
  name: 'Renamed segment'
};

let response = await adminApi.apis.CustomerSegments.updateCustomerSegment(
  {
    shopKey: 'ms',
    countryCode: 'DE',
    segmentGuid: '3fa85f64-5717-4562-b3fc-2c963f66afa6'
  },
  { requestBody: patch }
);
let segment = response.body;

console.log(segment.name);

{
  "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