Skip to content

Order Notifications

Product orders are a vital part of the determining the relevance of a products and must be notified upon completion. The payment notification is to be sent immediately when the visitor has placed an order of one or more products and completed the payment. For security reasons this must be made as a server side operation.

Market identifiers and key conventions

Market identifiers and product key conventions must be consistent across the data feed, the order notifications, and the order history. Ensure this is consistent.

Request example

A order notification request example, with fictive credentials, is demonstrated using cURL below.

curl -i -X POST \
-d '{ "sessionKey": "5e856fae-235e-e02f-1e85-d19f67ccce5f", "customerKey": "5e856fae-235e-e02f-1e85-d19f67ccce5f", "market": "UK", "lines": [{"productKey":"P_555452-0446_UK", "quantity": 1, "sellingPrice": 10.35,  "cost": 5.1, "variantKey": "V1" }]}' \
-H "Content-Type: application/json" \
-H "Api-Key: pkA123456789AB1BDA3E968F69A97B5508BF5B123456778912FFC99" \
"https://w1A2B3C45.api.esales.apptus.cloud/api/v1/notifications/payment"

Request specification

Request specification Description
Method POST
Header Content-Type: application/json
Header Api-Key: apiKey, the unique apiKey provided by Apptus
body The order provided in a specific format.
url https://webApiId.api.esales.apptus.cloud/api/v1/notifications/payment, with the unique webApiId provided by Apptus

If the notification is valid, a 204 OK response will be returned. If the notification is invalid, an error will be returned.

Request body

{
    "sessionKey": "string",
    "customerKey": "string",
    "market": "string",
    "lines": [
        {
            "productKey": "string",
            "variantKey": "string",
            "quantity": "int",
            "sellingPrice": "double"
        }
    ]
}

Request body Parameters

Name Type Description Example
sessionKey string A unique session id retrieved from the component library 2F75A...EAFA6
customerKey string A unique visitor id retrieved from the component library 5G7HJ...R77T1
market string Visitor Market Sweden
lines array[ ] Array with payment information. productKey: P1, quantity: 2, sellingPrice: 20.0, cost: 10.0
variantKey string The unique key of the variant. shirt_blue_79709
quantity int The quantity of the purchased variant. 2
sellingPrice double The selling price of the purchased product. 20.0
cost double The cost of the purchased product. If the cost is not available, cost should not be included in the notification. 10.0

Accessing keys

The sessionKey and customerKey can be retrieved from the component library API:

const sessionKey = esales.session.sessionKey;
const customerKey = esales.session.customerKey;
×
Copyright

This online publication is intellectual property of Apptus Technologies. Its contents can be duplicated in part or whole, provided that a copyright label is visibly located on each copy and the copy is used in conjunction with the product described within this document.

All information found in these documents has been compiled with utmost attention to detail. However, this does not guarantee complete accuracy. Neither Apptus Technologies nor the authors shall be held liable for possible errors or the consequences thereof.

Software and hardware descriptions cited in these documents might be registered trademarks. All trade names are subject to copyright restrictions and may be registered trademarks. Apptus Technologies essentially adheres to the manufacturer’s spelling. Names of products and trademarks appearing in this document, with or without specific notation, are likewise subject to trademark and trade protection laws and may thus fall under copyright restrictions.

CLOSE