POST
/
v1
/
trait
Create Trait
curl --request POST \
  --url https://live.copilot.fabric.inc/data-customer/v1/trait \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --header 'x-site-context: <x-site-context>' \
  --data '{
  "traitId": "1001",
  "name": "VIP"
}'
{
  "_id": "61604a30fdfacd0009816e44",
  "isDeleted": false,
  "traitId": "1001",
  "name": "VIP",
  "createdAt": "2021-08-30T23:20:42.822Z",
  "updatedAt": "2021-08-30T23:20:42.822Z"
}

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\"}"

Body

application/json

A sample request to create a trait.

traitId
string

readable Id for trait

Example:

"1001"

name
string

name of the trait

Example:

"VIP"

Response

OK

_id
string

Fabric internal id of the record

Example:

"61604a30fdfacd0009816e44"

isDeleted
boolean

flag that indicates if the record is deleted

Example:

false

traitId
string

readable Id for trait

Example:

"1001"

name
string

name of the trait

Example:

"VIP"

createdAt
string<date-time>

date of creation of the record

Example:

"2021-08-30T23:20:42.822Z"

updatedAt
string<date-time>

laste date of update of the record

Example:

"2021-08-30T23:20:42.822Z"