Skip to main content
GET
/
products
List products
curl --request GET \
  --url http://localhost:3002/api/v1/products \
  --header 'Authorization: Bearer <token>'
{
  "success": true,
  "data": [
    {
      "id": "prod_123",
      "sku": "PROD-001",
      "name": "Product Name",
      "price": 100000,
      "description": "<string>",
      "category": "electronics",
      "cost": 75000,
      "stock": 50,
      "status": "active",
      "created_at": "2023-11-07T05:31:56Z",
      "updated_at": "2023-11-07T05:31:56Z"
    }
  ],
  "meta": {
    "page": 1,
    "limit": 20,
    "total": 150,
    "total_pages": 8
  }
}

Authorizations

Authorization
string
header
required

JWT Bearer token authentication

Query Parameters

page
integer
default:1

Page number

limit
integer
default:20

Items per page

Required range: x <= 100
category
string

Filter by category

status
enum<string>

Filter by status

Available options:
active,
inactive

Response

200 - application/json

Products list

success
boolean
Example:

true

data
object[]
meta
object