Every API here is available over the APIs.io API and to AI agents over MCP.
openapi: 3.2.0
info:
title: Catalog Product API
description: 'As brands and retailers grow, they often expand their item catalogs, resulting in the need to enrich and manage more product (commonly referred to as item in fabric) data. fabric Product Catalog alleviates the burden of managing large amounts of item data by means of a central storage repository. fabric Product Catalog helps you with improved data quality, consistent customer experience, reduced time to market, easy integration with external systems, reduced management costs and risks, faster and easier updates, and easy scaling. You can create, import, enrich, validate, distribute, and manage complex item information, centrally. As a result, you deliver product experiences that drive sales through every channel. <br /> <br /> During onboarding, you are given the necessary credentials to access Product Catalog - Copilot UI, APIs, or both. As a prerequisite, you create the items to be sold, identify their unique as well as common properties, and envision their organization into categories and sub categories. A basic workflow is: <br /> 1) **Create item attributes** using POST /api-product/v1/product/attribute/bulk. <br /> 2) **Update attribute mapping** using POST /api-product/v1/product/attribute/mapping <br /> 3) **Create Primary category** using the POST /api-category/v1/category to create the original organizational structure. <br /> 4) **Assign item attributes** to Primary category using POST /api-category/v1/category/item-attribute. <br /> 5) **Create items** using POST /api-product/v1/product/bulk/insert. <br /> 6) **Create Alternate category**, for distribution management and fulfilling various merchandising objectives.'
version: 2.0.0
contact:
email: support@fabric.inc
license:
name: fabric API License
url: https://fabric.inc/api-license
servers:
- url: https://live.copilot.fabric.inc
description: Production
tags:
- name: Product
description: '**Product**, a subset of Product Catalog endpoints, aims at making item management more efficient. They create, update, and get items, which may be individual items or collection of items (called bundles). Each item has a title, item ID, description, category, and assigned attributes. Multiple options of a given item become variants of that item. For example, a t-shirt with three sizes may have small, medium, and large variants. Each variant has its own item ID, attributes, and other data points. Each variant is nested under its parent item, allowing the different options to appear on the same product page. You can also create or update one or more item attributes and attribute groups.'
paths:
/api-product/v1/product/bulk/insert:
post:
tags:
- Product
summary: Create Items and Bundles
description: 'Creates multiple items or bundles along with their attributes. In addition, this endpoint supports data validation to ensure accuracy and consistency. <br /> **Note**: <br /> 1) As a prerequisite category and attributes must be created beforehand. <br /> 2) To add an item variant, parentSku must be additionally specified. <br /> 3) An item is assigned to only one category but it can be fetched from Alternate categories. <br /> 4) Up to 50 items or bundles can be added.'
operationId: createProducts
security:
- authorization: []
parameters:
- $ref: '#/components/parameters/xSiteContent'
requestBody:
content:
application/json:
schema:
$ref: '#/components/schemas/ProductCreate'
responses:
'200':
description: OK
content:
application/json:
schema:
$ref: '#/components/schemas/ProductResponse'
'400':
description: Client error
content:
application/json:
schema:
$ref: '#/components/schemas/ClientError'
'422':
description: Failing items
content:
application/json:
schema:
$ref: '#/components/schemas/ProductModifyError'
'500':
description: Internal server error
content:
application/json:
schema:
$ref: '#/components/schemas/ServerError'
/api-product/v1/product/bulk/update:
post:
tags:
- Product
summary: Update Items and Bundles
description: 'With this endpoint, you can update multiple items or bundles, along with their attributes. <br /> **Note**: <br /> 1) You can update up to 50 items or bundles. <br /> 2) By specifying the attribute `value` as NULL, a reserved keyword, you can remove the existing attribute value.'
operationId: updateProducts
security:
- authorization: []
parameters:
- $ref: '#/components/parameters/xSiteContent'
requestBody:
content:
application/json:
schema:
$ref: '#/components/schemas/ProductUpdate'
responses:
'200':
description: OK
content:
application/json:
schema:
$ref: '#/components/schemas/ProductResponse'
'400':
description: Client error
content:
application/json:
schema:
$ref: '#/components/schemas/ClientError'
'422':
description: Failing items
content:
application/json:
schema:
$ref: '#/components/schemas/ProductModifyError'
'500':
description: Internal server error
content:
application/json:
schema:
$ref: '#/components/schemas/ServerError'
/api-product/v1/product/bulk/upsert:
post:
tags:
- Product
summary: Upsert Items and Bundles
description: 'With this endpoint, you can create or update items or bundles along with their attributes. <br /> **Note**: <br /> 1) If the SKU already exists, then the given item or bundle is updated. Otherwise, a new item or bundle is created with that SKU. <br /> 2) You can add or update up to 50 items or bundles. <br /> 3) By specifying the attribute `value` as NULL, a reserved keyword, you can remove the existing attribute value.'
operationId: upsertProducts
security:
- authorization: []
parameters:
- $ref: '#/components/parameters/xSiteContent'
requestBody:
content:
application/json:
schema:
$ref: '#/components/schemas/ProductCreate'
responses:
'200':
description: OK
content:
application/json:
schema:
$ref: '#/components/schemas/ProductResponse'
'400':
description: Client error
content:
application/json:
schema:
$ref: '#/components/schemas/ClientError'
'422':
description: Failing items
content:
application/json:
schema:
$ref: '#/components/schemas/ProductModifyError'
'500':
description: Internal server error
content:
application/json:
schema:
$ref: '#/components/schemas/ServerError'
/api-product/v1/product/bundle/update:
post:
tags:
- Product
summary: Update Items in Bundle
description: Updates bundle by adding or removing items and adjusting quantities.
operationId: updateBundles
security:
- authorization: []
parameters:
- $ref: '#/components/parameters/xSiteContent'
requestBody:
content:
application/json:
schema:
$ref: '#/components/schemas/BundleUpdateRequest'
responses:
'200':
description: OK
content:
application/json:
schema:
$ref: '#/components/schemas/BundleUpdateResponse'
'400':
description: Client error
content:
application/json:
schema:
$ref: '#/components/schemas/ClientError'
'500':
description: Internal server error
content:
application/json:
schema:
$ref: '#/components/schemas/ServerError'
/api-product/v1/product:
get:
tags:
- Product
summary: Get Items and Children Items
description: 'Items can be individual items or a bundle of items. This endpoints allows you to retrieve items - individual items and bundles, along with their attributes, children items and their details. <br /> **Note**: <br /> 1) Optional filter parameters can be passed in as query to narrow down the search results. <br /> 2) This API will only return the count and details of Parent SKU and not its variants'
operationId: getProducts
security:
- authorization: []
parameters:
- name: x-site-context
in: header
description: 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.
required: true
schema:
type: string
example: '{"date": "2023-01-01T00:00:00.000Z", "channel": 12, "account": "1234abcd5678efgh9ijklmno","stage":"production"}'
- in: query
name: skus
description: 'Stock Keeping Units (SKUs). <br /> **Note**: Either `skus` or `itemIds` can be used to get specific items. If they are omitted, all items are returned in a paginated response. Using the query parameters `page` and `size`, you can narrow down the search results.'
schema:
type: array
items:
type: string
example:
- BUNDLE-01
- BUNDLE-02
explode: false
- in: query
name: itemIds
description: 'Item IDs. Applicable only when `skus` are omitted. <br /> **Note**: Either `skus` or `itemIds` can be used to get specific items. If they are omitted, all items are returned in a paginated response. Using the query parameters `page` and `size`, you can narrow down the search results.'
schema:
type: array
items:
type: number
example:
- 4
- 5
explode: false
- in: query
name: page
description: Page number to be retrieved. Applicable only in a paginated response and always paired with `size`.
schema:
type: number
example: 1
- in: query
name: size
description: Number of records per page. Applicable only in a paginated response and always paired with `page`.
schema:
type: number
example: 10
- in: query
name: status
description: 'Item status. <br /> **Note**: <br /> 1) Returns a paginated response. <br /> 2) When used as the only criteria, must be paired with `size` and `page` to narrow down the search results.'
schema:
type: string
enum:
- ACTIVE
- INACTIVE
example: ACTIVE
- in: query
name: createdAfter
description: 'Lists items created after a specific date. Valid date formats are ''YYYY/MM/DD'', ''YYYY-MM-DDTHH:mm:ss.SSSZ''. <br /> **Note**: <br /> 1) Applicable only when `skus` and `itemIds` are omitted. <br /> 2) Returns paginated response. <br /> 3) Must be paired with `size` and `page` to narrow down the search results.'
schema:
type: string
example: '2021-05-28T16:36:50.055Z'
- in: query
name: createdBefore
description: 'Lists items created before a specific date. Valid date formats are ''YYYY/MM/DD'', ''YYYY-MM-DDTHH:mm:ss.SSSZ''. <br /> **Note**: <br /> 1) Applicable only when `skus` and `itemIds` are omitted. <br /> 2) Returns paginated response. <br /> 3) Must be paired with `size` and `page` to narrow down the search results.'
schema:
type: string
example: '2021-05-28T16:36:50.055Z'
- in: query
name: modifiedAfter
description: 'Lists items modified after a specific date. Valid date formats are ''YYYY/MM/DD'', ''YYYY-MM-DDTHH:mm:ss.SSSZ''. <br /> **Note**: <br /> 1) Applicable only when `skus` or `itemIds` are omitted. <br /> 2) Returns paginated response. <br /> 3) Must be paired with `size` and `page` to narrow down the search results.'
schema:
type: string
example: '2021-05-28T16:36:50.055Z'
- in: query
name: modifiedBefore
description: 'Gets items modified before a specific date. Valid date formats are ''YYYY/MM/DD'', ''YYYY-MM-DDTHH:mm:ss.SSSZ''. <br /> **Note**: <br /> 1) Applicable only when `skus` and `itemIds` are omitted. <br /> 2) Returns paginated response. <br /> 3) Must be paired with `size` and `page` to narrow down the search results.'
schema:
type: string
example: '2021-05-28T16:36:50.055Z'
- in: query
name: onlyIncludeAttributes
description: Attributes are included based on their exact, case-sensitive names. For example, if you specify the values as xyZ and Abc, the response will include these attributes in both parent and child objects.
schema:
type: array
items:
type: string
example:
- Image
- Title
- in: query
name: onlyExcludeAttributes
description: 'Attributes are excluded based on their exact, case-sensitive names. For example, if you specify the values as xyZ and Abc, the response will exclude these attributes from both parent and child objects. <br /> **Note**: When both `onlyIncludeAttributes` and `onlyExcludeAttributes` are used, the `onlyIncludeAttributes` takes precedence. As a result, attributes are first filtered based on `onlyIncludeAttributes`, and then `onlyExcludeAttributes` is applied to further refine the selection.'
schema:
type: array
items:
type: string
example:
- Image
- Title
responses:
'200':
description: OK
content:
application/json:
schema:
oneOf:
- $ref: '#/components/schemas/ItemProductsResponse'
- $ref: '#/components/schemas/BundleProductsResponse'
- $ref: '#/components/schemas/NoProductsResponse'
'400':
description: Client error
content:
application/json:
schema:
$ref: '#/components/schemas/ClientError'
'500':
description: Internal server error
content:
application/json:
schema:
$ref: '#/components/schemas/ServerError'
/api-product/v2/product:
get:
tags:
- Product
summary: Get Items and Limited Children Items
description: 'Gets items (single item or bundles) by `skus` or parent `skus`. When a parent SKU is sent as query parameter, you''ll get children items of those SKUs. When `parentSKU` is not specified, children items are not retrieved. Optionally, `page` and `size` can be used as query parameters. **Note**: <br /> 1) `status` and `date` query parameters works only with pagination when `parentSku` is omitted. Separate responses are shown for bundle and product.<br /> 2) when `parentSku` is passed as request parameter, it will only return the paginated response of children of `parentSKU`.'
operationId: getProductsV2
security:
- authorization: []
parameters:
- $ref: '#/components/parameters/xSiteContent'
- in: query
name: skus
description: 'Stock Keeping Units (SKUs). <br /> **Note**: Either `skus` or `itemIds` can be used to get specific items. If they are omitted, all items are returned in a paginated response. Using the query parameters `page` and `size`, you can narrow down the search results.'
schema:
type: string
example: BUNDLE-01
- in: query
name: page
description: Page number to be retrieved. Applicable only in a paginated response and always paired with `size`.
schema:
type: number
example: 1
- in: query
name: size
description: Number of records per page. Applicable only in a paginated response and always paired with `page`.
schema:
type: number
example: 10
- in: query
name: status
description: 'Item status. <br /> **Note**: <br /> 1) Returns a paginated response. <br /> 2) When used as the only criteria, must be paired with `size` and `page` to narrow down the search results.'
schema:
type: string
enum:
- ACTIVE
- INACTIVE
example: ACTIVE
- in: query
name: type
description: 'Item type. **Note**: Set page and size to use this filter.'
schema:
type: string
enum:
- ITEM
- BUNDLE
- in: query
name: createdAfter
description: 'Items created after a specific date. Valid date formats are ''YYYY/MM/DD'', ''YYYY-MM-DDTHH:mm:ss.SSSZ''. <br /> **Note**: <br /> 1) Applicable only when `skus` and `itemIds` are omitted. <br /> 2) Returns paginated response. <br /> 3) Must be paired with `size` and `page` to narrow down the search results.'
schema:
type: string
example: '2021-05-28T16:36:50.055Z'
- in: query
name: createdBefore
description: 'Items created before a specific date. Valid date formats are ''YYYY/MM/DD'', ''YYYY-MM-DDTHH:mm:ss.SSSZ''. <br /> **Note**: <br /> 1) Applicable only when `skus` and `itemIds` are omitted. <br /> 2) Returns paginated response. <br /> 3) Must be paired with `size` and `page` narrow down the search results.'
schema:
type: string
example: '2021-05-28T16:36:50.055Z'
- in: query
name: modifiedAfter
description: 'Items modified after a specific date. Valid date formats are ''YYYY/MM/DD'', ''YYYY-MM-DDTHH:mm:ss.SSSZ''. <br /> **Note**: <br /> 1) Applicable only when `skus` or `itemIds` are omitted. <br /> 2) Returns paginated response. <br /> 3) Must be paired with `size` and `page` to narrow down the search results.'
schema:
type: string
example: '2021-05-28T16:36:50.055Z'
- in: query
name: modifiedBefore
description: 'Items modified before a specific date. Valid date formats are ''YYYY/MM/DD'', ''YYYY-MM-DDTHH:mm:ss.SSSZ''. <br /> **Note**: <br /> 1) Applicable only when `skus` and `itemIds` are omitted. <br /> 2) Returns paginated response. <br /> 3) Must be paired with `size` and `page` to narrow down the search results.'
schema:
type: string
example: '2021-05-28T16:36:50.055Z'
- in: query
name: parentSku
description: Parent SKU to get its children items. <br /> **Note** <br /> 1) To get a p paginates response, optionally, `size` and `page` can be used as query parameters. When they are omitted, this endpoint returns all children. <br /> 2) Only `page` and `size` are supported with this query parameter, to narrow down the search results.
schema:
type: string
example: parent123
responses:
'200':
description: OK
content:
application/json:
schema:
oneOf:
- $ref: '#/components/schemas/ItemProductsV2Response'
- $ref: '#/components/schemas/BundleProductsResponse'
- $ref: '#/components/schemas/NoProductsResponse'
'400':
description: Client error
content:
application/json:
schema:
$ref: '#/components/schemas/ClientError'
'500':
description: Internal server error
content:
application/json:
schema:
$ref: '#/components/schemas/ServerError'
/api-product/v1/product/search:
get:
tags:
- Product
summary: Find Items
description: Finds items - both individual items and bundles. You will get a paginagted response, which you can narrow down using filter parameters, including `page` and `size`.
operationId: productSearch
security:
- authorization: []
parameters:
- $ref: '#/components/parameters/xSiteContent'
- in: query
name: keyword
description: Keywords related to SKU or title
schema:
type: string
example: MOBO-1024
- in: query
name: skus
description: 'Searches for items based on SKU. <br /> **Note**: If omitted, all items are retrieved. <br /> Applicable only when `keyword` is omitted.'
schema:
type: array
items:
type: string
example:
- MOBO-1024
- MOBO-1025
explode: false
- in: query
name: itemIds
description: 'Item IDs. <br /> **Note**: If omitted, all items are retrieved <br /> Applicable only when `keyword` and `skus` are omitted.'
schema:
type: array
items:
type: string
example:
- 4
- 5
explode: false
- in: query
name: page
description: Page number to be retrieved.
schema:
type: number
example: 10
- in: query
name: size
description: 'Number of records per page. <br />**Note**: 1) Always paired with `page`. <br />2) Applicable only in a paginated response.'
schema:
type: integer
example: 10
- in: query
name: type
description: Item type
schema:
type: string
enum:
- ITEM
- BUNDLE
- ALL
example: ITEM
- in: query
name: allAttributes
description: 'true: Gets all attributes. false: Gets only the mapped attributes. <br /> **Note**: Always clubbed with `page` and `size`. When they are not specified, you will get up to 10 records.'
schema:
type: boolean
example: true
- in: query
name: excludeChildren
description: 'true: Excludes children items <br /> false: Includes children items'
schema:
type: boolean
example: false
- in: query
name: onlyChildren
description: 'true: Excludes parent items <br /> false: Includes parent items'
schema:
type: boolean
example: true
responses:
'200':
description: OK
content:
application/json:
schema:
oneOf:
- $ref: '#/components/schemas/ItemProductSearchResponse'
- $ref: '#/components/schemas/BundleProductSearchResponse'
- $ref: '#/components/schemas/NoProductsResponse'
'400':
description: OK
content:
application/json:
schema:
$ref: '#/components/schemas/ClientError'
'500':
description: Internal server error
content:
application/json:
schema:
$ref: '#/components/schemas/ServerError'
/api-product/v1/product/attribute:
get:
tags:
- Product
summary: Get Item Attributes
description: 'Item attributes define characteristics of an item. For example, item name, its identifiers, and description are the common attributes of any item. Attributes are key-value pairs (color: red) that hold information for each property of an item. <br /> This endpoint gets all attributes of an item, by SKU or itemId. <br /> **Note**: The *Get item* (GET /v1/product) gets item details and their attribute. So, this endpoint is recommended when you have the item SKU or item ID, and only require its attributes.'
operationId: getProductAttribute
security:
- authorization: []
parameters:
- $ref: '#/components/parameters/xSiteContent'
- in: query
name: sku
description: 'Stock Keeping Unit (SKU) of item. <br /> **Note**: If omitted `itemId` becomes mandatory.'
schema:
type: string
example: MOBO-1024
- in: query
name: itemId
description: 'Item ID. <br /> **Note**: If omitted `sku` becomes mandatory.'
schema:
type: number
example: 3
responses:
'200':
description: OK
content:
application/json:
schema:
$ref: '#/components/schemas/ProductAttributePage'
'400':
description: Client error
content:
application/json:
schema:
$ref: '#/components/schemas/ClientError'
'500':
description: Internal server error
content:
application/json:
schema:
$ref: '#/components/schemas/ServerError'
components:
schemas:
ServerError:
type: object
properties:
code:
description: Error code
type: string
example: 500
message:
description: Human-readable error description
type: string
example: An internal error occurred. If the issue persists please contact support@fabric.inc.
ItemProductsV2Response:
type: object
properties:
totalSize:
type: number
example: 100
description: Total number of records (items)
pageSize:
type: number
example: 10
description: Number of records (items) in a page
pages:
type: number
example: 10
description: Number of pages for the given `pageSize`
products:
type: array
items:
$ref: '#/components/schemas/ProductV2'
ProductChild:
type: object
properties:
sku:
type: string
description: Stock Keeping Unit (SKU) of item
attributes:
type: array
items:
$ref: '#/components/schemas/ProductAttribute'
GetBundleItems:
type: object
properties:
sku:
type: string
example: MOBO-1023
description: Stock Keeping Unit (SKU) of item
itemId:
type: number
example: 1
description: Item ID
attributes:
type: array
items:
$ref: '#/components/schemas/ProductAttribute'
quantity:
description: Item quantity
type: number
example: 6
children:
type: array
items:
$ref: '#/components/schemas/BundleChild'
ProductAttributePage:
type: object
description: Attribute page object
properties:
totalSize:
type: number
description: Total number of records (item attributes)
example: 100
pageSize:
type: number
description: Number of records (item attributes) in a page
example: 10
pages:
type: number
description: Number of pages for the given `pageSize`
example: 10
attributes:
type: array
description: Attributes details
items:
$ref: '#/components/schemas/ProductAttribute'
ProductCreate:
type: array
maxItems: 50
items:
properties:
sku:
description: Stock Keeping Unit (SKU) of item
type: string
example: sku_abc
type:
description: Item type
type: string
enum:
- ITEM
- BUNDLE
example: ITEM
nodeName:
description: Category name (along with parent category names) for which item is being created.
type: string
example: PRIMARY->electronics
parentSku:
description: Stock Keeping Unit (SKU) of the parent item. <br />Set the value as `detach` or `null` to disassociate the item from parent item.
type:
- string
- 'null'
example: sku123
attributeValues:
description: Attribute details
type: array
items:
anyOf:
- $ref: '#/components/schemas/AttributeValue'
- $ref: '#/components/schemas/AttributeValueFrenchLocale'
inheritedAttributes:
description: Category item attributes to be inherited from parent item to children items
$ref: '#/components/schemas/InheritItemAttributesInsert'
bundleItems:
description: Items to be added to a bundle. Includes SKU and item quantity.
type: array
items:
$ref: '#/components/schemas/BundleItems'
required:
- sku
- type
- nodeName
ItemProductSearchResponse:
type: object
properties:
totalSize:
type: number
example: 100
description: Total number of records
pageSize:
type: number
example: 10
description: Number of records per page
pages:
type: number
example: 10
description: Number of pages for the given pageSize
products:
type: array
items:
$ref: '#/components/schemas/ProductSearch'
BundleUpdateResponse:
type: array
items:
type: object
properties:
id:
type: string
example: 625367673ab7402268d8cccf
description: A 24-character system-generated document ID (internal only)
itemId:
type: string
example: 624d94fb27c894222534b260
description: A 24-character system-generated item ID
bundleId:
type: string
example: 624d939227c894222534b247
description: A 24-character system-generated bundle ID
quantity:
type: number
example: 1
description: Bundle quantity
createdOn:
type: string
example: '2022-04-08T23:25:27.753Z'
description: Time of bundle creation (UTC format)
modifiedOn:
type: string
example: '2022-04-08T23:25:27.753Z'
description: Time when bundle was last updated (UTC format)
ItemProductsResponse:
type: object
properties:
totalSize:
type: number
example: 100
description: Total number of records (items)
pageSize:
type: number
example: 10
description: Number of records (items) in a page
pages:
type: number
example: 10
description: Number of pages for the given `pageSize`
products:
type: array
items:
$ref: '#/components/schemas/Product'
InheritItemAttributesInsert:
type: array
items:
type: object
properties:
name:
type: string
description: Name of the attribute that can be inherited
example: color
action:
description: Action to set the inherited attribute
example: SET
type: string
enum:
- SET
required:
- name
- action
minItems: 1
BundleUpdateRequest:
type: object
properties:
action:
type: string
enum:
- UPDATE
example: UPDATE
description: Action type
bundles:
type: array
items:
type: object
required:
- action
- bundleSku
- itemSku
properties:
action:
type: string
enum:
- SET
- UNSET
example: SET
description: Action type
bundleSku:
type: string
example: iPhoneBundle
description: Stock Keeping Unit (SKU) of bundle
# --- truncated at 32 KB (47 KB total) ---
# Full source: https://raw.githubusercontent.com/api-evangelist/fabric-com/refs/heads/main/openapi/fabric-com-product-api-openapi.yml