Perform a search for products
POST/search
Perform a search for products
Request
Query Parameters
Possible values: >= 1 and <= 100
The maximum number of results to return
Header Parameters
Your SaleCycle API Subscription key
- application/json
Body
required
- Array [
- ]
data objectrequired
Possible values: [simple, full]
The type of search.
Possible values: [name, price, brand, inStock, stockQuantity]
The field to order by.
Possible values: [asc, desc]
The order direction.
Possible values: >= 3 characters and <= 100 characters
The query to search for.
select string[]
Possible values: [name, description, price, tags, currency, category, brand, imageUrl, stockQuantity, inStock]
The fields to select from the result.
string
Possible values: [name, description, price, tags, currency, category, brand, imageUrl, stockQuantity, inStock]
The filter to apply to the search.
Responses
- 200
- 400
Successful operation
- application/json
- Schema
- Example (from schema)
Schema
- Array [
- ]
data object[]required
Possible values: [product]
Default value: product
attributes objectrequired
meta object
{
"data": [
{
"id": "product-1",
"type": "product",
"attributes": {
"name": "Product Name",
"description": "Product Description",
"price": 100,
"inStock": true,
"stockQuantity": 10,
"imageUrl": "https://example.com/image.jpg",
"tags": [
"clothing",
"t-shirt"
],
"currency": "USD",
"productId": "2ed25db3-d34a-4a8c-8439-7e9f3bb9c9a7",
"category": "Clothing",
"brand": "SaleCycle"
}
}
],
"meta": {
"totalResults": 12
}
}
Validation Error
- application/json
- Schema
- Example (from schema)
Schema
- Array [
- ]
errors object[]required
{
"errors": [
{
"status": "string",
"title": "string",
"detail": "string"
}
]
}