Executes and handles response for API calls to Xero’s accounting and practice manager APIs.


Method Get | Let {WebMethod}

Set the HTTP method to be used for the request: GET, POST, PUT, PATCH, DELETE.

Format Get | Let {WebFormat}

Set the API request and response format: XML, Json.


Get | Let {xeroResource|xpmResource}

API endpoint for request. Differs depending on which API is being used.

Dim radius_Client As New rc_Client
 radius_Client.Resource = xeroResource.BankTransactions
 ' -> Url: https://api.xero.com/api.xro/2.0/BankTransactions

 radius_Client.Resource = xpmResource.Client
 ' -> Url: https://api.xero.com/practicemanager/3.1/client.api


Get | Let {xpmEndPoint}

Xero Practice Manager method for request URL.

Dim radius_Client As New rc_Client
radius_Client.Resource = xpmResource.Job
radius_Client.EndPoint = xpmEndPoint.epCurrent

 ' -> Url: https://api.xero.com/practicemanager/3.1/job.api/current


Get | Let {String}

Optional identifier used in various Xero/Practice manager APIs.

 Dim radius_Client As New rc_Client

 radius_Client.Resource = xeroResource.Journals
 radius_Client.XeroIdentifier = "243"
 ' -> Url: https://api.xero.com/api.xro/2.0/Journals/243

 radius_Client.Resource = xpmResource.Client
 radius_Client.EndPoint = xpmEndPoint.epGet
 radius_Client.XeroIdentifier = " f8235e1a-d383-48b7-9139-ba97ab8ca889"
 ' ->  Url: https://api.xero.com/practicemanager/3.1/client.api/get/f8235e1a-d383-48b7-9139- 


Get | Set {Dictionary}

Set pre-made Body dictionary. To add body parameters, use AddBodyParam.


Get | Set {Collection}

Collection of querystring parameters to include with request, stored as Key-Value pairs. To add querystring parameters, use AddQuerystringParam.


Get {Collection|DOMDocument}

Parsed response data. Collection for Json, DOMDocument for XML.


AddBodyParam (Key, Value)

Key - {String}

Value - {String}

Add Key-Value to Body.

 Dim radius_Client As New rc_Client
 radius_Client.Format = WebFormat.Json

 radius_Client.AddBodyParameter "a", 123
 ' --> Body ' -> "{"a":123}"

AddQuerystringParam (Key, Value)

Key - {String}

Value - {String}

Add querystring parameter to be used in request.

 Dim radius_Client As New rc_Client
 radius_Client.AddQuerystringParam "page", "1"

 ' -> Url: ..../?page=1

xeroSetup (Method, Format, Resource, [XeroIdentifier])

Method - {WebMethod}

Format - {WebFormat}

Resource - {xeroResource}

XeroIdentifier - {String} OPTIONAL

Easy setup for Xero API request.

xpmSetup (Method, Format, Resource, EndPoint, [XeroIdentifier])

Method - {WebMethod}

Format - {WebFormat}

Resource - {xpmResource}

EndPoint - {xpmEndPoint}

XeroIdentifier - {String} OPTIONAL

Easy setup for Practice Manager API request.

Execute () Execute API request. Run xeroSetup or xpmSetup first.

ExportSettings () {String} Export current API settings as Base64 encoded Json string.

LoadSettings (SavedSetting)

SavedSetting - {String} Base64 encoded Json string as created by ExportSettings.

Load saved settings to API client.