Client Info
Type | Base Path | Trigger Name |
---|---|---|
Single entity resource | ~{realm}/ | N/A |
Normally, the client issues a GET
request to this endpoint at start-up in
order to fetch information about the account (and to verify the credentials).
The server also returns a set of direct API endpoints that can be used for failover handling and redundancy, if the client supports that.
Endpoints
Name | Method | Relative Path | Payload | Response | Description |
---|---|---|---|---|---|
getClientInfo | GET | ~{realm}/ | N/A | ClientInfo | Returns information about the current client. |
Permissions
No special permissions are required to access this resource.
Entities
Interface ClientInfo
interface ClientInfo {
'company': Company;
'access-token'?: Stored_AccessToken;
'till'?: Stored_Till;
'user'?: Stored_User;
'location'?: Stored_Location;
'service-endpoints': ServiceEndpoint[];
'system-params': SystemParams;
'merchant-params': MerchantParams;
'company-config': Stored_CompanyConfig;
'till-state'?: Stored_TillState;
'permissions': Permission[];
'p2p-realm'?: string;
'p2p-key'?: Base64String;
}
Property | Data Type | Description |
---|---|---|
company | Company | Information about the current realm or company. |
access-token | Stored_AccessToken? | Information about the current access token, if any. |
till | Stored_Till? | Information about the current trusted device, if any. |
user | Stored_User? | Information about the current user, if any. |
location | Stored_Location? | Information about the current trusted device's location, if any. |
service-endpoints | ServiceEndpoint[] | A list of server endpoints that are available (for failover handling/redundancy). |
system-params | SystemParams | System parameters for clients. |
merchant-params | MerchantParams | Information about support, sales and available features. |
company-config | Stored_CompanyConfig | The current company configuration object. |
till-state | Stored_TillState? | The current state of the current trusted device, if any. |
permissions | Permission[] | A list of all current permissions. |
p2p-realm | String? | A unique identifier for the current trusted device's P2P realm. |
p2p-key | Base64String? | A unique key for the current trusted device's P2P realm. |
Interface Company
namespace Company {
type Category = 'active-life' | 'arts-and-entertainment' | 'automotive' | 'beauty-and-spas' |
'education' | 'event-services' | 'food' | 'health-and-medical' | 'home-services' |
'hotels-and-travel' | 'local-services' | 'nightlife' | 'other' | 'pets' |
'professional-services' | 'public-services' | 'religious-organizations' |
'restaurants' | 'shopping';
type RegistrationType = 'backoffice' | 'developer' | 'android-tablet' | 'android-phone' | 'ios-tablet' | 'ios-phone';
type Type = 'merchant' | 'reseller';
}
interface Company {
'terminated'?: DateTime;
'name': string;
'alias': string;
'org-number': string;
'address': string;
'phone-number': string;
'web-address'?: string;
'email'?: string;
'registration-type'?: Company.RegistrationType;
'business-category'?: Company.Category;
'type'?: Company.Type;
'feature'?: CompanyFeature;
'reseller-params'?: ResellerParams;
'reseller'?: number;
'locale'?: string;
'secondary-locale'?: string;
'currency'?: string;
'time-zone'?: string;
'derivation-base-key'?: Base64String;
'id'?: number;
'created'?: DateTime;
'updated'?: DateTime;
'deleted'?: DateTime;
'updated-by'?: number;
'updated-from'?: number;
'tags'?: string[];
}
Property | Data Type | Description |
---|---|---|
terminated | DateTime? | The date the customer requested this account to be terminated. Terminated accounts are archived/backed up for a specific number of years, according to local law, before they are permanently deleted. |
name | String | Legal name of company. Will be printed on all receipts. |
alias | String | The realm/company alias. |
org-number | String | The company's legal organization ID. Will be printed on all receipts. |
address | String | The company's legal address. A cash register without location will print this on receipts. |
phone-number | String | The company's phone number. A cash register without location will print this on receipts. |
web-address | String? | The company's web address. A cash register without location will print this on receipts, if specified. |
email | String? | The company's email address. A cash register without location will print this on receipts, if specified. |
registration-type | Company.RegistrationType? | Information about how and from where this realm/company was created. |
business-category | Company.Category? | The company's business category. |
type | Company.Type? | What kind of company this company is. Can be merchant (the default) or reseller . |
feature | CompanyFeature? | An object holding the company's feature flags, if any. |
reseller-params | ResellerParams? | For reseller companies, additional reseller parameters. |
locale | String? | The company's locale. Defines language used on receipts, localization rules for all server resources and various compliance criteria in the cash registers. Default, if unspecified, is sv-SE . |
currency | String? | The company's default or accounting currency. This affects the interpretation of most Money properties. Default, if unspecified, is SEK . |
secondary-locale | String? | The company's secondary locale. Defines secondary language used on receipts. localization rules for all server resources and various compliance criteria in the cash registers. |
time-zone | String? | The company's preferred time zone. This affects the interpretation of all CronExpr properties that are evaluated by the server, like scheduled triggers. |
sales-breakpoint-hour | Int32? | The hour when transactions will begin to register on the current date (according to the configured time zone). Defaults to 0 (i.e. midnight). |
id | Int64? | The resource ID of this entity. |
created | DateTime? | Date and time when this entity was first created. |
updated | DateTime? | Date and time when this entity was last modified. |
deleted | DateTime? | Date and time when this entity was deleted. |
updated-by | Int64? | ID of User who last modified this entity. |
updated-from | Int64? | ID of Till (trusted device) which last modified this entity. |
Interface CompanyFeature
namespace CompanyFeature {
type Flag =
| 'archived-account'
| 'control-unit-not-required'
| 'demo-account'
| 'restricted-version'
| 'auto-close-batch'
| 'barcode-scanners'
| 'campaigns'
| 'cloud-control-unit'
| 'coupon-vouchers'
| 'custom-payment-methods'
| 'digital-receipt-sms'
| 'direct-marketing-campaigns'
| 'entertainment-bills'
| 'erp-bl'
| 'erp-fortnox'
| 'erp-personalkollen'
| 'erp-planday'
| 'erp-visma'
| 'erp-zoined'
| `external-journal`
| 'foreign-currencies'
| 'host2t-terminals'
| 'kitchen-tickets'
| 'payment-invoices'
| 'payment-swish'
| 'payment-vouchers'
| 'shifts'
| 'stock-balances'
| 'table-service'
| 'take-out-orders'
| 'verifone-terminals'
| 'viva-wallet-terminals'
| 'wisepay-terminals'
;
}
interface CompanyFeature {
'flags': CompanyFeature.Flag[];
`viva-wallet-fee-rate`: number;
}
Property | Data Type | Description |
---|---|---|
flags | CompanyFeature.Flag[] | A set of feature flags that are currently active for this realm or company. |
viva-wallet-fee-rate | Float32 | Fee rate for Viva.com transactions, in percent. |
The following table describes all available feature flags.
Feature Flag | Description |
---|---|
archived-account | If set, this account is disabled and read-only, but still available (for compliance). |
control-unit-not-required | If set, the cash register operates even if a fiscal control unit is not present or configured. For markets where fiscal control units are not used, this flag can be forced via the ResellerParams . |
demo-account | If set, the account is a non-production, demonstration-only account. |
restricted-version | If set, the cash register operates in locked down or "demo" mode, which the customer may then unlock by subscribing to a service. |
auto-close-batch | Enables cash registers to automatically close the batch and print a Z-report at a specified schedule. |
barcode-scanners | Enables cash registers to use barcode scanners and external keypads. |
campaigns | Enables automatic discount rules/promotions. |
cloud-control-unit | Enables cash registers to use cloud-based fiscal control units. |
coupon-vouchers | Enables support for server-side coupon vouchers where the system keeps track of registered coupons, quantities and credit limits. |
custom-payment-methods | Enables the customer to define custom payment methods, like mobile payments or coupons. |
digital-receipt-sms | Enables digital receipts to be sent via SMS. |
direct-marketing-campaigns | Enables direct marketing campaigns, i.e. the ability to send marketing SMS messages to registered customers from Backoffice or cash registers. |
entertainment-bills | Enables the possibility to print entertainment bills (Bewirtungs-Beleg) from the cash register. |
erp-bl | Enables invoicing and automatic uploading of Z-Reports to Björn Lundén. |
erp-fortnox | Enables invoicing and automatic uploading of Z-Reports to Fortnox. |
erp-personalkollen | Enables automatic uploading of receipts to Personalkollen. |
erp-planday | Enables automatic uploading of Z-Reports to Planday. |
erp-visma | Enables invoicing and automatic uploading of Z-Reports to Visma. |
erp-zoined | Enables automatic uploading of receipts to Zoined. |
external-journal | Enables external journals, i.e. support for third party integrations injecting external sales data into the system. |
foreign-currencies | Enables the customer to use foreign currencies in the cash registers. |
host2t-terminals | Enables support for Host2T credit card terminals from Worldline. |
kitchen-tickets | Enables printing of food orders to a kitchen ticket. |
payment-invoices | Enables support for invoicing. Also requires one of the invoicing-enabled erp-* flags to be set. |
payment-swish | Enables Swish Handel as an available payment method. |
payment-vouchers | Enables support for payment vouchers where the system keeps track of registered vouchers, balances and credit limits. |
shifts | Enables the Attendance Recorder module in the cash register. |
stock-balances | Enables per-location tracking of stock balances for all enabled products. |
table-service | Enables extended support for restaurants, including a visual table layout and multiple tabs per table. |
take-out-orders | Enables support for take out orders submitted from external order forms or sites. |
verifone-terminals | Enables support for Verifone credit card terminals. |
viva-wallet-terminals | Enables support for Viva.com Soft POS apps on phones and terminals. |
wisepay-terminals | Enables support for Wisepay credit card terminals. |
Interface ResellerParams
interface ResellerParams {
'available-features': CompanyFeature.Flag[];
'required-features': CompanyFeature.Flag[];
'merchant-config': MerchantConfig;
'alias-prefix': string;
}
Property | Data Type | Description |
---|---|---|
available-features | CompanyFeature.Flag[] | A set of feature flags that this merchant may enable for itself and its customers. |
required-features | CompanyFeature.Flag[] | A set of feature flags that are automatically set for all merchants. |
merchant-config | MerchantConfig | MerchantConfig is a subset of MerchantParams . |
alias-prefix | String | A (preferably) short prefix that is appended to the realm/company alias of all this reseller's merchants and sub-resellers. Think of it like an alias prefix namespace. |
Interface MerchantParams
interface MerchantParams {
'reseller-alias'?: string;
'available-features': CompanyFeature.Flag[];
'required-features': CompanyFeature.Flag[];
'support-phone': string;
'support-email': string;
'sales-phone': string;
'sales-email': string;
'reseller-name': string;
'web': string;
'terms-and-conditions-uri': string;
'vat-rates': number[];
'general-info'?: string;
}
Property | Data Type | Description |
---|---|---|
reseller-alias | String | Alias (realm) for partner. Allowed characters are [a-z0-9] . |
available-features | CompanyFeature.Flag[] | List of flags that are available. Note that merchant may not have access to all of them. Active flags are found in company.feature.flags of ClientInfo . |
required-features | CompanyFeature.Flag[] | Subset of available-features that will automatically be set by the server. |
support-phone | String | Telephone number for support questions. |
support-email | String | Email for support questions. |
sales-phone | String | Telephone number for sales related questions. |
sales-email | String | Email for sales related questions. |
reseller-name | String | Name of partner for support and sales texts. |
web | String | Support web address for partner. |
terms-and-conditions-uri | URI | URI to terms and conditions page. |
vat-rates | String | List of valid VAT rates. Only these VAT rates should be used. |
general-info | String | General information from reseller. |
Interface ServiceEndpoint
interface ServiceEndpoint {
'uri': string;
}
Property | Data Type | Description |
---|---|---|
uri | URI | A base URL pointing to an individual API server. |
Interface SystemParams
interface SystemParams {
'backoffice-uri': string;
'slipp'?: SlippConfig;
'viva-wallet'?: VivaWalletConfig;
}
Property | Data Type | Description |
---|---|---|
backoffice-uri | URI | The location of the Onslip 360 Backoffice site. |
slipp | SlippConfig? | Slipp.ID configuration. |
viva-wallet | VivaWalletConfig? | Viva.com configuration. |
Interface SlippConfig
export interface SlippConfig {
'ws-uri': string;
}
Property | Data Type | Description |
---|---|---|
ws-uri | URI | The URL pointing to Slipp.ID WebSocket API. |
Interface VivaWalletConfig
interface VivaWalletConfig {
'client-id': string;
'client-secret': string;
}
Property | Data Type | Description |
---|---|---|
client-id | String | Viva.com ISV Client ID. |
client-secret | String | Viva.com ISV Client Secret. |