Callbacks

Callbacks:

Callbacks are made from Lagerkoll when data has been created, updated or deleted, IF you have entered a callback-url when activating the API.
Valid actions are: created, updated and deleted
Url: <<CALLBACK_URL>>
Method: POST

Articles

Callback when articles are created, updated or deleted
Body:
                    {
  "type" : "article",
  "action" : "created",
  "articleId" : "192005-6",
  "storeId" : 186008,
  "storeGroupId" : 192005,
  "timestamp" : 1732184090244
}

Stores

Callback when stores are created, updated or deleted
Body:
                    {
  "type" : "store",
  "action" : "deleted",
  "storeId" : 186008,
  "storeGroupId" : 192005,
  "timestamp" : 1732184090245
}

Pricelists

Callback when pricelists are created, updated or deleted
Body:
                    {
  "type" : "pricelist",
  "action" : "created",
  "storeGroupId" : 192005,
  "pricelistId" : 1,
  "timestamp" : 1732184090245
}

Prices

Callback when prices are created, updated or deleted from an article
Body:
                    {
  "type" : "price",
  "action" : "created",
  "storeGroupId" : 192005,
  "pricelistId" : 1,
  "articleId" : "192005-6",
  "fromQuantity" : 10.0,
  "timestamp" : 1732184090245
}

Currencies

Callback when currencies are updated
Body:
                    {
  "type" : "currency",
  "action" : "updated",
  "storeGroupId" : 1,
  "timestamp" : 1732184090245
}

Customers

Callback when customers are created, updated or deleted
Body:
                    {
  "type" : "customer",
  "action" : "created",
  "customerId" : 2,
  "storeId" : 186008,
  "storeGroupId" : 192005,
  "timestamp" : 1732184090245
}

Customer delivery terms

Callback when customer delivery terms are created, updated or deleted
Body:
                    {
  "type" : "customer_delivery_term",
  "action" : "created",
  "code" : "CFR",
  "storeId" : 186008,
  "storeGroupId" : 192005,
  "timestamp" : 1732184090246
}

Way of deliveries

Callback when way of deliveries are created, updated or deleted
Body:
                    {
  "type" : "way_of_delivery",
  "action" : "created",
  "code" : "FK",
  "storeId" : 186008,
  "storeGroupId" : 192005,
  "timestamp" : 1732184090246
}

Payment terms

Callback when payment terms are created, updated or deleted
Body:
                    {
  "type" : "payment_term",
  "action" : "created",
  "code" : "10",
  "storeId" : 186008,
  "storeGroupId" : 192005,
  "timestamp" : 1732184090246
}

Costcenters

Callback when costcenters are created, updated or deleted
Body:
                    {
  "type" : "cost_center",
  "action" : "created",
  "costCenterId" : 34,
  "storeId" : 186008,
  "storeGroupId" : 192005,
  "timestamp" : 1732184090246
}

Customer orders

Callback when customer orders are created, updated or deleted
Body:
                    {
  "type" : "customer_order",
  "action" : "created",
  "customerOrderId" : 124,
  "storeId" : 186008,
  "storeGroupId" : 192005,
  "timestamp" : 1732184090246,
  "previousState" : 0
}

Supplier

Callback when suppliers are created, updated or deleted
Body:
                    {
  "type" : "supplier",
  "action" : "created",
  "supplierId" : 73,
  "storeId" : 186008,
  "storeGroupId" : 192005,
  "timestamp" : 1732184090246
}

Supplier delivery terms

Callback when supplier delivery terms are created, updated or deleted
Body:
                    {
  "type" : "supplier_delivery_term",
  "action" : "created",
  "code" : "CFR",
  "storeId" : 186008,
  "storeGroupId" : 192005,
  "timestamp" : 1732184090246
}