Skip to main content

Articles

Find

Web service type: Method driven

Resource location: /webservices/finder.asmx?wsdl

Method

public Message[] Search(
string type, // Finder type, See Finder type.
string pattern, // The search pattern. May contain wildcards * and ?
int field, // Fields to search through, see Search fields.
int firstRow, // First row to return, usefull for paging
int maxRows, // Maximum number of rows to return, usefull for paging
string[][] options, // See options below
out FinderData data) // Search results

Finder type

ART

Search fields

Field IDFields searched
0code and name
1code
2name

The method will return an array containing validation messages. If there are no errors, then the data parameter will contain the actual search result.

Options

OptionTypeDescription
vatenumeration: inclusive, exclusiveIf supplied it filters articles based on vat configuration on the article.

Read

Web service type: XML Web Services

XML

This example reads the article settings of the article with: EXAMPLE

<read>
<type>article</type>
<office>001</office>
<code>EXAMPLE</code>
</read>

If the article does not exist an empty article element is returned containing an error.

Create/Update/Delete

If an article is not found it will be automatically created, otherwise it is updated. Set article/header/@status to deleted for deleting an article.

Root

XML structure
<article>
<header></header>
<lines></lines>
</article>

Element name: article

NameDescription
headerContains information general to the article.
linesContains either sub-articles or detailed information of the article.
XML structure
<header>
<office></office>
<code></code>
<type></type>
<name></name>
<shortname></shortname>
<unitnamesingular></unitnamesingular>
<unitnameplural></unitnameplural>
<vatcode></vatcode>
<allowchangevatcode></allowchangevatcode>
<performancetype></performancetype>
<allowchangeperformancetype></allowchangeperformancetype>
<percentage></percentage>
<allowdiscountorpremium></allowdiscountorpremium>
<allowchangeunitsprice></allowchangeunitsprice>
<allowdecimalquantity></allowdecimalquantity>
</header>

Element name: header

NameTypeDescription
@statusactive
deleted
hide
For creating and updating status may be left empty. For deleting deleted should be used. In case an article that is used in an invoice is deleted, its status has been changed into hide. Hidden articles can be activated by using active.
officecodeOffice code
codecodeArticle code
namestring(40)Article description
shortnamestring(20)Short article description
typenormal
discount
premium
Set to normal in case special item is none. Set to either discount or premium in case special item is deduction or premium respectively.
percentagebooleanOnly available when article type is discount or premium
allowdiscountorpremiumbooleanIs discount or premium allowed
allowchangeunitspricebooleanIs it allowed to change the units price
allowchangevatcodebooleanIs it allowed to change the VAT
vatcodecodeDefault VAT code
unitnamesingularstring(20)Unit name for a single item
unitnamepluralstring(20)Unit name for multiple items
allowdecimalquantitybooleanAre decimals allowed

Sub articles

XML structure
<line>
<unitspriceexcl></unitspriceexcl>
<unitspriceinc></unitspriceinc>
<units></units>
<name></name>
<shortname></shortname>
<subcode></subcode>
<freetext1></freetext1>
<freetext2></freetext2>
<freetext3></freetext3>
</line>
info

At least one sub-article is required.

Element name: lines

NameTypeDescription
@idintegerLine ID
@inusebooleanRead-only attribute. Indicates that the sub item has been used in an invoice.
@statusactive
deleted
Allows you to delete sub items and to recover them (if sub item is @inuse).
subcodecodeCan only be empty if there is just one sub article
namestring(80)Sub article name
shortnamestring(20)Sub article short name
unitsintegerThe number of units of the article per quantity
unitspriceexclmoneyPrice excluding VAT
unitspriceincmoneyPrice including VAT
freetext1string(16)Mandatory. The general ledger code linked to the article.
freetext2string(16)Optional. The cost center linked to the article.
freetext3string(40)Free text element 3
freetext4Not in use.
freetext5Not in use.
freetext6Not in use.

Example

<article>
<header>
<office>001</office>
<code>BIKE</code>
<type>normal</type>
<name>Bike summer edition</name>
<shortname>Bike summer edition</shortname>
<unitnamesingular>Piece</unitnamesingular>
<unitnameplural>Pieces</unitnameplural>
<vatcode>VH</vatcode>
<allowchangevatcode>false</allowchangevatcode>
<allowdiscountorpremium>true</allowdiscountorpremium>
<allowchangeunitsprice>false</allowchangeunitsprice>
<allowdecimalquantity>false</allowdecimalquantity>
</header>
<lines>
<line>
<unitspriceexcl>750.00</unitspriceexcl>
<unitspriceinc></unitspriceinc>
<units>1</units>
<name>Lady's bike summer edition</name>
<shortname>Lady summer</shortname>
<subcode>BIKE.L</subcode>
<freetext1>8050</freetext1>
</line>
<line>
<unitspriceexcl>750.00</unitspriceexcl>
<unitspriceinc></unitspriceinc>
<units>1</units>
<name>Man's bike summer edition</name>
<shortname>Man summer</shortname>
<subcode>BIKE.M</subcode>
<freetext1>8051</freetext1>
</line>
</lines>
</article>