salesinvoices

type: table

Methods

GET

List documents

List of documents matching search, pagination and order clauses returned

GET /<yourcompany>/salesinvoices/

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

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

One document contents

GET /<yourcompany>/salesinvoices/<id>

Returns document data with all subdocuments (rows etc).

POST

Insert document

POST /<yourcompany>/salesinvoices/

Update existing document

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

Deletes document with given id


Fields

Field Type Default Etc
idintPK
nrintSK
datedateSK
typeIdint
sourceCompanyIdint
destinationCompanyIdintcompanies
sourceWarehouseIdintwarehouses
destinationWarehouseIdint
paymentDueint
interestdouble
memovarchar(255)
statusint
payerIdintcompanies
priceWithVatint
sumdouble
roundingdouble
sourceObjectIdintSK objects
nrprefixvarchar(10)SK
nrsuffixvarchar(10)SK
discountdouble
additionalText1varchar(1024)
additionalText2varchar(1024)
exportedint0
cashint0
currencyIdint0currencies
ratedouble1
reportIdint0ARUANDED
deliveryTermsvarchar(255)''
paymentDueint0
TRANSPORDIFIRMAIDint0companies
transportTypeIdint0TRANSPORDILIIGID
KOOSTAJAint0users
VEOKULUVALISdouble0
VEOKULUSISEdouble0
KINDLUSTUSKULUdouble0
MUUKULUdouble0
KAARDIMAKSEint0
VIITENUMBERvarchar(20)''
PEALKIRIvarchar(100)''
objAddressvarchar(100)''
contactvarchar(100)''
SAATELEHEDvarchar(255)''
KOONDARVEint0
summaryRowsvarchar(1000)''
summaryHeadervarchar(1000)''
createdDatetimetimestamp
updatedDatetimetimestamp
OBJAADRLINNvarchar(100)''
OBJAADRINDEKSvarchar(20)''
OBJAADRRIIKIDint0countries
shippingAreaIdint0VEOPIIRKONNAD
ALGVIITENUMBERint0
dratedouble1
TEHINGUPARTNERIDint0TEHINGUPARTNERID
EKVIITUNGint0
EKVIITUNGTUNNUSvarchar(50)''
MAKSMATAdouble0
KASSAIDint0KASSAD
KMDERISUSvarchar
EINVOICESTATEIDint0
EINVOICETRANSACTIONvarchar''EINVOICESTATES
EINVOICESENTtimestamp
EICHBANKint0
EICHPOSTint0
EICHEMAILint0
EICHPORTALint0
EINVOICESENDNOWint0

Subdocuments

salesinvoicerows

Field Type Default Etc
salesInvoiceIdintPK
nrintPK
articleIdintarticles
unitIdintunits
quantitydouble
pricedouble
memovarchar(255)
articleCodevarchar(50)
articleNamevarchar(100)
VATdouble
unitCodevarchar(10)
discountdouble
vatIdintvats
KAALdouble0
RKONTOIDint0accounts
sumdouble0
KMKOKKUdouble0
waybillIdint0waybills
additionalText1varchar(255)''
additionalText2varchar(255)''
additionalText3varchar(255)''
additionalQuantity1double0
additionalQuantity2double0
additionalQuantity3double0
ONTAARAint0
additionalText4varchar(255)''
additionalText5varchar(255)''
additionalText6varchar(255)''
additionalQuantity4double0
additionalQuantity5double0
additionalQuantity6double0
lotvarchar
objIdint0objects
vatCoefdouble1

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