Skip to content

list-marketplace-crosssell-products

Method: GET
Path: /catalog/marketplace/products/cross-sell

Tags: Marketplace

Summary

Retrieve cross-sell products

Description

Retrieves a list of products specified for cross selling. The cross-sell products are returned based on product ids specified in request param.

TypeScript Definition

typescript
"list-marketplace-crosssell-products": {
        parameters: {
            query?: {
                /** @description no of rows per page */
                limit?: number;
                /** @description page number in pagination */
                page?: number;
                /** @description Product ids of cart items */
                product_id?: string[];
                /** @description json to sort records */
                sort_by?: string;
            };
            header?: {
                /** @description This param is used to determine product pricing, promotions, and subscription rates.  If a valid customer group id is provided, pricing details will be retrieved accordingly.  If no matching data is found for the specified customer group id, the system will fall back to the default customer group id.  If no data is found for the default group either, the highest applicable price will be returned. */
                "x-customer-group-id"?: components["parameters"]["CustomerGroupId"];
            };
            path?: never;
            cookie?: never;
        };
        requestBody?: never;
        responses: {
            /** @description Success response */
            200: {
                headers: {
                    [name: string]: unknown;
                };
                content: {
                    "application/json": {
                        message: string;
                        success: boolean;
                        content: {
                            products: components["schemas"]["Item"][];
                            pagination: components["schemas"]["Pagination"];
                        };
                    };
                };
            };
            401: components["responses"]["Unauthorized"];
            404: components["responses"]["NotFound"];
        };
    };

Component References

ReferenceResolves To
components["parameters"]["CustomerGroupId"]CustomerGroupId
components["schemas"]["Item"]Item
components["schemas"]["Pagination"]Pagination
components["responses"]["Unauthorized"]Unauthorized
components["responses"]["NotFound"]NotFound

Parameters

  • x-customer-group-id (header): This param is used to determine product pricing, promotions, and subscription rates. If a valid customer group id is provided, pricing details will be retrieved accordingly. If no matching data is found for the specified customer group id, the system will fall back to the default customer group id. If no data is found for the default group either, the highest applicable price will be returned.
  • limit (query): no of rows per page
  • page (query): page number in pagination
  • product_id (query): Product ids of cart items
  • sort_by (query): json to sort records

Responses

200

Success response

401

Not authorized for given operation on the Resource

404

Requested resource not found

OpenAPI Definition

json
{
  "tags": [
    "Marketplace"
  ],
  "operationId": "list-marketplace-crosssell-products",
  "summary": "Retrieve cross-sell products",
  "description": "Retrieves a list of products specified for cross selling. The cross-sell products are returned based on product ids specified in request param.",
  "externalDocs": {
    "url": "https://llm-docs.commercengine.io/storefront/operations/list-marketplace-crosssell-products",
    "description": "API reference for the list-marketplace-crosssell-products operation"
  },
  "parameters": [
    {
      "$ref": "#/components/parameters/CustomerGroupId"
    },
    {
      "name": "limit",
      "in": "query",
      "description": "no of rows per page",
      "schema": {
        "type": "integer"
      }
    },
    {
      "name": "page",
      "in": "query",
      "description": "page number in pagination",
      "schema": {
        "type": "integer"
      }
    },
    {
      "name": "product_id",
      "in": "query",
      "description": "Product ids of cart items",
      "schema": {
        "type": "array",
        "items": {
          "type": "string"
        }
      }
    },
    {
      "name": "sort_by",
      "in": "query",
      "description": "json to sort records",
      "schema": {
        "type": "string"
      }
    }
  ],
  "responses": {
    "200": {
      "description": "Success response",
      "content": {
        "application/json": {
          "schema": {
            "type": "object",
            "required": [
              "message",
              "success",
              "content"
            ],
            "properties": {
              "message": {
                "type": "string"
              },
              "success": {
                "type": "boolean"
              },
              "content": {
                "properties": {
                  "products": {
                    "type": "array",
                    "items": {
                      "$ref": "#/components/schemas/Item"
                    }
                  },
                  "pagination": {
                    "$ref": "#/components/schemas/Pagination"
                  }
                },
                "required": [
                  "products",
                  "pagination"
                ],
                "type": "object"
              }
            }
          }
        }
      }
    },
    "401": {
      "$ref": "#/components/responses/Unauthorized"
    },
    "404": {
      "$ref": "#/components/responses/NotFound"
    }
  },
  "security": [
    {
      "Authorization": []
    }
  ],
  "x-speakeasy-group": "marketplace",
  "x-speakeasy-ignore": false,
  "x-speakeasy-name-override": "listCrosssellProducts"
}

Auto-generated from OpenAPI spec and TypeScript definitions

Last updated: