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.
You can only call this method when authenticated as a Wix app or Wix user identity.
There is 1 error with this status code.
There is 1 error with this status code.
This method may also return standard errors. Learn more about standard Wix errors.