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
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.
| Input | Type | Description | |
|---|---|---|---|
email | string | Required | Email address |
first_name | string | Optional | First name |
last_name | string | Optional | Last name |
allow_duplicates | boolean | Optional | Create even if the email is already used (default false) |
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.
| Input | Type | Description | |
|---|---|---|---|
order_id | string | Required | Wix order id (GUID) |
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).
| Input | Type | Description | |
|---|---|---|---|
product_id | string | Required | Wix product id (GUID) |
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.
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.
| Input | Type | Description | |
|---|---|---|---|
filter | object | Optional | Filter, e.g. {"info.emails.email": "[email protected]"} |
limit | integer | Optional | Items to return (max 1000) |
offset | integer | Optional | Items to skip |
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.
| Input | Type | Description | |
|---|---|---|---|
filter | object | Optional | Filter, e.g. {"visible": true} or {"id": {"$in": ["..."]}} |
sort | array of object | Optional | Sort, e.g. [{"field_name": "createdDate", "order": "DESC"}] |
limit | integer | Optional | Items to return (max 100) |
offset | integer | Optional | Items to skip |
fields | array of string | Optional | Extra fields to include: URL, CURRENCY, PLAIN_DESCRIPTION, THUMBNAIL, ALL_CATEGORIES_INFO and so on |
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.
| Input | Type | Description | |
|---|---|---|---|
filter | object | Optional | Filter, e.g. {"status": {"$ne": "INITIALIZED"}} or {"paymentStatus": "PAID"} |
sort | array of object | Optional | Sort, e.g. [{"fieldName": "createdDate", "order": "DESC"}] |
limit | integer | Optional | Items to return (max 100) |
cursor | string | Optional | Cursor from the previous response's pagingMetadata |
await setu.execute({
userId: "user_1",
action: "wix.search_orders",
input: {},
});