DiscountCode
Version: 1.33
Parameters
Extends: TractObject
Element | Type | Required? | Description |
discountChargeCategory |
discountChargeCategory |
The charge category for this discount. |
|
discount |
discount |
The discount to apply this discount to. |
Attribute | Required? | Datatype | Description |
name |
string |
Name for this discount code. |
|
status |
DiscountCodeStatus |
Draft Active Suspended |
|
description |
string |
Description of this discount code. |
|
validFrom |
dateTime |
Date this code becomes active. |
|
validTo |
dateTime |
Date this code becomes inactive. |
|
limit |
int |
Limit to number of uses. |
|
unlimited |
boolean |
Is this an unlimited discount code? |
|
uses |
int |
Number of times this code has been used. |
Querying DiscountCode
For paged results, use the plural of the entity name (for example, billingAccounts, productCategories). For more information, refer to Understanding Queries.
Key | Type |
eid |
Long |
name |
String |
status |
DiscountCodeStatus |
discountChargeCategoryEid |
Long |
validFrom |
Timestamp |
validTo |
Timestamp |
unlimited |
Boolean |
limit |
Integer |
uses |
Integer |
discountEid |
Long |
discountIdentifier |
String |
discountIdentifierEid |
Long |
priceListEid |
Long |
priceListIsMaster |
Boolean |
currencyType |
Currency |
productEid |
Long |
getDiscountCodes |
GET |
https://my.tractbilling.com/t/s/r/1.33/discountCodes |
getDiscountCode |
GET |
https://my.tractbilling.com/t/s/r/1.33/discountCodes/{eid} |
addDiscountIdentifier |
POST |
https://my.tractbilling.com/t/s/r/1.33/discountCodes/{eid}/addDiscountIdentifierToDiscountCode |
removeDiscountIdentifier |
POST |
https://my.tractbilling.com/t/s/r/1.33/discountCodes/{eid}/removeDiscountIdentifierFromDiscountCode |
removeProduct |
POST
|
https://my.tractbilling.com/t/s/r/1.33/discountCodes/{eid}/removeProduct |
addProduct |
POST |
https://my.tractbilling.com/t/s/r/1.33/discountCodes/{eid}/addProduct |
Sample Requests and Responses
SOAP
<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:ser="http://www.tractbilling.com/billing/1_31/service" xmlns:dom="http://www.tractbilling.com/billing/1_31/domain"> <soapenv:Header/> <soapenv:Body> <ser:command> <ser:commandRequest> <addProductToDiscountCode> <discountCode eid="632"/> <product eid="32"/> </addProductToDiscountCode> </ser:commandRequest> </ser:command> </soapenv:Body> </soapenv:Envelope>