> ## Documentation Index
> Fetch the complete documentation index at: https://docs.mapp.com/llms.txt
> Use this file to discover all available pages before exploring further.
# Register a transaction
> Register an ecommerce transaction
Supply the transaction as a required JSON request body containing a transactionItems array. Only userEmail is a query parameter.
Request body example - with custom columns:
{
"transactionItems": [
{
"orderId": "20220204",
"productName": "BOSS bag",
"productSKU": "XXX-123-ABC",
"category": "Exclusive bags",
"brand": "BOSS",
"storeId": "gdg4535fsgdfg",
"purchaseSource": "http://www.mango.com",
"discountValue": "0",
"variant": "BLACK",
"productQuantity": "2",
"discountPercentage": "2",
"imageURL": "http://www.boss.com/bag.jpg",
"productURL": "http://www.boss.com/bag.jpg",
"currency": "PLN",
"timestamp": "2022-02-03T18:25:43",
"productPrice": "45",
"customDetail1": "90",
"customDetail2": "2022-02-03",
"customDetail3": "Sent"
}
]
}{
"transactionItems": [
{
"orderId": "123",
"productName": "BOSS bag",
"productSKU": "XXX-123-ABC",
"category": "Exclusive bags",
"brand": "BOSS",
"storeId": "gdg4535fsgdfg",
"purchaseSource": "http://www.mango.com",
"discountValue": "0",
"variant": "BLACK",
"productQuantity": "1",
"discountPercentage": "2",
"imageURL": "http://www.boss.com/bag.jpg",
"productURL": "http://www.boss.com/bag.jpg",
"currency": "PLN",
"timestamp": "2021-12-15T18:25:43",
"productPrice": "45"
},
{
"orderId": "124",
"productName": "Black Socks",
"productSKU": "XXX-123-UIO",
"category": "Premium Socks",
"brand": "Atlantic",
"storeId": "gdg4535fsgdfg",
"purchaseSource": "http://www.mango.com",
"discountValue": "0",
"variant": "RED",
"productQuantity": "2",
"discountPercentage": "1",
"imageURL": "http://www.atlantic.com/socks.jpg",
"productURL": "http://www.atlantic.com/socks.jpg",
"currency": "PLN",
"timestamp": "2021-12-15T18:25:43",
"productPrice": "12"
}
]
}
## OpenAPI
````json POST /ecommerce/registerTransaction
{
"openapi": "3.0.4",
"info": {
"title": "Engage public API",
"version": "1"
},
"servers": [
{
"url": "https://your-engage-domain.com/api/rest"
}
],
"tags": [
{
"name": "Address Attributes"
},
{
"name": "Async"
},
{
"name": "Audit Log"
},
{
"name": "Automation"
},
{
"name": "Blacklist"
},
{
"name": "CMS"
},
{
"name": "Contact"
},
{
"name": "Content"
},
{
"name": "Coupon"
},
{
"name": "Draft Message"
},
{
"name": "Ecommerce"
},
{
"name": "Group"
},
{
"name": "Group Attributes"
},
{
"name": "Landing Page"
},
{
"name": "Member Attributes"
},
{
"name": "Membership"
},
{
"name": "Message"
},
{
"name": "Meta"
},
{
"name": "Mobile Push"
},
{
"name": "Prepared Message"
},
{
"name": "Process"
},
{
"name": "Profile Attributes"
},
{
"name": "Related Data"
},
{
"name": "Segmentation"
},
{
"name": "System"
},
{
"name": "System User"
},
{
"name": "Usage Statistics"
},
{
"name": "User"
},
{
"name": "Whiteboard"
}
],
"paths": {
"/ecommerce/registerTransaction": {
"post": {
"tags": [
"Ecommerce"
],
"summary": "Register a transaction",
"description": "Register an ecommerce transaction{
\"transactionItems\": [
{
\"orderId\": \"20220204\",
\"productName\": \"BOSS bag\",
\"productSKU\": \"XXX-123-ABC\",
\"category\": \"Exclusive bags\",
\"brand\": \"BOSS\",
\"storeId\": \"gdg4535fsgdfg\",
\"purchaseSource\": \"http://www.mango.com\",
\"discountValue\": \"0\",
\"variant\": \"BLACK\",
\"productQuantity\": \"2\",
\"discountPercentage\": \"2\",
\"imageURL\": \"http://www.boss.com/bag.jpg\",
\"productURL\": \"http://www.boss.com/bag.jpg\",
\"currency\": \"PLN\",
\"timestamp\": \"2022-02-03T18:25:43\",
\"productPrice\": \"45\",
\"customDetail1\": \"90\",
\"customDetail2\": \"2022-02-03\",
\"customDetail3\": \"Sent\"
}
]
}{
\"transactionItems\": [
{
\"orderId\": \"123\",
\"productName\": \"BOSS bag\",
\"productSKU\": \"XXX-123-ABC\",
\"category\": \"Exclusive bags\",
\"brand\": \"BOSS\",
\"storeId\": \"gdg4535fsgdfg\",
\"purchaseSource\": \"http://www.mango.com\",
\"discountValue\": \"0\",
\"variant\": \"BLACK\",
\"productQuantity\": \"1\",
\"discountPercentage\": \"2\",
\"imageURL\": \"http://www.boss.com/bag.jpg\",
\"productURL\": \"http://www.boss.com/bag.jpg\",
\"currency\": \"PLN\",
\"timestamp\": \"2021-12-15T18:25:43\",
\"productPrice\": \"45\"
},
{
\"orderId\": \"124\",
\"productName\": \"Black Socks\",
\"productSKU\": \"XXX-123-UIO\",
\"category\": \"Premium Socks\",
\"brand\": \"Atlantic\",
\"storeId\": \"gdg4535fsgdfg\",
\"purchaseSource\": \"http://www.mango.com\",
\"discountValue\": \"0\",
\"variant\": \"RED\",
\"productQuantity\": \"2\",
\"discountPercentage\": \"1\",
\"imageURL\": \"http://www.atlantic.com/socks.jpg\",
\"productURL\": \"http://www.atlantic.com/socks.jpg\",
\"currency\": \"PLN\",
\"timestamp\": \"2021-12-15T18:25:43\",
\"productPrice\": \"12\"
}
]
}",
"operationId": "registerTransaction",
"parameters": [
{
"name": "userEmail",
"in": "query",
"description": "Email of the user",
"required": true,
"schema": {
"type": "string"
}
}
],
"requestBody": {
"description": "Transaction as JSON containing a transactionItems array.",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/Transaction"
}
}
},
"required": true,
"x-bodyName": "body"
},
"responses": {
"200": {
"description": "",
"content": {
"application/json": {}
}
},
"400": {
"description": "Required parameters are missing or incorrect.",
"content": {
"application/json": {}
}
}
}
}
}
},
"components": {
"schemas": {
"Transaction": {
"type": "object",
"properties": {
"transactionItems": {
"type": "array",
"items": {
"$ref": "#/components/schemas/TransactionItem"
}
}
}
},
"TransactionItem": {
"type": "object",
"properties": {
"orderId": {
"type": "string"
},
"productName": {
"type": "string"
},
"productSKU": {
"type": "string"
},
"category": {
"type": "string"
},
"brand": {
"type": "string"
},
"storeId": {
"type": "string"
},
"purchaseSource": {
"type": "string"
},
"discountValue": {
"type": "string"
},
"variant": {
"type": "string"
},
"productQuantity": {
"type": "string"
},
"discountPercentage": {
"type": "string"
},
"returnedQuantity": {
"type": "string"
},
"imageURL": {
"type": "string"
},
"productURL": {
"type": "string"
},
"currency": {
"type": "string"
},
"timestamp": {
"type": "string"
},
"productPrice": {
"type": "string"
},
"customDetail1": {
"type": "string"
},
"customDetail2": {
"type": "string"
},
"customDetail3": {
"type": "string"
},
"customDetail4": {
"type": "string"
},
"customDetail5": {
"type": "string"
}
}
}
}
}
}
````