Setu Recipes: reusable digital workers across every app.Browse templates

Integrations / Wix

Wix

Wix sites: query products (Stores Catalog V3), look up orders, query and create contacts, and read site properties, with a Wix API key.

7 actions API key 6 read1 write Calls www.wixapis.com

Connect

TypeScript
const conn = await setu.connections.initiate({ userId: "user_1", toolkit: "wix" });
console.log(conn.connectUrl); // show this to your user
await conn.waitUntilActive();

Permissions requested

This toolkit uses a single credential and requests no scopes.

Actions

Create contactwritewix.create_contactCreate a contact with a name and email. Fails if the email already belongs to another contact unless allow_duplicates is true.
InputTypeDescription
emailstringRequiredEmail address
first_namestringOptionalFirst name
last_namestringOptionalLast name
allow_duplicatesbooleanOptionalCreate even if the email is already used (default false)
TypeScript
await setu.execute({
  userId: "user_1",
  action: "wix.create_contact",
  input: {
    "email": "<email>"
  },
});
Get orderreadwix.get_orderRead one store order by id: items, totals, buyer, payment and fulfillment status.
InputTypeDescription
order_idstringRequiredWix order id (GUID)
TypeScript
await setu.execute({
  userId: "user_1",
  action: "wix.get_order",
  input: {
    "order_id": "<order_id>"
  },
});
Get productreadwix.get_productRead one store product by id, including its variants (Wix Stores Catalog V3).
InputTypeDescription
product_idstringRequiredWix product id (GUID)
TypeScript
await setu.execute({
  userId: "user_1",
  action: "wix.get_product",
  input: {
    "product_id": "<product_id>"
  },
});
Get site propertiesreadwix.get_site_propertiesRead the site's business properties: language, locale, time zone, payment currency, business email, phone and address.

No input.

TypeScript
await setu.execute({
  userId: "user_1",
  action: "wix.get_site_properties",
  input: {},
});
Query contactsreadwix.query_contactsList or filter site contacts (people who signed up, ordered or were added). Filter by fields such as info.emails.email; page with limit and offset.
InputTypeDescription
filterobjectOptionalFilter, e.g. {"info.emails.email": "[email protected]"}
limitintegerOptionalItems to return (max 1000)
offsetintegerOptionalItems to skip
TypeScript
await setu.execute({
  userId: "user_1",
  action: "wix.query_contacts",
  input: {},
});
Query productsreadwix.query_productsList or filter store products (Wix Stores Catalog V3). Filter by id, handle, slug, dates or visible; sort and page with offset. Variants are not returned; use get_product for those. The site needs the Wix Stores app.
InputTypeDescription
filterobjectOptionalFilter, e.g. {"visible": true} or {"id": {"$in": ["..."]}}
sortarray of objectOptionalSort, e.g. [{"field_name": "createdDate", "order": "DESC"}]
limitintegerOptionalItems to return (max 100)
offsetintegerOptionalItems to skip
fieldsarray of stringOptionalExtra fields to include: URL, CURRENCY, PLAIN_DESCRIPTION, THUMBNAIL, ALL_CATEGORIES_INFO and so on
TypeScript
await setu.execute({
  userId: "user_1",
  action: "wix.query_products",
  input: {},
});
Search ordersreadwix.search_ordersSearch store orders with filters, sorting and cursor paging. By default PENDING and REJECTED orders are excluded; filter status explicitly to see them. Newest first unless sorted otherwise.
InputTypeDescription
filterobjectOptionalFilter, e.g. {"status": {"$ne": "INITIALIZED"}} or {"paymentStatus": "PAID"}
sortarray of objectOptionalSort, e.g. [{"fieldName": "createdDate", "order": "DESC"}]
limitintegerOptionalItems to return (max 100)
cursorstringOptionalCursor from the previous response's pagingMetadata
TypeScript
await setu.execute({
  userId: "user_1",
  action: "wix.search_orders",
  input: {},
});