Documentation Index

Fetch the complete documentation index at: https://www.bloxs.io/llms.txt

Use this file to discover all available pages before exploring further.

Create a sales invoice service

Prev Next
Post
/api/v1/invoices/salesinvoiceservices

Create a new sales invoice service.

Create a Sales Invoice Service

Creates a new sales invoice service in Bloxs.

A developer calls this endpoint to register a service (such as reception, mail handling, or cleaning) delivered to a relation, which results in a sales invoice addressed to that relation once processed.

Each line must reference a service item from the configurable catalog (see Get All Sales Invoice Service Items); the ledger account and VAT rate applied to a line are derived from that service item, not set directly.

Setting automaticApprove to true skips the manual approval workflow and finalizes the sales invoice service immediately, provided the API user has the required permission.


Request Fields

Field

Type

Required

Description

externalIdentifier

string, max 100, nullable

Conditionally required

An external API identifier to associate with this sales invoice service. Required when automaticApprove is set to true.

salesContractReference

string, max 100, nullable

Optional

The internal identifier of the sales contract this service is linked to, if applicable.

ownerReference

string, max 100

Required

The internal identifier (Reference/Code) of the owner whose financial administration this service belongs to.

relationReference

string, max 100

Required

The internal identifier (Reference/Code) of the relation (customer) this service is delivered to and invoiced to.

supplyDate

string (date)

Required

The actual date the service was supplied, formatted as ISO 8601 (YYYY-MM-DD). Can differ from the invoice date.

paymentMethod

integer (enum)

Required

The payment method for the resulting sales invoice. Allowed values: 1 = DirectDebit, 2 = BankTransfer. Only these two methods are supported for sales invoice services.

automaticApprove

boolean

Optional

When true, skips the manual approval workflow and finalizes the sales invoice service immediately (workflowState = 7, Final), rather than leaving it in draft behavior. Requires the API permission InvoicesAPI_AutomaticApproveSalesInvoiceServices. When true, externalIdentifier is required.

lines

array of objects, nullable

Optional

The service's line items. See sub-fields below.

lines.serviceItemName

string, max 256

Required (within each line)

The name of the service item this line is based on, for example "Office space rental 1 hour". Must match an entry from the configurable service items catalog (see Get All Sales Invoice Service Items); each line has exactly one service item, which determines the ledger account and VAT rate applied.

lines.description

string, max 512, nullable

Optional

The default description of the invoice service line, providing extra detail in addition to the service item name.

lines.numberOfItems

integer

Optional

The number of items associated with this line. For example, if the service is "office rental per 1 hour", this value would be 1. Used together with amountExclPerItem to calculate amountExcl, amountVAT, and amountIncl.

lines.realEstateObjectReference

string, max 100, nullable

Optional

The internal identifier of the real estate object this line is allocated to, if applicable.

lines.amountExclPerItem

number (double)

Required (within each line)

The amount excluding VAT per item, in the administration's base currency (major units).


Response Fields

Field

Type

Required

Description

reference

string, max 100

Required

The internal identifier (Reference/Code) generated by Bloxs for the newly created sales invoice service. Unique per client-specific environment across all sales invoice services.

externalIdentifier

string, nullable

Optional

The external API identifier for this sales invoice service, if one was supplied on creation.

salesContractReference

string, max 100, nullable

Optional

The internal identifier of the sales contract this service is linked to, if applicable.

ownerReference

string, max 100

Required

The internal identifier (Reference/Code) of the owner whose financial administration this service belongs to.

relationReference

string, max 100

Required

The internal identifier (Reference/Code) of the relation (customer) this service is delivered to and invoiced to.

supplyDate

string (date)

Optional

The date the service was supplied, formatted as ISO 8601 (YYYY-MM-DD).

paymentMethod

integer (enum)

Required

The payment method for the resulting sales invoice. Allowed values: 1 = DirectDebit, 2 = BankTransfer.

workflowState

integer (enum)

Optional

The approval workflow state of this sales invoice service after creation. Allowed values: 1 = Draft, 2 = OnHold, 3 = Cancelled, 4 = ApprovalWorkflow, 7 = Final, 9 = Disapproved, 10 = OwnerApprovalWorkflow, 11 = DisapprovedByOwner. Returned as 7 (Final) when automaticApprove was true and the API user has the required permission; otherwise reflects draft behavior.

totalAmountExcl

number (double)

Optional

The total service amount excluding VAT, calculated from the submitted lines.

totalAmountVAT

number (double)

Optional

The total VAT amount, calculated from the submitted lines.

totalAmountIncl

number (double)

Optional

The total service amount including VAT, calculated from the submitted lines.

lines

array of objects, nullable

Optional

The service's line items, as stored. See sub-fields below.

lines.lineIndex

integer

Required (within each line)

The order in which the line items are shown.

lines.description

string, nullable

Optional

The description text for this line.

lines.numberOfItems

integer

Optional

The number of items/units for this line.

lines.amountExclPerItem

number (double), nullable

Optional

The amount excluding VAT per item, in the administration's base currency (major units).

lines.amountExcl

number (double), nullable

Optional

The total line amount excluding VAT, calculated from numberOfItems and amountExclPerItem, in the administration's base currency (major units).

lines.amountVAT

number (double), nullable

Optional

The VAT amount for this line, in the administration's base currency (major units).

lines.amountIncl

number (double), nullable

Optional

The total line amount including VAT, in the administration's base currency (major units).

lines.serviceItemName

string, nullable

Optional

The name of the service item this line is based on.

lines.realEstateObjectReference

string, nullable

Optional

The internal identifier of the real estate object this line is allocated to, if applicable.

Security
Body parameters
Expand All
object
externalIdentifier
string | null
Min length0
Max length100
salesContractReference
string | null
Min length0
Max length100
ownerReference
string Required
Min length0
Max length100
relationReference
string Required
Min length0
Max length100
supplyDate
string (date)
paymentMethod
integer (int32) Required

DirectDebit = 1 BankTransfer = 2

automaticApprove
boolean
lines
Array of object (SalesInvoiceServiceLine) | null
object
description
string | null
Min length0
Max length512
numberOfItems
integer (int32)
serviceItemName
string Required
Min length0
Max length256
realEstateObjectReference
string | null
Min length0
Max length100
amountExclPerItem
number (double)
Responses
200

The sales invoice service was created

Expand All
object
reference
string
Min length0
Max length100
externalIdentifier
string | null
salesContractReference
string | null
Min length0
Max length100
ownerReference
string
Min length0
Max length100
relationReference
string
Min length0
Max length100
supplyDate
string (date)
paymentMethod
integer (int32)

DirectDebit = 1 BankTransfer = 2

Min length0
Max length256
workflowState
integer (int32)

Draft = 1 OnHold = 2 Cancelled = 3 ApprovalWorkflow = 4 Final = 7 Disapproved = 9 OwnerApprovalWorkflow = 10 DisapprovedByOwner = 11

totalAmountExcl
number (double)
totalAmountVAT
number (double)
totalAmountIncl
number (double)
lines
Array of object (SalesInvoiceServiceLineAPIDetailModel) | null
object
lineIndex
integer (int32)
description
string | null
numberOfItems
integer (int32)
amountExclPerItem
number (double) | null
amountExcl
number (double) | null
amountVAT
number (double) | null
amountIncl
number (double) | null
serviceItemName
string | null
realEstateObjectReference
string | null
400

The sales invoice service data has validation issues

Expand All
object
type
string | null
title
string | null
traceId
string | null
status
integer (int32)
errors
object | null
property*
Array of string | null additionalProperties
string