Documentation Index
Fetch the complete documentation index at: https://developer.fabric.inc/llms.txt
Use this file to discover all available pages before exploring further.
Prerequisites
In order to upload products, you must already have created your category taxonomy. For information on creating categories in the Product Agent UI, see Creating Categories.Step 1: Postman Environment Setup
This part of the guide walks you through setting up a Postman environment to interact with the Product Agent API.Create a new environment
- Open Postman.
- Click Environments in the sidebar.
- Click + to create a new environment. Provide a name such as Product Agent - Prod.
Add the environment variables
Add the following variables to your environment.access_token and the various defined IDs will be empty initially — they will be populated after making API calls. | Variable | Description | Example |
|---|---|---|
baseUrl | Base URL for the API | https://commerceos.aiagents.fabric.inc/api |
authUrl | Auth URL for the API | https://commerceos.aiagents.fabric.inc |
access_token | Token used for authenticated requests | eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9... |
attributeWorkflowId | ID of the attribute workflow (used for status endpoints) | a1462a91-f733-45fe-993b-5d0353f33ee3 |
artifactId | ID of an uploaded catalog artifact (returned by the artifact upload) | art_95c650ded4824dc79bb6df16427e4a10 |
workflowId | ID of an optimization workflow (returned by the workflow create call) | 9349773c-27fe-4d4f-a093-a5793dff8702 |
clientId | Client ID provided by fabric. Used to create an access token | svc_peyFD9BXPRrZymhjJtFuYr7L3Ai |
clientSecret | Client secret provided by fabric. Used to create an access token | cw_GWve_9oI_aJKd-xcE7uuZJpr-WqfnRpDPznGNVI-fOc |
domain | Brand’s domain name (must be a .com value scoped to a brand you own) | vessel.com |
Step 2: Authentication
This part of the guide walks you through authenticating with the Product Agent API and storing your access token in Postman for future requests.Create and set the access token
To authenticate, send a POST request to the token endpoint using yourclientId and clientSecret. If you do not have these credentials, contact fabric support.
Tokens expire every 60 minutes.
Example Response:
Example Response:
access_token for future requests:
- Go to the Scripts tab in your Postman request.
- Select Post-response.
-
Add the following script:
pm.environment.set("access_token", pm.response.json().access_token);
access_token environment variable is automatically updated each time a request to the endpoint is made.
Step 3 (Optional): Import Attribute Definitions
You can optionally import attribute definitions for enrichment and mapping workflows. For information on creating attributes in the Product Agent UI, see Creating Attributes. This endpoint accepts a CSV file and creates an import job you can monitor using the returnedimport_id. We will save this to our environment as attributeWorkflowId.
Expected CSV columns for each attribute definition
| Column | Required | Description |
|---|---|---|
attribute_name | Yes | Attribute display name |
attribute_key | No | Machine-readable key |
description | Yes | Attribute description |
data_type | No | Attribute data type |
scope | No | Attribute scope |
enum_values | No | Allowed values, pipe-delimited, for example S|M|L |
allow_ai_content | No | Allow AI to generate values (true or false) |
source | No | MERCHANT or GOLD_STANDARD |
guideline_reason | No | Guidance for AI enrichment |
Request
attributeWorkflowId for future requests:
- Go to the Scripts tab in your Postman request.
- Select Post-response.
-
Add the following script:
pm.environment.set("attributeWorkflowId", pm.response.json().import_id);
Example Response:
Example Response:
Check the import status
After the upload succeeds, use the savedattributeWorkflowId to check workflow status with:
Example Response:
Example Response:
- Log in to Product Agent.
- In the left nav, click Settings. The Settings menu is displayed.
- Click Taxonomy. The Categories tab is displayed by default.
- Click Attributes.
Step 4: Import Your Products
After the categories and attribute definitions have been imported, products can be uploaded. The product import flow consists of three sequential API calls:- Artifact Upload. Submit the CSV to the artifacts endpoint and store the returned
artifact_id. - Optimize Workflow. Create a workflow that processes the artifact and store the returned workflow
id. - Get Workflow Status. Poll the workflow until it reaches a review gate or a terminal status.
Expected CSV columns
The catalog file must be UTF-8 encoded, comma-delimited, and include a header row. The following table lists the supported columns.| Column | Required | Description |
|---|---|---|
title | Yes | Product display name as shown on the product detail page. |
sku | Yes | Unique product identifier within the brand catalog. |
description | Yes | Full product description from the product detail page. |
category_id | Conditional | The brand’s category identifier. Each row must provide either category_id or breadcrumb. |
breadcrumb | Conditional | Full category hierarchy, separated by >. Example: Mens > Clothing > Pants. Each row must provide either breadcrumb or category_id. |
category | No | Free-text category label. Used as a hint when neither category_id nor breadcrumb resolves to a known category. |
product_group_id | No | Identifier shared by product variants that belong to the same family (for example, multiple SKUs of the same shirt in different colors). |
price | No | Numeric price value for the product. |
currency | No | Currency code corresponding to price. |
url | No | Canonical product detail page URL. |
images | No | One or more image URLs, separated by the pipe character (|). Example: https://example.com/a.jpg|https://example.com/b.jpg. |
attribute.<name> | No | Custom attribute value. Free-form string, single value per cell. The <name> segment must match an attribute key configured for the brand (for example, attribute.color, attribute.material). |
Artifact Upload
Submit the CSV to the artifacts endpoint. The response includes anartifact_id that is stored as artifactId and referenced when creating the workflow.
artifactId for future requests:
- Go to the Scripts tab in your Postman request.
- Select Post-response.
-
Add the following script:
pm.environment.set("artifactId", pm.response.json().artifact_id);
Example Response:
Example Response:
Optimize Workflow
Create an optimization workflow that processes the uploaded artifact. Store the returned workflowid as workflowId.
workflowId for future requests:
- Go to the Scripts tab in your Postman request.
- Select Post-response.
-
Add the following script:
pm.environment.set("workflowId", pm.response.json().id);
Example Response:
Example Response:
Get Workflow Status
Poll the workflow untilstatus reports COMPLETED. A status of REVIEW_PENDING indicates that the workflow is paused at a human-in-the-loop gate; the current_hitl_gate field identifies the active gate.
Review gates are approved in the CommerceOS web application, not through the API. When polling returns
status: REVIEW_PENDING, direct the assigned reviewer to CommerceOS to evaluate and approve the gate. Once the reviewer acts in the UI, the workflow resumes automatically and subsequent polls reflect the new state.Example Response:
Example Response:
status value progresses through PENDING, then RUNNING or IN_PROGRESS, then REVIEW_PENDING when paused at a human-in-the-loop gate, and ultimately COMPLETED. FAILED and CANCELLED are terminal alternatives. For the complete status and gate vocabulary, see Get workflow status.
Once the workflow reaches COMPLETED, the products appear in Activate organized by category structure. For example, sweaters appear under Tops > Sweaters and t-shirts under Tops > T-Shirts.