POST
/
v1
/
party-trait
/
partyTrait
Create Party trait
curl --request POST \
  --url https://live.copilot.fabric.inc/data-customer/v1/party-trait/partyTrait \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --header 'x-site-context: <x-site-context>' \
  --data '{
  "partyId": "612d205f3535d7000890492f",
  "traitId": "612d205f3535d7000890492g",
  "traitScore": 0.5
}'
{
  "_id": "612d205f3535d7000890492f",
  "partyId": "612d205f3535d7000890492f",
  "traitId": "612d205f3535d7000890492g",
  "traitScore": 0.5
}

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 party trait.

partyId
string
required
Example:

"612d205f3535d7000890492f"

traitId
string
required
Example:

"612d205f3535d7000890492g"

traitScore
number
Example:

0.5

Response

OK

_id
string
Example:

"612d205f3535d7000890492f"

partyId
string
Example:

"612d205f3535d7000890492f"

traitId
string
Example:

"612d205f3535d7000890492g"

traitScore
number
Example:

0.5