Events
What changed in the store over the last 30 days, with the record as it is now. The same events go to webhook endpoints.
Events
Objects
Event
idintegerrequiredID of the event; deliveries send it as webhook-id. Events are kept for 30 days.
typestringrequiredType of the event: order.created, order.updated, order.status_changed, order.paid, order.cancelled; payment.created, payment.succeeded, payment.status_changed, payment.updated; refund.created, refund.completed, refund.status_changed, refund.updated; product.created, product.updated, product.deleted; inventory_level.updated; customer.created, customer.updated, customer.deleted; fiscal_document.created, fiscal_document.updated, fiscal_document.issued, fiscal_document.failed, fiscal_document.annulled; tax_period.status_changed; bulk_operation.finished.
- Values:
order.createdorder.updatedorder.status_changedorder.paidorder.cancelledpayment.createdpayment.succeededpayment.status_changedpayment.updatedrefund.createdrefund.completedrefund.status_changedrefund.updatedfiscal_document.createdfiscal_document.updatedfiscal_document.issuedfiscal_document.failedfiscal_document.annulledtax_period.status_changedmoney_transaction.createdmoney_transaction.updatedmoney_transaction.deletedpos_shift.openedpos_shift.closedpos_shift.updatedpos_cash_movement.createdgift_card.createdgift_card.updatedgift_card_transaction.createdcustomer_account.createdcustomer_account.updatedcustomer_account_entry.createdcustomer_account_entry.updatedsupplier.createdsupplier.updatedsupplier.deletedsupplier_bill.createdsupplier_bill.updatedsupplier_bill.postedsupplier_bill.voidedsupplier_bill.deletedsupplier_bill_payment.createdsupplier_bill_payment.updatedsupplier_bill_payment.deletedsettlement_agreement.createdsettlement_agreement.updatedsettlement_agreement.deletedsettlement_offset.createdsettlement_offset.updatedsettlement_offset.voidedpurchase_order.createdpurchase_order.updatedpurchase_order.status_changedpurchase_order.deletedgoods_receipt.createdgoods_receipt.updatedgoods_receipt.voidedsupplier_return.createdsupplier_return.updatedsupplier_return.status_changedsupplier_return.deletedconsignment_settlement.createdconsignment_settlement.updatedconsignment_settlement.postedconsignment_settlement.voidedtax_withholding.createdtax_withholding.updatedtax_withholding.annulledtax_withholding.deletedproduct.createdproduct.updatedproduct.deletedinventory_level.updatedstock_movement.createdstock_movement.updatedlot.createdlot.updatedlot.deletedlocation_transfer.createdlocation_transfer.updatedstocktake.createdstocktake.status_changedstocktake.updatedcustomer.createdcustomer.updatedcustomer.deletedcustomer_group.createdcustomer_group.updatedcustomer_group.deletedprice_list.createdprice_list.updatedprice_list.deletedbulk_operation.finished
created_atstring (date-time)requiredWhen the change happened.
actorobjectrequiredWho made the change.
Fields · 2
typestringrequiredintegration_app — an app (actor.id is its id from /v1/me); operator — a staff member; customer; courier; device — a register or another device of the store; supplier; system — automation.
- Values:
integration_appoperatorcustomercourierdevicesuppliersystem
idinteger or nullrequiredID of the actor among its kind; null for system.
request_idstring or nullrequiredID of the request of this app that made the change (X-Request-Id): by it the app recognizes its own changes. null when the change is not by this app.
dataobjectrequiredWhat the event is about.
Fields · 3
idintegerrequiredID of the record.
objectOrder or Payment or Refund or FiscalDocument or TaxPeriod or TaxWithholding or MoneyTransaction or PosShift or PosCashMovement or GiftCard or GiftCardTransaction or CustomerAccount or CustomerAccountEntry or Supplier or SupplierBill or SupplierBillPayment or SettlementAgreement or SettlementOffset or PurchaseOrder or GoodsReceipt or SupplierReturn or ConsignmentSettlement or Product or InventoryLevel or StockMovement or Lot or LocationTransfer or Stocktake or Customer or CustomerGroup or PriceList or BulkOperation or nullrequiredThe record as it is now: the same object as its endpoint in /v1 returns, with fields by the scopes of the app. null when the record is gone. Events can arrive out of order: version of the object tells which is newer.
- New event types add variants
previous_attributesobject or nullrequiredPrevious values of the fields the event is about; null when the event has none.
Fields · 1
statusstringrequiredPrevious status: of the order in order.status_changed, of the tax period in tax_period.status_changed, of the document in fiscal_document.failed.
Endpoints
List store events of the last 30 days: what changed in orders, payments, refunds, fiscal documents, tax periods, products, stock and customers, with the record as it is now
get/events
Scope: webhooks:read
Parameters
Query
limitintegerPage size: up to 250 records; 50 by default.
- Minimum:
- 1
- Maximum:
- 250
cursorstringOpaque cursor: next_cursor of the previous page, or sync_cursor of the last page saved by the previous sync. The list goes in commit order, so the sync cursor later returns only what changed after it.
- Max length:
- 4096
typestringOnly events of this type, such as order.paid.
- Values:
order.createdorder.updatedorder.status_changedorder.paidorder.cancelledpayment.createdpayment.succeededpayment.status_changedpayment.updatedrefund.createdrefund.completedrefund.status_changedrefund.updatedfiscal_document.createdfiscal_document.updatedfiscal_document.issuedfiscal_document.failedfiscal_document.annulledtax_period.status_changedmoney_transaction.createdmoney_transaction.updatedmoney_transaction.deletedpos_shift.openedpos_shift.closedpos_shift.updatedpos_cash_movement.createdgift_card.createdgift_card.updatedgift_card_transaction.createdcustomer_account.createdcustomer_account.updatedcustomer_account_entry.createdcustomer_account_entry.updatedsupplier.createdsupplier.updatedsupplier.deletedsupplier_bill.createdsupplier_bill.updatedsupplier_bill.postedsupplier_bill.voidedsupplier_bill.deletedsupplier_bill_payment.createdsupplier_bill_payment.updatedsupplier_bill_payment.deletedsettlement_agreement.createdsettlement_agreement.updatedsettlement_agreement.deletedsettlement_offset.createdsettlement_offset.updatedsettlement_offset.voidedpurchase_order.createdpurchase_order.updatedpurchase_order.status_changedpurchase_order.deletedgoods_receipt.createdgoods_receipt.updatedgoods_receipt.voidedsupplier_return.createdsupplier_return.updatedsupplier_return.status_changedsupplier_return.deletedconsignment_settlement.createdconsignment_settlement.updatedconsignment_settlement.postedconsignment_settlement.voidedtax_withholding.createdtax_withholding.updatedtax_withholding.annulledtax_withholding.deletedproduct.createdproduct.updatedproduct.deletedinventory_level.updatedstock_movement.createdstock_movement.updatedlot.createdlot.updatedlot.deletedlocation_transfer.createdlocation_transfer.updatedstocktake.createdstocktake.status_changedstocktake.updatedcustomer.createdcustomer.updatedcustomer.deletedcustomer_group.createdcustomer_group.updatedcustomer_group.deletedprice_list.createdprice_list.updatedprice_list.deletedbulk_operation.finished
created_sincestring (date-time)Only events created after this moment.
- Pattern:
^\d{4}-\d{2}-\d{2}T\d{2}:\d{2}:\d{2}(\.\d{1,6})?(Z|[+-]\d{2}:\d{2})$
Responses
200Success
application/json
Records of the page.
deletedarray of objectrequiredRecords erased from the database since the cursor, as tombstones: only with include_deleted=true in the continuation by the sync cursor.
Fields · 2
idintegerrequiredID of the erased record.
deleted_atstring (date-time)requiredWhen the record was erased.
next_cursorstring or nullrequiredCursor of the next page; null on the last page.
has_morebooleanrequiredtrue when there is a next page.
sync_cursorstring or nullrequiredOn the last page — the cursor to continue from later: it returns only what changed after this page. null on other pages.
401The token is missing, invalid, expired or revoked
Headers
WWW-AuthenticatestringrequiredAuthentication scheme (RFC 6750).
- Example:
Bearer
application/problem+json
Returns Problem
403The plan, the IP address or the token scopes do not allow the request
Headers
WWW-AuthenticatestringAuthentication scheme (RFC 6750).
- Example:
Bearer error="insufficient_scope", scope="locations:read"
application/problem+json
Returns ForbiddenProblem
410The sync cursor is older than the deletion retention period or was issued before the database was restored
application/problem+json
Returns Problem
422A parameter is invalid or unknown
application/problem+json
Returns ValidationProblem
429The rate limit is exhausted
Headers
Retry-AfterintegerrequiredSeconds to wait before retrying.
- Minimum:
- 0
application/problem+json
Returns RateLimitProblem
503The store is temporarily unavailable
Headers
Retry-AfterintegerSeconds to wait before retrying.
- Minimum:
- 0
application/problem+json
Returns Problem
Errors of this endpoint
Common errors such as token, access, input validation and rate limit can come from any endpoint; they are listed in the catalog: Errors
curl "https://api.saleya.app/v1/events" \
-H "Authorization: Bearer $SALEYA_API_TOKEN"{
"data": [
{
"id": 0,
"type": "order.created",
"created_at": "2026-01-15T12:00:00Z",
"actor": {
"type": "integration_app",
"id": 0
},
"request_id": "string",
"data": {
"id": 0,
"object": {
"id": 0,
"number": "string",
"channel": "web",
"app_id": 0,
"location_id": 0,
"legal_entity_id": 0,
"status": "string",
"status_group": "pos_open",
"payment_status": "unpaid",
"sale_type": "retail",
"currency": "string",
"items_total": 0,
"discount": 0,
"applied_discounts": [
{
"id": 0,
"source": "promocode",
"kind": "promo",
"name": {},
"code": "string",
"reason": "string",
"order_item_id": 0,
"amount": 0
}
],
"delivery_cost": 0,
"delivery_discount": 0,
"delivery_discounts": [
{
"id": 0,
"source": "promocode",
"kind": "promo",
"name": {},
"code": "string",
"amount": 0
}
],
"delivery_tax_lines": [
{
"regime": "vat",
"kind": "taxed",
"rate_bps": 0,
"base": 0,
"amount": 0,
"jurisdiction": "string"
}
],
"platform_discount": 0,
"platform_service_fee": 0,
"platform_delivery_fee": 0,
"total": 0,
"tax_lines": [
{
"regime": "vat",
"kind": "taxed",
"rate_bps": 0,
"base": 0,
"amount": 0,
"jurisdiction": "string"
}
],
"gift_card_issue_amount": 0,
"reservation_deposit_amount": 0,
"account_payment_amount": 0,
"service_package_issue_amount": 0,
"payment_method": "cash",
"manual_payment_method_id": 0,
"delivery_method_id": 0,
"fulfilment_type": "self_pickup",
"delivery_slots": [
{
"from": "string",
"to": "string"
}
],
"shipment": {
"carrier": "andreani",
"carrier_name": "string",
"tracking_number": "string",
"tracking_url": "string",
"status": "accepted",
"status_at": "2026-01-15T12:00:00Z",
"events": [
{
"status": "accepted",
"description": "string",
"occurred_at": "2026-01-15T12:00:00Z"
}
],
"label_available": true
},
"previous_shipments": [
{
"carrier": "andreani",
"carrier_name": "string",
"tracking_number": "string",
"tracking_url": "string",
"status": "accepted",
"status_at": "2026-01-15T12:00:00Z",
"events": [
{
"status": "accepted",
"description": "string",
"occurred_at": "2026-01-15T12:00:00Z"
}
]
}
],
"shipment_attempt": {
"state": "queued",
"started_at": "2026-01-15T12:00:00Z",
"error": {
"code": "no_carrier",
"message": "string"
}
},
"merged_into_order_id": 0,
"cancel_reason": "payment_init_failed",
"items": [
{
"id": 0,
"variant_id": 0,
"product_id": 0,
"product_name": {
"key": "string"
},
"variant_name": {
"key": "string"
},
"quantity": "string",
"unit": "pcs",
"unit_price": 0,
"total": 0,
"discount": 0,
"discount_allocations": [
{
"applied_discount_id": 0,
"amount": 0
}
],
"is_gift": true,
"tax_lines": [
{
"regime": "vat",
"kind": "taxed",
"rate_bps": 0,
"base": 0,
"amount": 0,
"jurisdiction": "string"
}
],
"cost_amount": 0,
"cost_basis": "variant"
}
],
"customer": {
"id": 0,
"name": "string",
"phone": "string",
"email": "string"
},
"delivery_address": {
"kind": "address",
"recipient": "string",
"phone": "string",
"street": "string",
"house": "string",
"apartment": "string",
"floor": "string",
"entrance": "string",
"district": "string",
"city": "string",
"province": "string",
"postal_code": "string",
"address_line": "string",
"comment": "string",
"location": {
"lat": 0,
"lng": 0
},
"branch": {
"external_id": "string",
"name": "string"
}
},
"customer_comment": "string",
"fiscal_receptor": {
"id_type": "tax_id",
"id_number": "string",
"name": "string",
"tax_status": "registered",
"address": "string"
},
"external_fiscal_document": {
"issuer": "string",
"status": "pending",
"number": "string"
},
"placed_at": "2026-01-15T12:00:00Z",
"confirmed_at": "2026-01-15T12:00:00Z",
"completed_at": "2026-01-15T12:00:00Z",
"cancelled_at": "2026-01-15T12:00:00Z",
"refunded_at": "2026-01-15T12:00:00Z",
"created_at": "2026-01-15T12:00:00Z",
"updated_at": "2026-01-15T12:00:00Z"
},
"previous_attributes": {
"status": "string"
}
}
}
],
"deleted": [
{
"id": 0,
"deleted_at": "2026-01-15T12:00:00Z"
}
],
"next_cursor": "string",
"has_more": true,
"sync_cursor": "string"
}