GET /wp-json/shoppex-integrations/v1/products
List products for external partners. If the authenticated partner has backorder enabled, the response includes all partner-visible products, including Supplier-origin products. If backorder is disabled, the response is limited to products with Shoppex warehouse stock: origin SC, or origin * when _stock_sc is greater than zero and WooCommerce stock status is instock. For origin *, the purchasable stock limit is _stock_sc.
Required headers
X-Shoppex-Key: pk_demo_partner_keyX-Shoppex-Timestamp: 1775726400X-Shoppex-Nonce: req-demo-001X-Shoppex-Signature: hmac_sha256_signature_placeholder
Request attributes
Required attributes
-
NoneThis endpoint does not require request body attributes.
Optional attributes
-
NoneNo optional request body attributes are currently supported for this endpoint.
Request example
curl -X GET "https://shop.shoppexcorp.com/wp-json/shoppex-integrations/v1/products" \
-H "X-Shoppex-Key: pk_demo_partner_key" \
-H "X-Shoppex-Timestamp: 1775726400" \
-H "X-Shoppex-Nonce: req-demo-001" \
-H "X-Shoppex-Signature: hmac_sha256_signature_placeholder"
Implementation snippets
Node.js
import crypto from 'node:crypto';
const baseUrl = 'https://your-shoppex-domain.com';
const partnerKey = 'YOUR_PARTNER_KEY';
const partnerSecret = 'YOUR_PARTNER_SECRET';
const method = 'GET';
const route = '/shoppex-integrations/v1/products';
const body = '';
const timestamp = Math.floor(Date.now() / 1000).toString();
const nonce = crypto.randomUUID();
const bodyHash = crypto.createHash('sha256').update(body).digest('hex');
const message = [method, route, timestamp, nonce, bodyHash].join('\n');
const signature = crypto
.createHmac('sha256', partnerSecret)
.update(message)
.digest('hex');
const response = await fetch(`${baseUrl}/wp-json/shoppex-integrations/v1/products`, {
method,
headers: {
'Content-Type': 'application/json',
'X-Shoppex-Key': partnerKey,
'X-Shoppex-Timestamp': timestamp,
'X-Shoppex-Nonce': nonce,
'X-Shoppex-Signature': signature,
},
});
const data = await response.json();
console.log(data);
cURL
<?php
$baseUrl = 'https://your-shoppex-domain.com';
$partnerKey = 'YOUR_PARTNER_KEY';
$partnerSecret = 'YOUR_PARTNER_SECRET';
$method = 'GET';
$route = '/shoppex-integrations/v1/products';
$body = '';
$timestamp = (string) time();
$nonce = bin2hex(random_bytes(16));
$bodyHash = hash('sha256', $body);
$message = implode("\n", [$method, $route, $timestamp, $nonce, $bodyHash]);
$signature = hash_hmac('sha256', $message, $partnerSecret);
$ch = curl_init($baseUrl . '/wp-json/shoppex-integrations/v1/products');
curl_setopt_array($ch, [
CURLOPT_CUSTOMREQUEST => $method,
CURLOPT_RETURNTRANSFER => true,
CURLOPT_HTTPHEADER => [
'Content-Type: application/json',
'X-Shoppex-Key: ' . $partnerKey,
'X-Shoppex-Timestamp: ' . $timestamp,
'X-Shoppex-Nonce: ' . $nonce,
'X-Shoppex-Signature: ' . $signature,
],
]);
if ($body !== '') {
curl_setopt($ch, CURLOPT_POSTFIELDS, $body);
}
$response = curl_exec($ch);
curl_close($ch);
echo $response;
requests
import hashlib
import hmac
import json
import time
import uuid
import requests
base_url = 'https://your-shoppex-domain.com'
partner_key = 'YOUR_PARTNER_KEY'
partner_secret = 'YOUR_PARTNER_SECRET'
method = 'GET'
route = '/shoppex-integrations/v1/products'
body = ''
timestamp = str(int(time.time()))
nonce = str(uuid.uuid4())
body_hash = hashlib.sha256(body.encode()).hexdigest()
message = '\n'.join([method, route, timestamp, nonce, body_hash])
signature = hmac.new(
partner_secret.encode(),
message.encode(),
hashlib.sha256
).hexdigest()
response = requests.request(
method,
base_url + '/wp-json/shoppex-integrations/v1/products',
headers={
'Content-Type': 'application/json',
'X-Shoppex-Key': partner_key,
'X-Shoppex-Timestamp': timestamp,
'X-Shoppex-Nonce': nonce,
'X-Shoppex-Signature': signature,
},
timeout=30,
)
print(response.status_code)
print(response.json())
Successful response example
[
{
"id": 12345,
"name": "Demo SC Product",
"price": "19.99",
"stock_quantity": 24,
"stock_sc": 24,
"origen": "SC",
"upc": "000000000001"
},
{
"id": 67890,
"name": "Demo Dual-Origin Product",
"price": "49.99",
"stock_quantity": 8,
"stock_sc": 8,
"origen": "*",
"upc": "000000000002"
}
]
Error response example
{
"code": "partner_auth_invalid_signature",
"message": "The HMAC signature does not match.",
"data": {
"status": 401
}
}
Possible error codes
| Code | Reason |
|---|---|
401 |
Missing HMAC headers, invalid timestamp, expired timestamp, reused nonce, invalid key, or incorrect signature. |
403 |
The partner does not have the products.read permission. |