CallXeroAPI
The CallXeroAPI is a function that allows you to make direct calls to the Xero REST API.
Properties
Section titled “Properties”Authentication
Section titled “Authentication”OAuth2 authentication is supported.
Create the following values on this Xero Token Generator:
- TenantId:
Tenants are the organisations (small businesses) or practices (accounting firms) to which a user belongs and which they can access. - RefreshToken:
The token that is used to refresh the access token once it has expired. - Note:
- For the Xero Token Generator to create your Refresh Token, your Xero app’s OAuth2 redirect URI must be https://xerotokengenerator.z16.web.core.windows.net/
Get these values from the Xero portal, created when you registered your Xero app:
- ClientId:
Your unique client identifier. - ClientSecret:
The secret credentials that will be used to authenticate your connection.
Request
Section titled “Request”The base URL to use for the service request. This excludes any parameter-specific information that are send with the request. A valid example for this field could look like this:
http://localhost:8022/Service/ExecuteService
Method
Section titled “Method”Most web services are configured to accept messages using GET or POST. Some may also use HEAD, PUT or DELETE.
Query string
Section titled “Query string”A list of parameters to use in order to build up the query string. A query string with a format similar to the following will be generated (note that parameters have not been URL encoded to improve readability):
origin=CapeTown&destination=Johannesburg&sensor=false&alternatives=trueHeaders
Section titled “Headers”Specify headers to send with the request.
Arguments and data are commonly transferred using the headers of a call. You can add data to the headers if the web service requires this.
The body data to send with the request.
Response
Section titled “Response”This section allows you to configure the structure of the data that is being returned from the web service.
JSON is the supported return format.
Output type
Section titled “Output type”The value type to use when interpreting the response. The type could be String or List. The List option indicates whether the response should be interpreted as a list of values.
List item type
Section titled “List item type”Indicates the what the type for the items in the list must be, e.g. Boolean, Integer, String, List, etc. This option is only visible if the Output type is set to List.
Settings
Section titled “Settings”Timeout
Section titled “Timeout”Time to wait for a response. Value is specified in milliseconds. Specify -1 to wait indefinitely.
Max response content size
Section titled “Max response content size”The maximum amount of bytes response content can contain.