4.5 Usage Activity API

Usage Activity records are used for metered billing and used in conjunction with a Plan that has one or more Usage based charges. 

4.5.1. Retrieve Usage Activity:

GET /rest/activities?format=xml

GET /rest/activities?format=xml&max=[x]&offset=[z]

GET /rest/activities?format=xml&extCustomerRef=[ref]

GET /rest/activities?format=xml&customerId=[id]

GET /rest/activities?format=xml&orderNumber=[n]

GET /rest/activities?format=xml&invoiceNumber=[z]

GET /rest/activities?format=xml&priceCode=[code]

GET /rest/activities?format=xml&beginDate=[yyyy-MM-dd]

GET /rest/activities?format=xml&beginDate=[yyyy-MM-dd]&endDate=[yyyy-MM-dd]


Sample Output:


  <activity id="147">

    <activityBatch id="29" />



    <customer id="316" />

    <amount />

    <order id="357" />

    <orderLineItem id="1154" />




    <chargeEndDate />

    <invoiceText />

    <unitPrice />


  <activity id="148">




4.5.2. Create (Upload) Usage Activity:

Usage activity may be uploaded as a batch (with a maximum of 1000 records ber batch).There are 3 critical fields that are required for all Activity records. It is recommend that your calling programs send all the 3 fields if they are available.

The example shows both forms of specifying the required fields.

POST /rest/activities?format=xml


  <activity> <!-- Note this block uses external IDs -->







  <activity> <!-- Note this block uses internal (BluBilling assigned) IDs -->


    <customer id="316" />


    <order id="357" />





4.5.3. Delete Individual Activity Records:

To delete a record (that has not yet been billed), use the HTTP DELETE call:

DELETE /rest/activity/id?format=xml

DELETE /rest/activity?format=xml&extRefId=[code]

Note that records must be deleted one at a time. The singular form of "activity" is used in the URL (rather than "activities").