Skip to main content

ZAPI document

Written by Thanh Duy Cao

Introduction

Zoined API enables customers or third parties to send their data to Zoined using RESTful HTTP API. Uploaded data will be processed and stored to our data warehouse and used for generating analytic reports for the retailers. API service has end points for almost every facet of a retail business be it sales, inventory or even employee time keeping.This document contains instructions on how to access the Zoined API. This document contains two parts: introduction and reference. Introduction walks you through the general structure of the API and how to use it. Reference contains detailed documentation for each API end point including code examples for multiple programming languages, and live in-browser testing tool for the API end points.If you have any questions related to Zoined API, don't hesitate to contact Zoined support.

Authentication and security

Every client must authenticate itself to send data towards any end points in Zoined API service. This means that every request to the service must have an authorization header with an identification token. Token is unique to every customer and can be obtained by contacting Zoined support services.

An example of the header would be:

Authorization: Bearer dGVzdGlhc2lha2FzOnZhaWtlYXBhc3N1

All traffic to Zoined API is sent with HTTPS and protected with TLS.

Messaging and error handling

API service uses JSON data format to exchange data with clients. This means all replies to clients will be delivered in JSON (including all possible error messages). The successful requests; i.e. the requests which delivered data in the correct format and thereby resulted in successful archiving of data will get 200 OK response with a JSON message conveying number of records and the model to which it has been been added. This message looks like:

{
status: OK
msg: "1 Customer added"
}

Error handling is done through standard HTTP status codes where code 200 means successful reply (no errors) and any other code describes error conditions while executing the service. Usually error code is accompanied by JSON reply that further describes what went wrong. Generally following error codes are used:

  • 400 – Means that there is something wrong with the request submitted by the client. Usually there is JSON-reply describing the error. In most cases it is caused by missing or malformed request body (JSON), missing mandatory fields in the JSON or Type errors, e.g character instead of number, date/time format issues etc. Below is an example of visitors end point if an empty request body was sent.

{
"status": "NOT OK",
"msg": [
"/visitors: error.path.missing",
"/date: error.path.missing",
"/organisation_id: error.path.missing",
"/time: error.path.missing"
]
}
  • 401 – This code means that authentication has failed, due to missing or incorrect access token in authorization header. The response JSON body would be:

{
"status":"NOT OK",
"msg":"Unauthorized"
}
  • 404 – Requested service does not exist or request method (eg. GET vs. POST) is incorrect. The response JSON in this case would be:

{ 
"status":"NOT OK",
"msg":"End point requested does not exist"
}
  • 500 – There was an internal error while processing the request. This is often a problem with the service itself. If this persists please contact Zoined service team with detailed information about the error:

{
"status":"NOT OK",
"msg":"An Exception Occurred"
}
  • 503 – Service is entirely offline. This indicates maintenance break or problem with the infrastructure. If error persists, please contact support.

Frequently asked questions

Q: How do I choose data format to send my data? A: You need to set Content-Type header in your request to correct value. Zoined API currently supports either JSON or CSV data formats. Any other format is NOT supported and will cause error reply. By default we assume content is application/json but it can be changed to CSV by adding header: Content-Type: application/csv

Q: What is the number format?

No thousand separators. Use dot . as decimal separator.

Q: What is the date format?

A: All dates should be in ISO-format "YYYY-MM-DD".

Q: How do I enter the time? What is "Z" at the end of the time example?

A: Enter the time in 24 hour format "H24:Mi:ss". 'Z' stands for UTC time zone and is optional like all time zone information. Zoined will always use local time so any time zone information is just ignored and no time zone conversions are done.

Q: Do I enter values and headers with quotes (single or double) or without?

A: For JSON, use double quotes for all headers and values. For CSV, do not use anything for either except when escaping special characters (see below).

Q: How do I escape special characters in CSV?

A: If field value has separator character (eg. ;) backslash \ or double quote " in it, you'll need to escape it by wrapping the field value with double quotes " and prefixing any double quotes and backslashes with backslash. For example value example;\"value" should be converted to "example;\\\"value\"". Separator character can be specified with separator query string parameter. By default we assume semicolon ';'. Escape characters ('' and '"') cannot be changed.

Q: What character encoding should be used?

A: For JSON the standard specifies that character set should be Unicode with either UTF-8, UTF-16 or UTF-32 encoding. For CSV you can use any character encoding where separators and other special characters are encoded with single byte. Hence pure multi-byte encodings like UTF-16 are NOT supported with CSV format but mixed ones like UTF-8 are as long as special characters are encoded with single byte. Encoding should be specified with encoding query string parameter and it must correspond to encoding used in actual data. If unspecified then by default UTF-8 is assumed.

Q: How to get best performance for bigger data volume uploads?

A: First of don't send your data one row at a time by making separate API call for each row. That will severely degrade performance of overall data load causing it to take significantly longer time to complete. Instead use fixed size chunks of suitable size (eg. 100000 rows per chunk) for each API call. Json format is also generally slightly faster to process than csv data format.

Data upload

Data upload end points allow one to upload data into Zoined warehouse. Each different data type has their own end points which are documented below, however all of these end points have the same structure. They expect HTTP POST request with either JSON or CSV data as request body. Please not that all end point names in URL string are case sensitive and must be written exactly as written in this document.

  • JSON data should be array of objects. For example for campaigns this could be

[
{ "campaign_id": "My campaign ID", "campaign_name": "February 2016", "start_date": "2016-02-01", "end_date": "2016-02-29" },
{ "campaign_id": "My campaign ID2", "campaign_name": "March 2016", "start_date": "2016-03-01", "end_date": "2016-03-31" }
]

  • CSV data should declare fields on the first line (header), and remaining lines should contain data to be uploaded. You can select field separator by adding parameter separator to URL (URL escaping might be needed depending on separator char selected). Default separator is ;. You also need to escape all field values properly in case they contain separator chars and/or double quotes " or backslashes \. Escaping is done by enclosing whole field with double quotes and adding backslash in front of any double quote or backslash characters. Eg. field: \this\ ;is; "test" would be escaped as: "\\this\\ ;is; \"test\"". For campaigns the uploaded CSV -file could be

campaign_id; campaign_name; start_date; end_date
My Campaign ID; February 2016; 2016-02-01; 2016-02-29
"My Campaign \"March\"";"March 2016";"2016-03-01";"2016-03-31"

Details for usable fields available within individual end point documentation.

Each of the data upload end points also support "dry run" mode where data is validated, but not stored into warehouse. This is useful when testing the API integration, as no changes are stored, but any structural errors are reported immediately.

Our API end points can handle very large messages as received data is streaming within our back-end. However, it usually makes sense to split files into max 5Gb chunks. This makes it faster to retry transfers if there are any network errors while transferring data.

For large files we recommend using Gzip encoding, as it can dramatically reduce amount of data to transfer. Gzip encoding can be used by encoding the data when sending and adding Content-Encoding header.

Content-Encoding: gzip

Sales transactions

This is the main fact entity within Zoined. It contains essential information about sales, such as number of items sold, sales price, rebates and purchase price.

It also links masterdata together by storing information about:

  • What was sold (Product dimension)

  • Where was it sold (Organisation dimension)

  • Who sold it (Salesperson Dimension)

  • To whom was it sold (Customer dimension)

Upload list of sales transactions

POST https://api.zoined.com/sales?dryRun=false&separator=%3B&encoding=utf-8

Parameters

dryRun

Only validate the request without storing the data Example: false.

Boolean

separator

Column separator used when loading CSV data Example: ;.

String

encoding

Character encoding used in the CSV data (default is utf-8) Example: utf-8.

String

Attributes

Field

Type

Required

Description

Example

transaction_id

string

Unique ID for the transaction

242224

line_item_id

string

Secondary transaction identifier

1

customer_id

string

Customer ID for identified customer

32

delivery_customer_id

string

Delivery Customer ID for identified customer

32

sales_date

string

Sales date (yyyy-mm-dd)

2016-01-01

sales_time

string

Sales time (HH:mm:ss)

15:00:00

product_id

string

Product ID

XYZ

product_quantity

number

Sold quantity

2

product_unit_price

number

Unit price for a single product

10

sales_value

number

Total sales amount including tax

20

sales_value_wo_vat

number

Total sales amount without tax

20

compensation_amount

number

Optional compensation paid for this sale

3

rebate

number

Amount of rebate given including tax

0

rebate_wo_vat

number

Amount of rebate given without tax

0

sales_currency

string

Sales currency as ISO 4217 currency code. Required if multiple currencies are used.

EUR

payment_method

string

Payment method

Visa

supplier_id

string

Supplier ID

13

parent_product_id

string

Parent Product ID

123

purchase_price

number

Total purchase price including tax

5

purchase_price_wo_vat

number

Total purchase price without tax

5

purchase_currency

string

Purchase currency as ISO 4217 currency code. Required if multiple currencies are used.

EUR

piece_good

boolean

Unit indicator. true if sold as a unit, false if sold as a group of items.

true

organisation_id

string

Organisation unit ID

540

department_id

string

Store department ID

5401

salesperson_id

string

Salesperson ID

5402101

sales_representative_id

string

Responsible salesperson ID

5402100

campaign_id

string

Campaign ID

6344

cancel_id

string

Transaction ID of the cancelled receipt

cancelled

boolean

Indicates whether the transaction is cancelled. Default is false.

false

delivery_date

string

Delivery date (yyyy-mm-dd)

2016-01-01

delivery_time

string

Delivery time (HH:mm:ss)

15:00:00

order_date

string

Order date (yyyy-mm-dd)

2016-01-01

order_time

string

Order time (HH:mm:ss)

15:00:00

invoice_date

string

Invoice date (yyyy-mm-dd)

2016-01-01

invoice_time

string

Invoice time (HH:mm:ss)

15:00:00

register_id

string

Cash register ID

54022

table_number

string

Table number

54

rebate_code_id

string

Rebate code ID

3313V

booking_id

string

Optional reference to the booking that generated this sale.

B1224

booking_line_id

string

Optional booking line corresponding to this sale.

1

event_id

string

Event ID

221

sales_order_id

string

Sales order ID from which this sales transaction (invoice) originates.

12345

sales_order_line_id

string

Sales order line item ID from which this sales transaction line (invoice) originates.

1

parent_line_id

string

Parent line item ID that this line belongs to.

1

custom_field_1

string

Custom field 1

EU only

custom_field_2

string

Custom field 2

EU only

...

...

...

...

custom_field_15

string

Custom field 15

EU only

custom_metric_1

number

Custom metric 1

1

custom_metric_2

number

Custom metric 2

100

...

...

...

...

custom_metric_10

number

Custom metric 10

10000

source_system

string

Identifier of the source system. Required when mapping source system identifiers to master identifiers.

ABCDEF

Products

Sales items or services being sold.Products usually belong to product hierarchy which allows one to drill down from top of hierarchy to lower levels in the Zoined Analytics Portal. There are two ways of defining the product hierarchy:

  • Use FlatHierarchies endpoint with one of the product hierarchy keys entity_id having same product_id value.

  • Upload product hierarchy using ProductHierarchy endpoint, and add category_id field pointing to correct hierarchy level.

Upload list of products

POST /products

Creates or updates product master data.

Query Parameters

Parameter

Type

Required

Description

Example

dryRun

boolean

Only validate the request without storing the data.

false

separator

string

Column separator used when loading CSV data.

;

encoding

string

Character encoding used in the CSV data. Default is utf-8.

utf-8

Product Attributes

Field

Type

Required

Description

Example

product_id

string

Product ID

XYZ

product_name

string

Product name

Widget XYZ

product_description

string

Product description

Best performance XYZ on the market

category_id

string

Product category ID

23

average_price

number

Running average purchase price for the product

8

purchase_price

number

Default purchase price. Used if a sales transaction does not specify a purchase price.

10

sales_price

number

Default retail price including tax

20

sales_price_wo_vat

number

Default retail price excluding tax

16

vat_rate

number

VAT/tax rate

24

unit_of_measure

string

Unit of measure

PCS

product_size

string

Product size

XS

product_width

string

Product width

5"

product_height

string

Product height

10"

product_color

string

Product color

Dark Blue

product_type

string

Product type

Type A

product_brand

string

Product brand

Nike

product_season

string

Product season

Spring

model

string

Product model

XYZ B40

model_number

string

Product model number

X311

country_of_origin

string

Country of origin

Moldovia

freight

number

Freight cost

5

duty

number

Duty

0.24

supplier_id

string

Supplier ID

221

fabric

string

Product fabric

Felt

buyer

string

Buyer name

Lena Shields

ean

string

EAN code

1234567890123

parent_product_id

string

Parent product ID

XY

image_url

string

URL of an external product image

https://example.com?product=XYZ

Custom Fields

Field

Type

Description

Example

custom_field_1custom_field_50

string

Custom field

EU only

Custom Metrics

Field

Type

Description

Example

custom_metric_1

number

Custom metric 1

1

custom_metric_2

number

Custom metric 2

100

custom_metric_3

number

Custom metric 3

2.2

custom_metric_4

number

Custom metric 4

1.05

custom_metric_5

number

Custom metric 5

10000

custom_metric_6

number

Custom metric 6

150

custom_metric_7

number

Custom metric 7

1000

custom_metric_8

number

Custom metric 8

2.52

custom_metric_9

number

Custom metric 9

1.5

custom_metric_10

number

Custom metric 10

2000

Additional Fields

Field

Type

Description

Example

source_system

string

Identifier of the source system. Required when source system identifiers are mapped to master identifiers.

ABCDEF

Customers

Customers are identified consumers or businesses that buy your products or services. Details about customers are not shown in the service for data security reasons.

Upload list of customers

POST /customers

Creates or updates customer master data.

Query Parameters

Parameter

Type

Required

Description

Example

dryRun

boolean

Only validate the request without storing the data.

false

separator

string

Column separator used when loading CSV data.

;

encoding

string

Character encoding used in the CSV data. Default is utf-8.

utf-8

Customer Attributes

Field

Type

Required

Description

Example

customer_id

string

Customer ID

32

customer_name

string

Customer name

John Smith

customer_company

string

Customer company

Smith Industries

customer_email

string

Customer email

john.smith@customer.customer

customer_phone

string

Customer phone

+35811111111

customer_address

string

Customer street address

Mannerheimintie 1

customer_zipcode

string

Customer ZIP/postal code

00100

customer_city

string

Customer city

Helsinki

customer_country

string

Customer country

Finland

customer_group_id

string

Customer group ID

2

customer_group_name

string

Customer group name

B2

account_number

string

Account number

X5434

vat_number

string

VAT number

12345678

organisation_id

string

Customer account store ID

1

salesperson_id

string

ID of the salesperson responsible for this customer account

123

creation_date

string

Date when the customer was added to the system (yyyy-mm-dd)

2021-12-15

subscribe_date

string

Date when the customer subscribed to the newsletter (yyyy-mm-dd)

2022-01-15

unsubscribe_date

string

Date when the customer unsubscribed from the newsletter (yyyy-mm-dd)

2022-02-15

register_date

string

Date when the customer registered in the system (yyyy-mm-dd)

2022-01-10

unregister_date

string

Date when the customer unregistered from the system (yyyy-mm-dd)

2022-03-15

These customer/contact and lifecycle fields are documented in the supplied API material.

Deprecated Hierarchy Fields

Field

Type

Description

Example

hierarchy_level_1

string

Deprecated. Use the FlatHierarchy endpoint instead.

A1

hierarchy_level_2

string

Deprecated. Use the FlatHierarchy endpoint instead.

Family shoppers

hierarchy_level_3

string

Deprecated. Use the FlatHierarchy endpoint instead.

Families with babies

hierarchy_level_4

string

Deprecated. Use the FlatHierarchy endpoint instead.

A4

hierarchy_level_5

string

Deprecated. Use the FlatHierarchy endpoint instead.

A5

Custom Dimensions

Field

Type

Description

Example

custom_dimension_1custom_dimension_50

string

Custom customer dimension/field

Class 3

The endpoint supports 50 custom dimensions.

Custom Metrics

Field

Type

Description

Example

custom_metric_1

number

Custom metric 1

1

custom_metric_2

number

Custom metric 2

100

custom_metric_3

number

Custom metric 3

2.2

custom_metric_4

number

Custom metric 4

1.05

custom_metric_5

number

Custom metric 5

10000

Additional Fields

Field

Type

Description

Example

source_system

string

Identifier of the source system. Needed when mapping source-system identifiers to master identifiers.

ABCDEF

Customer feedback

Customer feedback endpoint can be used to upload either free form survey results or satisfaction grades.

Upload list of customer feedback

POST /customerFeedbacks

Creates or updates customer feedback entries.

Query Parameters

Parameter

Type

Required

Description

Example

dryRun

boolean

Only validate the request without storing the data.

true

separator

string

Column separator used when loading CSV data.

;

encoding

string

Character encoding used in the CSV data. Default is utf-8.

utf-8

Customer Feedback Attributes

Field

Type

Required

Description

Example

feedback_id

string

Unique ID for this feedback entry

xyz

respondent_id

string

Optional ID for the survey respondent. Can be used to group all responses from a single respondent.

1234

survey_id

string

Optional survey ID. Can be used to separate responses between different surveys.

Survey 1

question_id

string

Optional feedback question ID. Recommended when multiple separate feedback questions are used.

Q1

organisation_id

string

Identifier of the store this feedback entry refers to

ORG1

department_id

string

Optional identifier of the department this feedback entry refers to

DEP1

feedback_date

string

Date of feedback (yyyy-mm-dd)

2018-01-01

feedback_time

string

Optional time of feedback (HH:mm:ss)

15:00:00

feedback_type

string

Optional type of feedback

Store survey

main_feedback

boolean

Indicates whether this is the main/overall feedback grade. Default is true.

true

grade

number

Numerical grade for the feedback

9

grade_total

number

Optional numerical total grade calculated by the source, e.g. a Google Review score

8.5

comments

string

Optional free-form feedback

Great service today!

comments_en

string

Optional free-form feedback translated into English

Great service today!

review_url

string

URL of the external review

https://www.google.com/maps/reviews?data=XYZ

custom_field_1

string

Field that can be used for custom dimensions

XYZ

custom_field_2

string

Field that can be used for custom dimensions

XYZ

custom_field_3

string

Field that can be used for custom dimensions

XYZ

custom_field_4

string

Field that can be used for custom dimensions

XYZ

custom_field_5

string

Field that can be used for custom dimensions

XYZ

source_system

string

Identifier of the source system. Needed when mapping source-system identifiers to master identifiers.

ABCDEF

Cashier balance

Cashier balance end point can be used to upload cash register book keeping reports mainly used to verify that payments match with store sales.

Upload list of cashier balances

POST /cashierBalance

Creates or updates cashier balance data.

Query Parameters

Parameter

Type

Required

Description

Example

dryRun

boolean

Only validate the request without storing the data.

true

separator

string

Column separator used when loading CSV data.

;

encoding

string

Character encoding used in the CSV data. Default is utf-8.

utf-8

Cashier Balance Attributes

Field

Type

Required

Description

Example

organisation_id

string

Identifier of the store for this balance

ORG1

department_id

string

Optional identifier of the department for this balance

DEP1

register_id

string

Optional cash register identifier for this balance

123

batch_id

string

Optional batch or shift identifier for this balance row

1

payment_method

string

Payment method for this balance row

Cash

sales_date

string

Date of the balance (yyyy-mm-dd)

2018-01-01

sales_time

string

Optional time of the balance (HH:mm:ss)

15:00:00

batch_status

string

Optional status of this batch ID

OK

transaction_count

number

Number of transactions for this shift and payment method

9

shift_amount

number

Total amount of payments for this shift and payment method

1000

over_short

number

Difference between sales and shift amounts

100

cash_dropped

number

Amount of cash dropped from the register during this shift

0

cash_paid_out

number

Amount of cash paid out from the register during this shift

50

currency

string

Shift currency as an ISO 4217 currency code. Required if multiple currencies are used.

EUR

source_system

string

Identifier of the source system. Needed when mapping source-system identifiers to master identifiers.

ABCDEF

Organisations

Organisations are the sales locations. They can be physical stores, web commerce sites, warehouses or personal payment terminals.

Upload list of organisation units

POST /organisations

Creates or updates organisation/store master data.

Query Parameters

Parameter

Type

Required

Description

Example

dryRun

boolean

Only validate the request without storing the data.

false

separator

string

Column separator used when loading CSV data.

;

encoding

string

Character encoding used in the CSV data. Default is utf-8.

utf-8

Organisation Attributes

Field

Type

Required

Description

Example

organisation_id

string

Organisation / Store ID

540

organisation_name

string

Organisation name

Web Sales

street_address

string

Street address

Mannerheimintie 1

city

string

City

Helsinki

post_code

string

Postal code

00100

state

string

State

Southern Finland

country

string

Country

Finland

area

string

Sales area

South

latitude

number

Latitude

60.1840138

longitude

number

Longitude

24.9600463

channel

string

Sales channel

Concession

organisation_type

string

Organisation type, e.g. Outlet / Brand / Essential

Outlet

organisation_group

string

Organisation group

A

floor_area

number

Store floor area, e.g. in m²

123.5

no_customer_seats

number

Number of customer seats in the store

150

google_location_url

string

Google review location URL

https://www.google.com/maps/reviews?data=XYZ

image_url

string

URL of an external store image

http://example.com?product=XYZ

store_status

enum

Store status

closed

custom_dimension1

string

Custom field 1

Class 3

custom_dimension2

string

Custom field 2

Class 3

custom_dimension3

string

Custom field 3

Class 3

custom_dimension4

string

Custom field 4

Class 3

custom_dimension5

string

Custom field 5

Class 3

source_system

string

Identifier of the source system. Needed when mapping source-system identifiers to master identifiers.

ABCDEF

Departments

Departments are sections of sales locations.

Upload list of departments

POST /departments

Creates or updates department master data.

Query Parameters

Parameter

Type

Required

Description

Example

dryRun

boolean

Only validate the request without storing the data.

false

separator

string

Column separator used when loading CSV data.

;

encoding

string

Character encoding used in the CSV data. Default is utf-8.

utf-8

Department Attributes

Field

Type

Required

Description

Example

department_id

string

Department ID

123

name

string

Human-readable name for the department

Women's clothing

floor_area

number

Floor area of the department in square meters

20

organisation_id

string

ID of the attached organisation

234

no_customer_seats

number

Number of customer seats available

50

custom_dimension1

string

Custom field 1

Class 3

custom_dimension2

string

Custom field 2

New

custom_dimension3

string

Custom field 3

Old

custom_dimension4

string

Custom field 4

New

custom_dimension5

string

Custom field 5

New

source_system

string

Identifier of the source system. Needed when mapping source-system identifiers to master identifiers.

ABCDEF

Sales persons

This is the sales person associated with the receipt.

Upload list of sales persons

POST /salesPersons

Creates or updates salesperson master data.

Query Parameters

Parameter

Type

Required

Description

Example

dryRun

boolean

Only validate the request without storing the data.

false

separator

string

Column separator used when loading CSV data.

;

encoding

string

Character encoding used in the CSV data. Default is utf-8.

utf-8

Salesperson Attributes

Field

Type

Required

Description

Example

salesperson_id

string

Sales person ID

5402101

salesperson_name

string

Sales person name

John Smith

salesperson_email

string

Sales person email

john.smith@store.store

salesperson_phone

string

Sales person phone number

+35811111111

employee_id

string

Employee ID

353

employment_start

string

Employment start date

2020-01-01

employment_end

string

Employment end date

2020-05-31

custom_field_1

string

Custom field 1

Project worker

custom_field_2

string

Custom field 2

Project worker

custom_field_3

string

Custom field 3

Project worker

custom_field_4

string

Custom field 4

Project worker

custom_field_5

string

Custom field 5

Project worker

custom_metric_1

number

Custom metric 1

1

custom_metric_2

number

Custom metric 2

100

custom_metric_3

number

Custom metric 3

2.2

custom_metric_4

number

Custom metric 4

1.05

custom_metric_5

number

Custom metric 5

10000

source_system

string

Identifier of the source system. Needed when mapping source-system identifiers to master identifiers.

ABCDEF

Cash registers

This is the physical cash register device associated with the receipt.

Upload list of cash registers

POST /cashRegisters

Creates or updates cash register master data.

Query Parameters

Parameter

Type

Required

Description

Example

dryRun

boolean

Only validate the request without storing the data.

false

separator

string

Column separator used when loading CSV data.

;

encoding

string

Character encoding used in the CSV data. Default is utf-8.

utf-8

Cash Register Attributes

Field

Type

Required

Description

Example

register_id

string

Register ID

123-1

register_name

string

Register name

Kiosk 1

organisation_id

string

Organisation / store this register belongs to

540

register_type

string

Register type

Kiosk

register_group

string

Register group

Self service

custom_dimension1

string

Custom field 1

Class 3

custom_dimension2

string

Custom field 2

Class 3

custom_dimension3

string

Custom field 3

Class 3

custom_dimension4

string

Custom field 4

Class 3

custom_dimension5

string

Custom field 5

Class 3

source_system

string

Identifier of the source system. Needed when mapping source-system identifiers to master identifiers.

ABCDEF

Store open hours

Open hours end point can be used to upload store open hours for all weekdays and for different seasons. Helps forecasting accuracy.

Upload list of open hours

POST /openHours

Creates or updates opening hours for organisations/stores.

Query Parameters

Parameter

Type

Required

Description

Example

dryRun

boolean

Only validate the request without storing the data.

true

separator

string

Column separator used when loading CSV data.

;

encoding

string

Character encoding used in the CSV data. Default is utf-8.

utf-8

Opening Hours Attributes

Field

Type

Required

Description

Example

organisation_id

string

Organisation / Store ID. If omitted, the entry is treated as the company default opening hours.

540

start_date

string

Start date of the opening-hours season (yyyy-mm-dd)

2024-01-01

end_date

string

End date of the opening-hours season (yyyy-mm-dd)

2025-01-01

weekday

number

Weekday as an integer (1 = Monday, 7 = Sunday)

1

open_start

string

Opening time (HH:mm:ss)

08:00:00

open_end

string

Closing time (HH:mm:ss)

18:00:00

special_period

boolean

Indicates whether this is a special opening period

false

source_system

string

Identifier of the source system. Needed when mapping source-system identifiers to master identifiers.

ABCDEF

Counters

Counters are visitor counting devices.

Upload list of counters

POST /counters

Creates or updates counter/camera master data.

Query Parameters

Parameter

Type

Required

Description

Example

dryRun

boolean

Only validate the request without storing the data.

false

separator

string

Column separator used when loading CSV data.

;

encoding

string

Character encoding used in the CSV data. Default is utf-8.

utf-8

Counter Attributes

Field

Type

Required

Description

Example

counter_id

string

Counter ID

5

counter_name

string

Counter name

Front door 1

folder_id

string

Name of identification folder

front_door_1

serial

string

Camera serial number

ABCDE12345

registration_code

string

Camera registration code

A1B2C3D4E5

disabled

boolean

true if the counter is disabled and set not to send data

false

is_queue

boolean

true if the counter is a queue counter

false

on_store_perimeter

boolean

true if this is a store perimeter camera

true

organisation_id

string

ID of the store/organisation where the camera is located

my_organisation_id

department_id

string

ID of the department where the camera is located

my_department_id

department_reversed_id

string

Secondary department ID where in and out counts are reversed

reverse_id

source_system

string

Identifier of the source system. Needed when mapping source-system identifiers to master identifiers.

ABCDEF

Accounts

This is the account associated with accounting data.

Upload list of bookkeeping accounts

POST /accounts

Creates or updates account master data.

Query Parameters

Parameter

Type

Required

Description

Example

dryRun

boolean

Only validate the request without storing the data.

false

separator

string

Column separator used when loading CSV data.

;

encoding

string

Character encoding used in the CSV data. Default is utf-8.

utf-8

Account Attributes

Field

Type

Required

Description

Example

account_id

string

Account ID

1150

account_name

string

Account name

Employee Salaries

account_type

string

Account type

Salaries

custom_field_1

string

Custom field 1

EU only

custom_field_2

string

Custom field 2

EU only

custom_field_3

string

Custom field 3

EU only

custom_field_4

string

Custom field 4

EU only

custom_field_5

string

Custom field 5

EU only

source_system

string

Identifier of the source system. Needed when mapping source-system identifiers to master identifiers.

ABCDEF

Events

This is the event associated with booking data.

Upload list of booking events

POST /events

Creates or updates event master data.

Query Parameters

Parameter

Type

Required

Description

Example

dryRun

boolean

Only validate the request without storing the data.

false

separator

string

Column separator used when loading CSV data.

;

encoding

string

Character encoding used in the CSV data. Default is utf-8.

utf-8

Event Attributes

Field

Type

Required

Description

Example

event_id

string

Event ID

1150

event_name

string

Event name

Rock around the clock

event_type

string

Event type

Concert

venue_name

string

Venue name

Arena 1

custom_field_1

string

Custom field 1

EU only

custom_field_2

string

Custom field 2

EU only

custom_field_3

string

Custom field 3

EU only

custom_field_4

string

Custom field 4

EU only

custom_field_5

string

Custom field 5

EU only

source_system

string

Identifier of the source system. Needed when mapping source-system identifiers to master identifiers.

ABCDEF

Calendar

Custom calendar attributes can be used to define custom retail calendar like 4-4-5 etc. with year starting and ending at desirable dates. Supported attributes include year, period (month), season and week number.

Upload custom calendar attributes

POST /calendar

Creates or updates calendar data, including reporting periods, weeks, seasons, comparable dates, and bank holidays.

Query Parameters

Parameter

Type

Required

Description

Example

dryRun

boolean

Only validate the request without storing the data.

false

separator

string

Column separator used when loading CSV data.

;

encoding

string

Character encoding used in the CSV data. Default is utf-8.

utf-8

Calendar Attributes

Field

Type

Required

Description

Example

calendar_date

string

Calendar date (yyyy-mm-dd)

2016-01-01

calendar_year

string

Calendar year

2016/2017

period_name

string

Period name

January

period_number

number

Period number

1

week_number

number

Week number

1

season

string

Season name

Spring 2016

season_label

string

Season identifier

Spring

lfl_date

string

Comparable sales date one year ago (yyyy-mm-dd)

2014-12-30

bank_holiday_name

string

Name of the bank holiday, if any

New year Day

source_system

string

Identifier of the source system. Needed when mapping source-system identifiers to master identifiers.

ABCDEF

Campaigns

A campaign is a sales effort which can be measured for progress and success. Campaigns can be linked to sales transactions either directly or via Campaign Products.

Upload list of campaigns

POST /campaigns

Creates or updates campaign master data.

Query Parameters

Parameter

Type

Required

Description

Example

dryRun

boolean

Only validate the request without storing the data.

false

separator

string

Column separator used when loading CSV data.

;

encoding

string

Character encoding used in the CSV data. Default is utf-8.

utf-8

Campaign Attributes

Field

Type

Required

Description

Example

campaign_id

string

Campaign ID

6344

campaign_name

string

Campaign name

February 2016

campaign_type

string

Campaign type

Web

start_date

string

Campaign start date (yyyy-mm-dd)

2016-02-01

end_date

string

Campaign end date (yyyy-mm-dd)

2016-02-29

organisation_id

string

Organisation ID

540

custom_field_1

string

Custom field 1

New

custom_field_2

string

Custom field 2

New

custom_field_3

string

Custom field 3

New

custom_field_4

string

Custom field 4

New

custom_field_5

string

Custom field 5

New

source_system

string

Identifier of the source system. Needed when mapping source-system identifiers to master identifiers.

ABCDEF

Campaign products

Campaign products associates products with specific campaigns. This allows creation of campaigns retroactively, but will slow down data loading as each sales row needs to be matched against existing campaigns. Campaign products should only be used if it is not possible to add campaign information directly to sales transactions.

Upload list of campaign products

POST /campaignProducts

Creates or updates associations between campaigns and products.

Query Parameters

Parameter

Type

Required

Description

Example

dryRun

boolean

Only validate the request without storing the data.

false

separator

string

Column separator used when loading CSV data.

;

encoding

string

Character encoding used in the CSV data. Default is utf-8.

utf-8

Campaign Product Attributes

Field

Type

Required

Description

Example

campaign_id

string

Campaign ID

6453

category_id

string

Associated category ID

My category ID

product_id

string

Associated product ID

My product ID

source_system

string

Identifier of the source system. Needed when mapping source-system identifiers to master identifiers.

ABCDEF

Campaign Sales

Campaign sales provides a way to link multiple campaigns to a single sales, sales order or sales offer line. Ordinarily only one campaign can be linked directly but this allows support for any number of campaigns per line.

Upload list of campaign sales

POST /salesCampaigns

Creates or updates campaign associations for sales transaction line items.

Query Parameters

Parameter

Type

Required

Description

Example

dryRun

boolean

Only validate the request without storing the data.

false

separator

string

Column separator used when loading CSV data.

;

encoding

string

Character encoding used in the CSV data. Default is utf-8.

utf-8

Sales Campaign Attributes

Field

Type

Required

Description

Example

transaction_id

string

ID of the transaction this campaign is associated with

T1234

line_item_id

string

Line item ID within the transaction this campaign is associated with

1

campaign_id

string

Campaign ID

6344

campaign_type

string

Type/origin of the campaign record. Supported values: sales, salesorder, salesoffer

sales

source_system

string

Identifier of the source system. Needed when mapping source-system identifiers to master identifiers.

ABCDEF

Currency rates

Currency rates allow you to define internal exchange rates between different currencies in use.

Upload list of currency rates

POST /currencyRates

Creates or updates currency exchange rates.

Query Parameters

Parameter

Type

Required

Description

Example

dryRun

boolean

Only validate the request without storing the data.

false

separator

string

Column separator used when loading CSV data.

;

encoding

string

Character encoding used in the CSV data. Default is utf-8.

utf-8

Currency Rate Attributes

Field

Type

Required

Description

Example

source_currency

string

Source currency as an ISO 4217 currency code

EUR

target_currency

string

Target currency as an ISO 4217 currency code

GBP

valid_from

string

First day when the exchange rate is valid

2017-01-01

valid_to

string

Last day when the exchange rate is valid

2017-12-31

rate

number

Exchange rate from the source currency to the target currency

0.89

source_system

string

Identifier of the source system. Needed when mapping source-system identifiers to master identifiers.

ABCDEF

Work shifts

Allows you to upload planned of punched work shifts. This is interesting when combined with number of visitors or receipts - are the sales people working during the busiest times?If you are also recording breaks, you should send multiple entries per shift and just have suitable absence codes in place. We'll combine the shifts based on shift ids.

Upload list of work shifts

POST /workShifts

Creates or updates employee work shift data.

Query Parameters

Parameter

Type

Required

Description

Example

dryRun

boolean

Only validate the request without storing the data.

false

separator

string

Column separator used when loading CSV data.

;

encoding

string

Character encoding used in the CSV data. Default is utf-8.

utf-8

Work Shift Attributes

Field

Type

Required

Description

Example

shift_id

string

Unique identifier for the work shift

123

organisation_id

string

Organisation unit where the shift takes place

234

salesperson_id

string

Conditional

Identifier of the salesperson / employee working. Required for punched shifts.

345

department_id

string

Store department ID

5401

scheduled

boolean

Whether this is a scheduled or punched shift. Default is false.

false

productive

boolean

Whether this is productive or administrative work. Default is true.

true

active_work_time

boolean

Whether this shift is calculated as active work time. Default is true.

true

start_date

string

Shift start date (yyyy-mm-dd)

2016-01-01

start_time

string

Shift start time (HH:mm:ss)

15:00:00

duration

number

See note

Duration of the shift in hours

8.15

end_date

string

See note

Shift end date (yyyy-mm-dd)

2016-01-01

end_time

string

See note

Shift end time (HH:mm:ss)

20:00:00

shift_type

string

Type of shift. Free-form value available as a dimension in the portal.

Chef

salary_type

string

Type of compensation for the shift

Evening compensation

staff_cost

number

Cost associated with this shift

500

breaks_duration

number

Total hours of breaks during this shift

0.5

breaks_cost

number

Total salary cost associated with paid breaks during this shift

40

overtime_duration

number

Total overtime hours during this shift

2

overtime_cost

number

Total salary cost associated with overtime hours

120

absence_code

string

Absence code if this entry describes an absence

BREAK

currency

string

Currency as an ISO 4217 currency code. Required if multiple currencies are used.

EUR

custom_field_1

string

Field that can be used for custom dimensions

XYZ

custom_field_2

string

Field that can be used for custom dimensions

XYZ

custom_field_3

string

Field that can be used for custom dimensions

XYZ

custom_field_4

string

Field that can be used for custom dimensions

XYZ

custom_field_5

string

Field that can be used for custom dimensions

XYZ

custom_metric_1

number

Custom metric 1

1

custom_metric_2

number

Custom metric 2

100

custom_metric_3

number

Custom metric 3

2.2

custom_metric_4

number

Custom metric 4

1.05

custom_metric_5

number

Custom metric 5

10000

source_system

string

Identifier of the source system. Needed when mapping source-system identifiers to master identifiers.

ABCDEF

Employee hour entries

Allows you to upload worked hours for specific time. This is interesting when combined with number of visitors or receipts - are the sales people working during the busiest times?This endpoint is intended to be used when you have aggregate level information per minute/hour/day. If your data is consists of workshifts, you should use Workshifts endpoint.

Upload list of employee hour entries

POST /employeeHours

Creates or updates employee hours data.

Query Parameters

Parameter

Type

Required

Description

Example

dryRun

boolean

Only validate the request without storing the data.

false

separator

string

Column separator used when loading CSV data.

;

encoding

string

Character encoding used in the CSV data. Default is utf-8.

utf-8

Employee Hours Attributes

Field

Type

Required

Description

Example

organisation_id

string

Organisation / Store ID

540

department_id

string

Store department ID

54021

salesperson_id

string

Sales person ID

5402101

employee_type

string

Employee type

Permie

employeehours_id

string

Optional identifier for the entry

4244

absence_code

string

Absence code if this entry describes an absence

BREAK

date

string

Date of entry (yyyy-mm-dd)

2016-01-01

time

string

Time of entry (HH:mm:ss)

15:00:00

scheduled

boolean

Whether this is a scheduled or punched shift. Default is false.

false

productive

boolean

Whether this is productive or administrative work. Default is true.

true

hours

number

Number of hours to record for this specific time

8

staff_cost

number

Salary cost associated with these hours

500

breaks

number

Total hours of breaks

0.5

breaks_cost

number

Total salary cost associated with paid breaks

40

currency

string

Currency as an ISO 4217 currency code. Required if multiple currencies are used.

EUR

custom_field_1

string

Field that can be used for custom dimensions

XYZ

custom_field_2

string

Field that can be used for custom dimensions

XYZ

custom_field_3

string

Field that can be used for custom dimensions

XYZ

custom_field_4

string

Field that can be used for custom dimensions

XYZ

custom_field_5

string

Field that can be used for custom dimensions

XYZ

source_system

string

Identifier of the source system. Needed when mapping source-system identifiers to master identifiers.

ABCDEF

Hourly staff costs

Allows you to upload store, department or sales person level hourly salaries for specific time period. This data is used as fallback method when provided employee hour or work shift data does not have costs included.

Upload list of staff cost entries

POST /staffCosts

Creates or updates hourly staff cost data.

Query Parameters

Parameter

Type

Required

Description

Example

dryRun

boolean

Only validate the request without storing the data.

false

separator

string

Column separator used when loading CSV data.

;

encoding

string

Character encoding used in the CSV data. Default is utf-8.

utf-8

Staff Cost Attributes

Field

Type

Required

Description

Example

organisation_id

string

Organisation / Store ID

540

department_id

string

Store department ID

54021

salesperson_id

string

Sales person ID

5402101

start_date

string

Start date of the entry (yyyy-mm-dd)

2024-01-01

staff_cost

number

Hourly salary cost

15

currency

string

Currency as an ISO 4217 currency code. Required if multiple currencies are used.

EUR

source_system

string

Identifier of the source system. Needed when mapping source-system identifiers to master identifiers.

ABCDEF

Inventory snapshots

Inventory snapshots are used to provide product inventory saldo at specific point of time.

Upload list of inventory snapshots

POST /inventorySnapshots

Creates or updates inventory snapshot data.

Query Parameters

Parameter

Type

Required

Description

Example

dryRun

boolean

Only validate the request without storing the data.

false

separator

string

Column separator used when loading CSV data.

;

encoding

string

Character encoding used in the CSV data. Default is utf-8.

utf-8

Inventory Snapshot Attributes

Field

Type

Required

Description

Example

organisation_id

string

Organisation / Store ID

540

snapshot_date

string

Date of the inventory snapshot (yyyy-mm-dd)

2016-01-01

snapshot_time

string

Time of the inventory snapshot (HH:mm:ss). Needed if intraday inventory balances are tracked.

10:00:00

product_id

string

Product ID

My product ID

supplier_id

string

Supplier ID

221

quantity

number

On-hand quantity in inventory

100

available_quantity

number

Available quantity in inventory after pending/reserved orders

90

reorder_point

number

Quantity threshold at which more of this item should be ordered

5

max_reorder_quantity

number

Maximum quantity threshold for this item after reordering

10

unit_purchase_price

number

Unit purchase price

12.4

unit_purchase_price_wo_vat

number

Unit purchase price without tax

10

unit_sales_price

number

Unit sales price

22.4

unit_sales_price_wo_vat

number

Unit sales price without tax

20

currency

string

Currency for the purchase price as an ISO 4217 currency code. Required if multiple currencies are used.

EUR

source_system

string

Identifier of the source system. Needed when mapping source-system identifiers to master identifiers.

ABCDEF

Inventory transactions

Inventory transactions provide information about balance changes in inventories. They allow you to send information when new items have been purchased for inventory, or when existing products have been removed from inventory as waste.Inventory transactions are not used to update inventory saldo values. For that you should use Inventory snapshots.

Upload list of inventory transactions

POST /inventoryTransactions

Creates or updates inventory movement transactions.

Query Parameters

Parameter

Type

Required

Description

Example

dryRun

boolean

Only validate the request without storing the data.

false

separator

string

Column separator used when loading CSV data.

;

encoding

string

Character encoding used in the CSV data. Default is utf-8.

utf-8

Inventory Transaction Attributes

Field

Type

Required

Description

Example

organisation_id

string

Organisation / Store ID

540

department_id

string

Department ID

54011

salesperson_id

string

Sales person ID

5401

operator_id

string

Operator ID

5402

movement_date

string

Date of the transaction (yyyy-mm-dd)

2016-02-01

movement_time

string

Time of the transaction (HH:mm:ss)

10:00:00

delivered_date

string

Date of transaction completion (yyyy-mm-dd)

2016-02-02

delivered_time

string

Time of transaction completion (HH:mm:ss)

15:00:00

product_id

string

Product ID

123

supplier_id

string

Supplier ID

221

parent_product_id

string

Parent product ID

123

quantity

number

Quantity moved from/to inventory

100

delivered_quantity

number

Final quantity moved from/to inventory after completion

90

expected_quantity

number

Quantity expected in inventory, e.g. for stock takes

110

movement_type

enum

Inventory movement type

waste

movement_status

number

Movement status: 1 = Open, 2 = Complete, 3 = Complete with variances, 4 = Cancelled

2

movement_batch_id

string

Optional identifier for the batch this movement row is part of

june-stock-take

movement_batch_line_id

string

Optional line ID within the batch this movement row is part of

1

unit_purchase_price

number

Unit purchase price

12.4

unit_purchase_price_wo_vat

number

Unit purchase price without tax

10

unit_retail_price

number

Unit retail (sales) price

12.4

unit_retail_price_wo_vat

number

Unit retail (sales) price without tax

10

reason_code

string

Optional reason code or description for the transaction

Theft

target_organisation_id

string

Conditional

Organisation / Store ID for the target of an inventory transfer. Mandatory for transfer movements.

510

currency

string

Currency for the purchase price as an ISO 4217 currency code. Required if multiple currencies are used.

EUR

purchase_order_id

string

Purchase order ID from which this purchase movement originates

1234

purchase_order_line_id

string

Purchase order line item ID from which this movement line originates

1

custom_field_1

string

Custom field 1

EU only

custom_field_2

string

Custom field 2

EU only

custom_field_3

string

Custom field 3

EU only

custom_field_4

string

Custom field 4

EU only

custom_field_5

string

Custom field 5

EU only

custom_field_6

string

Custom field 6

EU only

custom_field_7

string

Custom field 7

EU only

custom_field_8

string

Custom field 8

EU only

custom_field_9

string

Custom field 9

EU only

custom_field_10

string

Custom field 10

EU only

custom_metric_1

number

Custom metric 1

1

custom_metric_2

number

Custom metric 2

100

custom_metric_3

number

Custom metric 3

2.2

custom_metric_4

number

Custom metric 4

1.05

custom_metric_5

number

Custom metric 5

10000

source_system

string

Identifier of the source system. Needed when mapping source-system identifiers to master identifiers.

ABCDEF

Capacity

Capacities are used to provide details about available capacity for various resources at specific point of time. These could be eg. hotel rooms or event tickets.

Upload list of capacities

POST /capacity

Creates or updates capacity data for events, tickets, or rooms.

Query Parameters

Parameter

Type

Required

Description

Example

dryRun

boolean

Only validate the request without storing the data.

false

separator

string

Column separator used when loading CSV data.

;

encoding

string

Character encoding used in the CSV data. Default is utf-8.

utf-8

Capacity Attributes

Field

Type

Required

Description

Example

organisation_id

string

Organisation ID

540

product_id

string

Product ID

123

event_id

string

Event ID

221

capacity_date

string

Date of capacity (yyyy-mm-dd)

2020-02-01

capacity_time

string

Time of capacity (HH:mm:ss)

10:00:00

capacity_type

string

Capacity type. Must be event, ticket, or room.

event

max_capacity

number

Maximum available capacity for this item

100

source_system

string

Identifier of the source system. Needed when mapping source-system identifiers to master identifiers.

ABCDEF

Flat hierarchies

This end point provides way to upload hierarchy information for different entities like products and organisations in "flat"-form. This means that for each entity its full path in hierarchy is send, and hierarchy tree is build by us based on that.

Upload list of flat hierarchies

POST /flatHierarchies

Creates or updates flat hierarchy data with up to 10 hierarchy levels.

Query Parameters

Parameter

Type

Required

Description

Example

dryRun

boolean

Only validate the request without storing the data.

false

separator

string

Column separator used when loading CSV data.

;

encoding

string

Character encoding used in the CSV data. Default is utf-8.

utf-8

Flat Hierarchy Attributes

Field

Type

Required

Description

Example

hierarchy_key

enum

Hierarchy key

entity_id

string

Identifier for the lowest-level entity in the hierarchy

XYZ

level1

string

Name of the root category level

Clothing

level2

string

Name of category level 2

Children's clothing

level3

string

Name of category level 3

Children's outdoor clothing

level4

string

Name of category level 4

Children's outdoor headwear

level5

string

Name of category level 5

Children's caps

level6

string

Name of category level 6

Children's small caps

level7

string

Name of category level 7

Children's themed caps

level8

string

Name of category level 8

Children's disney caps

level9

string

Name of category level 9

Children's mickey caps

level10

string

Name of category level 10

Children's ...

source_system

string

Identifier of the source system. Needed when mapping source-system identifiers to master identifiers.

ABCDEF

Product hierarchies

Product hierarchies provide a way to assign products into categories and subcategories.

Upload list of product categories

POST /productHierarchies

Creates or updates product category hierarchy data.

Query Parameters

Parameter

Type

Required

Description

Example

dryRun

boolean

Only validate the request without storing the data.

false

separator

string

Column separator used when loading CSV data.

;

encoding

string

Character encoding used in the CSV data. Default is utf-8.

utf-8

Product Hierarchy Attributes

Field

Type

Required

Description

Example

category_id

string

Category ID

23

category_name

string

Category name

Men's clothing

parent_id

string

ID of the parent category. Use 0 for a top-level category.

0

source_system

string

Identifier of the source system. Needed when mapping source-system identifiers to master identifiers.

ABCDEF

Rebate codes

The rebate codes can be used to describe reason for giving rebate on sales transactions.

Upload list of rebate codes

POST /rebateCodes

Creates or updates rebate code master data.

Query Parameters

Parameter

Type

Required

Description

Example

dryRun

boolean

Only validate the request without storing the data.

false

separator

string

Column separator used when loading CSV data.

;

encoding

string

Character encoding used in the CSV data. Default is utf-8.

utf-8

Rebate Code Attributes

Field

Type

Required

Description

Example

rebate_code_id

string

Rebate code ID

3313V

rebate_code_name

string

Description of the rebate reason

Model product

source_system

string

Identifier of the source system. Needed when mapping source-system identifiers to master identifiers.

ABCDEF

Payment types

Payment types provide attributes for payment methods used in sales transactions and/or payments.

Upload list of payment types

POST /paymentTypes

Creates or updates payment type data.

Query Parameters

Parameter

Type

Required

Description

Example

dryRun

boolean

Only validate the request without storing the data.

false

separator

string

Column separator used when loading CSV data.

;

encoding

string

Character encoding used in the CSV data. Default is utf-8.

utf-8

Payment Type Attributes

Field

Type

Required

Description

Example

payment_type_id

string

Payment type ID

1

payment_type

string

Payment type name

credit card

payment_group

string

Payment group

Store

custom_field_1

string

Custom field 1

App

custom_field_2

string

Custom field 2

App

custom_field_3

string

Custom field 3

App

custom_field_4

string

Custom field 4

App

custom_field_5

string

Custom field 5

App

source_system

string

Identifier of the source system. Needed when mapping source-system identifiers to master identifiers.

ABCDEF

Purchase orders

This end point can be used to record purchase orders into Zoined service.

Upload list of purchase orders

POST /purchaseOrders

Creates or updates purchase order data.

Query Parameters

Parameter

Type

Required

Description

Example

dryRun

boolean

Only validate the request without storing the data.

false

separator

string

Column separator used when loading CSV data.

;

encoding

string

Character encoding used in the CSV data. Default is utf-8.

utf-8

Purchase Order Attributes

Field

Type

Required

Description

Example

transaction_id

string

Unique ID for the transaction

er/232/f31

line_item_id

string

Secondary transaction identifier

1

product_id

string

Product ID

XYZ

organisation_id

string

Organisation unit ID

540

department_id

string

Department ID

54011

purchaser_id

string

Purchaser ID

5400

supplier_id

string

Supplier ID

221

parent_product_id

string

Parent product ID

123

order_date

string

Order date (yyyy-mm-dd)

2016-01-01

order_time

string

Order time (HH:mm:ss)

15:00:00

ordered_quantity

number

Ordered quantity

2

delivery_date

string

Delivery date (yyyy-mm-dd)

2016-01-01

delivery_time

string

Delivery time (HH:mm:ss)

15:00:00

delivered_quantity

number

Quantity delivered

2

arrival_date

string

Arrival date (yyyy-mm-dd)

2016-01-03

arrival_time

string

Arrival time (HH:mm:ss)

15:00:00

order_status

number

Order status: 1 = Open, 2 = Reserved, 3 = Invoiced, 4 = Cancelled

1

order_type

string

Order type

Express

purchase_price

number

Total purchase price including tax

5

purchase_price_wo_vat

number

Total purchase price without tax

4

rebate

number

Amount of rebate given including tax

0

rebate_wo_vat

number

Amount of rebate given without tax

0

retail_value

number

Total retail (sales) value including tax

10

retail_value_wo_vat

number

Total retail (sales) value without tax

8

purchase_currency

string

Purchase currency as an ISO 4217 currency code. Required if multiple currencies are used.

EUR

sales_unit

string

Sales unit

KPL

cancelled

boolean

Indicates whether the transaction is cancelled: true = cancelled, false = not cancelled

false

cancel_id

string

Transaction ID of the cancelled receipt

er/232/f2

gross_weight

number

Gross weight of ordered products

0

custom_field_1

string

Custom field 1

EU only

custom_field_2

string

Custom field 2

EU only

custom_field_3

string

Custom field 3

EU only

custom_field_4

string

Custom field 4

EU only

custom_field_5

string

Custom field 5

EU only

custom_field_6

string

Custom field 6

EU only

custom_field_7

string

Custom field 7

EU only

custom_field_8

string

Custom field 8

EU only

custom_field_9

string

Custom field 9

EU only

custom_field_10

string

Custom field 10

EU only

custom_metric_1

number

Custom metric 1

1

custom_metric_2

number

Custom metric 2

100

custom_metric_3

number

Custom metric 3

2.2

custom_metric_4

number

Custom metric 4

1.05

custom_metric_5

number

Custom metric 5

10000

source_system

string

Identifier of the source system. Needed when mapping source-system identifiers to master identifiers.

ABCDEF

Sales offers

This end point can be used to record sales offers into Zoined service. Offers can be linked to sales orders.

Upload list of sales offers

POST /salesOffers

Creates or updates sales offer data.

Query Parameters

Parameter

Type

Required

Description

Example

dryRun

boolean

Only validate the request without storing the data.

false

separator

string

Column separator used when loading CSV data.

;

encoding

string

Character encoding used in the CSV data. Default is utf-8.

utf-8

Sales Offer Attributes

Field

Type

Required

Description

Example

transaction_id

string

Unique ID for the transaction

er/232/f31

line_item_id

string

Secondary transaction identifier

1

customer_id

string

Customer ID for identified customer

32

product_id

string

Product ID

XYZ

product_quantity

number

Offered quantity

2

product_unit_price

number

Unit price for a single product

10

sales_value

number

Total sales amount including tax

20

sales_value_wo_vat

number

Total sales amount without tax

20

rebate

number

Amount of rebate given including tax

0

rebate_wo_vat

number

Amount of rebate given without tax

0

sales_currency

string

Sales currency as an ISO 4217 currency code. Required if multiple currencies are used.

EUR

payment_method

string

Payment method

Invoice 30

supplier_id

string

Supplier ID

221

parent_product_id

string

Parent product ID

123

purchase_price

number

Total purchase price including tax

5

purchase_price_wo_vat

number

Total purchase price without tax

5

purchase_currency

string

Purchase currency as an ISO 4217 currency code. Required if multiple currencies are used.

EUR

organisation_id

string

Organisation unit ID

540

salesperson_id

string

Sales person ID

5402101

offer_date

string

Offer date (yyyy-mm-dd)

2016-01-01

offer_time

string

Offer time (HH:mm:ss)

15:00:00

valid_date

string

Offer validity date (yyyy-mm-dd)

2016-01-01

valid_time

string

Offer validity time (HH:mm:ss)

15:00:00

offer_status

number

Offer status: 1 = Open, 2 = Reserved, 3 = Invoiced, 4 = Cancelled

1

offer_type

string

Offer type

wholesale

custom_field_1

string

Custom field 1

EU only

custom_field_2

string

Custom field 2

EU only

custom_field_3

string

Custom field 3

EU only

custom_field_4

string

Custom field 4

EU only

custom_field_5

string

Custom field 5

EU only

custom_field_6

string

Custom field 6

EU only

custom_field_7

string

Custom field 7

EU only

custom_field_8

string

Custom field 8

EU only

custom_field_9

string

Custom field 9

EU only

custom_field_10

string

Custom field 10

EU only

custom_metric_1

number

Custom metric 1

1

custom_metric_2

number

Custom metric 2

100

custom_metric_3

number

Custom metric 3

2.2

custom_metric_4

number

Custom metric 4

1.05

custom_metric_5

number

Custom metric 5

10000

source_system

string

Identifier of the source system. Needed when mapping source-system identifiers to master identifiers.

ABCDEF

Sales orders

This end point can be used to record sales orders into Zoined service.

Upload list of sales orders

POST /salesOrders

Creates or updates sales order data.

Query Parameters

Parameter

Type

Required

Description

Example

dryRun

boolean

Only validate the request without storing the data.

false

separator

string

Column separator used when loading CSV data.

;

encoding

string

Character encoding used in the CSV data. Default is utf-8.

utf-8

Sales Order Attributes

Field

Type

Required

Description

Example

transaction_id

string

Unique ID for the transaction

er/232/f31

line_item_id

string

Secondary transaction identifier

1

customer_id

string

Customer ID for identified customer

32

delivery_customer_id

string

Delivery customer ID for identified customer

32

product_id

string

Product ID

XYZ

product_quantity

number

Ordered quantity

2

delivered_quantity

number

Delivered quantity

1

planned_quantity

number

Planned quantity

2

product_unit_price

number

Unit price for a single product

10

sales_value

number

Total sales amount including tax

20

sales_value_wo_vat

number

Total sales amount without tax

20

rebate

number

Amount of rebate given including tax

0

rebate_wo_vat

number

Amount of rebate given without tax

0

rebate_code_id

string

Rebate code ID

3313V

sales_currency

string

Sales currency as an ISO 4217 currency code. Required if multiple currencies are used.

EUR

payment_method

string

Payment method

Invoice 30

tender_amount

number

Amount paid using the specified payment method

20

deposit_amount

number

Amount of deposit paid for this order item

10

supplier_id

string

Supplier ID

221

parent_product_id

string

Parent product ID

123

purchase_price

number

Total purchase price including tax

5

purchase_price_wo_vat

number

Total purchase price without tax

5

purchase_currency

string

Purchase currency as an ISO 4217 currency code. Required if multiple currencies are used.

EUR

organisation_id

string

Organisation unit ID

540

department_id

string

Department ID

54011

salesperson_id

string

Sales person ID

5402101

cancel_id

string

Transaction ID of the cancelled receipt

er/232/f2

delivery_date

string

Delivery date (yyyy-mm-dd)

2016-01-01

delivery_time

string

Delivery time (HH:mm:ss)

15:00:00

order_date

string

Order date (yyyy-mm-dd)

2016-01-01

order_time

string

Order time (HH:mm:ss)

15:00:00

invoice_date

string

Invoice date (yyyy-mm-dd)

2016-01-01

invoice_time

string

Invoice time (HH:mm:ss)

15:00:00

arrival_date

string

Arrival date (yyyy-mm-dd)

2016-01-03

arrival_time

string

Arrival time (HH:mm:ss)

15:00:00

order_status

number

Order status: 1 = Open, 2 = Reserved, 3 = Invoiced, 4 = Cancelled

1

order_type

string

Order type

Wholesale

customer_order_number

string

Customer's internal order ID

1234-5

sales_offer_id

string

ID of the related sales offer, if applicable

1234

sales_offer_line_id

string

ID of the related sales offer line, if applicable

1

custom_field_1

string

Custom field 1

EU only

custom_field_2

string

Custom field 2

EU only

custom_field_3

string

Custom field 3

EU only

custom_field_4

string

Custom field 4

EU only

custom_field_5

string

Custom field 5

EU only

custom_field_6

string

Custom field 6

EU only

custom_field_7

string

Custom field 7

EU only

custom_field_8

string

Custom field 8

EU only

custom_field_9

string

Custom field 9

EU only

custom_field_10

string

Custom field 10

EU only

custom_field_11

string

Custom field 11

EU only

custom_field_12

string

Custom field 12

EU only

custom_field_13

string

Custom field 13

EU only

custom_field_14

string

Custom field 14

EU only

custom_field_15

string

Custom field 15

EU only

custom_metric_1

number

Custom metric 1

1

custom_metric_2

number

Custom metric 2

100

custom_metric_3

number

Custom metric 3

2.2

custom_metric_4

number

Custom metric 4

1.05

custom_metric_5

number

Custom metric 5

10000

source_system

string

Identifier of the source system. Needed when mapping source-system identifiers to master identifiers.

ABCDEF

Sales summary

Sales Summary is a reduced, simplified data set that can be used instead of the detailed endpoints. It allows demoing Zoined with own, aggregated data, or can be used in production environment when the more detailed data set is not required or available.

Upload Sales summaries

POST /salesSummaries

Creates or updates aggregated sales summary data.

Query Parameters

Parameter

Type

Required

Description

Example

dryRun

boolean

Only validate the request without storing the data.

false

separator

string

Column separator used when loading CSV data.

;

encoding

string

Character encoding used in the CSV data. Default is utf-8.

utf-8

Sales Summary Attributes

Field

Type

Required

Description

Example

sales_date

string

Sales date (yyyy-mm-dd)

2016-01-01

sales_time

string

Sales time (HH:mm:ss)

15:00:00

organisation_id

string

Organisation / Store ID

540

department_id

string

Store department ID

5401

salesperson_id

string

Sales person ID

540001

sales_value

number

Total sales amount including tax

2000

sales_value_wo_vat

number

Total sales amount without tax

1600

sales_currency

string

Sales currency as an ISO 4217 currency code. Required if multiple currencies are used.

EUR

rebate

number

Amount of rebate given including tax

0

rebate_wo_vat

number

Amount of rebate given without tax

0

purchase_price

number

Total purchase price including tax

500

purchase_price_wo_vat

number

Total purchase price without tax

400

purchase_currency

string

Purchase currency as an ISO 4217 currency code. Required if multiple currencies are used.

EUR

product_quantity

number

Sold quantity

4

number_of_transactions

number

Number of receipts

2

product_id

string

Product ID

XYZ

customer_id

string

Customer ID for identified customer

32

supplier_id

string

Supplier ID

221

parent_product_id

string

Parent product ID

123

campaign_id

string

Campaign ID

123

rebate_code_id

string

Rebate code ID

3313V

cancelled

boolean

Indicates whether the transaction is cancelled. Default is false.

false

custom_field_1

string

Field that can be used for custom dimensions

XYZ

custom_field_2

string

Field that can be used for custom dimensions

XYZ

custom_field_3

string

Field that can be used for custom dimensions

XYZ

custom_field_4

string

Field that can be used for custom dimensions

XYZ

custom_field_5

string

Field that can be used for custom dimensions

XYZ

custom_field_6

string

Field that can be used for custom dimensions

XYZ

custom_field_7

string

Field that can be used for custom dimensions

XYZ

custom_field_8

string

Field that can be used for custom dimensions

XYZ

custom_field_9

string

Field that can be used for custom dimensions

XYZ

custom_field_10

string

Field that can be used for custom dimensions

XYZ

custom_metric_1

number

Custom metric 1

1

custom_metric_2

number

Custom metric 2

100

custom_metric_3

number

Custom metric 3

2.2

custom_metric_4

number

Custom metric 4

1.05

custom_metric_5

number

Custom metric 5

10000

source_system

string

Identifier of the source system. Needed when mapping source-system identifiers to master identifiers.

ABCDEF

Sales payment

Sales payment can be used to send payment data for sales receipts since payment data with multiple payment types per receipt does not mix well with receipt row level transactions. Summed sales values from payment receipts should of course correspond to line item level sum in sales data and transaction_id should be the same as corresponding sales receipt transaction_id so that we can match them together when needed.

Upload sales payments

POST /salesPayments

Creates or updates sales payment data.

Query Parameters

Parameter

Type

Required

Description

Example

dryRun

boolean

Only validate the request without storing the data.

false

separator

string

Column separator used when loading CSV data.

;

encoding

string

Character encoding used in the CSV data. Default is utf-8.

utf-8

Sales Payment Attributes

Field

Type

Required

Description

Example

transaction_id

string

Unique ID for the transaction. Should match the sales receipt transaction ID where applicable.

er/232/f31

line_item_id

string

Transaction line item identifier

1

sales_date

string

Sales date (yyyy-mm-dd)

2016-01-01

sales_time

string

Sales time (HH:mm:ss)

15:00:00

organisation_id

string

Organisation / Store ID

540

department_id

string

Store department ID

5401

salesperson_id

string

Sales person ID

540001

register_id

string

Cash register ID

32

table_number

string

Table number

54

payment_method

string

Payment method ID

Invoice

giftcard_payment_id

string

ID used to link a possible gift card used for this payment

12345

sales_value

number

Total sales amount including tax

2000

sales_value_wo_vat

number

Total sales amount without tax

1600

currency

string

Currency as an ISO 4217 currency code. Required if multiple currencies are used.

EUR

rebate

number

Amount of rebate given including tax

0

rebate_wo_vat

number

Amount of rebate given without tax

0

customer_id

string

Customer ID for identified customer

32

delivery_customer_id

string

Delivery customer ID for identified customer

32

cancel_id

string

Transaction ID of the cancelled receipt

er/232/f2

cancelled

boolean

Indicates whether the transaction is cancelled. Default is false.

false

custom_field_1

string

Field that can be used for custom dimensions

XYZ

custom_field_2

string

Field that can be used for custom dimensions

XYZ

custom_field_3

string

Field that can be used for custom dimensions

XYZ

custom_field_4

string

Field that can be used for custom dimensions

XYZ

custom_field_5

string

Field that can be used for custom dimensions

XYZ

custom_field_6

string

Field that can be used for custom dimensions

XYZ

custom_field_7

string

Field that can be used for custom dimensions

XYZ

custom_field_8

string

Field that can be used for custom dimensions

XYZ

custom_field_9

string

Field that can be used for custom dimensions

XYZ

custom_field_10

string

Field that can be used for custom dimensions

XYZ

custom_metric_1

number

Custom metric 1

1

custom_metric_2

number

Custom metric 2

100

custom_metric_3

number

Custom metric 3

2.2

custom_metric_4

number

Custom metric 4

1.05

custom_metric_5

number

Custom metric 5

10000

custom_metric_6

number

Custom metric 6

1

custom_metric_7

number

Custom metric 7

100

custom_metric_8

number

Custom metric 8

2.2

custom_metric_9

number

Custom metric 9

1.05

custom_metric_10

number

Custom metric 10

10000

source_system

string

Identifier of the source system. Needed when mapping source-system identifiers to master identifiers.

ABCDEF

Giftcard Payments

Giftcard Payments can be used to send giftcard payments data for sales transactions involving gift cards as a payment method. It streamlines the management of giftcard payment information and usage, ensuring accuracy and consistency in sales records.

Upload list of giftcard payments

POST /giftcardPayments

Creates or updates gift card payment data.

Query Parameters

Parameter

Type

Required

Description

Example

dryRun

boolean

Only validate the request without storing the data.

false

separator

string

Column separator used when loading CSV data.

;

encoding

string

Character encoding used in the CSV data. Default is utf-8.

utf-8

Gift Card Payment Attributes

Field

Type

Required

Description

Example

giftcard_id

string

Unique ID for the gift card

A67gigMp

giftcard_number

string

Gift card number

7TON39

giftcard_status

string

Gift card status

Active

giftcard_balance

number

Gift card balance

50

creation_date

string

Gift card creation date (yyyy-mm-dd)

2016-01-01

creation_time

string

Gift card creation time (HH:mm:ss)

15:00:00

expiration_date

string

Gift card expiration date (yyyy-mm-dd)

2017-01-01

expiration_time

string

Gift card expiration time (HH:mm:ss)

15:00:00

sales_id

string

Sales ID

dbeba367

organisation_id

string

Organisation / Store ID

540

department_id

string

Store department ID

5401

register_id

string

Cash register ID

32

salesperson_id

string

Sales person ID

540001

customer_id

string

Customer ID for identified customer

32

payment_id

string

Payment method ID

A65A

payment_type

string

Payment type

Activation

payment_date

string

Payment date (yyyy-mm-dd)

2016-05-15

payment_time

string

Payment time (HH:mm:ss)

18:00:00

payment_value

number

Payment amount

20

payment_currency

string

Currency as an ISO 4217 currency code. Required if multiple currencies are used.

EUR

custom_field_1

string

Field that can be used for custom dimensions

XYZ

custom_field_2

string

Field that can be used for custom dimensions

XYZ

custom_field_3

string

Field that can be used for custom dimensions

XYZ

custom_field_4

string

Field that can be used for custom dimensions

XYZ

custom_field_5

string

Field that can be used for custom dimensions

XYZ

custom_metric_1

number

Custom metric 1

1

custom_metric_2

number

Custom metric 2

100

custom_metric_3

number

Custom metric 3

2.2

custom_metric_4

number

Custom metric 4

1.05

custom_metric_5

number

Custom metric 5

10000

source_system

string

Identifier of the source system. Needed when mapping source-system identifiers to master identifiers.

ABCDEF

Accounting

Accounting can be used to send account level information (receipts) about operational income and costs of running the company. This information is used to eg. to calculate various margins usually found in profit loss statements.

Upload accounting data

POST /accounting

Creates or updates accounting transaction data.

Query Parameters

Parameter

Type

Required

Description

Example

dryRun

boolean

Only validate the request without storing the data.

false

separator

string

Column separator used when loading CSV data.

;

encoding

string

Character encoding used in the CSV data. Default is utf-8.

utf-8

Accounting Attributes

Field

Type

Required

Description

Example

transaction_id

string

Unique ID for this accounting receipt

1234

line_item_id

string

Unique ID for this accounting receipt line item

1

organisation_id

string

Organisation / Store ID

540

department_id

string

Store department ID

5401

account_id

string

Account ID

1150

event_date

string

Event date (yyyy-mm-dd)

2016-01-01

event_time

string

Event time (HH:mm:ss)

15:00:00

receipt_type

enum

Receipt type

receipt_number

string

Optional bookkeeping receipt number

12345

receipt_value

number

Total amount of this line item

2000

receipt_value_wo_vat

number

Total amount of this line item without taxes

1600

currency

string

Currency as an ISO 4217 currency code. Required if multiple currencies are used.

EUR

cancelled

boolean

Indicates whether this receipt has been cancelled

true

custom_field_1

string

Field that can be used for custom dimensions

XYZ

custom_field_2

string

Field that can be used for custom dimensions

XYZ

custom_field_3

string

Field that can be used for custom dimensions

XYZ

custom_field_4

string

Field that can be used for custom dimensions

XYZ

custom_field_5

string

Field that can be used for custom dimensions

XYZ

source_system

string

Identifier of the source system. Needed when mapping source-system identifiers to master identifiers.

ABCDEF

Bookings

This end point can be used to record bookings into Zoined service.

Upload list of bookings

POST /bookings

Creates or updates booking data.

Query Parameters

Parameter

Type

Required

Description

Example

dryRun

boolean

Only validate the request without storing the data.

false

separator

string

Column separator used when loading CSV data.

;

encoding

string

Character encoding used in the CSV data. Default is utf-8.

utf-8

Booking Attributes

Field

Type

Required

Description

Example

booking_id

string

Unique ID for the booking

er/232/f31

booking_line_id

string

Secondary booking identifier

1

customer_id

string

Customer ID for identified customer

32

product_id

string

Product ID

XYZ

event_id

string

Optional ID for the event this booking is for

123

organisation_id

string

Organisation unit ID

540

department_id

string

Department ID

54011

salesperson_id

string

Sales person ID

5402101

booked_quantity

number

Booked quantity

2

number_of_guests

number

Number of guests booked

2

number_of_visits

number

Number of visits allowed per guest within the start and end dates

2

sales_value

number

Total booking sales amount including tax

20

sales_value_wo_vat

number

Total booking sales amount without tax

20

currency

string

Currency as an ISO 4217 currency code. Required if multiple currencies are used.

EUR

canceled

boolean

Indicates whether the booking has been cancelled

false

booking_date

string

Booking date (yyyy-mm-dd)

2020-03-01

booking_time

string

Booking time (HH:mm:ss)

15:30:00

event_start_date

string

Event start date (yyyy-mm-dd)

2020-03-10

event_start_time

string

Event start time (HH:mm:ss)

18:00:00

event_end_date

string

Event end date (yyyy-mm-dd)

2020-03-11

event_end_time

string

Event end time (HH:mm:ss)

21:00:00

booking_type

string

Booking type. Must be event, ticket, or room.

event

custom_field_1

string

Custom field 1

EU only

custom_field_2

string

Custom field 2

EU only

custom_field_3

string

Custom field 3

EU only

custom_field_4

string

Custom field 4

EU only

custom_field_5

string

Custom field 5

EU only

custom_metric_1

number

Custom metric 1

1

custom_metric_2

number

Custom metric 2

100

custom_metric_3

number

Custom metric 3

2.2

custom_metric_4

number

Custom metric 4

1.05

custom_metric_5

number

Custom metric 5

10000

source_system

string

Identifier of the source system. Needed when mapping source-system identifiers to master identifiers.

ABCDEF

Suppliers

The party that sells your organisation the goods or merchandise

Upload list of suppliers

POST /suppliers

Creates or updates supplier data.

Query Parameters

Parameter

Type

Required

Description

Example

dryRun

boolean

Only validate the request without storing the data.

false

separator

string

Column separator used when loading CSV data.

;

encoding

string

Character encoding used in the CSV data. Default is utf-8.

utf-8

Supplier Attributes

Field

Type

Required

Description

Example

supplier_id

string

Supplier ID

221

supplier_name

string

Supplier name

WasSuppliers

supplier_email

string

Supplier email

john.smith@supplier.supplier

supplier_phone

string

Supplier phone number

+3581111111

supplier_address

string

Street address

Mannerheimintie 1

supplier_city

string

City

Helsinki

supplier_zipcode

string

Postal code

00100

supplier_country

string

Country

Finland

supplier_group

string

Supplier group

Strategic Supplier

supplier_type

string

Supplier type

Local

custom_field_1

string

Field that can be used for custom dimensions

XYZ

custom_field_2

string

Field that can be used for custom dimensions

XYZ

custom_field_3

string

Field that can be used for custom dimensions

XYZ

custom_field_4

string

Field that can be used for custom dimensions

XYZ

custom_field_5

string

Field that can be used for custom dimensions

XYZ

source_system

string

Identifier of the source system. Needed when mapping source-system identifiers to master identifiers.

ABCDEF

Visitors

Visitor count information from anti-theft gates or camera systems. Five different types of visitors can be reported: visitors coming in, visitors going out, visitors passing by, visitor average occupancy and visitor average visit time. You can also send data for visiting cars & bicycles for all of these five metrics but default is people.Visitor data can be sent either on store or department level. If department is empty visitors are considered to be entering/leaving/passing/visiting store. If department is specified then visitor entry is considered to be person moving inside the store. When showing visitor counts on portal store-level visitor counts are used, unless data is viewed on department level.

Upload list of visitors

POST /visitors

Creates or updates visitor data.

Query Parameters

Parameter

Type

Required

Description

Example

dryRun

boolean

Only validate the request without storing the data.

false

separator

string

Column separator used when loading CSV data.

;

encoding

string

Character encoding used in the CSV data. Default is utf-8.

utf-8

Visitor Attributes

Field

Type

Required

Description

Example

organisation_id

string

Organisation / Store ID

540

department_id

string

Department ID

540

counter_id

string

Counter ID

540

product_id

string

Optional product ID associated with this visitor (e.g. ticket)

ABC-123

customer_id

string

Optional customer associated with this visitor (e.g. ticket)

1234

date

string

Date of visit (yyyy-mm-dd)

2016-01-01

time

string

Time of visit (HH:mm:ss)

15:00:00

time_zone

string

Optional location time zone

02:00

visit_type

string

Type of visitor record: in, out, pass, occupancy, visit_time, or queue

in

vehicle_type

string

Optional vehicle type. Supported values are car and bicycle.

car

queue_area_name

string

Optional area name for queue cameras

Area 1

low_queue

number

Threshold for low queue

1

high_queue

number

Threshold for high queue

5

visitors

number

Number of visitors at the given time

1000

custom_metric_1

number

Custom metric 1

1

custom_metric_2

number

Custom metric 2

100

custom_metric_3

number

Custom metric 3

2.2

custom_metric_4

number

Custom metric 4

1.05

custom_metric_5

number

Custom metric 5

10000

custom_field_1

string

Field that can be used for custom dimensions

XYZ

custom_field_2

string

Field that can be used for custom dimensions

XYZ

custom_field_3

string

Field that can be used for custom dimensions

XYZ

custom_field_4

string

Field that can be used for custom dimensions

XYZ

custom_field_5

string

Field that can be used for custom dimensions

XYZ

source_system

string

Identifier of the source system. Needed when mapping source-system identifiers to master identifiers.

ABCDEF

Visitor demographics

Visitor demographics endpoint can be used to send data for detected visitor's age and gender.Demographic data is usually obtained with different (camera) system, and only for part of the visitors. This API endpoint allows sending of the data separately, so that we can then combine data with visitor information. Our analytics backend will use combined data to project gender & age group estimates into actual visitor counts.

Upload list of visitor demographics

POST /visitorDemographics

Creates or updates visitor demographic data.

Query Parameters

Parameter

Type

Required

Description

Example

dryRun

boolean

Only validate the request without storing the data.

false

separator

string

Column separator used when loading CSV data.

;

encoding

string

Character encoding used in the CSV data. Default is utf-8.

utf-8

Visitor Demographic Attributes

Field

Type

Required

Description

Example

organisation_id

string

Organisation / Store ID

540

department_id

string

Department ID

540

counter_id

string

Counter ID

540

date

string

Date of visit (yyyy-mm-dd)

2016-01-01

time

string

Time of visit (HH:mm:ss)

15:00:00

gender

string

Gender of visitor. m = male, f = female, u = unknown.

m

age

number

Age of the visitor

25

visitors

number

Number of visitors for the specified age and gender at the specified time

1000

source_system

string

Identifier of the source system. Needed when mapping source-system identifiers to master identifiers.

ABCDEF

Id mapping

ID Mapping allows you to define mappings between identifiers in different source systems and the master data. This allows you to link data between different systems so that they can be correlated and shown in sensible way in Zoined Analytics Portal.

Upload list of identifier mappings

POST /idMapping

Creates or updates mappings between source-system identifiers and master-data identifiers.

Query Parameters

Parameter

Type

Required

Description

Example

dryRun

boolean

Only validate the request without storing the data.

false

separator

string

Column separator used when loading CSV data.

;

encoding

string

Character encoding used in the CSV data. Default is utf-8.

utf-8

ID Mapping Attributes

Field

Type

Required

Description

Example

source_system_id

string

Identifier in the source system

abc

master_id

string

Identifier in master data

store

entity_type

string

Entity type this mapping is for (e.g. organisation, product)

organisation

context

string

Type of data this mapping applies to

visitor

source_system

string

Identifier of the source system this data is from. Needed when mapping source-system identifiers to master identifiers.

ABCDEF

Budgets

Budget end point allows you to upload budgets for individual metrics at the with selected level of granularity. You can for example send daily budget per store and monthly forecasts per category for sales value.

Upload list of budget entries

POST /budgets/type

Creates or updates budget or forecast data.

Parameters

Parameter

Type

Required

Description

Example

type

string

Type of budget. Currently supported values are budget and forecast.

budget

isoWeeks

boolean

For weekly budgets, determines whether to use ISO 8601 weeks or US weeks. Default is true.

true

dryRun

boolean

Only validate the request without storing the data.

false

Budget Attributes

Field

Type

Required

Description

Example

year

number

Year this budget entry refers to

2017

month

number

Month this budget entry refers to. Either month or week must be provided.

1

week

number

Week number this budget entry refers to. Either month or week must be provided.

12

day

number

Optional day this budget entry refers to

1

hour

number

Optional hour this budget refers to. day must also be specified when hour is provided.

1

dimensions

object

Object containing the dimensions for the budget entry

metrics

object

Object containing the metrics for the budget entry

Last updated

This end point allows you to send information about last update time stamps for different entities you send to Zoined. After uploading entities you can post last update time stamp for each entity here, optionally on store level. This information is used to report to end users when certain data set was last updated. Times should be posted in UTC time as they will be converted to user local time zone when presented in portal. Similarly entity keys will be localized in user's selected language provided that correct key names are used.

Upload last updated time stamps

POST /updateTime

Updates the timestamp indicating when a specific data entity was last successfully updated.

Query Parameters

Parameter

Type

Required

Description

Example

dryRun

boolean

Only validate the request without storing the data.

false

separator

string

Column separator used when loading CSV data.

;

encoding

string

Character encoding used in the CSV data. Default is utf-8.

utf-8

Update Time Attributes

Field

Type

Required

Description

Example

entity

string

Key of the entity updated. Generally one of the ZAPI endpoint names in lowercase, e.g. workshifts, sales, salessummaries, inventorysnapshots, or visitors. The special key last_updated can be used to send an aggregated update time for all datasets.

workshifts

organisation_id

string

Optional organisation unit this update refers to

123

last_updated

string

Timestamp when the entity was last successfully updated

2019-08-21 02:25:31

source_system

string

Identifier of the source system. Needed when mapping source-system identifiers to master identifiers.

ABCDEF


Data download

Data download end points provide means for retrieving data from Zoined. This allows building integrations feeding external systems with the data sent to Zoined. Data returned from the download end points closely match the structures used while uploading the data but doesn't always match exactly due to deprecations in upload API and processing on the Zoined system. Each data download end point will contain full list of fields supported. Currently we support both JSON and CSV formats for all download end points.

For large downloads windowing should be used to keep individual result sets reasonable. offset and limit query parameters should be used to control this for each successive request. For example with 100000 limit the first request would be with offset 0, next with 100000, then 200000 and so on. Please note that max limit is hard capped to 1000000 rows per request so tune your parameters accordingly.

Sales transactions

Returns list of sales transactions in the system. Returned data can be limited with start and end query parameters.

Download sales transactions as JSON

Download sales transactions as CSV

Sales orders

Returns list of sales orders in the system. Returned data can be limited with start and end query parameters.

Download sales orders as JSON

Download sales orders as CSV

Sales offers

Returns list of sales offers in the system. Returned data can be limited with start and end query parameters.

Download sales offers as JSON

Download sales offers as CSV

Purchase orders

Returns list of purchase orders in the system. Returned data can be limited with start and end query parameters.

Download purchase orders as JSON

Download purchase orders as CSV

Sales summaries

Returns list of sales summaries in the system. Returned data can be limited with start and end query parameters.

Download sales summaries as JSON

Download sales summaries as CSV

Sales payments

Returns list of sales payments in the system. Returned data can be limited with start and end query parameters.

Download sales payments as JSON

Download sales payments as CSV

Giftcard payments

Returns list of giftcard payments in the system. Returned data can be limited with start and end query parameters.

Download giftcard payments as JSON

Download giftcard payments as CSV

Bookings

Returns list of bookings in the system. Returned data can be limited with start and end query parameters.

Download bookings as JSON

Download bookings as CSV

Accounting data

Returns list of accounting data in the system. Returned data can be limited with start and end query parameters.

Download accounting data as JSON

Download accounting dat as CSV

Cashier balance

Returns list of cashier balances in the system. Returned data can be limited with start and end query parameters.

Download cashier balances as JSON

Download cashier balances as CSV

Customer feedback

Returns list of customer feedback in the system. Returned data can be limited with start and end query parameters.

Download customer feedback as JSON

Download customer feedback as CSV

Inventory transactions

Returns list of inventory transactions in the system. Returned data can be limited with start and end query parameters.

Download inventory transactions as JSON

Download inventory transactions as CSV

Inventory snapshots

Returns list of inventory snapshots in the system. Returned data can be limited with start and end query parameters.

Download inventory snapshots as JSON

Download inventory snapshots as CSV

Capacity

Returns list of resource capacities in the system. Returned data can be limited with start and end query parameters.

Download capacities as JSON

Download capacities as CSV

Visitors

Returns list of visitors in the system. Returned data can be limited with start and end query parameters.

Download visitors as JSON

Download visitors as CSV

Visitor demographics

Returns list of visitor demographics in the system. Returned data can be limited with start and end query parameters.

Download visitor demographics as JSON

Download visitor demographics as CSV

Work shifts

Returns list of worked shifts in the system. Returned data can be limited with start and end query parameters.

Download work shifts as JSON

Download work shifts as CSV

Employee hours

Returns list of employee hours in the system (simpler form of work shifts without shift). Returned data can be limited with start and end query parameters.

Download employee hours as JSON

Download employee hours as CSV

Hourly staff costs

Returns list of hourly store, department and employee level hourly salary data in the system. Returned data can be limited with start and end query parameters.

Download staff costs as JSON

Download staff costs as CSV

Products

Returns list of products in the system. Returned data can be limited with product_id query parameters.

Download products as JSON

Download products as CSV

Customers

Returns list of customers in the system. Returned data can be limited with customer_id query parameters.

Download Customers as JSON

Download Customers as CSV

Organisations

Returns list of organisations in the system. Returned data can be limited with organisation_id query parameters.

Download organisations as JSON

Download organisations as CSV

Departments

Returns list of departments in the system. Returned data can be limited with department_id query parameters.

Download departments as JSON

Download departments as CSV

Sales persons

Returns list of sales persons in the system. Returned data can be limited with salesperson_id query parameters.

Download sales persons as JSON

Download sales persons as CSV

Cash Registers

Returns list of cash registers in the system. Returned data can be limited with register_id query parameter.

Download cash registers as JSON

Download cash registers as CSV

Accounts

Returns list of bookkeeping accounts in the system. Returned data can be limited with account_id query parameter.

Download accounts as JSON

Download accounts as CSV

Events

Returns list of booking events in the system. Returned data can be limited with event_id query parameter.

Download events as JSON

Download events as CSV

Category hierarchies

Returns list of all category hierarchies in the system. Returned data can be limited with category_id and hierarchy_key query parameters.

Download hierarchies as JSON

Download hierarchies as CSV

Flat hierarchies

Returns list of all hierarchies in the system in a flat format. Returned data can be limited with hierarchy_key query parameters.

Download flat hierarchies as JSON

Download flat hierarchies as CSV

Counters

Returns list of visitor counters in the system. Returned data can be limited with counter_id query parameters.

Download counters as JSON

Download counters as CSV

Campaigns

Returns list of campaigns in the system. Returned data can be limited with campaign_id, start and end query parameters.

Download campaigns as JSON

Download campaigns as CSV

Payment types

Returns list of payment types in the system. Returned data can be limited with payment_type_id query parameters.

Download payment types as JSON

Download payment types as CSV

Rebate codes

Returns list of rebate codes in the system. Returned data can be limited with rebate_code_id query parameters.

Download rebate codes as JSON

Download rebate codes as CSV

Suppliers

Returns list of suppliers in the system. Returned data can be limited with id query parameters.

Download suppliers as JSON

Download suppliers as CSV

Custom calendars

Returns custom calendar periods available in the system. Returned data can be limited with year and period query parameters.

Download custom calendar as JSON

Download custom calendar as CSV

Flat calendars

Returns custom calendar periods available in the system in a flat format (one row per day). Returned data can be limited with year query parameter.

Download flat calendar as JSON

Download flat calendar as CSV

Currency rates

Returns currency rates available in the system. Returned data can be limited with start, end and currency query parameters.

Download currency rates as JSON

Download currency rates as CSV

Budgets

Returns budgets available in the system. Returned data can be limited with year query parameter.

Download budgets as JSON


Data queries

These end points allow you to retrieve aggregated data from the warehouse. Results are provided by analytics back-end and as such very closely match the result sets we provide to end users through our portal and newsletters. Hence these end points can be most readily used to get such data sets integrated to other customer systems also. You'll minimally need to provide dimensions you want to group data over and metrics you'd like to see. You can also additionally filter results by time, or by dimension values and sort your result set by given fields.

Query data in tabular format

Returns requested dimensions and metrics as either JSON array or CSV table. Data is limited by default to 1000 entries and pagination information can be found from X-Zoined-* headers.

Query data as JSON

Retrieve tabular data in JSON format (flat array with one element per group).

Query data as CSV

Retrieve tabular data in CSV format. First row contains headers (field names for dimensions and metrics), and rest of the rows contain data values.

Query data in stream format

Returns requested dimensions and metrics as either JSON array or CSV table. Entire flat data set returned by request is always fetched as a streamed http response which client should store in one go. Streamed requests are ideal for fetching large base data sets quickly but they have certain limitations including no support for things like custom result set sorting, secondary aggregation or grouped series.

Query data as JSON stream

Retrieve stream data in JSON format (flat array with one element per group).

Query data as CSV stream

Retrieve stream data in CSV format. First row contains headers (field names for dimensions and metrics), and rest of the rows contain data values.

Maintenance

These endpoints allow you to do maintenance operations for warehouse.

Data

Reset all data in the warehouse

Allows one to do full or selective reset to data in the warehouse. This will allow one to start from clean state if something goes wrong while working with the integration or alternatively just remove some single/multiple bad data set(s). It is only possible to use this API before transitioning to production. After that you'll need to contact Zoined Support if you have need for full or partial warehouse reset. Entity names for selective reset are end point names in lower case and singular form eg. sales, salespayment, salesorder, organisation, product etc.

Selectively delete by given list of ids

This endpoint allows deleting existing transaction data by giving a list of transaction or entity id values already existing in the warehouse. Entity name for selective deletion is one of the end point names in lower case and singular form eg. sales, salespayment, salesorder, organisation, product etc.

Selectively delete by given date range

The endpoint allows deleting existing transaction data by giving a date range (eg. two sales dates) for data already existing in the warehouse. Entity name for selective deletion is one of the end point names in lower case and singular form eg. sales, salespayment, salesorder, organisation, product etc.

Selectively delete by given batch date range

The endpoint allows deleting existing transaction data by giving a batch date range (ie. data receipt timestamp) for data already existing in the warehouse. This endpoint is handy if you want to for example delete eg. all data send to Zoined within last 7 days (to resend it later). Entity name for selective deletion is one of the end point names in lower case and singular form eg. sales, salespayment, salesorder, organisation, product etc.

Did this answer your question?