POST
/
segments
curl --request POST \
  --url https://api.fabric.inc/v3/segments \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --header 'x-fabric-channel-id: <x-fabric-channel-id>' \
  --header 'x-fabric-tenant-id: <x-fabric-tenant-id>' \
  --data '{
  "name": "Customer Type",
  "values": [
    "High spender",
    "Medium spender",
    "Browser"
  ]
}'
{
  "id": 1000002,
  "name": "Spender",
  "values": [
    "High spender",
    "Medium spender",
    "Browser"
  ],
  "createdAt": "2019-08-20T14:15:22Z",
  "updatedAt": "2019-08-20T14:15:22Z",
  "isDeleted": true
}

Authorizations

Authorization
string
headerrequired

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

Headers

x-fabric-tenant-id
string
required

Merchant's 24-character tenant ID

x-fabric-channel-id
string
required

The sales channel ID.

x-client-id
string

The platform where the request is made.

x-fabric-request-id
string

A unique request ID.

Body

application/json
name
string
required

The name of the segment type.

values
string[]
required

The options within a segment type.

Response

201 - application/json
id
integer
required

The segment ID.

name
string
required

The name of the segment type.

values
string[]
required

The options within a segment type.

createdAt
string

Record's creation time

updatedAt
string

Record's last updated time

isDeleted
boolean
required

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