Bills

Bills_Create

Creates a bill (statement) for a particular customer.

Input

  • Bill
  • CustomerIDAs Integer – The ID of the customer having a bill generated.
  • DueDateAs Date – Optional - The due date of the bill being generated.
  • IncludeUnbilledUsageAs Boolean – Optional - Indicates whether or not to include unbilled usage in the generation of the bill.
  • IsFinalBillAs Boolean – Optional - Indicates whether or not this is the customer's final bill.
  • AddToPrintQueueAs Boolean – Optional - Marks the bill to be printed.
  • AddToEmailQueueAs Boolean – Optional - Marks the bill to be emailed.
  • ChargeListAs List(Of Integer) – Optional - A list of specific ChargeIDs to be applied in the bill being generated. Invalid charges will be returned in validation.\

Output

  • IDAs Integer – The ID of the bill that was created.

Bills_Delete

Deletes a bill (statement) for a particular customer.

Input

  • IDAs Integer – The ID (Unique Identifier) of the bill being deleted.\

Output
None

Bills_Download

Returns a summary of a bill represented as XML or a base-64 encoded PDF.

Input Fields

Field

Type

Notes

Required?

ID

Integer

ID of the bill to be returned

Required

Type

Enum_Bills_Download_Type

The string representation of the bill summary to be returned. Supports 'XML' or 'PDF'.

Required

Output Fields

Field

Type

Notes

Bill

String

Bill summary as XML or a base-64 encoded PDF.

CustomerID

Integer

Rev.io Customer ID

Example Requests

<?xml version="1.0" encoding="utf-8"?>
<soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema">
    <soap:Body>
        <Bills_Download xmlns="http://api.myh2o.com/v20">
            <Request>
                <Credentials>
                    <Username>[rev.io_username]</Username>
                    <Password>[rev.io_password]</Password>
                    <Client>[rev.io_client_code]</Client>
                </Credentials>
                <ID>1201</ID>
                <Type>XML</Type>
            </Request>
        </Bills_Download>
    </soap:Body>
</soap:Envelope>
<?xml version="1.0" encoding="utf-8"?>
<soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema">
    <soap:Body>
        <Bills_Download xmlns="http://api.myh2o.com/v20">
            <Request>
                <Credentials>
                    <Username>[rev.io_username]</Username>
                    <Password>[rev.io_password]</Password>
                    <Client>[rev.io_client_code]</Client>
                </Credentials>
                <ID>1201</ID>
                <Type>PDF</Type>
            </Request>
        </Bills_Download>
    </soap:Body>
</soap:Envelope>

Example Response (PDF)

<?xml version="1.0" encoding="utf-8"?>
<soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema">
  <soap:Body>
    <Bills_DownloadResponse xmlns="http://api.myh2o.com/v20">
      <Bills_DownloadResult>
        <Header>
          <Success>true</Success>
          <SessionKey>[rev.io_session_key]</SessionKey>
          <Impersonated>false</Impersonated>
        </Header>
        <Bill>JVBERi0xLjENCiX5+prnDQoxIDAgb2JqDQo8PA0KL0Rlc3RzIDw....</Bill>
        <CustomerID>12345</CustomerID>
      </Bills_DownloadResult>
    </Bills_DownloadResponse>
  </soap:Body>
</soap:Envelope>

Example Error Response

<?xml version="1.0" encoding="utf-8"?>
<soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema">
  <soap:Body>
    <Bills_DownloadResponse xmlns="http://api.myh2o.com/v20">
         <Bills_DownloadResult>
            <Header>
               <Success>false</Success>
               <Message>Error processing request.</Message>
               <Impersonated xsi:nil="true"/>
               <Error_Description>Could not generate the bill.</Error_Description>
            </Header>
            <Debug>
               <Request>
                  <Credentials>
                    <Username>[rev.io_username]</Username>
                    <Password/>
                    <Client>[rev.io_client_code]</Client>
                  </Credentials>
                  <ID>403323</ID>
                  <Type>XML</Type>
               </Request>
            </Debug>
         </Bills_DownloadResult>
      </Bills_DownloadResponse>
  </soap:Body>
</soap:Envelope>