Request Item information

GET/api/items/{id}

Headers

FieldTypeDescription
authtoken String Authentication token, generated from admin area

Parameters

FieldTypeDescription
id Number optional Optional Item unique ID. If not provided, returns all items
curl -X GET "https://yoursite.com/api/items/123" \
  -H "authtoken: YOUR_API_TOKEN"

Success-Response (Single Item):

    HTTP/1.1 200 OK
    {
	      "id": "1",
       "description": "JBL Soundbar",
       "long_description": "The JBL Cinema SB110 is a hassle-free soundbar",
       "rate": "100.00",
       "tax": 1,
       "tax2": 2,
       "unit": "pcs",
       "group_id": 0
    }

Success-Response (All Items with Pagination):

HTTP/1.1 200 OK
{
  "data": [{...}, {...}],
  "meta": {
    "current_page": 1,
    "per_page": 20,
    "total": 137,
    "last_page": 7
  }
}

Error-Response:

HTTP/1.1 404 Not Found
{
  "status": false,
  "message": "No data were found"
}
MethodGET
Path/api/items/{id}
GroupItems
Sincev0.1.0
Defined inmodules/api/controllers/Items.php