DELETE
/
api-offers
/
segment
/
{segmentId}
curl --request DELETE \
  --url https://live.copilot.fabric.inc/api-offers/segment/{segmentId} \
  --header 'Authorization: Bearer <token>' \
  --header 'x-site-context: <x-site-context>'
{
  "_id": "614b58924e92f6861ac9d43b",
  "segmentId": 100002,
  "name": "Customer Type",
  "value": [
    "High Spender"
  ],
  "deleted": true,
  "createdAt": "2020-12-14T12:15:43.646Z",
  "updatedAt": "2021-12-14T12:15:43.646Z"
}

Authorizations

Authorization
string
header
required

Bearer authentication header of the form Bearer <token>, where <token> is your auth token.

Headers

x-site-context
string
required

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.

Example:

"{\"date\": \"2023-01-01T00:00:00.000Z\", \"channel\": 12, \"account\": \"1234abcd5678efgh9ijklmno\",\"stage\":\"production\"}"

Path Parameters

segmentId
number
required

ID of the segment to be deleted

Example:

100002

Response

200
application/json
OK
_id
string

fabric internal database ObjectId of the record

Example:

"614b58924e92f6861ac9d43b"

segmentId
number

System generated unique ID of the segment

Example:

100002

name
string

Name of segment

Example:

"Customer Type"

value
string[]

Array of segment value

deleted
boolean

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

Example:

true

createdAt
string

Creation date of the record

Example:

"2020-12-14T12:15:43.646Z"

updatedAt
string

Last updated date of the record

Example:

"2021-12-14T12:15:43.646Z"