Skip to content

list-marketplace-products

Method: GET
Path: /catalog/marketplace/products

Tags: Marketplace

Summary

List all products

Description

Returns a list of your products. The products are returned sorted by creation date, with the most recently created products appearing first.

TypeScript Definition

typescript
"list-marketplace-products": {
        parameters: {
            query?: {
                /** @description page number of pagination list */
                page?: components["parameters"]["pageParam"];
                /** @description no of rows per page */
                limit?: components["parameters"]["pageLimitParam"];
                /** @description JSON string format: {"field1":"asc", "field2":"desc"} */
                sort_by?: components["parameters"]["sortingParam"];
                /** @description filter products by categories ids */
                category_id?: string[];
                /** @description filter products by categories slugs */
                category_slug?: string[];
                /** @description Determines whether to include or exlude inventory details in response json */
                inventory?: boolean;
            };
            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": {
                        /** @example Products retrieved successfully. */
                        message: string;
                        success: boolean;
                        content: {
                            products: components["schemas"]["Product"][];
                            pagination: components["schemas"]["Pagination"];
                        };
                    };
                };
            };
            401: components["responses"]["Unauthorized"];
            404: components["responses"]["NotFound"];
        };
    };

Component References

ReferenceResolves To
components["parameters"]["pageParam"]pageParam
components["parameters"]["pageLimitParam"]pageLimitParam
components["parameters"]["sortingParam"]sortingParam
components["parameters"]["CustomerGroupId"]CustomerGroupId
components["schemas"]["Product"]Product
components["schemas"]["Pagination"]Pagination
components["responses"]["Unauthorized"]Unauthorized
components["responses"]["NotFound"]NotFound

Parameters

  • page (query): page number of pagination list
  • limit (query): no of rows per page
  • sort_by (query): JSON string format: {"field1":"asc", "field2":"desc"}
  • 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.
  • category_id (query): filter products by categories ids
  • category_slug (query): filter products by categories slugs
  • inventory (query): Determines whether to include or exlude inventory details in response json

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-products",
  "summary": "List all products",
  "description": "Returns a list of your products. The products are returned sorted by creation date, with the most recently created products appearing first.",
  "externalDocs": {
    "url": "https://llm-docs.commercengine.io/storefront/operations/list-marketplace-products",
    "description": "API reference for the list-marketplace-products operation"
  },
  "parameters": [
    {
      "$ref": "#/components/parameters/pageParam"
    },
    {
      "$ref": "#/components/parameters/pageLimitParam"
    },
    {
      "$ref": "#/components/parameters/sortingParam"
    },
    {
      "$ref": "#/components/parameters/CustomerGroupId"
    },
    {
      "name": "category_id",
      "in": "query",
      "description": "filter products by categories ids",
      "schema": {
        "type": "array",
        "items": {
          "type": "string"
        }
      },
      "explode": true,
      "style": "form"
    },
    {
      "name": "category_slug",
      "in": "query",
      "description": "filter products by categories slugs",
      "schema": {
        "type": "array",
        "items": {
          "type": "string"
        }
      }
    },
    {
      "name": "inventory",
      "in": "query",
      "description": "Determines whether to include or exlude inventory details in response json",
      "schema": {
        "type": "boolean"
      }
    }
  ],
  "responses": {
    "200": {
      "description": "Success response",
      "content": {
        "application/json": {
          "schema": {
            "type": "object",
            "required": [
              "message",
              "success",
              "content"
            ],
            "properties": {
              "message": {
                "type": "string",
                "examples": [
                  "Products retrieved successfully."
                ]
              },
              "success": {
                "type": "boolean"
              },
              "content": {
                "properties": {
                  "products": {
                    "type": "array",
                    "items": {
                      "$ref": "#/components/schemas/Product"
                    }
                  },
                  "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": "listProducts"
}

Auto-generated from OpenAPI spec and TypeScript definitions

Last updated: