API / Reference / Invoice Receivables
Open invoice
POST
https://api.light.inc/v1/invoice-receivables/{invoiceReceivableId}/open
Initiates the process of opening an invoice receivable. This assigns an invoice number, locks the invoice for editing, and optionally sends it via email or submits it to e-invoicing systems. The request body is optional - if not provided, the invoice will be opened with default settings (no email sent, no e-invoice submission).
Authorization
Send one of these on every request. See Authentication for how to get credentials.
- API key
Basic authentication header of the form Basic <api_key>, where <api_key> is your api key.
- Bearer token
Path parameters
-
invoiceReceivableIdstring · uuidrequired
Request body
application/json;charset=UTF-8
-
emailInfoobject-
subjectstringEmail subject line
-
replyTostringReply-to email address
-
recipientsarray of stringList of email addresses to send the invoice to
-
ccarray of stringList of email addresses to CC on the invoice email
-
customMessagestringOptional custom message added to the invoice email body
-
-
shouldSendEmailbooleanWhether to send the invoice via email when opening. Defaults to false
-
shouldSubmitEInvoicebooleanWhether to submit the invoice to the e-invoicing system (if configured). Defaults to false
Response
Invoice open process initiated successfully. The invoice status will change to `OPEN_IN_PROGRESS`. You must poll the invoice to check when it changes to `OPEN`. If the invoice fails to open, the status will change back to `DRAFT` and the `failureContext` field will be populated with the error details.
-
idstring · uuidUnique identifier for the object
-
companyIdstring · uuidID of the company
-
contractIdstring · uuidID of the contract, if this is invoice is linked to a contract
-
companyEntityIdstring · uuidID of the entity
-
amountinteger · int64Total invoice amount in smallest denomination, with discounts and tax applied
-
paymentTypestringPayment type for the invoice
AIRWALLEX- Payment via Airwallex. A payment link will be displayed on the invoiceBANK_TRANSFER- Payment via bank transfer. Bank information will be displayed on the invoiceDIRECT_DEBIT- Payment via direct debit. A notice that the amount will be collected automatically will be displayed on the invoiceSTRIPE- Payment via Stripe. A payment link will be sent to the customer
⚠️ This enum is not exhaustive; new values may be added in the future.
One of
AIRWALLEXBANK_TRANSFERDIRECT_DEBITSTRIPE -
payeeBankAccountIdstring · uuidID of the bank account where money should be sent to
-
invoiceDatestring · dateDate the invoice was issued
-
effectiveInvoiceDatestring · dateThe invoice date shown to customers; falls back to the posting date when the invoice date is not set
-
postingDatestring · dateDate the invoice is posted to the ledger (drives GL, VAT and revenue recognition)
-
dueDatestring · dateDate the invoice payment is due
-
netTermsinteger · int32Number of days from the invoice date to when the invoice is due. Updating this field will automatically set the invoice due date
-
customerIdstring · uuidID of the customer
-
invoiceTemplateIdstring · uuidID of the invoice template
-
invoiceTemplateAdditionalTextstringText that will added to the additional text section of the invoice template
-
invoiceNumberstringInvoice number. This number is guaranteed to be unique and sequential per entity. By default Light will generate this number when the invoice is opened, but you can provide your own custom number when creating or updating a draft invoice
-
typestringWho raised the invoice
STANDARD- The company raised the invoiceSELF_BILLED- The customer issued the invoice on the company's behalf and sent it in
⚠️ This enum is not exhaustive; new values may be added in the future.
One of
STANDARDSELF_BILLED -
statestringThe invoice state
CREATED- The invoice document was received and is waiting to be parsed. Next valid state is DRAFTDRAFT- The invoice is in draft and can be modified. Next valid states are OPEN_IN_PROGRESS or ARCHIVEDOPEN_IN_PROGRESS- The invoice is being opened. Next valid state is OPEN or DRAFTOPEN- The invoice is open. Next valid states are PAYMENT_PENDING, PARTIALLY_PAID, PAID or ARCHIVEDPAYMENT_PENDING- The payment was initiated by Light and is waiting to be collected. Next valid state is PAIDPARTIALLY_PAID- The invoice is partially paid. Next valid state is PAIDPAID- The invoice is fully paidREVERSED- The invoice was reversed by a credit note and reissued as a new invoice; it is locked and cannot be modifiedARCHIVED- The invoice is archived and cannot be modified
⚠️ This enum is not exhaustive; new values may be added in the future.
One of
CREATEDDRAFTOPEN_IN_PROGRESSOPENPAYMENT_PENDINGPARTIALLY_PAIDPAIDREVERSEDARCHIVED -
openedAtstring · date-timeTimestamp when the invoice was opened
-
poNumberstringPurchase order number
-
referencestringReference number for cross-referencing with procurement and invoicing workflows
-
descriptionstringDescription of the invoice
-
currencystring -
taxEngineNamestringName of the tax engine to be used
AVATAX- Avalara AvaTax will be used for tax calculationsLIGHT- Light built-in tax engine will be used for tax calculationsSPHERE- Sphere tax engine will be used for tax calculations
⚠️ This enum is not exhaustive; new values may be added in the future.
One of
AVATAXLIGHTSPHERE -
areLinesWithTaxbooleanWhether the invoice line amount is inclusive of tax or not. True means tax is already included in the line amount and will not be added on top, false means tax will be added on top of the line amount
-
localCurrencyFxRatenumberCustom foreign exchange rate for the ledger's local currency. If not provided Light uses official ECB rates
-
groupCurrencyFxRatenumberCustom foreign exchange rate for the ledger's group currency. If not provided Light uses official ECB rates
-
linesarray of objectList of invoice line items. This is only returned when fetching a single invoice by id
-
idstring · uuidUnique identifier for the object
-
companyIdstring · uuidID of the company
-
invoiceReceivableIdstring · uuidID of the invoice receivable this line belongs to
-
productIdstring · uuidID of the product
-
quantitynumberQuantity of the product
-
taxCodeIdstring · uuidID of the tax code
-
accountIdstring · uuidID of the ledger account
-
discountobjectDiscount to apply to this line (can be percentage or amount-based)
-
typestring⚠️ This enum is not exhaustive; new values may be added in the future.
One of
PERCENTAGEAMOUNT
-
-
discountAmountinteger · int64Discount amount in smallest denomination
-
netAmountinteger · int64Net amount in smallest denomination after discount but before tax
-
taxAmountinteger · int64Tax amount in smallest denomination
-
avataxCodestringAvalara tax code. Used when the invoice tax engine is
AVATAX -
billingStartstring · dateStart of the billing period
-
billingEndstring · dateEnd of the billing period
-
priceOverwriteinteger · int64Custom product price in smallest denomination. This overrides the default product's price
-
productNameOverwritestringCustom product name. This overrides the default product's name
-
createdAtstring · date-timeTimestamp when the line was created
-
updatedAtstring · date-timeTimestamp when the line was last updated
-
accrualTemplateIdstring · uuidID of the accrual template
-
accrualStartDatestring · dateStart date for accrual
-
accrualEndDatestring · dateEnd date for accrual
-
customPropertiesarray of objectList of custom properties associated with the line
-
groupIdstring · uuidID of the custom property group
-
groupInternalNamestringInternal name of the custom property group
-
valuesarray of objectList of values. Note that this will be a single value unless the group input type supports multiple values
-
idstring · uuidUnique identifier for the object
-
groupIdstring · uuidID of the custom property group
-
groupInternalNamestringInternal name of the custom property group
-
companyIdstring · uuidID of the company
-
internalNamestringInternal name of the custom property value
-
labelstringLabel of the custom property value
-
contextstringContext/description of the custom property value
-
createdAtstring · date-timeTimestamp when the custom property value was created
-
updatedAtstring · date-timeTimestamp when the custom property value was last updated
-
-
-
-
customPropertiesarray of objectList of custom properties associated with the invoice
-
groupIdstring · uuidID of the custom property group
-
groupInternalNamestringInternal name of the custom property group
-
valuesarray of objectList of values. Note that this will be a single value unless the group input type supports multiple values
-
idstring · uuidUnique identifier for the object
-
groupIdstring · uuidID of the custom property group
-
groupInternalNamestringInternal name of the custom property group
-
companyIdstring · uuidID of the company
-
internalNamestringInternal name of the custom property value
-
labelstringLabel of the custom property value
-
contextstringContext/description of the custom property value
-
createdAtstring · date-timeTimestamp when the custom property value was created
-
updatedAtstring · date-timeTimestamp when the custom property value was last updated
-
-
-
externalSourceobjectThe external system where this product was synced from
-
namestringThe name of the external source
CHARGEBEE- Data synced from ChargebeeHUBSPOT- Data synced from HubSpotSALESFORCE- Data synced from SalesforceSTRIPE- Data synced from Stripe
⚠️ This enum is not exhaustive; new values may be added in the future.
One of
CHARGEBEEHUBSPOTSALESFORCESTRIPE -
externalIdstringThe ID of the object in the external source system
-
-
createdAtstring · date-timeTimestamp when the invoice was created
-
updatedAtstring · date-timeTimestamp when the invoice was last updated
-
updatedBystring · uuidID of the user who last updated the invoice
-
failureContextobjectFailure context when vendor onboarding fails.
-
namestringThe error name
-
typestringThe error type
⚠️ This enum is not exhaustive; new values may be added in the future.
One of
BAD_REQUESTUNAUTHORIZEDFORBIDDENNOT_FOUNDCONFLICTUNPROCESSABLE_CONTENT -
errorsarray of objectList of errors providing details about what went wrong
-
typestringA string code identifying the error type
-
messagestringA human-readable message providing more details about the error
-
patharray of stringOptional path of the error when the error is for a specific field. Used mostly on BAD_REQUEST errors, that path will match the field name on the request object
-
contextobjectOptional context providing additional information about the error. This can include any relevant data that might help in understanding or resolving the error
-
-