Overview
Error Handling

Methods

API Documentation (API Version bleed)

Billing/Bill/

DESCRIPTION

A bill is collection of invoices that a customer owes at the time the bill was generated.

**** NOTE ****

These methods have been moved here from billing->invoice

In order to help clear up confusion, we have made an effort to separate bills and invoices. Originally, to try and make things simpler, we attempted to make bills and invoices appear more like one thing. This, unfortunately, did not work as well as intended. In making things more transparent, the API methods involving Bills and Invoices have been refined.

details

URL:

https://api.liquidweb.com/bleed/Billing/Bill/details

Description:

Returns data specific to one bill. In addition to what is returned in the list method, additional details about the specific lineitems are included.

Parameters:

ParameterTypeNotes
alsowithA single word, consisting of only letters, digits, and underscores.
idA positive integer value (i.e. 1 and up).* Required

Returns:

FieldTypeNotes
accnt

A valid account number, up to 6 digits in length.

The account number a given bill is associated with.

bill_date

A valid date in YYYY-MM-DD format.

The date a given bill was created.

due

A monetary value, such as -$.05, 0.05, or -5.00

The amount remaining due on a given bill.

end_date

A valid date in YYYY-MM-DD format.

The end date of a date range for a given bill covering all invoices associated with the bill.

id

A valid id number (a positive integer).

The unique id of a given bill.

invoices

An array of associative arrays containing

An array containing a list of invoices associated witha bill.

* Optional
 
accnt

A valid account number, up to 6 digits in length.

The account number associated with a given invoice.

amounts

An associative array containing the fields:

An associative array containing the calculated total, paid, and due amounts for an invoice

 
applied

A monetary value, such as -$.05, 0.05, or -5.00

When paying an invoice, the amount of money that was applied

* Optional
due

A monetary value, such as -$.05, 0.05, or -5.00

The total amount remaining due on an invoice..

paid

A monetary value, such as -$.05, 0.05, or -5.00

The total amount current paid on an invoice.

pretax_total

A monetary value, such as -$.05, 0.05, or -5.00

The sum tax total of all line items on an invoice.

total

A monetary value, such as -$.05, 0.05, or -5.00

The sum total of all line items on an invoice.

total_discount

A monetary value, such as -$.05, 0.05, or -5.00

The sum pre-tax total of all discounts on an invoice.

total_tax

A monetary value, such as -$.05, 0.05, or -5.00

The sum tax total of all line items on an invoice.

billed_date

A valid date in YYYY-MM-DD format.

The date an customer was notified of an invoice, will not be returned if the invoice has not been billed yet.

* Optional
dependency_status

A single word, consisting of only letters and digits.

Defines if an invoice is a dependent of another (parent) invoice.

due_date

A valid date in YYYY-MM-DD format.

The date an invoice is due.

* Optional
generated_date

A valid date and time in YYYY-MM-DD HH:MM:SS format.

The date an invoice was generated in our system.

id

A valid id number (a positive integer).

A unique id for an invoice.

id_display

A single word, consisting of only letters, digits, hyphens, and underscores.

The id for an invoice including a revision number, if any

is_past_due

A boolean value (0 or 1).

Indicates if the invoice is considered pastdue or not

lineitem_groups

An array of associative arrays containing

An array containing a list of line item groups associated with a bill. Each element of the array is an associative array containing the following fields:

* Optional
 
account

A valid account number or subaccnt owner id.

The account id (and possibly subaccnt id) tied to a line item group.

description

A string of text, containing no newlines or other control characters.

The description of a line item group.

group_description

A string of text, containing no newlines or other control characters.

The description of a line item group.

group_id

A valid id number (a positive integer).

The unique id of the line item group.

invoice_id

A valid id number (a positive integer).

The unique id of the invoice associated with a line item group.

line_items

An array of associative arrays containing

* Optional
 
adjustment_date

A valid date in YYYY-MM-DD format.

The date that the adjustment was performed.

* Required if:
  • is_adjustment is set to '1'
adjustment_difference

A monetary value, such as -$.05, 0.05, or -5.00

How much the charged amount changed.

* Required if:
  • is_adjustment is set to '1'
charged_amountA monetary value, such as -$.05, 0.05, or -5.00* Optional
end_date

A valid date in YYYY-MM-DD format.

The date the billing period was ended for this specific line item.

group_idA positive integer value (i.e. 1 and up).* Optional
has_adjustments

A boolean value (0 or 1).

Indicates if any adjustements have been applied to this line item.

* Optional
history

An array of associative arrays containing

An array of prior line items that were replaced by a series of adjustments resulting in the current line item

* Optional
 
adjustment_by

A username up to 20 characters in length if active or 24 if suspended.

The user who made the adjustment

* Required if:
  • is_adjustment is set to '1'
adjustment_date

A valid date in YYYY-MM-DD format.

The date that the adjustment was performed.

* Required if:
  • is_adjustment is set to '1'
adjustment_difference

A monetary value, such as -$.05, 0.05, or -5.00

How much the charged amount changed.

* Required if:
  • is_adjustment is set to '1'
adjustment_for_line_item

A positive integer value (i.e. 1 and up).

The line item this adjustment is adjusting.

* Optional
aggregation_keyA string permitting tabs, carriage returns and newlines* Optional
billable_unit_features_id

A valid id number (a positive integer).

Unique ID of the BUF the line item was created from.

* Optional
charged_amount

A monetary value, such as -$.05, 0.05, or -5.00

The amount charged for.

comments

A string permitting tabs, carriage returns and newlines

The line item this adjustment is adjusting.

* Required if:
  • is_adjustment is set to '1'
dependency_type

A single word, consisting of only letters and digits.

If this line item represents a discount, this is a description of the type of discount.

* Optional
display_order

A non-negative integer value (i.e. 0 and up).

The order in which the line items should be displayed.

* Optional
end_date

A valid date in YYYY-MM-DD format.

The date the billing period was ended for this specific line item.

group_id

A valid id number (a positive integer).

Unique ID of the group the line item belongs to.

has_adjustments

A boolean value (0 or 1).

Indicates if any adjustements have been applied to this line item.

* Optional
has_adjustments_amount

A monetary value, such as -$.05, 0.05, or -5.00

How much the line item adjustment was.

* Required if:
  • has_adjustments is set to '1'
has_adjustments_invoice_id

A valid id number (a positive integer).

The ID of the invoice containing the adjustments.

* Required if:
  • has_adjustments is set to '1'
has_adjustments_mechanism

Text containing only letters, underscores, and spaces.

Details the type of adjustment performed.

* Required if:
  • has_adjustments is set to '1'
id

A valid id number (a positive integer).

Unique ID of the line item being viewed.

is_adjustment

A boolean value (0 or 1).

Indicates if this line item is an adjustment to another invoice.

* Optional
is_recurring

A boolean value (0 or 1).

Indicates if this charge is recurring or not.

* Optional
item_description

A string of text, containing no newlines or other control characters.

Description of the specific line item

parent_feature_id

A positive integer value (i.e. 1 and up).

The ID of the parent feature for a line item.

* Optional
parent_line_item_id

A valid id number (a positive integer).

Unique ID of the parent line item, if this line item represents a discount.

* Optional
post_tax_amount

A monetary value, such as -$.05, 0.05, or -5.00

This is the total of the charged amount and tax.

* Optional
quantity

A non-negative integer value (i.e. 0 and up).

The number of units being charged for on this line item.

* Optional
start_date

A valid date in YYYY-MM-DD format.

The date the billing period was started for this specific line item.

subaccnt_base_product_id

A valid id number (a positive integer).

Unique ID of the subaccnt base product the line item was created from.

* Optional
tax

A monetary value, such as -$.05, 0.05, or -5.00

This is the amount of tax charged on the invoice line item.

* Optional
taxable

A boolean value (0 or 1).

Indicates if charge is taxable or not.

* Optional
idA positive integer value (i.e. 1 and up).* Optional
is_adjustment

A boolean value (0 or 1).

Indicates if this line item is an adjustment to another invoice.

* Optional
item_description

A string of text, containing no newlines or other control characters.

Description of the specific line item

quantity

A non-negative integer value (i.e. 0 and up).

The number of units being charged for on this line item.

* Optional
start_date

A valid date in YYYY-MM-DD format.

The date the billing period was started for this specific line item.

subtotal

A monetary value, such as -$.05, 0.05, or -5.00

The sum of all line items associated with a line item group.

payment_status

A single word, consisting of only letters, digits, hyphens, and underscores.

Indicates if the status of an invoice. Statuses include pending, unpaid, partially-paid, paid, void, etc.

payments

An array of associative arrays containing

An array containing a list of payments associated with an invoice. Each element of the array is an associative array containing the following fields:

* Optional
 
amount_paid

A monetary value, such as -$.05, 0.05, or -5.00

The amount of money a payment was recorded for.

bill_id

A valid id number (a positive integer).

The unique id of the bill a payment is tied to.

id

A valid id number (a positive integer).

A unique id for a payment associated with an invoice.

invoice_id

A valid id number (a positive integer).

The unique id of the invoice a payment is tied to.

received_date

A valid date in YYYY-MM-DD format.

The date a payment was recieved.

reason

A string consisting of only letters, digits, hyphens, spaces, and underscores.

An optional field that can indicate the reason an invoice was created.

* Optional
revision

A non-negative integer value (i.e. 0 and up).

How many revisions the invoice has experienced (a revision is one or more adjustments with the same time stamp)

serv_end_date

A valid date in YYYY-MM-DD format.

The end date of a date range that an invoice covered for an associated service(s).

serv_start_date

A valid date in YYYY-MM-DD format.

The start date of a date range that an invoice covered for an associated service(s).

payments

An array of associative arrays containing

An array containing a list of payments associated with a bill. Each element of the array is an associative array containing the following fields:

 
account

A string of text, containing no newlines or other control characters.

The account the recorded payment was associated with.

amount

A monetary value, such as -$.05, 0.05, or -5.00

The amount the payment was recorded for.

paid_date

A valid date in YYYY-MM-DD format.

The date the payment was recorded on.

type

A string of text, containing no newlines or other control characters.

The type of payment received.

start_date

A valid date in YYYY-MM-DD format.

The start date of a date range for a given bill covering all invoices associated with the bill.

status

A single word, consisting of only letters, digits, hyphens, and underscores.

The status of a given bill (new, authorized, voided, refuneded, etc).

total

A monetary value, such as -$.05, 0.05, or -5.00

The total amount a bill is for after summing all the invoices on it.

type

A single word, consisting of only letters and digits.

Defines the payment method being used when a bill was created (ie, check or credit card).

Possible Errors:

Refer to the Error Handling documentation for the list of exception types

list

URL:

https://api.liquidweb.com/bleed/Billing/Bill/list

Description:

Returns a list of all the bills for the logged in account. Bills are created at your regular billing date, but are also created for one-off items like creating or cloning a server.

Parameters:

ParameterTypeNotes
alsowithA single word, consisting of only letters, digits, and underscores.
page_numA positive integer value (i.e. 1 and up).* Optional
  • Defaults to: 1
page_sizeA positive integer value (i.e. 1 and up).* Optional
  • Defaults to: 25

Returns:

FieldType
item_countA non-negative integer value (i.e. 0 and up).
item_totalA non-negative integer value (i.e. 0 and up).
itemsAn array of associative arrays containing
 
accntA valid account number, up to 6 digits in length.
bill_dateA valid date in YYYY-MM-DD format.
dueA monetary value, such as -$.05, 0.05, or -5.00* Optional
end_dateA valid date in YYYY-MM-DD format.* Optional
idA positive integer value (i.e. 1 and up).
start_dateA valid date in YYYY-MM-DD format.* Optional
statusA single word, consisting of only letters, digits, hyphens, and underscores.* Optional
totalA monetary value, such as -$.05, 0.05, or -5.00* Optional
typeA single word, consisting of only letters and digits.
page_numA positive integer value (i.e. 1 and up).
page_sizeA positive integer value (i.e. 1 and up).
page_totalA positive integer value (i.e. 1 and up).

Possible Errors:

Refer to the Error Handling documentation for the list of exception types