Skip to content

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)
Operations

Upload list of sales transactions

Request

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

Security
bearerAuth
Query
dryRunbooleanrequired

Only validate the request without storing the data

Example:dryRun=false
separatorstringrequired

Column separator used when loading CSV data

Example:separator=;
encodingstringrequired

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

Example:encoding=utf-8
Body
Any of:
transaction_idstringrequired

Unique ID for the transaction

Example:"242224"
line_item_idstringrequired

Secondary transaction identifier

Example:"1"
customer_idstring

Customer ID for identified customer

Example:"32"
delivery_customer_idstring

Delivery Customer ID for identified customer

Example:"32"
sales_datestringrequired

Sales date (yyyy-mm-dd)

Example:"2016-01-01"
sales_timestringrequired

Sales time (HH:mm:ss)

Example:"15:00:00"
product_idstringrequired

Product ID

Example:"XYZ"
product_quantitynumberrequired

Sold quantity

Example:2
product_unit_pricenumberrequired

Unit price for single product

Example:10
sales_valuenumberrequired

Total sales amount including tax

Example:20
sales_value_wo_vatnumber

Total sales amount without tax

Example:20
compensation_amountnumber

Optional compensation paid for this sale

Example:3
rebatenumber

Amount of rebate given including tax

Example:0
rebate_wo_vatnumber

Amount of rebate given without tax

Example:0
sales_currencystring

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

Example:"EUR"
payment_methodstring

Payment method

Example:"Visa"
supplier_idstring

Supplier ID

Example:"13"
parent_product_idstring

Parent Product ID

Example:"123"
purchase_pricenumber

Total purchase price including tax

Example:5
purchase_price_wo_vatnumber

Total purchase price without tax

Example:5
purchase_currencystring

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

Example:"EUR"
piece_goodboolean

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

Example:true
organisation_idstringrequired

Organisation unit ID

Example:"540"
department_idstring

Store department ID

Example:"5401"
salesperson_idstring

Sales person ID

Example:"5402101"
sales_representative_idstring

Responsible sales person ID

Example:"5402100"
campaign_idstring

Campaign ID

Example:"6344"
cancel_idstring

Transaction ID of cancelled receipt

cancelledboolean

cancelled. true=cancelled transaction false=not cancelled transaction. Default is false.

Example:false
delivery_datestring

Delivery date (yyyy-mm-dd)

Example:"2016-01-01"
delivery_timestring

Delivery time (HH:mm:ss)

Example:"15:00:00"
order_datestring

Order date (yyyy-mm-dd)

Example:"2016-01-01"
order_timestring

Order time (HH:mm:ss)

Example:"15:00:00"
invoice_datestring

Invoice date (yyyy-mm-dd)

Example:"2016-01-01"
invoice_timestring

Invoice time (HH:mm:ss)

Example:"15:00:00"
register_idstring

Cash register ID

Example:"54022"
table_numberstring

Table number

Example:"54"
rebate_code_idstring

Rebate Code ID

Example:"3313V"
booking_idstring

12 (string, optional) - Optional reference to booking that generated this sale.

Example:"B1224"
booking_line_idstring

Optional booking line that corresponds to this sale.

Example:"1"
event_idstring

Event ID

Example:"221"
sales_order_idstring

Order id for sales order this sales transaction (invoice) originates from.

Example:"12345"
sales_order_line_idstring

Order line item id in sales order this sales transaction line item (invoice) originates from.

Example:"1"
parent_line_idstring

Line item id for parent line item in this sales transaction that this line is child to.

Example:"1"
custom_field_1string

Custom field 1

Example:"EU only"
custom_field_2string

Custom field 2

Example:"EU only"
custom_field_3string

Custom field 3

Example:"EU only"
custom_field_4string

Custom field 4

Example:"EU only"
custom_field_5string

Custom field 5

Example:"EU only"
custom_field_6string

Custom field 6

Example:"EU only"
custom_field_7string

Custom field 7

Example:"EU only"
custom_field_8string

Custom field 8

Example:"EU only"
custom_field_9string

Custom field 9

Example:"EU only"
custom_field_10string

Custom field 10

Example:"EU only"
custom_field_11string

Custom field 11

Example:"EU only"
custom_field_12string

Custom field 12

Example:"EU only"
custom_field_13string

Custom field 13

Example:"EU only"
custom_field_14string

Custom field 14

Example:"EU only"
custom_field_15string

Custom field 15

Example:"EU only"
custom_metric_1number

Custom metric 1

Example:1
custom_metric_2number

Custom metric 2

Example:100
custom_metric_3number

Custom metric 3

Example:2.2
custom_metric_4number

Custom metric 4

Example:1.05
custom_metric_5number

Custom metric 5

Example:10000
custom_metric_6number

Custom metric 6

Example:1
custom_metric_7number

Custom metric 7

Example:100
custom_metric_8number

Custom metric 8

Example:2.2
custom_metric_9number

Custom metric 9

Example:1.05
custom_metric_10number

Custom metric 10

Example:10000
source_systemstring

Identifier of the source system this data is from. Needed when mapping between source system identifiers and master identifiers are used.

Example:"ABCDEF"
curl -i -X POST \
  'https://zapi-api.zoined.com/_mock/sales?dryRun=false&separator=%3B&encoding=utf-8' \
  -H 'Authorization: Bearer <YOUR_token_HERE>' \
  -H 'Content-Type: application/json' \
  -d '{
    "transaction_id": "242224",
    "line_item_id": "1",
    "customer_id": "32",
    "delivery_customer_id": "32",
    "sales_date": "2016-01-01",
    "sales_time": "15:00:00",
    "product_id": "XYZ",
    "product_quantity": 2,
    "product_unit_price": 10,
    "sales_value": 20,
    "sales_value_wo_vat": 20,
    "compensation_amount": 3,
    "rebate": 0,
    "rebate_wo_vat": 0,
    "sales_currency": "EUR",
    "payment_method": "Visa",
    "supplier_id": "13",
    "parent_product_id": "123",
    "purchase_price": 5,
    "purchase_price_wo_vat": 5,
    "purchase_currency": "EUR",
    "piece_good": true,
    "organisation_id": "540",
    "department_id": "5401",
    "salesperson_id": "5402101",
    "sales_representative_id": "5402100",
    "campaign_id": "6344",
    "cancel_id": "string",
    "cancelled": false,
    "delivery_date": "2016-01-01",
    "delivery_time": "15:00:00",
    "order_date": "2016-01-01",
    "order_time": "15:00:00",
    "invoice_date": "2016-01-01",
    "invoice_time": "15:00:00",
    "register_id": "54022",
    "table_number": "54",
    "rebate_code_id": "3313V",
    "booking_id": "B1224",
    "booking_line_id": "1",
    "event_id": "221",
    "sales_order_id": "12345",
    "sales_order_line_id": "1",
    "parent_line_id": "1",
    "custom_field_1": "EU only",
    "custom_field_2": "EU only",
    "custom_field_3": "EU only",
    "custom_field_4": "EU only",
    "custom_field_5": "EU only",
    "custom_field_6": "EU only",
    "custom_field_7": "EU only",
    "custom_field_8": "EU only",
    "custom_field_9": "EU only",
    "custom_field_10": "EU only",
    "custom_field_11": "EU only",
    "custom_field_12": "EU only",
    "custom_field_13": "EU only",
    "custom_field_14": "EU only",
    "custom_field_15": "EU only",
    "custom_metric_1": 1,
    "custom_metric_2": 100,
    "custom_metric_3": 2.2,
    "custom_metric_4": 1.05,
    "custom_metric_5": 10000,
    "custom_metric_6": 1,
    "custom_metric_7": 100,
    "custom_metric_8": 2.2,
    "custom_metric_9": 1.05,
    "custom_metric_10": 10000,
    "source_system": "ABCDEF"
  }'

Responses

Request has been processed successfully.

Headers

  • Content-Type: application/json
Bodyapplication/json
statusstringrequired

Status of the operation OK / Not OK

Example:"OK"
msgstringrequired

Message describing result of operation

Example:"1 entity added"
Response
{ "status": "OK", "msg": "1 entity added" }