GET
5 min read
Get Part
GET
/api/v1/parts/{id}
Retrieve a single part by ID
Get Part
Retrieve details of a specific part by its ID.
Path Parameters
| Parameter | Type | Description |
|---|---|---|
id |
integer | The part ID |
Example Request
curl -X GET "https://hydra.marketdragon.ph/api/v1/parts/1" \
-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": 25,
"reorder_level": 10,
"unit": "pcs",
"is_active": true,
"stock_status": "in_stock",
"is_low_stock": false,
"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"
}
}
Error Responses
403 Forbidden
{
"message": "You do not have access to this part."
}
404 Not Found
{
"message": "No query results for model [Part] 999"
}
Back to Parts
Was this helpful?