ProductRelation
Version: 1.33
Parameters
Extends: TractObject
Element | Type | Required? | Description |
product |
product |
|
|
Attribute | Required? | Datatype | Description |
type |
|
ProductRelationType |
RECOMMENDED DEPENDENT INCOMPATIBLE CHILD PARENT REQUIRED |
scope |
|
ProductRelationScopeType |
ACCOUNT ORDER |
Querying ProductRelation
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 |
productEid |
Long |
type |
relatedtype.ProductRelationType |
scope |
relatedscope.type.ProductRelationScopeType |
REST Endpoints
getProductRelations |
GET |
https://my.tractbilling.com/t/s/r/1.33/productRelations |
getProductRelation |
GET |
https://my.tractbilling.com/t/s/r/1.33/productRelations/{eid: \d+} |
addProductRelation |
POST |
https://my.tractbilling.com/t/s/r/1.33/products/{eid: \d+}/addRelation |
removeProductRelation |
POST |
https://my.tractbilling.com/t/s/r/1.33/products/{eid: \d+}/removeRelation |
Sample Requests and Responses
SOAP
Add Product Relationship
<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> <addProductRelation type="PARENT" scope="ACCOUNT" xmlns="http://www.tractbilling.com/billing/1_31/domain"> <product eid="116"/> <relatedProduct eid="117"/> </addProductRelation> </ser:commandRequest> </ser:command> </soapenv:Body> </soapenv:Envelope>
Remove Product Relationship
<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> <!-Optional:-> <ser:commandRequest> <removeProductRelation xmlns="http://www.tractbilling.com/billing/1_31/domain" type="PARENT"> <product eid="116" /> <relatedProduct eid="117"/> </removeProductRelation> </ser:commandRequest> </ser:command> </soapenv:Body> </soapenv:Envelope>
REST
Add Product Relationship
-
POST /products/116/addRelation
<?xml version="1.0" encoding="UTF-8" standalone="yes"?> <addProductRelation xmlns="http://www.tractbilling.com/billing/1_31/domain" type="PARENT" scope="ACCOUNT"> <product eid="116" /> <relatedProduct eid="117"/> </addProductRelation>
Remove Product Relationship
-
POST /products/116/removeRelation
<?xml version="1.0" encoding="UTF-8" standalone="yes"?> <removeProductRelation xmlns="http://www.tractbilling.com/billing/1_31/domain" type="PARENT"> <product eid="116" /> <relatedProduct eid="117"/> </removeProductRelation>