Generic POS Plugin

Submit Order Webhook – JSON Payload Reference

Contents

Overview

When a new order is confirmed in Scanfie, the Generic POS plugin sends an HTTP POST request to the configured endpoint. The request body is a JSON document that represents the submitted order.


Root object

FieldTypeDescription
order Object The order that was submitted. See Order object.

Example

{
  "order": { ... }
}

Order object

FieldTypeDescription
orderId Integer Numeric identifier of the order within Scanfie.
internalId String UUID / internal identifier of the order.
totalPrice Decimal Total price of the order including VAT.
items Array<Object> The confirmed order lines. See Order item object.

Example

{
  "order": {
    "orderId": 1042,
    "internalId": "a1b2c3d4-e5f6-7890-abcd-ef1234567890",
    "totalPrice": 24.50,
    "items": [ ... ]
  }
}

Order item object

Each entry in the items array represents one confirmed order line.

FieldTypeDescription
dtTurnover String (ISO 8601 UTC) Turnover timestamp in UTC, e.g. "2024-06-01T18:30:00.000Z".
internalId String UUID / internal identifier of the order line.
quantity Integer Number of items ordered.
storedPrice Decimal Stored price of the item including VAT at the moment the order was placed.
storedNettPrice Decimal Stored net price of the item excluding VAT at the moment the order was placed.
product Object | null Product details. See Product object.
productGroup Object | null Product group the item belongs to. See Product group object.
turnoverGroup Object | null Turnover group the item belongs to. See Turnover group object.

Example

{
  "dtTurnover": "2024-06-01T18:30:00.000Z",
  "internalId": "f1e2d3c4-b5a6-7890-abcd-123456789abc",
  "quantity": 2,
  "storedPrice": 12.25,
  "storedNettPrice": 10.12,
  "product": { ... },
  "productGroup": { ... },
  "turnoverGroup": { ... }
}

Product object

FieldTypeDescription
name String Display name of the product.
internalId String Internal UUID of the product in Scanfie.
externalId String | null External identifier as configured in the product settings.
eanSku String | null EAN / SKU barcode of the product.
priceIn Decimal Sales price including VAT.
priceEx Decimal Net price excluding VAT.
vat Decimal VAT percentage, e.g. 21.0 for 21%.
productGroupName String | null Name of the product group the product belongs to.
turnoverGroup Integer | null Numeric turnover group number.
turnoverGroupExternalId String | null External identifier of the turnover group.

Example

{
  "name": "Cola 33cl",
  "internalId": "9c8b7a6d-5e4f-3210-fedc-ba9876543210",
  "externalId": "EXT-COLA-33",
  "eanSku": "5449000000996",
  "priceIn": 3.50,
  "priceEx": 2.89,
  "vat": 21.0,
  "productGroupName": "Frisdranken",
  "turnoverGroup": 1,
  "turnoverGroupExternalId": "TG-DRANK"
}

Product group object

FieldTypeDescription
internalId String Internal UUID of the product group in Scanfie.
name String Display name of the product group.
externalId String | null External identifier as configured in the product group settings.

Example

{
  "internalId": "1a2b3c4d-5e6f-7890-abcd-ef0123456789",
  "name": "Frisdranken",
  "externalId": "PG-DRINKS"
}

Turnover group object

FieldTypeDescription
name String | null Display name of the turnover group.
turnoverGroupNumber Integer | null Numeric turnover group number.
externalId String | null External identifier of the turnover group.
Note: The turnoverGroup field on an order item is omitted (null) when neither a turnover group number nor an external ID is set on the product.

Example

{
  "name": "Dranken",
  "turnoverGroupNumber": 1,
  "externalId": "TG-DRANK"
}

Full example payload

{
  "order": {
    "orderId": 1042,
    "internalId": "a1b2c3d4-e5f6-7890-abcd-ef1234567890",
    "totalPrice": 7.00,
    "items": [
      {
        "dtTurnover": "2024-06-01T18:30:00.000Z",
        "internalId": "f1e2d3c4-b5a6-7890-abcd-123456789abc",
        "quantity": 2,
        "storedPrice": 3.50,
        "storedNettPrice": 2.89,
        "product": {
          "name": "Cola 33cl",
          "internalId": "9c8b7a6d-5e4f-3210-fedc-ba9876543210",
          "externalId": "EXT-COLA-33",
          "eanSku": "5449000000996",
          "priceIn": 3.50,
          "priceEx": 2.89,
          "vat": 21.0,
          "productGroupName": "Frisdranken",
          "turnoverGroup": 1,
          "turnoverGroupExternalId": "TG-DRANK"
        },
        "productGroup": {
          "internalId": "1a2b3c4d-5e6f-7890-abcd-ef0123456789",
          "name": "Frisdranken",
          "externalId": "PG-DRINKS"
        },
        "turnoverGroup": {
          "name": "Dranken",
          "turnoverGroupNumber": 1,
          "externalId": "TG-DRANK"
        }
      }
    ]
  }
}

Notes