This site contains the documentation that is relevant to older WSO2 product versions and offerings.
For the latest WSO2 documentation, visit https://wso2.com/documentation/.
Working with Bills in Clio
Overview
The following operations allow you to work with bills. Click an operation name to see details on how to use it.
For a sample proxy service that illustrates how to work with bills, see Sample configuration.
Operation details
This section provides further details on the operations related to bills.
Retrieving a bill by ID
The getBill operation retrieves a bill by ID.
<clio.getBill> <billId>{$ctx:billId}</billId> </clio.getBill>
Properties
The ID of the bill whose details should be retrieved.billId:
Sample request
Following is a sample REST/JSON request that can be handled by the getBill operation.
{ "accessToken": "", "apiUrl": "https://app.goclio.com", "billId": "" }
Related Clio documentation
http://api-docs.clio.com/v2/index.html#get-a-bill
Retrieving all bills by ID
The listBills operation retrieves all bills by ID.
<clio.listBills> <clientId>{$ctx:clientId}</clientId> <status>{$ctx:status}</status> <state>{$ctx:state}</state> <offset>{$ctx:offset}</offset> <limit>{$ctx:limit}</limit> <createdSince>{$ctx:createdSince}</createdSince> <updatedSince>{$ctx:updatedSince}</updatedSince> </clio.listBills>
Properties
Returns bills for a given client.clientId:
Status of the bill, either 'all' (default), 'open', 'past_due', 'paid'. This field will be obsoleted in the next version of the API.status:
Returns only those bills with the given state. One of 'draft', 'awaiting_approval', 'awaiting_payment', 'paid'.state:
Returns records with an ID greater than the offset.offset:
The maximum number of records to be returned. (int, default 1000)limit:
Returns records created on or after the date. (date, ISO 8601 format)createdSince:
Returns records updated on or after the date. (date, ISO 8601 format)updatedSince:
Sample request
Following is a sample REST/JSON request that can be handled by the listBills operation.
{ "limit": "", "createdSince": "", "accessToken": "", "status": "", "state": "", "apiUrl": "https://app.goclio.com", "updatedSince": "", "offset": "", "clientId": "" }
Related Clio documentation
http://api-docs.clio.com/v2/index.html#get-all-bills
Sample configuration
Following is a sample proxy service that illustrates how to connect to Clio with the init
operation and use the
operation. The sample request for this proxy can be found in the getBill sample request. You can use this sample as a template for using other operations in this category.getBill
<?xml version="1.0" encoding="UTF-8"?> <proxy name="clio_getBill" startOnLoad="true" statistics="disable" trace="disable" transports="https,http" xmlns="http://ws.apache.org/ns/synapse"> <target> <inSequence> <property name="apiUrl" expression="json-eval($.apiUrl)"/> <property name="accessToken" expression="json-eval($.accessToken)"/> <property name="billId" expression="json-eval($.billId)"/> <clio.init> <apiUrl>{$ctx:apiUrl}</apiUrl> <accessToken>{$ctx:accessToken}</accessToken> </clio.init> <clio.getBill> <billId>{$ctx:billId}</billId> </clio.getBill> <respond/> </inSequence> <outSequence> <log/> <send/> </outSequence> </target> <description/> </proxy>