> To build or manage a Wix site with an AI agent, follow https://www.wix.com/headless/skill.md
> It builds a new Wix site or puts your own site online, from a prompt, and keeps changing it afterwards. The pages are code in any web technology, and Wix runs the backend.
> It works through the Wix plugin (the Wix MCP and the Wix skills), the Wix CLI or no Wix login, and puts the site live on Wix hosting or on another host.
> Business features include a store, bookings, events and tickets, a restaurant, a blog, forms, members and many more.
> Read the Wix skills online at https://www.wix.com/skills
> 
> Portal Navigation:
> 
> - Append `.md` to any URL under `https://dev.wix.com/docs/` to get its markdown version.
> - Pages are either content pages (article or reference text) or menu pages (a list of links to child pages).
> - To get a menu page, truncate any URL to a parent path and append `.md` (e.g. `https://dev.wix.com/docs/sdk.md`, `https://dev.wix.com/docs/sdk/core-modules.md`).
> - If a reference page seems to be missing its schema (parameters, return types, or type definitions), append `?schema=true` to its `.md` URL (e.g. `https://dev.wix.com/docs/contexts/contexts/stores/category-info/use-category-info-context.md?schema=true`).
> - Top-level index of all portals: https://dev.wix.com/docs/llms.txt
> - Full concatenated docs: https://dev.wix.com/docs/llms-full.txt

# QueryCheckoutTemplates

# Package: checkout

# Namespace: CheckoutTemplateService

# Method link: https://dev.wix.com/docs/api-reference/business-solutions/e-commerce/purchase-flow/checkout/checkout-templates/query-checkout-templates?apiView=SDK.md

## Permission Scopes:
Manage eCommerce - all permissions: SCOPE.DC-ECOM-MEGA.MANAGE-ECOM

## Introduction

Retrieves a list of checkout templates, given the provided paging, filtering, and sorting.

Query Checkout Templates runs with these defaults, which you can override:
- `id` sorted in `ASC` order

The following table shows field support for filters and sorting for the checkout template object:

| Field              | Supported Filters                                         | Sortable |
| ------------------ | --------------------------------------------------------- | -------- |
| `id`               | `$eq`, `$ne`, `$in`, `$startsWith`, `$exists`, `$hasSome` | Sortable |
| `status`           | `$eq`, `$ne`, `$in`, `$exists`, `$hasSome`                | Sortable |

To learn about working with _Query_ endpoints, see
[API Query Language](https://dev.wix.com/api/rest/getting-started/api-query-language),
[Sorting and Paging](https://dev.wix.com/api/rest/getting-started/sorting-and-paging),
and [Field Projection](https://dev.wix.com/api/rest/getting-started/field-projection).

---

## REST API

### Schema

```
 Method: queryCheckoutTemplates
 Description: Retrieves a list of checkout templates, given the provided paging, filtering, and sorting.  Query Checkout Templates runs with these defaults, which you can override: - `id` sorted in `ASC` order  The following table shows field support for filters and sorting for the checkout template object:  | Field              | Supported Filters                                         | Sortable | | ------------------ | --------------------------------------------------------- | -------- | | `id`               | `$eq`, `$ne`, `$in`, `$startsWith`, `$exists`, `$hasSome` | Sortable | | `status`           | `$eq`, `$ne`, `$in`, `$exists`, `$hasSome`                | Sortable |  To learn about working with _Query_ endpoints, see [API Query Language](https://dev.wix.com/api/rest/getting-started/api-query-language), [Sorting and Paging](https://dev.wix.com/api/rest/getting-started/sorting-and-paging), and [Field Projection](https://dev.wix.com/api/rest/getting-started/field-projection).
 URL: https://www.wixapis.com/ecom/v1/checkout-templates/query
 Method: POST
 Method parameters:
   param name: query | type: CursorQuery    
     - name: cursorPaging | type: CursorPaging | description: Cursor token pointing to a page of results. Not used in the first request. Following requests use the cursor token and not `filter` or `sort`.  
        - name: limit | type: integer | description: Number of items to load.  | validation: minimum 0, maximum 100, format int32
        - name: cursor | type: string | description: Pointer to the next or previous page in the list of results. </ br>  You can get the relevant cursor token from the `pagingMetadata` object in the previous call's response. Not relevant for the first request.  
        - name: filter | type: object | description: Filter object in the following format: `"filter" : { "fieldName1": "value1", "fieldName2":{"$operator":"value2"} }`  Example of operators: `$eq`, `$ne`, `$in`, `$startsWith`, `$exists`, `$hasSome`  
        - name: sort | type: array<Sorting> | description: Sort object in the following format: `[{"fieldName":"sortField1","order":"ASC"},{"fieldName":"sortField2","order":"DESC"}]`  
           - name: fieldName | type: string | description: Name of the field to sort by.  
           - name: order | type: SortOrder | description: Sort order.  
                 - enum:
                 -     ASC: Ascending order.
                 -     DESC: Descending order.
 Query fields:
   - field: id | operators: $eq, $ne, $in, $exists, $gt, $gte, $lt, $lte, $startsWith | sort: ASC, DESC | aggregatable: undefined | searchable: undefined
   - field: status | operators: $eq, $ne, $in, $exists | sort: ASC, DESC | aggregatable: undefined | searchable: undefined
 Return type: QueryCheckoutTemplatesResponse
  - name: checkoutTemplates | type: array<CheckoutTemplate> | description: Retrieved checkout templates.  
     - name: id | type: string | description: Checkout template GUID.  | read-only: true | validation: format GUID
     - name: status | type: Status | description: Status of the checkout template.  When `status` is `INACTIVE` checkouts will not be created with this template `id`. Instead, the endpoint will redirect to the domain site.  Default: `ACTIVE`  
         - enum: ACTIVE, INACTIVE
     - name: customization | type: CheckoutCustomization | description: Custom settings to apply to the checkout page created from this template.  
        - name: webClient | type: WebClientCustomization | description: Web client customizations. These customizations only apply to the standard Wix checkout page.  
           - name: disabledContinueShoppingButton | type: boolean | description: Whether to disable the "Continue shopping" button.  Default: `false`  
           - name: disabledPolicyAgreementCheckbox | type: boolean | description: Whether to disable policy agreement checkout in the checkout page  Default: `false`  
        - name: lockedGiftCard | type: boolean | description: Whether to lock the ability to add or remove a gift card.  Default: `false`  
        - name: lockedCoupon | type: boolean | description: Whether to lock the ability to apply or remove a coupon code.  Default: `false`  
        - name: disabledManualPayment | type: boolean | description: Whether to disable manual payment option for this checkout.  Default: `false`  
     - name: lineItems | type: array<LineItem> | description: Catalog line items.  Max: 300 items  | validation: maxItems 300
        - name: quantity | type: integer | description: Item quantity.  Min: `1` <br /> Max: `100000`  | validation: minimum 1, maximum 100000
        - name: catalogReference | type: CatalogReference | description: Catalog and item reference. Holds GUIDs for the item and the catalog it came from, as well as further optional info. Optional for custom line items, which don't trigger the Catalog service plugin.  
           - name: catalogItemId | type: string | description: GUID of the item within the catalog it belongs to.  | validation: minLength 1, maxLength 36
           - name: appId | type: string | description: GUID of the app providing the catalog.  You can get your app's GUID from its page in the [app dashboard](https://dev.wix.com/dc3/my-apps/).  For items from Wix catalogs, the following values always apply: + Wix Stores: `"215238eb-22a5-4c36-9e7b-e7c08025e04e"` + Wix Bookings: `"13d21c63-b5ec-5912-8397-c3a5ddb27a97"` + Wix Restaurants: `"9a5d83fd-8570-482e-81ab-cfa88942ee60"`  | validation: minLength 1
           - name: options | type: object | description: Additional item details in `key:value` pairs.  Use this optional field for more specificity with item selection. The values of the `options` field differ depending on which catalog is providing the items.  For Wix Stores products, learn more about integrating with [Catalog V3](https://dev.wix.com/docs/api-reference/business-solutions/stores/catalog-v3/e-commerce-integration.md) or [Catalog V1](https://dev.wix.com/docs/api-reference/business-solutions/stores/catalog-v1/catalog/e-commerce-integration.md), depending on [the version the site uses](https://dev.wix.com/docs/api-reference/business-solutions/stores/catalog-versioning/introduction.md).  
        - name: catalogOverrideFields | type: CatalogOverrideFields | description: Overriding values for catalog item properties.  
           - name: productName | type: ProductName | description: Item name.  
              - name: original | type: string | description: __Required.__ Item name in the site's default language as defined in the [request envelope](https://dev.wix.com/docs/build-apps/develop-your-app/frameworks/self-hosting/supported-extensions/backend-extensions/add-self-hosted-service-plugin-extensions.md#request-envelope).  Min: 1 character. Max: 200 characters.  | validation: minLength 1, maxLength 200
              - name: translated | type: string | description: Item name translated into the buyer's language.  Min: 1 character. Max: 400 characters. Default: Same as `original`.  | validation: minLength 1, maxLength 400
           - name: price | type: string | description: Item price **after** discounts.  | validation: decimalValue {"gte":"0","lte":"999999999","maxScale":3}
           - name: fullPrice | type: string | description: Item price **before** discounts.  | validation: decimalValue {"gte":"0","lte":"999999999","maxScale":3}
           - name: descriptionLines | type: array<DescriptionLine> | description: Item description lines. Used when displaying the line item to customers.  | validation: minItems 0, maxItems 20
              - ONE-OF: 
                 - name: plainText | type: PlainTextValue | description: Description line plain text value.  
                    - name: original | type: string | description: Description line plain text value in the site's default language as defined in the [request envelope](https://dev.wix.com/docs/build-apps/develop-your-app/frameworks/self-hosting/supported-extensions/backend-extensions/add-self-hosted-service-plugin-extensions.md#request-envelope).  | validation: maxLength 600
                    - name: translated | type: string | description: Description line plain text value translated into the buyer's language.  Default: Same as `original`.  | validation: maxLength 600
                 - name: colorInfo | type: Color | description: Description line color value.  
                    - name: original | type: string | description: Description line color name in the site's default language as defined in the [request envelope](https://dev.wix.com/docs/build-apps/develop-your-app/frameworks/self-hosting/supported-extensions/backend-extensions/add-self-hosted-service-plugin-extensions.md#request-envelope).  | validation: maxLength 500
                    - name: translated | type: string | description: Description line color name translated into the buyer's language.  Default: Same as `original`.  | validation: maxLength 500
                    - name: code | type: string | description: HEX or RGB color code for display.  
              - name: name | type: DescriptionLineName | description: Description line name.  
                 - name: original | type: string | description: Description line name in the site's default language as defined in the [request envelope](https://dev.wix.com/docs/build-apps/develop-your-app/frameworks/self-hosting/supported-extensions/backend-extensions/add-self-hosted-service-plugin-extensions.md#request-envelope).  | validation: maxLength 100
                 - name: translated | type: string | description: Description line name translated into the buyer's language.  Default: Same as `original`.  | validation: maxLength 200
           - name: physicalProperties | type: PhysicalProperties | description: Physical properties of the item.  
              - name: weight | type: number | description: Line item weight. Measurement unit matches the weight unit specified in `weightUnit` in the request.  | validation: format double
              - name: sku | type: string | description: Stock-keeping unit. Learn more about [SKUs](https://www.wix.com/encyclopedia/definition/stock-keeping-unit-sku).  | validation: maxLength 40
              - name: shippable | type: boolean | description: Whether this line item is shippable.  
              - name: productDimensions | type: Dimensions | description: Product dimensions (length, width, height of the physical product).  
                 - name: length | type: string | description: Length. Measurement unit is handled at the system level (metric/imperial).  | validation: decimalValue {"gte":"0","lte":"999999999","maxScale":6}
                 - name: width | type: string | description: Width. Measurement unit is handled at the system level (metric/imperial).  | validation: decimalValue {"gte":"0","lte":"999999999","maxScale":6}
                 - name: height | type: string | description: Height. Measurement unit is handled at the system level (metric/imperial).  | validation: decimalValue {"gte":"0","lte":"999999999","maxScale":6}
                 - name: unit | type: DimensionsUnit | description: Unit of measurement for dimensions (length, width, height).  
                         - enum:
                         -     UNKNOWN_DIMENSIONS_UNIT: 
                         -     MM: Millimeters.
                         -     CM: Centimeters.
                         -     M: Meters.
                         -     IN: Inches.
                         -     FT: Feet.
                         -     YD: Yards.
              - name: packageDimensions | type: Dimensions | description: Package dimensions (length, width, height of the shipping package).  
           - name: image | type: Image | description: Item image.  
              - name: id | type: string | description: WixMedia image GUID.  
              - name: height | type: integer | description: Original image height.  
              - name: width | type: integer | description: Original image width.  
              - name: altText | type: string | description: Image alt text. Optional.  
              - name: filename | type: string | description: Image filename. Optional.  
           - name: paymentOption | type: PaymentOption | description: Payment method selected for the item.  
              - name: value | type: PaymentOptionType | description: Type of selected payment option for current item.  Default: `FULL_PAYMENT_ONLINE`  
                     - enum:
                     -     FULL_PAYMENT_ONLINE: The entire payment for this item happens as part of the checkout.
                     -     FULL_PAYMENT_OFFLINE: The entire payment for this item happens after checkout. For example, when using cash, check, or other offline payment methods.
                     -     MEMBERSHIP: Payment for this item is done by charging a membership. Any remaining amount not covered by the membership, such as item modifiers, is paid online.
                     -     DEPOSIT_ONLINE: Partial payment to be paid upfront during checkout. The initial amount to be paid for each line item is specified in `depositAmount`.
                     -     MEMBERSHIP_OFFLINE: Payment for this item can only be done by charging a membership and must be manually redeemed in the dashboard by the site admin. When selected, `price` is `0`.
                     -     MEMBERSHIP_ONLINE_WITH_OFFLINE_REMAINDER: Item price is charged to online membership. Any remaining amount not covered by the membership, such as item modifiers, is paid offline.
           - name: depositAmount | type: string | description: Only eligible for catalog items with `lineItem.paymentOption.value` type of `DEPOSIT_ONLINE`.  | validation: format DECIMAL_VALUE, decimalValue {"gt":"0","lte":"999999999","maxScale":3}
           - name: savePaymentMethod | type: boolean | description: Whether to save the payment method on the order.  Default: `false`  
           - name: inventoryAppId | type: string | description: GUID of the app managing the inventory.  | validation: format GUID
           - name: fixedQuantity | type: boolean | description: Whether the line item quantity is fixed and can't be changed. When not set, falls back to the value from the catalog.  
     - name: customLineItems | type: array<CustomLineItem> | description: Custom line items. Custom line items don't trigger the Catalog service plugin.  Max: 300 items  | validation: maxItems 300
        - name: quantity | type: integer | description: Custom line item quantity.  Min: `1` Max: `100000`  | validation: minimum 1, maximum 100000
        - name: price | type: string | description: Custom line item price.  Must be a number or a decimal without symbols.  | validation: format DECIMAL_VALUE, decimalValue {"gte":"0","lte":"1000000000000000"}
        - name: priceDescription | type: PriceDescription | description: Additional description for the price. For example, when price is 0 but additional details about the actual price are needed - "Starts at $67".  
           - name: original | type: string | description: __Required.__ Price description in the site's default language as defined in the [request envelope](https://dev.wix.com/docs/build-apps/develop-your-app/frameworks/self-hosting/supported-extensions/backend-extensions/add-self-hosted-service-plugin-extensions.md#request-envelope).  | validation: minLength 1, maxLength 100
           - name: translated | type: string | description: Price description translated into the buyer's language.  Default: Same as `original`.  | validation: minLength 1, maxLength 100
        - name: descriptionLines | type: array<DescriptionLine> | description: Custom line item description lines. Used for display purposes for the cart, checkout and order.  | validation: maxItems 10
        - name: media | type: Image | description: Custom line item's media.  
        - name: taxGroupId | type: string | description: Tax group GUID for this custom line item.  | validation: format GUID
        - name: productName | type: ProductName | description: Name of the item or product.  
        - name: url | type: PageUrlV2 | description: URL to the item's page on the site. When not provided, the link back from the cart page to the relevant product page will not work.  
           - name: relativePath | type: string | description: The relative path for the page within the site. For example, `/product-page/a-product`.  
           - name: url | type: string | description: The page's full URL. For example, `https://mysite.com/product-page/a-product`.  
        - name: itemType | type: ItemType | description: Item type. Either a preset type or custom.  
           - ONE-OF: 
              - name: preset | type: ItemTypePreset | description: Preset item type.  
                     - enum: UNRECOGNISED, PHYSICAL, DIGITAL, GIFT_CARD, SERVICE
              - name: custom | type: string | description: Custom item type. When none of the preset types are suitable, specifies the custom type.  
        - name: fullPrice | type: string | description: Item price **before** catalog-defined discount. Defaults to `price` when not provided.  | validation: format DECIMAL_VALUE
        - name: quantityAvailable | type: integer | description: Item quantity available for purchase. Only return this if inventory is managed. Not returning this field means that the buyer can "infinitely" tick up the number of items in the cart.  | validation: minimum 0, maximum 100000, format int32
        - name: physicalProperties | type: PhysicalProperties | description: Physical properties of the item.  
        - name: paymentOption | type: PaymentOptionType | description: Type of selected payment option for current item. Defaults to `FULL_PAYMENT_ONLINE`.  + `FULL_PAYMENT_ONLINE` - Entire payment for this item happens as part of the checkout. + `FULL_PAYMENT_OFFLINE` - Entire payment for this item happens after the checkout. For example, when using cash, check, or other offline payment methods. + `MEMBERSHIP` - Payment for this item is done by charging a membership. When this option is used, `lineItem.price.amount` is 0. + `DEPOSIT_ONLINE` -  Partial payment for the given item to be paid upfront during the checkout. Amount to be paid is defined by deposit_amount field.  
        - name: serviceProperties | type: ServiceProperties | description: Service properties. When relevant, this contains information such as date and number of participants. Used, among other things, when checking for valid memberships.  
           - name: scheduledDate | type: string | description: Date and time the service is to be provided, in [ISO-8601](https://en.wikipedia.org/wiki/ISO_8601#Combined_date_and_time_representations) format. For example, the start time of a class.  | validation: format date-time
           - name: numberOfParticipants | type: integer | description: The number of people participating in the service. For example, the number of people attending a class or the number of people per hotel room.  | validation: minimum 1, maximum 10000, format int32
        - name: rootCatalogItemId | type: string | description: In cases where `catalogReference.catalogItemId` is NOT the actual catalog item GUID, this field will return the true item's GUID.  + For example, for Wix Bookings, `catalogReference.catalogItemId` is the booking GUID. Therefore this value is set to the service GUID. + In most cases, this field is the same as `catalogReference.catalogItemId`. + Used in membership validation.  | validation: minLength 1, maxLength 36
        - name: depositAmount | type: string | description: Partial payment for the given item to be paid upfront during the checkout.  Eligible for catalog items with type `DEPOSIT_ONLINE`. When omitted, the item's price will not be split and is expected to be paid in a single installment.  | validation: format DECIMAL_VALUE
        - name: deliveryProfileId | type: string | description: Delivery profile GUID.  | validation: format GUID
        - name: catalogReference | type: CatalogReference | description: Catalog and item reference. Includes GUIDs for the item and the catalog it came from, as well as further optional info. Optional for custom line items, which don't trigger the Catalog service plugin.  
        - name: priceUndetermined | type: boolean | description: Whether the price is not yet defined, and will be updated after the order is created.  Default: `false`  
        - name: fixedQuantity | type: boolean | description: Whether the line item quantity is fixed and cannot be changed.  Default: `false`  
        - name: consentRequiredPaymentPolicy | type: string | description: Item payment policy that requires customer consent to complete purchase. The payment policy will be displayed on the checkout page.  | read-only: true | validation: minLength 1, maxLength 1000
        - name: savePaymentMethod | type: boolean | description: Whether to save the payment method on the order.  Default: `false`  | read-only: true 
        - name: policies | type: array<Policy> | description: Policies to be displayed to the customer on the checkout page.  | validation: maxItems 5
           - name: title | type: string | description: Policy title - should be translated  | validation: minLength 1, maxLength 29
           - name: content | type: string | description: Policy content - should be translated  | validation: minLength 1, maxLength 3000
        - name: membersOnly | type: boolean | description: Whether the item can only be purchased by site members.  Default: `false`  
        - name: taxableAddress | type: TaxableAddress | description: Address to use for tax calculation purposes.  
           - ONE-OF: 
              - name: addressType | type: TaxableAddressType | description: taxable address type. if this field is selected, the address is automatically resolved, and the tax is calculated accordingly.  
                     - enum: BUSINESS, BILLING, SHIPPING
        - name: modifierGroups | type: array<ModifierGroup> | description: Modifier groups that were added to the item.  | validation: maxItems 25
           - name: id | type: string | description: Modifier group GUID.  | validation: minLength 1, maxLength 36
           - name: name | type: TranslatableString | description: Modifier group name.  
              - name: original | type: string | description: __Required.__ String in the site's default language as defined in the [request envelope](https://dev.wix.com/docs/build-apps/develop-your-app/frameworks/self-hosting/supported-extensions/backend-extensions/add-self-hosted-service-plugin-extensions.md#request-envelope).  Min: 1 character. Max: 200 characters.  | validation: minLength 1, maxLength 200
              - name: translated | type: string | description: String translated into the buyer's language.  Min: 1 character. Max: 400 characters. Default: Same as `original`.  | validation: minLength 1, maxLength 400
           - name: modifiers | type: array<ItemModifier> | description: List of modifiers in this group.  | validation: minItems 1, maxItems 25
              - name: id | type: string | description: Modifier GUID.  | validation: minLength 1, maxLength 36
              - name: quantity | type: integer | description: The quantity of this modifier.  | validation: minimum 1, maximum 100000, format int32
              - name: label | type: TranslatableString | description: Primary display label for the modifier.  
              - name: details | type: TranslatableString | description: Additional details.  
              - name: price | type: string | description: The price of the modifier.  | validation: decimalValue {"gte":"0","lte":"1000000000000000","maxScale":3}
     - name: couponCode | type: string | description: Coupon code.  Note that a checkout can only hold one `couponCode` at a time. If an additional `couponCode` is added, it will override the existing `couponCode`. For additional information, see the Coupons API.  
     - name: customContentReference | type: CustomContentReference | description: Reference GUIDs for the app and component providing custom checkout page content.  To access and manage custom checkout page content, your app must have the permission scope named "Manage eCommerce - Admin Permissions". Learn more about [permission scopes](https://dev.wix.com/docs/build-apps/develop-your-app/access/authorization/about-permissions.md).  
        - name: appId | type: string | description: GUID of the app providing the content.  You can get your app's GUID from its page in the [app dashboard](https://dev.wix.com/dc3/my-apps/).  | validation: format GUID
        - name: componentId | type: string | description: GUID of the component within the app it belongs to.  You can get your component's GUID from its page in the [app dashboard](https://dev.wix.com/dc3/my-apps/).  | validation: format GUID
     - name: externalReference | type: ExternalReference | description: References to an external app and resource associated with the checkout. Used for integration and tracking across different platforms.  | validation: immutable
        - name: appId | type: string | description: GUID of the app associated with the purchase flow. For example, the Wix Pay Links app GUID.  | validation: format GUID, immutable
        - name: resourceId | type: string | description: Reference to an external resource GUID. Used to link the purchase flow to a specific entity in an external system. For example, a Wix Pay Link GUID.  | validation: minLength 1, maxLength 100, immutable
  - name: pagingMetadata | type: CursorPagingMetadata | description: Paging metadata.  
     - name: count | type: integer | description: Number of items returned in the response.  | validation: format int32
     - name: cursors | type: Cursors | description: Offset that was requested.  
        - name: next | type: string | description: Cursor pointing to next page in the list of results.  
        - name: prev | type: string | description: Cursor pointing to previous page in the list of results.  
     - name: hasNext | type: boolean | description: Indicates if there are more results after the current page. If `true`, another page of results can be retrieved. If `false`, this is the last page.  


```

### Examples

### Query Checkout Templates using Cursor Paging
```curl
curl -X POST \
  'https://www.wixapis.com/ecom/v1/checkout-templates/query' \
  -H 'Authorization: <AUTH>' \
  -H 'Content-Type: application/json' \
  -d '{
    "query": {
      "sort": [],
      "filter": {
        "status": "ACTIVE"
      },
      "cursorPaging": {
        "limit": 3
      }
    }
  }'
```

---

## JavaScript SDK

### Schema

```
 Method: wixClientAdmin.ecom.checkoutTemplates.queryCheckoutTemplates(query)
 Description: Retrieves a list of checkout templates, given the provided paging, filtering, and sorting.  Query Checkout Templates runs with these defaults, which you can override: - `id` sorted in `ASC` order  The following table shows field support for filters and sorting for the checkout template object:  | Field              | Supported Filters                                         | Sortable | | ------------------ | --------------------------------------------------------- | -------- | | `id`               | `$eq`, `$ne`, `$in`, `$startsWith`, `$exists`, `$hasSome` | Sortable | | `status`           | `$eq`, `$ne`, `$in`, `$exists`, `$hasSome`                | Sortable |  To learn about working with _Query_ endpoints, see [API Query Language](https://dev.wix.com/api/rest/getting-started/api-query-language), [Sorting and Paging](https://dev.wix.com/api/rest/getting-started/sorting-and-paging), and [Field Projection](https://dev.wix.com/api/rest/getting-started/field-projection).
 # Note: If the parameter `a.b` is listed under required parameters, `b` is only required if `a` is also present.
 Required parameters:  query
 Method parameters: 
   param name: query | type: CheckoutTemplateQuery   | required: true 
     - name: cursorPaging | type: CursorPaging | description: Cursor token pointing to a page of results. Not used in the first request. Following requests use the cursor token and not `filter` or `sort`.  
        - name: limit | type: integer | description: Number of items to load.  | validation: minimum 0, maximum 100, format int32
        - name: cursor | type: string | description: Pointer to the next or previous page in the list of results. </ br>  You can get the relevant cursor token from the `pagingMetadata` object in the previous call's response. Not relevant for the first request.  
        - name: filter | type: object | description: Filter object in the following format: `"filter" : { "fieldName1": "value1", "fieldName2":{"$operator":"value2"} }`  Example of operators: `$eq`, `$ne`, `$in`, `$startsWith`, `$exists`, `$hasSome`  
        - name: sort | type: array<Sorting> | description: Sort object in the following format: `[{"fieldName":"sortField1","order":"ASC"},{"fieldName":"sortField2","order":"DESC"}]`  
           - name: fieldName | type: string | description: Name of the field to sort by.  
           - name: order | type: SortOrder | description: Sort order.  
                 - enum:
                 -     ASC: Ascending order.
                 -     DESC: Descending order.
 Query fields:
   - field: _id | operators: $eq, $ne, $in, $exists, $gt, $gte, $lt, $lte, $startsWith | sort: ASC, DESC | aggregatable: undefined | searchable: undefined
   - field: status | operators: $eq, $ne, $in, $exists | sort: ASC, DESC | aggregatable: undefined | searchable: undefined
 Return type: PROMISE<QueryCheckoutTemplatesResponse>
  - name: checkoutTemplates | type: array<CheckoutTemplate> | description: Retrieved checkout templates.  
     - name: _id | type: string | description: Checkout template GUID.  | read-only: true | validation: format GUID
     - name: status | type: Status | description: Status of the checkout template.  When `status` is `INACTIVE` checkouts will not be created with this template `id`. Instead, the endpoint will redirect to the domain site.  Default: `ACTIVE`  
         - enum: ACTIVE, INACTIVE
     - name: customization | type: CheckoutCustomization | description: Custom settings to apply to the checkout page created from this template.  
        - name: webClient | type: WebClientCustomization | description: Web client customizations. These customizations only apply to the standard Wix checkout page.  
           - name: disabledContinueShoppingButton | type: boolean | description: Whether to disable the "Continue shopping" button.  Default: `false`  
           - name: disabledPolicyAgreementCheckbox | type: boolean | description: Whether to disable policy agreement checkout in the checkout page  Default: `false`  
        - name: lockedGiftCard | type: boolean | description: Whether to lock the ability to add or remove a gift card.  Default: `false`  
        - name: lockedCoupon | type: boolean | description: Whether to lock the ability to apply or remove a coupon code.  Default: `false`  
        - name: disabledManualPayment | type: boolean | description: Whether to disable manual payment option for this checkout.  Default: `false`  
     - name: lineItems | type: array<LineItem> | description: Catalog line items.  Max: 300 items  | validation: maxItems 300
        - name: quantity | type: integer | description: Item quantity.  Min: `1` <br /> Max: `100000`  | validation: minimum 1, maximum 100000
        - name: catalogReference | type: CatalogReference | description: Catalog and item reference. Holds GUIDs for the item and the catalog it came from, as well as further optional info. Optional for custom line items, which don't trigger the Catalog service plugin.  
           - name: catalogItemId | type: string | description: GUID of the item within the catalog it belongs to.  | validation: minLength 1, maxLength 36
           - name: appId | type: string | description: GUID of the app providing the catalog.  You can get your app's GUID from its page in the [app dashboard](https://dev.wix.com/dc3/my-apps/).  For items from Wix catalogs, the following values always apply: + Wix Stores: `"215238eb-22a5-4c36-9e7b-e7c08025e04e"` + Wix Bookings: `"13d21c63-b5ec-5912-8397-c3a5ddb27a97"` + Wix Restaurants: `"9a5d83fd-8570-482e-81ab-cfa88942ee60"`  | validation: minLength 1
           - name: options | type: object | description: Additional item details in `key:value` pairs.  Use this optional field for more specificity with item selection. The values of the `options` field differ depending on which catalog is providing the items.  For Wix Stores products, learn more about integrating with [Catalog V3](https://dev.wix.com/docs/api-reference/business-solutions/stores/catalog-v3/e-commerce-integration.md) or [Catalog V1](https://dev.wix.com/docs/api-reference/business-solutions/stores/catalog-v1/catalog/e-commerce-integration.md), depending on [the version the site uses](https://dev.wix.com/docs/api-reference/business-solutions/stores/catalog-versioning/introduction.md).  
        - name: catalogOverrideFields | type: CatalogOverrideFields | description: Overriding values for catalog item properties.  
           - name: productName | type: ProductName | description: Item name.  
              - name: original | type: string | description: __Required.__ Item name in the site's default language as defined in the [request envelope](https://dev.wix.com/docs/build-apps/develop-your-app/frameworks/self-hosting/supported-extensions/backend-extensions/add-self-hosted-service-plugin-extensions.md#request-envelope).  Min: 1 character. Max: 200 characters.  | validation: minLength 1, maxLength 200
              - name: translated | type: string | description: Item name translated into the buyer's language.  Min: 1 character. Max: 400 characters. Default: Same as `original`.  | validation: minLength 1, maxLength 400
           - name: price | type: string | description: Item price **after** discounts.  | validation: decimalValue {"gte":"0","lte":"999999999","maxScale":3}
           - name: fullPrice | type: string | description: Item price **before** discounts.  | validation: decimalValue {"gte":"0","lte":"999999999","maxScale":3}
           - name: descriptionLines | type: array<DescriptionLine> | description: Item description lines. Used when displaying the line item to customers.  | validation: minItems 0, maxItems 20
              - ONE-OF: 
                 - name: plainText | type: PlainTextValue | description: Description line plain text value.  
                    - name: original | type: string | description: Description line plain text value in the site's default language as defined in the [request envelope](https://dev.wix.com/docs/build-apps/develop-your-app/frameworks/self-hosting/supported-extensions/backend-extensions/add-self-hosted-service-plugin-extensions.md#request-envelope).  | validation: maxLength 600
                    - name: translated | type: string | description: Description line plain text value translated into the buyer's language.  Default: Same as `original`.  | validation: maxLength 600
                 - name: colorInfo | type: Color | description: Description line color value.  
                    - name: original | type: string | description: Description line color name in the site's default language as defined in the [request envelope](https://dev.wix.com/docs/build-apps/develop-your-app/frameworks/self-hosting/supported-extensions/backend-extensions/add-self-hosted-service-plugin-extensions.md#request-envelope).  | validation: maxLength 500
                    - name: translated | type: string | description: Description line color name translated into the buyer's language.  Default: Same as `original`.  | validation: maxLength 500
                    - name: code | type: string | description: HEX or RGB color code for display.  
              - name: name | type: DescriptionLineName | description: Description line name.  
                 - name: original | type: string | description: Description line name in the site's default language as defined in the [request envelope](https://dev.wix.com/docs/build-apps/develop-your-app/frameworks/self-hosting/supported-extensions/backend-extensions/add-self-hosted-service-plugin-extensions.md#request-envelope).  | validation: maxLength 100
                 - name: translated | type: string | description: Description line name translated into the buyer's language.  Default: Same as `original`.  | validation: maxLength 200
           - name: physicalProperties | type: PhysicalProperties | description: Physical properties of the item.  
              - name: weight | type: number | description: Line item weight. Measurement unit matches the weight unit specified in `weightUnit` in the request.  
              - name: sku | type: string | description: Stock-keeping unit. Learn more about [SKUs](https://www.wix.com/encyclopedia/definition/stock-keeping-unit-sku).  | validation: maxLength 40
              - name: shippable | type: boolean | description: Whether this line item is shippable.  
              - name: productDimensions | type: Dimensions | description: Product dimensions (length, width, height of the physical product).  
                 - name: length | type: string | description: Length. Measurement unit is handled at the system level (metric/imperial).  | validation: decimalValue {"gte":"0","lte":"999999999","maxScale":6}
                 - name: width | type: string | description: Width. Measurement unit is handled at the system level (metric/imperial).  | validation: decimalValue {"gte":"0","lte":"999999999","maxScale":6}
                 - name: height | type: string | description: Height. Measurement unit is handled at the system level (metric/imperial).  | validation: decimalValue {"gte":"0","lte":"999999999","maxScale":6}
                 - name: unit | type: DimensionsUnit | description: Unit of measurement for dimensions (length, width, height).  
                         - enum:
                         -     UNKNOWN_DIMENSIONS_UNIT: 
                         -     MM: Millimeters.
                         -     CM: Centimeters.
                         -     M: Meters.
                         -     IN: Inches.
                         -     FT: Feet.
                         -     YD: Yards.
              - name: packageDimensions | type: Dimensions | description: Package dimensions (length, width, height of the shipping package).  
           - name: image | type: string | description: Item image.  
           - name: paymentOption | type: PaymentOption | description: Payment method selected for the item.  
              - name: value | type: PaymentOptionType | description: Type of selected payment option for current item.  Default: `FULL_PAYMENT_ONLINE`  
                     - enum:
                     -     FULL_PAYMENT_ONLINE: The entire payment for this item happens as part of the checkout.
                     -     FULL_PAYMENT_OFFLINE: The entire payment for this item happens after checkout. For example, when using cash, check, or other offline payment methods.
                     -     MEMBERSHIP: Payment for this item is done by charging a membership. Any remaining amount not covered by the membership, such as item modifiers, is paid online.
                     -     DEPOSIT_ONLINE: Partial payment to be paid upfront during checkout. The initial amount to be paid for each line item is specified in `depositAmount`.
                     -     MEMBERSHIP_OFFLINE: Payment for this item can only be done by charging a membership and must be manually redeemed in the dashboard by the site admin. When selected, `price` is `0`.
                     -     MEMBERSHIP_ONLINE_WITH_OFFLINE_REMAINDER: Item price is charged to online membership. Any remaining amount not covered by the membership, such as item modifiers, is paid offline.
           - name: depositAmount | type: string | description: Only eligible for catalog items with `lineItem.paymentOption.value` type of `DEPOSIT_ONLINE`.  | validation: format DECIMAL_VALUE, decimalValue {"gt":"0","lte":"999999999","maxScale":3}
           - name: savePaymentMethod | type: boolean | description: Whether to save the payment method on the order.  Default: `false`  
           - name: inventoryAppId | type: string | description: GUID of the app managing the inventory.  | validation: format GUID
           - name: fixedQuantity | type: boolean | description: Whether the line item quantity is fixed and can't be changed. When not set, falls back to the value from the catalog.  
     - name: customLineItems | type: array<CustomLineItem> | description: Custom line items. Custom line items don't trigger the Catalog service plugin.  Max: 300 items  | validation: maxItems 300
        - name: quantity | type: integer | description: Custom line item quantity.  Min: `1` Max: `100000`  | validation: minimum 1, maximum 100000
        - name: price | type: string | description: Custom line item price.  Must be a number or a decimal without symbols.  | validation: format DECIMAL_VALUE, decimalValue {"gte":"0","lte":"1000000000000000"}
        - name: priceDescription | type: PriceDescription | description: Additional description for the price. For example, when price is 0 but additional details about the actual price are needed - "Starts at $67".  
           - name: original | type: string | description: __Required.__ Price description in the site's default language as defined in the [request envelope](https://dev.wix.com/docs/build-apps/develop-your-app/frameworks/self-hosting/supported-extensions/backend-extensions/add-self-hosted-service-plugin-extensions.md#request-envelope).  | validation: minLength 1, maxLength 100
           - name: translated | type: string | description: Price description translated into the buyer's language.  Default: Same as `original`.  | validation: minLength 1, maxLength 100
        - name: descriptionLines | type: array<DescriptionLine> | description: Custom line item description lines. Used for display purposes for the cart, checkout and order.  | validation: maxItems 10
        - name: media | type: string | description: Custom line item's media.  
        - name: taxGroupId | type: string | description: Tax group GUID for this custom line item.  | validation: format GUID
        - name: productName | type: ProductName | description: Name of the item or product.  
        - name: url | type: string | description: URL to the item's page on the site. When not provided, the link back from the cart page to the relevant product page will not work.  
        - name: itemType | type: ItemType | description: Item type. Either a preset type or custom.  
           - ONE-OF: 
              - name: preset | type: ItemTypePreset | description: Preset item type.  
                     - enum: UNRECOGNISED, PHYSICAL, DIGITAL, GIFT_CARD, SERVICE
              - name: custom | type: string | description: Custom item type. When none of the preset types are suitable, specifies the custom type.  
        - name: fullPrice | type: string | description: Item price **before** catalog-defined discount. Defaults to `price` when not provided.  | validation: format DECIMAL_VALUE
        - name: quantityAvailable | type: integer | description: Item quantity available for purchase. Only return this if inventory is managed. Not returning this field means that the buyer can "infinitely" tick up the number of items in the cart.  | validation: minimum 0, maximum 100000, format int32
        - name: physicalProperties | type: PhysicalProperties | description: Physical properties of the item.  
        - name: paymentOption | type: PaymentOptionType | description: Type of selected payment option for current item. Defaults to `FULL_PAYMENT_ONLINE`.  + `FULL_PAYMENT_ONLINE` - Entire payment for this item happens as part of the checkout. + `FULL_PAYMENT_OFFLINE` - Entire payment for this item happens after the checkout. For example, when using cash, check, or other offline payment methods. + `MEMBERSHIP` - Payment for this item is done by charging a membership. When this option is used, `lineItem.price.amount` is 0. + `DEPOSIT_ONLINE` -  Partial payment for the given item to be paid upfront during the checkout. Amount to be paid is defined by deposit_amount field.  
        - name: serviceProperties | type: ServiceProperties | description: Service properties. When relevant, this contains information such as date and number of participants. Used, among other things, when checking for valid memberships.  
           - name: scheduledDate | type: Date | description: Date and time the service is to be provided, in [ISO-8601](https://en.wikipedia.org/wiki/ISO_8601#Combined_date_and_time_representations) format. For example, the start time of a class.  
           - name: numberOfParticipants | type: integer | description: The number of people participating in the service. For example, the number of people attending a class or the number of people per hotel room.  | validation: minimum 1, maximum 10000, format int32
        - name: rootCatalogItemId | type: string | description: In cases where `catalogReference.catalogItemId` is NOT the actual catalog item GUID, this field will return the true item's GUID.  + For example, for Wix Bookings, `catalogReference.catalogItemId` is the booking GUID. Therefore this value is set to the service GUID. + In most cases, this field is the same as `catalogReference.catalogItemId`. + Used in membership validation.  | validation: minLength 1, maxLength 36
        - name: depositAmount | type: string | description: Partial payment for the given item to be paid upfront during the checkout.  Eligible for catalog items with type `DEPOSIT_ONLINE`. When omitted, the item's price will not be split and is expected to be paid in a single installment.  | validation: format DECIMAL_VALUE
        - name: deliveryProfileId | type: string | description: Delivery profile GUID.  | validation: format GUID
        - name: catalogReference | type: CatalogReference | description: Catalog and item reference. Includes GUIDs for the item and the catalog it came from, as well as further optional info. Optional for custom line items, which don't trigger the Catalog service plugin.  
        - name: priceUndetermined | type: boolean | description: Whether the price is not yet defined, and will be updated after the order is created.  Default: `false`  
        - name: fixedQuantity | type: boolean | description: Whether the line item quantity is fixed and cannot be changed.  Default: `false`  
        - name: consentRequiredPaymentPolicy | type: string | description: Item payment policy that requires customer consent to complete purchase. The payment policy will be displayed on the checkout page.  | read-only: true | validation: minLength 1, maxLength 1000
        - name: savePaymentMethod | type: boolean | description: Whether to save the payment method on the order.  Default: `false`  | read-only: true 
        - name: policies | type: array<Policy> | description: Policies to be displayed to the customer on the checkout page.  | validation: maxItems 5
           - name: title | type: string | description: Policy title - should be translated  | validation: minLength 1, maxLength 29
           - name: content | type: string | description: Policy content - should be translated  | validation: minLength 1, maxLength 3000
        - name: membersOnly | type: boolean | description: Whether the item can only be purchased by site members.  Default: `false`  
        - name: taxableAddress | type: TaxableAddress | description: Address to use for tax calculation purposes.  
           - ONE-OF: 
              - name: addressType | type: TaxableAddressType | description: taxable address type. if this field is selected, the address is automatically resolved, and the tax is calculated accordingly.  
                     - enum: BUSINESS, BILLING, SHIPPING
        - name: modifierGroups | type: array<ModifierGroup> | description: Modifier groups that were added to the item.  | validation: maxItems 25
           - name: _id | type: string | description: Modifier group GUID.  | validation: minLength 1, maxLength 36
           - name: name | type: TranslatableString | description: Modifier group name.  
              - name: original | type: string | description: __Required.__ String in the site's default language as defined in the [request envelope](https://dev.wix.com/docs/build-apps/develop-your-app/frameworks/self-hosting/supported-extensions/backend-extensions/add-self-hosted-service-plugin-extensions.md#request-envelope).  Min: 1 character. Max: 200 characters.  | validation: minLength 1, maxLength 200
              - name: translated | type: string | description: String translated into the buyer's language.  Min: 1 character. Max: 400 characters. Default: Same as `original`.  | validation: minLength 1, maxLength 400
           - name: modifiers | type: array<ItemModifier> | description: List of modifiers in this group.  | validation: minItems 1, maxItems 25
              - name: _id | type: string | description: Modifier GUID.  | validation: minLength 1, maxLength 36
              - name: quantity | type: integer | description: The quantity of this modifier.  | validation: minimum 1, maximum 100000, format int32
              - name: label | type: TranslatableString | description: Primary display label for the modifier.  
              - name: details | type: TranslatableString | description: Additional details.  
              - name: price | type: string | description: The price of the modifier.  | validation: decimalValue {"gte":"0","lte":"1000000000000000","maxScale":3}
     - name: couponCode | type: string | description: Coupon code.  Note that a checkout can only hold one `couponCode` at a time. If an additional `couponCode` is added, it will override the existing `couponCode`. For additional information, see the Coupons API.  
     - name: customContentReference | type: CustomContentReference | description: Reference GUIDs for the app and component providing custom checkout page content.  To access and manage custom checkout page content, your app must have the permission scope named "Manage eCommerce - Admin Permissions". Learn more about [permission scopes](https://dev.wix.com/docs/build-apps/develop-your-app/access/authorization/about-permissions.md).  
        - name: appId | type: string | description: GUID of the app providing the content.  You can get your app's GUID from its page in the [app dashboard](https://dev.wix.com/dc3/my-apps/).  | validation: format GUID
        - name: componentId | type: string | description: GUID of the component within the app it belongs to.  You can get your component's GUID from its page in the [app dashboard](https://dev.wix.com/dc3/my-apps/).  | validation: format GUID
     - name: externalReference | type: ExternalReference | description: References to an external app and resource associated with the checkout. Used for integration and tracking across different platforms.  | validation: immutable
        - name: appId | type: string | description: GUID of the app associated with the purchase flow. For example, the Wix Pay Links app GUID.  | validation: format GUID, immutable
        - name: resourceId | type: string | description: Reference to an external resource GUID. Used to link the purchase flow to a specific entity in an external system. For example, a Wix Pay Link GUID.  | validation: minLength 1, maxLength 100, immutable
  - name: pagingMetadata | type: CursorPagingMetadata | description: Paging metadata.  
     - name: count | type: integer | description: Number of items returned in the response.  | validation: format int32
     - name: cursors | type: Cursors | description: Offset that was requested.  
        - name: next | type: string | description: Cursor pointing to next page in the list of results.  
        - name: prev | type: string | description: Cursor pointing to previous page in the list of results.  
     - name: hasNext | type: boolean | description: Indicates if there are more results after the current page. If `true`, another page of results can be retrieved. If `false`, this is the last page.  


```

### Examples

### queryCheckoutTemplates
```javascript
import { checkoutTemplates } from '@wix/ecom';

async function queryCheckoutTemplates(query) {
  const response = await checkoutTemplates.queryCheckoutTemplates(query);
};
```

### queryCheckoutTemplates (with elevated permissions)
```javascript
import { checkoutTemplates } from '@wix/ecom';
import { auth } from '@wix/essentials';

async function myQueryCheckoutTemplatesMethod(query) {
  const elevatedQueryCheckoutTemplates = auth.elevate(checkoutTemplates.queryCheckoutTemplates);
  const response = await elevatedQueryCheckoutTemplates(query);
}
```

### queryCheckoutTemplates (self-managed)
Self-managed SDK calls require you to [create a client](https://dev.wix.com/docs/sdk/articles/work-with-the-sdk/about-the-wix-client.md).

```javascript
import { createClient } from '@wix/sdk';
import { checkoutTemplates } from '@wix/ecom';
// Import the auth strategy for the relevant access type
// Import the relevant host module if needed

const myWixClient = createClient ({
  modules: { checkoutTemplates },
  // Include the auth strategy and host as relevant
});


async function queryCheckoutTemplates(query) {
  const response = await myWixClient.checkoutTemplates.queryCheckoutTemplates(query);
};
```

---