Getting started for POS


We are introducing the following APIs for managing coupons, stamp cards, adding new members, and updating member transactions. This document outlines the primary functionalities. For comprehensive documentation and example responses, please refer to: Diller API Documentation.

Authentication: Diller API v2 uses OpenId/OAuth 2.0 for client authentication.

Each POS register should be configured with a Client ID and Client Secret for authentication. Including a parameter for the department ID is beneficial to identify the origin of all members and transactions.

We recommend creating a small UI in the cash-register to configure the integration for easier setup.

Configuration APIs:

  1. GET /api/v2.0/stores

    • Retrieve store information. Save the store ID for future use.

  2. GET /api/v2.0/stores/{storeId}/departments

    • Retrieve a list of departments for the store. Select the one you are going to use and save the department ID for future use.

API Usage Workflow:

  1. Member Search and Enrollment:

    • GET /api/v2.0/stores/{storeId}/members/search

      • We support search by :

        • Phone

        • personal identification number (SSN)

        • Drivers-license (Sweden) (QR or Barcode)

        • Email

        • Any additionalID you can utilize

      • Search for a member. If not found, enroll the member.

    • POST /api/v2.0/stores/{storeId}/members/enroll

      • Enroll a new member.

      • The member will receive an sms on their phone within seconds to finish the registration and update their preferances.

  2. If member found : Retrieve Coupons and Stamp Cards:

    • GET /api/v2.0/stores/{storeId}/members/{memberId}/coupons

    • GET /api/v2.0/stores/{storeId}/members/{memberId}/stamp-cards

  3. POS Calculation:

    • Calculate and apply discounts for coupons (either % or fixed amount).

      • do NOT calculate % discount on items with discounts. (Stamp-card or coupons) This would result in doublediscount and is NOT reccomended.

      • If the basket contains items with both stamp-carded/couponed items and other items eligble for % or fixed discount. Calculate separately, leaving already discounted items out.

    • If a product ID is attached to a coupon, the discount is valid only for those products and can be applied automatically.

    • If no product ID is attached, the coupon is valid for the entire purchase. A UI prompt should ask for coupon usage. Remember the above statement regarding doublediscounts.

    • Apply stamp card logic. Each product in the purchase corresponding to a stamp card should earn a stamp.

  4. Stamp Card Usage:

    • If required_stamps - stamps_collected > 0, the card can be used. When stamping, ensure that when available stamps reach 0, the product is free (100% discount).

    • If stamp.is_restartable=true, counting can restart from the required stamps number again.

    • If stamp.is_restartable=false, the stamp card can only be used once. When available stamps = 0, it is no longer usable.

  5. Point system

    • The point-system in Diller is 100% managed from retailer-app.

    • If the integration is set up correctly in terms of stamp-card usage and couponusage, the point system will work as it is supposed to.

  6. Transaction Updates:

    • POST /api/v2.0/stores/{storeId}/members/{memberId}/transactions

      • Add purchase information to Diller, including the usage of coupons and stamp cards.

  7. Handling Returns:

    • If the previous transactionId is stored, cancel it in Diller. For partial returns, cancel everything and send the remainder as a new transaction.

      • POST /api/v2.0/stores/{storeId}/transactions/{transactionId}/cancel

    • If the previous transactionId is not available, send a new transaction with a negative amount for the returned products (and the total amount negative as well).

Test Environment:

Production Environment:

For any further assistance or queries, please refer to the full API documentation or contact our support team.