Products API
Fetch product information from your store.
List Products
http
GET /api/external/v1/productsQuery Parameters
| Parameter | Type | Description |
|---|---|---|
page | integer | Page number (default: 1) |
per_page | integer | Items per page (default: 15, max: 100) |
category | string | Filter by category slug |
type | string | Filter by type: digital, subscription, physical |
is_active | boolean | Filter by active status |
search | string | Search in name and description |
sort | string | Sort field: name, price, created_at |
order | string | Sort order: asc, desc |
Example Request
bash
curl -X GET "https://yourstore.pixlpay.net/api/external/v1/products?category=ranks&sort=price&order=asc" \
-H "Authorization: Bearer YOUR_TOKEN" \
-H "Accept: application/json"Response
json
{
"success": true,
"data": [
{
"id": 1,
"name": "VIP Rank",
"slug": "vip-rank",
"description": "Access to VIP features and perks",
"price": "9.99",
"compare_price": "14.99",
"type": "digital",
"category": {
"id": 1,
"name": "Ranks",
"slug": "ranks"
},
"images": [
{
"url": "https://cdn.pixlpay.net/...",
"is_primary": true
}
],
"is_active": true,
"stock": null,
"created_at": "2025-01-15T10:30:00Z",
"updated_at": "2025-01-15T10:30:00Z"
}
],
"meta": {
"current_page": 1,
"last_page": 3,
"per_page": 15,
"total": 42
}
}Get Single Product
http
GET /api/external/v1/products/{id}Example Request
bash
curl -X GET "https://yourstore.pixlpay.net/api/external/v1/products/1" \
-H "Authorization: Bearer YOUR_TOKEN" \
-H "Accept: application/json"Response
json
{
"success": true,
"data": {
"id": 1,
"name": "VIP Rank",
"slug": "vip-rank",
"description": "Access to VIP features and perks",
"price": "9.99",
"compare_price": "14.99",
"type": "digital",
"category": {
"id": 1,
"name": "Ranks",
"slug": "ranks"
},
"images": [
{
"url": "https://cdn.pixlpay.net/...",
"is_primary": true
}
],
"is_active": true,
"stock": null,
"delivery_servers": [
{
"id": 1,
"name": "Main Server"
}
],
"created_at": "2025-01-15T10:30:00Z",
"updated_at": "2025-01-15T10:30:00Z"
}
}Product Object
| Field | Type | Description |
|---|---|---|
id | integer | Unique identifier |
name | string | Product name |
slug | string | URL-friendly identifier |
description | string | Product description |
price | string | Current price |
compare_price | string | Original price (for discounts) |
type | string | digital, subscription, physical |
category | object | Category info |
images | array | Product images |
is_active | boolean | Whether product is available |
stock | integer | Stock quantity (null = unlimited) |
created_at | string | ISO 8601 timestamp |
updated_at | string | ISO 8601 timestamp |
Errors
| Status | Error | Description |
|---|---|---|
| 401 | Unauthorized | Invalid or missing token |
| 403 | Forbidden | Token lacks products:read scope |
| 404 | Not Found | Product doesn't exist |
