Update Segmentation Set

PUT/services/{serviceUuid}/cds/segmentation_sets/{segmentationSetId}

Update Segmentation Set

Base URL
https://api-cpaas.sms.es/news/v1
Authentication

OAuth2 — send Authorization: Bearer <access_token>. Token URL: https://accounts-cpaas.sms.es/oauth2/access-token

Request

Path parameters

serviceUuidstringrequired

service (BM Account) UUID

segmentationSetIdstringrequired

Segmentation Set ID to update

Body required

Segmentation Set

application/json
uuidstring
namestringrequired
json_datastringrequired

Segmentation set groups. On the wire this is a JSON-serialized string, whose decoded form is an array of SegmentationQueryGroup objects (each an operator plus an array of SegmentationRule). See x-content-schema for the full definition.

Example: [{"rules":[{"field":"gender","operator":"AND","value":"male","condition":"eq"}],"operator":"AND"}]

Request example

cURL · cURL
curl -L -X PUT "https://api-cpaas.sms.es/news/v1/services/{serviceUuid}/cds/segmentation_sets/{segmentationSetId}" \
  -H "Content-Type: application/json" \
  -H "Accept: application/json" \
  -H "Authorization: Bearer <access_token>" \
  --data-raw '{
  "uuid": "string",
  "name": "string",
  "json_data": "[{\"rules\":[{\"field\":\"gender\",\"operator\":\"AND\",\"value\":\"male\",\"condition\":\"eq\"}],\"operator\":\"AND\"}]"
}'

Responses

Resource updated

application/json
uuidstring
namestringrequired
json_datastringrequired

Segmentation set groups. On the wire this is a JSON-serialized string, whose decoded form is an array of SegmentationQueryGroup objects (each an operator plus an array of SegmentationRule). See x-content-schema for the full definition.

Example: [{"rules":[{"field":"gender","operator":"AND","value":"male","condition":"eq"}],"operator":"AND"}]
Example response
{
  "uuid": "string",
  "name": "string",
  "json_data": "[{\"rules\":[{\"field\":\"gender\",\"operator\":\"AND\",\"value\":\"male\",\"condition\":\"eq\"}],\"operator\":\"AND\"}]"
}