POST

Bulk Assign Categories To Program


Assigns or unassigns Categories for a Program.

This is the recommended operation for routine Program-centric assignment changes. It updates each Category's assignedTo list and asynchronously synchronizes the Program's categoryIds list. Assignments persist across Program lifecycle states until explicitly removed.

A Program supports up to 10 assigned Categories. Including the same Category ID in both request lists fails the whole request with CATEGORY_ASSIGNMENT_LISTS_OVERLAP before any Category is changed. An increasing result above 10 fails with PROGRAM_CATEGORY_LIMIT_EXCEEDED before any Category is changed. This count check is best-effort: concurrent changes and other assignment methods can still exceed the limit.

Repeated IDs within a request list are processed once. Missing Category IDs produce per-item CATEGORY_NOT_FOUND failures in results[].itemMetadata.error; existing IDs can still succeed in the same request. Use itemMetadata.id to correlate results with requested IDs. Only successfully processed IDs are sent for asynchronous Program synchronization. This method does not verify that the Program exists.

If both request lists are empty, the method returns a successful no-op response. Cross-service relationship updates are eventually consistent, so an immediate read from the Programs API may briefly return the previous assignment state.

Authentication

You can only call this method when authenticated as a Wix app or Wix user identity.

Permission Scopes
Manage Online Programs
Learn more about app permissions.
Endpoint
POST
https://www.wixapis.com/_api/program-categories-service/v3/categories/bulk-assign-to-program

Errors
400Invalid Argument

There is 1 error with this status code.

428Failed Precondition

There is 1 error with this status code.

This method may also return standard errors. Learn more about standard Wix errors.

Event TriggersThis method triggers the following events:
Did this help?