This document describes the Generic entry point for the ISPnext API.
General
This ISPnext Generic API provides access to your data. By passing in supported parameter values, the requested data can be controlled.
Entry Point Reference
API Method - Execute
Supports HTTP-method POST/GET
Location
https://XXX.vendorlink.nl/API/generic/execute
The XXX needs to be replaced by the sub-domain of your ISPnext account. (f.e. app, app2)
Header
- Key "Authorization", Value "Bearer <accessToken>"
Body
The body of the requests have a generic structure. Find the details for the parameter with the documentation for each individual request.
{ "dataname": string (required), "page": number (optional), "pagesize": number (optional), "parameters": object (optional) }
Remarks
- dataname - identifies the type of data to access
- page - requested page, only applicable in case of list data
- pagesize - requested pagesize, only applicable in case of list data
- parameters - JSON object containing the parameters needed for the request or action
Response
{ "totalcount": number, "page": number, "pagesize": number, "hasErrors": bool, "messages": [ {"severity": string, "message": string}], "properties": [ { "data": string, "title": string } ], "data": [] }
Remarks
- totalcount - Total number of items found, only applicable in case of list data
- page - Returned page, only applicable in case of list data
- pagesize - Returned pagesize, only applicable in case of list data
- hasErrors - Boolean value indicating wether or not errors have occurred during processing
- messages - Array of objects containing severity and text for messages.
- properties - Array of objects containing information on the properties used in the data
- data - Array containing the data for the request
Data names
ISPnext API currently supports the following data names:
- Contracts - Request a list of contracts
- Contract - Request the details of a single contract
- Contract Notes - A list of contract notes
- Subcontracts - A list of subcontracts
Contracts
Request a list of contracts
Parameters:
- archived - number - 1 for archived contracts, 0 for active
- my - number - 1 for requesting user's own contracts, 0 for "all"
- concept - number - 1 for requesting concept contracts, 0 for "all"
Example request body:
{ dataname: "Contracts", parameters: { archived: 0, my: 0, concept: 0 } }
Contract
Request the details of a single contract.
The details include
- Subcontracts - A list of subcontracts
- Contract Notes - A list of contract notes
Parameters:
- id - number - The id of the requested contract
Example request body:
{ dataname: "contract", parameters: { id: 0 } }
SubContracts
Request a list of sub contracts for the given contract
Parameters:
- contractid - number - The id of the parent contract.
Example request body:
{ dataname: "subcontracts", parameters: { contractid: 0 } }
ContractNotes
Request the list of notes of the given contract
Parameters:
- contractid - number - The id of the parent contract.
Example request body:
{ dataname: "contractnotes", parameters: { contractid: 0 } }
XXXXX
Request a list of XXXXX | Request the details of a single XXXXX
Parameters:
- PARAMETER - TYPE - EXPLAIN
Example request body:
{ dataname: "XXXXX", parameters: { PARAMETER: VALUE } }