Intro to Views API

Do not forget to fill the Authorization header in every single request - Authorization: Bearer {your token}

GET https://{host}/rest/v1/{unitId}/views/{viewName}?{queryParameters}

🚧

notice: query parameters must be url encoded!

Possible query parameters:

You can ask only for some columns, if predefined column list is too complex four your usecase.

columns={columnName1},{columnName2},...{columnNameN}

You can ask only for some properties, if predefined property list is too complex four your usecase.

properties={propertyName1},{propertyName2},...{propertyNameN}

You can define your own filter, if you want only specific result set.

externalFilter={filter}

operators AND, OR, NOT, ANY can be used in filter. Examples:

externalFilter=isDisabled=false

-> encoded result: externalFilter=isDisabled%3Dfalse

externalFilter=(type='INVOICE.SALES' AND status='APPROVED')

-> encoded result: externalFilter=%28type%3D%27INVOICE.SALES%27%20AND%20status%3D%27APPROVED%27%29

You can limit the number of results

limit={number of records}

The default limit of results is defined by register of such view and in default is always 1000. Be careful with setting higher 'limit' values. The maximum response size to API Gateway is 10 MB. And of course, the size of the answer depends on the number of parameters and their length. If the server's response is larger than 10MB, you will receive an error response. Therefore, the parameter 'limit' must be set very sensibly.

Pagination of the response

Since the number of returned records can be large, pagination must be applied. The default limit is 1000 records for each view, each response returns a metaData object in which it is possible to read what additional offset needs to be used to obtain the next part of the response. If nextOffset = null then there are no more records to send.

offset={index of the first record in pagination} (default = 0)

Response of server

{
   "metadata": {
        "count": 1000,
        "limit": 1000,
        "nextOffset": 1000
    },
  "data": [
        {...row object[0] ...},
        {...row object[1] ...},
    		...
        {...row object[999] ...}
    ]
}

Predefined views:

As always, everything in Teamogy can be customized. Here is the list of predefined views available. And it is possible to define yours custom view. Use this as {viewName} url parameter.


View nameDescription
ABSENCESAbsences
BINDERSBinders
BRANDSBrands
CARDSCards
CASHBOXESCashbox
COMPANIESCompanies
COMPANIES.CLIENTCompanies - Clients
COMPANIES.SUPPLIERCompanies - Suppliers
DOCUMENTSDocuments
DOCUMENTS.ORDER.PURCHASEDocuments
DOCUMENTS.QUOTATION.SALESDocuments
GEMSGems
GROUPSGroups
INTERNALSInternal Documents
INTERNALS.PURCHASEInternal Documents Purchase
INTERNALS.SALESInternal Documents Sales
INTERVALS.ABSENCEAbsences
INTERVALS.ATTENDANCEAttendance
INTERVALS.TRACKTime Records
INVOICES.PURCHASEInvoices Purchase
INVOICES.SALESInvoices Sales
JOBSJobs
JOURNALJournal
JOURNAL.COMPLETEJournal (including disabled records)
OPPORTUNITIESOpportunities
OVERHEADS.CLIENTClient Overheads
OVERHEADS.INTERNALInternal Overheads
PERSONSPersons
TASKSTasks
UNITSUnits
USERSUsers