Megaventory API v2017a

<back to all web services

DashboardBoxGet

The following routes are available for this service:
GET POST/DashboardBox/DashboardBoxGetGets Dashboard boxesUses your API key and some Filters in an array format and returns the search results using the given filters. Optionally, you can use ReturnTopNRecords to limit the number of the results to the specifed number (omit, or add ReturnTopNRecords = -1 to get all the available results). The ReturnTopNRecords chooses the top records in a DashboardBoxID in a descending order.

Examples:



A.


Return the first Dashboard box of the Sales Orders

Value:

 {
  "Filters": [
    {
      "FieldName": "DashboardBoxGridType",
      "SearchOperator": "Equals",
      "SearchValue": "sales_orders"
    }
  ],
  "ReturnTopNRecords": "1"
}

Response:

{
  "mvDashboardBoxes": [
    {
      "DashboardBoxID": 4572,
      "DashboardBoxTitle": "Main Warehouse Only",
      "DashboardBoxDescription": "",
      "DashboardBoxType": "sell",
      "DashboardBoxGridType": "sales_orders"
    }
  ],
  "ResponseStatus": {
    "ErrorCode": "0"
  }
}

B.


Return all the Dashboard boxes belonging to Sales Orders or Purchase Orders. ReturnTopNRecords = -1 may be omitted in this case.

Value:

{
    "Filters": [
        {
            "FieldName": "DashboardBoxGridType",
            "SearchOperator": "Equals",
            "SearchValue": "sales_orders"
        },
        {
            "AndOr": "Or",
            "FieldName": "DashboardBoxGridType",
            "SearchOperator": "Equals",
            "SearchValue": "purchase_orders"
        }
    ],
    "ReturnTopNRecords": "-1"
}

Response:

{
  "mvDashboardBoxes": [
    {
      "DashboardBoxID": 4572,
      "DashboardBoxTitle": "Main Warehouse Only",
      "DashboardBoxDescription": "",
      "DashboardBoxType": "sell",
      "DashboardBoxGridType": "sales_orders"
    },
    {
      "DashboardBoxID": 4569,
      "DashboardBoxTitle": "Only Shipped",
      "DashboardBoxDescription": "",
      "DashboardBoxType": "sell",
      "DashboardBoxGridType": "sales_orders"
    },
    {
      "DashboardBoxID": 4559,
      "DashboardBoxTitle": "POs due Next 30d",
      "DashboardBoxDescription": "",
      "DashboardBoxType": "purchase",
      "DashboardBoxGridType": "purchase_orders"
    },
    {
      "DashboardBoxID": 4540,
      "DashboardBoxTitle": "POs to receive today/tomorrow",
      "DashboardBoxDescription": "",
      "DashboardBoxType": "purchase",
      "DashboardBoxGridType": "purchase_orders"
    },
    {
      "DashboardBoxID": 4538,
      "DashboardBoxTitle": "Need to be packed",
      "DashboardBoxDescription": "",
      "DashboardBoxType": "sell",
      "DashboardBoxGridType": "sales_orders"
    },
    {
      "DashboardBoxID": 4535,
      "DashboardBoxTitle": "Expensive SOs to GO",
      "DashboardBoxDescription": "",
      "DashboardBoxType": "sell",
      "DashboardBoxGridType": "sales_orders"
    },
    {
      "DashboardBoxID": 4534,
      "DashboardBoxTitle": "not completed",
      "DashboardBoxDescription": "",
      "DashboardBoxType": "sell",
      "DashboardBoxGridType": "sales_orders"
    },
    {
      "DashboardBoxID": 4531,
      "DashboardBoxTitle": "POs to approve",
      "DashboardBoxDescription": "",
      "DashboardBoxType": "purchase",
      "DashboardBoxGridType": "purchase_orders"
    },
    {
      "DashboardBoxID": 4530,
      "DashboardBoxTitle": "POs exp. next week",
      "DashboardBoxDescription": "",
      "DashboardBoxType": "purchase",
      "DashboardBoxGridType": "purchase_orders"
    },
    {
      "DashboardBoxID": 4529,
      "DashboardBoxTitle": "POs exp. today",
      "DashboardBoxDescription": "",
      "DashboardBoxType": "purchase",
      "DashboardBoxGridType": "purchase_orders"
    },
    {
      "DashboardBoxID": 4528,
      "DashboardBoxTitle": "Approved POs",
      "DashboardBoxDescription": "",
      "DashboardBoxType": "purchase",
      "DashboardBoxGridType": "purchase_orders"
    },
    {
      "DashboardBoxID": 4526,
      "DashboardBoxTitle": "Approved Sales Orders",
      "DashboardBoxDescription": "",
      "DashboardBoxType": "sell",
      "DashboardBoxGridType": "sales_orders"
    },
    {
      "DashboardBoxID": 3499,
      "DashboardBoxTitle": "All SOs",
      "DashboardBoxDescription": "",
      "DashboardBoxType": "sell",
      "DashboardBoxGridType": "sales_orders"
    },
    {
      "DashboardBoxID": 2496,
      "DashboardBoxTitle": "All Purchase Orders",
      "DashboardBoxDescription": "",
      "DashboardBoxType": "purchase",
      "DashboardBoxGridType": "purchase_orders"
    }
  ],
  "ResponseStatus": {
    "ErrorCode": "0"
  }
}

To override the Content-type in your clients HTTP Accept Header, append the .json suffix or ?format=json

To embed the response in a jsonp callback, append ?callback=myCallback

HTTP + JSON

The following are sample HTTP requests and responses. The placeholders shown need to be replaced with actual values.

POST /json/reply/DashboardBoxGet HTTP/1.1 
Host: api.megaventory.com 
Content-Type: application/json
Content-Length: length

{"Filters":[{"AndOr":"And","Group":"Undefined","FieldName":"String","SearchOperator":"Undefined","SearchValue":"String"}],"ReturnTopNRecords":0,"APIKEY":"String"}
HTTP/1.1 200 OK
Content-Type: application/json
Content-Length: length

{"ResponseStatus":{"ErrorCode":"String","Message":"String","StackTrace":"String","Errors":[{"ErrorCode":"String","FieldName":"String","Message":"String"}]},"InternalErrorCode":"String"}