PriceRange
Version: 1.33
PriceRange is used for tiered pricing. Each product price range is one tier in price. For example:
-
Buy 1 - 3 of the item and the price for each is $99.99.
-
Buy 4 - 7 of the item and the price for each is $79.99.
-
Buy 8 - 20 of the item and the price for each is $49.99.
-
Buy 20 - _ _ _ of the item and the price for each is $16.99.
Through the Gotransverse API, PriceRange is queried directly, and used in RecurringProductPrice and OneTimeProductPrice.
This page provides the following Gotransverse API information for this entity of (Product)PriceRange:
Parameters
Each PriceRangeshown from the Query shows information for a number of elements in the entity. The following table shows the elements, details of the elements, and brief descriptions.
Element Name | Query Key | Element Type | Field Length | Required to Create | Description |
---|---|---|---|---|---|
queryScope |
|
QueryScope |
- - |
No |
Whether default query results are overridden by QueryScope resulting in SHALLOW or DEEP query results. See QueryScope for details. |
eid |
Y |
Long |
System Generated |
System Generated |
System generated unique identity number assigned to all entities in Gotransverse. |
quantityBeginRange |
|
Decimal |
Up to 29 digits |
Yes |
The first number in the range. In the example in the first paragraph of Buy 4-7 for $79.99 each then the example of quantityBeginRange is "4". |
quantityEndRange |
|
Decimal |
Up to 29 digits |
Conditional |
The last number in the range. In the example in the first paragraph of Buy 4-7 for $79.99 each then the example of quantityEndRange is "7". This number is required if there is another price range and tier after this one. If this is the last price range and tier, then an entry is not required. |
price |
|
Decimal |
Up to 29 digits |
Yes |
The price of the Product for this tier. In the example of Buy 4-7 for $79.99 each then the example of price is "79.99". |
level |
|
Int |
As needed |
Yes |
These are the levels of prices. In the example in the first paragraph, there are 4 levels. The Buy 4-7 for $79.99 each is Level 2. |
currencyType |
|
CurrencyType |
- - |
No |
The type of currency that is already in use. Refer to CurrencyType for list of currencies. |
Entity PriceRanges
The entity PriceRanges enables you to see multiple pages of the entity PriceRange.
Element Name | Element Type | Field Length | Description | ||
---|---|---|---|---|---|
pageNumber |
Integer |
as needed |
Shows the current page number. |
||
pageSize |
Integer |
as needed |
Shows the page size. |
||
totalElements |
Long |
as needed |
Shows the total number of items found. |
||
elementCount |
Integer |
as needed |
Shows the current count of the item in the number of items that were found. |
||
totalPages |
Integer |
as needed |
Shows the total number of pages. |
||
priceRange |
PriceRange |
- - |
Shows the list of PriceRanges. |
Information for the related entity of PriceRanges:
-
Entity PriceRanges
Query a (Product)PriceRange
Query Key Information for SOAP and REST
In the WSDL, this entity is called PriceRange. For querying, this entity is called ProductPriceRange. Querying to see (Product)PriceRanges needs to include one of the following parameters. If you do not know the value for the parameter, query separately to learn the value.
Query Key | Value | Definition | |||
---|---|---|---|---|---|
eid |
Long |
The eid number of the priceRange. |
|||
productPriceEid |
Long |
The eid number of the productPrice. |
|||
productEid |
Long |
The eid number of the Product. |
|||
priceListEid |
Long |
The eid number of the priceList. |
|||
priceListIsMaster |
Boolean |
Is the PriceList the Master or not? |
|||
currencyType |
Decimal |
The type of currency that is used. Refer to CurrencyType for list of currencies. |
Query to Use | Query for | Parameter Name and Value | Returns | ||
---|---|---|---|---|---|
SimpleDataQuery |
ProductPriceRange |
<parameter name><parameter value> |
List of your (product)priceRanges for that parameter and value. |
SOAP Example Query and Response
In the following example SOAP query, the parameter of productEid was used. The Product's EID value (in this example "1301"), was learned through a previous query on Products.
<soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/"> <soap:Body> <ns2:query xmlns="http://www.tractbilling.com/billing/1_24/domain" xmlns:ns2="http://www.tractbilling.com/billing/1_24/service"> <ns2:queryRequest> <simpleDataQuery startIndex="0" size="50"> <type>ProductPriceRange</type> <parameter parameter="productEid" parameterValue="1301"/> </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_24/domain" xmlns:ns2="http://www.tractbilling.com/billing/1_24/service"> <ns2:return successful="true"> <priceRanges pageNumber="1" pageSize="50" totalElements="6" elementCount="6" totalPages="1"> <priceRange quantityBeginRange="0.00" price="1500.00" level="1" eid="1947"/> <priceRange quantityBeginRange="0.00" price="20.00" level="1" eid="1948"/> <priceRange quantityBeginRange="0.00" price="20.00" level="1" eid="1957"/> <priceRange quantityBeginRange="0.00" quantityEndRange="3.00" price="50.00" level="1" eid="4471"/> <priceRange quantityBeginRange="3.00" quantityEndRange="7.00" price="30.00" level="2" eid="4472"/> <priceRange quantityBeginRange="7.00" price="10.00" level="3" eid="4473"/> </priceRanges> </ns2:return> </ns2:queryResponse> </soap:Body> </soap:Envelope>
REST Mount Point and Parameters
Query
-
GET https://my.tractbilling.com/t/s/r/1.24/productPriceRanges/<eid>
-
GET https://my.tractbilling.com/t/s/r/1.24/productPriceRanges?eid=<eid>
-
GET https://my.tractbilling.com/t/s/r/1.24/productPriceRanges?productEid=<productEid>
-
GET https://my.tractbilling.com/t/s/r/1.24/productPriceRanges?productPriceEid=<productPriceEid>
-
GET https://my.tractbilling.com/t/s/r/1.24/productPriceRanges?priceListEid=<priceListEid>
-
GET https://my.tractbilling.com/t/s/r/1.24/productPriceRanges?priceListIsMaster=<priceListIsMaster>
-
GET https://my.tractbilling.com/t/s/r/1.24/productPriceRanges?currencyType=<currencyType>
REST Example Query and Response
In the following example REST query, the parameter of productEid was used. The Product's EID value (in this example "1301"), was learned through a previous query on Products.
-
GET https://my.tractbilling.com/t/s/r/1.24/productPriceRanges?productEid=1301
This was the response (line breaks and formatting added for ease of reading):
<?xml version="1.0" encoding="UTF-8" standalone="yes"?> <priceRanges xmlns="http://www.tractbilling.com/billing/1_24/domain/rest" xmlns:ns2="http://www.tractbilling.com/billing/1_24/domain" pageNumber="1" pageSize="50" totalElements="6" elementCount="6" totalPages="1"> <ns2:priceRange quantityBeginRange="0.00" price="1500.00" level="1" eid="1947"/> <ns2:priceRange quantityBeginRange="0.00" price="20.00" level="1" eid="1948"/> <ns2:priceRange quantityBeginRange="0.00" price="20.00" level="1" eid="1957"/> <ns2:priceRange quantityBeginRange="0.00" quantityEndRange="3.00" price="50.00" level="1" eid="4471"/> <ns2:priceRange quantityBeginRange="3.00" quantityEndRange="7.00" price="30.00" level="2" eid="4472"/> <ns2:priceRange quantityBeginRange="7.00" price="10.00" level="3" eid="4473"/> </priceRanges>