import { Blob } from 'buffer'; interface Category { /** Internal unique category ID. */ id: number; /** ID of the parent category, if any. */ parentId: number; /** Sorting order of the category. Starts from `10` and increments by `10`. */ orderBy: number; /** Link to the category image resized to fit 800x800px container. */ hdThumbnailUrl: string; /** Link to the category image resized to fit 400x400px container. */ thumbnailUrl: string; /** Link to the category image resized to fit 1200x1200px container. */ imageUrl: string; /** Link to the full-sized category image. */ originalImageUrl: string; /** Image ID for Lightspeed R-Series/X-Series image sync. */ imageExternalId: string; /** Category name visible on the storefront. */ name: string; /** Available translations for the category name. */ nameTranslated?: Translations; /** Details of the category image. */ originalImage: CategoryImage; /** Details of the category thumbnail. */ thumbnail: CategoryImage; /** * Internal field that defines category origin inside Lightspeed. * * One of: `LIGHTSPEED`, `ECWID`, `X-SERIES` */ origin: string; /** Full URL of the category page on the storefront. */ url: string; /** Autogenerated slug for the category page URL. */ autogeneratedSlug: string; /** Custom slug for the category page URL. */ customSlug: string; /** Number of products in the category and its subcategories. */ productCount: number; /** * Number of enabled products in the category (excluding any subcategories). * * @remarks * Requires the `productIds=true` query param. */ enabledProductCount: number; /** Category description in HTML format. */ description?: string; /** Available translations for the category description. */ descriptionTranslated?: Translations; /** * `true` if the category is enabled, `false` otherwise. * * @remarks * Use `hidden_categories` in request to get disabled categories. */ enabled: boolean; /** * IDs of products assigned to the category as they appear in Ecwid admin > Catalog > Categories. * * @remarks * Requires `productIds=true` query param. */ productIds: number[]; /** SEO page title for web search results. Recommended length is under 55 characters. */ seoTitle: string; /** SEO page title translations. */ seoTitleTranslated: Translations; /** SEO page description for web search results. Recommended length is under 160 characters. */ seoDescription: string; /** SEO page description translations. */ seoDescriptionTranslated: Translations; /** Alt texts of a category image. */ alt: CategoryImageAlt; /** * Internal field for Lightspeed X-Series connection. * This ID is unique for each category in one store. */ externalReferenceId: string; } interface CategoryImage { /** Image URL */ url: string; /** Image width */ width: number; /** Image height */ height: number; } interface CategoryImageAlt { /** Image description for the "alt" HTML attribute of the image. */ main: string; /** Available translations for the "alt" text. */ translations: Translations; } /** * Response type for the searchCategories request. * * @see {@link https://docs.ecwid.com/api-reference/rest-api/categories/search-categories#response-json | Ecwid API Documentation} */ type SearchCategoriesResponse = PaginatedResponse; /** * Parameters for the searchCategories request. * * @see {@link https://docs.ecwid.com/api-reference/rest-api/categories/search-categories#query-params | Ecwid API Documentation} */ type SearchCategoriesParams = AsQueryParams<{ /** * A keyword to search for in category names. * * @remarks * If this field is specified, search result will contain only categories with names containing the specified keyword. */ keyword?: string; /** * Parent category ID. * * @remarks * If specified, the response will contain only categories that belong inside the specified one. */ parent?: number; /** * Comma-separated list of parent category identifiers for descendants search. * * @remarks * If both `parent` and `parentIds` are specified, Ecwid API makes a search using the joined list of category IDs from both fields. */ parentIds?: string; /** * Flag indicating whether only direct or all descendants should be included in response. * * @remarks * - `false` (default): only direct descendants of categories in `parent` and `parentIds` parameters are returned. * - `true`: all descendants of categories in `parent` and `parentIds` parameters are returned (full categories structure). */ withSubcategories?: boolean; /** * Set `true` to include disabled categories in the response. * * @remarks * If `false` or not specified, only enabled categories are returned. */ hidden_categories?: boolean; /** * List of category identifiers. * * @remarks * If this field is specified, search result will contain only categories with identifiers from the specified list. * * @example "123,456,789" */ categoryIds?: string; /** * Set `true` to include product IDs list for each category. * * @remarks * If `true`, each category in the response will contain a list of product identifiers that belong to it. * * @default false */ productIds?: boolean; /** * Set `true` to fetch enabled products count for each category. * * @remarks * If `true`, each category in the response will include the count of enabled products. * * @default false */ fetchEnabledProductsCount?: boolean; /** * Country code for serving statics from the correct CDN. * * @example "US", "GB", "FR" */ countryCode?: string; /** * Limit to the number of returned items. * * @remarks * Maximum and default value (if not specified) is `100`. */ limit?: number; /** * Offset from the beginning of the returned items list. * * @remarks * Used when the response contains more items than `limit` allows to receive in one request. */ offset?: number; /** * The language in which to get the translation of the entity. * * @remarks * Language ISO code for translations in JSON response. If not specified, the default store language is used. * * @example "en", "nl", "fr" */ lang?: string; /** * Specify the exact fields to receive in response JSON. * * @remarks * If not specified, the response JSON will have all available fields for the entity. */ responseFields?: string; }>; /** * Response type for the searchCategoriesByPath request. * * @see {@link https://docs.ecwid.com/api-reference/rest-api/categories/search-categories-by-path#response-json | Ecwid API Documentation} */ type SearchCategoriesByPathResponse = PaginatedResponse; /** * Parameters for the searchCategoriesByPath request. * * @see {@link https://docs.ecwid.com/api-reference/rest-api/categories/search-categories-by-path#query-params | Ecwid API Documentation} */ type SearchCategoriesByPathParams = AsQueryParams<{ /** * Full path to the category being searched. * * @remarks * Spaces around the delimiter and empty path elements are ignored. * * @example "Electronics/Computers/Laptops" */ path: string; /** * Delimiter used to separate path elements. * * @remarks * A string of 1 or more characters used as a path delimiter. * * @example "/", ">", " > " */ delimiter: string; /** Search term for category name and description. */ keyword?: string; /** * Parent category ID. * * @remarks * If specified, the response will contain only categories that belong inside the specified one. */ parent?: number; /** Set `true` to include disabled categories. */ hidden_categories?: boolean; /** * Set base URL for URLs in response. * * @remarks * If not specified, Ecwid uses the store URL from general settings. */ baseUrl?: string; /** * Set `true` to force receiving clean URLs – catalog links without hashbang (/#!/). * * @remarks * If not specified, Ecwid checks URL settings automatically and responds with matching URLs. */ cleanURLs?: boolean; /** Set `true` to receive category page links without IDs. * * @remarks * If not specified, Ecwid checks URL settings automatically and responds with matching URLs. */ slugsWithoutIds?: boolean; /** * Country code for serving statics from the correct CDN. * * @example "US", "GB", "FR" */ countryCode?: string; /** * Limit to the number of returned items. * * @remarks * Maximum and default value (if not specified) is `100`. */ limit?: number; /** * Offset from the beginning of the returned items list. * * @remarks * Used when the response contains more items than `limit` allows to receive in one request. */ offset?: number; /** * The language in which to get the translation of the entity. * * @remarks * Language ISO code for translations in JSON response. If not specified, the default store language is used. * * @example "en", "nl", "fr" */ lang?: string; /** * Specify the exact fields to receive in response JSON. * * @remarks * If not specified, the response JSON will have all available fields for the entity. */ responseFields?: string; }>; interface LowestPriceSettings { /** Defines if the lowest price is enabled for the product and shown on the storefront. */ lowestPriceEnabled: boolean; /** Manually entered lowest price for the last 30 days before any discounts or taxes applied. */ manualLowestPrice: number; /** `manualLowestPrice` with taxes applied. */ defaultDisplayedManualLowestPrice: number; /** Formatted display of `defaultDisplayedManualLowestPrice` using store format settings. */ defaultDisplayedManualLowestPriceFormatted: string; /** Automatically calculated lowest price for the last 30 days before any discounts or taxes applied. */ automaticLowestPrice: number; /** `automaticLowestPrice` with taxes applied. */ defaultDisplayedAutomaticLowestPrice: number; /** Formatted display of `defaultDisplayedAutomaticLowestPrice` using store format settings. */ defaultDisplayedAutomaticLowestPriceFormatted: string; } type ProductAttributeVisibility = 'NOTSHOW' | 'DESCR' | 'PRICE'; type ProductAttributeType = 'CUSTOM' | 'UPC' | 'BRAND' | 'GENDER' | 'AGE_GROUP' | 'COLOR' | 'SIZE' | 'TAGS' | 'PRICE_PER_UNIT' | 'UNITS_IN_PRODUCT'; interface ProductAttribute { /** Internal attribute ID. */ id: number; /** Attribute name visible on the storefront. */ name: string; /** Available translations for the attribute name. */ nameTranslated: Translations; /** Value of the attribute for this product. */ value: string; /** Available translations for the attribute value. */ valueTranslated: Translations; /** * Type of the product attribute that defines its functionality. * * @remarks * Attributes of type `PRICE_PER_UNIT` and `UNITS_IN_PRODUCT` are only available if the price-per-unit feature is enabled. */ type: ProductAttributeType; /** * Defines if an attribute is visible on a product page. * * @remarks * The value `PRICE` = `DESCR`. For public tokens, `NOTSHOW` attributes are not returned. */ show: ProductAttributeVisibility; } interface ProductBrand { /** Brand name visible on the storefront. */ name: string; /** Available translations for the brand name. */ nameTranslated: Translations; /** * Link to your website's search page with applied brand filter. * * Page will show all products related to the brand. */ productsFilteredByBrandUrl: string; } interface ProductCategory { /** Internal category ID. */ id: number; /** Category name. */ name: string; /** * Translated category name. Uses first non-default store language if possible. * Otherwise, copies category name in the default store language. * */ nameTranslated: Translations; /** Defines if the category is enabled. */ enabled: boolean; } interface ProductCombinationOption { /** Name of the selected option. */ name: string; /** Available translations for the product option name. */ nameTranslated: Translations; /** Value of the selected option. */ value: string; /** Available translations for the product option value. */ valueTranslated: Translations; } interface ProductCombination { /** Internal ID for the product variation. */ id: number; /** * Ordered variation number displayed in Ecwid admin. * * Starts with `1` and iterates by 1. */ combinationNumber: number; /** Set of selected product option values that identify this variation. */ options: ProductCombinationOption[]; /** * Variation SKU. * * If empty, inherits the base product's SKU. */ sku: string; /** Link to the variation image resized to fit 400x400px container. */ thumbnailUrl: string; /** Link to the variation image resized to fit 1200x1200px container. */ imageUrl: string; /** Link to the variation image resized to fit 160x160px container. */ smallThumbnailUrl: string; /** Link to the variation image resized to fit 800x800px container. */ hdThumbnailUrl: string; /** Link to the full-sized variation image. */ originalImageUrl: string; /** Defines if the variation is in stock (`quantity` is more than 0). */ inStock: boolean; /** * Number of variation items in stock. * * @remarks * If the variation has unlimited stock (`unlimited` is `true`), this field is not returned. */ quantity: number; /** Defines if the variation has unlimited stock. */ unlimited: boolean; /** Base variation price without any modifiers. */ price: number; /** * Variation price as it's shown on the storefront for logged out customers with default location (store location). * * @remarks * Pre-selected product options or variations modify the price. Includes taxes. */ defaultDisplayedPrice: number; /** * Formatted variant (curency symbol and delimeter settings) of `defaultDisplayedPrice` based on the store's format settings. * * @remarks * For example, `€11,00` */ defaultDisplayedPriceFormatted: string; /** Variation's lowest price for EU store. */ lowestPrice: number; /** * Variation's lowest price settings contain only one field: `lowestPriceEnabled`. * * @remarks * It defines if the lowest price is enabled for the variation. */ lowestPriceSettings: LowestPriceSettings; /** * Variation's lowest price as it's shown on the storefront for logged out customers with default location (store location). * Includes taxes. */ defaultDisplayedLowestPrice: number; /** * Formatted variant (curency symbol and delimeter settings) of `defaultDisplayedLowestPrice` based on the store's format settings. * * @example * "€11,00" */ defaultDisplayedLowestPriceFormatted: string; /** Variation's dimensions. */ dimensions: ProductDimensions; /** Sorted list of wholesale price tiers specific to the variation: "minimum quantity = price" pairs. */ wholesalePrices: WholesalePrice[]; /** Variation's weight for calculating shipping costs. */ weight: number; /** Variation volume for calculations shipping costs, fractional number, `0` by default. */ volume: number; /** Minimum amount of variation in stock to trigger an automated "low stock" email notification for the store owner. */ warningLimit: number; /** List of variation attributes and their values. */ attributes: ProductAttribute[]; /** Pre-sale price for the variation. */ compareToPrice: number; /** * Sets minimum product purchase quantity. * * Default value is `null`. */ minPurchaseQuantity: number; /** * Sets maximum product purchase quantity. * * Default value is `null`. */ maxPurchaseQuantity: number; /** * Defines if a variation is visible and/or can be pre-ordered when out-of-stock. * * Supported values: * - `SHOW` - Show out-of-stock variation, but adding it to the cart is disabled. * - `ALLOW_PREORDER` - Show out-of-stock variation and allow adding it to the cart. * * @remarks * Requires enabled pre-orders on the store level: `allowPreordersForOutOfStockProducts` setting in `/profile` endpoint. */ outOfStockVisibilityBehaviour: string; /** Image description for the "alt" HTML attribute and its translations. */ alt: ProductImageAlt; } interface ProductCompositeComponent { /** ID of the product in this composite product. */ productId: number; /** ID of the product variation in this composite product. */ combinationId: number; /** Quantity of the product or product variation in this composite product. */ quantity: number; } interface ProductDimensions { /** Length of a product for calculating shipping costs. */ length: number; /** Width of a product for calculating shipping costs. */ width: number; /** Height of a product for calculating shipping costs. */ height: number; } interface ProductFavorites { /** Total count the product was added to favorites on the storefront. */ count: number; /** * The number of likes visible on the storefront. * * May differ from the count exceeds `1000` - it will show `1K` instead of the precise number. */ displayedCount: string; } interface ProductFile { /** Internal ID of the file attached to the product. */ id: number; /** File name visible to clients. */ name: string; /** File description visible to clients. */ description: string; /** File size in bytes (64-bit integer). */ size: number; /** * Direct link to the file. Important: to download, append API access token. * * @remarks * Important: to download the file, add your API access token to this URL like this: * https://app.ecwid.com/api/v3/4870020/products/37208340/files/7215102?token=YOUR-API-TOKEN * * Do not share links containing access tokens. */ adminUrl: string; } interface ProductDominatingColor { /** Red channel (from 0 to 255, RGB). */ red: number; /** Green channel (from 0 to 255, RGB). */ green: number; /** Blue channel (from 0 to 255, RGB). */ blue: number; /** Alpha channel (from 0 to 255). */ alpha: number; } interface ProductBorderInfo { /** Border color in RGBa format. */ dominatingColor: ProductDominatingColor; /** Defines if an image is homogeneous. */ homogeneity: boolean; } interface ProductGalleryImage { /** Internal ID for the gallery image. */ id: number; /** Link to the gallery image. */ url: string; /** Link to the gallery image thumbnail resized to fit 160x160px container. */ thumbnail: string; /** Link to the full-sized gallery image. */ originalImageUrl: string; /** Link to the gallery image resized to fit 1200x1200px container. */ imageUrl: string; /** Link to the gallery image thumbnail resized to fit 800x800px container. */ hdThumbnailUrl: string; /** Link to the gallery image thumbnail resized to fit 400x400px container. */ thumbnailUrl: string; /** Link to the gallery image thumbnail resized to fit 160x160px container. */ smallThumbnailUrl: string; /** Width of the full-sized gallery image in px. */ width: number; /** Height of the full-sized gallery image in px. */ height: number; /** * Consecutive number of an image in the gallery. * * Starts with `0` for the first image, then iterates by `1`. */ orderBy: number; /** Details about image border added at the storefront. */ borderInfo: ProductBorderInfo; } /** Details about a product image, typically the main image. */ interface ProductImage { /** Link to the full-size product image. */ url: string; /** Width of the full-size product image in px. */ width: number; /** Height of the full-size product image in px. */ height: number; } interface ProductImageAlt { /** Image description for the "alt" HTML attribute of the image. */ main: string; /** Available translations for the "alt" text. */ translations: Translations; } interface ProductMediaImage { /** Internal image ID in a string format. */ id: string; /** Image description for the "alt" HTML attribute and its translations. */ alt: ProductImageAlt; /** Consecutive number of an image in the gallery. */ orderBy: number; /** Link to the product image resized to fit 160x160px. */ image160pxUrl: string; /** Link to the product image resized to fit 400x400px. */ image400pxUrl: string; /** Link to the product image resized to fit 800x800px. */ image800pxUrl: string; /** Link to the product image resized to fit 1500x1500px. */ image1500pxUrl: string; /** Link to the full-sized product image. */ imageOriginalUrl: string; /** Link to the image ID for Lightspeed R-Series/X-Series image sync. */ imageExternalId: string; } interface ProductMediaVideo { /** Internal video ID. */ id: number; /** Internal ID of the video cover image. */ videoCoverId: number; /** Link to the video file. */ url: string; /** Video embedding code in HTML. */ embedHtml: string; /** Video hosting provider name. */ providerName: string; /** Video title. */ title: string; /** Link to the video cover image resized to fit 160x160px container. */ image160pxUrl: string; /** Link to the video cover image resized to fit 400x400px container. */ image400pxUrl: string; /** Link to the video cover image resized to fit 800x800px container. */ image800pxUrl: string; /** Link to the video cover image resized to fit 1500x1500px container. */ image1500pxUrl: string; /** Link to the full-sized video cover image. */ imageOriginalUrl: string; } /** Contains details about product images and videos. */ interface ProductMedia { /** Details about product images. */ images: ProductMediaImage[]; /** Details about product videos. */ videos: ProductMediaVideo[]; } interface ProductOptionChoice { /** * Text displayed near the option choise or as it at the storefront. * * For example, a text near the radio button or a checkbox, choice name in the dropdown list, etc. */ text: string; /** Available translations for the choice's `text` field. */ textTranslated: Translations; /** * Value of the option's price markup. * * Positive, negative (in case the option reduces the pice) and zero values are allowed. Default is `0`. */ priceModifier: number; /** * Option markup calculation type. * * One of: * - `PERCENT` - price modifier applied as a percent increase to the product price. * - `ABSOLUTE` - price modifier applied as an absolute increase to the product price (default). */ priceModifierType: string; /** * List of HEX codes. * * Defines what color must be displayed when user changes color in the `SWATCHES` option, for example: `["#fff000"]`. * * Requires `useImageAsSwatchSelector` to be `true`. */ hexCodes: string[]; /** * Internal ID of the product image. * * Defines what product image must be displayed when user changes color in the `SWATCHES` option. * * Requires `useImageAsSwatchSelector` to be `true`. */ imageId: string; } interface ProductOption { /** * Option type that defines its functionality. * * One of: * - `SELECT` - Drop-down list with several options. Users can select only one of the options provided. * - `RADIO` - Radio buttons. Users can select only one of the options provided. * - `CHECKBOX` - Checkbox options. Users can select several options at the same time. * - `TEXTFIELD` - Single-line text input field. * - `TEXTAREA` - Multi-lines text input field. * - `DATE` - Date and time selector. * - `FILES` - File uploader for users. * - `SIZE` - Selector for the product sizes. Works the same way as radio buttons. * - `SWATCHES` - Selector for the product colors. Works the same way as radio buttons. */ type: string; /** Product option name. For example: `Color` or `Size`. */ name: string; /** Available translations for the product option name. */ nameTranslated: Translations; /** * List of available option choices for users. * * Only works for the following option types: `SELECT`, `CHECKBOX`, `RADIO`, `SIZE`, or `SWATCHES`. */ choices: ProductOptionChoice[]; /** * Index of the option's default selection. Can be `null` (no default option), otherwise starts with `0`. * * Only works for the following option types: `SELECT`, `CHECKBOX`, `RADIO`, `SIZE`, or `SWATCHES`. */ defaultChoice: number; /** Defines if this option is required to add product to the cart. */ required: boolean; /** * Display mode for the color swatches option. Only works with `SWATCHES` option type. * * One of: * - `true` - show specific product images when a user choses different color at the storefront. * - `false` - show color swatches defines as hex codes when user chooses different color at the storefront. */ useImageAsSwatchSelector: boolean; } interface ProductRelatedCategory { /** Defines if the "N random related products from a category" option is enabled. */ enabled: boolean; /** * ID of the related category. * * Empty value means related products can be from any category. */ categoryId: number; /** Number of random products from the given category. */ productCount: number; } interface ProductRelatedProducts { /** List of related product IDs. */ productIds: number[]; /** Describes the "N random related products from a category" option. */ relatedCategory: ProductRelatedCategory; } interface ProductShipping { /** * One of: `GLOBAL_METHODS`, `SELECTED_METHODS`, `FLAT_RATE`, `FREE_SHIPPING`. * * - `GLOBAL_METHODS` - all standard shipping methods set up in store settings. * - `SELECTED_METHODS` - Ecwid will use {@link enabledMethods} and {@link disabledMethods} list to make shipping calculations. * - `FLAT_RATE` - sets flat rate for product's shipping, {@link flatRate} field. * - `FREE_SHIPPING` - sets free shipping for product's shipping. */ method: string; /** Additional product shipping cost added to any shipping methods. */ methodMarkup: number; /** Flat rate cost for shipping the product. If set, shipping costs for it will not be calculated. */ flatRate: number; /** * IDs of shipping methods that need to be excluded from calculation when this product is in cart. * * Full list of shipping method IDs is available through `getStoreProfile` call. */ disabledMethods: string[]; /** * IDs of shipping methods which will only be shown when this product is in cart. * No other shipping methods will be shown. * * Full list of shipping method IDs is available through `getStoreProfile` call. */ enabledMethods: string[]; } interface ProductRecurringChargeSettings { /** * Charge recurring interval. * * Supported values: `DAY`, `WEEK`, `MONTH`, `YEAR`. */ recurringInterval: string; /** * Charge recurring interval count. * * Supported values: for `DAY` - 1 (daily), for `WEEK` - 1 (weekly), 2 (biweekly), for `MONTH` - 1 (monthly), 3 (quarterly), for `YEAR` - 1 (annually). */ recurringIntervalCount: number; /** The cost of the product for the first subscription order. */ subscriptionPriceWithSignUpFee: number; /** * The cost of the product for the first subscription order. * * Formatted according to the settings for displaying prices in the store. * * Updated automatically when the {@link subscriptionPriceWithSignUpFee} is changed. */ subscriptionPriceWithSignUpFeeFormatted: string; /** The size of the markup that is imposed on the first order. */ signUpFee: number; /** * The size of the markup that is imposed on the first order. * * Formatted according to the settings for displaying prices in the store. * * Updated automatically when the {@link signUpFee} is changed. */ signUpFeeFormatted: string; } interface ProductSubscriptionSettings { /** `true` if the product can be sold as subscription ("Sell as subscription" product setting enabled), `false` otherwise. */ subscriptionAllowed: boolean; /** `true` if the product can be purchased once, with no further charges on a regular basis, `false` otherwise. */ oneTimePurchaseAllowed: boolean; /** The cost of the product by subscription with a one-time purchase, null by default. */ oneTimePurchasePrice: number; /** The cost of the product for a one-time purchase, formatted according to the settings for displaying prices in the store. */ oneTimePurchasePriceFormatted: string; /** * The difference between the price of the product when subscribing and a one-time purchase in absolute values. * * Calculated automatically when {@link oneTimePurchasePrice} that isn’t equal to `price` is set. */ oneTimePurchaseMarkup: number; /** * The difference between the price of the product when subscribing and a one-time purchase in absolute values. * * Formatted according to the settings for displaying prices in the store. * * Updated automatically when the {@link oneTimePurchaseMarkup} is changed. */ oneTimePurchaseMarkupFormatted: string; /** * The difference between the price of the product when subscribing and a one-time purchase as a percentage. * * Calculated automatically when {@link oneTimePurchasePrice} that isn’t equal to `price` is set. */ oneTimePurchaseMarkupPercent: number; /** * The difference between the price of the product when subscribing and a one-time purchase as a percentage. * * Formatted according to the settings for displaying prices in the store. * * Updated automatically when the {@link oneTimePurchaseMarkupPercent} is changed. */ oneTimePurchaseMarkupPercentFormatted: string; /** Recurring charge settings. */ recurringChargeSettings: ProductRecurringChargeSettings; } interface ProductTax { /** Defines if taxes can be applied to the product. */ taxable: boolean; /** * Default tax rate (%) for including into product price. * * It's a sum of all enabled taxes included in product price for the store location. */ defaultLocationIncludedTaxRate: number; /** * List of internal IDs for manual taxes. * * Empty if no manual taxes are enabled or automatic taxes are enabled. */ enabledManualTaxes: number[]; /** * Tax class code for the product that determines the taxability of the products for a certain region. */ taxClassCode: string; } interface ProductType { /** * Internal unique ID of the product type. * * By default, all products get the "General" type which ID is `0`. */ id: number; /** Product type name. Empty for the "General" type. */ name?: string; /** Google taxonomy associated with the type. */ googleTaxonomy?: string; /** Product attributes assigned to this product type. */ attributes?: ProductAttribute[]; } interface Product { /** Internal unique product ID. */ id: number; /** Product SKU. Items with options can have several SKUs specified in the product variations. */ sku: string; /** * Amount of product items in stock. * * @remarks * If product has unlimited stock (`unlimited` is `true`), this field is not returned. */ quantity: number; /** Defines if the product has unlimited stock. */ unlimited: boolean; /** Defines if the product or any of its variations are in stock (quantity is more than `0`). */ inStock: boolean; /** Product name visible on the storefront. */ name: string; /** Available translations for the product name. */ nameTranslated: Translations; /** Base product price without any modifiers. */ price: number; /** * Product price as shown on storefront. * * @remarks * May differ from `price` due to pre-selected options/variations. * Does not include taxes. */ priceInProductList: number; /** * Variation price as it's shown on the storefront for logged out customers with default location (store location). * * @remarks * Pre-selected product options or variations modify the price. Includes taxes. */ defaultDisplayedPrice: number; /** * Formatted variant (curency symbol and delimeter settings) of `defaultDisplayedPrice` based on the store's format settings. * * @remarks * For example, `€11,00` */ defaultDisplayedPriceFormatted: string; /** Purchase price of the product, used for reports and profit calculations. */ costPrice: number; /** Detailed information about product's taxes. */ tax: ProductTax; /** Sorted list of wholesale price tiers: "minimum quantity = price" pairs. */ wholesalePrices: WholesalePrice[]; /** Product pre-sale price with the same value as specified in Ecwid admin (without taxes), e.g. `40`. */ compareToPrice: number; /** * Formatted display of compareToPrice with a currency symbol, e.g. `€44,00`. * * @remarks * Includes taxes when a store uses net prices (prices don't include taxes). * Displayed as strikethrough price on the storefront. */ compareToPriceFormatted: string; /** Discount from the sale price, e.g. `-11`. */ compareToPriceDiscount: number; /** Formatted discount from the sale price, e.g. `€11,00`. */ compareToPriceDiscountFormatted: string; /** Discount percent from the sale price, e.g. `-25`. */ compareToPriceDiscountPercent: number; /** Sale price discount percent (with percent sign), e.g. `-25%`. */ compareToPriceDiscountPercentFormatted: string; /** Product pre-sale price including taxes. e.g. `44`. */ defaultDisplayedCompareToPrice: number; /** * Formatted display of defaultDisplayedCompareToPrice with a currency symbol, e.g. `€44,00`. * * @remarks * Includes taxes when a store uses net prices. Displayed as strikethrough price on the storefront. */ defaultDisplayedCompareToPriceFormatted: string; /** Discount from the sale price, including taxes, e.g. `-11`. */ defaultDisplayedCompareToPriceDiscount: number; /** Formatted discount from the sale price, including taxes, e.g. `€11,00`. */ defaultDisplayedCompareToPriceDiscountFormatted: string; /** Discount percent from the sale price, including taxes, e.g. `-25`. */ defaultDisplayedCompareToPriceDiscountPercent: number; /** Formatted sale price discount percent, including taxes, e.g. `-25%`. */ defaultDisplayedCompareToPriceDiscountPercentFormatted: string; /** * Product lowest price settings for EU stores. * * Read more on lowest price settings in * {@link https://support.ecwid.com/hc/en-us/articles/9382914337820-Lowest-product-price-before-discounting | Help Center}. */ lowestPriceSettings: LowestPriceSettings; /** Defines if the product requires shipping. */ isShippingRequired: boolean; /** * Product weight in units defined in store settings. * * If the product doesn't have weight, this field is not returned. */ weight: number; /** * Link to the product details page on the storefront. * * @remarks * It is affected by page slug settings: `customSlug` has the highest priority, and if it's empty `autogeneratedSlug` is used. */ url: string; /** * Page slug generated for the product page URL automatically. * * @remarks * If the product doesn't have custom slug, this field will be automatically updated whe the product's name is changed. */ autogeneratedSlug: string; /** Custom slug defined by the store owner. Affects product page URL. */ customSlug: string; /** * Datetime of the product creation. * * @example * "2024-07-30 10:32:37 +0000" */ created: string; /** * Datetime of the latest product change whether it was API call or a change made through Ecwid admin. * * @example * "2024-07-30 10:32:37 +0000" */ updated: string; /** * UNIX timestamp of the product creation. * * @example * 1427268654 */ createTimestamp: number; /** * UNIX timestamp of the latest product change whether it was API call or a change made through Ecwid admin. * * @example * 1427268654 */ updateTimestamp: number; /** * ID of the product class that affects attributes management. * * If it's `0` the product belongs to the default "General" class. * * Read more on product types and attributes in {@link https://support.ecwid.com/hc/en-us/articles/207807495-Product-types-and-attributes| Help Center}. */ productClassId: number; /** * Defines if the product is enabled and visible on the storefront. * * If `false`, the product can't be opened on the storefront or added to the cart. */ enabled: boolean; /** * Detailed list of product options. * * Empty (`[]`) if no options are specified for the product. */ options: ProductOption[]; /** Minimum amount of products in stock to trigger an automated "low stock" email notification for the store owner. */ warningLimit: number; /** * @legacy * @see {@link shipping} field instead. */ fixedShippingRateOnly: boolean; /** * @legacy * @see {@link shipping} field instead. */ fixedShippingRate: number; /** Shipping settings specific to the product. */ shipping: ProductShipping; /** Identifier of the default product variation, which is defined by the default values of product options. */ defaultCombinationId: number; /** Details about product main image. */ originalImage: ProductImage; /** Details about product gallery images (for updating alt tags and sort order). */ galleryImages: ProductGalleryImage[]; /** * Product description in HTML format. * * @remarks * Scripts inside product descriptions are not supported. */ description: string; /** Available translations for the product description. */ descriptionTranslated: Translations; /** Details about product images and videos. */ media: ProductMedia; /** List of the category IDs the product belongs to. */ categoryIds: number[]; /** Detailed list of the category IDs the product belongs to. */ categories: ProductCategory[]; /** Default category ID of the product. If value is 0, then product does not have a default category and is not shown anywhere in storefront. */ defaultCategoryId: number; /** Page title for search engines. Recommended length < 55 characters. */ seoTitle: string; /** Translations for the SEO page title. */ seoTitleTranslated: Translations; /** Page description for search engines. Recommended length < 160 characters. */ seoDescription: string; /** Translations for the SEO page description. */ seoDescriptionTranslated: Translations; /** Stats showing how many times the product was added to favorites on the storefront. */ favorites: ProductFavorites; /** List of product attributes and their values. */ attributes: ProductAttribute[]; /** Detailed list of files attached to the product. */ files: ProductFile[]; /** List of related products displayed as "You may also like" products of the product. */ relatedProducts: ProductRelatedProducts[]; /** Detailed list of product variations. */ combinations: ProductCombination[]; /** Product's dimensions. */ dimensions: ProductDimensions; /** Product volume for calculations shipping costs, fractional number, `0` by default. */ volume: number; /** Product index on the main storefront page starting with `1`. */ showOnFrontpage: number; /** * Internal details for subscription products. * * @remarks * Only available for payment methods developed by Ecwid team. */ subscriptionSettings: ProductSubscriptionSettings; /** * Defines sample product created by Ecwid. * * @remarks * Sample products are unavailable for purchase. */ isSampleProduct: boolean; /** Defines if the product is a gift card. */ isGiftCard: boolean; /** Small product description visible on category and product pages under the product title. */ subtitle: string; /** Available translations for the product subtitle. */ subtitleTranslated: Translations; /** Defines if Ecwid can apply discounts to the product. */ discountsAllowed: boolean; /** * External ID for products synced from external services, for example, POS. * * This ID is unique for each product in one store. */ externalReferenceId: string; /** * Defines if a product is visible and/or can be pre-ordered when out-of-stock. * * Supported values: `SHOW`, `HIDE`, `ALLOW_PREORDER`. * * @remarks * Requires enabled pre-orders on the store level: `allowPreordersForOutOfStockProducts` setting in `/profile` endpoint. */ outOfStockVisibilityBehaviour: string; /** * Sets minimum product purchase quantity. * * Default value is `null`. */ minPurchaseQuantity: number; /** * Sets maximum product purchase quantity. * * Default value is `null`. */ maxPurchaseQuantity: number; /** When `true`, allows to collect, check, and publish reviews for this product in store. */ reviewsCollectingAllowed: boolean; /** Average rating from product reviews. */ rating: number; /** Number of reviews published by the store owner. */ reviewsPublished: number; /** Number of reviews waiting for store owner's approval. */ reviewsModerated: number; /** List of composite product IDs that this product is a component of. */ compositeParents: number[]; /** List of products/variations that turn this product into a "composite product". */ compositeComponents: ProductCompositeComponent[]; } interface WholesalePrice { /** Number of product items on this wholesale tier. */ quantity: number; /** Product price on the tier. */ price: number; } declare const SortByValues: { readonly RELEVANCE: "RELEVANCE"; readonly DEFINED_BY_STORE_OWNER: "DEFINED_BY_STORE_OWNER"; readonly ADDED_TIME_DESC: "ADDED_TIME_DESC"; readonly ADDED_TIME_ASC: "ADDED_TIME_ASC"; readonly NAME_ASC: "NAME_ASC"; readonly NAME_DESC: "NAME_DESC"; readonly PRICE_ASC: "PRICE_ASC"; readonly PRICE_DESC: "PRICE_DESC"; readonly UPDATED_TIME_ASC: "UPDATED_TIME_ASC"; readonly UPDATED_TIME_DESC: "UPDATED_TIME_DESC"; }; type SortByType = typeof SortByValues[keyof typeof SortByValues]; /** * Response type for the searchProducts request. * * @see {@link https://docs.ecwid.com/api-reference/rest-api/products/search-products#response-json | Ecwid API Documentation} */ type SearchProductsResponse = PaginatedResponse; /** * Parameters for the searchProducts request. * * @see {@link https://docs.ecwid.com/api-reference/rest-api/products/search-products#query-params | Ecwid API Documentation} */ type SearchProductsParams = AsQueryParams<{ /** * Internal IDs of Ecwid products separated by a comma. * * @important * If {@link productId} is specified, other search parameters are ignored. */ productId?: string; /** * Product or variation SKU. Ecwid will return details of a product containing that SKU, if SKU value is an exact match. * * @important * If {@link sku} is specified, other search parameters are ignored, except for {@link productId}. */ sku?: string; /** * Search term. Add `*` at the end of the keyword to disable the exact match search. * Search supports any language enabled in the store and specified in the `lang` param. * * Supported fields: * - `name` * - `description` * - `SKU` (including variations SKU) * - `options` * - `category` name * - `gallery` image descriptions * - `attributes` values (except for hidden attributes). Any special characters must be URI-encoded. * */ keyword?: string; /** * Extension to {@link keyword}. * * One of: * - `STOREFRONT` – emulates search on the storefront * - `CP` – emulates search in Ecwid admin * */ searchMethod?: 'STOREFRONT' | 'CP'; /** * Product ID in linked POS. Includes both product IDs and product variation IDs. * Search term for product ID from the connected POS system (Lightspeed X/R series). */ externalReferenceId?: string; /** Search term for finding products assigned to a specific category by its ID. */ category?: number; /** * Search term for finding products assigned to specified category IDs. * * @example * `0,123456,138470508`. */ categories?: string; /** Set `true` to get products from the subcategories of specified categories. */ includeProductsFromSubcategories?: boolean; /** Minimum product price. */ priceFrom?: number; /** Maximum product price. */ priceTo?: number; /** * Product creation date/time (lower bound). Supported formats: UNIX timestamp, datetime. * * @examples * ```ts * 1447804800 * "2023-01-15 19:27:50" * ``` */ createdFrom?: string | number; /** * Product creation date/time (upper bound). Supported formats: UNIX timestamp, datetime. * * @examples * ```ts * 1447804800 * "2023-01-15 19:27:50" * ``` */ createdTo?: string | number; /** * Product update date/time (lower bound). Supported formats: UNIX timestamp, date/time. * * @examples * ```ts * 1447804800 * "2023-01-15 19:27:50" * ``` */ updatedFrom?: string | number; /** * Product update date/time (upper bound). Supported formats: UNIX timestamp, date/time. * * @examples * ```ts * 1447804800 * "2023-01-15 19:27:50" * ``` */ updatedTo?: string | number; /** * Sort order for found products. * * When {@link category} search term is set, `DEFINED_BY_STORE_OWNER` is used automatically. */ sortBy?: SortByType; /** * Set `true` to get only enabled products. * Set `false` to get only disabled products. */ enabled?: boolean; /** * Set `true` to get gift cards only. * Set `false` to exclude gift cards from results. */ isGiftCard?: boolean; /** * Set `true` to get only in-stock products. * Set `false` to get only out-of-stock products. */ inStock?: boolean; /** * Set `true` to get only products with allowed discounts. * Set `false` to get only products where discounts are not allowed. */ discountsAllowed?: boolean; /** * Set `true` to get only products visible on the storefront. * Set `false` to get only hidden products. */ visibleInStorefront?: boolean; /** * Set `true` to get only products with customer-defined prices. * Set `false` to get only products without customer-defined prices. */ isCustomerSetPrice?: boolean; /** * Set `onsale` to get only items currently on sale. * Set `notonsale` to get only items currently not on sale. */ onsale?: 'onsale' | 'notonsale'; /** * Set `instock` to get only in-stock products. * Set `outofstock` to get only out-of-stock products. */ inventory?: 'instock' | 'outofstock'; /** * Country code to be used for tax calculation. * * @example "US" */ countryCode?: string; /** * State or province code to be used for tax calculation. * * @example "NY" */ stateOrProvinceCode?: string; /** * Set base URL for URLs in response. * If not specified, Ecwid will use the main URL from store settings. */ baseUrl?: string; /** * Set `true` to force receiving clean URLs – catalog links without hashbang (/#!/). * * @remarks * By default Ecwid checks if this setting is enabled for the store and responds with matching URLs. */ cleanUrls?: boolean; /** * Set `true` to receive product page slugs without IDs. * * @remarks * By default Ecwid checks if this setting is enabled for the store and responds with matching URLs. */ slugsWithoutIds?: boolean; /** * ID of an enabled manual tax. * * Supports multiple values, for example, `1117939042,4892697021` and the `none` value to search for the products with no enabled taxes. * * For example, you can filter products with no enabled taxes or a manual tax with a query param like `?enabledManualTaxes=none,1117939042`. */ enabledManualTaxes?: string; /** * List of tax class codes. * * Find tax classes and their codes in the {@link https://docs.ecwid.com/api-reference/rest-api/dictionaries/tax-classes-by-country | Tax classes by country}. */ taxClassCodes?: string; /** * Set `true` to search for products that belong only to the basic category and not to any other. * * @remarks * When set to `true`, returns products that are not assigned to any category except the root category. */ uncategorized?: boolean; /** * Limit to the number of returned items. * * Maximum and default value (if not specified) is `100`. */ limit?: number; /** * Offset from the beginning of the returned items list. * Used when the response contains more items than {@link limit} allows to receive in one request. */ offset?: number; /** * Specify the exact fields to receive in response JSON. * * @remarks * If not specified, the response JSON will have all available fields for the entity. * * @example "total,items(id,name,price,quantity)" */ responseFields?: string; /** * The language in which to get the translation of the entity. * * @remarks * Supports any language enabled in the store. If not specified, the default store language is used. * * @example "en", "nl", "fr" */ lang?: string; /** * Filter by product option name and one or several comma-separated values for that option. * A product will appear in the response if it has an option with a specified name that has any of the specified values. * * For example, a product has an option named Size with three values `24`, `26`, and `30`. * Then the following search term will find the product: `option_Size=24,22`. Even when the product doesn't have an option value `22`. */ [key: `option_${string}`]: string; /** * Filter by product attribute name and one or several comma-separated values for that attribute. * A product will appear in the response if it has an attribute with a specified name that has any of the specified values. * * For example, a product has an attribute named Brand with an `Ecwid` value. * Then the following search term will find the product: `attribute_Brand=Ecwid,Lightspeed`. * Even when the product doesn't have a `Lightspeed` attribute value. */ [key: `attribute_${string}`]: string; }>; /** * Response type for the getProduct request. * * @see {@link https://docs.ecwid.com/api-reference/rest-api/products/get-product#response-json | Ecwid API Documentation} */ type GetProductResponse = Product; /** * Parameters for the getProduct request. * * @see {@link https://docs.ecwid.com/api-reference/rest-api/products/get-product#query-params | Ecwid API Documentation} */ type GetProductParams = AsQueryParams<{ /** * Internal product ID. * * @remarks * The identifier of the requested product. */ productId: number; /** * Country code to be used for tax calculation. * * @example "US", "GB", "FR" */ countryCode?: string; /** * State or province code to be used for tax calculation. * * @example "NY", "CA" */ stateOrProvinceCode?: string; /** * Set base URL for product links in response. * * @remarks * If not specified, Ecwid will use the main URL from store settings. */ baseUrl?: string; /** * Set to `true` to generate SEO-friendly URLs. * * @remarks * If `true`, forces receiving clean URLs – catalog links without hashbang (`/#!/`). * By default Ecwid checks if this setting is enabled for the store and responds with matching URLs. */ cleanUrls?: boolean; /** Set to `true` to receive product page slug without ID. * * @remarks * By default Ecwid checks if this setting is enabled for the store and responds with matching URLs. */ slugsWithoutIds?: boolean; /** * The language in which to get the translation of the entity. * * @remarks * Language ISO code for translations in JSON response. If not specified, the default store language is used. * * @example "en", "nl", "fr" */ lang?: string; /** * Specify the exact fields to receive in response JSON. * * @remarks * If not specified, the response JSON will have all available fields for the entity. */ responseFields?: string; }>; /** * Response type for the downloadProductFile request. * * @see {@link https://docs.ecwid.com/api-reference/rest-api/products/product-files/download-product-file#response | Ecwid API Documentation} */ type DownloadProductFileResponse = Blob; /** * Parameters for the downloadProductFile request. * * @see {@link https://docs.ecwid.com/api-reference/rest-api/products/product-files/download-product-file#path-params | Ecwid API Documentation} */ type DownloadProductFileParams = AsQueryParams<{ /** Internal product ID. */ productId: number; /** Internal product file ID. */ fileId: number; }>; /** * Response type for the searchProductVariations request. * * @see {@link https://docs.ecwid.com/api-reference/rest-api/products/product-variations/search-product-variations#response-json | Ecwid API Documentation} */ type SearchProductVariationsResponse = ProductCombination[]; /** * Parameters for the searchProductVariations request. * * @see {@link https://docs.ecwid.com/api-reference/rest-api/products/product-variations/search-product-variations#query-params | Ecwid API Documentation} */ type SearchProductVariationsParams = AsQueryParams<{ /** Internal product ID. */ productId: number; /** * Language ISO code for translations in JSON response, e.g. `en`, `fr`. * * @remarks * If not specified, the default store language is used. */ lang?: string; /** * Specify the exact fields to receive in response JSON. * * @remarks * If not specified, the response JSON will have all available fields for the entity. */ responseFields?: string; }>; /** * Response type for the getProductVariation request. * * @see {@link https://docs.ecwid.com/api-reference/rest-api/products/product-variations/get-product-variation#response-json | Ecwid API Documentation} */ type GetProductVariationResponse = ProductCombination; /** * Parameters for the getProductVariation request. * * @see {@link https://docs.ecwid.com/api-reference/rest-api/products/product-variations/get-product-variation#query-params | Ecwid API Documentation} */ type GetProductVariationParams = AsQueryParams<{ /** Internal product ID. */ productId: number; /** Internal product variation ID. */ combinationId: number; /** * Language ISO code for translations in JSON response, e.g. `en`, `fr`. * * @remarks * If not specified, the default store language is used. */ lang?: string; /** * Specify the exact fields to receive in response JSON. * * @remarks * If not specified, the response JSON will have all available fields for the entity. */ responseFields?: string; }>; /** * Response type for the searchProductTypes request. * * @see {@link https://docs.ecwid.com/api-reference/rest-api/products/product-types-and-attributes/search-product-types#response-json | Ecwid API Documentation} */ type SearchProductTypesResponse = ProductType[]; /** * Response type for the getProductType request. * * @see {@link https://docs.ecwid.com/api-reference/rest-api/products/product-types-and-attributes/get-product-type#response-json | Ecwid API Documentation} */ type GetProductTypeResponse = ProductType; /** * Parameters for the getProductType request. * * @see {@link https://docs.ecwid.com/api-reference/rest-api/products/product-types-and-attributes/get-product-type#path-params | Ecwid API Documentation} */ type GetProductTypeParams = AsQueryParams<{ /** Internal product type ID. */ classId: number; }>; /** * Response type for the searchProductBrands request. * * @see {@link https://docs.ecwid.com/api-reference/rest-api/products/search-product-brands#response-json | Ecwid API Documentation} */ type SearchProductBrandsResponse = PaginatedResponse; /** * Parameters for the searchProductBrands request. * * @see {@link https://docs.ecwid.com/api-reference/rest-api/products/search-product-brands#query-params | Ecwid API Documentation} */ type SearchProductBrandsParams = AsQueryParams<{ /** * Limit to the number of returned items. * * Maximum and default value (if not specified) is `100`. */ limit?: number; /** * Offset from the beginning of the returned items list. * Used when the response contains more items than {@link limit} allows to receive in one request. */ offset?: number; /** * Sort order for the results. * * @remarks * Supported values: * - `NAME_ASC` - sort by name (ascending) * - `NAME_DESC` - sort by name (descending) * - `PRODUCT_COUNT_ASC` - sort by product count (ascending) * - `PRODUCT_COUNT_DESC` - sort by product count (descending) * * @default "PRODUCT_COUNT_DESC" */ sortBy?: 'PRODUCT_COUNT_DESC' | 'PRODUCT_COUNT_ASC' | 'NAME_DESC' | 'NAME_ASC'; /** * Set `true` to include brands that have no products. * * @remarks * Flag indicating whether to return brands without products in the response. * * @default false */ hidden_brands?: boolean; /** * Set base URL for storefront URLs in the returned brands. * * @remarks * If not specified, Ecwid will use the main URL from store settings. */ baseUrl?: string; /** * Set `true` to return SEO-friendly URLs. * * @remarks * If `true`, forces receiving clean URLs – catalog links without hashbang (/#!/). * By default Ecwid checks if this setting is enabled for the store and responds with matching URLs. */ cleanURLs?: boolean; /** * The language in which to get the translation of the entity. * * @remarks * Language ISO code for translations in JSON response. If not specified, the default store language is used. * * @example "en", "nl", "fr" */ lang?: string; }>; /** * Paginated response * @template T - The type of the items in the response. * @property {number} total - The total number of items in the response. * @property {number} count - The number of items in the response. * @property {number} offset - The offset of the items in the response. * @property {number} limit - The limit of the items in the response. * @property {T[]} items - The items in the response. */ interface PaginatedResponse { total: number; count: number; offset: number; limit: number; items: T[]; } /** * Search params that are valid to use with the api client. * All query params are optional. */ type QueryParams = Record; /** * Ensures a specific set of query parameters is treated as valid `QueryParams`. */ type AsQueryParams = T; /** * Object with text field translations in the "lang": "text" format, * where the "lang" is an ISO 639-1 language code. * * For example: * ```json * { * "en": "Sample text", * "nl": "Voorbeeldtekst" * } * ``` * * Translations are available for all active store languages. * * Only the default language translations are returned if no other translations are provided for the field. */ interface Translations { [languageCode: string]: string; } type GetReviewsResponse = { /** Total number of reviews in store */ total: number; /** Number of reviews in this response */ count: number; /** Pagination offset */ offset: number; /** Pagination limit */ limit: number; /** Array of review items */ items: Array<{ /** Unique review identifier */ id: number; /** Product ID associated with the review */ productId: number; /** Product name at time of review */ productName: string; /** Product SKU at time of review */ productSku: string; /** Review rating (1-5 stars) */ rating: number; /** Review text content */ review: string; /** Review status: PUBLISHED or MODERATED */ status: 'PUBLISHED' | 'MODERATED'; /** Review creation date (ISO format) */ createDate: string; /** Review creation timestamp (Unix) */ createTimestamp: number; /** Last update date (ISO format) */ updateDate: string; /** Last update timestamp (Unix) */ updateTimestamp: number; /** Language code */ lang: string; /** Reviewer information */ reviewerInfo: { name: string; country: string; }; }>; }; type GetReviewsParams = AsQueryParams<{ /** Number of reviews to skip (default: 0) */ offset?: number; /** Maximum number of reviews to return (default: 20, max: 100) */ limit?: number; /** Filter reviews by product ID */ productId?: number; }>; interface Account { /** Full store owner name */ accountName: string; /** Store owner nickname on the Ecwid forums */ accountNickName: string; /** * Store owner email. * * @remarks * Note: Not WL-friendly. * * If you want to send notifications/emails to customers, use `adminNotificationEmailsfield` instead. */ accountEmail: string; /** `true` if Ecwid brand is not mentioned in merchant's interface, `false` otherwise. */ whiteLabel: boolean; /** `true` if Ecwid account is suspended (prevents the storefront from showing any products or creating orders), `false` otherwise. */ suspended: boolean; /** The store registration date */ registrationDate: string; /** * Store limits and restrictions, e.g. maximum number of available products. * * @remarks * Requires `read_store_limits` access scope. */ limitsAndRestrictions: LimitsAndRestrictions; } interface LimitsAndRestrictions { /** * Maximum number of individual products available in the store, e.g. `2500`. * * This number doesn't include product options or variations. */ maxProductLimit: number; } interface AccountBilling { /** Store channel id info */ channelId: string; /** Store plan id */ pricingPlanId: string; /** Store plan name */ pricingPlanName: string; /** Store plan billing period */ pricingPlanPeriod: string; /** Next charge date */ nextRecurringChargeDate: string; /** Next charge amount */ nextRecurringChargeAmount: string; /** Next charge currency */ nextRecurringChargeCurrency: string; /** Next charge in the amount and currency format */ nextRecurringChargeAmountFormatted: string; /** `true` if store is on the 'grace' period, `false` otherwise */ inGracePeriod: boolean; /** Date when the 'grace' period will expire in UTC. null if an account is not on the 'grace' period */ willDowngradeAt: string; /** Store billing. `true` if the store is on the internal billing, `false` otherwise */ internalBilling: boolean; /** Store billing payment method */ paymentMethod: string; /** * Store’s ‘Billing and Plans’ page in the Control Panel. * * `true` if the page is visible in the Control Panel, `false` otherwise */ billingPageVisibleInCP: boolean; /** * Store’s interface for iTunes subscription. * * `true` if the interface is available, `false` otherwise */ itunesSubscriptionAvailableOnChannel: boolean; } interface BusinessRegistrationID { /** ID name, e.g. Vat ID, P.IVA, ABN */ name: string; /** ID value */ value: string; } interface Company { /** The company name displayed on the invoice */ companyName: string; /** Company (store administrator) email */ email: string; /** Company address. 1 or 2 lines separated by a new line character */ street: string; /** Company city */ city: string; /** A two-letter ISO code of the country */ countryCode: string; /** Postal code or ZIP code */ postalCode: string; /** State code (e.g. NY) or a region name. */ stateOrProvinceCode: string; /** Company phone number */ phone: string; } /** * Store design settings as seen in storefront design customization. * * If a specific config field is not provided, it will not be changed * * @see {@link https://docs.ecwid.com/storefronts/store-configuration-settings/design-configs#general-store-design-settings | General store design settings} */ interface DesignSettings { [DESIGN_CONFIG_FIELD_NAME: string]: string | boolean; } interface FbMessengerSettings { /** `true` if enabled, `false` otherwise */ enabled: boolean; /** Page ID of the connected page on Facebook */ fbMessengerPageId: string; /** Chat color theme for FB Messenger */ fbMessengerThemeColor: string; /** Color for the FB Messenger button in storefront */ fbMessengerMessageUsButtonColor: string; } interface FeatureToggle { /** Feature name */ name: string; /** `true` if feature is shown to merchant in Ecwid Control Panel > Settings > What's new, `false` otherwise */ visible: boolean; /** `true` if feature is enabled and active in store, `false` otherwise */ enabled: boolean; } interface AddressFormat { /** Single line address format, with a delimiter. */ plain: string; /** Multiline address format */ multiline: string; } interface FormatsAndUnits { /** * 3-letters code of the store currency (ISO 4217). * * @example `USD`, `CAD` */ currency: string; /** Currency prefix (e.g. $) */ currencyPrefix: string; /** Currency suffix */ currencySuffix: string; /** Numbers of digits after decimal point in the store prices. E.g. 2 ($2.99) or 0 (¥500). */ currencyPrecision: number; /** Price thousands separator. Supported values: space, dot, comma, or empty value. */ currencyGroupSeparator: string; /** Price decimal separator. Possible values: `.` or `,` */ currencyDecimalSeparator: string; /** Hide zero fractional part of the prices in storefront. `true` or `false`. */ currencyTruncateZeroFractional: boolean; /** Currency rate in U.S. dollars, as set in the merchant control panel. */ currencyRate: number; /** Weight unit. Supported values: `CARAT`, `GRAM`, `OUNCE`, `POUND`, `KILOGRAM` */ weightUnit: string; /** Numbers of digits after decimal point in weights displayed in the store. */ weightPrecision: number; /** Weight thousands separator. Supported values: space, dot, comma, or empty value. */ weightGroupSeparator: string; /** Weight decimal separator. Possible values: `.` or `,` */ weightDecimalSeparator: string; /** Hide zero fractional part of the weight values in storefront. `true` or `false`. */ weightTruncateZeroFractional: boolean; /** * Date format. * * Only these formats are accepted: * "dd-MM-yyyy", "dd/MM/yyyy", "dd.MM.yyyy", "MM-dd-yyyy", "MM/dd/yyyy", "yyyy/MM/dd", * "MMM d, yyyy", "MMMM d, yyyy", "EEE, MMM d, ''yy", "EEE, MMMM d, yyyy" */ dateFormat: string; /** Product dimensions units. Supported values: `MM`, `CM`, `IN`, `YD` */ dimensionsUnit: string; /** * Prefix for the order ID. Max length: 20 symbols. * * For example, if a prefix is "01_", then order ID "XGX7J" becomes "01_XGX7J" in all customer nofications and in Ecwid admin. */ orderNumberPrefix: string; /** * Suffix for the order ID. Max length: 20 symbols. * * For example, if a suffix is "_25", then order ID "XGX7J" becomes "XGX7J_25" in all customer nofications and in Ecwid admin. */ orderNumberSuffix: string; /** Minimum digits amount of an order number (can be 0-19 digits). */ orderNumberMinDigitsAmount: number; /** Next order number in a store (should be more than 0). */ orderNumberNextNumber: number; /** * Address format: plain and multiline formats. * * Displays the way address is written according to the requirements of the country set up in the profile settings. * * Supports the following variables: `%NAME%`, `%COMPANY_NAME%`, `%STREET%`, `%CITY%`, `%STATE_NAME% %POSTAL%`, `%COUNTRY_NAME%`. */ addressFormat: AddressFormat; } interface GeneralInfo { /** Ecwid Store ID. */ storeId: number; /** * Internal profile ID in the store. * * @remarks * Profile ID is unique for every staff account in the store and is assigned to custom apps. * For example, if a staff account creates a custom app, they'll see their profile ID and not the store owner's ID. */ profileId: string; /** Main website URL. */ storeUrl: string; /** * Details of Ecwid Instant site for account. * * @see {@link https://support.ecwid.com/hc/en-us/articles/207100069-What-is-Instant-Site | Learn more about Instant site} */ starterSite: StarterSite; /** * Website platform that store is added to. * * Possible values: "wix", "wordpress", "iframe", "joomla", "yola", etc. Default is "unknown". */ websitePlatform: string; /** * Format of the product browser links (URLs of catalog, account, cart, and checkout pages) on the storefront. * * One of: * - IFRAME - Store is added to an external website through iframe window. * - WIX - Store works on a Wix website. * - QUERY - Store uses [deprecated] query-based URL format. * - HASH - Store uses old URL format with "hashbangs". * - CLEAN - Store uses modern clean URL format. */ storefrontUrlFormat: string; /** * Format of product and category page URLs on the storefront. * * Reflects state of the "slugs without IDs" feature in the store. * * One of: * - WITH_IDS - Old URL format with category/product ID included in the URLs. * - WITHOUT_IDS - New URL format with category/product URLs without IDs. * * For example: * - Product link with ID: * {domain}/products/my_product-p123456 * * - Product link without ID: * {domain}/products/my_product */ storefrontUrlSlugFormat: string; } interface GiftCardProduct { /** Product ID */ id: number; /** Gift card product name */ name: string; /** Gift card product URL in a store */ url: string; } interface GiftCardSettings { /** Basic information of gift card products in a store */ products: GiftCardProduct[]; /** Display location for gift cards on storefront: "CATALOG_AND_FOOTER" and "CATALOG". */ displayLocation: string; } interface Languages { /** A list of enabled languages in the storefront. First language code is the default language for the store. */ enabledLanguages: string[]; /** Language automatically chosen be default in Facebook storefront (if any) */ facebookPreferredLocale: string; /** ISO code of the default language in store */ defaultLanguage: string; } interface LegalPage { /** * Legal page type. * * One of: `LEGAL_INFO`, `SHIPPING_COST_PAYMENT_INFO`, `REVOCATION_TERMS`, `TERMS`, `PRIVACY_STATEMENT` */ type: string; /** `true` if legal page is shown at checkout process, `false` otherwise */ enabled: boolean; /** Legal page title */ title: string; /** Available translations for legal page title. */ titleTranslated: Translations; /** * Legal page display mode – in a popup or on external URL. * * One of: `INLINE`, `EXTERNAL_URL` */ display: string; /** * Legal translated page display mode – in a popup or on external URL. * * One of: `INLINE`, `EXTERNAL_URL` */ displayTranslated: Translations; /** HTML contents of a legal page */ text: string; /** Available translations for legal page text. */ textTranslated: Translations; /** URL to external location of a legal page */ externalUrl: string; /** URL to external location of a translated legal page */ externalUrlTranslated: Translations; } interface LegalPagesSettings { /** `true` if customers must agree to store's terms of service at checkout, `false` otherwise */ requireTermsAgreementAtCheckout: boolean; /** Information about the legal pages set up in a store */ legalPages: LegalPage[]; } interface MailNotificationsSettings { /** `true` if emails are enabled, `false` otherwise */ enabled: boolean; /** `true` if the marketing block for emails is enabled, `false` otherwise */ marketingBlockEnabled?: boolean; /** Id of the discount coupon added to emails */ discountCouponId?: number; } interface CustomerMarketingMessages { /** Settings for Order confirmation emails. */ abandonedCartRecovery: MailNotificationsSettings; /** Settings for Order status changed emails. */ favoriteProductsReminder: MailNotificationsSettings; /** Settings for Order is ready for pickup emails. */ feedbackRequest: MailNotificationsSettings; /** Settings for Order confirmation emails. */ customerLoyaltyAppreciation: MailNotificationsSettings; /** Settings for Order status changed emails. */ inactiveCustomerReminder: MailNotificationsSettings; /** Settings for Order is ready for pickup emails. */ purchaseAnniversary: MailNotificationsSettings; } interface AdminMessages { /** Settings for New order placed emails. */ newOrderPlaced: MailNotificationsSettings; /** Settings for Low stock notification emails. */ lowStockNotification: MailNotificationsSettings; /** Settings for weekly stats reports. */ weeklyStatsReport: MailNotificationsSettings; } interface CustomerOrderMessages { /** Settings for Order confirmation emails. */ orderConfirmation: MailNotificationsSettings; /** Settings for Order status changed emails. */ orderStatusChanged: MailNotificationsSettings; /** Settings for Order is ready for pickup emails. */ orderIsReadyForPickup: MailNotificationsSettings; /** Settings for Download e-goods emails. */ downloadEgoods: MailNotificationsSettings; /** Settings for Order shipped emails. */ orderShipped: MailNotificationsSettings; } interface MailNotifications { /** Email addresses, which the store admin notifications are sent to */ adminNotificationEmails: string[]; /** The email address used as the 'reply-to' field in the notifications to customers. */ customerNotificationFromEmail: string; /** Settings for email notifications that are automatically sent to customers to confirm their orders and keep them informed about the order progress */ customerOrderMessages: CustomerOrderMessages; /** Settings for email notifications that are automatically sent to the store owner and staff members */ adminMessages: AdminMessages; /** Settings for email notifications that are automatically sent to customers to engage them and increase store sales */ customerMarketingMessages: CustomerMarketingMessages; } interface MailchimpSettings { /** JS script for the Mailchimp integration, e.g. `` */ script: string; } interface OrderInvoiceSettings { /** * If `false`, Ecwid will disable printing and viewing order invoices for customer and store admin. * * If `true`, order invoices will be available to view and print. */ displayOrderInvoices: boolean; /** * Possible values: `ATTACH_TO_ALL_EMAILS`, `DO_NOT_ATTACH`. */ attachInvoiceToOrderEmailNotifications: string; /** Invoice logo URL. */ invoiceLogoUrl: string; } interface PaymentShippingSettings { /** Contains IDs of shipping methods, if payment method is available for certain shipping methods only ("Payment Per Shipping" feature) */ enabledShippingMethods: string[]; } interface InstructionsForCustomer { /** Payment instructions title */ instructionsTitle: string; /** Payment instructions content. Can contain HTML tags */ instructions: string; /** Available translations for instructions. */ instructionsTranslated: Translations; } interface PaymentSurcharge { /** Supported values: ABSOLUTE, PERCENT */ type: string; /** Surcharge value */ value: number; } interface PaymentOption { /** Payment method ID in a store */ id: string; /** `true` if payment method is enabled and shown in storefront, `false` otherwise */ enabled: boolean; /** * Contains the payment method setup status. Read-only for in-built payment methods (where "appClientId": ""). * * Can be set for payment applications and will affect the payment method list in a store dashboard. * * @see {@link https://ecwid.d.pr/i/FpeCIb | Payment method list in a store dashboard}. */ configured: boolean; /** Payment method title at checkout */ checkoutTitle: string; /** Payment method description at checkout (subtitle) */ checkoutDescription: string; /** Payment processor ID in Ecwid */ paymentProcessorId: string; /** Payment processor title. The same as `paymentModule` in order details in REST API */ paymentProcessorTitle: string; /** Payment method position at checkout and in Ecwid Control Panel. The smaller the number, the higher the position is */ orderBy: number; /** client_id value of payment application. "" if not an application */ appClientId: string; /** Payment method fee added to the order as a set amount or as a percentage of the order total */ paymentSurcharges: PaymentSurcharge[]; /** Customer instructions details */ instructionsForCustomer: InstructionsForCustomer; /** Shipping settings of the payment option */ shippingSettings: PaymentShippingSettings; } interface ApplePay { /** `true` if Apple Pay is enabled and shown in storefront, `false` otherwise */ enabled: boolean; /** `true` if Stripe payment method is set up, `false` otherwise */ available: boolean; /** Always "stripe" */ gateway: string; /** https://stripe.com/files/apple-pay/apple-developer-merchantid-domain-association */ verificationFile: string; } type ApplePayOptions = Record; interface Payment { /** Details about all payment methods set up in that store */ paymentOptions: PaymentOption[]; /** Details about Apple Pay setup in that store */ applePay: ApplePay; /** Details about payment processors accepting Apple Pay */ applePayOptions: ApplePayOptions; } interface PhoneNotifications { /** Phone numbers that are used for store admin notifications, supports up to 100 phone numbers. */ adminNotificationPhones: string[]; } interface FilterSection { /** * Type of specific product filter. * * Possible values: `IN_STOCK`, `ON_SALE`, `PRICE`, `CATEGORIES`, `SEARCH`, `SKU`, `OPTION`, `ATTRIBUTE`, `LOCATIONS`. */ type: string; /** * Name of the product field. * * Works only with `OPTION` and `ATTRIBUTE` filter types and is required for them. */ name: string; /** * Style of displaying `OPTION` filters on the storefront. * * One of: * * - `CHECKBOXES` - Default checkboxes style. * - `BUTTON_GRID` - Grid with buttons that better suits product options like "Size". */ displayComponent: string; /** `true` if specific product filter is enabled, `false` otherwise. */ enabled: boolean; } interface ProductFiltersSettings { /** `true` if product filters are enabled in storefront, `false` otherwise. */ enabledInStorefront: boolean; /** Specific product filters */ filterSections: FilterSection[]; } interface FlatRate { /** One of `ABSOLUTE`, `PERCENT` */ rateType: string; /** Shipping rate */ rate: number; } interface RatesTable { /** What is this table rate based on. Possible values: `subtotal`, `discountedSubtotal`, `weight` */ tableBasedOn: string; /** Details of table rate */ rates: Rates[]; } interface Rates { /** Conditions for this shipping rate in custom table */ conditions: RateCondition[]; /** Table rate details */ rate: Rate; } interface RateCondition { /** Weight from condition value */ weightFrom: number; /** Weight to condition value */ weightTo: number; /** Subtotal from condition value */ subtotalFrom: number; /** Subtotal to condition value */ subtotalTo: number; /** Discounted subtotal from condition value */ discountedSubtotalFrom: number; /** Discounted subtotal to condition value */ discountedSubtotalTo: number; } interface Rate { /** Absolute per order rate */ perOrder: number; /** Percent per order rate */ percent: number; /** Absolute per item rate */ perItem: number; /** Absolute per weight rate */ perWeight: number; } interface RegistrationAnswers { /** * Answer to the question "Do you already have experience selling online?" * * Supported values: `getting_started`, `offline_only`, `online_different`, `looking_around` */ alreadySelling: string; /** * Answer to the question "What type of products will you be selling?" * * Supported values: `apparel`, `art`, `auto`, `books`, `electronics`, `food_restaurant`, `food_ecommerce`, `gifts`, * `hardware`, `health`, `home`, `jewelry`, `office`, `pet`, `services`, `sports`, `streaming`, `subscription_product`, * `tobacco`, `adult`, `notsure`, `other` */ goods: string; /** * Applicable if the field `goods` has value `other`. Merchant's text answer to the question "Your goods?" */ otherGoods: string; /** * Answer to the question "Are you setting up a store for someone else?" * * Supported values: `yes`, `no` */ forSomeone: string; /** * Answer to the question "Do you already have a website?" * * Supported values: `yes`, `no` */ website: string; /** * Answer to the question "What website platform do you use?" * * Supported values: `joomla`, `rapid_weaver`, `wordpress`, `wix`, `weebly`, `blogspot`, `drupal`, `custom_site`, `not_sure`, `other` */ platform: string; /** * Applicable if the field `platform` has value `other`. Merchant's text answer to the question "Your platform?" */ customPlatform: string; /** Answer to the question "What are you planning to use Ecwid for?" */ useFor: string; /** Answer to the question "How would you like your shop to be?" */ shopEase: string; /** Answer to the question "What are your budget preferences?" */ costAttitude: string; /** Answer to the question "What point-of-sale system are you using?" */ pos: string; /** Answer to the question "Where do you sell online?" */ salesChannels: string; /** Answer to the question "What e-commerce platform do you use to sell?" */ ecom: string; } interface SalePrice { /** `true` if sale price is displayed on product list and product details page, `false` otherwise */ displayOnProductList: boolean; /** Text label for sale price name */ oldPriceLabel: string; /** Translations for sale price text labels */ oldPriceLabelTranslated: Translations; /** Show discount in three modes: "NONE", "ABS" and "PERCENT" */ displayDiscount: string; } interface HandlingFee { /** Handling fee name set by store admin. E.g. `Wrapping` */ name: string; /** Handling fee value */ value: number; /** Handling fee description for customer */ description: string; } interface CarrierMethod { /** Carrier ID and specific method name */ id: string; /** Carrier method name */ name: string; /** `true` if carrier method is enabled, `false` otherwise */ enabled: boolean; /** Position of that carrier methodn */ orderBy: number; } interface PostageDimensions { /** Length of postage */ length: number; /** Width of postage */ width: number; /** Height of postage */ height: number; } interface CarrierSettings { /** `true` if default Ecwid account is enabled to calculate the rates, `false` otherwise */ defaultCarrierAccountEnabled: boolean; /** Default postage dimensions for this shipping option */ defaultPostageDimensions: PostageDimensions; } /** Array of time ranges in format ["FROM TIME", "TO TIME"]. Ex: ['08:30', '13:30'], ['13:30', '19:00'] */ interface BusinessHours { MON: string[]; TUE: string[]; WED: string[]; THU: string[]; FRI: string[]; SAT: string[]; SUN: string[]; } interface BlackoutDates { /** Starting date of the period, e.g. `2022-04-28`. */ fromDate: string; /** The end date of the period, e.g. `2022-04-30`. */ toDate: string; /** Specifies whether the period repeats in the following years or not. */ repeatedAnnually: boolean; } interface ShippingOption { /** Unique ID of shipping option */ id: string; /** Title of shipping option in store settings */ title: string; /** Available translations for shipping option title. */ titleTranslated: Translations; /** `true` if shipping option is used at checkout to calculate shipping, `false` otherwise */ enabled: boolean; /** Sort position or shipping option at checkout and in store settings. The smaller the number, the higher the position */ orderby: number; /** Fulfillment type. `pickup` for in-store pickup methods, `delivery` for local delivery methods, `shipping` for everything else */ fulfillmentType: string; /** ID of the pickup location for Lightspeed X-Series integration */ locationId: number; /** * Order subtotal before discounts. The delivery method won’t be available at checkout for orders below that amount. * * @remarks * The field is displayed if the value is not 0 */ minimumOrderSubtotal: number; /** Destination zone set for shipping option. Empty for public token */ destinationZone: StoreZone[]; /** Estimated delivery time in days. Currently, it is equal to the `description` value. */ deliveryTimeDays: string; /** Shipping method description. */ description: string; /** Available translations for shipping option description. */ descriptionTranslated: Translations; /** Carrier used for shipping the order. Is provided for carrier-calculated shipping options */ carrier: string; /** Carrier-calculated shipping methods available for this shipping option */ carrierMethods: CarrierMethod[]; /** Carrier-calculated shipping option settings */ carrierSettings: CarrierSettings; /** Rates calculation type. One of `carrier-calculated`, `table`, `flat`, `app` */ ratesCalculationType: string; /** Shipping cost markup for carrier-calculated methods */ shippingCostMarkup: number; /** Flat rate details */ flatRate: FlatRate; /** Custom table rates details */ ratesTable: RatesTable; /** Client ID of the app (for custom shipping apps only) */ appClientId: string; /** String of HTML code of instructions on in-store pickup */ pickupInstruction: string; /** Available translations for pickup instruction. */ pickupInstructionTranslated: Translations; /** * `true` if pickup time is scheduled, `false` otherwise. * * @remarks * Ask for Pickup Date and Time at Checkout option in pickup settings */ scheduledPickup: boolean; /** * Amount of time required for store to prepare pickup (Order Fulfillment Time setting) * * @deprecated */ pickupPreparationTimeHours: number; /** * Amount of time (in minutes) required for store to prepare pickup or to deliver an order * * @remarks * Order Fulfillment Time setting */ fulfillmentTimeInMinutes: number; /** Available and scheduled times to pickup orders */ businessHours: BusinessHours; /** * Available and scheduled times to pickup orders (duplicates `businessHours` field) * * @deprecated */ pickupBusinessHours: BusinessHours; /** * One of: * * - `ALLOW_ORDERS_AND_INFORM_CUSTOMERS` - makes it possible to place an order using this delivery method at any time. * If delivery doesn't work at the moment when the order is being placed, a warning will be shown to a customer. * * - `DISALLOW_ORDERS_AND_INFORM_CUSTOMERS` - makes it possible to place an order using this delivery method only during the operational hours. * If delivery doesn't work when an order is placed, this delivery method will be shown at the checkout as a disabled one * and will contain a note about when delivery will start working again. * * `ALLOW_ORDERS_AND_DONT_INFORM_CUSTOMERS` - makes it possible to place an order using this delivery method at any time. * Works only for delivery methods with a schedule. */ businessHoursLimitationType: string; /** `true` if "Allow to select delivery date or time at checkout" or "Ask for Pickup Date and Time at Checkout" setting is enabled, `false` otherwise. */ scheduled: boolean; /** * Format of how delivery date is chosen at the checkout - date or date and time. * * One of: `DATE`, `DATE_AND_TIME_SLOT`. */ scheduledTimePrecisionType: string; /** Length of the delivery time slot in minutes. */ timeSlotLengthInMinutes: number; /** `true` if same-day delivery is allowed, `false` otherwise. */ allowSameDayDelivery: boolean; /** Orders placed after this time (in a 24-hour format) will be scheduled for delivery the next business day. */ cutoffTimeForSameDayDelivery: string; /** * The merchant can specify the maximum possible delivery date for local delivery and pickup shipping options ("Allow choosing pickup date within"). * * Values: `THREE_DAYS`, `SEVEN_DAYS`, `ONE_MONTH`, `THREE_MONTHS`, `SIX_MONTHS`, `ONE_YEAR`, `UNLIMITED`. */ availabilityPeriod: string; /** Dates when the store doesn’t work, so customers can't choose these dates for local delivery. Each period of dates is a JSON object. */ blackoutDates: BlackoutDates; } interface Shipping { /** Handling fee settings */ handlingFee: HandlingFee; /** * Shipping origin address. If matches company address, company address is returned. * * @remarks * Available in read-only mode only. */ shippingOrigin: Company; /** * Details of each shipping option present in a store. For public tokens enabled methods are returned only. * * @remarks * Available in read-only mode only. */ shippingOptions: ShippingOption[]; } interface GeoPolygon { /** * Each array contains coordinates of a single dot of the polygon. * * @example [ [37.036539581171105, -95.66864041664617], [37.07548018723009, -95.6404782452158], ...] */ [COORDINATES: string]: number[][]; } interface StoreZone { /** Zone displayed name. */ name: string; /** Country codes this zone includes. */ countryCodes: string[]; /** State or province codes the zone includes. */ stateOrProvinceCodes: string[]; /** * Postcode (or zip code) templates this zone includes. * * More details: {@link https://support.ecwid.com/hc/en-us/articles/207100279-Adding-and-managing-destination-zones | Destination zones in Ecwid} */ postCodes: string[]; /** * Dot coordinates of the polygon (if destination zone is created using Zone on Map). * * Destination zones in Ecwid: * {@link https://support.ecwid.com/hc/en-us/articles/207100279-Adding-and-managing-destination-zones#adding-a-shipping-zone-using-google-map} */ geoPolygons: GeoPolygon[]; } interface SocialLink { /** URL for the social media page */ url: string; } interface SocialLinksSettings { /** Settings for Facebook */ facebook: SocialLink; /** Settings for Instagram */ instagram: SocialLink; /** Settings for Twitter */ twitter: SocialLink; /** Settings for YouTube */ youtube: SocialLink; /** Settings for VK */ vk: SocialLink; /** Settings for Pinterest */ pinterest: SocialLink; } interface StarterSite { /** Store subdomain on ecwid.com domain, e.g. mysuperstore in mysuperstore.ecwid.com */ ecwidSubdomain: string; /** Custom Instant site domain, e.g. www.mysuperstore.com */ customDomain: string; /** Instant Site generated URL, e.g. http://mysuperstore.ecwid.com/ */ generatedUrl: string; /** Instant Site logo URL */ storeLogoUrl: string; } interface StoreProfile { /** Basic data about Ecwid store: ID, website URL, website platform, Instant Site settings. */ generalInfo: GeneralInfo; /** Store owner's account details. */ account: Account; /** Store general settings. */ settings: StoreSettings; /** Mail notifications settings. */ mailNotifications: MailNotifications; /** Phone notifications settings. */ phoneNotifications: PhoneNotifications; /** Information about physical store: company name, phone, address. */ company: Company; /** Store formats/untis settings. */ formatsAndUnits: FormatsAndUnits; /** Store language settings. */ languages: Languages; /** Store shipping settings. */ shipping: Shipping; /** List of store destination zones. */ zones: StoreZone[]; /** List of store taxes. */ taxes: Tax[]; /** Store tax settings. */ taxSettings: TaxSettings; /** Company registration ID, e.g. VAT reg number or company ID, which is set under Settings / Invoice in Control panel. */ businessRegistrationID: BusinessRegistrationID; /** Store payment settings information. */ payment: Payment; /** * Information about enabled/disabled new store features and their visibility in Ecwid Control Panel. * * @remarks * Not provided via public token. Some of them are available in Ecwid JS API. */ featureToggles: FeatureToggle[]; /** Legal pages settings for a store (System Settings → General → Legal Pages). */ legalPagesSettings: LegalPagesSettings; /** * Design settings of an Ecwid store. * * @remarks * Can be overriden by updating store profile or by customizing design via JS config in storefront. */ designSettings: DesignSettings; /** Settings for product filters in a store. */ productFiltersSettings: ProductFiltersSettings; /** Store settings for FB Messenger feature. */ fbMessengerSettings: FbMessengerSettings; /** Store settings for Mailchimp integration. */ mailchimpSettings: MailchimpSettings; /** Store settings for order invoices. */ orderInvoiceSettings: OrderInvoiceSettings; /** Store settings for social media accounts. */ socialLinksSettings: SocialLinksSettings; /** Merchants' answers provided while registering their Ecwid accounts. */ registrationAnswers: RegistrationAnswers; /** Store settings for gift cards. */ giftCardSettings: GiftCardSettings; /** Store settings for tips. */ tipsSettings: TipsSettings; /** * Store billing and plan info. * * @remarks * Requires `read_store_profile_extended` access scope. */ accountBilling: AccountBilling; } interface AbandonedSales { /** `true` if abandoned sale recovery emails are sent automatically, `false` otherwise */ autoAbandonedSalesRecovery: boolean; } interface StoreSettings { /** true if the store is closed for maintenance, false otherwise */ closed: boolean; /** The store name displayed in Instant Site */ storeName: string; /** HTML description for the main store page – Store Front page */ storeDescription: string; /** Company logo displayed on the invoice */ invoiceLogoUrl: string; /** Company logo displayed in the store email notifications */ emailLogoUrl: string; /** `true` if Remarketing with Google Analytics is enabled, `false` otherwise */ googleRemarketingEnabled: boolean; /** * Google Analytics ID connected to a store * * @see {@link https://support.ecwid.com/hc/en-us/articles/207100449-Enabling-Google-Analytics-for-your-Ecwid-store| Learn more about Google Analytics} */ googleAnalyticsId: string; /** * Your Facebook Pixel ID. This field is not returned if it is empty in the Ecwid Control Panel. * * @see {@link https://support.ecwid.com/hc/en-us/articles/115004303345-Step-2-Implement-Facebook-pixel | Learn more about Facebook Pixel} */ fbPixelId: string; /** `true` if order comments feature is enabled, `false` otherwise */ orderCommentsEnabled: boolean; /** Caption for order comments field in storefront */ orderCommentsCaption: string; /** Available translations for the caption for order comments field. */ orderCommentsCaptionTranslated: Translations; /** `true` if order comments are required to be filled, `false` otherwise */ orderCommentsRequired: boolean; /** `true` if the zip code field is shown on the checkout ('Ask for a ZIP/postal code' in checkout settings is enabled), `false` otherwise */ askZipCode: boolean; /** `true` if the "Show price per unit" option is turned on, otherwise false */ showPricePerUnit: boolean; /** * `true` if out of stock products are hidden in storefront, false otherwise. * * @remarks * This setting is located in Ecwid Control Panel > Settings > General > Cart */ hideOutOfStockProductsInStorefront: boolean; /** `true` if the "Ask for the company name" in checkout settings is enabled, `false` otherwise */ askCompanyName: boolean; /** `true` if favorites feature is enabled for storefront, `false` otherwise */ favoritesEnabled: boolean; /** `true` if product reviews feature is enabled in the store, `false` otherwise */ productReviewsFeatureEnabled: boolean; /** * Default products sort order setting from Settings > Cart & Checkout. * * Possible values: "DEFINED_BY_STORE_OWNER", "ADDED_TIME_DESC", "PRICE_ASC", "PRICE_DESC", "NAME_ASC", "NAME_DESC" */ defaultProductSortOrder: string; /** Abandoned sales settings */ abandonedSales: AbandonedSales; /** Sale (compare to) price settings */ salePrice: SalePrice; /** `true` if merchant shows the checkbox to accept marketing, false otherwise */ showAcceptMarketingCheckbox: boolean; /** Default value for the checkbox at checkout to accept marketing */ acceptMarketingCheckboxDefaultValue: boolean; /** Custom text label for the checkbox to accept marketing at checkout */ acceptMarketingCheckboxCustomText: string; /** Available translations for custom text label for the checkbox to accept marketing at checkout. */ acceptMarketingCheckboxCustomTextTranslated: Translations; /** `true` if merchant shows warning to accept cookies in storefront, false otherwise */ askConsentToTrackInStorefront: boolean; /** * Snapchat pixel ID from your Snapchat business account * * @see {@link https://ads.snapchat.com/ | Snapchat Business Account} */ snapPixelId: string; /** * Pinterest Tag Id from your Pinterest business account * * @see {@link https://ads.pinterest.com/ | Pinterest Business Account} */ pinterestTagId: string; /** * Global site tag from your Google Ads account * * @see {@link https://ads.google.com/intl/en_US/home/ | Google Ads Account} */ googleTagId: string; /** * Event snippet from your Google Ads account * * @see {@link https://ads.google.com/intl/en_US/home/ | Google Ads Account} */ googleEventId: string; /** Recurring subscription settings information. */ recurringSubscriptionsSettings: RecurringSubscriptionsSettings; /** `true` if pre-orders for out of stock products are allowed, false otherwise */ allowPreordersForOutOfStockProducts: boolean; /** * `true` if LinkUp integration is enabled, false otherwise * * @see {@link https://support.ecwid.com/hc/en-us/articles/8987228834460 | LinkUp integration} */ linkUpEnabled: boolean; } interface RecurringSubscriptionsSettings { /** `true` if recurring subscriptions feature is visible in admin panel, `false` otherwise. */ showRecurringSubscriptionsInControlPanel: boolean; /** Supported payment methods statuses information. */ supportedPaymentMethodsStatuses: SupportedPaymentMethodsStatuses; } interface SupportedPaymentMethodsStatuses { /** `true` if Stripe payment method can be set up in the store, `false` otherwise. Depends on a country. */ supportedPaymentMethodsAreAvailable: boolean; /** `true` if Stripe payment method it set up in the store, `false` otherwise. */ supportedPaymentMethodsAreConnected: boolean; } interface TaxRule { /** Destination zone ID */ zoneId: string; /** Tax rate for this zone in % */ tax: number; } interface Tax { /** Unique internal ID of the tax */ id: number; /** Displayed tax name */ name: string; /** Whether tax is enabled `true` / `false` */ enabled: boolean; /** * `true` if the tax rate is included in product prices. * * More details: {@link http://help.ecwid.com/customer/portal/articles/1182159-taxes | Taxes in Ecwid} */ includeInPrice: boolean; /** `true` if the tax is calculated based on shipping address, `false` if billing address is used */ useShippingAddress: boolean; /** `true` if the tax applies to subtotal+shipping cost . `false` if the tax is applied to subtotal only */ taxShipping: boolean; /** `true` if the tax is applied to all products. `false` is the tax is only applied to thos product that have this tax enabled */ appliedByDefault: boolean; /** Tax value, in %, when none of the destination zones match */ defaultTax: number; /** Tax rates */ rules: TaxRule[]; } interface TaxSettings { /** * `true` if store taxes are calculated automatically, `false` otherwise. * * As seen in the Ecwid Control Panel > Settings > Taxes > Automatic */ automaticTaxEnabled: boolean; /** Manual tax settings for a store */ taxes: Tax[]; /** `true` if store has "gross prices" setting enabled. `false` if store has "net prices" setting enabled. */ pricesIncludeTax: boolean; /** * `true` if your business is tax-exempt under § 19 UStG. * * When true, it will display the “Tax exemption § 19 UStG” message to customers to explain the zero VAT rate. */ taxExemptBusiness: boolean; /** If `true` and order is sent from EU to UK - charges VAT for orders less than GBP 135. */ ukVatRegistered: boolean; /** If `true` and order is sent to EU - charges VAT for orders less than EUR 150. For Import One-Stop Shop (IOSS). */ euIossEnabled: boolean; /** * Shipping tax calculation schemes. Default value: `AUTOMATIC`. * * Possible values: `AUTOMATIC`, `BASED_ON_PRODUCT_TAXES_PROPORTION_BY_PRICE`, `BASED_ON_PRODUCT_TAXES_PROPORTION_BY_WEIGHT`, `TAXED_SEPARATELY_FROM_PRODUCTS` */ taxOnShippingCalculationScheme: string; } interface CustomTipSettings { /** * Defines if customers can input custom tip amount on the storefront. * * `true` if it's possible. */ enabled: boolean; } interface TipsSettings { /** `true` if enabled, `false` otherwise */ enabled: boolean; /** * Tip type that defines how its value is calculated. * * Supported values: ABSOLUTE - tip is added as a flat value * PERCENT - tip is added as a percentage of the order total */ type: string; /** Three number values, e.g. [0, 5, 10]. Each value defines tip amount. */ options: number[]; /** Default tip amount. It must match with any value from the option array. */ defaultOption: number; /** Custom tip settings ("Another amount" option) */ customTipSettings: CustomTipSettings; /** Text displayed above the tip input field. */ title: string; /** Grayed-out text displayed under the tip input field. */ subTitle: string; /** Available translations for tip title. */ titleTranslated: Translations; /** Available translations for tip subtitle. */ subtitleTranslated: Translations; } /** * Response type for the getStoreProfile request. * * @see {@link https://docs.ecwid.com/api-reference/rest-api/store-profile/get-store-profile#response-json | Ecwid API Documentation} */ type GetStoreProfileResponse = StoreProfile; /** * Parameters for the getStoreProfile request. * * @see {@link https://docs.ecwid.com/api-reference/rest-api/store-profile/get-store-profile#query-params | Ecwid API Documentation} */ type GetStoreProfileParams = AsQueryParams<{ /** * Set true to receive additional store profile data including account/billing data. * * @remarks * Requires `read_store_profile_extended` access scope. */ showExtendedInfo?: boolean; /** * Set `true` to include `externalStoreIp` in the response. * * @remarks * If `true`, the response will contain the external store IP address. */ withExternalStoreIp?: boolean; /** * Set `true` to include `lastLoginIp` in the response. * * @remarks * If `true`, the response will contain the last login IP address. */ withLastLoginIp?: boolean; /** * Set `true` to include `channelId` in the response. * * @remarks * If `true`, the response will contain the channel ID. */ withChannelId?: boolean; /** * Set `true` to include `reportAvailabilityDetails` in `accountInfo` in the response. * * @remarks * If `true`, returns report availability status details in the account information. * * @default false */ getReportAvailabilityStatus?: boolean; /** * The language in which to get the translation of the entity. * * @remarks * Language ISO code for translations in JSON response. If not specified, the default store language is used. * * @example "en", "nl", "fr" */ lang?: string; /** * Specify the exact fields to receive in response JSON. * * @remarks * If not specified, the response JSON will have all available fields for the entity. */ responseFields?: string; }>; /** * Configuration object for initializing the API client. * * @property {string} publicToken - The public access token for your store's API. * This token is used to authenticate requests that do not require a private token, such as fetching product or category data. * @property {string} [baseURL] - The base URL for the Ecwid API. * Default to 'https://app.ecwid.com/api/v3/'. This can be overridden for testing or specific regional API endpoints. * @property {string} [storeId] - The unique identifier for your Ecwid store. This ID is used to specify which store's data to access. */ interface ApiConfig { publicToken: string; storeId?: number; baseURL?: string; } export { SortByValues as aY }; export type { OrderInvoiceSettings as $, AbandonedSales as A, BlackoutDates as B, CarrierMethod as C, DesignSettings as D, GetProductResponse as E, FbMessengerSettings as F, GeneralInfo as G, GetProductTypeParams as H, GetProductTypeResponse as I, GetProductVariationParams as J, GetProductVariationResponse as K, GetReviewsParams as L, GetReviewsResponse as M, GetStoreProfileParams as N, GetStoreProfileResponse as O, GiftCardProduct as P, GiftCardSettings as Q, HandlingFee as R, InstructionsForCustomer as S, Languages as T, LegalPage as U, LegalPagesSettings as V, LimitsAndRestrictions as W, LowestPriceSettings as X, MailNotifications as Y, MailNotificationsSettings as Z, MailchimpSettings as _, Account as a, StoreSettings as a$, PaginatedResponse as a0, Payment as a1, PaymentOption as a2, PaymentShippingSettings as a3, PaymentSurcharge as a4, PhoneNotifications as a5, PostageDimensions as a6, Product as a7, ProductAttribute as a8, ProductAttributeType as a9, ProductType as aA, QueryParams as aB, Rate as aC, RateCondition as aD, Rates as aE, RatesTable as aF, RecurringSubscriptionsSettings as aG, RegistrationAnswers as aH, SalePrice as aI, SearchCategoriesByPathParams as aJ, SearchCategoriesByPathResponse as aK, SearchCategoriesParams as aL, SearchCategoriesResponse as aM, SearchProductBrandsParams as aN, SearchProductBrandsResponse as aO, SearchProductTypesResponse as aP, SearchProductVariationsParams as aQ, SearchProductVariationsResponse as aR, SearchProductsParams as aS, SearchProductsResponse as aT, Shipping as aU, ShippingOption as aV, SocialLink as aW, SocialLinksSettings as aX, StarterSite as aZ, StoreProfile as a_, ProductAttributeVisibility as aa, ProductBorderInfo as ab, ProductBrand as ac, ProductCategory as ad, ProductCombination as ae, ProductCombinationOption as af, ProductCompositeComponent as ag, ProductDimensions as ah, ProductDominatingColor as ai, ProductFavorites as aj, ProductFile as ak, ProductFiltersSettings as al, ProductGalleryImage as am, ProductImage as an, ProductImageAlt as ao, ProductMedia as ap, ProductMediaImage as aq, ProductMediaVideo as ar, ProductOption as as, ProductOptionChoice as at, ProductRecurringChargeSettings as au, ProductRelatedCategory as av, ProductRelatedProducts as aw, ProductShipping as ax, ProductSubscriptionSettings as ay, ProductTax as az, AccountBilling as b, StoreZone as b0, SupportedPaymentMethodsStatuses as b1, Tax as b2, TaxRule as b3, TaxSettings as b4, TipsSettings as b5, Translations as b6, WholesalePrice as b7, AddressFormat as c, AdminMessages as d, ApiConfig as e, ApplePay as f, ApplePayOptions as g, AsQueryParams as h, BusinessHours as i, BusinessRegistrationID as j, CarrierSettings as k, Category as l, CategoryImage as m, CategoryImageAlt as n, Company as o, CustomTipSettings as p, CustomerMarketingMessages as q, CustomerOrderMessages as r, DownloadProductFileParams as s, DownloadProductFileResponse as t, FeatureToggle as u, FilterSection as v, FlatRate as w, FormatsAndUnits as x, GeoPolygon as y, GetProductParams as z };