SalesOrder, RenewalOrder, and ChangeOrder

Version: 1.33

Order is the parent object for all orders (sales, renewal, change) in Gotransverse. When submitting an order via the API, you will submit a salesOrder. Change orders and renewal orders are generated through the ChangeService and RenewService commands.

Parameters

Extends: TractObject

Elements
Element Type Required? Description

orderItems

orderItem

Y

A list of items in the order.

billingAccount

billingAccount

Y

The billing account this order applies to.

payments

Payment

 

List of payments made on this order.

customFieldValues

CustomFieldValue

 

List of custom field values associated with this order.

Attributes
Attribute Datatype Required? Description

orderNum

string

 

Defaults to current datetime.

note

string

 

The adjustment amount.

purchaseOrderNumber

string

 

What is this adjustment for?

emailReceipt

boolean

 

Has this adjustment been applied to an invoice yet? Default is False.

referral

string

 

Is this a credit or debit adjustment? True = Credit, False = Debit. Default is

orderDate

dateTime

 

PENDING

POSTED

REVERSED

totalAmount

decimal

 

 

orderStatus

decimal

Y

Posting date for the adjustment.

subTotal

decimal

 

User who posted the adjustment.

taxTotal

decimal

 

Apply this adjustment to an invoice manually? If False, the adjustment will be applied to the oldest open invoice.

dueNowTotal

decimal

 

The portion of this adjustment that has not been applied to an invoice.

dueNowTaxTotal

dateTime

Y

RENEWAL ORDER ONLY: The renewal date.

For more information about data types, refer to Data Types.

Querying Order

For paged results, use the plural of the entity name (for example, billingAccounts, productCategories). For more information, refer to Understanding Queries.

Query Keys
Key Type

eid

Long

orderNum

String

status

OrderStatus

billingAccountEid

Long

accountNum

String

externalAccountNum

String

orderDate

Timestamp

referral

String

purchaseOrderNumber

String

customFieldValueEid

Long

customFieldValue

String

customFieldEid

Long

REST Endpoints

/billingAccounts

voidDraftOrder

POST

https://my.tractbilling.com/t/s/r/1.33/billingAccounts/{eid}/voidDraftOrder

createDraftOrder

POST

https://my.tractbilling.com/t/s/r/1.33/billingAccounts/{eid}/createDraftOrder

/changeOrders

getChangeOrders

GET

https://my.tractbilling.com/t/s/r/1.33/changeOrders

updateOrderInfo

PUT

https://my.tractbilling.com/t/s/r/1.33/changeOrders/{eid}

getChangeOrder

GET

https://my.tractbilling.com/t/s/r/1.33/changeOrders/{eid}

/salesOrders

createSalesOrder

POST

https://my.tractbilling.com/t/s/r/1.33/salesOrders

getSalesOrders

GET

https://my.tractbilling.com/t/s/r/1.33/salesOrders

voidDraftOrder

DELETE

https://my.tractbilling.com/t/s/r/1.33/salesOrders/{eid}

getSalesOrder

GET

https://my.tractbilling.com/t/s/r/1.33/salesOrders/{eid}

updateOrderInfo

PUT

https://my.tractbilling.com/t/s/r/1.33/salesOrders/{eid}

confirmOrder

POST

https://my.tractbilling.com/t/s/r/1.33/salesOrders/{eid}/confirm

approveOrderItem

POST

https://my.tractbilling.com/t/s/r/1.33/salesOrders/{eid}/item/{sequence : \d+}/approve

denyOrderItem

POST

https://my.tractbilling.com/t/s/r/1.33/salesOrders/{eid}/item/{sequence : \d+}/deny

/renewalOrders

getOrders

GET

https://my.tractbilling.com/t/s/r/1.33/renewalOrders

getOrder

GET

https://my.tractbilling.com/t/s/r/1.33/renewalOrders/{eid}

/orders

getOrders

GET

https://my.tractbilling.com/t/s/r/1.33/orders

getOrder

GET

https://my.tractbilling.com/t/s/r/1.33/orders/{eid}

addCustomFieldValue

POST

https://my.tractbilling.com/t/s/r/1.33/orders/{eid}/addCustomFieldValue

removeCustomFieldValue

POST

https://my.tractbilling.com/t/s/r/1.33/orders/{eid}/removeCustomFieldValue

resendEmailReceipt

POST

https://my.tractbilling.com/t/s/r/1.33/orderes/{eid}/resendEmailReceipt

Sample Requests and Responses

REST

Create a Sales Order with Add-on Product

POST

  • https://my.tractbilling.com/t/s/r/1.33/salesOrders

<salesOrder note="Simple Subscription Order" purchaseOrderNumber="123456789" xmlns="http://www.tractbilling.com/billing/1_33/domain">
    <orderItems>
        <orderItem quantity="1" sequence="1" description="Enterprise Account Created" referenceId="Test_ID3">
            <product eid="14130"/>
            <orderItems>
                <orderItem quantity="1" sequence="1" description=“Addon”>
                    <product eid="14131”/>
                </orderItem>
            </orderItems>
        </orderItem>
    </orderItems>
    <billingAccount billType="EMAIL" automaticRecurringPayment="true">
        <dailyBillCycle eid="4384"/>
        <organization name="ThisIsACool Organization" taxIdNumber="00-0000000">
            <addresses>
                <postalAddress purpose="SERVICE" country="USA" city="Austin" 
regionOrState="TX" postalCode="78701" line1="100 Tree Street" line2="PO Box 123"/>
                <postalAddress purpose="BILLING" country="USA" city="Austin" 
regionOrState="TX" postalCode="78701" line1="200 Music Avenue" line2="PO Box 44"/>
                <postalAddress purpose="SHIPPING" country="USA" city="Round Rock" 
regionOrState="TX" postalCode="78665" line1="300 Here Street" line2="PO Box 67"/>
                <telecomAddress dialingPrefix="9" countryCode="1" 
areaCode="512" number="000000" extension="123" purpose="OFFICE"/>
                <emailAddress email="JaneCool@ThisIsACoolOrganiation.com" purpose="PRIMARY"/>
            </addresses>
        </organization>
        <billingAccountCategory eid="749"/>
    </billingAccount>
</salesOrder>

Create a Sales Order

Creating the billing account and autopay method at order time.

POST

  • https://my.tractbilling.com/t/s/r/1.33/salesOrders

<salesOrder orderDate="2015-05-01" xmlns="http://www.tractbilling.com/billing/1_33/domain" note="Subscription Ordered" purchaseOrderNumber="1111111">
         <orderItems>
            <!--SUBSCRIPTION with RESOURCE ID start -->
           <orderItem quantity="1" sequence="1" referenceId="Test_ID3">
 
              <!-- 608 - Subscription with Multiple Ids -->
              <product eid="693"/>
 
                 <!--Add Service Resource ID -->
                 <serviceResources>
                     <serviceResource identifier="testing9">
                         <category eid="39"/>
                     </serviceResource>
                 </serviceResources>
           </orderItem>
 
           <!--SUBSCRIPTION with RESOURCE ID end -->
 
        </orderItems>
         <billingAccount billType="EMAIL" automaticRecurringPayment="true">
         <monthlyBillCycle eid="23"/>
 
         <!--ENTERPRISE Account -->
         <organization name="order with Autopayment using ref key: 18th Nov2015">
           <addresses>
              <postalAddress purpose="SERVICE" country="USA" city="Austin" regionOrState="TX" postalCode="78701" line1="100 Service Address St." line2="PO Box 123"/>
              <postalAddress purpose="BILLING" country="USA" city="Austin" regionOrState="TX" postalCode="78701" line1="200 Billing Address St." line2="PO Box 123"/>
              <postalAddress purpose="SHIPPING" country="USA" city="Austin" regionOrState="TX" postalCode="78701" line1="300 Shipping Address St." line2="PO Box 123"/>
              <telecomAddress dialingPrefix="9" countryCode="1" areaCode="512" number="2793119" extension="123" purpose="OFFICE"/>
              <emailAddress email="harpal.singh@algoworks.com" purpose="PRIMARY"/>
           </addresses>
         </organization>
         <billingAccountCategory eid="16"/>
<recurringPayments>       
<recurringPayment>
                   <referencedCreditCardPaymentMethod referenceKey="bd3511a9-90f9-4e23-9bf5-b0121c199d2d"/>
               </recurringPayment>
</recurringPayments>
 
           </billingAccount>
<payments>
          <payment amount="4.00" description="Reference Key - REST 1. 33 - $4" useRecurringPayment="true">
        
     
        </payment>
         </payments>
 
         </salesOrder>

Create a Sales Order with Price Override at Order Time

<salesOrder note="Simple Subscription Order" purchaseOrderNumber="123456789" xmlns="http://www.tractbilling.com/billing/1_33/domain">
	<orderItems>
		<orderItemPrices>
			<orderItemRecurringPrice>
				<recurringProductPrice eid="678"/>
					<orderItempriceRanges>
					<orderItemPriceRange quantityBeginRange="0.00"  quantityEndRange ="2.00" price="13" level="1" currencyType="USD" />
				<orderItemPriceRange quantityBeginRange="2.00"  price="5" level="2" currencyType="USD" />
					</orderItempriceRanges>
			</orderItemRecurringPrice>
			<orderItemOneTimePrice>
				<orderItempriceRanges>
					<orderItemPriceRange quantityBeginRange="0.00"  quantityEndRange ="1.00" price="6" level="1" currencyType="USD" />
					<orderItemPriceRange quantityBeginRange="1.00"  price="5" level="2" currencyType="USD" />
				</orderItempriceRanges>
			</orderItemOneTimePrice>
		</orderItemPrices>
	</orderItems>
    <billingAccount billType="EMAIL" automaticRecurringPayment="true">
        <dailyBillCycle eid="4384"/>
        <organization name="ThisIsACool Organization" taxIdNumber="00-0000000">
            <addresses>
                <postalAddress purpose="SERVICE" country="USA" city="Austin" 
regionOrState="TX" postalCode="78701" line1="100 Tree Street" line2="PO Box 123"/>
                <postalAddress purpose="BILLING" country="USA" city="Austin" 
regionOrState="TX" postalCode="78701" line1="200 Music Avenue" line2="PO Box 44"/>
                <postalAddress purpose="SHIPPING" country="USA" city="Round Rock" 
regionOrState="TX" postalCode="78665" line1="300 Here Street" line2="PO Box 67"/>
                <telecomAddress dialingPrefix="9" countryCode="1" 
areaCode="512" number="000000" extension="123" purpose="OFFICE"/>
                <emailAddress email="JaneCool@ThisIsACoolOrganiation.com" purpose="PRIMARY"/>
            </addresses>
        </organization>
        <billingAccountCategory eid="749"/>
    </billingAccount>
</salesOrder>

Refer to the following topics for more information: