SPI Digital Receipts

Lookup recipient

post /recipient-lookup

Looks up a user that can be identified by the one of the provided properties and accepts receiving of receipts.

REQUEST BODY
object
REQUIRED
Returns

User found

posthttps://receipts.example.com/recipient-lookup
HTTP Status Code Summary
200User found
400Invalid request. Data sent from client is invalid.
401Unauthorized
403Forbidden
404Not found
429Too many requests
500Internal server error
502Bad gateway

Create a digital receipt

post /digital-receipts

Creates a digital receipt in the system that implementing this API.

REQUEST BODY
object
REQUIRED
posthttps://receipts.example.com/digital-receipts
HTTP Status Code Summary
204Receipt successfully created
400Invalid request. Data sent from client is invalid.
401Unauthorized
403Forbidden
404Not found
429Too many requests
500Internal server error
502Bad gateway

Objects

ErrorCode
string

Error code describing the type of error that occurred. The error_data property might contain additional information.

ErrorMessage
object

PROPERTIES
request_id
string
REQUIRED
error_code
REQUIRED
error_data
REQUIRED
message
string
REQUIRED

Loyalty
object

Loyalty information for the recipient.

PROPERTIES
id
string
REQUIRED

Loyalty ID for the customer in the CRM system.

Example: ""1234567890""
Min Length: 1
provider
string
REQUIRED

Name of the loyalty program provider.

Example: ""Superstore loyalty program""
Min Length: 1
level
string

Loyalty tier or level of the customer.

Example: ""gold""
Min Length: 1
<*>
object

Recipient
object

Identifies a recipient for digital receipts.

PROPERTIES
type
string
REQUIRED

The type used to identify a recipient.

Example: ""email""
VALUES
personal-id
email
phone-number
identifier
string
REQUIRED

A value that identifies a recipient, matching the provided type.

Example: ""user@example.com""
Min Length: 1
loyalty
<*>
object

RecipientLookup
object

Lookup object to identify a user as recipient of receipts. At least one field must be provided.

PROPERTIES
personal_id
string

Personal ID of the user, e.g. a national ID number or SSN.

Example: ""1234567890""
Min Length: 1
email
string
(email)

Email address of the user.

Example: ""user@example.com""
phone_number
string

Phone number of the user, in E.164 format.

Example: ""+46701234567""
Min Length: 1
<*>
object

ReceiptItemDiscount
object

PROPERTIES
id
integer
REQUIRED

The ID for the discount (voucherid in Sitoo Vouchers)

Example: "21"
discountname
string
REQUIRED

The name of the discount (vouchername in Sitoo Vouchers)

Example: ""3 FOR 2 (LIMITED)""
discountgroup
string

The group name for the discount (vouchercode in Sitoo Vouchers)

Example: ""PROMOTION""
moneytotal
string
REQUIRED

The total money amount of the discount

Pattern: ^[-+]?[0-9]+\.[0-9]{2}$
Example: ""142.00""
moneyvat
string
REQUIRED

The total money VAT amount for the discount

Pattern: ^[-+]?[0-9]+\.[0-9]{2}$
Example: ""28.40""
additionaldata
object

Additional data for this discount

Example: "{ "crm-promotionid": "PROMO123" }"
<*>
string
Example: "{ "crm-promotionid": "PROMO123" }"

ReceiptSalesTax
object

PROPERTIES
id
integer
REQUIRED

The ID of the sales tax

Example: "1"
name
string
REQUIRED

The name of the sales tax

Example: ""VAT""
code
string

The code used for the sales tax

Example: ""SALES_TAX_CODE""
externalid
string

External ID for the salestaxproductgrouprule that was used for the sales tax

Example: ""TAX-RULE-1""
groupregion
string

The region for the salestaxgroup that was used for the sales tax

Example: ""NY""
decimalvalue
string
REQUIRED

The tax percentage used for the sales tax

Pattern: ^[-+]?[0-9]+\.[0-9]{3}$
Example: ""8.500""
moneytotal
string
REQUIRED

The total amount that the sales tax was applied towards

Pattern: ^[-+]?[0-9]+\.[0-9]{2}$
Example: ""142.00""
moneytax
string
REQUIRED

The amount taxed for the sales tax

Pattern: ^[-+]?[0-9]+\.[0-9]{2}$
Example: ""12.07""

PrintLine
object

PROPERTIES
type
integer
REQUIRED

The type of print formatting for this line

  • 1 Text: Prints a line of text from value1.
  • 2 TextBold: Prints a line of text from value1 in bold font.
  • 3 TextDouble: Prints a line of text from value1 in bold font with double size, centered.
  • 4 Info2: Prints value1 with a colon before value2.
  • 5 Item2: Prints value1 in the first columna and value2 in the second (right aligned).
  • 7 SepSpace: Prints an empty line.
  • 8 SepDashed: Prints an separator line.
  • 9 Sign: Prints an signature line.
  • 10 Barcode128: Prints a barcode in Code 128 format. value1 is the barcode data and value2 is printed below the barcode.
  • 11 BarcodeQR: Prints a QR code. value1 is the QR data and value2 is printed below the QR code.
  • 12 TextCenter: Prints a line of text from value1 centered.
Example: "1"
scope
integer

The scope for printing this line if applicable (1: Customer, 2: Store)

  • 1 Customer
  • 2 Store
Example: "1"
value1
string

First value for the print line

Example: ""Thank you for your purchase""
value2
string

Second value for the print line

Example: ""€142.00""

ReceiptItem
object

PROPERTIES
sku
string
REQUIRED

The product SKU for the item

Example: ""597330-S""
productname
string
REQUIRED

The product name for the item

Example: ""Deco Coat B/W""
variant
string

The product variant information for the item

Example: ""Size: M""
discountname
string

The discount name for the item

Example: ""3 FOR 2 (LIMITED)""
note
string

The note for the item

Example: ""Customer preference: gift wrapped""
productgrouptype
integer
REQUIRED

The product group type (10: Product, 20: Service, 30: GiftCard, 40: Deposit)

  • 10 Product
  • 20 Service
  • 30 GiftCard
  • 40 Deposit
Example: "10"
productgroupname
string
REQUIRED

The product group name for the item

Example: ""Standard""
unitlabel
string

The unit label for the item

Example: ""pcs""
quantity
integer
REQUIRED

The number of items purchased

Example: "3"
moneytotal
string
REQUIRED

The total amount for the item

Pattern: ^[-+]?[0-9]+\.[0-9]{2}$
Example: ""426.00""
moneydiscount
string
REQUIRED

The discount amount for the item (Including VAT)

Pattern: ^[-+]?[0-9]+\.[0-9]{2}$
Example: ""0.00""
moneyvat
string
REQUIRED

The VAT amount for the item

Pattern: ^[-+]?[0-9]+\.[0-9]{2}$
Example: ""85.20""
moneyunitprice
string
REQUIRED

The unit price amount for the item

Pattern: ^[-+]?[0-9]+\.[0-9]{2}$
Example: ""142.00""
decimalunitquantity
string

The unit quantity decimal value for the item (if applicable)

Pattern: ^[-+]?[0-9]+\.[0-9]{3}$
Example: ""0.000""
vatid
integer
REQUIRED

The VAT ID for the item

Example: "2"
vatvalue
number
REQUIRED

The VAT value for the item

Example: "25"
discounts
REQUIRED

An array of JournalReceiptItemDiscount applied to this item

Example: "[ { "discountname": "3 FOR 2 (LIMITED)", "id": 21, "moneytotal": "142.00", "moneyvat": "28.40" } ]"
salestaxes
REQUIRED

An array of JournalReceiptSalesTax applied to this item

Example: "[]"
additionaldata
object

Additional data for this receipt item

Example: "{ "item-delivered": "true", "item-productid": "16", "product-group-name": "Standard" }"
<*>
string
Example: "{ "item-delivered": "true", "item-productid": "16", "product-group-name": "Standard" }"
printrow
array
REQUIRED

An array of PrintLine

Example: "[]"
printsection
array
REQUIRED

An array of PrintLine

Example: "[]"

PaymentMethod
integer

ID for the payment method used

  • 100 Cash
  • 110 CreditNote
  • 200 PointAirPay
  • 210 VerifoneLPP
  • 220 Host2T
  • 300 ExtCard
  • 400 Custom5
  • 500 GiftCard
  • 510 GiftCardCreditNote
  • 600 Invoice
  • 610 CashOnDelivery
  • 700 Klarna
  • 705 KlarnaV3
  • 710 Swish
  • 711 SwishQR
  • 720 MobilePay
  • 730 Vipps
  • 1000 Custom1
  • 1100 Custom2
  • 1200 Custom3
  • 1300 Custom4
  • 1400 CustomInvoice
  • 2000 CustomApi
  • 2100 Adyen
  • 2110 AdyenAPI
  • 2200 Nets
  • 2300 Coiney
  • 2400 Zettle
Example: 100

ReceiptPayment
object

PROPERTIES
paymentname
string
REQUIRED

The name of the payment

Example: ""Cash""
paymentmethod
REQUIRED
paymentexternalid
string

External ID for the payment (if applicable)

Example: ""CASH""
moneytotal
string
REQUIRED

The total amount of the payment

Pattern: ^[-+]?[0-9]+\.[0-9]{2}$
Example: ""284.00""
moneycaptured
string
REQUIRED

The amount captured for the payment

Pattern: ^[-+]?[0-9]+\.[0-9]{2}$
Example: ""284.00""
moneyinadvance
string
REQUIRED

The amount captured for the payment for items that were not delivered

Pattern: ^[-+]?[0-9]+\.[0-9]{2}$
Example: ""0.00""
additionaldata
object

Additional data for this payment

Example: "{ "payment-method": "cash", "payment-reftype": "cash" }"
<*>
string
Example: "{ "payment-method": "cash", "payment-reftype": "cash" }"
printrow
array
REQUIRED

An array of PrintLine

Example: "[]"
printsection
array
REQUIRED

An array of PrintLine

Example: "[]"

ReceiptVat
object

PROPERTIES
vatvalue
number
REQUIRED

The vat value in percentage

Example: "25"
moneyvat
string
REQUIRED

The amount for the receipt VAT

Pattern: ^[-+]?[0-9]+\.[0-9]{2}$
Example: ""56.80""
moneynet
string
REQUIRED

The amount that the receipt VAT was calculated from

Pattern: ^[-+]?[0-9]+\.[0-9]{2}$
Example: ""227.20""

ReceiptCustomer
object

The customer for the receipt

PROPERTIES
id
string

The ID for the customer

Example: ""CUST123""
email
string

The email for the customer

Example: ""customer@example.com""
namefirst
string

The first name for the customer

Example: ""John""
namelast
string

The last name for the customer

Example: ""Doe""
personalid
string

The personal ID for the customer

Example: ""19800101-1234""
companyid
string

The company ID for the customer

Example: ""556677-8899""
company
string

The company for the customer

Example: ""ACME Inc.""
mobile
string

The mobile phone number for the customer

Example: ""+46701234567""
customerref
string

Reference for the customer

Example: ""REF123""
invoice_address
string

Invoice address for the customer

Example: ""123 Main St""
invoice_address2
string

Extra invoice address field for the customer

Example: ""Apt 4B""
invoice_zip
string

Invoice zip/postal code for the customer

Example: ""12345""
invoice_city
string

Invoice city for the customer

Example: ""Stockholm""
invoice_state
string

Invoice state/region for the customer

Example: ""Stockholm""
invoice_countryid
string

Invoice country ID for the customer

Example: ""SE""
delivery_address
string

Delivery address for the customer

Example: ""123 Main St""
delivery_address2
string

Extra delivery address field for the customer

Example: ""Apt 4B""
delivery_zip
string

Delivery zip/postal code for the customer

Example: ""12345""
delivery_city
string

Delivery city for the customer

Example: ""Stockholm""
delivery_state
string

Delivery state/region for the customer

Example: ""Stockholm""
delivery_countryid
string

Delivery country ID for the customer

Example: ""SE""

Receipt
object

PROPERTIES
receiptnumber
integer
REQUIRED

The receipt number. Incremental number, unique to a cash register. Used together with the registerkey to produce the receipt ID (receiptid = <registerkey><receiptnumber>) which is the unique reference to the receipt.

Example: "10000"
moneytotal
string
REQUIRED

The total amount for this receipt

Pattern: ^[-+]?[0-9]+\.[0-9]{2}$
Example: ""284.00""
quantitytotal
integer
REQUIRED

The total item quantity for this receipt

Example: "3"
moneysubtotal
string
REQUIRED

The sub total amount before sales tax for the receipt (if applicable).

Pattern: ^[-+]?[0-9]+\.[0-9]{2}$
Example: ""142.00""
moneyroundoff
string
REQUIRED

The roundoff amount for the receipt

Pattern: ^[-+]?[0-9]+\.[0-9]{2}$
Example: ""0.00""
currencycode
string
REQUIRED

Currency code for the receipt (3-letter ISO 4217)

Example: ""SEK""
isrefund
boolean
REQUIRED

True if the receipt is for a refund

Example: "false"
staff
string
REQUIRED

The name of the staff that handled the transaction

Example: ""POS Staff""
staffuserid
string
REQUIRED

The user ID for the staff that handled the transaction

Example: ""{25BA93F6-64A3-2D33-1B4B-7462658F6B3C}""
creditorderid
integer

Order ID in Sitoo for the purchase that a refund is referencing

Example: "12345"
items
REQUIRED

An array of JournalReceiptItem with the items for the receipt

payments
REQUIRED

An array of JournalReceiptPayment with the payments for the receipt

vatsummary
array
REQUIRED

An array of JournalReceiptVat with the VAT details for the receipt

salestaxsummary
REQUIRED

An array of JournalReceiptSalesTax with the sales tax details for the receipt

moneysalestaxinadvance
string
REQUIRED

The amount for the sales tax for not delivered items

Pattern: ^[-+]?[0-9]+\.[0-9]{2}$
Example: ""0.00""
additionaldata
object

Additional data for this receipt

Example: "{ "pos-receiptid": "SIE000015010002310000", "pos-staff-externalid": "PS", "pos-staff-userid": "{25BA93F6-64A3-2D33-1B4B-7462658F6B3C}", "pos-timezone": "Europe/Stockholm", "store-externalgroupid": "NORDIC", "store-externalid": "200", "store-name": "Sitoo Concept Store" }"
<*>
string
Example: "{ "pos-receiptid": "SIE000015010002310000", "pos-staff-externalid": "PS", "pos-staff-userid": "{25BA93F6-64A3-2D33-1B4B-7462658F6B3C}", "pos-timezone": "Europe/Stockholm", "store-externalgroupid": "NORDIC", "store-externalid": "200", "store-name": "Sitoo Concept Store" }"
printsection
array
REQUIRED

An array of PrintLine

Example: "[]"
comment
string

A comment/note associated with the receipt

Example: """"
posname
string
REQUIRED

The name of the cash register that generated the receipt

Example: ""Sitoo POS""
posversion
string
REQUIRED

The version of the cash register that generated the receipt

Example: ""1.64""

ReceiptEntry
object

A receipt entry for a Sitoo POS (Cash Register)

PROPERTIES
id
integer
REQUIRED

The ID generated by the POS client for this entry. Note! All clients will have these in the order of when they were created, but for some clients the IDs will not be in sequence.

Example: "8"
datecreated
integer
(int64)
REQUIRED

Unix timestamp for when the entry was created on the POS client

Example: "1672386311"
registerid
string
REQUIRED

The ID for the POS that generated the entry

Example: ""{2AA484B4-2B5F-55AB-128A-7DB46E573357}""
registerkey
string
REQUIRED

The key for the POS that generated the entry

Example: ""SIE0000150100023""
companyid
string
REQUIRED

The company ID for the POS that generated the entry

Example: ""556629-6322""
iscopy
boolean
REQUIRED

If true, then this is a receipt copy

ispractice
boolean
REQUIRED

If true, then this entry was generated in practice mode

Example: "false"
barcode
string
REQUIRED

The barcode for the receipt

Example: ""91SIE000015010002310000""
originalreceiptbarcode
string

The barcode for the original receipt if this is a return receipt

Example: ""91SIE000015010002309999""
receiptpre
string

A text string for the header print section

Example: ""I'm a header, please send line breaks with \n""
receiptpost
string

An array of strings for the footer print section

Example: ""I'm a footer, please send line breaks with \n""
receipt
REQUIRED
recipient
REQUIRED