Bulk-assign a tax class to products / variants / categories

Assigns the tax class to the listed products, variants and categories in one call. Every ID must belong to this store.

POST
/v1/tax-classes/{id}/assign
AuthorizationBearer <token>

Admin API key (server-to-server). Issue via the dashboard at Settings → API keys. Plain-text key is shown once — store in a secret manager. Format: Authorization: Bearer brainerce_xxxxxxxxx.

In: header

Path Parameters

idstring

Tax Class ID

taxClassId?string

ID of the tax class to assign. Optional on the routes that carry it in the path (POST /v1/tax-classes/{id}/assign): the path id is used. If you send it and it differs from the path id the request is rejected with 400. Required where there is no path id. Must belong to the store.

productIds?array<string>

Products to assign the class to. At most 200. Every ID must belong to the store, otherwise the whole request is rejected.

Itemsitems <= 200
variantIds?array<string>

Variants to assign the class to. At most 200. Every ID must belong to the store, otherwise the whole request is rejected.

Itemsitems <= 200
categoryIds?array<string>

Categories to assign the class to. At most 200. Every ID must belong to the store, otherwise the whole request is rejected.

Itemsitems <= 200
curl -X POST "https://api.brainerce.com/api/v1/tax-classes/string/assign" \  -H "Content-Type: application/json" \  -d '{}'
{
  "updated": 12
}

{
  "statusCode": 400,
  "code": "VALIDATION_FAILED",
  "message": "name should not be empty, price must be a positive number",
  "timestamp": "2026-08-23T10:15:00.000Z",
  "path": "/api/v1/tax-classes/{id}/assign"
}

{
  "statusCode": 401,
  "code": "UNAUTHORIZED",
  "message": "Invalid or expired credential",
  "timestamp": "2026-08-23T10:15:00.000Z",
  "path": "/api/v1/products/bulk/{jobId}"
}

{
  "statusCode": 403,
  "code": "INSUFFICIENT_SCOPE",
  "message": "API key does not have the required scope: products:write",
  "timestamp": "2026-08-23T10:15:00.000Z",
  "path": "/api/v1/tax-classes/{id}/assign"
}

{
  "statusCode": 404,
  "code": "RESOURCE_NOT_FOUND",
  "message": "Resource not found",
  "timestamp": "2026-08-23T10:15:00.000Z",
  "path": "/api/v1/tax-classes/{id}/assign"
}

{
  "statusCode": 429,
  "code": "RATE_LIMITED",
  "message": "Too many requests",
  "details": {
    "retryAfterSeconds": 12
  },
  "timestamp": "2026-08-23T10:15:00.000Z",
  "path": "/api/v1/store"
}