# Ecwid by Lightspeed

> Run your Ecwid store from workflows: find and record orders, mark them paid or shipped, keep products, stock, customers, categories and discount coupons up to date. Start a workflow when an order is placed, paid or shipped, a customer signs up, stock runs low, a cart is abandoned or a review comes in.

App · 25 actions. Web page: https://docs.lodol.com/docs/integrations/ecwid

## Actions

### Adjust product stock

Add to or take from a product's stock, such as after a sale in another channel or a delivery from a supplier.

**Inputs**

- Product ID (`product_id`, text, required): The product's ID, a number such as 692730761, from the trigger or another Ecwid step.
- Change by (`change_by`, number, required): How many to add, such as 5, or to take away, such as -2.
- Low stock email (`notify_low_stock`, true/false): Have Ecwid email the store if the stock falls to its low stock level.

**Outputs**

- `category_ids` (list): The categories it's in
- `compare_to_price` (number): The price before the sale, shown struck through; empty if none
- `created_at` (text): When it was added (ISO 8601)
- `description` (text): Its description, in HTML
- `enabled` (true/false): Whether it shows in the store
- `id` (number): The product's ID
- `in_stock` (true/false): Whether it, or one of its variations, is in stock
- `low_stock_level` (number): The stock level that counts as low; empty if not set
- `name` (text): Its name
- `price` (number): Its price, before options and taxes
- `quantity` (number): How many are in stock; empty when stock is unlimited
- `sku` (text): Its SKU
- `stock_warning` (text): Ecwid's warning, such as stock below zero; empty if none
- `unlimited_stock` (true/false): Whether its stock is unlimited
- `updated_at` (text): When it last changed (ISO 8601)
- `url` (text): Its page in the store
- `weight` (number): Its weight; empty if not set

**Example output**

```json
{
  "category_ids": [
    9691094
  ],
  "compare_to_price": null,
  "created_at": "2024-09-04T07:20:11Z",
  "description": "",
  "enabled": true,
  "id": 692730761,
  "in_stock": true,
  "low_stock_level": 1,
  "name": "Toys",
  "price": 10,
  "quantity": 8,
  "sku": "123123",
  "stock_warning": "",
  "unlimited_stock": false,
  "updated_at": "2024-09-04T07:20:12Z",
  "url": "https://store1003.company.site/products/toys-692730761",
  "weight": null
}
```

### Create category

Add a category, at the top of the catalog or inside another category.

**Inputs**

- Name (`name`, text, required): What the category is called.
- Inside (`parent_id`, text): The category to put it in. Leave blank for the top level.
- Description (`description`, text): What it holds. HTML such as <b>bold</b> is kept.
- Visibility (`visibility`, text): Whether it shows in the store. Leave blank to show it. One of: `visible` (Shown in the store), `hidden` (Hidden from the store).

**Outputs**

- `description` (text): Its description, in HTML
- `enabled` (true/false): Whether it shows in the store
- `id` (number): The category's ID
- `name` (text): Its name
- `parent_id` (number): The category it sits in; 0 at the top level
- `product_count` (number): How many products it and its subcategories hold
- `url` (text): Its page in the store

**Example output**

```json
{
  "description": "",
  "enabled": true,
  "id": 9691094,
  "name": "Fruit",
  "parent_id": 0,
  "product_count": 6,
  "url": "https://mdemo.ecwid.com/products/Fruit"
}
```

### Create customer

Add a customer with their address, group and marketing consent.

**Inputs**

- Email (`email`, text, required): The customer's email address.
- Name (`name`, text): Their full name, such as Ada Lovelace.
- Company (`company`, text): Their company's name.
- Phone (`phone`, text): Their phone number.
- Street (`street`, text): The street address. Put a second line on a new line.
- City (`city`, text): The city.
- Postal code (`postal_code`, text): The postal or ZIP code.
- State (`state`, text): The state or province code, such as CA or NY.
- Country (`country`, text): The country.
- Customer group (`customer_group`, text): The group they belong to, such as Wholesale.
- Marketing emails (`accepts_marketing`, text): Whether they agreed to receive marketing emails. One of: `yes` (Accepts marketing emails), `no` (Doesn't accept marketing emails).
- Private notes (`private_notes`, text): Notes about them only the store sees.

**Outputs**

- `accepts_marketing` (true/false): Whether they accept marketing emails
- `billing_address` (object): Their billing name, address and phone
- `email` (text): Their email
- `first_name` (text): Their first name
- `group_id` (number): Their customer group's ID; 0 for General
- `group_name` (text): Their customer group's name
- `id` (number): The customer's ID
- `last_name` (text): Their last name
- `name` (text): Their full name
- `order_count` (number): How many orders they've placed
- `private_notes` (text): The store's private notes on them
- `registered_at` (text): When they registered or first ordered (ISO 8601)
- `sales_value` (number): The total of their orders
- `tax_exempt` (true/false): Whether they are tax exempt
- `updated_at` (text): When their details last changed (ISO 8601)

**Example output**

```json
{
  "accepts_marketing": false,
  "billing_address": {
    "city": "",
    "company": "",
    "country": "",
    "name": "Support team",
    "phone": "",
    "postal_code": "",
    "state": "",
    "street": ""
  },
  "email": "ec.apps@lightspeedhq.com",
  "first_name": "Support",
  "group_id": 0,
  "group_name": "General",
  "id": 177737165,
  "last_name": "team",
  "name": "Support team",
  "order_count": 0,
  "private_notes": "",
  "registered_at": "2021-12-21T06:05:58Z",
  "sales_value": 0,
  "tax_exempt": false,
  "updated_at": "2024-06-04T21:15:10Z"
}
```

### Create discount coupon

Make a discount coupon customers enter at checkout, such as a thank you code for a new customer.

**Inputs**

- Name (`name`, text, required): What the coupon is called in the Ecwid admin.
- Code (`code`, text, required): What customers type at checkout, such as SUMMER10.
- Discount type (`discount_type`, text, required): What it takes off. One of: `PERCENT` (Percent off), `ABS` (Amount off), `SHIPPING` (Free shipping), `PERCENT_AND_SHIPPING` (Percent off and free shipping), `ABS_AND_SHIPPING` (Amount off and free shipping).
- Discount (`discount`, number): How much it takes off: a percent, such as 10, or an amount in the store's currency. Not needed for free shipping. At least 0.
- Status (`status`, text): Whether customers can use it yet. Defaults to Active. One of: `ACTIVE`, `PAUSED`.
- Starts (`launch_date`, date and time): When it starts working.
- Ends (`expiration_date`, date and time): When it stops working. Leave blank for never.
- Minimum order (`minimum_subtotal`, number): The smallest order subtotal it works on. At least 0.
- How often it can be used (`uses_limit`, text): How many times it can be used. One of: `UNLIMITED` (As often as customers like), `ONCEPERCUSTOMER` (Once per customer), `SINGLE` (Once, by one customer).
- Who can use it (`application_limit`, text): Which customers can use it. One of: `UNLIMITED` (Any customer), `NEW_CUSTOMER_ONLY` (New customers only), `REPEAT_CUSTOMER_ONLY` (Returning customers only).
- Categories (`category_ids`, list): Only products in these categories get the discount. Leave blank for every product.

**Outputs**

- `application_limit` (text): UNLIMITED, NEW_CUSTOMER_ONLY or REPEAT_CUSTOMER_ONLY
- `category_ids` (list): The only categories it applies to; empty for all
- `code` (text): The code customers enter at checkout
- `created_at` (text): When it was made (ISO 8601)
- `discount` (number): How much it takes off
- `discount_type` (text): What it takes off, such as PERCENT or ABS
- `expiration_date` (text): When it stops working (ISO 8601); empty if never
- `id` (number): The coupon's ID
- `launch_date` (text): When it starts working (ISO 8601); empty if not set
- `minimum_subtotal` (number): The smallest order subtotal it applies to; empty if any
- `name` (text): Its name
- `order_count` (number): How many orders have used it
- `product_ids` (list): The only products it applies to; empty for all
- `status` (text): ACTIVE, PAUSED, EXPIRED or USEDUP
- `updated_at` (text): When it last changed (ISO 8601)
- `uses_limit` (text): UNLIMITED, ONCEPERCUSTOMER or SINGLE

**Example output**

```json
{
  "application_limit": "UNLIMITED",
  "category_ids": [],
  "code": "DISC",
  "created_at": "2022-07-29T15:22:35Z",
  "discount": 10,
  "discount_type": "PERCENT",
  "expiration_date": "",
  "id": 162428889,
  "launch_date": "2022-07-28T23:00:00Z",
  "minimum_subtotal": null,
  "name": "10% OFF",
  "order_count": 1,
  "product_ids": [],
  "status": "ACTIVE",
  "updated_at": "2024-05-01T05:26:28Z",
  "uses_limit": "UNLIMITED"
}
```

### Create order

Record an order, such as one taken by phone or sold elsewhere. Ecwid adds it like a checkout would and emails the store; the customer gets no email unless you ask.

**Inputs**

- Customer email (`email`, text, required): The customer's email address.
- Items (`items`, list, required): What was ordered: each item's name and price, and its quantity, such as [{"name": "Mug", "price": 12, "quantity": 2}]. Add a product_id to link it to a product in the catalog.
- Customer name (`customer_name`, text): Their full name, used for billing and shipping.
- Phone (`phone`, text): Their phone number.
- Street (`street`, text): The street address. Put a second line on a new line.
- City (`city`, text): The city.
- Postal code (`postal_code`, text): The postal or ZIP code.
- State (`state`, text): The state or province code, such as CA or NY.
- Country (`country`, text): The country.
- Payment status (`payment_status`, text): Where payment stands. Defaults to Awaiting payment.
- Fulfillment status (`fulfillment_status`, text): Where shipping stands. Defaults to Awaiting processing.
- Payment method (`payment_method`, text): How it was paid, such as Phone order or Cash.
- Shipping method (`shipping_method`, text): How it ships, such as Courier. Shown as Shipping if you give only a cost.
- Shipping cost (`shipping_cost`, number): What shipping costs. At least 0.
- Tax (`tax`, number): The tax on the whole order. At least 0.
- Placed at (`placed_at`, date and time): When the order was placed. Leave blank for now.
- Private notes (`private_notes`, text): A note on the order only the store sees.
- Email the customer (`notify_customer`, true/false): Send the customer Ecwid's order emails, such as the order confirmation. Off by default. Default: `false`.

**Outputs**

- `billing_address` (object): The billing name and address
- `coupon_code` (text): The discount coupon used; empty if none
- `coupon_discount` (number): What the discount coupon took off
- `created_at` (text): When it was placed (ISO 8601)
- `customer_id` (number): The customer's ID; 0 for a guest
- `customer_name` (text): The customer's name, from the billing address
- `discount` (number): The discount Ecwid records on the order, from promotions
- `email` (text): The customer's email
- `fulfillment_status` (text): Its fulfillment status, such as SHIPPED
- `id` (text): The order's ID, as customers see it, such as XJ12H
- `internal_id` (number): Ecwid's internal number for the order
- `items` (list): What was ordered
- `order_comments` (text): The customer's comments at checkout
- `payment_method` (text): The payment method chosen at checkout
- `payment_status` (text): Its payment status, such as PAID
- `private_notes` (text): The store's private notes on the order
- `shipping_address` (object): Where it ships to
- `shipping_method` (text): The shipping option chosen at checkout
- `subtotal` (number): The cost of the items, before anything else
- `tax` (number): The taxes on the order
- `total` (number): The order total, with shipping, taxes and discounts
- `tracking_number` (text): The shipment's tracking number
- `updated_at` (text): When it last changed (ISO 8601)

**Example output**

```json
{
  "billing_address": {
    "city": "San Diego",
    "company": "Hedgehog and Bucket",
    "country": "US",
    "name": "Eugene K",
    "phone": "123141321",
    "postal_code": "90002",
    "state": "CA",
    "street": "My Street"
  },
  "coupon_code": "",
  "coupon_discount": 0,
  "created_at": "2015-09-20T19:59:43Z",
  "customer_id": 270919557,
  "customer_name": "Eugene K",
  "discount": 0,
  "email": "ec.apps@lightspeedhq.com",
  "fulfillment_status": "AWAITING_PROCESSING",
  "id": "XJ12H",
  "internal_id": 212398840,
  "items": [
    {
      "name": "Cherry",
      "options": [],
      "price": 15,
      "product_id": 439710255,
      "quantity": 2,
      "sku": "00004"
    }
  ],
  "order_comments": "",
  "payment_method": "Phone order",
  "payment_status": "PAID",
  "private_notes": "Must be delivered till Sunday.",
  "shipping_address": {
    "city": "San Diego",
    "company": "Hedgehog and Bucket",
    "country": "US",
    "name": "Eugene K",
    "phone": "123141321",
    "postal_code": "90002",
    "state": "CA",
    "street": "My Street"
  },
  "shipping_method": "Fast Delivery",
  "subtotal": 30,
  "tax": 0,
  "total": 40,
  "tracking_number": "",
  "updated_at": "2015-09-20T19:59:43Z"
}
```

### Create product

Add a product to the catalog with its price, stock and categories.

**Inputs**

- Name (`name`, text, required): What the product is called.
- Price (`price`, number, required): Its price, such as 12.50, in the store's currency. At least 0.
- SKU (`sku`, text): Its SKU. Leave blank and Ecwid makes one.
- Description (`description`, text): What it is. HTML such as <b>bold</b> is kept.
- Stock (`quantity`, number): How many are in stock. Leave blank for unlimited stock. At least 0.
- Low stock level (`low_stock_level`, number): Ecwid emails the store when stock falls to this many. At least 0.
- Compare-to price (`compare_to_price`, number): The price before the sale, shown struck through. At least 0.
- Weight (`weight`, number): Its weight, in the store's weight unit. At least 0.
- Categories (`category_ids`, list): The categories it's in.
- Visibility (`visibility`, text): Whether it shows in the store. Leave blank to show it. One of: `visible` (Shown in the store), `hidden` (Hidden from the store).

**Outputs**

- `category_ids` (list): The categories it's in
- `compare_to_price` (number): The price before the sale, shown struck through; empty if none
- `created_at` (text): When it was added (ISO 8601)
- `description` (text): Its description, in HTML
- `enabled` (true/false): Whether it shows in the store
- `id` (number): The product's ID
- `in_stock` (true/false): Whether it, or one of its variations, is in stock
- `low_stock_level` (number): The stock level that counts as low; empty if not set
- `name` (text): Its name
- `price` (number): Its price, before options and taxes
- `quantity` (number): How many are in stock; empty when stock is unlimited
- `sku` (text): Its SKU
- `unlimited_stock` (true/false): Whether its stock is unlimited
- `updated_at` (text): When it last changed (ISO 8601)
- `url` (text): Its page in the store
- `weight` (number): Its weight; empty if not set

**Example output**

```json
{
  "category_ids": [
    9691094
  ],
  "compare_to_price": null,
  "created_at": "2024-09-04T07:20:11Z",
  "description": "",
  "enabled": true,
  "id": 692730761,
  "in_stock": true,
  "low_stock_level": 1,
  "name": "Toys",
  "price": 10,
  "quantity": 10,
  "sku": "123123",
  "unlimited_stock": false,
  "updated_at": "2024-09-04T07:20:12Z",
  "url": "https://store1003.company.site/products/toys-692730761",
  "weight": null
}
```

### Delete category

Delete a category for good. Its products stay in the catalog.

**Inputs**

- Category (`category_id`, text, required): The category.

**Outputs**

- `category_id` (number): The category deleted
- `deleted` (true/false): Whether Ecwid deleted the category

**Example output**

```json
{
  "category_id": 9691094,
  "deleted": true
}
```

### Delete customer

Delete a customer for good. Their orders stay.

**Inputs**

- Customer ID (`customer_id`, text, required): The customer's ID, a number such as 177737165, from the trigger or another Ecwid step.

**Outputs**

- `customer_id` (number): The customer deleted
- `deleted` (true/false): Whether Ecwid deleted the customer

**Example output**

```json
{
  "customer_id": 177737165,
  "deleted": true
}
```

### Delete discount coupon

Delete a discount coupon for good. Orders that used it keep their discount.

**Inputs**

- Coupon ID (`coupon_id`, text, required): The coupon's ID, a number such as 162428889, from 'Search discount coupons' or 'Create discount coupon'.

**Outputs**

- `coupon_id` (number): The discount coupon deleted
- `deleted` (true/false): Whether Ecwid deleted the discount coupon

**Example output**

```json
{
  "coupon_id": 162428889,
  "deleted": true
}
```

### Delete order

Delete an order for good. It can't be restored.

**Inputs**

- Order ID (`order_id`, text, required): The order's ID as customers see it, such as XJ12H, from the trigger or another Ecwid step.

**Outputs**

- `deleted` (true/false): Whether Ecwid deleted the order
- `order_id` (text): The order deleted

**Example output**

```json
{
  "deleted": true,
  "order_id": "XJ12H"
}
```

### Delete product

Delete a product from the catalog for good. Orders that have it keep their items.

**Inputs**

- Product ID (`product_id`, text, required): The product's ID, a number such as 692730761, from the trigger or another Ecwid step.

**Outputs**

- `deleted` (true/false): Whether Ecwid deleted the product
- `product_id` (number): The product deleted

**Example output**

```json
{
  "deleted": true,
  "product_id": 692730761
}
```

### Get category

Get a category with its parent, description and product count.

**Inputs**

- Category (`category_id`, text, required): The category.

**Outputs**

- `description` (text): Its description, in HTML
- `enabled` (true/false): Whether it shows in the store
- `id` (number): The category's ID
- `name` (text): Its name
- `parent_id` (number): The category it sits in; 0 at the top level
- `product_count` (number): How many products it and its subcategories hold
- `url` (text): Its page in the store

**Example output**

```json
{
  "description": "",
  "enabled": true,
  "id": 9691094,
  "name": "Fruit",
  "parent_id": 0,
  "product_count": 6,
  "url": "https://mdemo.ecwid.com/products/Fruit"
}
```

### Get customer

Get a customer with their address, group and order totals.

**Inputs**

- Customer ID (`customer_id`, text, required): The customer's ID, a number such as 177737165, from the trigger or another Ecwid step.

**Outputs**

- `accepts_marketing` (true/false): Whether they accept marketing emails
- `billing_address` (object): Their billing name, address and phone
- `email` (text): Their email
- `first_name` (text): Their first name
- `group_id` (number): Their customer group's ID; 0 for General
- `group_name` (text): Their customer group's name
- `id` (number): The customer's ID
- `last_name` (text): Their last name
- `name` (text): Their full name
- `order_count` (number): How many orders they've placed
- `private_notes` (text): The store's private notes on them
- `registered_at` (text): When they registered or first ordered (ISO 8601)
- `sales_value` (number): The total of their orders
- `tax_exempt` (true/false): Whether they are tax exempt
- `updated_at` (text): When their details last changed (ISO 8601)

**Example output**

```json
{
  "accepts_marketing": false,
  "billing_address": {
    "city": "",
    "company": "",
    "country": "",
    "name": "Support team",
    "phone": "",
    "postal_code": "",
    "state": "",
    "street": ""
  },
  "email": "ec.apps@lightspeedhq.com",
  "first_name": "Support",
  "group_id": 0,
  "group_name": "General",
  "id": 177737165,
  "last_name": "team",
  "name": "Support team",
  "order_count": 0,
  "private_notes": "",
  "registered_at": "2021-12-21T06:05:58Z",
  "sales_value": 0,
  "tax_exempt": false,
  "updated_at": "2024-06-04T21:15:10Z"
}
```

### Get order

Get an order with its items, addresses, totals and statuses.

**Inputs**

- Order ID (`order_id`, text, required): The order's ID as customers see it, such as XJ12H, from the trigger or another Ecwid step.

**Outputs**

- `billing_address` (object): The billing name and address
- `coupon_code` (text): The discount coupon used; empty if none
- `coupon_discount` (number): What the discount coupon took off
- `created_at` (text): When it was placed (ISO 8601)
- `customer_id` (number): The customer's ID; 0 for a guest
- `customer_name` (text): The customer's name, from the billing address
- `discount` (number): The discount Ecwid records on the order, from promotions
- `email` (text): The customer's email
- `fulfillment_status` (text): Its fulfillment status, such as SHIPPED
- `id` (text): The order's ID, as customers see it, such as XJ12H
- `internal_id` (number): Ecwid's internal number for the order
- `items` (list): What was ordered
- `order_comments` (text): The customer's comments at checkout
- `payment_method` (text): The payment method chosen at checkout
- `payment_status` (text): Its payment status, such as PAID
- `private_notes` (text): The store's private notes on the order
- `shipping_address` (object): Where it ships to
- `shipping_method` (text): The shipping option chosen at checkout
- `subtotal` (number): The cost of the items, before anything else
- `tax` (number): The taxes on the order
- `total` (number): The order total, with shipping, taxes and discounts
- `tracking_number` (text): The shipment's tracking number
- `updated_at` (text): When it last changed (ISO 8601)

**Example output**

```json
{
  "billing_address": {
    "city": "San Diego",
    "company": "Hedgehog and Bucket",
    "country": "US",
    "name": "Eugene K",
    "phone": "123141321",
    "postal_code": "90002",
    "state": "CA",
    "street": "My Street"
  },
  "coupon_code": "",
  "coupon_discount": 0,
  "created_at": "2015-09-20T19:59:43Z",
  "customer_id": 270919557,
  "customer_name": "Eugene K",
  "discount": 0,
  "email": "ec.apps@lightspeedhq.com",
  "fulfillment_status": "AWAITING_PROCESSING",
  "id": "XJ12H",
  "internal_id": 212398840,
  "items": [
    {
      "name": "Cherry",
      "options": [],
      "price": 15,
      "product_id": 439710255,
      "quantity": 2,
      "sku": "00004"
    }
  ],
  "order_comments": "",
  "payment_method": "Phone order",
  "payment_status": "PAID",
  "private_notes": "Must be delivered till Sunday.",
  "shipping_address": {
    "city": "San Diego",
    "company": "Hedgehog and Bucket",
    "country": "US",
    "name": "Eugene K",
    "phone": "123141321",
    "postal_code": "90002",
    "state": "CA",
    "street": "My Street"
  },
  "shipping_method": "Fast Delivery",
  "subtotal": 30,
  "tax": 0,
  "total": 40,
  "tracking_number": "",
  "updated_at": "2015-09-20T19:59:43Z"
}
```

### Get product

Get a product with its price, stock and categories.

**Inputs**

- Product ID (`product_id`, text, required): The product's ID, a number such as 692730761, from the trigger or another Ecwid step.

**Outputs**

- `category_ids` (list): The categories it's in
- `compare_to_price` (number): The price before the sale, shown struck through; empty if none
- `created_at` (text): When it was added (ISO 8601)
- `description` (text): Its description, in HTML
- `enabled` (true/false): Whether it shows in the store
- `id` (number): The product's ID
- `in_stock` (true/false): Whether it, or one of its variations, is in stock
- `low_stock_level` (number): The stock level that counts as low; empty if not set
- `name` (text): Its name
- `price` (number): Its price, before options and taxes
- `quantity` (number): How many are in stock; empty when stock is unlimited
- `sku` (text): Its SKU
- `unlimited_stock` (true/false): Whether its stock is unlimited
- `updated_at` (text): When it last changed (ISO 8601)
- `url` (text): Its page in the store
- `weight` (number): Its weight; empty if not set

**Example output**

```json
{
  "category_ids": [
    9691094
  ],
  "compare_to_price": null,
  "created_at": "2024-09-04T07:20:11Z",
  "description": "",
  "enabled": true,
  "id": 692730761,
  "in_stock": true,
  "low_stock_level": 1,
  "name": "Toys",
  "price": 10,
  "quantity": 10,
  "sku": "123123",
  "unlimited_stock": false,
  "updated_at": "2024-09-04T07:20:12Z",
  "url": "https://store1003.company.site/products/toys-692730761",
  "weight": null
}
```

### Get store profile

Get the store's name, address, currency, time zone and languages.

**Inputs**: None.

**Outputs**

- `account_name` (text): The account owner's name
- `closed` (true/false): Whether the store is closed for maintenance
- `company_name` (text): The company's name
- `currency` (text): The store's currency, such as EUR
- `email` (text): The account's email
- `languages` (list): The store's languages, such as en
- `store_id` (number): The store's ID
- `store_name` (text): The store's name
- `store_url` (text): The store's address
- `timezone` (text): The store's time zone, such as Europe/London
- `weight_unit` (text): The unit weights are in, such as KILOGRAM

**Example output**

```json
{
  "account_name": "API Team Store",
  "closed": false,
  "company_name": "Ecwid API Team Store",
  "currency": "EUR",
  "email": "ec.apps@lightspeedhq.com",
  "languages": [
    "en",
    "cs"
  ],
  "store_id": 1003,
  "store_name": "API Team Store",
  "store_url": "https://store1003.company.site/products",
  "timezone": "Europe/London",
  "weight_unit": "KILOGRAM"
}
```

### List categories

List the store's categories, or the ones inside a category.

**Inputs**

- Keyword (`keyword`, text): Words to look for in names and descriptions.
- Inside (`parent_id`, text): Only the categories directly inside this one.
- Include hidden (`include_hidden`, true/false): Also list categories hidden from the store.
- How many (`limit`, number): The most to list, from 1 to 100. Defaults to 25. From 1 to 100.
- Skip (`offset`, number): How many to skip, to read the next page: the 'next_offset' of the step before. Leave blank for the first page. At least 0.

**Outputs**

- `categories` (list): The categories
- `count` (number): How many are listed here
- `next_offset` (number): What to put in 'Skip' to read the next page; 0 when this is the last
- `total` (number): How many match in all

**Example output**

```json
{
  "categories": [
    {
      "description": "",
      "enabled": true,
      "id": 9691094,
      "name": "Fruit",
      "parent_id": 0,
      "product_count": 6,
      "url": "https://mdemo.ecwid.com/products/Fruit"
    }
  ],
  "count": 1,
  "next_offset": 0,
  "total": 1
}
```

### Search customers

Find customers by name, email, group or sign-up date. Leave every field blank to list them all.

**Inputs**

- Keyword (`keyword`, text): Words to look for in their name or email.
- Email (`email`, text): The customer with exactly this email.
- Customer group (`customer_group`, text): Only customers in this group.
- Registered after (`registered_after`, date and time): Only customers who registered or first ordered after this.
- Marketing emails (`accepts_marketing`, text): Only customers who accept marketing emails, or only those who don't. One of: `yes` (Accepts marketing emails), `no` (Doesn't accept marketing emails).
- Order (`sort_by`, text): How to sort them. One of: `REGISTERED_DATE_DESC` (Newest first), `REGISTERED_DATE_ASC` (Oldest first), `UPDATED_DATE_DESC` (Recently changed first), `NAME_ASC` (Name, A to Z), `EMAIL_ASC` (Email, A to Z), `ORDER_COUNT_DESC` (Most orders first), `SALES_VALUE_DESC` (Most spent first), `LAST_ORDER_DATE_DESC` (Ordered most recently first).
- How many (`limit`, number): The most to list, from 1 to 100. Defaults to 25. From 1 to 100.
- Skip (`offset`, number): How many to skip, to read the next page: the 'next_offset' of the step before. Leave blank for the first page. At least 0.

**Outputs**

- `count` (number): How many are listed here
- `customers` (list): The customers found
- `next_offset` (number): What to put in 'Skip' to read the next page; 0 when this is the last
- `total` (number): How many match in all

**Example output**

```json
{
  "count": 1,
  "customers": [
    {
      "accepts_marketing": false,
      "billing_address": {
        "city": "",
        "company": "",
        "country": "",
        "name": "Support team",
        "phone": "",
        "postal_code": "",
        "state": "",
        "street": ""
      },
      "email": "ec.apps@lightspeedhq.com",
      "first_name": "Support",
      "group_id": 0,
      "group_name": "General",
      "id": 177737165,
      "last_name": "team",
      "name": "Support team",
      "order_count": 0,
      "private_notes": "",
      "registered_at": "2021-12-21T06:05:58Z",
      "sales_value": 0,
      "tax_exempt": false,
      "updated_at": "2024-06-04T21:15:10Z"
    }
  ],
  "next_offset": 0,
  "total": 1
}
```

### Search discount coupons

Find discount coupons by code, status, type or date. Leave every field blank to list them all.

**Inputs**

- Code (`code`, text): The coupon's code, such as SUMMER10.
- Status (`status`, text): Only coupons in this state. One of: `ACTIVE`, `PAUSED`, `EXPIRED`, `USEDUP` (Used up).
- Discount type (`discount_type`, text): Only coupons of this kind. One of: `PERCENT` (Percent off), `ABS` (Amount off), `SHIPPING` (Free shipping), `PERCENT_AND_SHIPPING` (Percent off and free shipping), `ABS_AND_SHIPPING` (Amount off and free shipping).
- Made after (`created_after`, date and time): Only coupons made after this.
- How many (`limit`, number): The most to list, from 1 to 100. Defaults to 25. From 1 to 100.
- Skip (`offset`, number): How many to skip, to read the next page: the 'next_offset' of the step before. Leave blank for the first page. At least 0.

**Outputs**

- `count` (number): How many are listed here
- `coupons` (list): The discount coupons found
- `next_offset` (number): What to put in 'Skip' to read the next page; 0 when this is the last
- `total` (number): How many match in all

**Example output**

```json
{
  "count": 1,
  "coupons": [
    {
      "application_limit": "UNLIMITED",
      "category_ids": [],
      "code": "DISC",
      "created_at": "2022-07-29T15:22:35Z",
      "discount": 10,
      "discount_type": "PERCENT",
      "expiration_date": "",
      "id": 162428889,
      "launch_date": "2022-07-28T23:00:00Z",
      "minimum_subtotal": null,
      "name": "10% OFF",
      "order_count": 1,
      "product_ids": [],
      "status": "ACTIVE",
      "updated_at": "2024-05-01T05:26:28Z",
      "uses_limit": "UNLIMITED"
    }
  ],
  "next_offset": 0,
  "total": 1
}
```

### Search orders

Find orders by customer, status, date or total. Leave every field blank to list all orders.

**Inputs**

- Keywords (`keywords`, text): Words to look for in the order: its ID, the customer's email or address, an item's name or SKU, or a tracking number.
- Customer email (`email`, text): Only this customer's orders.
- Customer ID (`customer_id`, text): Only this customer's orders, by their ID.
- Payment status (`payment_status`, list): Only orders with one of these payment statuses.
- Fulfillment status (`fulfillment_status`, list): Only orders with one of these fulfillment statuses.
- Placed after (`placed_after`, date and time): Only orders placed after this.
- Placed before (`placed_before`, date and time): Only orders placed before this.
- Changed after (`updated_after`, date and time): Only orders changed after this.
- Minimum total (`min_total`, number): Only orders worth at least this. At least 0.
- Maximum total (`max_total`, number): Only orders worth at most this. At least 0.
- How many (`limit`, number): The most to list, from 1 to 100. Defaults to 25. From 1 to 100.
- Skip (`offset`, number): How many to skip, to read the next page: the 'next_offset' of the step before. Leave blank for the first page. At least 0.

**Outputs**

- `count` (number): How many are listed here
- `next_offset` (number): What to put in 'Skip' to read the next page; 0 when this is the last
- `orders` (list): The orders found
- `total` (number): How many match in all

**Example output**

```json
{
  "count": 1,
  "next_offset": 0,
  "orders": [
    {
      "billing_address": {
        "city": "San Diego",
        "company": "Hedgehog and Bucket",
        "country": "US",
        "name": "Eugene K",
        "phone": "123141321",
        "postal_code": "90002",
        "state": "CA",
        "street": "My Street"
      },
      "coupon_code": "",
      "coupon_discount": 0,
      "created_at": "2015-09-20T19:59:43Z",
      "customer_id": 270919557,
      "customer_name": "Eugene K",
      "discount": 0,
      "email": "ec.apps@lightspeedhq.com",
      "fulfillment_status": "AWAITING_PROCESSING",
      "id": "XJ12H",
      "internal_id": 212398840,
      "items": [
        {
          "name": "Cherry",
          "options": [],
          "price": 15,
          "product_id": 439710255,
          "quantity": 2,
          "sku": "00004"
        }
      ],
      "order_comments": "",
      "payment_method": "Phone order",
      "payment_status": "PAID",
      "private_notes": "Must be delivered till Sunday.",
      "shipping_address": {
        "city": "San Diego",
        "company": "Hedgehog and Bucket",
        "country": "US",
        "name": "Eugene K",
        "phone": "123141321",
        "postal_code": "90002",
        "state": "CA",
        "street": "My Street"
      },
      "shipping_method": "Fast Delivery",
      "subtotal": 30,
      "tax": 0,
      "total": 40,
      "tracking_number": "",
      "updated_at": "2015-09-20T19:59:43Z"
    }
  ],
  "total": 1
}
```

### Search products

Find products by keyword, SKU, category, stock or date. Leave every field blank to list the catalog.

**Inputs**

- Keyword (`keyword`, text): Words to look for in names, descriptions, SKUs and options. End it with * to match the start of a word.
- SKU (`sku`, text): The product, or variation, with exactly this SKU. Other filters are then ignored.
- Category (`category_id`, text): Only products in this category.
- Visibility (`visibility`, text): Only products shown in the store, or only hidden ones. One of: `visible` (Shown in the store), `hidden` (Hidden from the store).
- Stock (`stock`, text): Only products in stock, or only out of stock. One of: `instock` (In stock), `outofstock` (Out of stock).
- Added after (`created_after`, date and time): Only products added after this.
- Changed after (`updated_after`, date and time): Only products changed after this.
- Order (`sort_by`, text): How to sort them. Defaults to best match. One of: `ADDED_TIME_DESC` (Newest first), `ADDED_TIME_ASC` (Oldest first), `UPDATED_TIME_DESC` (Recently changed first), `NAME_ASC` (Name, A to Z), `NAME_DESC` (Name, Z to A), `PRICE_ASC` (Price, low to high), `PRICE_DESC` (Price, high to low), `RELEVANCE` (Best match for the keyword).
- How many (`limit`, number): The most to list, from 1 to 100. Defaults to 25. From 1 to 100.
- Skip (`offset`, number): How many to skip, to read the next page: the 'next_offset' of the step before. Leave blank for the first page. At least 0.

**Outputs**

- `count` (number): How many are listed here
- `next_offset` (number): What to put in 'Skip' to read the next page; 0 when this is the last
- `products` (list): The products found
- `total` (number): How many match in all

**Example output**

```json
{
  "count": 1,
  "next_offset": 0,
  "products": [
    {
      "category_ids": [
        9691094
      ],
      "compare_to_price": null,
      "created_at": "2024-09-04T07:20:11Z",
      "description": "",
      "enabled": true,
      "id": 692730761,
      "in_stock": true,
      "low_stock_level": 1,
      "name": "Toys",
      "price": 10,
      "quantity": 10,
      "sku": "123123",
      "unlimited_stock": false,
      "updated_at": "2024-09-04T07:20:12Z",
      "url": "https://store1003.company.site/products/toys-692730761",
      "weight": null
    }
  ],
  "total": 1
}
```

### Update customer

Change a customer's details, address or group. Fields left blank keep what they have.

**Inputs**

- Customer ID (`customer_id`, text, required): The customer's ID, a number such as 177737165, from the trigger or another Ecwid step.
- Email (`email`, text): A new email address. Leave blank to keep theirs.
- Name (`name`, text): Their full name, such as Ada Lovelace.
- Company (`company`, text): Their company's name.
- Phone (`phone`, text): Their phone number.
- Street (`street`, text): The street address. Put a second line on a new line.
- City (`city`, text): The city.
- Postal code (`postal_code`, text): The postal or ZIP code.
- State (`state`, text): The state or province code, such as CA or NY.
- Country (`country`, text): The country.
- Customer group (`customer_group`, text): The group they belong to, such as Wholesale.
- Marketing emails (`accepts_marketing`, text): Whether they agreed to receive marketing emails. One of: `yes` (Accepts marketing emails), `no` (Doesn't accept marketing emails).
- Private notes (`private_notes`, text): Notes about them only the store sees.

**Outputs**

- `accepts_marketing` (true/false): Whether they accept marketing emails
- `billing_address` (object): Their billing name, address and phone
- `email` (text): Their email
- `first_name` (text): Their first name
- `group_id` (number): Their customer group's ID; 0 for General
- `group_name` (text): Their customer group's name
- `id` (number): The customer's ID
- `last_name` (text): Their last name
- `name` (text): Their full name
- `order_count` (number): How many orders they've placed
- `private_notes` (text): The store's private notes on them
- `registered_at` (text): When they registered or first ordered (ISO 8601)
- `sales_value` (number): The total of their orders
- `tax_exempt` (true/false): Whether they are tax exempt
- `updated_at` (text): When their details last changed (ISO 8601)

**Example output**

```json
{
  "accepts_marketing": false,
  "billing_address": {
    "city": "",
    "company": "",
    "country": "",
    "name": "Support team",
    "phone": "",
    "postal_code": "",
    "state": "",
    "street": ""
  },
  "email": "ec.apps@lightspeedhq.com",
  "first_name": "Support",
  "group_id": 0,
  "group_name": "General",
  "id": 177737165,
  "last_name": "team",
  "name": "Support team",
  "order_count": 0,
  "private_notes": "",
  "registered_at": "2021-12-21T06:05:58Z",
  "sales_value": 0,
  "tax_exempt": false,
  "updated_at": "2024-06-04T21:15:10Z"
}
```

### Update discount coupon

Change a discount coupon, such as pausing it or changing its discount. Fields left blank keep what it has.

**Inputs**

- Coupon ID (`coupon_id`, text, required): The coupon's ID, a number such as 162428889, from 'Search discount coupons' or 'Create discount coupon'.
- Name (`name`, text): What the coupon is called in the Ecwid admin. Leave blank to keep it.
- Code (`code`, text): What customers type at checkout, such as SUMMER10. Leave blank to keep it.
- Discount type (`discount_type`, text): What it takes off. Leave blank to keep it. One of: `PERCENT` (Percent off), `ABS` (Amount off), `SHIPPING` (Free shipping), `PERCENT_AND_SHIPPING` (Percent off and free shipping), `ABS_AND_SHIPPING` (Amount off and free shipping).
- Discount (`discount`, number): How much it takes off: a percent, such as 10, or an amount in the store's currency. Not needed for free shipping. Leave blank to keep it. At least 0.
- Status (`status`, text): Pause it, or make it active again. Leave blank to keep it. One of: `ACTIVE`, `PAUSED`.
- Starts (`launch_date`, date and time): When it starts working. Leave blank to keep it.
- Ends (`expiration_date`, date and time): When it stops working. Leave blank to keep it.
- Minimum order (`minimum_subtotal`, number): The smallest order subtotal it works on. Leave blank to keep it. At least 0.
- How often it can be used (`uses_limit`, text): How many times it can be used. Leave blank to keep it. One of: `UNLIMITED` (As often as customers like), `ONCEPERCUSTOMER` (Once per customer), `SINGLE` (Once, by one customer).
- Who can use it (`application_limit`, text): Which customers can use it. Leave blank to keep it. One of: `UNLIMITED` (Any customer), `NEW_CUSTOMER_ONLY` (New customers only), `REPEAT_CUSTOMER_ONLY` (Returning customers only).
- Categories (`category_ids`, list): Only products in these categories get the discount. Replaces its categories; leave blank to keep them.

**Outputs**

- `application_limit` (text): UNLIMITED, NEW_CUSTOMER_ONLY or REPEAT_CUSTOMER_ONLY
- `category_ids` (list): The only categories it applies to; empty for all
- `code` (text): The code customers enter at checkout
- `created_at` (text): When it was made (ISO 8601)
- `discount` (number): How much it takes off
- `discount_type` (text): What it takes off, such as PERCENT or ABS
- `expiration_date` (text): When it stops working (ISO 8601); empty if never
- `id` (number): The coupon's ID
- `launch_date` (text): When it starts working (ISO 8601); empty if not set
- `minimum_subtotal` (number): The smallest order subtotal it applies to; empty if any
- `name` (text): Its name
- `order_count` (number): How many orders have used it
- `product_ids` (list): The only products it applies to; empty for all
- `status` (text): ACTIVE, PAUSED, EXPIRED or USEDUP
- `updated_at` (text): When it last changed (ISO 8601)
- `uses_limit` (text): UNLIMITED, ONCEPERCUSTOMER or SINGLE

**Example output**

```json
{
  "application_limit": "UNLIMITED",
  "category_ids": [],
  "code": "DISC",
  "created_at": "2022-07-29T15:22:35Z",
  "discount": 10,
  "discount_type": "PERCENT",
  "expiration_date": "",
  "id": 162428889,
  "launch_date": "2022-07-28T23:00:00Z",
  "minimum_subtotal": null,
  "name": "10% OFF",
  "order_count": 1,
  "product_ids": [],
  "status": "ACTIVE",
  "updated_at": "2024-05-01T05:26:28Z",
  "uses_limit": "UNLIMITED"
}
```

### Update order

Change an order's payment or fulfillment status, such as marking it paid or shipped, add a tracking number or a private note. Fields left blank keep what it has.

**Inputs**

- Order ID (`order_id`, text, required): The order's ID as customers see it, such as XJ12H, from the trigger or another Ecwid step.
- Payment status (`payment_status`, text): Its new payment status, such as Paid.
- Fulfillment status (`fulfillment_status`, text): Its new fulfillment status, such as Shipped.
- Tracking number (`tracking_number`, text): The shipment's tracking number.
- Private notes (`private_notes`, text): A note on the order only the store sees. Replaces the note it has.

**Outputs**

- `billing_address` (object): The billing name and address
- `coupon_code` (text): The discount coupon used; empty if none
- `coupon_discount` (number): What the discount coupon took off
- `created_at` (text): When it was placed (ISO 8601)
- `customer_id` (number): The customer's ID; 0 for a guest
- `customer_name` (text): The customer's name, from the billing address
- `discount` (number): The discount Ecwid records on the order, from promotions
- `email` (text): The customer's email
- `fulfillment_status` (text): Its fulfillment status, such as SHIPPED
- `id` (text): The order's ID, as customers see it, such as XJ12H
- `internal_id` (number): Ecwid's internal number for the order
- `items` (list): What was ordered
- `order_comments` (text): The customer's comments at checkout
- `payment_method` (text): The payment method chosen at checkout
- `payment_status` (text): Its payment status, such as PAID
- `private_notes` (text): The store's private notes on the order
- `shipping_address` (object): Where it ships to
- `shipping_method` (text): The shipping option chosen at checkout
- `subtotal` (number): The cost of the items, before anything else
- `tax` (number): The taxes on the order
- `total` (number): The order total, with shipping, taxes and discounts
- `tracking_number` (text): The shipment's tracking number
- `updated_at` (text): When it last changed (ISO 8601)

**Example output**

```json
{
  "billing_address": {
    "city": "San Diego",
    "company": "Hedgehog and Bucket",
    "country": "US",
    "name": "Eugene K",
    "phone": "123141321",
    "postal_code": "90002",
    "state": "CA",
    "street": "My Street"
  },
  "coupon_code": "",
  "coupon_discount": 0,
  "created_at": "2015-09-20T19:59:43Z",
  "customer_id": 270919557,
  "customer_name": "Eugene K",
  "discount": 0,
  "email": "ec.apps@lightspeedhq.com",
  "fulfillment_status": "AWAITING_PROCESSING",
  "id": "XJ12H",
  "internal_id": 212398840,
  "items": [
    {
      "name": "Cherry",
      "options": [],
      "price": 15,
      "product_id": 439710255,
      "quantity": 2,
      "sku": "00004"
    }
  ],
  "order_comments": "",
  "payment_method": "Phone order",
  "payment_status": "PAID",
  "private_notes": "Must be delivered till Sunday.",
  "shipping_address": {
    "city": "San Diego",
    "company": "Hedgehog and Bucket",
    "country": "US",
    "name": "Eugene K",
    "phone": "123141321",
    "postal_code": "90002",
    "state": "CA",
    "street": "My Street"
  },
  "shipping_method": "Fast Delivery",
  "subtotal": 30,
  "tax": 0,
  "total": 40,
  "tracking_number": "",
  "updated_at": "2015-09-20T19:59:43Z"
}
```

### Update product

Change a product's name, price, stock, categories or visibility. Fields left blank keep what it has.

**Inputs**

- Product ID (`product_id`, text, required): The product's ID, a number such as 692730761, from the trigger or another Ecwid step.
- Name (`name`, text): What the product is called. Leave blank to keep it.
- Price (`price`, number): Its price, such as 12.50, in the store's currency. Leave blank to keep it. At least 0.
- SKU (`sku`, text): A new SKU. Leave blank to keep it.
- Description (`description`, text): What it is. HTML such as <b>bold</b> is kept. Leave blank to keep it.
- Stock (`quantity`, number): Set the stock to this many, which turns on stock tracking. To add or take away, use 'Adjust product stock'. At least 0.
- Stock tracking (`stock_tracking`, text): Track this product's stock, or make it unlimited. Leave blank to keep it as it is. One of: `track` (Track stock), `unlimited` (Unlimited stock).
- Low stock level (`low_stock_level`, number): Ecwid emails the store when stock falls to this many. Leave blank to keep it. At least 0.
- Compare-to price (`compare_to_price`, number): The price before the sale, shown struck through. Leave blank to keep it. At least 0.
- Weight (`weight`, number): Its weight, in the store's weight unit. Leave blank to keep it. At least 0.
- Categories (`category_ids`, list): The categories it's in. Replaces its categories; leave blank to keep them.
- Visibility (`visibility`, text): Whether it shows in the store. Leave blank to keep it. One of: `visible` (Shown in the store), `hidden` (Hidden from the store).

**Outputs**

- `category_ids` (list): The categories it's in
- `compare_to_price` (number): The price before the sale, shown struck through; empty if none
- `created_at` (text): When it was added (ISO 8601)
- `description` (text): Its description, in HTML
- `enabled` (true/false): Whether it shows in the store
- `id` (number): The product's ID
- `in_stock` (true/false): Whether it, or one of its variations, is in stock
- `low_stock_level` (number): The stock level that counts as low; empty if not set
- `name` (text): Its name
- `price` (number): Its price, before options and taxes
- `quantity` (number): How many are in stock; empty when stock is unlimited
- `sku` (text): Its SKU
- `unlimited_stock` (true/false): Whether its stock is unlimited
- `updated_at` (text): When it last changed (ISO 8601)
- `url` (text): Its page in the store
- `weight` (number): Its weight; empty if not set

**Example output**

```json
{
  "category_ids": [
    9691094
  ],
  "compare_to_price": null,
  "created_at": "2024-09-04T07:20:11Z",
  "description": "",
  "enabled": true,
  "id": 692730761,
  "in_stock": true,
  "low_stock_level": 1,
  "name": "Toys",
  "price": 10,
  "quantity": 10,
  "sku": "123123",
  "unlimited_stock": false,
  "updated_at": "2024-09-04T07:20:12Z",
  "url": "https://store1003.company.site/products/toys-692730761",
  "weight": null
}
```
