Description
Queries contains methods used to execute queries already defined in ISPnext.
General
Queries Reference
Methods
GET List
Location
https://xxx.vendorlink.nl/API/Queries/List
Header
- Key "Authorization", Value "Bearer <accessToken>"
Body
Empty
Response
[
{
"Id": 1,
"Name": "Test",
"Notes": "",
"Owner": "Demo User",
"CreatedDate": "2019-09-03T00:00:00"
}
]Remarks
Return value contains an array of available queries.
GET Execute
Location
https://app.vendorlink.nl/API/queries/execute
Header
- Key "Authorization", Value "Bearer <accessToken>"
Querystring parameters
- id: id of the query (from List method)
Body
Empty
Response
A JSON value containing the data returned by the query, executed real time in VendorLink.
Remarks
POST Execute
Location
https://xxx.vendorlink.nl/API/queries/executepaged
Header
- Key "Authorization", Value "Bearer <accessToken>"
Querystring parameters
- none
Body
{
"queryid": number (required),
"page": number (optional, 0 means first page),
"pagesize": number (optional, must be > 0 to activate paging)
}
Response
Response will look like below JSON structure. Note that the 'filteredcount' property will not be used for this endpoint.
{
"totalcount": 999,
"filteredcount": 0,
"page": 1000,
"pagesize": 10,
"hasErrors": false,
"messages": [],
"data": {
"query name": [ {...} ]
}
}