Skip to main content
POST
/
collections
/
search
Find Collections
curl --request POST \
  --url https://api.fabric.inc/v3/collections/search \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '
{
  "match": {
    "id": {
      "op": "IN",
      "value": [
        "blue"
      ]
    },
    "name": {
      "op": "IN",
      "value": [
        "blue"
      ],
      "locale": [
        "en_US"
      ]
    },
    "isLocalizable": {
      "op": "EQUALS",
      "value": true
    },
    "isRoot": {
      "op": "EQUALS",
      "value": true
    },
    "isLeaf": {
      "op": "EQUALS",
      "value": true
    },
    "attribute": [
      {
        "id": "60184766610c0e32a86d8758",
        "value": [
          {
            "op": "IN",
            "value": [
              "blue"
            ],
            "locale": "en_US"
          }
        ]
      }
    ],
    "categoryIdsIncluded": {
      "op": "IN",
      "value": [
        "blue"
      ]
    },
    "categoryIdsExcluded": {
      "op": "IN",
      "value": [
        "blue"
      ]
    },
    "productAttributeIdsFilter": {
      "op": "IN",
      "value": [
        "blue"
      ]
    },
    "updatedBy": {
      "op": "IN",
      "value": [
        "blue"
      ]
    },
    "createdAt": {
      "op": "RANGE",
      "fromValue": "2022-04-20T10:24:36.162Z",
      "toValue": "2023-04-20T10:24:36.162Z"
    },
    "updatedAt": {
      "op": "RANGE",
      "fromValue": "2022-04-20T10:24:36.162Z",
      "toValue": "2023-04-20T10:24:36.162Z"
    }
  },
  "sort": "+createdAt,-updatedAt",
  "offset": 2,
  "limit": 10
}
'
{
  "offset": 5,
  "limit": 10,
  "count": 100,
  "data": [
    {
      "id": "55184766610c0e32a86d8759",
      "name": "Color",
      "localizedProperties": {
        "en-US": {
          "name": "Color"
        },
        "en-IN": {
          "name": "Colour"
        }
      },
      "isLocalizable": true,
      "isRoot": true,
      "isActive": false,
      "attributes": [
        {
          "id": "64184766610c0e32a86d8758",
          "name": "color",
          "localizedProperties": {
            "en-US": {
              "name": "Color"
            },
            "en-IN": {
              "name": "Colour"
            }
          },
          "isLocalizable": true,
          "isInherited": true,
          "type": "TEXT",
          "validation": {
            "dateFormat": "MM-DD-YYYY"
          },
          "value": "blue"
        }
      ],
      "categoriesIncluded": [
        {
          "id": "64184766610c0e32a86d8758",
          "name": "Chairs",
          "localizedProperties": {
            "en-US": {
              "name": "Color"
            },
            "en-IN": {
              "name": "Colour"
            }
          },
          "isLocalizable": true
        }
      ],
      "categoriesExcluded": [
        {
          "id": "64184766610c0e32a86d8758",
          "name": "Chairs",
          "localizedProperties": {
            "en-US": {
              "name": "Color"
            },
            "en-IN": {
              "name": "Colour"
            }
          },
          "isLocalizable": true
        }
      ],
      "productAttributeFilters": [
        {
          "attributeId": "53184766610c0e32a86d875",
          "name": "Mobile name",
          "localizedProperties": {
            "en-US": {
              "name": "Color"
            },
            "en-IN": {
              "name": "Colour"
            }
          },
          "isLocalizable": true,
          "condition": "EQUALS",
          "value": 2
        }
      ],
      "children": [
        {
          "id": "78184766610c0e32a86d8757",
          "name": "Chairs",
          "localizedProperties": {
            "en-US": {
              "name": "Color"
            },
            "en-IN": {
              "name": "Colour"
            }
          },
          "isLocalizable": true,
          "isLeaf": false
        }
      ],
      "updatedBy": "[email protected]",
      "updatedAt": "2023-04-20T10:24:36.162Z",
      "createdAt": "2021-04-20T10:24:36.162Z"
    }
  ]
}

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.

Example:

"517fa9dfd42d8b00g1o3k312"

x-fabric-request-id
string

Unique request ID

Example:

"263e731c-45c8-11ed-b878-0242ac120002"

Body

application/json

Request body for search

match
object
required

Specification for matching attributes

sort
string

Sorting criteria. Sorting is supported only on createdAt, updatedAt. - refers to descending while + refers to ascending order

Example:

"+createdAt,-updatedAt"

offset
integer<int32>
default:0

Number of records to skip before returning records. For example, offset=20, limit=10 returns records 21-30.

Example:

2

limit
integer<int32>
default:10

Maximum number of records per page

Example:

10

Response

OK

Search response

offset
integer<int32>
default:0

Number of records to skip before returning records. For example, offset=20, limit=10 returns records 21-30.

Example:

5

limit
integer<int32>
default:10

Maximum number of records per page

Example:

10

count
integer<int32>

Total number of records in the response

Example:

100

data
object[]