Skip to navigation

Add a line to an invoice

Requires the INVOICE.LINE.EDIT permission.

Authentication

X-API-KEYstring
API Key authentication via header
OR
AuthorizationBearer

Bearer authentication of the form Bearer <token>, where token is your auth token.

Path parameters

versionstringRequiredDefaults to 1
version
resourceIdstringRequiredDefaults to
The ID of the resource for which the action is posted.

Headers

x-platform-idstringOptional
Platform ID.

Request

This endpoint expects an object.
start_atdatetimeRequired
Start of the period that this line applies to
end_atdatetimeRequired
End of the period that this line applies to
pricing_typeenumRequired
Pricing type of this line, either FLAT or FIXED
pricing_bandobjectRequired
Pricing band of this line
product_item_idstring or nullOptional
Product item id of the line
product_item_typeenum or nullOptional
Product item type override, allows to create one off lines without setting up deduction items
Allowed values:
pricing_namestring or nullOptional
Option to override the name of the product item. If not used, the name of the product item will be used
volumeobjectOptional
The volume to be used
pricing_plan_subscription_idstring or nullOptional
Can be used to link the invoice line to a specific pricing plan subscription
pricing_plan_schedule_idstring or nullOptional
Can be used to link the invoice line to a specific pricing plan schedule
applicable_for_clauseslist of enums or nullOptional
The clauses of the subscriptions on this invoice that also apply to this line, not applicable to deductions
Allowed values:

Response

OK
object_typestring or nullOptionalRead-only
idstring or nullOptionalRead-only
invoice_numberstring or nullOptionalRead-only
purchase_order_numberstring or nullOptional
platform_idstring or nullOptionalRead-only
customer_idstring or nullOptional

id of the customer, can only be provided when creating a one-off invoice, and either id or reference is mandatory in that case

customer_referencestring or nullOptionalformat: "^\S+$"0-256 characters

reference of the customer, can only be provided when creating a one-off invoice, and either id or reference is mandatory in that case

sales_tax_percentagestring or nullOptional

Sales tax percentage of a one-off invoice, only allowed when the customer or the billing entity is US-based. When not provided for a US billing entity it defaults to 0, unless a tax calculation integration (e.g. AvaTax) determines the rate. Can be updated while the invoice is OPEN or DRAFT

customerobject or nullOptional
billing_entityobject or nullOptional
statusstringOptional
on_holdbooleanOptional
typeenumOptional
Allowed values:
created_atstring or nullOptionalRead-only
updated_atstring or nullOptionalRead-only
invoice_datedatetimeOptional
delivery_datestring or nullOptionalRead-only
due_datedatetime or nullOptional
billing_period_datestring or nullOptionalRead-only
billing_currencystring or nullOptionalRead-only
invoice_amount_including_taxobject or nullOptional
open_invoice_amountobject or nullOptional
closed_invoice_amountobject or nullOptional
paid_invoice_amountobject or nullOptional
timezonestring or nullOptionalRead-only
billing_periodobject or nullOptional
pricing_plan_subscription_idslist of strings or nullOptionalRead-only
pricing_plan_schedule_idslist of strings or nullOptionalRead-only
The pricing plan schedules this invoice bills for.
pricing_amount_typeenumOptional
Indicates whether the amounts provided, e.g. from the pricing plan, are including or excluding tax.
Allowed values:
periodslist of objectsOptional
Periods that are applicable for this invoice, use either periods or groups for summation, groups will be removed in later version
closed_periodslist of objects or nullOptionalRead-only
tax_categorieslist of objects or nullOptionalRead-only
tax_summaryobject or nullOptional
dunning_actionslist of objects or nullOptionalRead-only
payment_acceptor_idslist of stringsOptional
payment_actionslist of objects or nullOptionalRead-only
noteslist of strings or nullOptional
linked_invoiceslist of objects or nullOptionalRead-only
custom_fieldslist of objects or nullOptional
other_custom_fieldslist of objects or nullOptionalRead-only
creditobject or nullOptional
e_invoiceslist of objects or nullOptionalRead-only
used_exchange_rateslist of objects or nullOptionalRead-only
processing_only_customerslist of objects or nullOptionalRead-only
meter_valueslist of objects or nullOptionalRead-only
credit_typeslist of objects or nullOptionalRead-only
meter_property_variableslist of objects or nullOptionalRead-only

The meter property variables a pricing condition of this invoice was billed through, once each; their values are not included.

display_invoice_sub_lines_per_processing_only_customerboolean or nullOptionalRead-only
show_original_customer_invoice_lineboolean or nullOptionalRead-only
show_tax_per_line_itemboolean or nullOptionalRead-only
forwarded_from_customerslist of objects or nullOptionalRead-only
validation_resultlist of objects or nullOptionalRead-only
reprocessobjectOptional
used_tax_registrationobject or nullOptional
The tax registrations that are used to calculate the tax for this invoice. If empty, the billing entity was used
footnotestring or nullOptionalRead-only
Footnote to be shown on the invoice
approval_statusenum or nullOptionalRead-only
Approval status for invoices that are associated with an approval request
Allowed values:
updated_to_final_atstring or nullOptionalRead-only
The invoice finalization date
has_usage_based_pricingboolean or nullOptionalRead-only
couponslist of objects or nullOptionalRead-only
Coupons applied to this invoice
promotion_codeslist of objects or nullOptionalRead-only
Promotion codes applied to this invoice
linked_integrationslist of objects or nullOptional
billing_typeenum or nullOptional
Allowed values:
payment_statusenum or nullOptional
Allowed values:
paidboolean or nullOptionalDeprecated
auto_rescueslist of objects or nullOptionalRead-onlyDeprecated
linked_invoices_idslist of stringsOptionalDeprecated

Can currently only be used for ‘ONE_OFF_CREDIT’ invoices, indicates original invoices that this invoice links to

to_be_reprocessedboolean or nullOptionalRead-onlyDeprecated
to_be_reprocessed_atstring or nullOptionalRead-onlyDeprecated

Errors

400
Bad Request Error
401
Unauthorized Error
403
Forbidden Error
500
Internal Server Error