NOTE: User must me logged in as admin to access this API

URL : service-desk/api/product-list

Method : GET

Query Parameters :

 

Parameter Type Possible Values Required/Optional Description
sort-field String name Optional Field name to sort
sort-order String asc, desc Optional Sorting order either ascending or descending
search-query String Optional Keyword to be searched in problem list page
limit Integer Optional Number of records to be displayed in each page
page Integer Optional Page number
product_ids Array Optional Array of product ids
name String Optional Name of the product
description text Optional Description of the product
manufacturer string Optional Manufacturer of the product
status_ids Array Optional Array of status ids
asset_type_ids Array Optional Array of asset type ids
department_ids Array Optional Array of department ids
procurement_mode_ids Array Optional Array of procurement mode ids

Success Response:

{ .       
  "success": true,
  "data": {
    "current_page": 1,
    "first_page_url": "http://localhost:8888/faveo-helpdesk-advance/public/service-desk/api/product-list?page=1",
    "from": 1,
    "last_page": 1,
    "last_page_url": "http://localhost:8888/faveo-helpdesk-advance/public/service-desk/api/product-list?page=1",
    "next_page_url": null,
    "path": "http://localhost:8888/faveo-helpdesk-advance/public/service-desk/api/product-list",
    "per_page": 10,
    "prev_page_url": null,
    "to": 3,
    "total": 3,
    "products": [
     {
       "id": 4,
       "name": "abhi",
       "description": "qwerty",
       "manufacturer": "apple",
       "status": {
         "id": 1,
         "name": "In Pipeline"
       },
       "created_at": "2019-11-28 07:25:57",
       "updated_at": "2019-11-28 07:25:57",
       "asset_type": {
         "id": 3,
         "name": "Hardware"
       },
       "department": {
         "id": 1,
         "name": "Support"
       },
       "procurement_mode": {
         "id": 2,
         "name": "Lease"
       }
      },
      {
        "id": 5,
        "name": "abhi",
        "description": "qwerty",
        "manufacturer": "apple",
        "status": {
          "id": 1,
          "name": "In Pipeline"
        },
        "created_at": "2019-11-28 07:33:50",
        "updated_at": "2019-11-28 07:33:50",
        "asset_type": {
          "id": 3,
          "name": "Hardware"
        },
        "department": {
          "id": 1,
          "name": "Support"
                       },
        "procurement_mode": {
          "id": 1,
          "name": "Buy"
        }
       },
      {
        "id": 6,
        "name": "abhi",
        "description": "qwerty",
        "manufacturer": "apple",
        "status": {
          "id": 1,
          "name": "In Pipeline"
        },
        "created_at": "2019-11-28 07:33:57",
        "updated_at": "2019-11-28 07:33:57",
        "asset_type": {
          "id": 3,
          "name": "Hardware"
        },
        "department": {
            "id": 1,
            "name": "Support"
        },
        "procurement_mode": {
            "id": 1,
            "name": "Buy"
        }
    }]
  }
}

Leave a Reply

Your email address will not be published. Required fields are marked *