search-marketplace-products
Method: POST
Path: /catalog/marketplace/products/search
Tags: Marketplace catalog
Summary
Search products
Description
Search marketplace products. Results include item_id, seller_id and seller_detail when available; hsn_code, seo, metadata and shipping are omitted.
Storefront SDK Usage
SDK Method: sdk.catalog.searchMarketplaceProducts()
Example:
const { data, error } = await sdk.catalog.searchMarketplaceProducts({"query": "cotton shirt"}, {});TypeScript Definition
"search-marketplace-products": {
parameters: {
query?: never;
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: {
content: {
"application/json": components["schemas"]["SearchProduct"];
};
};
responses: {
/** @description Success response */
200: {
headers: {
[name: string]: unknown;
};
content: {
"application/json": {
message: string;
success: boolean;
content: {
skus: components["schemas"]["MarketplaceItemBase"][];
facet_distribution: {
[key: string]: {
[key: string]: number;
};
};
facet_stats: {
[key: string]: {
min: number;
max: number;
};
};
pagination: components["schemas"]["Pagination"];
};
};
};
};
/** @description The request is invalid. */
400: {
headers: {
[name: string]: unknown;
};
content: {
"application/json": {
message: string;
success: boolean;
code?: string;
errors?: {
[key: string]: unknown;
} | string;
content?: {
[key: string]: unknown;
};
};
};
};
401: components["responses"]["Unauthorized"];
403: components["responses"]["Forbidden"];
500: components["responses"]["InternalServerError"];
504: components["responses"]["GatewayTimeout"];
};
};Component References
| Reference | Resolves To |
|---|---|
components["parameters"]["CustomerGroupId"] | CustomerGroupId |
components["schemas"]["SearchProduct"] | SearchProduct |
components["schemas"]["MarketplaceItemBase"] | MarketplaceItemBase |
components["schemas"]["Pagination"] | Pagination |
components["responses"]["Unauthorized"] | Unauthorized |
components["responses"]["Forbidden"] | Forbidden |
components["responses"]["InternalServerError"] | InternalServerError |
components["responses"]["GatewayTimeout"] | GatewayTimeout |
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.
Request Body
Content Types: application/json
Responses
200
Success response
400
The request is invalid.
401
Authentication failed. Codes include token-required, token-expired and token_not_valid for an invalid or expired token.
403
Access denied. token-required requires an authenticated session; permission-denied means the caller cannot access this resource. On POS, session-expired requires signing in again.
500
The request failed because of an unexpected error.
504
The request timed out.
OpenAPI Definition
{
"tags": [
"Marketplace catalog"
],
"operationId": "search-marketplace-products",
"summary": "Search products",
"description": "Search marketplace products. Results include item_id, seller_id and seller_detail when available; hsn_code, seo, metadata and shipping are omitted.",
"externalDocs": {
"url": "https://llm-docs.commercengine.io/storefront/operations/search-marketplace-products",
"description": "API reference for the search-marketplace-products operation"
},
"parameters": [
{
"$ref": "#/components/parameters/CustomerGroupId"
}
],
"requestBody": {
"required": true,
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/SearchProduct"
},
"examples": {
"in-operator": {
"summary": "IN operator (string)",
"value": {
"query": "shoes",
"filter": "product_type IN [physical,bundle]"
}
},
"and-string": {
"summary": "AND via string",
"value": {
"query": "shoes",
"filter": "rating > 4 AND product_type = physical"
}
},
"or-string": {
"summary": "OR via string",
"value": {
"query": "shoes",
"filter": "product_type = physical OR product_type = bundle"
}
},
"and-array": {
"summary": "AND via array",
"value": {
"query": "shoes",
"filter": [
"rating > 4",
"product_type = physical"
]
}
},
"or-nested-array": {
"summary": "OR via nested array",
"value": {
"query": "shoes",
"filter": [
[
"product_type = physical",
"product_type = bundle"
]
]
}
},
"mixed-and-or": {
"summary": "AND + OR mixed",
"value": {
"query": "shoes",
"filter": [
"product_type = physical",
[
"product_type = bundle",
"rating > 4"
]
]
}
}
}
}
}
},
"responses": {
"200": {
"description": "Success response",
"content": {
"application/json": {
"schema": {
"type": "object",
"required": [
"message",
"success",
"content"
],
"properties": {
"message": {
"type": "string"
},
"success": {
"type": "boolean"
},
"content": {
"properties": {
"skus": {
"type": "array",
"items": {
"$ref": "#/components/schemas/MarketplaceItemBase"
}
},
"facet_distribution": {
"type": "object",
"additionalProperties": {
"type": "object",
"additionalProperties": {
"type": "integer"
}
}
},
"facet_stats": {
"type": "object",
"additionalProperties": {
"type": "object",
"properties": {
"min": {
"type": "number"
},
"max": {
"type": "number"
}
},
"required": [
"min",
"max"
]
}
},
"pagination": {
"$ref": "#/components/schemas/Pagination"
}
},
"required": [
"skus",
"facet_distribution",
"facet_stats",
"pagination"
],
"type": "object"
}
}
}
}
}
},
"400": {
"description": "The request is invalid.",
"content": {
"application/json": {
"schema": {
"type": "object",
"required": [
"message",
"success"
],
"properties": {
"message": {
"type": "string",
"x-speakeasy-error-message": true
},
"success": {
"type": "boolean"
},
"code": {
"type": "string"
},
"errors": {
"anyOf": [
{
"type": "object",
"additionalProperties": true
},
{
"type": "string"
}
]
},
"content": {
"additionalProperties": true,
"type": "object"
}
}
}
}
}
},
"401": {
"$ref": "#/components/responses/Unauthorized"
},
"403": {
"$ref": "#/components/responses/Forbidden"
},
"500": {
"$ref": "#/components/responses/InternalServerError"
},
"504": {
"$ref": "#/components/responses/GatewayTimeout"
}
},
"security": [
{
"Authorization": []
},
{
"X-Api-Key": []
}
],
"x-speakeasy-group": "marketplace",
"x-speakeasy-ignore": false,
"x-speakeasy-name-override": "searchProducts"
}Auto-generated from OpenAPI spec and TypeScript definitions