SPI Tax Free

Add Transaction

post /transactions

Create a new tax free transaction. Note that the transaction ID might not be returned if the ui_type property in the request body is set to web-page. Then it will be provided later in a callback from the web page.

PARAMETERS
Store-ID
string
header

ID of the store (Sitoo clients will send the externalid property of the store object in Sitoo)

Staff-ID
string
header

ID of the staff (Sitoo clients will send the externalid property of the user object in Sitoo)

Register-ID
string
header

ID of the register

Request-ID
string
header

ID of the request

REQUEST BODY
object
REQUIRED

Tax Free transaction.

Transaction
Returns

Successful. Returns a tax free transaction.

posthttps://tax-free.example.com/transactions
HTTP Status Code Summary
201Successful. Returns a tax free transaction.
400Invalid request. Data sent from client is invalid.
401Missing or bad authentication.
403User is not authorized to perform operation.
500Internal Server Error.
502Bad Gateway.

Get Transaction

get /transactions/{transaction_id}

Get a transaction.

PARAMETERS
transaction_id
string
path
REQUIRED

Transaction ID.

Store-ID
string
header

ID of the store (Sitoo clients will send the externalid property of the store object in Sitoo)

Staff-ID
string
header

ID of the staff (Sitoo clients will send the externalid property of the user object in Sitoo)

Register-ID
string
header

ID of the register

Request-ID
string
header

ID of the request

Returns

Successful. Returns a tax free transaction.

gethttps://tax-free.example.com/transactions/QH8X33XXUL8Z
HTTP Status Code Summary
200Successful. Returns a tax free transaction.
400Invalid request. Data sent from client is invalid.
401Missing or bad authentication.
403User is not authorized to perform operation.
404The specified resource was not found.
500Internal Server Error.
502Bad Gateway.

Void Transaction

delete /transactions/{transaction_id}

Void a transaction. Typically used when returning items for a previous sales.

PARAMETERS
transaction_id
string
path
REQUIRED

Transaction ID.

Store-ID
string
header

ID of the store (Sitoo clients will send the externalid property of the store object in Sitoo)

Staff-ID
string
header

ID of the staff (Sitoo clients will send the externalid property of the user object in Sitoo)

Register-ID
string
header

ID of the register

Request-ID
string
header

ID of the request

deletehttps://tax-free.example.com/transactions/QH8X33XXUL8Z
HTTP Status Code Summary
200Successful.
400Invalid request. Data sent from client is invalid.
401Missing or bad authentication.
403User is not authorized to perform operation.
404The specified resource was not found.
500Internal Server Error.
502Bad Gateway.

Get Printouts

get /transactions/{transaction_id}/printouts

Get printouts for a transaction.

PARAMETERS
transaction_id
string
path
REQUIRED

Transaction ID.

Store-ID
string
header

ID of the store (Sitoo clients will send the externalid property of the store object in Sitoo)

Staff-ID
string
header

ID of the staff (Sitoo clients will send the externalid property of the user object in Sitoo)

Register-ID
string
header

ID of the register

Request-ID
string
header

ID of the request

gethttps://tax-free.example.com/transactions/QH8X33XXUL8Z/printouts
HTTP Status Code Summary
200Successful. Returns a list of printouts.
400Invalid request. Data sent from client is invalid.
401Missing or bad authentication.
403User is not authorized to perform operation.
404The specified resource was not found.
500Internal Server Error.
502Bad Gateway.

Objects

ErrorCode
string

Error code describing the data and depending on value, the error_data property will contain the following additional information:

Error codeAdditional info
field-missingfield
field-unknownfield
field-readonlyfield
field-typefield
field-validationfield
version-invalidnone
condition-failednone
othernone

Example: "field-missing"

ErrorMessage
object

Error object returned when a request is not successful.

PROPERTIES
request_id
string
REQUIRED

ID of request

Example: ""123e4567-e89b-12d3-a456-426614174000""
error_code
REQUIRED

The error code returned.

error_data
object
REQUIRED

A string map with fields depending on the error_code. The field message is always available.

<*>
string

Address
object

Address.

PROPERTIES
address
string

The address line 1.

Example: ""1445 1st Avenue""
address2
string
nullable

The address line 2.

Example: """"
zip
string

Zip for the address.

Example: ""10021""
city
string

City for the address.

Example: ""New York""
state
string

State/Region for the address.

Example: ""NY""
country_id
string
(iso-3166)

Country ID for the address (ISO 3166-1 Alpha2 uppercase).

Example: ""US""

Customer
object

Customer data.

PROPERTIES
name_first
string

First name.

Example: ""Jane""
name_last
string

Last name.

Example: ""Doe""
mobile
string
(E.164)

Mobile phone number.

Example: ""+46707001234""
email
string
(email)

Email.

Example: ""jane.doe@example.com""
company
string

Company.

Example: ""Company Inc..""
invoice_address
delivery_address

OrderItem
object

PROPERTIES
sku
string
REQUIRED

The Stock Keeping Unit (SKU)

product_name
string
REQUIRED

Title row 1.

product_name2
string

Title row 2.

quantity
integer
(int64)
REQUIRED

The quantity of this item.

unit_quantity

Unit quantity (How much that is included in each unit).

unit_label
string

Label for unit of transaction item. (e.g. kg)

total
REQUIRED

Total amount including VAT for the order item.

vat
REQUIRED

Total VAT for the order item.

vat_value
number
REQUIRED

VAT percentage for the order item.

Example: "25"

Order
object

The order data.

PROPERTIES
date_created
integer
(int64)
REQUIRED

Timestamp for when the order was created.

receipt_id
string

Unique receipt ID.

Example: ""SIP00015010000110020""
order_id
string
REQUIRED

Order ID.

Example: "23456"
order_external_id
string

Order External ID. If the order was placed externally.

Example: ""E555444111""
store_id
string

Store ID for the order.

store_name
string

Store Name for the order.

currency_code
string
(iso-4217)
REQUIRED

Currency used for transaction (3-letter ISO 4217).

roundoff

Roundoff for the order.

customer
items
array
REQUIRED

Order items.

total
REQUIRED

The total amount including VAT.

vat
REQUIRED

The total VAT amount.

Transaction
object

Tax Free transaction.

PROPERTIES
id
string
READ ONLY

The ID of the transaction. Usually returned later in the web page callback.

service
string
READ ONLY

The name of the service.

ui_type
string
READ ONLY

Type of UI for the tax free session. Note that the value must be web-page.

VALUES
web-page
webpage_url
string
READ ONLY

URL to load if type is web-page.

receipt_type
string
READ ONLY

Type of printout to make.

VALUES
none
print-data
order
REQUIRED

Printout
array

List of printouts for a tax free transaction. Each array represents a separate printout and every element in the inner array represents a row in the printout. See the overview for a more detailed example of a printout.

array
object

DecimalQuantity
string

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

Money
string

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