POST
/
invoice_line_items

Authorizations

Authorization
string
header
required

API Keys can be issued in the Orb's web application.

Body

application/json
start_date
string
required

A date string to specify the line item's start date in the customer's timezone.

end_date
string
required

A date string to specify the line item's end date in the customer's timezone.

quantity
number
required

The number of units on the line item

invoice_id
string
required

The id of the Invoice to add this line item.

name
string
required

The item name associated with this line item. If an item with the same name exists in Orb, that item will be associated with the line item.

amount
string
required

The total amount in the invoice's currency to add to the line item.

Response

201
application/json
Created
amount
string
required

The final amount for a line item after all adjustments and pre paid credits have been applied.

discount
object | null
required
end_date
string
required

The end date of the range of time applied for this line item's price.

grouping
string | null
required

[DEPRECATED] For configured prices that are split by a grouping key, this will be populated with the key and a value. The amount and subtotal will be the values for this particular grouping.

minimum
object | null
requireddeprecated

This field is deprecated in favor of adjustments.

minimum_amount
string | null
requireddeprecated

This field is deprecated in favor of adjustments.

maximum
object | null
requireddeprecated

This field is deprecated in favor of adjustments.

maximum_amount
string | null
requireddeprecated

This field is deprecated in favor of adjustments.

adjustments
object[]
required

All adjustments (ie. maximums, minimums, discounts) applied to the line item.

name
string
required

The name of the price associated with this line item.

quantity
number
required

Either the fixed fee quantity or the usage during the service period.

start_date
string
required

The start date of the range of time applied for this line item's price.

subtotal
string
required

The line amount before before any adjustments.

adjusted_subtotal
string
required

The line amount after any adjustments and before overage conversion, credits and partial invoicing.

credits_applied
string
required

The number of prepaid credits applied.

partially_invoiced_amount
string
required

Any amount applied from a partial invoice

sub_line_items
object[]
required

For complex pricing structures, the line item can be broken down further in sub_line_items.

tax_amounts
object[]
required

An array of tax rates and their incurred tax amounts. Empty if no tax integration is configured.

id
string
required

A unique ID for this line item.

price
object | null
required

The Price resource represents a price that can be billed on a subscription, resulting in a charge on an invoice in the form of an invoice line item. Prices take a quantity and determine an amount to bill.

Orb supports a few different pricing models out of the box. Each of these models is serialized differently in a given Price object. The model_type field determines the key for the configuration object that is present.

For more on the types of prices, see the core concepts documentation