- 11 Nov 2025
- 2 Minutes to read
- Print
- DarkLight
- PDF
101 - Sending Data to the BAM API
- Updated on 11 Nov 2025
- 2 Minutes to read
- Print
- DarkLight
- PDF
Once you have installed BAM there will be a sample business process already configured which is called Cab-Booking-Process.
In this page we will show how you can send API calls to the API function app which will then forward data through BAM and you will see the data appear within BAM.
Full Script
There is a full script at the bottom of this page which can be used.
Note in this sample we have code below which you can use in visual studio code with the Rest Client extension which can be installed with the below snippet.
code --install-extension humao.rest-clientStart Transaction
This request will send a message to the start transaction API
# @name StartTransaction
POST {{scheme}}://{{host}}/api/StartTransaction
x-functions-key: {{functionsKey}}
Content-Type: application/json
SL360-BusinessProcess: Cab-Booking-Process
SL360-Transaction: Details-Validator
SL360-Stage: Booking-Submission
SL360-StageStatus: Success
SL360-IsTransactionComplete: false
{
"messageBody": {
"AmountPayable": 2500,
"BookingId": "BKG123456",
"CustomerId": "CUST78910",
"DropLocation": "Airport Terminal 3",
"PickUpLocation": "Downtown Hotel"
},
"messageHeader": {}
}CheckPoint
The below request will send a checkpoint example to the checkpoint API.
Note in this case we read the Transaction instance id from the original start transaction and use this to correlate.
# @name CheckpointBookingValidation
POST {{scheme}}://{{host}}/api/CheckPoint
x-functions-key: {{functionsKey}}
Content-Type: application/json
SL360-TransactionInstanceId: {{StartTransaction.response.body.$.TransactionInstanceId}}
SL360-Stage: Booking-Validation
SL360-StageStatus: Success
SL360-IsTransactionComplete: false
{
"messageBody": {},
"messageHeader": {}
}Full Script
In the full example we will do a Start Transaction and then 2 CheckPoints. This will execute a full transaction for the cab booking process.
You should be able to take the below script as is and run it by just providing your API key and host name which you can get from the BAM configuration settings in the Turbo360 portal.
# Variables
@scheme = https
@host = [Add BAM Host Name for API Functions Here]
@functionsKey = [Add Functions App Key Here]
# Start Transaction
# Notes:
# - Here we are starting a new transaction for the Cab Booking Process.
# - We pass in a message body which is parsed by BAM to promote some properties
# @name StartTransaction
POST {{scheme}}://{{host}}/api/StartTransaction
x-functions-key: {{functionsKey}}
Content-Type: application/json
SL360-BusinessProcess: Cab-Booking-Process
SL360-Transaction: Details-Validator
SL360-Stage: Booking-Submission
SL360-StageStatus: Success
SL360-IsTransactionComplete: false
{
"messageBody": {
"AmountPayable": 2500,
"BookingId": "BKG123456",
"CustomerId": "CUST78910",
"DropLocation": "Airport Terminal 3",
"PickUpLocation": "Downtown Hotel"
},
"messageHeader": {}
}
###
# Checkpoint to update that we are at the Booking-Validation stage
# Notes:
# - We pass in the transaction instance ID from the start transaction response to correlate this checkpoint with the ongoing transaction.
# @name CheckpointBookingValidation
POST {{scheme}}://{{host}}/api/CheckPoint
x-functions-key: {{functionsKey}}
Content-Type: application/json
SL360-TransactionInstanceId: {{StartTransaction.response.body.$.TransactionInstanceId}}
SL360-Stage: Booking-Validation
SL360-StageStatus: Success
SL360-IsTransactionComplete: false
{
"messageBody": {},
"messageHeader": {}
}
###
# Checkpoint to update that we are at the Booking-Validation stage
# Notes:
# - Here we pass in the booking status as "Accepted" in the message header to indicate that the booking has been accepted.
# - We pass in the transaction instance ID from the start transaction response to correlate this checkpoint with the ongoing transaction.
# @name CheckpointBookingAccepted
POST {{scheme}}://{{host}}/api/CheckPoint
x-functions-key: {{functionsKey}}
Content-Type: application/json
SL360-TransactionInstanceId: {{StartTransaction.response.body.$.TransactionInstanceId}}
SL360-Stage: Booking-Accepted
SL360-StageStatus: Success
SL360-IsTransactionComplete: true
{
"messageBody": {},
"messageHeader": {
"BookingStatus": "Accepted"
}
}