waybills

type: table

Methods

GET

List documents

List of documents matching search, pagination and order clauses returned

GET /<yourcompany>/waybills/

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

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

One document contents

GET /<yourcompany>/waybills/<id>

Returns document data with all subdocuments (rows etc).

POST

Insert document

POST /<yourcompany>/waybills/

Update existing document

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

Deletes document with given id


Fields

Field Type Default Etc
idintPK
nrprefixvarchar(10)SK
nrintSK
nrsuffixvarchar(10)SK
datedateSK
sourceCompanyIdintcompanies
destinationCompanyIdintcompanies
sourceWarehouseIdintwarehouses
destinationWarehouseIdintwarehouses
memovarchar(1500)
typeIdintSK
lockedint
totalCostdouble
totalPricedouble
enumerationIdint0enumerations
documentvarchar(100)''
invoiceIdint0salesinvoices
deliveryTermsvarchar(255)''
transportTypeIdint0TRANSPORDILIIGID
transactionTypeIdint0TEHINGULIIGID
addrvarchar(100)''
addrCityvarchar(100)''
addrIndexvarchar(20)''
countryIdint0countries
shippingAreaIdint0VEOPIIRKONNAD
salesOrdersIdint0
summaryObjvarchar(1000)''
summaryRowsvarchar(1000)''
docTypeIdint0LAODOKLIIGID
creatorIdint0users
createdDatetimetimestamp
updaterIdint0users
updatedDatetimetimestamp

Subdocuments

waybillrows

Field Type Default Etc
waybillIdintPK
nrintPK
articleIdintarticles
sourceWarehouseIdintwarehouses
destinationWarehouseIdintwarehouses
quantitydouble
pricedouble
unitIdintunits
costdouble
TMMAINIDint0
TMMAINNRint0
SLNRPREFIXvarchar(10)''
SLNRint0
SLNRSUFFIXvarchar(10)''
SLKPVdate'01.01.1900'
SLFIRMAKUSTIDint0companies
SLFIRMAKUHUIDint0companies
SLTYYPint0
INSTARTdouble0
OUTSTARTdouble0
DKATEdouble0
ALEdouble0
memovarchar(200)''
objIdint
VANAOSTUKONTOIDint0accounts
UUSOSTUKONTOIDint0accounts
KAUPTYYPint0
lotvarchar
additionalText1varchar''
additionalText2varchar''
additionalText3varchar''
additionalText4varchar''
additionalText5varchar''
additionalText6varchar''

waybillrowobjects

Field Type Default Etc
waybillIdintPK
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