POST
/
product-attributes
curl --request POST \
  --url https://api.fabric.inc/v3/product-attributes \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '{
  "name": "Category datetime example",
  "isLocalizable": false,
  "target": "CATEGORY",
  "type": "DATETIME",
  "validation": {
    "isMandatory": false,
    "isManualOverwrite": false,
    "formula": "",
    "dateFormat": "MM/DD/YYYY"
  }
}'
{
  "id": "64c15582e1f95e3214660d08",
  "name": "Category datetime example",
  "isLocalizable": false,
  "target": "CATEGORY",
  "type": "DATETIME",
  "validation": {
    "isMandatory": false,
    "isManualOverwrite": false,
    "formula": "",
    "dateFormat": "MM/DD/YYYY"
  },
  "updatedAt": "2023-07-26T17:18:47.162Z",
  "createdAt": "2023-07-26T17:18:47.162Z",
  "updatedBy": "test@email.com"
}

Authorizations

Authorization
string
header
required

S2S access token (JWT) from fabric Identity service (during Login)

Headers

x-fabric-tenant-id
string

A header used by fabric to identify the tenant making the request. You must include tenant id in the authentication header for an API request to access any of fabric’s endpoints. You can retrieve the tenant id , which is also called account id, from Copilot. This header is required.

x-fabric-request-id
string

Unique request ID

Body

application/json
target
required

Single string for EQUALS operation; comma-separated string for an IN operation

Available options:
PRODUCT,
CATEGORY
type
enum<string>
required

Attribute type

Available options:
TEXT,
NUMBER,
DATETIME,
BOOLEAN,
OPTIONS,
SERIAL
description
string

Attribute description

isLocalizable
boolean

true: Attribute name is translated into different languages or localized for different regions <br /> false: Attribute name isn't localized Note: Refer to localizedProperties to get relevant attributes based on locale.

localizedProperties
object

Names of localized attributes

name
string

Attribute name that appears when it isn't localized. Refer to localizedProperties to get the localized name.

validation
object

Validation details

Response

200 - application/json
createdAt
string

Time of attribute creation (UTC)

description
string

Brief description of attribute

id
string

Attribute ID

isLocalizable
boolean

true: Attribute name is translated into different languages or localized for different regions <br /> false: Attribute name isn't localized Note: Refer to localizedProperties to get relevant attributes based on locale.

localizedProperties
object

Names of localized attributes

name
string

Non-localized attribute name. Refer to localizedProperties to get the localized name.

target

Single string for EQUALS operation; comma-separated string for an IN operation

Available options:
PRODUCT,
CATEGORY
type
enum<string>

Attribute type

Available options:
TEXT,
NUMBER,
DATETIME,
BOOLEAN,
OPTIONS,
SERIAL
updatedAt
string

Time of last update to attribute (UTC)

updatedBy
string

Email of the user who last updated the attribute

validation
object

Validation details