Sitoo Events SPI

Add Events

post /events

Endpoint for receiving events from Sitoo Platform

REQUEST BODY
array
REQUIRED

Array of Event objects

Event
post/events
[
{
"event_id": "5e9fd002119a4c5fb4de5ccb9d0b90ea",
"event_type": "order",
"event_date": 1611138542,
"account_id": 1500,
"data": {
"eshop_id": 1,
"order_id": 12345,
"order_event_type": "update",
"order_state_changed": "closed"
}
}
]
HTTP Status Code Summary
200Successful. Returns empty body
400Invalid request. Data sent from client is invalid. This response code will discard the events and they will not be sent again
401Missing or bad authentication. This response code will discard the events and they will not be sent again
500Internal Server Error

Objects

Event
object

PROPERTIES
event_id
string
REQUIRED

UUID for the event

event_type
string
REQUIRED

Type of event, the data attribute will hold a corresponding object. Note that the booking type is using the OrderData object and shipment-v3 is using the ShipmentV3Data object

VALUES
order
order-delivery
booking
shipment
shipment-v3
warehouse-transaction
z-report
store-z-report
event_date
integer
REQUIRED

Unix timestamp for when the event was created

account_id
integer
REQUIRED

ID for the Sitoo account

data
object
REQUIRED

The instance data for the event, corresponding to the event_type

OrderData
object

PROPERTIES
eshop_id
integer
REQUIRED

The Sitoo ID of the eshop (site)

order_id
integer
REQUIRED

The Sitoo ID of the order

warehouse_id
integer

The Sitoo ID of the warehouse

order_event_type
string
REQUIRED

The type of order event

VALUES
add
update
ready-for-pickup
pickup-rejected
email-receipt
order_state_changed
string

If the event caused the order state to change, this property will hold the new value

VALUES
open
closed
cancelled

OrderDeliveryData
object

PROPERTIES
eshop_id
integer
REQUIRED

The Sitoo ID of the eshop (site)

order_id
integer
REQUIRED

The Sitoo ID of the order

order_delivery_id
integer
REQUIRED

The Sitoo ID of the order delivery

warehouse_id
integer

The Sitoo ID of the warehouse for the order delivery. Note that this can differ from the warehouse_id of the order

order_delivery_state_changed
string

If the event caused the order delivery state to change, this property will hold the new value

VALUES
new
ready-to-ship
in-transit
arrived
ready-for-pickup
delivered
cancelled
delivery_type
string
REQUIRED

The type of order delivery event

VALUES
add
update
cancel

ShipmentData
object

PROPERTIES
shipment_id
integer
REQUIRED

The Sitoo ID of the shipment

shipment_event_type
string
REQUIRED

The type of shipment event

VALUES
add
update
shipment_state_changed
string

If the event caused the shipment state to change, this property will hold the new value

VALUES
new
in-transit
received
cancelled

ShipmentV3Data
object

Object sent for events from Shipments v3, all properties will hold the values after the event has occurred.

PROPERTIES
shipment_id
string
REQUIRED

Unique ID of the shipment in Sitoo

shipment_version
integer
REQUIRED

Version of the shipment

shipment_event_type
string
REQUIRED

The type of shipment event

VALUES
create
set-state
set-info
add-package
update-package
delete-package
add-arrived-packages
add-received-items
add-received-items-undeclared
remove-stock
shipment_state
string
REQUIRED

The state of the shipment

VALUES
new
packed
transport-ordered
ready-for-pickup
in-transit
arrived
received
closed
closed-incomplete
cancelled
all_packages_arrived
boolean
REQUIRED

All packages have arrived

all_items_received
boolean
REQUIRED

All items have been received

total_item_undeclared_quantity
integer
REQUIRED

The total number of received items not declared for the shipment

StoreZReportData
object

PROPERTIES
store_zreport_id
string
REQUIRED

UUID for the Store Z-report

store_id
string
REQUIRED

Store ID (external ID of the Store in Sitoo)

WarehouseTransactionData
object

PROPERTIES
warehouse_transaction_id
integer
REQUIRED

The ID of the warehouse transaction in Sitoo

warehouse_id
integer
REQUIRED

The ID of the warehouse for the transaction in Sitoo

warehouse_external_id
string

The External ID of the warehouse for the transaction

transaction_type
string
REQUIRED

The type of warehouse transaction

VALUES
manual-in
manual-out
sales
refund
stock-taking

ZReportData
object

PROPERTIES
eshop_id
integer
REQUIRED

The Sitoo ID of the eshop (site)

store_id
string

Store ID (external ID of the Store in Sitoo)

register_id
string
REQUIRED

The Sitoo ID of the register that created the Z-report

zreport_id
integer
REQUIRED

The Sitoo ID of the Z-report