Skip to main content
Skip table of contents

Submit an order

This example will guide you in submiting your first order to the EpisXperience platform. This order can trigger one or many journeys.

To submit an order a user must use /api/pos endpoint.

POS endpoint leverages session-less REST protocol designed to simplify interconnection between a point-of-sale terminal in retail store or eCommerce platform and the EpisXperience platform.​ All relevant data is included in a single JSON document send to the EpisXperience platform and received back in a simple request-response pattern. There is one type of JSON document send by the POS and one type received by the POS.​

Steps:

  1. Set up Basic POST request and add a API Key to the Authorization header.

  2. Submit an order
    Endpoint:

    NONE
    /api/pos

Complete Sale Request

JSON
{
    SaleId: "SL0002",
    CustomerId: "A1000",
    PromotionsToApply: [ "PROMO01289" ]
    Positions: [ {
                  Product: {
                        ProductId: "PRD3491",
                        BasePricePerUnit: 6.0,
                  }
                  Amount: 2,
            }
      ]
}

Complete Sale Response

CODE
{
  "saleId": "SL0002",
  "dateTime": "2023-04-17 13:30",
  "customerId": "A1000",
  "success": true,
  "positions": [ {
    "Product": {
    "ProductCode": "PRD3491",
    "BasePricePerUnit": 6.0,
     }
   "Amount": 2,
   }]
  "Balance": [ {
    "Value": 500,
    "currency": points
    }
  ]
}
JavaScript errors detected

Please note, these errors can depend on your browser setup.

If this problem persists, please contact our support.