Skip to main content

Records

TypeBase PathTrigger Name
REST resource~{realm}/journal/{client-id}/records
RPC resource~{realm}/journal/{client-id}/external-recordN/A.

By far the most complex resource, the electronic journal logs all activities from the trusted clients (that is, the cash registers). In particular, all sales/refund receipts and X/Z-reports/reconciliations are stored here.

Only trusted devices are allowed to write to the journal directly (hence the client-id in the base path). However, some actions from Backoffice—like product and product group modifications—are logged to a special journal with ID #0.

Additionally, there is a special kind of journal called external journal (whose corresponding Till is of type external-journal), that allows external systems to log sales records using the addExternalRecord endpoint. This endpoint is only available to clients using an Access Token that has been explicitly bound to the external journal as part of an OAuth Authorization Code Flow flow. See the documentation of ExternalRecord below for more information about external journals and records.

Endpoints

NameMethodRelative PathPayloadResponseDescription
addRecordPOST~{realm}/journal/{client-id}/RecordStored_RecordAdds a new record to the journal.
listRecordsGET~{realm}/journal/{client-id}/N/AStored_Record[]Retrieves a list of records.
getRecordGET~{realm}/journal/{client-id}/{id}N/AStored_RecordRetrieves a record.
putRecordPUT~{realm}/journal/{client-id}/{id}RecordStored_RecordReplaces a record.
updateRecordPATCH~{realm}/journal/{client-id}/{id}Partial_RecordStored_RecordUpdates specified record fields.
removeRecordDELETE~{realm}/journal/{client-id}/{id}N/AN/ADeletes a record.
addExternalRecordPOST~{realm}/journal/{client-id}/external-recordExternalRecordStored_RecordAdds a new external record to the journal.

Permissions

PermissionDescription
add-recordsClient is allowed to add records to its own journal.
edit-recordsClient is allowed to modify or delete existing records.
show-recordsClient is allowed to query the journal and to fetch individual records.
add-external-recordsClient is allowed to add external records via a special Access Token.

Entities

Entities in this resource are self-contained. That is, while they may refer to entities in other resources, everything required to print a receipt copy (for instance) should be directly available in the record.

Interface Record

namespace Record {
type Type = 'receipt' | 'report' | 'tab' | 'batch' | 'cash-drawer' | 'product-update' | 'usage' |
'invalid-payload' | 'card-transaction' | 'order-ticket' | 'entertainment-bill';
}

interface Record {
'date': DateTime;
'currency'?: string;
'locale'?: string;
'timezone-offset'?: number;
'type': Record.Type;
'batch-id': number;
'copy-from'?: number;
'copy-of'?: number;
'training': boolean;
'copies': number;
'external'?: boolean;
'queued'?: DateTime;
'location'?: number;
'client'?: number;
'client-name'?: string;
'cashier': number;
'cashier-name': string;
'control-code'?: string;
'control-unit-id'?: string;
'description'?: string;
'company-name': string;
'org-number': string;
'address': string;
'phone-number'?: string;
'web-address'?: string;
'email'?: string;
'store-name'?: string;
'store-address'?: string;
'receipt-header'?: string;
'receipt-footer'?: string;
'batch'?: Batch;
'card-transaction'?: CardTransaction;
'cash-drawer'?: CashDrawer;
'entertainment-bill'?: EntertainmentBill;
'invalid-payload'?: InvalidPayload;
'order-ticket'?: OrderTicket;
'product'?: ProductEntry;
'receipt'?: Receipt;
'report'?: Report;
'tab'?: Tab;
'usage'?: UsageEntry;
'accounting'?: AccountingEntry[];
'recipient-uri'?: string;
'id'?: number;
'created'?: DateTime;
'updated'?: DateTime;
'deleted'?: DateTime;
'updated-by'?: number;
'updated-from'?: number;
'tags'?: string[];
'labels'?: number[];
}
PropertyData TypeDescription
dateDateTimeThe date when this record was created (set by the client).
currencyString?The currency code (ISO 4217) used by the trusted device that created this record. If not present, the default currency is assumed.
localeString?The locale used by the trusted device that created this record. If not present, the default locale is assumed.
timezone-offsetInt32?The client's timezone offset (in minutes from UTC) when this record was created.
typeTypeThe record type.
batch-idInt64The batch ID; a counter that increments by one for each Z-report/reconciliation.
copy-fromInt64?In case this is a receipt or report copy, the original record's client ID.
copy-ofInt64?In case this is a receipt or report copy, the original record's ID.
trainingBooleantrue if the cash register was in training mode when this record was created.
copiesInt32The number of copies that have been made of this record.
externalBoolean?true if the record was created by an external system. Defaults to false.
queuedDateTime?If the record was stored in the clients Store and Forward queue, this is the timestamp when it was added to the queue.
locationInt64?The ID of the Location the trusted device where part of when this record was created.
clientInt64?The ID of the Till (trusted device) that created this record.
client-nameString?The name of the device that created this record.
cashierInt64The Id of the User that created this record.
cashier-nameStringThe name of the user that created this record.
control-codeString?If the record was signed by a fiscal control unit, this property holds the signature/code.
control-unit-idString?The ID of the fiscal control unit, if applicable.
descriptionString?A cashier-entered description of this record.
company-nameStringThe legal name of the company this record belongs to.
org-numberStringThe legal organization number/ID of the company this record belongs to.
addressStringThe legal address of the company this record belongs to.
phone-numberString?The company's phone number.
web-addressString?The company's web address.
emailString?The company's email address.
store-nameString?The store name, i.e., the company name that's printed on the receipt header. If empty, no name will be printed, while if not present, company-name will be used instead.
store-addressString?The store address, i.e., the company address that's printed on the receipt header. If empty, no address will be printed, while if not present, address will be used instead.
receipt-headerString?The custom receipt header text.
receipt-footerString?The custom receipt footer text.
batchBatch?Additional record data if type is batch.
card-transactionCardTransaction?Additional record data if type is card-transaction.
cash-drawerCashDrawer?Additional record data if type is cash-drawer.
entertainment-billEntertainmentBill?Additional record data if type is entertainment-bill.
invalid-payloadInvalidPayload?Additional record data if type is invalid-payload.
order-ticketOrderTicket?Additional record data if type is order-ticket.
productProductEntry?Additional record data if type is product-update (deprecated).
receiptReceipt?Additional record data if type is receipt.
reportReport?Additional record data if type is report.
tabTab?Additional record data if type is tab.
usageUsageEntry?Additional record data if type is usage.
accountingAccountingEntry[]?Accounting records for this receipt, or a summary of all receipts in a given batch for X/Z-reports/reconciliations.
recipient-uriURI?If a receipt was sent digitally as E-mail or SMS, this is the recipient URI (using the mailto: or sms: scheme).
idInt64?The resource ID of this entity.
createdDateTime?Date and time when this entity was first created.
updatedDateTime?Date and time when this entity was last modified.
deletedDateTime?Date and time when this entity was deleted.
updated-byInt64?ID of User who last modified this entity.
updated-fromInt64?ID of Till (trusted device) which last modified this entity.
labelsInt64[]?A list of Label IDs associated with this entity.

Interface AccountingEntry

interface AccountingEntry {
'account': number;
'amount': number;
}
PropertyData TypeDescription
accountInt32The account number. Note that this refers to the account property of the Account entity, not its id.
amountMoneyThe amount, in default currency, that should be registered for this account.

Interface Batch

The Batch record is used to open and close a daily transaction period, but also to register changes in cash float during the day.

namespace Batch {
type Type = 'open' | 'close' | 'change';
}

interface Batch {
'type': Batch.Type;
'cash-amount'?: number;
'amounts'?: Payment[];
'mismatches'?: Payment[];
'vat-summaries'?: VATSummary[];
}
PropertyData TypeDescription
typeBatch.TypeThe batch record type. open registers the cash float at the start of the day, change is for deposits/withdrawals and close is used to record the state of the cash float at the end of the day.
cash-amountMoney?This property is deprecated.
amountsPayment[]?A list of amounts that have been added/removed from the cash drawer.
mismatchesPayment[]?A list of amounts that have been lost or stolen from the cash drawer.
vat-summariesVATSummary[]?The VAT amounts grouped by the VAT rate (for VAT-enabled payment methods).

Interface CardTransaction

namespace CardTransaction {
type Type = 'card-receipt' | 'card-batch-summary';
}

interface CardTransaction {
'id': string;
'type': CardTransaction.Type;
'card-receipt'?: CardReceiptMetadata;
'card-batch-summary'?: CardBatchSummaryMetadata;
}

Interface CashDrawer

namespace CashDrawer {
type Type = 'open' | 'close';
}

interface CashDrawer {
'type': CashDrawer.Type;
}
PropertyData TypeDescription
typeCashDrawer.TypeWhether the cash drawer was opened or closed.

Interface EntertainmentBill

interface EntertainmentBill {
'original-receipt-id': string;
'id': string;
'type': Receipt.Type;
'tab'?: number;
'order'?: number;
'items': Item[];
'rounding': number;
'payments': Payment[];
'change': number;
'total-amount': number;
'total-sales-amount'?: number;
'total-vat-amount': number;
'total-sales-vat-amount'?: number;
'vat-summaries': VATSummary[];
'customer'?: Customer;
'reference'?: string;
'our-reference'?: string;
}

The EntertainmentBill is a trivial extension of Receipt. It contains the following extra properties:

PropertyData TypeDescription
original-receipt-idStringThe original receipt's ID.

Interface InvalidPayload

interface InvalidPayload {
'content-type': string;
'data': string;
'key-id': string;
'hmac': Base64String;
}

Interface OrderTicket

namespace OrderTicket {
type Type = 'kitchen';
}

interface OrderTicket {
'id': string;
'type': OrderTicket.Type;
'name': string;
'delivery-date'?: DateTime;
'items': Item[];
}

Interface Payment

interface Payment {
'payment-method'?: number;
'method': PaymentMethod.Type;
'amount': number;
'vat-rate'?: number;
'vat-amount'?: number;
'foreign-amount'?: number;
'metadata'?: Metadata;
'name'?: string;
'gratuity'?: number;
}
PropertyData TypeDescription
payment-methodInt64?ID of custom PaymentMethod, if any. Required if type is anything except cash, card or credit.
methodPaymentMethod.TypeType of payment method.
amountMoneyThe amount in the default currency.
vat-rateInt32?The VAT rate (in percent; if applicable).
vat-amountMoney?How much of amount that is VAT (if applicable).
foreign-amountMoney?If the payment method is a foreign currency, the amount in that currency. Exchange rate is thus foreign-amount divided by amount.
metadataMetadata?Extra metadata about the payment.
nameString?The name of the payment method.
gratuityMoney?How much of amount that is gratuity, using opposite sign to amount.

Interface ProductEntry

This record entry is deprecated and is no longer produced. See UsageEntry below instead.

namespace ProductEntry {
type Type = 'product-created' | 'product-updated' | 'product-deleted' | 'product-group-created' |
'product-group-updated' | 'product-group-deleted';
}

interface ProductEntry {
'type': ProductEntry.Type;
'product'?: Product;
'product-group'?: ProductGroup;
}

Interface Receipt

This record represents a sales, refund or credit receipt. Note that credit receipts are not really receipts and are not included in the sales summaries etc.

namespace Receipt {
type Type = 'sale' | 'return' | 'credit';
}

interface Receipt {
'id': string;
'type': Receipt.Type;
'tab'?: number;
'order'?: number;
'items': Item[];
'rounding': number;
'payments': Payment[];
'change': number;
'total-amount': number;
'total-sales-amount'?: number;
'total-vat-amount': number;
'total-sales-vat-amount'?: number;
'vat-summaries': VATSummary[];
'customer'?: Customer;
'reference'?: string;
'our-reference'?: string;
}
PropertyData TypeDescription
idStringThe receipt ID. Note that this is not the record entity ID but a separate identifier, which is also printed on the customer's receipt copy.
typeReceipt.TypeReceipt type.
tabInt64?If this receipt was previously a tab, the tab's ID.
orderInt64?If this receipt was previously part of an order, the order's ID.
itemsItem[]The line items.
roundingMoneyRounding.
paymentsPayment[]A list of payments used to fulfill the purchase/refund.
changeMoneyChange given back to the customer, in the default currency.
total-amountMoneyThe total amount to be paid/refunded, in default currency and including VAT.
total-sales-amountMoney?Like total-amount, but does not include liability products (gift cards, vouchers etc) and rounding.
total-vat-amountMoneyThe total VAT amount, in the default currency.
total-sales-vat-amountMoneyLike total-vat-amount, but does not include VAT on liability products (gift cards, vouchers etc).
vat-summariesVATSummary[]The VAT amounts grouped by the VAT rate.
customerCustomer?If a customer was linked to the sale, a copy of the Customer object, as it was when the record was created.
referenceString?A general external reference property. Can be the name of a contact person, an external order number etc.
our-referenceString?A general internal reference property. Can be the name of a contact person, an internal order number etc.

Interface Report

namespace Report {
type Type = 'x-report' | 'z-report';
}

interface Report {
'id': string;
'type': Report.Type;
'start-date'?: DateTime;
'end-date'?: DateTime;
'total-amount'?: number;
'total-sales-amount': number;
'total-vat-amount'?: number;
'total-sales-vat-amount'?: number;
'total-change-amount'?: number;
'gratuity-summaries'?: GratuitySummary[];
'incoming-cash-amount'?: number;
'cash-deposits'?: Summary;
'cash-withdrawals'?: Summary;
'outgoing-cash-amount'?: number;
'cash-drawer-openings': number;
'incoming-petty-cash'?: Payment[];
'petty-cash-deposits'?: PaymentSummary[];
'petty-cash-withdrawals'?: PaymentSummary[];
'petty-cash-mismatch'?: Payment[];
'outgoing-petty-cash'?: Payment[];
'product-group-summaries'?: ProductGroupSummary[];
'vat-summaries'?: VATSummary[];
'payments'?: Payment[];
'payment-sale-summaries'?: PaymentSaleSummary[];
'payment-batch-summaries'?: PaymentBatchSummary[];
'goods': Summary;
'services': Summary;
'discounts': Summary;
'liabilities'?: Summary;
'losses': Summary;
'sales-receipts': Summary;
'return-receipts': Summary;
'training-receipts': Summary;
'receipt-copies': Summary;
'credit-sales'?: Summary;
'credit-returns'?: Summary;
'open-tabs'?: Summary;
'grand-total-sales': Summary;
'grand-total-returns': Summary;
'grand-total-amount': Summary;
}
PropertyData TypeDescription
idStringThe report ID. Note that this is not the record entity ID but a separate report identifier.
typeReport.TypeThe report type. X-reports can be created by the cashier any number of times during a sales period, but Z-reports are only created by the cash register as part of the end-of-day/reconciliation process.
start-dateDateTime?When the report period started.
end-dateDateTime?When the report period ended.
total-amountMoney?Sum of all receipt's total amounts, in default currency, including VAT and liability products.
total-sales-amountMoneyThe total sales amount, in default currency and including VAT. Like total-amount, but does not include liability products (gift cards, vouchers etc.) and rounding.
total-vat-amountMoney?The sum of all VAT amounts, in default currency.
total-sales-vat-amountMoney?The total sales VAT amounts, in default currency. Like total-vat-amount, but does not include VAT for liability products.
total-change-amountMoney?The sum of all change amounts given, in default currency.
gratuity-summariesGratuitySummary[]?A summary of all gratuities, summed per cashier.
incoming-cash-amountMoney?Deprecated and no longer used.
cash-depositsSummary?Deprecated and no longer used.
cash-withdrawalsSummary?Deprecated and no longer used.
outgoing-cash-amountMoney?Deprecated and no longer used.
incoming-petty-cashPayment?Initial cash float or petty cash amounts when sales period is opened.
petty-cash-depositsPaymentSummary?A summary of all cash float/petty cash deposits during the period.
petty-cash-withdrawalsPaymentSummary?A summary of all cash float/petty cash withdrawals during the period.
petty-cash-mismatchPayment?Cash float/petty cash mismatches found during reconciliation. Not currently used.
outgoing-petty-cashPayment?The final cash float or petty cash when sales period is closed.
product-group-summariesProductGroupSummary?The sales amounts per product group (default currency, including VAT) .
vat-summariesVATSummary?The sales and VAT amounts (default currency) per VAT rate.
paymentsPayment?A summary of all payments received.
payment-sale-summariesPaymentSaleSummary?The sales amounts per payment method (default currency, including VAT).
payment-batch-summariesPaymentBatchSummary[]?A summary of reconciliations from all directly attached card terminals.
goodsSummaryA summary of all products of type goods, in default currency.
servicesSummaryA summary of all products of type services, in default currency.
discountsSummaryA summary of all discounts, in default currency.
liabilitiesSummary?A summary of all products of type liabilities, in default currency.
lossesSummaryA summary of all other amounts, including rounding, in default currency.
sales-receiptsSummaryA summary of all sales receipts (liability products are not included in the amount, which is in the default currency).
return-receiptsSummaryA summary of all return receipts (liability products are not included in the amount, which is in the default currency).
training-receiptsSummaryA summary of all training receipts (liability products are not included in the amount, which is in the default currency).
receipt-copiesSummaryA summary of all receipt copies (liability products are not included in the amount, which is in the default currency).
credit-salesSummary?A summary of all credit sales receipts (liability products are included in the amount, which is in the default currency).
credit-returnsSummary?A summary of all credit return receipts (liability products are included in the amount, which is in the default currency).
open-tabsSummary?A summary of all open tabs (amounts are in default currency).
grand-total-salesSummaryA summary of all sales since the cash register was first activated (liability products are not included in the amount, which is in the default currency).
grand-total-returnsSummaryA summary of all returns since the cash register was first activated (liability products are not included in the amount, which is in the default currency).
grand-total-amountSummaryA summary of all sales or returns since the cash register was first activated (liability products are not included in the amount, which is in the default currency).
Interface GratuitySummary

An object used to sum all gratuities a cashier has received during the X/Z-report period.

export interface GratuitySummary {
'user': number;
'user-name': string;
'count': number;
'amount': number;
}
PropertyData TypeDescription
userInt64A reference to the User (cashier).
user-nameStringThe name of the user/cashier.
countInt32The number of gratuities received.
amountMoneyThe sum of all gratuities received (always in the default currency).
Interface Summary

An object used to sum operations in the X/Z-report record.

interface Summary {
'count': number;
'amount': number;
}
PropertyData TypeDescription
countInt32The number of times the event happened.
amountMoneyThe sum of all amounts (always in the default currency).
Interface PaymentBatchSummary

A summary of the data in a card terminal reconciliation report.

interface PaymentBatchSummary {
'name': string;
'transaction-summary': TransactionSummary;
'acquirers-transaction-summary'?: TransactionSummary;
'status'?: CardMetadata.Status;
}
PropertyData TypeDescription
nameStringThe summary name. Usually a card issuer code or card name.
transaction-summaryTransactionSummaryA summary of all transactions in the batch, as recorded by the terminal.
acquirers-transaction-summaryTransactionSummaryA summary of all transactions in the batch, as recorded by the acquirer/bank.
statusCardMetadata.Status?The reconciliation status.
Interface PaymentSaleSummary

An object used to sum sales per payment method in the X/Z-report record. Note that while this object looks exactly like PaymentSummary, the amounts are negated.

interface PaymentSaleSummary {
'payment-method'?: number;
'method': PaymentMethod.Type;
'vat-rate'?: number;
'vat-amount'?: number;
'foreign-amount'?: number;
'name'?: string;
'gratuity'?: number;
'count': number;
'amount': number;
}
PropertyData TypeDescription
payment-methodInt64?A reference to the payment method, if a user-defined payment method.
methodPaymentMethod.TypeThe type of payment method.
vat-rateInt32?The VAT rate (in percent; if applicable).
vat-amountMoney?The sum of all VAT amounts (if applicable).
foreign-amountMoney?If the payment method is a foreign currency, the amount in that currency. Mean exchange rate is thus foreign-amount divided by amount.
nameString?The name of the payment method.
gratuityMoney?The sum of all gratuities (if applicable).
countInt32The number of times the event happened.
amountMoneyThe sum of all amounts (always in the default currency)
Interface PaymentSummary

An object used to sum all payment methods used in the X/Z-report record. Note that while this object looks exactly like PaymentSaleSummary, the amounts are negated.

interface PaymentSummary {
'payment-method'?: number;
'method': PaymentMethod.Type;
'vat-rate'?: number;
'vat-amount'?: number;
'foreign-amount'?: number;
'name'?: string;
'gratuity'?: number;
'count': number;
'amount': number;
}
PropertyData TypeDescription
payment-methodInt64?A reference to the payment method, if a user-defined payment method.
methodPaymentMethod.TypeThe type of payment method.
vat-rateInt32?The VAT rate (in percent; if applicable).
vat-amountMoney?The sum of all VAT amounts (if applicable).
foreign-amountMoney?If the payment method is a foreign currency, the amount in that currency. Mean exchange rate is thus foreign-amount divided by amount.
nameString?The name of the payment method.
gratuityMoney?The sum of all gratuities (if applicable).
countInt32The number of times the event happened.
amountMoneyThe sum of all amounts (always in the default currency)
Interface ProductGroupSummary

An object used to sum sales per product group in the X/Z-report record.

interface ProductGroupSummary {
'product-group': number;
'product-group-name': string;
'amount': number;
}
PropertyData TypeDescription
product-groupInt64The ID of the product group.
product-group-nameStringThe name of the product group.
amountMoneyThe sum of the total sales amount, in default currency and including VAT.
Interface TransactionSummary
interface TransactionSummary {
'purchase-count': number;
'purchase-amount': number;
'cb-amount': number;
'vat-amount': number;
'extra-amount': number;
'refund-count': number;
'refund-amount': number;
}

Interface UsageEntry

namespace UsageEntry {
type Type =
| 'cashier-login-online'
| 'cashier-login-offline'
| 'cashier-logout'
| 'cashier-lock'
| 'cashier-unlock'
| 'tab-suspend'
| 'tab-resume'
| 'tab-close'
| 'tab-merge'
| 'voucher-create'
| 'voucher-update'
| 'voucher-transaction'
| 'voucher-delete'
| 'product-create'
| 'product-update'
| 'product-delete'
| 'product-group-create'
| 'product-group-update'
| 'product-group-delete'
| 'inventory-adjustment-create'
| 'inventory-adjustment-update'
| 'inventory-adjustment-delete'
| 'stock-balance-transaction'
| 'password-reset-challenge'
| 'password-reset'
| 'shift-history'
;
}

interface UsageEntry {
'type': UsageEntry.Type;
'inventory-adjustment'?: number;
'location'?: number;
'product'?: number;
'product-group'?: number;
'tab'?: number;
'user'?: number;
'voucher'?: number;
'voucher-transaction'?: VoucherTransaction;
'stock-balance-transaction'?: StockBalanceTransaction;
'password-reset-challenge'?: PasswordResetChallenge;
'password-reset'?: PasswordReset;
'shift-history'?: ShiftHistoryExport;
}

Interface VATSummary

A sum of all sales and VAT amounts for a specific VAT rate.

interface VATSummary {
'vat-rate': number;
'vat-amount': number;
'net-amount': number;
'gross-amount': number;
}
PropertyData TypeDescription
vat-rateInt32The VAT rate (in percent).
vat-amountMoneyThe summed VAT amounts.
net-amountMoneyThe summed sales amounts, excluding VAT.
gross-amountMoneyThe summed sales amounts, including VAT.

Interface ExternalRecord

A definition of an external record that is to be added to an external journal. This is a simplified version of the Record entity that only allows for records of type batch, receipt or report to be added. Normally, batch and report records are generated automatically by the system, and only external receipt records are actually added by clients.

External journals can be used to merge sales data from external sources, such as a web shop, into Onslip 360. This way, sales data from multiple sources can be consolidated into the same sales reports that are generated from Onslip POS devices. Accounting data is automatically calculated according to the same rules and definitions as used by the rest of the system. Additionally, Z-reports for external journals may be generated by the system daily; these will also be automatically exported to connected ERP systems, just like "normal" Z-reports.

interface ExternalRecord {
'date': DateTime;
'type': Record.Type;
'timezone-offset'?: number;
'client-name'?: string;
'cashier'?: number;
'cashier-name'?: string;
'description'?: string;
'labels'?: number[];
'recipient-uri'?: string;
'control-code'?: string;
'control-unit-id'?: string;
'batch'?: ExternalBatch;
'receipt'?: ExternalReceipt;
'report'?: ExternalReport;
}
PropertyData TypeDescription
dateDateTimeThe date when this record was created (set by the client).
typeTypeThe record type (must be batch, receipt or report).
timezone-offsetInt32?The client's timezone offset (in minutes from UTC) when this record was created. Default is the server's timezone offset.
client-nameString?May be specified in order to override the name of the device that created this record.
cashierInt64?May be specified in order to override the ID of the user that created this record.
cashier-nameString?May be specified in order to override the name of the user that created this record.
descriptionString?A custom description of this record.
labelsInt64[]?A list of Label IDs associated with this entity.
recipient-uriURI?If a receipt is to be sent digitally as E-mail or SMS, this is the recipient URI (using the mailto: or sms: scheme).
control-codeString?If the record was signed by a fiscal control unit, this property holds the signature/code.
control-unit-idString?The ID of the fiscal control unit, if applicable.
batchExternalBatch?Additional record data if type is batch.
receiptExternalReceipt?Additional record data if type is receipt.
reportExternalReport?Additional record data if type is report.

Interface ExternalBatch

Used to instruct the system to open a new batch (a daily sales period), close an existing batch and register changes in cash float.

Batches are normally opened and closed automatically by the system daily, but this record type allows for manual control.

interface ExternalBatch {
'type': Batch.Type;
'amounts'?: Payment[];
}
PropertyData TypeDescription
typeBatch.TypeThe batch record type (open, close or change).
amountsPayment[]?An optional list of amounts that have been added/retrieved from the cash drawer.

When a batch is opened, amounts specifies the initial cash float, i.e. how much was initially added to the cash drawer.

When a batch is closed, the amounts specifies exactly how much was retrieved from the cash drawer at the time of closing. Any discrepancies between the expected and actual closing cash float amounts will be recorded as mismatches. Leave amounts unset to let the system calculate the expected closing cash float. Closing a batch will trigger the generation of a Z-report automatically.

Manual cash float changes are registered as change batch records, where amounts specifies the change in cash float (negative amounts for deposits and positive amounts for withdrawals).

Interface ExternalReceipt

This record type is used to register an external sale or refund event. These records will be including in sales reports and accounting data will be automatically calculated.

interface ExternalReceipt {
'type': Receipt.Type;
'tab'?: number;
'order'?: number;
'items': Item[];
'rounding'?: number;
'payments': Payment[];
'change': number;
'customer'?: Customer;
'reference'?: string;
'our-reference'?: string;
}
PropertyData TypeDescription
typeReceipt.TypeThe receipt type.
tabInt64?If this receipt was previously a tab, the tab's ID.
orderInt64?If this receipt was previously part of an order, the order's ID.
itemsItem[]The line items.
roundingMoney?Rounding. Calculated automatically based on items, payments and change if omitted.
paymentsPayment[]A list of payments used to fulfill the purchase/refund.
changeMoneyChange given back to the customer, in the default currency.
customerCustomer?If a customer was linked to the sale, a copy of the Customer object, as it was when the record was created.
referenceString?A general external reference property. Can be the name of a contact person, an external order number etc.
our-referenceString?A general internal reference property. Can be the name of a contact person, an internal order number etc.

As usual, item prices are normally positive (refunds have negative quantities, not negative prices; see the documentation of Item for more information about how to construct the line item list). Payments, on the other hand, are always negative for sales/deposits and positive for refunds/withdrawals.

Interface ExternalReport

interface ExternalReport {
'type': Report.Type;
}

Use this record type to trigger generation of an X-report (type must be x-report). z-report is currently not supported; instead, Z-reports will be generated automatically by the system when a batch is closed.

PropertyData TypeDescription
typeReport.TypeThe report type (must be x-report for now).