entrybatches

type: table

Methods

GET

List documents

List of documents matching search, pagination and order clauses returned

GET /<yourcompany>/entrybatches/

Filtering is possible using _filter request.

Filter clauses presented by JSON array of records with next fields:

  • field - any document field could be used in filter.
  • operator - filter condition binary operator. Allowed operators are:
    • >
    • <
    • >=
    • <=
    • =
    • <>
    • like
  • value - searched value

Sample filter request
_filter=URLEncode([{"field": "date", "operator": ">", "value": "2017-11-15"}, {"field": "date", "operator": "<", "value": "2017-11-17"}, {"field": "summaryRows", "operator": "like", "value": "%Volvo%"}])

NB! Filter request should be URL encoded!

Pagination is possible using _pageNo and _pageLength:

GET /<yourcompany>/entrybatches/?_pageNo=0&_pageLength=50

_pageNo starts with 0 (default value), Default _pageLength is 50.

One document contents

GET /<yourcompany>/entrybatches/<id>

Returns document data with all subdocuments (rows etc).

POST

Insert document

POST /<yourcompany>/entrybatches/

Update existing document

POST /<yourcompany>/entrybatches/<id>

Document data should be in POST body variable data.

Returns inserted or updated document full data.

Id of inserted document could be found in returned inserted document data.

DELETE

Delete document

DELETE /<yourcompany>/entrybatches/<id>

Deletes document with given id


Fields

Field Type Default Etc
idintPK
statusint
entryTypeIdintentrytypes
datedate
withCurrencyint
documentvarchar(100)
memovarchar(255)
SUMMA_Ddouble
SUMMA_Kdouble
nrintSK
lockedint
fiscalYearIdintSK fiscalperiods
ORDERNRint
ORDERTEXTvarchar(100)
ORDERLISAvarchar(100)
ORDERALLKIRI1varchar(100)
ORDERALLKIRI2varchar(100)
AVDFIRMAIDint
AVDMAKSEAEGint
AVDVIIVISint
AVDMAKSTUDdouble
AVDARVEint
invoiceIdint
PVIDintPOHIVARAD
MARVEIDint0salesinvoices
OARVEIDint0purchaseinvoices
TASUMINEIDint0payments
STLIDint0waybills
LAEKIDint0incomings
PALGAKUUIDint0PALGAKUUD
AVDSEOTUDdouble0
AVDSEOTAVdouble0
DOKKPVdate

Subdocuments

entries

Field Type Default Etc
KANDEIDintPK
nrintPK
accountIdintaccounts
objectIdintobjects
memovarchar(255)
currencyIdintcurrencies
debitdouble
creditdouble
debitBasedouble
creditBasedouble
ratedouble1
companyIdint0companies
invoiceNrvarchar(100)''
dueDateint
interestdouble
datePaiddate
dratedouble1
TEHINGUPARTNERIDint0TEHINGUPARTNERID
TEGEVUSALAIDint0TEGEVUSALAD
ALLIKASIDint0ALLIKAD
RAHAVOOGIDint0RAHAVOOD

entrylinks

Field Type Default Etc
KANDE1IDintentrybatches
KANDE2IDint
companyIdintcompanies
KONTO1IDintaccounts
KONTO2IDintaccounts
datePaiddouble

Output format

Output formats are JSON (default) or PHP print_r output.

Output format could be changed using HTTP_X_OUTPUTFORMAT request header variable.
Possible values:

  • json
  • php


Authentication

Token based authentication, with token in X-ProfitToken request header variable.


Profit API v 0.1.4.2 beta, © Intellisoft OÜ 2017 - 2024