Products
Search products
Searches products by the required q query parameter. Use GET /dev/v1/products to list products without a search term.
GET
/
dev
/
v1
/
products
/
search
Search products
curl --request GET \
--url https://api.shoppex.io/dev/v1/products/search \
--header 'Authorization: Bearer <token>'const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://api.shoppex.io/dev/v1/products/search', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://api.shoppex.io/dev/v1/products/search"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.shoppex.io/dev/v1/products/search",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://api.shoppex.io/dev/v1/products/search"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("Authorization", "Bearer <token>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}{
"data": [
{
"id": "prod_db_1",
"uniqid": "prod_1",
"shop_id": "shop_1",
"slug": "starter-pack",
"type": "DYNAMIC",
"title": "Starter Pack",
"currency": "USD",
"price": 19.99,
"price_display": 19.99,
"description": "Product description",
"description_tabs": [
{
"title": "Features",
"content": "<p>Instant delivery, 24/7 support.</p>"
}
],
"gateways": [
"PAYPAL"
],
"custom_fields": [],
"delivery_instructions": null,
"volume_discounts": [],
"quantity_min": 1,
"quantity_max": -1,
"quantity_warning": 0,
"stock": 0,
"stock_delimiter": "\n",
"unlisted": false,
"private": false,
"on_hold": false,
"sort_priority": 0,
"crypto_confirmations": 1,
"max_risk_level": 0,
"block_vpn_proxies": false,
"delivery_text": "",
"delivery_time": null,
"service_text": "",
"dynamic_webhook": null,
"created_at": 1711965600,
"updated_at": 1711965600,
"variants": [
{
"id": "var_1",
"uniqid": "var_1",
"title": "Monthly",
"description": null,
"price": 9.99,
"price_display": 9.99,
"stock": 5,
"is_default": true,
"sort_order": 0
}
]
}
],
"pagination": {
"next_cursor": null,
"has_more": false
}
}{
"error": {
"code": "<string>",
"message": "<string>",
"doc_url": "<string>",
"details": [
{
"field": "<string>",
"message": "<string>"
}
]
}
}{
"error": {
"code": "<string>",
"message": "<string>",
"doc_url": "<string>",
"details": [
{
"field": "<string>",
"message": "<string>"
}
]
}
}{
"error": {
"code": "<string>",
"message": "<string>",
"doc_url": "<string>",
"details": [
{
"field": "<string>",
"message": "<string>"
}
]
}
}{
"error": {
"code": "VALIDATION_ERROR",
"message": "Validation failed",
"doc_url": "https://docs.shoppex.io/api-reference/errors",
"details": [
{
"field": "q",
"message": "Search query is required"
}
]
}
}{
"error": {
"code": "<string>",
"message": "<string>",
"doc_url": "<string>",
"details": [
{
"field": "<string>",
"message": "<string>"
}
]
}
}Authorizations
Use your Shoppex API key in the Authorization header.
Query Parameters
Required string length:
1 - 128Locale for translated catalog content.
⌘I
Search products
curl --request GET \
--url https://api.shoppex.io/dev/v1/products/search \
--header 'Authorization: Bearer <token>'const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://api.shoppex.io/dev/v1/products/search', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://api.shoppex.io/dev/v1/products/search"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.shoppex.io/dev/v1/products/search",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://api.shoppex.io/dev/v1/products/search"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("Authorization", "Bearer <token>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}{
"data": [
{
"id": "prod_db_1",
"uniqid": "prod_1",
"shop_id": "shop_1",
"slug": "starter-pack",
"type": "DYNAMIC",
"title": "Starter Pack",
"currency": "USD",
"price": 19.99,
"price_display": 19.99,
"description": "Product description",
"description_tabs": [
{
"title": "Features",
"content": "<p>Instant delivery, 24/7 support.</p>"
}
],
"gateways": [
"PAYPAL"
],
"custom_fields": [],
"delivery_instructions": null,
"volume_discounts": [],
"quantity_min": 1,
"quantity_max": -1,
"quantity_warning": 0,
"stock": 0,
"stock_delimiter": "\n",
"unlisted": false,
"private": false,
"on_hold": false,
"sort_priority": 0,
"crypto_confirmations": 1,
"max_risk_level": 0,
"block_vpn_proxies": false,
"delivery_text": "",
"delivery_time": null,
"service_text": "",
"dynamic_webhook": null,
"created_at": 1711965600,
"updated_at": 1711965600,
"variants": [
{
"id": "var_1",
"uniqid": "var_1",
"title": "Monthly",
"description": null,
"price": 9.99,
"price_display": 9.99,
"stock": 5,
"is_default": true,
"sort_order": 0
}
]
}
],
"pagination": {
"next_cursor": null,
"has_more": false
}
}{
"error": {
"code": "<string>",
"message": "<string>",
"doc_url": "<string>",
"details": [
{
"field": "<string>",
"message": "<string>"
}
]
}
}{
"error": {
"code": "<string>",
"message": "<string>",
"doc_url": "<string>",
"details": [
{
"field": "<string>",
"message": "<string>"
}
]
}
}{
"error": {
"code": "<string>",
"message": "<string>",
"doc_url": "<string>",
"details": [
{
"field": "<string>",
"message": "<string>"
}
]
}
}{
"error": {
"code": "VALIDATION_ERROR",
"message": "Validation failed",
"doc_url": "https://docs.shoppex.io/api-reference/errors",
"details": [
{
"field": "q",
"message": "Search query is required"
}
]
}
}{
"error": {
"code": "<string>",
"message": "<string>",
"doc_url": "<string>",
"details": [
{
"field": "<string>",
"message": "<string>"
}
]
}
}