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" : 1714091732765
}

Stores

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

Pricelists

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

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" : 1714091732865
}

Currencies

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

Customers

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

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" : 1714091732872
}

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" : 1714091732872
}

Payment terms

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

Costcenters

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

Customer orders

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

Supplier

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

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" : 1714091732875
}