Salesforce

Setting up OAuth 2.0 - Which types of web services are available?

Article Information
 
Inhoud van het artikel
This article is part of the article serie Setting up OAuth 2.0 - Introduction

Please refer to this article for a description on how to write a complete soap envelope: Send a request

Good to know: This article will give you an overview of all the endpoints that are available. All endpoints belong to one of these categories:  Good to know: Command & Query Web Services end with .svc and XML Web Services end with .asmx.

Good to know: You can find a complete overview of how to use the endpoint by adding ?wsdl to the end of the url of the endpoint. For example: https://accounting2.twinfield.com/webservices/periodservice.svc?wsdl

The purpose of this article is to help you write the correct soap envelope for each endpoint. Please refer to our API Reference page for a complete description about which webservice you need for a specific task. After you have found the webservice you need, you can use this article to help you write the soap envelope. This is the link to our API Reference page: https://accounting.twinfield.com/webservices/documentation/#/ApiReference

  
Command & Query Web Services

Commands are used to alter data. Queries are used to return data. These endpoints use this webservice type:
  • BankBookService.svc
  • BankStatementService.svc
  • BudgetService.svc
  • DeletedTransactionsService.svc
  • PeriodService.svc
  • TransactionBlockedValueService.svc
Within <soap:Header> you must always use <twinfield:Authentication>. Always send along a <soap:Body> that looks like the example below. The code snippet shows <twinfield:Query>. It works the same for <twinfield:Command>.

Good to know: When declaring xmlns:b replace BankStatementService in the code snippet below by the endpoint that you want to use (for example BudgetService or PeriodService). Always leave out .svc while declaring xmlns:b.
 
<soap:Body>
        <twinfield:Query
            xmlns:a="http://schemas.datacontract.org/2004/07/Twinfield.WebServices""
            xmlns:b="http://schemas.datacontract.org/2004/07/Twinfield.WebServices.BankStatementService""
            xmlns:i="http://www.w3.org/2001/XMLSchema-instance""
            i:type="b:GetBankStatements"
       >
               ...
        </twinfield:Query>
</soap:Body>
 
Use the table below to know how to declare i:type for each endpoint.
 
Endpointi:type
BankBookService.svc i:type="b:GetBankBook"
BankStatementService.svci:type="b:GetBankStatements"
BudgetService.svci:type="b:GetBudgetByProfitAndLoss"
DeletedTransactionsService.svci:type="b:GetDeletedTransactions"
PeriodService.svci:type="b:GetPeriods"
TransactionBlockedValueService.svci:type="b:RegisterBlockedAmountForTransaction"
 

XML Web Services

These endpoints use this webservice type:
  • finder.asmx
  • hierarchies.asmx
  • processxml.asmx
Within <soap:Header> you must always use <twinfield:Header>.

For processxml.asmx send along a <soap:Body> that looks like this:
 
<soap:Body>
        <twinfield:ProcessXmlDocument>
                <twinfield:xmlRequest>
                        ...Add your request here...
                </twinfield:xmlRequest>
        </twinfield:ProcessXmlDocument>
</soap:Body>
  
For finder.asmx and hierarchies.asmx send along a <soap:Body> that looks like this:
 
<soap:Body>
        <twinfield:Search>
               ...
        </twinfield:Search>
</soap:Body>

 

detail information
22-12-2021 7:57
Setting up OAuth 2.0 - Which types of web services are available?
265
URL
Setting-up-OAuth-2-0-Which-types-of-webservices-are-available

Powered by