Currency
Version: 1.33
Use the entity Currency to query for information, about the currency you are already using. Information provided includes name of currency, symbol, numeric code, whether or not it is the default currency, and the CurrencyType.
Currency Type in your Tenant Account was selected by you when your Account was opened and was set by your Gotransverse Support Team. If you need to change your Currency Type, please contact your Gotransverse Support Team.
Query Currency directly.
Parameters
Entity Currency is the only entity in Gotransverse that does not show an EID and therefore, it is not in the following table. EIDs for currency are unique per Tenant. Using your CurrencyType precludes your need for using the EID for Currency.
When you query Currency, the following table provides information about the values returned from the query:
Element Name | Query Key |
Element Type |
Field Length |
Description |
---|---|---|---|---|
queryScope |
|
QueryScope |
- - |
Whether default query results are overridden by QueryScope resulting in SHALLOW or DEEP query results. See QueryScope for details. |
name |
|
String |
255 |
The name of the Currency. |
currencyType |
Y |
CurrencyType |
- - |
The type of Currency. See CurrencyType for the selection. |
symbol |
|
String |
255 |
The symbol for the Currency (e.g. "$" or "£") |
numericCode |
|
String |
255 |
The numeric Code for the Currency. |
default |
|
Boolean |
Enter either: |
Is this Currency the default currency or not? YES — This Currency is the default Currency. NO — his Currency is NOT the default Currency. |
How to Query Currency
Query Key Information SOAP and REST
To query for Currency, use the SimpleDataQuery with no parameters.
Query to Use | Query for | Returns | |||
---|---|---|---|---|---|
SimpleDataQuery | Currency | Information for the Currencies you're using. |
To query for more specific information, use the SimpleDataQuery with the parameter of the following Query Key:
Query Key | Value | Definition | |||
---|---|---|---|---|---|
type |
|
The CurrencyType of the Currency. |
Do Not Know Query Key Information
If you do not know the Currency's type, or you want to see the Currencies you are using:
Query to Use | Query for | Returns | |||
---|---|---|---|---|---|
SimpleDataQuery |
Currency |
List of your Currencies used. |
SOAP Examples Query and Response
Query with No Parameters and Response
The following SOAP example is a query of Currency with no parameters:
<soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/"> <soap:Body> <ns2:query xmlns="http://www.tractbilling.com/billing/1_31/domain"xmlns:ns2="http://www.tractbilling.com/billing/1_31/service"> <ns2:queryRequest> <simpleDataQuery startIndex="0" size="50"> <type>Currency</type> </simpleDataQuery> </ns2:queryRequest> </ns2:query> </soap:Body> </soap:Envelope>
This was the response:
<soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/"> <soap:Body> <ns2:queryResponse xmlns="http://www.tractbilling.com/billing/1_31/domain" xmlns:ns2="http://www.tractbilling.com/billing/1_31/service"> <ns2:return successful="true"> <currencies pageNumber="1" pageSize="50" totalElements="1" elementCount="1" totalPages="1"> <currency name="US Dollar" currencyType="USD" symbol="$" numericCode="840" default="true" queryScope="DEEP"/> </currencies> </ns2:return> </ns2:queryResponse> </soap:Body> </soap:Envelope>
Query with the Parameter in Use and Response
The following SOAP query shows a query for the currency (in this example, USD) that is currently being used by the company:
<soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/"> <soap:Body> <ns2:query xmlns="http://www.tractbilling.com/billing/1_31/domain"xmlns:ns2="http://www.tractbilling.com/billing/1_31/service"> <ns2:queryRequest> <simpleDataQuery startIndex="0" size="50"> <type>Currency</type> <parameter parameter="currencyType" parameterValue="USD"/> </simpleDataQuery> </ns2:queryRequest> </ns2:query> </soap:Body> </soap:Envelope>
The response:
<soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/"> <soap:Body> <ns2:queryResponse xmlns="http://www.tractbilling.com/billing/1_31/domain" xmlns:ns2="http://www.tractbilling.com/billing/1_31/service"> <ns2:return successful="true"> <currencies pageNumber="1" pageSize="50" totalElements="1" elementCount="1" totalPages="1"> <currency name="US Dollar" currencyType="USD" symbol="$" numericCode="840" default="true" queryScope="DEEP"/> </currencies> </ns2:return> </ns2:queryResponse> </soap:Body> </soap:Envelope>
Query with a Parameter Not in Use for a Company That Does NOT Have Multi-Currency Set and Response
GBP is a valid currency type in Gotransverse, but if your Company's account is not set for multi-currency, then querying a currency that you do not use (in this example, the company is set for USD) returns no info.
<soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/"> <soap:Body> <ns2:query xmlns="http://www.tractbilling.com/billing/1_31/domain"xmlns:ns2="http://www.tractbilling.com/billing/1_31/service"> <ns2:queryRequest> <simpleDataQuery startIndex="0" size="50"> <type>Currency</type> <parameter parameter="currencyType" parameterValue="GBP"/> </simpleDataQuery> </ns2:queryRequest> </ns2:query> </soap:Body> </soap:Envelope>
This was the response:
<soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/"> <soap:Body> <ns2:queryResponse xmlns="http://www.tractbilling.com/billing/1_31/domain"xmlns:ns2="http://www.tractbilling.com/billing/1_31/service"> <ns2:return successful="true"> <currencies pageNumber="1" pageSize="50" totalElements="0" elementCount="0" totalPages="0"/> </ns2:return> </ns2:queryResponse> </soap:Body> </soap:Envelope>
REST Mount Point and Parameters
Query
-
GET https://my.tractbilling.com/t/s/r/1.33/currencies
-
GET https://my.tractbilling.com/t/s/r/1.33/currencies/<TYPE>
-
GET https://my.tractbilling.com/t/s/r/1.33/currencies?type=<TYPE>
REST Example Queries and Responses
Query with No Parameters and Response
The following example is the REST query with no parameters defined:
-
GET https://my.tractbilling.com/t/s/r/1.33/currencies
This was the response (line breaks and formatting added for ease of reading):
<?xml version="1.0" encoding="UTF-8" standalone="yes"?> <currencies xmlns:ns2="http://www.tractbilling.com/billing/1_31/domain"pageNumber="1" pageSize="50" totalElements="1" elementCount="1" totalPages="1"> <ns2:currency name="US Dollar" currencyType="USD" symbol="$" numericCode="840" default="true" queryScope="SHALLOW"/> </currencies>
Query with the Parameter in Use and Response
The following example is the REST query with the parameter of CurrencyType. Use the 3-letter ISO code in capital letters.
-
GET https://my.tractbilling.com/t/s/r/1.33/currencies/USD
This was the response:
<?xml version="1.0" encoding="UTF-8" standalone="yes"?> <currency xmlns="http://www.tractbilling.com/billing/1_31/domain"name="US Dollar" currencyType="USD" symbol="$" numericCode="840"default="true" queryScope="SHALLOW"/>
Query with a Parameter Not in Use for a Company That Does NOT Have Multi-Currency Set and Response
GBP is a valid currency type in Gotransverse. However, if your Company's account is not set for multi-currency, then querying in a currency that you do not use returns an error.
-
GET https://my.tractbilling.com/t/s/r/1.33/currencies/GBP
This was the response:
<?xml version="1.0" encoding="UTF-8" standalone="yes"?> <errorResponse > <errorDescription>Currency with 'currencyType EQ 'GBP'' does not exist.</errorDescription> <failureReason>VALIDATION_FAILURE</failureReason> </errorResponse>