> To build a Wix site agentically, or add Wix features like bookings or a store to a site you already have, follow https://www.wix.com/headless/skill.md
> 
> 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

# ListRelatedProductsByServiceIds

# Package: services

# Namespace: RelatedProductsService

# Method link: https://dev.wix.com/docs/api-reference/business-solutions/bookings/services/related-products/list-related-products-by-service-ids.md

## Permission Scopes:
Manage Bookings: SCOPE.DC-BOOKINGS.MANAGE-BOOKINGS

## Introduction

Retrieves the related products settings of up to 100 Bookings services, and optionally
summaries of the Wix Stores products related to them.

Services without related products settings aren't included in the response.

When `includeProducts` is `true`, the response also includes `productSummaries`: the Wix Stores products
that have any of the returned `productTagIds` as a public or private tag.
`productSummaries` is a single list for all requested services. Each product appears once,
and the list is sorted by the product's lowest price, from highest to lowest.
To find the products for a specific service, match each product's `tags` against that service's `productTagIds`.

Site visitors and members receive only products that are visible on the site.
Apps and Wix users can also receive hidden products. To show only products that site visitors can see,
call this method with a site visitor or member identity.

Specifying more than 100 service IDs returns an `INVALID_ARGUMENT` error.

---

## REST API

### Schema

```
 Method: listRelatedProductsByServiceIds
 Description: Retrieves the related products settings of up to 100 Bookings services, and optionally summaries of the Wix Stores products related to them.  Services without related products settings aren't included in the response.  When `includeProducts` is `true`, the response also includes `productSummaries`: the Wix Stores products that have any of the returned `productTagIds` as a public or private tag. `productSummaries` is a single list for all requested services. Each product appears once, and the list is sorted by the product's lowest price, from highest to lowest. To find the products for a specific service, match each product's `tags` against that service's `productTagIds`.  Site visitors and members receive only products that are visible on the site. Apps and Wix users can also receive hidden products. To show only products that site visitors can see, call this method with a site visitor or member identity.  Specifying more than 100 service GUIDs returns an `INVALID_ARGUMENT` error.
 URL: https://www.wixapis.com/_api/bookings/related-products/list-by-service-ids
 Method: POST
 # Note: If the parameter `a.b` is listed under required parameters, `b` is only required if `a` is also present.
 Required parameters:  serviceIds
 Method parameters: 
   param name: cursorPaging | type: CursorPaging    
        - name: limit | type: integer | description: Maximum number of items to return in the results.  | validation: minimum 0, maximum 100, format int32
        - name: cursor | type: string | description: Pointer to the next or previous page in the list of results.  Pass the relevant cursor token from the `pagingMetadata` object in the previous call's response. Not relevant for the first request.  | validation: maxLength 16000
   param name: includeProducts | type: includeProducts | description: Whether to return `productSummaries` and `pagingMetadata` in the response.  Default: `false`  
   param name: serviceIds | type: array<serviceIds> | description: IDs of the Bookings services to retrieve related products settings for.  Max: 100 service GUIDs | required: true | validation: maxItems 100, format GUID
 Return type: ListRelatedProductsByServiceIdsResponse
  - name: relatedProducts | type: array<RelatedProducts> | description: Related products settings of the requested services. Includes 1 entry for each requested service that has settings. Services without settings aren't included.  
     - name: id | type: string | description: GUID of the related products settings.  | read-only: true | validation: format GUID
     - name: revision | type: string | description: Revision number, which increments by 1 each time the related products settings are updated. To prevent conflicting changes, the current revision must be passed when updating the related products settings.  | read-only: true | validation: format int64
     - name: createdDate | type: string | description: Date and time the related products settings were created.  | read-only: true | validation: format date-time
     - name: updatedDate | type: string | description: Date and time the related products settings were last updated.  | read-only: true | validation: format date-time
     - name: serviceId | type: string | description: GUID of the Bookings service the settings belong to. A service has at most 1 related products settings object.  When the service is deleted, its related products settings are deleted too.  | validation: format GUID, immutable
     - name: productTagIds | type: array<string> | description: IDs of Wix Stores product tags. Products that have any of these tags, as a public or private tag, are related to the service.  When a tag is deleted, its GUID is removed from `productTagIds`.  Max: 100 tag GUIDs  | validation: maxItems 100, maxLength 5
     - name: name | type: string | description: Optional name of the related products settings.  | validation: maxLength 200
     - name: description | type: string | description: Optional description of the related products settings.  | validation: maxLength 2000
  - name: productSummaries | type: array<RelatedProductSummary> | description: Summaries of the Wix Stores products that have any of the returned `productTagIds` as a public or private tag. Returned only when `includeProducts` is `true`.  A single list for all requested services. Each product appears once. Sorted by the product's lowest price, from highest to lowest. To find the products for a specific service, match each product's `tags` against that service's `productTagIds`.  
     - name: id | type: string | description: Product GUID.  | validation: format GUID
     - name: name | type: string | description: Product name.  | validation: maxLength 500
     - name: slug | type: string | description: Product slug, used in the product page URL.  | validation: maxLength 500
     - name: url | type: string | description: Product page URL.  | validation: maxLength 2048
     - name: description | type: string | description: Product description in plain text.  | validation: maxLength 5000
     - name: media | type: Image | description: Product's main image.  
        - name: id | type: string | description: WixMedia image GUID.  | validation: maxLength 2048
        - name: url | type: string | description: Image URL.  | validation: maxLength 2048
        - name: height | type: integer | description: Original image height.  | read-only: true 
        - name: width | type: integer | description: Original image width.  | read-only: true 
        - name: altText | type: string | description: Image alt text.  | validation: maxLength 2048
     - name: price | type: Money | description: Lowest current selling price across the product's variants, before automatic discounts. Includes `value`, `currency`, and `formattedValue`.  
        - name: value | type: string | description: Monetary amount. Decimal string with a period as a decimal separator (e.g., 3.99).  | validation: format DECIMAL_VALUE, decimalValue {"gte":"0","maxScale":2}
        - name: currency | type: string | description: Currency code. Must be valid ISO 4217 currency code (e.g., USD).  | validation: format CURRENCY
        - name: formattedValue | type: string | description: Monetary amount. Decimal string in local format (e.g., 1 000,30).  | read-only: true | validation: maxLength 50
     - name: compareAtPrice | type: Money | description: Lowest compare-at price (original price before discounts) across the product's variants. Returned when the product has a compare-at price. The product is on sale when `compareAtPrice.value` is higher than `price.value`.  
     - name: ribbon | type: string | description: Ribbon text displayed on the product, such as "Sale" or "New".  | validation: maxLength 100
     - name: availabilityStatus | type: AvailabilityStatus | description: Product's stock availability.  
         - enum:
         -     AVAILABILITY_STATUS_UNKNOWN: Unknown availability status.
         -     IN_STOCK: All variants are in stock and available for purchase.
         -     OUT_OF_STOCK: All variants are out of stock.
         -     PARTIALLY_OUT_OF_STOCK: Some variants are out of stock and some are in stock and available for purchase.
     - name: optionsOrModifiersSupported | type: boolean | description: Whether the product has options or modifiers that the customer must choose before purchase. When `true`, send the customer to the product page instead of offering a direct "buy" action.  
     - name: tags | type: Tags | description: Public and private tag GUIDs assigned to the product. Use them to match the product to the services whose `productTagIds` include any of these tags.  
        - name: publicTagIds | type: array<string> | description: IDs of the product's public tags.  | validation: maxItems 100, maxLength 5
        - name: privateTagIds | type: array<string> | description: IDs of the product's private tags.  | validation: maxItems 100, maxLength 5
     - name: discountInfo | type: DiscountInfo | description: Automatic discounts that apply to the product.  
        - name: discountRuleNames | type: array<string> | description: Names of the automatic discount rules that apply to the product.  These discounts are reflected in `variantSummary.minPriceVariant.priceAfterDiscount`. `price` and `compareAtPrice` don't include them.  | validation: maxItems 100, maxLength 100
     - name: variantSummary | type: VariantSummary | description: Number of variants and the visible variant with the lowest current selling price.  
        - name: variantCount | type: integer | description: Total number of variants for the product.  
        - name: minPriceVariant | type: MinPriceVariant | description: The visible variant with the lowest current selling price, before automatic discounts. Hidden variants aren't considered. If several variants have the same price, the first one in the product's variant order is returned. Not returned when the product has no visible variants.  
           - name: id | type: string | description: Variant GUID.  | validation: format GUID
           - name: price | type: Money | description: Current selling price of the variant.  
           - name: compareAtPrice | type: Money | description: Compare-at (original) price of the variant.  
           - name: priceAfterDiscount | type: Money | description: Current selling price of the variant after automatic discounts are applied. The applied discounts are listed in `discountInfo.discountRuleNames`.  
     - name: minVariantPriceInfo | type: MinVariantPriceInfo | description: Prices and SKU of the variant with the lowest base price, as calculated by Wix Stores.  
        - name: actualPrice | type: Money | description: Current selling price of the cheapest variant.  
        - name: compareAtPrice | type: Money | description: Compare-at (original) price of the cheapest variant.  
        - name: sku | type: string | description: SKU of the cheapest variant.  | validation: maxLength 40
  - name: pagingMetadata | type: CursorPagingMetadata | description: Paging metadata for `productSummaries` only. Returned only when `includeProducts` is `true`. When no products match, `count` is `0` and `hasNext` is `false`.  
     - name: count | type: integer | description: Number of items returned in current page.  | validation: format int32
     - name: cursors | type: Cursors | description: Cursor strings that point to the next page, previous page, or both.  
        - name: next | type: string | description: Cursor string pointing to the next page in the list of results.  | validation: maxLength 16000
        - name: prev | type: string | description: Cursor pointing to the previous page in the list of results.  | validation: maxLength 16000
     - name: hasNext | type: boolean | description: Whether there are more pages to retrieve following the current page.  + `true`: Another page of results can be retrieved. + `false`: This is the last page.  

 Possible Errors:
   HTTP Code: 500 | Status Code: INTERNAL | Application Code: STORES_UNAVAILABLE | Description: Couldn't retrieve the related products from Wix Stores. Try again later, or set `includeProducts` to `false` to retrieve only the related products settings.


```

### Examples

### List related products settings for services
Retrieves the related products settings of 2 services. The second service has no settings, so it isn't included in the response.

```curl
curl -X POST \
'https://www.wixapis.com/bookings/v1/related-products/list-by-service-ids' \
-H 'Authorization: <AUTH>' \
-H 'Content-Type: application/json' \
-d '{
  "serviceIds": [
    "a1b2c3d4-e5f6-7890-abcd-ef1234567890",
    "0f9e8d7c-6b5a-4321-9876-543210fedcba"
  ]
}'
```

### List related products settings with product summaries
Retrieves the related products settings of a service, together with summaries of the Wix Stores products that have any of its product tags. The first page holds 2 products.

```curl
curl -X POST \
'https://www.wixapis.com/bookings/v1/related-products/list-by-service-ids' \
-H 'Authorization: <AUTH>' \
-H 'Content-Type: application/json' \
-d '{
  "serviceIds": [
    "a1b2c3d4-e5f6-7890-abcd-ef1234567890"
  ],
  "includeProducts": true,
  "cursorPaging": {
    "limit": 2
  }
}'
```

---

## JavaScript SDK

### Schema

```
 Method: wixClientAdmin.bookings.relatedProducts.listRelatedProductsByServiceIds(serviceIds, options)
 Description: Retrieves the related products settings of up to 100 Bookings services, and optionally summaries of the Wix Stores products related to them.  Services without related products settings aren't included in the response.  When `includeProducts` is `true`, the response also includes `productSummaries`: the Wix Stores products that have any of the returned `productTagIds` as a public or private tag. `productSummaries` is a single list for all requested services. Each product appears once, and the list is sorted by the product's lowest price, from highest to lowest. To find the products for a specific service, match each product's `tags` against that service's `productTagIds`.  Site visitors and members receive only products that are visible on the site. Apps and Wix users can also receive hidden products. To show only products that site visitors can see, call this method with a site visitor or member identity.  Specifying more than 100 service GUIDs returns an `INVALID_ARGUMENT` error.
 # Note: If the parameter `a.b` is listed under required parameters, `b` is only required if `a` is also present.
 Required parameters:  serviceIds
 Method parameters: 
   param name: serviceIds | type: array<string> | description: IDs of the Bookings services to retrieve related products settings for.  Max: 100 service GUIDs | required: true | validation: maxItems 100, format GUID
   param name: options | type: ListRelatedProductsByServiceIdsOptions  none  
        - name: includeProducts | type: boolean | description: Whether to return `productSummaries` and `pagingMetadata` in the response.  Default: `false`  
        - name: cursorPaging | type: CursorPaging | description: Cursor paging for `productSummaries` only. All matching related products settings are always returned. Ignored when `includeProducts` is `false`.  Default: `limit` of `100`  To retrieve the next page, specify the cursor from `pagingMetadata.cursors.next` and the same `serviceIds`.  
           - name: limit | type: integer | description: Maximum number of items to return in the results.  | validation: minimum 0, maximum 100, format int32
           - name: cursor | type: string | description: Pointer to the next or previous page in the list of results.  Pass the relevant cursor token from the `pagingMetadata` object in the previous call's response. Not relevant for the first request.  | validation: maxLength 16000
 Return type: PROMISE<ListRelatedProductsByServiceIdsResponse>
  - name: relatedProducts | type: array<RelatedProducts> | description: Related products settings of the requested services. Includes 1 entry for each requested service that has settings. Services without settings aren't included.  
     - name: _id | type: string | description: GUID of the related products settings.  | read-only: true | validation: format GUID
     - name: revision | type: string | description: Revision number, which increments by 1 each time the related products settings are updated. To prevent conflicting changes, the current revision must be passed when updating the related products settings.  | read-only: true | validation: format int64
     - name: _createdDate | type: Date | description: Date and time the related products settings were created.  | read-only: true 
     - name: _updatedDate | type: Date | description: Date and time the related products settings were last updated.  | read-only: true 
     - name: serviceId | type: string | description: GUID of the Bookings service the settings belong to. A service has at most 1 related products settings object.  When the service is deleted, its related products settings are deleted too.  | validation: format GUID, immutable
     - name: productTagIds | type: array<string> | description: IDs of Wix Stores product tags. Products that have any of these tags, as a public or private tag, are related to the service.  When a tag is deleted, its GUID is removed from `productTagIds`.  Max: 100 tag GUIDs  | validation: maxItems 100, maxLength 5
     - name: name | type: string | description: Optional name of the related products settings.  | validation: maxLength 200
     - name: description | type: string | description: Optional description of the related products settings.  | validation: maxLength 2000
  - name: productSummaries | type: array<RelatedProductSummary> | description: Summaries of the Wix Stores products that have any of the returned `productTagIds` as a public or private tag. Returned only when `includeProducts` is `true`.  A single list for all requested services. Each product appears once. Sorted by the product's lowest price, from highest to lowest. To find the products for a specific service, match each product's `tags` against that service's `productTagIds`.  
     - name: _id | type: string | description: Product GUID.  | validation: format GUID
     - name: name | type: string | description: Product name.  | validation: maxLength 500
     - name: slug | type: string | description: Product slug, used in the product page URL.  | validation: maxLength 500
     - name: url | type: string | description: Product page URL.  | validation: maxLength 2048
     - name: description | type: string | description: Product description in plain text.  | validation: maxLength 5000
     - name: media | type: string | description: Product's main image.  
     - name: price | type: Money | description: Lowest current selling price across the product's variants, before automatic discounts. Includes `value`, `currency`, and `formattedValue`.  
        - name: value | type: string | description: Monetary amount. Decimal string with a period as a decimal separator (e.g., 3.99).  | validation: format DECIMAL_VALUE, decimalValue {"gte":"0","maxScale":2}
        - name: currency | type: string | description: Currency code. Must be valid ISO 4217 currency code (e.g., USD).  | validation: format CURRENCY
        - name: formattedValue | type: string | description: Monetary amount. Decimal string in local format (e.g., 1 000,30).  | read-only: true | validation: maxLength 50
     - name: compareAtPrice | type: Money | description: Lowest compare-at price (original price before discounts) across the product's variants. Returned when the product has a compare-at price. The product is on sale when `compareAtPrice.value` is higher than `price.value`.  
     - name: ribbon | type: string | description: Ribbon text displayed on the product, such as "Sale" or "New".  | validation: maxLength 100
     - name: availabilityStatus | type: AvailabilityStatus | description: Product's stock availability.  
         - enum:
         -     AVAILABILITY_STATUS_UNKNOWN: Unknown availability status.
         -     IN_STOCK: All variants are in stock and available for purchase.
         -     OUT_OF_STOCK: All variants are out of stock.
         -     PARTIALLY_OUT_OF_STOCK: Some variants are out of stock and some are in stock and available for purchase.
     - name: optionsOrModifiersSupported | type: boolean | description: Whether the product has options or modifiers that the customer must choose before purchase. When `true`, send the customer to the product page instead of offering a direct "buy" action.  
     - name: tags | type: Tags | description: Public and private tag GUIDs assigned to the product. Use them to match the product to the services whose `productTagIds` include any of these tags.  
        - name: publicTagIds | type: array<string> | description: IDs of the product's public tags.  | validation: maxItems 100, maxLength 5
        - name: privateTagIds | type: array<string> | description: IDs of the product's private tags.  | validation: maxItems 100, maxLength 5
     - name: discountInfo | type: DiscountInfo | description: Automatic discounts that apply to the product.  
        - name: discountRuleNames | type: array<string> | description: Names of the automatic discount rules that apply to the product.  These discounts are reflected in `variantSummary.minPriceVariant.priceAfterDiscount`. `price` and `compareAtPrice` don't include them.  | validation: maxItems 100, maxLength 100
     - name: variantSummary | type: VariantSummary | description: Number of variants and the visible variant with the lowest current selling price.  
        - name: variantCount | type: integer | description: Total number of variants for the product.  
        - name: minPriceVariant | type: MinPriceVariant | description: The visible variant with the lowest current selling price, before automatic discounts. Hidden variants aren't considered. If several variants have the same price, the first one in the product's variant order is returned. Not returned when the product has no visible variants.  
           - name: _id | type: string | description: Variant GUID.  | validation: format GUID
           - name: price | type: Money | description: Current selling price of the variant.  
           - name: compareAtPrice | type: Money | description: Compare-at (original) price of the variant.  
           - name: priceAfterDiscount | type: Money | description: Current selling price of the variant after automatic discounts are applied. The applied discounts are listed in `discountInfo.discountRuleNames`.  
     - name: minVariantPriceInfo | type: MinVariantPriceInfo | description: Prices and SKU of the variant with the lowest base price, as calculated by Wix Stores.  
        - name: actualPrice | type: Money | description: Current selling price of the cheapest variant.  
        - name: compareAtPrice | type: Money | description: Compare-at (original) price of the cheapest variant.  
        - name: sku | type: string | description: SKU of the cheapest variant.  | validation: maxLength 40
  - name: pagingMetadata | type: CursorPagingMetadata | description: Paging metadata for `productSummaries` only. Returned only when `includeProducts` is `true`. When no products match, `count` is `0` and `hasNext` is `false`.  
     - name: count | type: integer | description: Number of items returned in current page.  | validation: format int32
     - name: cursors | type: Cursors | description: Cursor strings that point to the next page, previous page, or both.  
        - name: next | type: string | description: Cursor string pointing to the next page in the list of results.  | validation: maxLength 16000
        - name: prev | type: string | description: Cursor pointing to the previous page in the list of results.  | validation: maxLength 16000
     - name: hasNext | type: boolean | description: Whether there are more pages to retrieve following the current page.  + `true`: Another page of results can be retrieved. + `false`: This is the last page.  

 Possible Errors:
   HTTP Code: 500 | Status Code: INTERNAL | Application Code: STORES_UNAVAILABLE | Description: Couldn't retrieve the related products from Wix Stores. Try again later, or set `includeProducts` to `false` to retrieve only the related products settings.


```

### Examples

### List related products settings with product summaries
Retrieves the related products settings of a service, together with summaries of the Wix Stores products that have any of its product tags. The first page holds 2 products.

```javascript
import { relatedProducts } from "@wix/bookings";

async function listRelatedProductsByServiceIds() {
  const response = await relatedProducts.listRelatedProductsByServiceIds(
    ["a1b2c3d4-e5f6-7890-abcd-ef1234567890"],
    {
      includeProducts: true,
      cursorPaging: { limit: 2 },
    },
  );
}

/* Promise resolves to:
 * {
 *   "relatedProducts": [
 *     {
 *       "_id": "8046df3c-7575-4098-a5ab-c91ad8f33c47",
 *       "revision": "2",
 *       "_createdDate": "2026-10-30T17:22:10.299Z",
 *       "_updatedDate": "2026-10-31T09:12:44.103Z",
 *       "serviceId": "a1b2c3d4-e5f6-7890-abcd-ef1234567890",
 *       "productTagIds": ["tg001", "tg002"],
 *       "name": "Yoga class add-ons",
 *       "description": "Mats and water bottles to offer with the class"
 *     }
 *   ],
 *   "productSummaries": [
 *     {
 *       "_id": "3c8e2f7a-1d4b-4e6f-9a0b-7c5d2e1f8a93",
 *       "name": "Yoga mat",
 *       "slug": "yoga-mat",
 *       "url": "https://www.example.com/product-page/yoga-mat",
 *       "description": "Non-slip mat, 6 mm thick.",
 *       "media": "wix:image://v1/a1b2c3_yogamat~mv2.jpg/yogamat.jpg#originWidth=1000&originHeight=1000",
 *       "price": { "value": "45.00", "currency": "USD", "formattedValue": "$45.00" },
 *       "compareAtPrice": { "value": "60.00", "currency": "USD", "formattedValue": "$60.00" },
 *       "ribbon": "Sale",
 *       "availabilityStatus": "IN_STOCK",
 *       "optionsOrModifiersSupported": true,
 *       "tags": { "publicTagIds": ["tg001"] },
 *       "discountInfo": { "discountRuleNames": ["10% off fitness gear"] },
 *       "variantSummary": {
 *         "variantCount": 3,
 *         "minPriceVariant": {
 *           "_id": "00000000-0000-0000-0000-000000000001",
 *           "price": { "value": "45.00", "currency": "USD", "formattedValue": "$45.00" },
 *           "compareAtPrice": { "value": "60.00", "currency": "USD", "formattedValue": "$60.00" },
 *           "priceAfterDiscount": { "value": "40.50", "currency": "USD", "formattedValue": "$40.50" }
 *         }
 *       },
 *       "minVariantPriceInfo": {
 *         "actualPrice": { "value": "45.00", "currency": "USD", "formattedValue": "$45.00" },
 *         "compareAtPrice": { "value": "60.00", "currency": "USD", "formattedValue": "$60.00" },
 *         "sku": "MAT-BLUE-6MM"
 *       }
 *     },
 *     {
 *       "_id": "9b1d4e6f-2a3c-4d5e-8f7a-1b2c3d4e5f60",
 *       "name": "Water bottle",
 *       "slug": "water-bottle",
 *       "url": "https://www.example.com/product-page/water-bottle",
 *       "description": "750 ml steel bottle.",
 *       "media": "wix:image://v1/a1b2c3_bottle~mv2.jpg/bottle.jpg#originWidth=1000&originHeight=1000",
 *       "price": { "value": "20.00", "currency": "USD", "formattedValue": "$20.00" },
 *       "availabilityStatus": "IN_STOCK",
 *       "optionsOrModifiersSupported": false,
 *       "tags": { "publicTagIds": ["tg002"] },
 *       "variantSummary": {
 *         "variantCount": 1,
 *         "minPriceVariant": {
 *           "_id": "00000000-0000-0000-0000-000000000000",
 *           "price": { "value": "20.00", "currency": "USD", "formattedValue": "$20.00" }
 *         }
 *       }
 *     }
 *   ],
 *   "pagingMetadata": {
 *     "count": 2,
 *     "cursors": {
 *       "next": "eyJmaWx0ZXIiOnsidGFncy5wdWJsaWNUYWdzLnRhZ0lkcyI6eyIkaGFzU29tZSI6WyJ0ZzAwMSIsInRnMDAyIl19fX0"
 *     },
 *     "hasNext": true
 *   }
 * }
 */

```

### List related products settings for services
Retrieves the related products settings of 2 services. The second service has no settings, so it isn't included in the response.

```javascript
import { relatedProducts } from "@wix/bookings";

async function listRelatedProductsByServiceIds() {
  const response = await relatedProducts.listRelatedProductsByServiceIds([
    "a1b2c3d4-e5f6-7890-abcd-ef1234567890",
    "0f9e8d7c-6b5a-4321-9876-543210fedcba",
  ]);
}

/* Promise resolves to:
 * {
 *   "relatedProducts": [
 *     {
 *       "_id": "8046df3c-7575-4098-a5ab-c91ad8f33c47",
 *       "revision": "2",
 *       "_createdDate": "2026-10-30T17:22:10.299Z",
 *       "_updatedDate": "2026-10-31T09:12:44.103Z",
 *       "serviceId": "a1b2c3d4-e5f6-7890-abcd-ef1234567890",
 *       "productTagIds": ["tg001", "tg002"],
 *       "name": "Yoga class add-ons",
 *       "description": "Mats and water bottles to offer with the class"
 *     }
 *   ]
 * }
 */

```

### listRelatedProductsByServiceIds (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 { relatedProducts } from '@wix/bookings';
// Import the auth strategy for the relevant access type
// Import the relevant host module if needed

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


async function listRelatedProductsByServiceIds(serviceIds,options) {
  const response = await myWixClient.relatedProducts.listRelatedProductsByServiceIds(serviceIds,options);
};
```

---