Skip to main content
POST
/
products
/
actions
/
filter-change-category
Bulk Reassign Products to a Different Category Using Filter Conditions
curl --request POST \
  --url https://api.fabric.inc/v3/products/actions/filter-change-category \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '
{
  "targetCategoryId": "AACCVVV1234567",
  "match": {
    "id": {
      "op": "IN",
      "value": [
        "blue"
      ]
    },
    "sku": {
      "op": "IN",
      "value": [
        "blue"
      ]
    },
    "type": {
      "op": "EQUALS",
      "value": "ITEM"
    },
    "hasDraft": {
      "op": "EQUALS",
      "value": true
    },
    "hasLive": {
      "op": "EQUALS",
      "value": true
    },
    "status": {
      "op": "EQUALS",
      "value": "LIVE"
    },
    "categoryId": [
      {
        "op": "IN",
        "value": [
          "blue"
        ]
      }
    ],
    "properties": [
      {
        "attributeId": "CAZZX1234567DDDDD",
        "attributeValue": [
          {
            "op": "RANGE",
            "fromValue": "2022-09-14T22:10:30.618Z",
            "toValue": "2023-04-14T22:10:30.618Z"
          }
        ]
      }
    ],
    "variantIds": {
      "op": "IN",
      "value": [
        "blue"
      ]
    },
    "bundleProductIds": {
      "op": "IN",
      "value": [
        "blue"
      ]
    },
    "createdAt": {
      "op": "RANGE",
      "fromValue": "2022-09-14T22:10:30.618Z",
      "toValue": "2023-04-14T22:10:30.618Z"
    },
    "updatedAt": {
      "op": "RANGE",
      "fromValue": "2022-09-14T22:10:30.618Z",
      "toValue": "2023-04-14T22:10:30.618Z"
    },
    "createdBy": {
      "op": "IN",
      "value": [
        "blue"
      ]
    }
  }
}
'
{
  "jobId": "877f1f77bcf86cd799439087"
}

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
targetCategoryId
string
required

Category ID

Example:

"AACCVVV1234567"

match
object
required

Search criteria to match attributes

Response

OK

Job ID for the exported job

jobId
string

24-character system-generated job ID

Example:

"877f1f77bcf86cd799439087"