purchaseinvoices

type: table

Methods

GET

List documents

List of documents matching search, pagination and order clauses returned

GET /<yourcompany>/purchaseinvoices/

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>/purchaseinvoices/?_pageNo=0&_pageLength=50

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

One document contents

GET /<yourcompany>/purchaseinvoices/<id>

Returns document data with all subdocuments (rows etc).

POST

Insert document

POST /<yourcompany>/purchaseinvoices/

Update existing document

POST /<yourcompany>/purchaseinvoices/<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>/purchaseinvoices/<id>

Deletes document with given id


Fields

Field Type Default Etc
idintPK
nrvarchar(50)SK
suplierIdintSK companies
datedateSK
paymentTypeIdint0paymenttypes
memovarchar(255)
statusint0
sumdouble0
VATdouble0
paymentDueint0
interestdouble0
objectIdint0objects
currencyIdint0currencies
ratedouble1
VEOKULUVALISdouble0
VEOKULUSISEdouble0
KINDLUSTUSKULUdouble0
MAHAHINDLUSEDdouble0
MUUKULUdouble0
VIITENUMBERvarchar(20)''
dratedouble1
summaryRowsvarchar(1000)
summaryObjvarchar(1000)
warehouseIdint1warehouses
cashint0
TEGEVUSALAIDint0TEGEVUSALAD
TEHINGUPARTNERIDint0TEHINGUPARTNERID
TASUMISEKONTOIDint0accounts
printFormvarchar(100)''
KMDERISUSvarchar
DOKKPVdate
KMTAGASIdouble0

Subdocuments

OSTUARVEREAD

Field Type Default Etc
invoiceIdintPK
nrintPK
articleIdintarticles
quantitydouble
pricedouble
accountIdint0accounts
namevarchar(100)''
objIdint0objects
KMTIDint0
KMTAGASIdouble0
vatCoefdouble1
KMSUMMAdouble0

OAROBJ

Field Type Default Etc
invoiceIdintPK
nrintPK
objIdintPK objects

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