Skip to content

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

Request

POST https://api.zoined.com/inventoryTransactions?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:
organisation_idstringrequired

Organisation / Store ID

Example:"540"
department_idstring

Department ID

Example:"54011"
salesperson_idstring

Sales person ID

Example:"5401"
operator_idstring

Operator ID

Example:"5402"
movement_datestringrequired

Date of transaction (yyyy-mm-dd)

Example:"2016-02-01"
movement_timestring

Time of transaction (HH:mm:ss).

Example:"15:00:00"
delivered_datestring

Date of transaction completion (yyyy-mm-dd)

Example:"2016-02-02"
delivered_timestring

Time of transaction completion (HH:mm:ss).

Example:"15:00:00"
product_idstring

1 (string, required) - Product ID

Example:"123"
supplier_idstring

Supplier ID

Example:"221"
parent_product_idstring

Parent Product ID

Example:"123"
quantitynumberrequired

Quantity moved from/to inventory

Example:100
delivered_quantitynumber

Final quantity moved from/to inventory after completion.

Example:90
expected_quantitynumber

Quantity expected in inventory (for stock takes).

Example:110
movement_typestringrequired

Movement type

Enum ValueDescription
purchase

Products have been purchased to inventory

waste

Products have been removed from inventory as waste

transfer

Products have been transferred to another inventory location

stock_take

Stock take has been done to correct inventory counts

adjustment

Adjustments have been done to individual products to correct inventory counts

sale

Products have been sold from inventory

internal

Products have been used internally from inventory

Example:"waste"
movement_statusnumber

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

Example:2
movement_batch_idstring

Optional identifier for batch this movement row is part of.

Example:"june-stock-take"
movement_batch_line_idstring

Optional line id within the batch this movement row is part of.

Example:"1"
unit_purchase_pricenumber

Unit purchase price

Example:12.4
unit_purchase_price_wo_vatnumber

Unit purchase price without tax

Example:10
unit_retail_pricenumber

Unit retail (sales) price

Example:12.4
unit_retail_price_wo_vatnumber

Unit retail (sales) price without tax

Example:10
reason_codestring

Optional reason code or description for this transaction

Example:"Theft"
target_organisation_idstring

Organisation / Store ID for target of inventory transfer. Mandatory for type transfer.

Example:"510"
currencystring

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

Example:"EUR"
purchase_order_idstring

Order id for purchase order this purchase movement originates from.

Example:"1234"
purchase_order_line_idstring

Order line item id in purchase order this purchase movement line item originates from.

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_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
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/inventoryTransactions?dryRun=false&separator=%3B&encoding=utf-8' \
  -H 'Authorization: Bearer <YOUR_token_HERE>' \
  -H 'Content-Type: application/json' \
  -d '{
    "organisation_id": "540",
    "department_id": "54011",
    "salesperson_id": "5401",
    "operator_id": "5402",
    "movement_date": "2016-02-01",
    "movement_time": "15:00:00",
    "delivered_date": "2016-02-02",
    "delivered_time": "15:00:00",
    "product_id": "123",
    "supplier_id": "221",
    "parent_product_id": "123",
    "quantity": 100,
    "delivered_quantity": 90,
    "expected_quantity": 110,
    "movement_type": "waste",
    "movement_status": 2,
    "movement_batch_id": "june-stock-take",
    "movement_batch_line_id": "1",
    "unit_purchase_price": 12.4,
    "unit_purchase_price_wo_vat": 10,
    "unit_retail_price": 12.4,
    "unit_retail_price_wo_vat": 10,
    "reason_code": "Theft",
    "target_organisation_id": "510",
    "currency": "EUR",
    "purchase_order_id": "1234",
    "purchase_order_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_metric_1": 1,
    "custom_metric_2": 100,
    "custom_metric_3": 2.2,
    "custom_metric_4": 1.05,
    "custom_metric_5": 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" }