GET
5 min read
List Parts
GET
/api/v1/parts
Retrieve a paginated list of parts from your inventory
List Parts
Retrieve a paginated list of parts from companies you have access to.
Query Parameters
| Parameter | Type | Description |
|---|---|---|
company_id |
integer | Filter by specific company |
category |
string | Filter by part category |
stock_status |
string | Filter by stock status: in_stock, low_stock, out_of_stock |
search |
string | Search by name, part number, or SKU |
active_only |
boolean | Only return active parts |
per_page |
integer | Results per page (default: 15, max: 100) |
page |
integer | Page number |
Example Request
curl -X GET "https://hydra.marketdragon.ph/api/v1/parts?company_id=1&stock_status=low_stock" \
-H "Authorization: Bearer YOUR_API_TOKEN" \
-H "Accept: application/json"
Example Response
{
"data": [
{
"id": 1,
"company_id": 1,
"name": "Oil Filter",
"part_number": "OF-12345",
"sku": "SKU-001",
"description": "Premium oil filter for most vehicles",
"category": "Filters",
"brand": "FilterPro",
"cost_price": "150.00",
"selling_price": "250.00",
"quantity_in_stock": 5,
"reorder_level": 10,
"unit": "pcs",
"is_active": true,
"stock_status": "low_stock",
"is_low_stock": true,
"profit_margin": 66.67,
"thumbnail_url": null,
"image_url": null,
"created_at": "2024-01-15T08:30:00+00:00",
"updated_at": "2024-01-15T08:30:00+00:00"
}
],
"links": {
"first": "https://hydra.marketdragon.ph/api/v1/parts?page=1",
"last": "https://hydra.marketdragon.ph/api/v1/parts?page=5",
"prev": null,
"next": "https://hydra.marketdragon.ph/api/v1/parts?page=2"
},
"meta": {
"current_page": 1,
"from": 1,
"last_page": 5,
"per_page": 15,
"to": 15,
"total": 75
}
}
Back to Parts
Was this helpful?