This is the provisioning flow for QwantiFi: how RMS retrieves the latest QwantiFi configuration from the Magensa Gateway, generates the device command list, and hands it back so a client can apply it to a reader and report the result. For the architecture and server configuration behind this API, see the Web RMS Service.
The client requests one of three configuration names β DynaFlexMqtt (MQTT only), DynaFlexTrust (Trust/TLS only), or DynaFlexMqttAll (both).
POST {{RMSV2Url}}/V2/Configs{
"ProductName": "DYNAFLEX",
"ProfileName": "MagTek_MQTT",
"ConfigurationName": "DynaFlexMqttAll",
"Version": null,
"FirmwareID": "1000009711-AC2-PCI",
"DeviceSerialNumber": "B563215",
"BillingLabel": "Test",
"InterfaceType": "USB",
"DownloadPayload": true,
"RawCommands": true,
"Authentication": null,
"AdditionalParameters": {
"KSN": "9070020B56C3AEE00000",
"Boot1FirmwareID": "",
"WifiFirmwareID": "",
"ResellerID": "13204",
"CustomerID": "2026213",
"DeviceNickname": "Store 101 Front Counter",
"Street1": "3674 Tyler Ave",
"Street2": "Suite 200",
"City": "El Monte",
"State": "CA",
"ZipCode": "91731",
"ZipPlus4": "2506",
"Country": "US"
}
}ResellerID, CustomerID, and the Location fields are passed through in AdditionalParameters.
RMS checks the device's current provisioning state against the Magensa Gateway.
If request.Version is 0, perform a forced update and return all configuration commands.
Otherwise, compare the version-store hash with the database hash.
If the hashes are identical, return a status of Up To Date.
When the MQTT configuration differs from the device's configuration, the API returns the commands required to update the device. The Commands array contains the device commands (DISPLAYMESSAGE, SENDCOMMAND, WAIT, and optionally SENDFILE, RESETDEVICE) needed to apply the update.
The Trust-only response (ConfigurationName: DynaFlexTrust) has the same shape but a much shorter Commands array β the Trust/TLS command(s) only.
After applying the commands, the client reports success or failure back to RMS.
On success, RMS updates the version store with the latest configuration version and MQTT hash, and records the update status in the log.
For Trust configuration:
If request.Version is 0, perform a forced update and return all configuration commands.
Otherwise, compare the device version with the configuration file version.
If request.Version is null, use the stored version as the device version for comparison.
RMS marks the device's status in the Gateway database.
If the hashes differ, return the commands required to update the device.
If the device version matches the configuration version, return a status of Up To Date.
If the device version is lower, return the commands required to update to the latest configuration.
GET {{gatewayUrl}}/MagensaMQTT/api/device-check?deviceSN={{deviceSn}}{
"recordExists": true,
"mqttProvisioned": true,
"status": "Provisioned",
"deviceMqttHash": "8ebbeadebdc88d1ae6098179fe1940629d7ed2b9ba85c7eb3afb227d7d73257d"
}POST {{gatewayUrl}}/MagensaMQTT/api/credentials{
"deviceSn": "B56C3AE",
"resellerId": "13204",
"customerId": "2026213",
"ksn": "9070020B56C3AEE00000",
"firmware": { "boot1": "1000008593-A1-PCI", "main": "1000008594-AA4-PRD", "wifi": "1000007537-AB2-PCI" },
"location": { "street1": "Pennsylvania Plaza", "street2": "", "city": "New York", "state": "New York", "zipCode": "10001", "zipPlus4": "", "country": "US" },
"nickname": "B56C3AE"
}{
"deviceSn": "B563215",
"status": "PROVISIONED",
"mqttConfig": {
"broker": "10.0.5.151",
"port": 1883,
"peerCommonName": "",
"qos": 1,
"clientId": "B563215",
"username": "13204-2026213-B563215",
"password": "EXAMPLE-DUMMY-DEVICE-PASSWORD",
"subscribeTopic": "MagTek/13204/2026213/B563215/#",
"publishTopic": "MagTek/13204/2026213/device/publish/B563215",
"operatingMode": "mqtt"
}
}{
"Claims": {
"WlanProtocol": "00",
"Broker": "dev-mqtt.magensa.dev",
"Port": "8883",
"QoS": "1",
"SubscribeTopic": "MagTek/13204/2026213/B563215/SendCommand",
"PublishTopic": "MagTek/13204/2026213/device/publish/B563215",
"ClientId": "B563215",
"Username": "13204-2026213-B563215",
"Password": "******",
"PeerCommonName": "dev-mqtt.magensa.dev",
"OperatingMode": "mqtt"
},
"Name": "DynaFlex MQTT and Trust Configuration",
"Version": 3,
"ResultCode": 0,
"Result": "Success",
"MagTranIDs": [ "34cf8363-13c2-49b8-a70e-118d7529d452" ],
"Commands": [
"DISPLAYMESSAGE,Beginning DynaFlex MQTT Update...",
"SENDCOMMAND,AA0081040155D1118410D1118501018704020201018903D10100", // Updating WlanProtocol to 00
"SENDCOMMAND,AA0081040155D111844FD11185010187040202010289β¦", // Updating BrokerAddress
"SENDCOMMAND,AA0081040155D1118411D11185010187040202010289β¦", // Updating Port to 8883
"β¦", // QoS, SubscribeTopic, PublishTopic, ClientId, Username, Password, PeerCommonName
"DISPLAYMESSAGE,Updating Trust 05000100",
"WAIT,100",
"SENDCOMMAND,AA0081040101D8128444D812810405000100β¦", // Trust config command
"WAIT,100",
"SENDCOMMAND,AA00810804β¦<TLS certificate payload>β¦", // Trust certificate (abbreviated)
"DISPLAYMESSAGE,Finished DynaFlex MQTT Update"
],
"ReleaseNotes": null
}POST {{RMSV2Url}}/V2/Configs/UpdateDeviceStatus{
"ProductName": "DYNAFLEX",
"ProfileName": "MagTek_MQTT",
"ConfigurationName": "DynaFlexMqttAll",
"FirmwareID": "1000009712-AC3-PRD",
"DeviceSerialNumber": "B62CA5F",
"Operation": "UpdateMQTTConfigurations",
"Authentication": null,
"AdditionalParameters": { "ResellerID": "13204", "CustomerID": "2026213" },
"ResultCode": 0,
"Result": "Success",
"ResultDetails": "",
"MagTranIDs": [ "0455ef05-4b00-45d9-a312-92877b5f0b04" ]
}PATCH {{gatewayUrl}}/api/confirm-device-status{ "deviceSn": "B56C3AE" }