Skip to main content
Scopes: read_products to read, write_products to change (it includes read_products). The same scopes cover categories.

The product

The full list of fields is on Get a product. A few names differ from the dashboard’s: Apps never see the product’s cost, its pixel price and ad pixels, the cloaking and fake stock settings, the landing page sections, the drop-shipping settings, the custom currency, a digital product’s codes and links, or whether the product waits for a content review. Reviews have their own endpoints.

Lists and joins

List products leaves out each product’s description: read it with Get a product. Both take join, comma-separated:
  • options adds options,
  • variants adds variants,
  • categories adds category_ids.
Without a join, those fields are left out. Writes always answer with all three. Options, their values and variants have no set order.

HTML descriptions

description is HTML. Before it is saved, it is cleaned to a fixed list, and the cleaned HTML is what the product answers and the storefront shows. Anything else is removed, keeping its text; script and style go with their content. So style attributes, event handlers, forms, other iframes, relative URLs and data: images are all removed. Invalid UTF-8 or a NUL character is refused (422, rule text). The description has no limit of its own, only the product’s 50 KB.

Options and variants

Options are what the shopper picks, such as size or color: up to 3, each with 1 to 100 values. An option’s type says how the storefront draws its values: button (a label), color (a #rgb or #rrggbb color) or image (an https image URL). Variants are the combinations, each with its own price and stock: up to 100. A variant’s options names one value of every option, by name, and no two variants name the same values:
On a write:
  • options replaces every option of the product, and must come with variants in the same request. Variants sent alone are checked against the product’s current options.
  • variants lists every variant the product keeps, matched by id:
    • a variant with an id is updated in place and keeps its ID, which orders point at;
    • a variant without an id is created;
    • a variant you leave out is deleted. One that an order’s cart item points at is only unlinked from the product, so the order still reads it.
  • Each variant and option is sent whole: a field you leave out takes its empty value (0, "", false), not the current one.
  • An id that is not one of the product’s variants is refused (422, rule variant). On create, send no id.
images and category_ids also replace the product’s whole list. category_ids takes up to 50 categories of the store.

Stock

quantity is the product’s stock; each variant has its own. Set it with quantity in a PATCH, or add and take away with Adjust stock, which changes it in one step so adjustments that meet are all counted. Stock stays from 0 to 1,000,000,000.

Size

A product is limited to keep the storefront fast: Numbers and flags don’t count toward the product’s size. A product made larger than 50 KB in the dashboard can still be changed, as long as your change does not make it larger.

Creating products

  • name, price and thumb are required. Without a slug, one is made from the name.
  • A store with unpaid dues cannot get new products: 402 store_overdue.
  • Each product created charges the store its import fee, as importing products from the dashboard does.
  • source_app is set to your app’s name.

Content review

The name, description and meta description of a product go through the same automatic content review as the dashboard’s, on create and on every change to them. Content it flags goes to EasyOrders’ review team. The write still succeeds, and the flag is not part of the API: your app cannot read it or clear it. Content is also flagged when the review fails, and without a review past its budget: 20 reviews a minute per store, and 200 a minute per app across its stores, shared with pages and articles.

Digital products

is_digital: true products are sold as codes or links (digital_type). Apps cannot create one, and their codes and links are never shown. An app can change their other fields, but:
  • a digital product has no options or variants (422, rule digital);
  • the stock of one sold as code is the number of codes left, so quantity, track_stock and disable_orders_for_no_stock cannot change (422, rule digital), and its stock cannot be adjusted (409 stock_follows_codes).

Deleting

Delete a product removes it from lists and reads (404). It cannot be restored through the API.

Changes and events

The storefront shows a change right away. Creating, changing, adjusting and deleting a product send the products/created, products/updated and products/deleted events; a PATCH that changes nothing sends none.