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. |
DirectDebit = 1 BankTransfer = 2
The sales invoice service was created
DirectDebit = 1 BankTransfer = 2
Draft = 1 OnHold = 2 Cancelled = 3 ApprovalWorkflow = 4 Final = 7 Disapproved = 9 OwnerApprovalWorkflow = 10 DisapprovedByOwner = 11
The sales invoice service data has validation issues