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
headerrequired

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

Headers

x-fabric-tenant-id
string

The x-fabric-tenant-id header is a string that contains the ID of the tenant from whom you wish to pull information from.

x-fabric-request-id
string

Unique request ID

Body

application/json
name
string

Attribute name that appears when it is not localized. Refer to localizedProperties to get the localized name.

description
string

Attribute description

type
enum<string>
required

Attribute type

Available options:
TEXT,
NUMBER,
DATETIME,
BOOLEAN,
OPTIONS,
SERIAL
target
required

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

Available options:
PRODUCT,
CATEGORY
localizedProperties
object

Names of localized attributes

isLocalizable
boolean

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

validation
object

Validation details

Response

200 - application/json
id
string

Attribute ID

name
string

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

description
string

Brief description of attribute

type
enum<string>

Attribute type

Available options:
TEXT,
NUMBER,
DATETIME,
BOOLEAN,
OPTIONS,
SERIAL
target

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

Available options:
PRODUCT,
CATEGORY
localizedProperties
object

Names of localized attributes

isLocalizable
boolean

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

validation
object

Validation details

updatedBy
string

Email of the user who last updated the attribute

createdAt
string

Time of attribute creation (UTC)

updatedAt
string

Time of last update to attribute (UTC)