Skip to main content

Finder

Introduction

Use the finder web service in order to get all kind of master data from Twinfield.

Web service type: Method driven

Resource location: /webservices/finder.asmx?wsdl.

info

Since it is not possible to add the company code to the finder, make sure the correct company is set by using either the SelectCompany function or adding the office option.

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
Raw envelope
POST https://api.<cluster>.twinfield.com/webservices/finder.asmx HTTP/1.1
User-Agent: Mozilla/4.0 (compatible; MSIE 6.0; MS Web Services Client Protocol 4.0.30319.34209)
Content-Type: text/xml; charset=utf-8
SOAPAction: "http://www.twinfield.com/Search"
Host: <cluster>.twinfield.com
Content-Length: 541
Expect: 100-continue
Connection: Keep-Alive
<soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema">
<soap:Header>
<Header xmlns="http://www.twinfield.com/">
<AccessToken>9c19e935ae213d9aa36ca2dd44529f14</AccessToken>
<CompanyCode>001</CompanyCode>
</Header>
</soap:Header>
<soap:Body>
<Search xmlns="http://www.twinfield.com/">
<type>DIM</type>
<pattern>*</pattern>
<field>0</field>
<firstRow>1</firstRow>
<maxRows>100</maxRows>
<options>
<ArrayOfString>
<string>dimtype</string>
<string>DEB</string>
</ArrayOfString>
</options>
</Search>
</soap:Body>
</soap:Envelope>

Finder type

TypeTwinfield master/functionReturn fields
ARTItemscode, name
ASMAsset methodscode, name
BDSBudgetscode, name
BNKCashbooks and bankscode, name
BSNBilling schedulenumber, description
CDACredit management action codescode, name
CERCertificatescode, name
CQTList of available (not paid) chequescheque number, relation code, relation name, amount, debit/credit
CTRCountriescode, name
CURCurrenciescode, name
DIMDimensions (financials)code, name, bank account, address fields
DIMDimensions (modifiedsince option)code, name, modified, revision
DIMDimensions (projects)code, name, customer
DMTDimension typescode, name
DVTVat typescode, name
FLTFilter mappingscode, name
FMTPayment filescode, name
GRPDimension groupscode, name
GWYGatewayscode, name
HIEHierarchiescode, name
HNDHierarchy nodescode, name
ICTCOUNTRYICT Country codescode, name
INVInvoice typescode, name
IVTList of available (not paid) invoicesinvoice number, relation code, relation name, amount, debit/credit
MATMatching typescode, name
OFFOfficescode, name
OFGOffice groupscode, name
OICAvailable offices for InterCompany transactionscode, name
PAYPayment typescode, name
PISPaying-in slipspaying-in slip number, amount, debit/credit, description
PRDPeriodstitle, name
REPReportscode, name
REWWord templates (invoices, reminder letters)code, name
RMDReminder scenarioscode, name
ROLUser rolescode, name
SARSub itemscode, name
SPMDistribution by periods (Budgets/Extended Trial Balance allocation)code, name
TXGTax groupscode, name
TEQTime & quantities transaction typescode, name
TRSTransaction types (daybooks)code, name
TRTTime project ratescode, name
USRUserscode, name
VATVAT codescode, name
VATNVAT numbers of relationscode, name, country, vat number, relation company, city
VTBVAT Groupscode, name
VGMVAT Groups countriescode, name
XLTTranslationscode, name

Search fields

The search field determines which field or fields will be searched. The available fields depends on the finder type. Passing a value outside the specified values will cause an error.

TypeDescriptionField code
allSearches on the code or name field0
allSearches only on the code field1
allSearches only on the name field2
DIMSearches in the dimensions bank account number field3
DIMSearches for the customer code (only available for projects/activities)3
IVTSearches for the dimension code or dimension name, outstanding invoice amount, invoice number0

Finder options

The Finder options. Passing an unsupported name or value causes an error. It's possible to add multiple options. An option name may be used once, specifying an option multiple times will cause an error.

TypeOptionValueDescription
alloffice«office code»Sets the office code.
ARTvatinclusive exclusiveReturn only items configured with a value including or excluding the VAT.
BNKbanktype-1 = return both bank as well cash transaction types
0 = return bank transaction types
1 = return cash transaction types
Restricts the transaction types which will be returned.
CERaccesstypeuse editSpecifies the minimal required access type for the certificate.
DIMincludehidden0 = false
1 = true
If set to 1, the response will include a status column (active/hidden) and both active and hidden dimensions will be included.
DIM (financials)level1 2 3 4 5 6Specifies the dimension level.
sectionfinancials teqRestricts to financial or time & expenses dimensions.
dimtypeBAS PNL DEB CRD KPL PRJ AST ACTSpecifies the dimension type.
modifiedsinceyyyyMMddHHmmss or yyyyMMddRestricts to dimensions modified after or at the specified date (and time).
group«group code»Specifies the dimension group (wildcards allowed).
matchtyperelationThis option will show only the relations (dimension type: DEB and/or CRD).
DIM (time & expenses)accessrules0 1Disabling the access rules is only possible if the user has access to project dimension maintenance.
accessuser«user code»Specifies the time user.
role«role code»Specifies the time user role.
trscode«transaction code»Specifies the transaction code and will only return the projects or activities which are related to the specified transaction code.
DMTdim«dimension code»Restricts to the type of the specified dimension.
finlevel1 2 3 4 5 6Specifies the financial level.
GRPprefixSpecifies that the search field should start with the given value.
dimtypeBAS PNL DEB CRD KPL PRJ AST ACTSpecifies the dimension type.
GWYgatewaytype«gateway type»Specifies the gateway type.
accesstypeuse editSpecifies the minimal required access type for the gateway.
HIEaccesstypeuse bind editSpecifies the minimal required access type for the reporting structure.
officegroup«office group code»Sets the office group. Can only be used in combination with accesstype.
HNDhierarchy«reporting structure code»Specifies the reporting structure.
accesstypeuse bind editSpecifies the minimal required access type for the reporting structure.
showrootnode0 = false
1 = true
Specifies whether the root node of the reporting structure is shown or not.
INVvatinclusive exclusiveReturn only invoice types configured for including or excluding VAT.
IVTdim1 - dim6«dimension code»Specifies a dimension code (and in such a financial level).
value«x.yy»Specifies the (original invoice) value.
openvalue«x.yy»Specifies the open value.
CQTdim1 - dim6«dimension code»Specifies a dimension code (and in such a financial level).
value«x.yy»Specifies the (original cheque) value.
openvalue«x.yy»Specifies the open value.
OFFincludeid0 = false
1 = true
If set to 1, the result will include a (company) id column.
withouttaxgroup0 = false
1 = true
If set to 1, the list of offices is limited to offices that are not part of a tax group and those offices don't contain VAT returns which are not approved yet.
OFGaccessrules0 = false
1 = true
If set to 1, the list of office groups is limited to office groups containing offices the user has access to.
PAYpaytypepay collectSpecifies which type of pay and collect types should be returned.
PISbnkcode«bank code»Limits the paying-in slips to the given bank code.
openvalue«x.yy»Limits the paying-in slips to the given open amount.
generalledger«general ledger code»Limits the paying-in slips to the given general ledger code.
trscurrency«currency code»Limits the paying-in slips to the given currency code.
PRDincludeclosed0 = false
1 = true
If set to 1, also closed periods are returned.
includesystem0 = false
1 = true
If set to 1, also system periods are returned.
specificperiod«period»Returns the year/period containing the given period.
minyearperiod«period»If set, only periods after the set period are returned.
REWpurpose0 = invoicing
1 = credit management
Limits the list of Word templates to the given function.
SARarticle«item code»Mandatory. The item code for which sub items are returned.
vatinclusive exclusiveReturn only sub items configured with a value including or excluding the VAT.
TRShidden1If set also hidden transaction types are returned.
ic1Shows only “InterCompany” transaction types in the result set. This option cannot be used in combination with the 'hidden' option.
categorysales purchase journalSpecifies which category of transaction types should be returned.
TRTratetypetime quantitySpecifies the rate type.
USRaccessrules0 1Disabling the access rules is only possible if the user has access to user management.
mutualoffices0 1Shows all users who have access to a selection of offices that overlaps with the Web Service user permissions.
VATvattypepurchase salesSpecifies the VAT type.
VATNcountry«country code»Specifies the country.
dimtype«dimension type code»Specifies the dimension type.
dimcode«dimension code»Specifies the dimension code.
modeictLimits the returned list of relations to ICT relations.
VGMcountry«country code»Specifies the country.