Skip to content

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

Request

POST https://api.zoined.com/salesPayments?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. Should match with sales receipt transaction id where applicable.

Example:"er/232/f31"
line_item_idstringrequired

Transaction line item identifier

Example:"1"
sales_datestringrequired

Sales date (yyyy-mm-dd)

Example:"2016-01-01"
sales_timestring

Sales time (HH:mm:ss)

Example:"15:00:00"
organisation_idstringrequired

Organisation/Store ID

Example:"540"
department_idstring

Store department ID

Example:"5401"
salesperson_idstring

Sales person ID

Example:"5402101"
register_idstring

Cash register ID

Example:"32"
table_numberstring

Table number

Example:"54"
payment_methodstringrequired

Payment method ID

Example:"Invoice"
giftcard_payment_idstring

Id to link to possible giftcard used for this payment.

Example:"12345"
sales_valuenumber

Total sales amount including tax

Example:2000
sales_value_wo_vatnumber

Total sales amount without tax

Example:1600
currencystring

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

Example:"EUR"
rebatenumber

Amount of rebate given including tax

Example:0
rebate_wo_vatnumber

Amount of rebate given without tax

Example:0
customer_idstring

Customer ID for identified customer

Example:"32"
delivery_customer_idstring

Delivery Customer ID for identified customer

Example:"32"
cancel_idstring

Transaction ID of cancelled receipt

Example:"er/232/f2"
cancelledboolean

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

Example:false
custom_field_1string

Field that can be used for custom dimensions

Example:"XYZ"
custom_field_2string

Field that can be used for custom dimensions

Example:"XYZ"
custom_field_3string

Field that can be used for custom dimensions

Example:"XYZ"
custom_field_4string

Field that can be used for custom dimensions

Example:"XYZ"
custom_field_5string

Field that can be used for custom dimensions

Example:"XYZ"
custom_field_6string

Field that can be used for custom dimensions

Example:"XYZ"
custom_field_7string

Field that can be used for custom dimensions

Example:"XYZ"
custom_field_8string

Field that can be used for custom dimensions

Example:"XYZ"
custom_field_9string

Field that can be used for custom dimensions

Example:"XYZ"
custom_field_10string

Field that can be used for custom dimensions

Example:"XYZ"
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/salesPayments?dryRun=false&separator=%3B&encoding=utf-8' \
  -H 'Authorization: Bearer <YOUR_token_HERE>' \
  -H 'Content-Type: application/json' \
  -d '{
    "transaction_id": "er/232/f31",
    "line_item_id": "1",
    "sales_date": "2016-01-01",
    "sales_time": "15:00:00",
    "organisation_id": "540",
    "department_id": "5401",
    "salesperson_id": "5402101",
    "register_id": "32",
    "table_number": "54",
    "payment_method": "Invoice",
    "giftcard_payment_id": "12345",
    "sales_value": 2000,
    "sales_value_wo_vat": 1600,
    "currency": "EUR",
    "rebate": 0,
    "rebate_wo_vat": 0,
    "customer_id": "32",
    "delivery_customer_id": "32",
    "cancel_id": "er/232/f2",
    "cancelled": false,
    "custom_field_1": "XYZ",
    "custom_field_2": "XYZ",
    "custom_field_3": "XYZ",
    "custom_field_4": "XYZ",
    "custom_field_5": "XYZ",
    "custom_field_6": "XYZ",
    "custom_field_7": "XYZ",
    "custom_field_8": "XYZ",
    "custom_field_9": "XYZ",
    "custom_field_10": "XYZ",
    "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" }