CMS References & Relationships

Download skillThe skill is a reference md and part of wix-manage skill. You can use the following command to add the full wix-manage skill to your project:
Copy

Standard call shape (every curl below). The <AUTH> placeholder is shorthand for Authorization: Bearer <TOKEN> only. Body-bearing requests also need Content-Type: application/json.

This recipe covers linking CMS collections together using reference fields.

Prerequisites

  1. Wix CMS enabled on the site
  2. At least two collections to link together
  3. API access with CMS permissions

Required APIs

  • Collections API: REST
  • Data Items API: REST

Reference Types

TypeField TypeRelationshipExample
Single ReferenceREFERENCEOne-to-one, Many-to-oneProduct → Category
Multi-ReferenceMULTI_REFERENCEOne-to-many, Many-to-manyProduct → Tags

Add a Single Reference Field

Endpoint: POST /wix-data/v2/collections/create-field

Copy

Add a Multi-Reference Field

Endpoint: POST /wix-data/v2/collections/create-field

Copy

Endpoint: POST /wix-data/v2/bulk/items/insert-references

Copy

Replace All References

Endpoint: POST /wix-data/v2/items/replace-references

Copy

Note: To remove all references, pass an empty array for newReferencedItemIds.

Remove References (Bulk)

Endpoint: POST /wix-data/v2/bulk/items/remove-references

Copy

Query with Referenced Items Expanded

Endpoint: POST /wix-data/v2/items/query

Copy

Reference Query Operators

OperatorDescriptionExample
$eqExact match (single reference){ "category": "id" }
$hasSomeHas at least one of{ "tags": { "$hasSome": ["id1", "id2"] } }
$hasAllHas all of{ "tags": { "$hasAll": ["id1", "id2"] } }

Date last updated: 4 June 2026

Did this help?