Segment

Update a specific segment

Updates a specific segment by segmentId

put/api-offers/segment/{segmentId}

Request

Path parameters

segmentIdnumber required
Example:100002

ID of the segment to be updated

Headers

x-site-contextstring required
Example:{"date": "2023-01-01T00:00:00.000Z", "channel": 12, "account": "1234abcd5678efgh9ijklmno","stage":"production"}

The x-site-context header is a JSON object that contains information about the source you wish to pull from. The mandatory account is the 24 character identifier found in Copilot. The channel (Sales channel ID), stage (environment name), and date attributes can be used to further narrow the scope of your data source.

Request body

namestring required

Name of segment

valuestring[] required

Array of segment value

Example request

{
  "name": "Customer Type",
  "value": [
    "High Spender"
  ]
}

Response

OK

_idstring

fabric internal database ObjectId of the record

segmentIdnumber

System generated unique ID of the Segment

namestring

Name of the segment

valuestring[]

Array of segment values

deletedboolean

true: segment is deleted<br /> false: segment is not deleted

createdAtstring date-time

Creation date of the record

updatedAtstring date-time

Last updated date of the record

Example response

{
  "_id": "614b58924e92f6861ac9d43b",
  "segmentId": 100002,
  "name": "Customer Type",
  "value": [
    "High Spender"
  ],
  "createdAt": "2020-12-14T12:15:43.646Z",
  "updatedAt": "2021-12-14T12:15:43.646Z"
}

Changes

No recorded changes to this operation across all 2 revisions of this API.