Product Offer REST Bindings

The product offer REST bindings create new product offers, return information about existing product offers, and update existing product offers.

The information available to the product offer REST bindings includes:
  • PriceComponentList
  • AttributeList
  • ProductList
  • BalanceImpactList
  • MeterImpactList

Examples

POST /objects/Offer/basic shows how to create a new product offer.

Note: System attributes are configured in XML by IT administrators and contain a mapping of attribute values to MDC fields. You cannot change the message MDC or field values or add and delete system attributes through the REST APIs.
Table 1. POST /objects/Offer/basic
URL
POST http://localhost:8080/matrixx/data/objects/Offer/basic
Input
<Offer external_id='test_offer_create' name='test_offer_create' priority='300' type='override'>
    <EffectiveDate>2013-03-18T00:00:00</EffectiveDate>
    <ProductList>
        <Product id='9' />
    </ProductList>
    <PriceComponentList>
        <PriceComponent id='2313' />
        <PriceComponent id='2374' />
    </PriceComponentList>
    <AttributeList>
        <Attribute code='5' display='5' id='13' lock='false' value='5' />
        <Attribute code='6' display='510' id='12' lock='false' value='3145728' />
    </AttributeList>
    <BalanceImpactList>
        <Balance id='90213' class_id='20003' />
    </BalanceImpactList>
    <MeterImpactList>
        <Meter id='90233' />
        <Meter id='90234' />
        <Meter id='90235' />
        <Meter id='90236' />
    </MeterImpactList>
</Offer>
Response
<CreateResponse>
    <type>Offer</type>
    <DomainId>1</DomainId>
    <Result>0</Result>
    <ResultText>Success</ResultText>
    <ObjectId>147</ObjectId>
    <Revision>0</Revision>
</CreateResponse> 

GET /objects/Offer/Offer/{id} shows how to retrieve a product offer from the in-memory pricing database.

Table 2. GET /objects/Offer/Offer/{id}
URL
GET http://localhost:8080/matrixx/data/objects/Offer/basic/1234
Response
<Offer charge_required_balance='false' description='bar' external_id='1234' name='Flex_Data'>
    <EffectiveDate>2000-01-01T00:00:00</EffectiveDate>
    <PriceComponentList>
        <PriceComponent id='21' />
        <PriceComponent id='23' />
        <PriceComponent id='167' />
    </PriceComponentList>
    <ProductList>
        <Product id='1' />
    </ProductList>
    <BalanceImpactList>
        <Balance class_id='20003' expire_on_consumption='true' id='21005' is_private='true' tier='Group' />
        <Balance class_id='20002' id='21001' />
    </BalanceImpactList>
    <MeterImpactList>
        <Meter id='21083' />
    </MeterImpactList>
</Offer>

PUT /objects/Offer/Offer/{id} shows how to update an existing product offer.

Table 3. PUT /objects/Offer/Offer/{id}
URL
PUT http://localhost:8080/matrixx/data/objects/Offer/basic/147
Input
<?xml version="1.0" encoding="UTF-8"?>
<Offer name="200" external_id="Preferred Sample Zone">
    <PriceComponentList>
        <priceComponent id="2402"/>
        <priceComponent id="2403"/>
    </PriceComponentList>
</Offer> 
Response
<UpdateResponse>
    <type>Offer</type>
    <Result>0</Result>
    <ResultText>Success</ResultText>
    <ObjectId>147</ObjectId>
    <Revision>1</Revision>
</UpdateResponse>