curl --request POST \
--url https://live.copilot.fabric.inc/api-product/v1/product/attribute/mapping \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--header 'x-site-context: <x-site-context>' \
--data '
{
"mappings": [
{
"attributeId": "ATTR1234",
"mapping": "SKU",
"name": "<string>",
"description": "Item SKU",
"validation": {
"required": true,
"inheritable": true,
"inverse": false,
"unique": true,
"exact": "<string>",
"attributeTypes": [
"TEXT"
],
"contains": "<string>",
"range": {
"min": "<string>",
"max": "<string>"
},
"formula": "value < 10 || value > 20",
"oneOf": [
"<string>"
]
},
"required": true
}
]
}
'{
"attributeId": "62e2ae29c3004a000950ad5f",
"attribute": {
"id": "<string>",
"statuses": [
{
"code": "<string>",
"type": "ATTRIBUTE",
"source": "PIM",
"name": "<string>",
"description": "<string>",
"createdOn": "2023-11-07T05:31:56Z",
"createdBy": "broma0",
"modifiedOn": "2023-11-07T05:31:56Z",
"modifiedBy": "broma0"
}
],
"files": [
{
"type": "IMPORT",
"name": "<string>",
"statuses": [
{
"code": "<string>",
"type": "ATTRIBUTE",
"source": "PIM",
"name": "<string>",
"description": "<string>",
"createdOn": "2023-11-07T05:31:56Z",
"createdBy": "broma0",
"modifiedOn": "2023-11-07T05:31:56Z",
"modifiedBy": "broma0"
}
],
"progress": 100,
"createdOn": "2023-11-07T05:31:56Z",
"createdBy": "broma0",
"modifiedOn": "2023-11-07T05:31:56Z",
"modifiedBy": "broma0",
"secondsTakenToImport": 123,
"secondsTakenToProcess": 123
}
],
"name": "<string>",
"description": "<string>",
"locales": [
{
"locale": "fr-ca",
"name": "Un Nom Français"
}
],
"localizable": true,
"mapping": "<string>",
"type": "TEXT",
"serialStart": 123,
"target": "NODE",
"format": "YYYY-MM-DD",
"formula": "value < 10 || value > 20",
"validation": {
"required": true,
"inheritable": true,
"inverse": false,
"unique": true,
"exact": "<string>",
"attributeTypes": [
"TEXT"
],
"contains": "<string>",
"range": {
"min": "<string>",
"max": "<string>"
},
"formula": "value < 10 || value > 20",
"oneOf": [
"<string>"
]
},
"createdOn": "2023-11-07T05:31:56Z",
"createdBy": "broma0",
"modifiedOn": "2023-11-07T05:31:56Z",
"modifiedBy": "broma0"
},
"mapping": "SKU",
"target": "ITEM",
"name": "Item SKU",
"description": "Item SKU",
"required": true,
"validation": {
"required": true,
"inheritable": true,
"inverse": false,
"unique": true,
"exact": "<string>",
"attributeTypes": [
"TEXT"
],
"contains": "<string>",
"range": {
"min": "<string>",
"max": "<string>"
},
"formula": "value < 10 || value > 20",
"oneOf": [
"<string>"
]
},
"createdOn": "2021-09-23T17:47:04.231Z",
"createdBy": "broma0",
"modifiedOn": "2023-11-07T05:31:56Z",
"modifiedBy": "broma0"
}Set your attribute mapping to begin configuring your catalog. You can update the mappings only if there are no SKUs present in the catalog.
curl --request POST \
--url https://live.copilot.fabric.inc/api-product/v1/product/attribute/mapping \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--header 'x-site-context: <x-site-context>' \
--data '
{
"mappings": [
{
"attributeId": "ATTR1234",
"mapping": "SKU",
"name": "<string>",
"description": "Item SKU",
"validation": {
"required": true,
"inheritable": true,
"inverse": false,
"unique": true,
"exact": "<string>",
"attributeTypes": [
"TEXT"
],
"contains": "<string>",
"range": {
"min": "<string>",
"max": "<string>"
},
"formula": "value < 10 || value > 20",
"oneOf": [
"<string>"
]
},
"required": true
}
]
}
'{
"attributeId": "62e2ae29c3004a000950ad5f",
"attribute": {
"id": "<string>",
"statuses": [
{
"code": "<string>",
"type": "ATTRIBUTE",
"source": "PIM",
"name": "<string>",
"description": "<string>",
"createdOn": "2023-11-07T05:31:56Z",
"createdBy": "broma0",
"modifiedOn": "2023-11-07T05:31:56Z",
"modifiedBy": "broma0"
}
],
"files": [
{
"type": "IMPORT",
"name": "<string>",
"statuses": [
{
"code": "<string>",
"type": "ATTRIBUTE",
"source": "PIM",
"name": "<string>",
"description": "<string>",
"createdOn": "2023-11-07T05:31:56Z",
"createdBy": "broma0",
"modifiedOn": "2023-11-07T05:31:56Z",
"modifiedBy": "broma0"
}
],
"progress": 100,
"createdOn": "2023-11-07T05:31:56Z",
"createdBy": "broma0",
"modifiedOn": "2023-11-07T05:31:56Z",
"modifiedBy": "broma0",
"secondsTakenToImport": 123,
"secondsTakenToProcess": 123
}
],
"name": "<string>",
"description": "<string>",
"locales": [
{
"locale": "fr-ca",
"name": "Un Nom Français"
}
],
"localizable": true,
"mapping": "<string>",
"type": "TEXT",
"serialStart": 123,
"target": "NODE",
"format": "YYYY-MM-DD",
"formula": "value < 10 || value > 20",
"validation": {
"required": true,
"inheritable": true,
"inverse": false,
"unique": true,
"exact": "<string>",
"attributeTypes": [
"TEXT"
],
"contains": "<string>",
"range": {
"min": "<string>",
"max": "<string>"
},
"formula": "value < 10 || value > 20",
"oneOf": [
"<string>"
]
},
"createdOn": "2023-11-07T05:31:56Z",
"createdBy": "broma0",
"modifiedOn": "2023-11-07T05:31:56Z",
"modifiedBy": "broma0"
},
"mapping": "SKU",
"target": "ITEM",
"name": "Item SKU",
"description": "Item SKU",
"required": true,
"validation": {
"required": true,
"inheritable": true,
"inverse": false,
"unique": true,
"exact": "<string>",
"attributeTypes": [
"TEXT"
],
"contains": "<string>",
"range": {
"min": "<string>",
"max": "<string>"
},
"formula": "value < 10 || value > 20",
"oneOf": [
"<string>"
]
},
"createdOn": "2021-09-23T17:47:04.231Z",
"createdBy": "broma0",
"modifiedOn": "2023-11-07T05:31:56Z",
"modifiedBy": "broma0"
}S2S access token (JWT) from fabric Identity service (during Login)
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.
"{\"date\": \"2023-01-01T00:00:00.000Z\", \"channel\": 12, \"account\": \"1234abcd5678efgh9ijklmno\",\"stage\":\"production\"}"
Show child attributes
Attribute ID
"ATTR1234"
Attribute mapping
"SKU"
Name of the attribute mapping
Description of the attribute mapping
"Item SKU"
Show child attributes
Indicates mandatory attribute
true: Parent attributes are inherited to children items
false: Parent attributes are not inherited to children items.
true
true: Inverts existing validation (example - requires that the validation does not pass)
false: Follows existing validation
false
true: Value is unique across all items or categories
false: Value is not unique
Specified value must exactly match this value
Attribute types
TEXT, BOOLEAN, SERIAL, DECIMAL, INTEGER, ASSET, DATETIME Specified value must contain this string
JavaScript expression to determine if the value matches
"value < 10 || value > 20"
Match the value if it is one of these.
true: Mapping is mandatory
false: Mapping is optional
OK
A 24-character system-generated attribute ID
"62e2ae29c3004a000950ad5f"
Represents the mapped attributes. Only populated when include.attribute is true.
Note: Not applicable for an attribute mapping modify request
Show child attributes
Attribute ID
For 'attribute modify request', the PIM statuses (if applicable). For 'attribute search request', the statuses defined by the include.status request parameter.
Show child attributes
Status code
Status type
ATTRIBUTE, ATTRIBUTE_VALUE, ITEM, BUNDLE, NODE, HIERARCHY Status source
PIM, WAM Status name
Status description
Time of file creation
User ID that created the file
"broma0"
Time when file was last modified
User ID that last modified the file
"broma0"
Array of file's associated with an item
Show child attributes
Status type
IMPORT, EXPORT File name
Current status of the file
Show child attributes
Status code
Status type
ATTRIBUTE, ATTRIBUTE_VALUE, ITEM, BUNDLE, NODE, HIERARCHY Status source
PIM, WAM Status name
Status description
Time of file creation
User ID that created the file
"broma0"
Time when file was last modified
User ID that last modified the file
"broma0"
Import progress in percentage
100
Time of file creation
User ID that created the file
"broma0"
Time when file was last modified
User ID that last modified the file
"broma0"
Time taken to import the file (doesn't include the whole time for the full bulk import process).
Time taken to process the file after the file was read
Attribute name
Attribute description
true: attribute can be localized
false: attribute cannot be localized
Attribute mapping.
Note: Most attributes will not have a mapping, resulting in null value.
Data type of the attribute
TEXT, BOOLEAN, SERIAL, DECIMAL, INTEGER, DATETIME Conditionally required to indicate the starting value of SERIAL attribute type. When enabled, the subsequent attribute values increment by 1.
Indicates whether the attribute is for categories or items.
NODE, ITEM Attribute format. Currently used only for the attribute type DATETIME.
"YYYY-MM-DD"
JavaScript expression to dynamically compute the attribute's value.
Note: The type returned must match the attribute's type.
"value < 10 || value > 20"
Show child attributes
Indicates mandatory attribute
true: Parent attributes are inherited to children items
false: Parent attributes are not inherited to children items.
true
true: Inverts existing validation (example - requires that the validation does not pass)
false: Follows existing validation
false
true: Value is unique across all items or categories
false: Value is not unique
Specified value must exactly match this value
Attribute types
TEXT, BOOLEAN, SERIAL, DECIMAL, INTEGER, ASSET, DATETIME Specified value must contain this string
JavaScript expression to determine if the value matches
"value < 10 || value > 20"
Match the value if it is one of these.
Time of attribute creation
ID that created the attribute
"broma0"
Time when the attribute was last modified
User ID that last modified the attribute
"broma0"
Attribute mapping
"SKU"
Returns attribute mapping for the specified target
"ITEM"
Name of attribute mapping
"Item SKU"
Description for attribute mapping
"Item SKU"
true: Mapping is mandatory;
false: mapping is optional
Show child attributes
Indicates mandatory attribute
true: Parent attributes are inherited to children items
false: Parent attributes are not inherited to children items.
true
true: Inverts existing validation (example - requires that the validation does not pass)
false: Follows existing validation
false
true: Value is unique across all items or categories
false: Value is not unique
Specified value must exactly match this value
Attribute types
TEXT, BOOLEAN, SERIAL, DECIMAL, INTEGER, ASSET, DATETIME Specified value must contain this string
JavaScript expression to determine if the value matches
"value < 10 || value > 20"
Match the value if it is one of these.
Time of attribute creation (UTC format)
"2021-09-23T17:47:04.231Z"
User ID that created item attribute
"broma0"
Time of when the attribute was last modified
User ID that last modified item attribute
"broma0"
Was this page helpful?