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:
Set up Basic POST request and add a API Key to the
Authorizationheader.Submit an order
Endpoint:NONE/api/pos
Complete Sale Request
{
SaleId: "SL0002",
CustomerId: "A1000",
PromotionsToApply: [ "PROMO01289" ]
Positions: [ {
Product: {
ProductId: "PRD3491",
BasePricePerUnit: 6.0,
}
Amount: 2,
}
]
}
Complete Sale Response
{
"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
}
]
}