These request parameters define the order details sent by the e-commerce platform.
Parameter |
Type |
Allowed Regex |
Min Length |
Max Length |
Default Value |
Mandatory |
OrderID |
String |
^[A-Za-z0-9]{5,10}$ |
5 |
20 |
- |
✅ |
CustomerID |
String |
[^[A-Za-z0-9]{5,10}$ |
5 |
20 |
- |
✅ |
ProductID |
String |
^[A-Za-z0-9]{5,10}$ |
5 |
20 |
- |
✅ |
Quantity |
Integer |
\d+ |
1 |
5 |
1 |
✅ |
OrderDate |
Date |
^[A-Za-z0-9]{5,10}$ |
- |
- |
- |
✅ |
These response parameters define the order confirmation details returned to the e-commerce platform.
Parameter |
Mandatory |
Status |
✅ |
OrderReference |
✅ |
Qntrl uses the soapRequest object to process the request and extract values.
let orderID = soapRequest.getParam("OrderID");
let customerID = soapRequest.getParam("CustomerID");
let productID = soapRequest.getParam("ProductID");
let quantity = soapRequest.getParam("Quantity");
let orderDate = soapRequest.getParam("OrderDate");
// Business logic: Validate and store the order
if (!validateOrder(orderID, customerID, productID, quantity, orderDate)) {
soapResponse.setFault("INVALID_ORDER", "Order validation failed.");
} else {
let orderRef = processOrder(orderID, customerID, productID, quantity, orderDate);
soapResponse.setParam("Status", "Success");
soapResponse.setParam("OrderReference", orderRef);
}
Qntrl sends back an XML response confirming whether the order was processed successfully.
Sample SOAP Response
<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/">
<soapenv:Body>
<OrderResponse>
<Status>Success</Status>
<OrderReference>ORD12345XYZ</OrderReference>
</OrderResponse>
</soapenv:Body>
</soapenv:Envelope>
<soapenv:Envelope
xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/"
xmlns:ord="https://core.qntrl.com/webservice/soap/orderManagement">
<soapenv:Header>
<ord:AuthHeader>
<ord:Username>APIUser</ord:Username>
</ord:AuthHeader>
</soapenv:Header>
<soapenv:Body>
<ord:PlaceOrder>
<ord:OrderID>ORD67890</ord:OrderID>
<ord:CustomerID>CUST54321</ord:CustomerID>
<ord:ProductID>PROD1122</ord:ProductID>
<ord:Quantity>2</ord:Quantity>
<ord:OrderDate>2025-04-10</ord:OrderDate>
</ord:PlaceOrder>
</soapenv:Body>
</soapenv:Envelope>